diff --git a/.gitattributes b/.gitattributes index 1ef325f1b111266a6b26e0196871bd78baa8c2f3..37c62f4d3f03999d87c2ca7ce672c92616f79523 100644 --- a/.gitattributes +++ b/.gitattributes @@ -57,3 +57,36 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text # Video files - compressed *.mp4 filter=lfs diff=lfs merge=lfs -text *.webm filter=lfs diff=lfs merge=lfs -text +data/docs/BASICs/101_BASIC_Computer_Games_Mar75.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/BASICs/AltairBasic_1275.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/BASICs/Apple2AppleSoftBASICRef1977.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/BASICs/ECMA-55_1st_edition_january_1978.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/BASICs/Kilobaud_1977_June.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/BASICs/TinyBASIC-2.0.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/BASICs/aim65_basic.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/BASICs/apple1_basic_manual.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/ABX00053-datasheet.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/Atmel-8869-SEEPROM-AT24CS32-Datasheet.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/BMP280datasheet.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/BST-BME280_DS001-10.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/DS1307.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/DS3231[[:space:]]Real[[:space:]]Time[[:space:]]Clock[[:space:]]Connection[[:space:]]Diagrams.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/DS3231[[:space:]]Real[[:space:]]Time[[:space:]]Clock[[:space:]]Datenblatt[[:space:]]AZ-Delivery[[:space:]]Vertriebs[[:space:]]GmbH.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/DS3231.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/DS3232.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/Digispark.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/ESP8266-01[[:space:]]USB-Stick[[:space:]]DE.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/KeyboardController.pages filter=lfs diff=lfs merge=lfs -text +data/docs/components/PS2Keyboard[[:space:]]Library,[[:space:]]Connect[[:space:]]a[[:space:]]keyboard[[:space:]]for[[:space:]]user[[:space:]]input.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/Pinout-NANOevery_latest.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/Programming+the+Wemos+Mega+Wifi+Board.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/RK-10290_410.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/SSD1306.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/SSD1963_v1.6.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/ThermalprinterSpecs.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/doc0336.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/components/vga32_v1.4.pdf filter=lfs diff=lfs merge=lfs -text +data/docs/img/IMG_7220.mov filter=lfs diff=lfs merge=lfs -text +data/docs/tutorial/BASIC[[:space:]]on[[:space:]]Arduinos[[:space:]]-[[:space:]]Introduction.epub filter=lfs diff=lfs merge=lfs -text +data/docs/tutorial/BASIC[[:space:]]on[[:space:]]Arduinos[[:space:]]-[[:space:]]Introduction.pages filter=lfs diff=lfs merge=lfs -text +data/misc/UTFT.pdf filter=lfs diff=lfs merge=lfs -text diff --git a/data/Basic1/IotBasic/IoTBasic.ino b/data/Basic1/IotBasic/IoTBasic.ino new file mode 100644 index 0000000000000000000000000000000000000000..9475aedf397a872d7f7056933589183aff15809d --- /dev/null +++ b/data/Basic1/IotBasic/IoTBasic.ino @@ -0,0 +1,8399 @@ +/* + * + * $Id: basic.c,v 1.144 2023/07/16 14:17:08 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * The first set of definions define the target. + * - MINGW switches on Windows calls - this is the mingw.org version + * _ MINGW64 like MINGW but with the mingw 64 support + * - MSDOS for MSDOS file access. + * - MAC doesn't need more settings here + * - RASPPI activates wiring code + * - Review hardware-*.h for settings specific Arduino hardware settings + * - HAS* activates or deactives features of the interpreter + * - the extension flags control features and code size + * + * MEMSIZE sets the BASIC main memory to a fixed value, + * if MEMSIZE=0 a heuristic is used based on free heap + * size and architecture parameters + * + * USEMEMINTERFACE controls the way memory is accessed. Don't change + * this here. It is a parameter set by hardware-arduino.h. + * This feature is experimental. + * + */ +#undef MINGW +#undef MSDOS +#undef RASPPI + +/* + interpreter feature sets, choose one of the predefines + or undefine all predefines and set the features in custom settings +*/ + +/* + * BASICFULL: full language set, use this with flash >32kB - ESPs, MKRs, Mega2560, RP2040, UNO R4 + * BASICINTEGER: integer BASIC with full language, use this with flash >32kB + * BASICSIMPLE: integer BASIC with reduced language set, 32kB capable - for UNOs with a lot of device drivers + * BASICSIMPLEWITHFLOAT: a small floating point BASIC, 32kB capable, for UNOs - good for UNOs with the need of float + * BASICTINYWITHFLOAT: a floating point tinybasic, if you have 32kB and need complex device drivers + * BASICMINIMAL: minimal language, just Palo Alto plus Arduino I/O, works on 168 with 1kB RAM and 16kB flash + */ +#define BASICFULL +#undef BASICINTEGER +#undef BASICSIMPLE +#undef BASICMINIMAL +#undef BASICSIMPLEWITHFLOAT +#undef BASICTINYWITHFLOAT + +/* + * custom settings undef all the the language sets + * when you def here + */ +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASMSTAB +#define HASARRAYLIMIT +#define HASSTRUCT + +/* Palo Alto plus Arduino functions */ +#ifdef BASICMINIMAL +#undef HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#undef HASSTEFANSEXT +#undef HASERRORMSG +#undef HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* all features minus float and tone */ +#ifdef BASICINTEGER +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASMSTAB +#define HASARRAYLIMIT +#define HASSTRUCT +#endif + +/* a simple integer basic for small systems (UNO etc) */ +#ifdef BASICSIMPLE +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#define HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* all features activated */ +#ifdef BASICFULL +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASMSTAB +#define HASARRAYLIMIT +#define HASSTRUCT +#endif + +/* a simple BASIC with float support */ +#ifdef BASICSIMPLEWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* a Tinybasic with float support */ +#ifdef BASICTINYWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* + * hardcoded memory size, set 0 for automatic malloc, don't redefine this beyond this point + */ +#define MEMSIZE 0 + +/* debug mode switch, set to 1 for hard debug mode with many messages */ +#define DEBUG 0 + +/* + * Language feature dependencies + * + * Dartmouth and darkarts needs the heap which is in Apple 1 + * IoT needs strings and the heap, also Apple 1 + * + * String arrays need multi dimensional capabilities + * + * The structured language set needs ELSE from STEFANSEXT + * + */ +#if defined(HASDARTMOUTH) || defined(HASDARKARTS) || defined(HASIOT) +#define HASAPPLE1 +#endif + +#if defined(HASSTRINGARRAYS) +#define HASMULTIDIM +#endif + +#ifdef HASSTRUCT +#define HASSTEFANSEXT +#endif + +/* + * if there are many commands we need the token extension i.e. 2 byte tokens + * #undef HASLONGTOKENS + * this is normally done in basic.h where the tokens are set + */ + + +/* + * the core basic language headers including some Arduino device stuff + */ +#include "basic.h" + +/* + * Hardware dependend definitions code are isolated in hardware-*.h + * Currently there are two versions + * hardware-arduino.h contains all platforms compiled in the Arduino IDE + * (ESP8266, ESP32, AVR, MEGAAVR, SAM*, RP2040) + * hardware-posix.h contains all platforms compiled in gcc with a POSIX OS + * (Mac, Raspberry, Windows/MINGW) plus rudimentary MSDOS with tc2.0. The + * latter will be removed soon. + */ +#ifdef ARDUINO +#include "hardware-arduino.h" +#else +#include "hardware-posix.h" +#endif + +/* + * + * BASIC timer stuff, this is a core interpreter function now + * + */ + +/* + * the byield function is called after every statement + * it allows four levels of background tasks. + * + * fastticker() is used to trigger all fast timing functions of + * the core interpreter. It can also be used to implement a + * "tone without timer solution" + * + * yieldfunction() triggers a 32ms timer which calls network + * and USB handling functions + * + * longyielfunction() is a 1s timer for long termin maintance + * functions + * + * yieldscheduler() is the hardware scheduler of some platforms + * + */ + +void byield() { + +/* the fast ticker for all fast timing functions */ + fastticker(); + +/* the loop function for non BASIC stuff */ + bloop(); + +#if defined(BASICBGTASK) +/* yield all 32 milliseconds */ + if (millis()-lastyield > YIELDINTERVAL-1) { + yieldfunction(); + lastyield=millis(); + } + +/* yield every second */ + if (millis()-lastlongyield > LONGYIELDINTERVAL-1) { + longyieldfunction(); + lastlongyield=millis(); + } + #endif + + /* call the background task scheduler on some platforms implemented in hardware-* */ + yieldschedule(); +} + +/* delay must be implemented to use byield() while waiting */ +void bdelay(unsigned long t) { + unsigned long i; + if (t>0) { + i=millis(); + while (millis() < i+t) byield(); + } +} + +/* fastticker is the hook for all timing functions */ +void fastticker() { +/* fastticker profiling test code */ +#ifdef FASTTICKERPROFILE + fasttickerprofile(); +#endif +/* toggle the tone pin */ +#ifdef ARDUINOTONEEMULATION + tonetoggle(); +#endif +} + +/* the millis function for BASIC */ +void bmillis() { + number_t m; +/* millis is processed as integer and is cyclic mod maxnumber and not cast to float!! */ + m=(number_t) (millis()/(unsigned long)pop() % (unsigned long)maxnum); + push(m); +} + +/* + * Determine the possible basic memory size. + * using malloc causes some overhead which can be relevant on the smaller + * boards. set MEMSIZE instead to a static value. In this case ballocmem + * just returns the static MEMSIZE. + * + * if SPIRAMINTERFACE is defined, we use the memory from a serial RAM and dont + * allocate it here at all. + * + */ +#if MEMSIZE == 0 && !(defined(SPIRAMINTERFACE)) +address_t ballocmem() { + +/* on most platforms we know the free memory for BASIC */ + long m=freememorysize(); + +/* we allocate as much as address_t can handle */ + if (m>maxaddr) m=maxaddr; + +/* try to allocate the memory */ + mem=(mem_t*)malloc(m); + if (mem != 0) return m-1; + +/* fallback if allocation failed, 128 bytes */ + mem=(mem_t*)malloc(128); + if (mem != 0) return 128; else return 0; + +} +#else +address_t ballocmem(){ return MEMSIZE-1; }; +#endif + +/* + * Layer 0 function - variable handling. + * + * These function access variables and data + */ + +/* + * eeprom load / save / autorun functions + * needed for SAVE and LOAD to an EEPROM + * autorun is generic + */ + +/* save a file to EEPROM, disabled if we use the EEPROM directly */ +void esave() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + + if (top+eheadersize < elength()) { + a=0; + /* EEPROM per default is 255, 0 indicates that there is a program */ + eupdate(a++, 0); + + /* store the size of the program in byte 1,2,... of the EEPROM*/ + z.a=top; + esetnumber(a, addrsize); + a+=addrsize; + + while (a < top+eheadersize){ + eupdate(a, memread2(a-eheadersize)); + a++; + } + eupdate(a++,0); + } else { + error(EOUTOFMEMORY); + er=0; + } +/* needed on I2C EEPROM and other platforms where we buffer */ + eflush(); +#endif +} + +/* load a file from EEPROM, disabled if the use the EEPROM directly */ +void eload() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + if (elength()>0 && (eread(a) == 0 || eread(a) == 1)) { + /* have we stored a program */ + a++; + + /* how long is it? */ + egetnumber(a, addrsize); + top=z.a; + a+=addrsize; + + while (a < top+eheadersize){ + memwrite2(a-eheadersize, eread(a)); + a++; + } + } else { + /* no valid program data is stored */ + error(EEEPROM); + } +#endif +} + +/* autorun something from EEPROM or a filesystem */ +char autorun() { +#if defined(ARDUINOEEPROM) || defined(ARDUINOI2CEEPROM) || ! defined(ARDUINO) + if (eread(0) == 1){ /* autorun from the EEPROM */ + egetnumber(1, addrsize); + top=z.a; + st=SERUN; + return 1; /* EEPROM autorun overrules filesystem autorun */ + } +#endif +#if defined(FILESYSTEMDRIVER) || !defined(ARDUINO) +/* on a POSIX or DOS platform, we check the command line first and the autoexec */ +#ifndef ARDUINO + if (bargc > 0) { + if (ifileopen(bargv[1])) { + xload(bargv[1]); + st=SRUN; + ifileclose(); + bnointafterrun=TERMINATEAFTERRUN; + return 1; + } + } +#endif + if (ifileopen("autoexec.bas")) { + xload("autoexec.bas"); + st=SRUN; + ifileclose(); + return 1; + } +#endif + return 0; +} + +#ifdef HASAPPLE1 +/* + * bmalloc() allocates a junk of memory for a variable on the + * heap, every objects is identified by name (c,d) and type t + * 3 bytes are used here. + */ +address_t bmalloc(mem_t t, mem_t c, mem_t d, address_t l) { + address_t vsize; /* the length of the header on the heap*/ + address_t b; + + if (DEBUG) { outsc("** bmalloc with token "); outnumber(t); outcr(); } + + /* check if the object already exists */ + if (bfind(t, c, d) != 0 ) { error(EVARIABLE); return 0; }; + +/* + * how much space is needed + * 3 bytes for the token and the 2 name characters + * numsize for every number including array length + * one byte for every string character + */ + switch(t) { + case VARIABLE: + vsize=numsize+3; + break; +#ifndef HASMULTIDIM + case ARRAYVAR: + vsize=numsize*l+addrsize+3; + break; +#else +/* multidim implementation for n=2 */ + case ARRAYVAR: + vsize=numsize*l+addrsize*2+3; + break; +#endif +#ifdef HASDARTMOUTH + case TFN: + vsize=addrsize+2+3; + break; +#endif + default: + vsize=l+addrsize+3; + } + +/* enough memory ?, on an EEPROM system we limit the heap to the RAM */ +#ifndef EEPROMMEMINTERFACE + if ((himem-top) < vsize) { error(EOUTOFMEMORY); return 0;} +#else + if (himem-(elength()-eheadersize) < vsize) { error(EOUTOFMEMORY); return 0;} +#endif + +/* store the name of the objects (2 chars) plus the type (1 char) as identifier */ + b=himem; + + memwrite2(b--, c); + memwrite2(b--, d); + memwrite2(b--, t); + + +/* for strings, arrays and buffers write the (maximum) length + directly after the header */ + if (t == ARRAYVAR || t == STRINGVAR || t == TBUFFER) { + b=b-addrsize+1; + z.a=vsize-(addrsize+3); + setnumber(b, addrsize); + b--; + } + +/* remark on multidim, the byte length is after the header and the following + address_t bytes are then reserved for the first dimension */ + +/* reserve space for the payload */ + himem-=vsize; + nvars++; + + return himem+1; +} + +/* + * bfind() passes back the location of the object as result + * the length of the object is in z.a as a side effect + * rememers the last search + * + */ +address_t bfind(mem_t t, mem_t c, mem_t d) { + address_t b = memsize; + mem_t t1; + mem_t c1, d1; + address_t i=0; + +/* the bfind cache, did we ask for that object before? - + needed to make the string code efficient */ + if (t == bfindt && c == bfindc && d == bfindd) { + z.a=bfindz; + return bfinda; + } + + +/* walk through the heap now */ + while (i < nvars) { + + c1=memread2(b--); + d1=memread2(b--); + t1=memread2(b--); + + switch(t1) { + case VARIABLE: + z.a=numsize; + break; + case TFN: + z.a=addrsize+2; + break; + default: + b=b-addrsize+1; + getnumber(b, addrsize); + b--; + } + + b-=z.a; + +/* once we found we cache and return the location */ + if (c1 == c && d1 == d && t1 == t) { + bfindc=c; + bfindd=d; + bfindt=t; + bfindz=z.a; + bfinda=b+1; + return b+1; + } + i++; + } + + return 0; +} + +/* finds an object and deletes the heap from this object on + including the object itself */ +address_t bfree(mem_t t, mem_t c, mem_t d) { + address_t b = memsize; + mem_t t1; + mem_t c1, d1; + address_t i=0; + + if (DEBUG) { outsc("*** bfree called for "); outch(c); outch(d); outsc(" on heap with token "); outnumber(t); outcr(); } + +/* walk through the heap to find the location */ + while (i < nvars) { + + c1=memread2(b--); + d1=memread2(b--); + t1=memread2(b--); + +/* found it */ + if (t == t1 && c == c1 && d == d1) { + +/* set the number of variables to the new value */ + nvars=i; + if (DEBUG) { outsc("*** bfree setting nvars to "); outnumber(nvars); outcr(); } + +/* clean up - this is somehow optional, one could drop this */ + if (DEBUG) { outsc("*** bfree clearing "); outnumber(himem); outspc(); outnumber(b+3); outcr(); } + for (i=himem; i<=b+3; i++) memwrite2(i, 0); + +/* now set the memory to the right address */ + himem=b+3; + +/* forget the chache, because heap structure has changed !! */ + bfindc=0; + bfindd=0; + bfindt=0; + bfindz=0; + bfinda=0; + + return himem; + } + + switch(t1) { + case VARIABLE: + z.a=numsize; + break; +#ifdef HASDARTMOUTH + case TFN: + z.a=addrsize+2; + break; +#endif + default: + b=b-addrsize+1; + getnumber(b, addrsize); + b--; + } + + b-=z.a; + i++; + } + return 0; +} + +/* the length of an object */ +address_t blength (mem_t t, mem_t c, mem_t d) { + if (bfind(t, c, d)) return z.a; else return 0; +} +#endif + +/* get and create a variable */ +number_t getvar(mem_t c, mem_t d){ + address_t a; + + if (DEBUG) { outsc("* getvar "); outch(c); outch(d); outspc(); outcr(); } + +/* the static variable array */ + if (c >= 65 && c <= 91 && d == 0) return vars[c-65]; + +/* the special variables */ + if ( c == '@' ) + switch (d) { + case 'A': + return availch(); + case 'S': + return ert; + case 'I': + return id; + case 'O': + return od; + case 'C': + if (availch()) return inch(); else return 0; + case 'E': + return elength()/numsize; + case 0: + return (himem-top)/numsize; + case 'R': + return rd; + case 'U': + return getusrvar(); +#ifdef HASIOT + case 'V': + return vlength; +#endif +#if defined(DISPLAYDRIVER) || defined (GRAPHDISPLAYDRIVER) + case 'X': + return dspgetcursorx(); + case 'Y': + return dspgetcursory(); +#endif + } + +#ifdef HASAPPLE1 +/* dynamically allocated vars, create them on the fly if needed */ + if (!(a=bfind(VARIABLE, c, d))) a=bmalloc(VARIABLE, c, d, 0); + if (er != 0) return 0; + +/* retrieve the value */ + getnumber(a, numsize); + return z.i; + +#else +/* systems without Apple1 extension i.e. HEAP throw an error */ + error(EVARIABLE); + return 0; +#endif +} + +/* set and create a variable */ +void setvar(mem_t c, mem_t d, number_t v){ + address_t a; + + if (DEBUG) { outsc("* setvar "); outch(c); outch(d); outspc(); outnumber(v); outcr(); } + +/* the static variable array */ + if (c >= 65 && c <= 91 && d == 0) { + vars[c-65]=v; + return; + } + +/* the special variables */ + if ( c == '@' ) + switch (d) { + case 'S': + ert=v; + return; + case 'I': + id=v; + return; + case 'O': + od=v; + return; + case 'C': + outch(v); + return; + case 'R': + rd=v; + return; + case 'U': + setusrvar(v); + return; +#ifdef HASIOT + case 'V': + return; +#endif +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case 'X': + dspsetcursorx((int)v); +/* set the charcount, this is half broken but works */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=v; +#endif + return; + case 'Y': + dspsetcursory((int)v); + return; +#endif + } + +#ifdef HASAPPLE1 +/* dynamically allocated vars */ + if (!(a=bfind(VARIABLE, c, d))) a=bmalloc(VARIABLE, c, d, 0); + if (er != 0) return; + +/* set the value */ + z.i=v; + setnumber(a, numsize); +#else + error(EVARIABLE); +#endif +} + +/* clr all variables */ +void clrvars() { + address_t i; + +/* delete all statics */ + for (i=0; i= dim + arraylimit) || (i < arraylimit) || (i >= h/dim + arraylimit)) { error(EORANGE); return; } +#else + if (DEBUG) { outsc("** in array "); outnumber(i); outspc(); outnumber(a); outcr(); } + if ( (i < arraylimit) || (i >= h + arraylimit) ) { error(EORANGE); return; } +#endif + +/* set or get the array */ + if (m == 'g') { + if (! e) { + getnumber(a, numsize); + } else { + egetnumber(a, numsize); + } + *v=z.i; + } else if ( m == 's') { + z.i=*v; + if (! e) { setnumber(a, numsize); } else { esetnumber(a, numsize); } + } +} + +/* create a string on the heap, i is the length of the string, j the dimension of the array */ +address_t createstring(char c, char d, address_t i, address_t j) { +#ifdef HASAPPLE1 + address_t a, zt; + + if (DEBUG) { outsc("Create string "); outch(c); outch(d); outspc(); outnumber(nvars); outcr(); } + +#ifndef HASSTRINGARRAYS +/* if no string arrays are in the code, we reserve the number of bytes i and space for the index */ + if (bfind(STRINGVAR, c, d)) error(EVARIABLE); else a=bmalloc(STRINGVAR, c, d, i+strindexsize); + if (er != 0) return 0; + return a; +#else +/* string arrays need the number of array elements which address_ hence addresize bytes and then + the space for j strings */ + if (bfind(STRINGVAR, c, d)) error(EVARIABLE); else a=bmalloc(STRINGVAR, c, d, addrsize+j*(i+strindexsize)); + if (er != 0) return 0; + +/* preserve z.a, this is a side effect of bmalloc and bfind */ + zt=z.a; + +/* set the dimension of the array */ + z.a=j; + setnumber(a+j*(i+strindexsize), addrsize); + z.a=zt; + + return a; +#endif + if (er != 0) return 0; + return a; +#else + return 0; +#endif +} + + +/* get a string at position b, the -1+stringdexsize is needed because a string index starts with 1 + * in addition to the memory pointer, return the address in memory. + * We use a pointer to memory here instead of going through the mem interface with an integer variable + * This makes string code lean to compile but is awkward for systems with serial memory + * + * The code may look like doing multiple heap scans for just one string as stringdim and lenstring are + * called here which causes bfind to called multiple time. This is harmless as bfind caches the last + * heap address. + * + * Getstring returns a pointer to the first string element in question. + * + * There are two side effects of getstring + * - ax has the address in memory of the string, if the string is on heap. 0 otherwise. + * - z.a has the number of bytes in the string payload area inculding the string length counter + */ + +char* getstring(char c, char d, address_t b, address_t j) { + address_t k, zt, dim, maxlen; + + ax=0; + if (DEBUG) { outsc("* get string var "); outch(c); outch(d); outspc(); outnumber(b); outcr(); } + +/* direct access to the input buffer - deprectated but still there */ + if ( c == '@' && d == 0) { + return ibuffer+b; + } + +#ifdef HASAPPLE1 +/* special strings */ + +/* the time string */ +#if defined(HASCLOCK) + if ( c == '@' && d == 'T') { + rtcmkstr(); + return rtcstring+1+b; + } +#endif + +/* a user definable special string in sbuffer, makeusrtring is a + user definable function */ + if ( c == '@' && d == 'U' ) { + makeusrstring(); + return sbuffer+b; + } + + +/* the arguments string on POSIX systems */ +#ifndef ARDUINO + if ( c == '@' && d == 'A' ) { + if (bargc > 2) return bargv[2]; else return 0; + } +#endif + + if ( c == '@') { error(EVARIABLE); return 0;} + +/* dynamically allocated strings, create on the fly */ + if (!(ax=bfind(STRINGVAR, c, d))) ax=createstring(c, d, STRSIZEDEF, 1); + + if (DEBUG) { + outsc("** heap address "); outnumber(ax); outcr(); + outsc("** byte length "); outnumber(z.a); outcr(); + } + + if (er != 0) return 0; + +#ifndef HASSTRINGARRAYS + + if ((b < 1) || (b > z.a-strindexsize )) { + error(EORANGE); return 0; + } + + ax=ax+strindexsize+(b-1); + +#else + +/* the dimension of the string array */ + + zt=z.a; + getnumber(ax+z.a-addrsize, addrsize); + dim=z.a; + + if ((j < arraylimit) || (j >= dim + arraylimit )) { + error(EORANGE); return 0; + } + + if (DEBUG) { outsc("** string dimension "); outnumber(dim); outcr(); } + +/* the max length of a string */ + maxlen=(zt-addrsize)/dim-strindexsize; + + if ((b < 1) || (b > maxlen )) { + error(EORANGE); return 0; + } + + if (DEBUG) { outsc("** maximum string length "); outnumber(maxlen); outcr(); } + +/* the base address of a string */ + ax=ax+(j-arraylimit)*(maxlen + strindexsize); + + if (DEBUG) { outsc("** string base address "); outnumber(ax); outcr(); } + +/* get the actual length */ +/* getnumber(ax, strindexsize); */ + +/* the address */ + ax=ax+b-1+strindexsize; + +/* leave the string data record length in z.a */ + z.a=maxlen+strindexsize; +#endif + + if (DEBUG) { outsc("** payload address address "); outnumber(ax); outcr(); } + +/* return value is 0 if we have no direct memory access, the caller needs to handle the string + through the mem address, we return no pointer but provide a copy of the string in the first + string buffer*/ +#ifdef USEMEMINTERFACE + for (k=0; k 2) while(a < SBUFSIZE && bargv[2][a] != 0) a++; + return a; + } +#endif + +/* locate the string */ + a=bfind(STRINGVAR, c, d); + if (er != 0) return 0; + +/* string does not yet exist, return length 0 */ + if (a == 0) return 0; + +/* get the string length from memory */ +#ifndef HASSTRINGARRAYS + getnumber(a, strindexsize); + return z.a; +#else + a=a+(stringdim(c, d)+strindexsize)*(j-arraylimit); + getnumber(a, strindexsize); + return z.a; +#endif +} + +/* set the length of a string */ +void setstringlength(char c, char d, address_t l, address_t j) { + address_t a, zt; + + if (DEBUG) { + outsc("** setstringlength "); + outch(c); outch(d); + outspc(); outnumber(l); outspc(); outnumber(j); + outcr(); + } + + if (c == '@') { + *ibuffer=l; + return; + } + +/* find the variable address */ + a=bfind(STRINGVAR, c, d); + if (er != 0) return; + + if (a == 0) { + error(EVARIABLE); + return; + } + +/* multiple calls of bfind here is harmless as bfind caches */ + a=a+(stringdim(c, d)+strindexsize)*(j-arraylimit); + + if (DEBUG) { outsc("** setstringlength writing to "); outnumber(a); outsc(" value "); outnumber(l); outcr(); } + + z.a=l; + setnumber(a, strindexsize); +} + +#endif + +/* the BASIC string mechanism for real time clocks, create a string with the clock data */ +#ifdef HASCLOCK +char* rtcmkstr() { + int cc = 2; + int t; + char ch; + +/* hours */ + t=rtcget(2); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* minutes */ + t=rtcget(1); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* seconds */ + t=rtcget(0); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='-'; + +/* days */ + t=rtcget(4); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* months */ + t=rtcget(5); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* years */ + t=rtcget(6)%100; /* only 100 years no 19xx epochs */ + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc]=0; + +/* needed for BASIC strings, reserve the first byte for two byte length handling in the upstream code */ + rtcstring[1]=cc-2; + rtcstring[0]=0; + return rtcstring+1; +} +#endif + +/* + * Layer 0 Extension: the user defined extension functions, use this function for a + * quick way to extend BASIC. + * + * @U is a single variable that can be set and get. Every access to this variable + * calls getusrvar() or setusrvar(). + * @U() is a 1d array every access calls get or setusrarray(). + * @U$ is a read only string created by makeusrstring(). + * USR(32, V) is a user defined function created by usrfunction(). + * CALL 32 is a user defined call + * + */ + +/* read or write the variable @U, you can do anything you want here */ +number_t getusrvar() { return 0; } +void setusrvar(number_t v) {return; } + + +/* read or write the array @U(), you can do anything you want here */ +number_t getusrarray(address_t i) {return 0;} +void setusrarray(address_t i, number_t v) {return; } + +/* make the usr string from @U$, this function can be called multiple times for one operation */ +void makeusrstring() { +/* + * sample code could be: + * + * mem_t i; + * const char text[] = "hello world"; + * for(i=0; i 31 calls this */ +number_t usrfunction(address_t i, number_t v) { return 0; } + +/* CALL with arguments > 31 calls this */ +void usrcall(address_t i) { return; } + +/* + * Layer 0 - keyword handling - PROGMEM logic goes here + * getkeyword(), getmessage(), and getokenvalue() are + * the only access to the keyword array in the code. + * + * Same for messages and errors + */ +char* getkeyword(unsigned short i) { + + if (DEBUG) { outsc("** getkeyword from index "); outnumber(i); outcr(); } + +#ifndef ARDUINOPROGMEM + return (char *) keyword[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(keyword[i]))); + return sbuffer; +#endif +} + +char* getmessage(char i) { + if (i >= sizeof(message) || i < 0) return 0; +#ifndef ARDUINOPROGMEM + return (char *) message[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(message[i]))); + return sbuffer; +#endif +} + +signed char gettokenvalue(char i) { + if (i >= sizeof(tokens)) return 0; +#ifndef ARDUINOPROGMEM + return tokens[i]; +#else + return (signed char) pgm_read_byte(&tokens[i]); +#endif +} + +void printmessage(char i){ +#ifndef HASERRORMSG + if (i > EGENERAL) return; +#endif + outsc((char *)getmessage(i)); +} + +/* + * Layer 0 - error handling + * + * The general error handler. The static variable er + * contains the error state. + * + * debugtoken() writes a token for debug + * bdebug() is the general debug message function + * + * Strategy: the error() function writes the message and then + * clears the stack. All calling functions must check er and + * return after funtion calls with no further messages etc. + * reseterror() sets the error state to normal and end the + * run loop. + */ +void error(token_t e){ + address_t i; + +/* store the error number */ + er=e; + +/* clear the stacks */ + clearst(); + clrforstack(); + clrgosubstack(); + +/* switch off all timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +/* is the error handler active? then silently go if we do GOTO or CONT actions in it */ +#ifdef HASERRORHANDLING + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) return; +#endif + +/* set input and output device back to default */ + iodefaults(); + +/* find the line number if in RUN modes */ + if (st != SINT) { + outnumber(myline(here)); + outch(':'); + outspc(); + } + +/* if we have error messages, display them */ +#ifdef HASERRORMSG + if (e > 0) + printmessage(e); + else { + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=e; i++); + outsc(getkeyword(i)); + } + outspc(); + printmessage(EGENERAL); +#else + printmessage(EGENERAL); + outspc(); + outnumber(er); +#endif + if (DEBUG) { outsc("** at "); outnumber(here); } + outcr(); +} + +void reseterror() { + er=0; + here=0; + st=SINT; +} + +void debugtoken(){ + outsc("* "); + if (debuglevel>2) { outnumber(here); outsc(" * "); } + + if (token == EOL) { + outsc("EOL"); + return; + } + switch(token) { + case LINENUMBER: + printmessage(MLINE); + break; + case NUMBER: + printmessage(MNUMBER); + break; + case VARIABLE: + printmessage(MVARIABLE); + break; + case ARRAYVAR: + printmessage(MARRAY); + break; + case STRING: + printmessage(MSTRING); + break; + case STRINGVAR: + printmessage(MSTRINGVAR); + break; + } + outspc(); + outputtoken(); +} + +void bdebug(const char *c){ + outch('*'); + outspc(); + outsc(c); + debugtoken(); + outcr(); +} + +/* + * Arithmetic and runtime operations are mostly done + * on a stack of number_t. + * + * push(), pop(), clearst() handle the stack + */ +void push(number_t t){ + if (DEBUG) {outsc("** push sp= "); outnumber(sp); outcr(); } + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++]=t; +} + +number_t pop(){ + if (DEBUG) {outsc("** pop sp= "); outnumber(sp); outcr(); } + if (sp == 0) { error(ESTACK); return 0; } + else + return stack[--sp]; +} + +/* this one gets a positive integer from the stack and traps the error*/ +address_t popaddress(){ + number_t tmp = 0; + tmp=pop(); + if (tmp < 0) { error(EORANGE); return 0;} else return (address_t) tmp; +} + +void clearst(){ + sp=0; +} + +/* + * clear the cursor for the READ/DATA mechanism + */ +void clrdata() { +#ifdef HASDARTMOUTH + data=0; +#endif +} + +/* + * Stack handling for FOR + */ +void pushforstack(){ + index_t i, j; + + if (DEBUG) { outsc("** forsp and here in pushforstack "); outnumber(forsp); outspc(); outnumber(here); outcr(); } + +/* before pushing into the for stack we check is an + old for exists - this is on reentering a for loop + this code removes all loop inside the for loop as well + for loops are identified by the variable name, anywhere + the variable is found again, it cleans the for stack + this makes the code stable against GOTO mess, + WHILE and REPEAT are identified with the here location + reentry cleans the stack */ +#ifndef HASSTRUCT + for(i=0; i0) { + forsp--; + } else { + error(ELOOP); + return; + } +#ifdef HASSTRUCT + token=forstack[forsp].type; +#endif + xc=forstack[forsp].varx; + yc=forstack[forsp].vary; + here=forstack[forsp].here; + x=forstack[forsp].to; + y=forstack[forsp].step; +} + +void dropforstack(){ + if (forsp>0) { + forsp--; + } else { + error(ELOOP); + return; + } +} + +token_t peekforstack() { + if (forsp>0) { +#ifdef HASSTRUCT + return forstack[forsp-1].type; +#else + return 0; +#endif + } else { + error(ELOOP); + return 0; + } +} + +void clrforstack() { + forsp=0; +} + +/* GOSUB stack handling */ +void pushgosubstack(mem_t a){ + if (gosubsp < GOSUBDEPTH) { + gosubstack[gosubsp]=here; +#ifdef HASEVENTS + gosubarg[gosubsp]=a; +#endif + gosubsp++; + } else + error(TGOSUB); +} + +void popgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TRETURN); + return; + } + here=gosubstack[gosubsp]; +} + +void dropgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TGOSUB); + } +} + +void clrgosubstack() { + gosubsp=0; +} + +/* two helper commands for structured BASIC, without the GOSUB stack */ + +void pushlocation() { + if (st == SINT) + slocation=bi-ibuffer; + else + slocation=here; +} + +void poplocation() { + if (st == SINT) + bi=ibuffer+slocation; + else + here=slocation; +} + +/* + * Input and output functions. + * + * ioinit(): called at setup to initialize what ever io is needed + * outch(): prints one ascii character + * inch(): gets one character (and waits for it) + * checkch(): checks for one character (non blocking) + * ins(): reads an entire line (uses inch except for pioserial) + * + */ +void ioinit() { + +/* a standalone system runs from keyboard and display */ +#ifdef STANDALONE + idd = IKEYBOARD; + odd = ODSP; +#endif + +/* run standalone on second serial, set the right parameters */ +#ifdef STANDALONESECONDSERIAL + idd = ISERIAL1; + odd = OPRT; + blockmode = 0; + sendcr = 0; +#endif + +/* signal handling - by default SIGINT which is ^C is always caught and + leads to program stop. Side effect: the interpreter cannot be stopped + with ^C, it has to be left with CALL 0, works on Linux, Mac and MINGW + but not on DOSBOX MSDOS as DOSBOS does not handle CTRL BREAK correctly + DOS can be interrupted with the CONIO mechanism using BREAKCHAR. +*/ + signalon(); + +/* this is only for RASPBERRY - wiring has to be started explicitly */ + wiringbegin(); + +/* all serial protocolls, ttl channels, SPI and Wire */ + serialbegin(); +#ifdef ARDUINOPRT + prtbegin(); +#endif +#ifdef ARDUINOSPI + spibegin(); +#endif +#ifdef HASWIRE + wirebegin(); +#endif + +/* filesystems and networks */ + fsbegin(1); +#ifdef ARDUINOMQTT + netbegin(); + mqttbegin(); +#endif + +/* the displays */ + kbdbegin(); +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + dspbegin(); +#endif +#if defined(ARDUINOVGA) || defined(POSIXFRAMEBUFFER) + vgabegin(); /* mind this - the fablib code and framebuffer is special here */ +#endif +#ifdef ARDUINOSENSORS + sensorbegin(); +#endif +#if defined(HASCLOCK) + rtcbegin(); +#endif + +/* the eeprom dummy */ + ebegin(); + +/* activate the iodefaults */ + iodefaults(); +} + +void iodefaults() { + od=odd; + id=idd; + form=0; +} + +/* + * Layer 0 - The generic IO code + * + * inch() reads one character from the stream, mostly blocking + * checkch() reads one character from the stream, unblocking, a peek(), + * inmplemented inconsistently + * availch() checks availablibity in the stream + * inb() a block read function for serial interfacing, developed for + * AT message receiving + */ + +/* the generic inch code reading one character from a stream */ +char inch() { + switch(id) { + case ISERIAL: + return serialread(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileread(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + ins(sbuffer, 1); + if (sbuffer[0]>0) return sbuffer[1]; else return 0; +#endif +#ifdef ARDUINORF24 +/* radio is not character oriented, this is only added to make GET work + or single byte payloads, radio, like file is treated nonblocking here */ + case IRADIO: + radioins(sbuffer, SBUFSIZE-1); + if (sbuffer[0]>0) return sbuffer[1]; else return 0; +#endif +#ifdef ARDUINOMQTT + case IMQTT: + return mqttinch(); +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtread(); +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) + case IKEYBOARD: +#if defined(HASVT52) + if (vt52avail()) return vt52read(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdread(); +#endif +#endif + } + return 0; +} + +/* checking on a character in the stream */ +char checkch(){ + switch (id) { + case ISERIAL: + return serialcheckch(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef ARDUINORF24 + case IRADIO: + return radio.available(); +#endif +#ifdef ARDUINOMQTT + case IMQTT: + if (mqtt_messagelength>0) return mqtt_buffer[0]; else return 0; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return 0; +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtcheckch(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdcheckch(); /* here no display read as this is only for break and scroll control */ +#endif + break; + } + return 0; +} + +/* character availability */ +short availch(){ + switch (id) { + case ISERIAL: + return serialavailable(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef ARDUINORF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef ARDUINOMQTT + case IMQTT: + return mqtt_messagelength; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return wireavailable(); +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtavailable(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) +#if defined(HASVT52) + if (vt52avail()) return vt52avail(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdavailable(); +#endif +#endif + break; + } + return 0; +} + +#ifdef ARDUINOPRT +/* + * the block mode reader for esp and sensor modules + * on a serial interface, it tries to read as many + * characters as possible into a buffer + * blockmode = 1 reads once availch() bytes + * blockmode > 1 implements a timeout mechanism and tries + * to read until blockmode milliseconds have expired + * this is needed for esps and other sensors without + * flow control and volatile timing to receive more + * then 64 bytes + */ +void inb(char *b, index_t nb) { + long m; + index_t i = 0; + + if (blockmode == 1 ) { + i=availch(); + if (i>nb-1) i=nb-1; + b[0]=(unsigned char)i; + z.a=i; + b[i+1]=0; + b++; + while (i--) {*b++=inch();} + } else if (blockmode > 1) { + m=millis(); + while (i < nb-1) { + if (availch()) b[++i]=inch(); + if (millis() > m+blockmode) break; + } + b[0]=(unsigned char)i; + z.a=i; + b[i+1]=0; + } else { + b[0]=0; + z.a=0; + b[1]=0; + } +} +#endif + +/* + * ins() is the generic reader into a string, by default + * it works in line mode and ends reading after newline + * + * the first element of the buffer is the lower byte of the length + * + * this is corrected later in xinput, z.a has to be set as + * a side effect + * + * for streams providing entire strings as an input the + * respective string method is called + * + * all other streams are read using consins() for character by character + * input until a terminal character is reached + */ +void ins(char *b, address_t nb) { + switch(id) { +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + wireins(b, nb); + break; +#endif +#ifdef ARDUINOMQTT + case IMQTT: + mqttins(b, nb); + break; +#endif +#ifdef ARDUINORF24 + case IRADIO: + radioins(b, nb); + break; +#endif + default: +#ifdef ARDUINOPRT +/* blockmode only implemented for ISERIAL1 right now */ + if (blockmode > 0 && id == ISERIAL1 ) inb(b, nb); else +#endif + consins(b, nb); + } +} + +/* + * outch() outputs one character to a stream + * block oriented i/o like in radio not implemented here + */ +void outch(char c) { + +/* do we have a MS style tab command, then count characters on stream 1-4 but not in fileio */ +/* this does not work for control characters - needs to go to vt52 later */ + +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) { + if (c > 31) charcount[od-1]+=1; + if (c == 10) charcount[od-1]=0; + } +#endif + + switch(od) { + case OSERIAL: + serialwrite(c); + break; +#ifdef FILESYSTEMDRIVER + case OFILE: + filewrite(c); + break; +#endif +#ifdef ARDUINOPRT + case OPRT: + prtwrite(c); + break; +#endif +#ifdef ARDUINOVGA + case ODSP: + vgawrite(c); + break; +#else +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case ODSP: + dspwrite(c); + break; +#endif +#endif +#ifdef ARDUINOMQTT + case OMQTT: + mqttouts(&c, 1); /* buffering for the PRINT command */ + break; +#endif + default: + break; + } + byield(); /* yield after every character for ESP8266 */ +} + +/* send a newline */ +void outcr() { +#ifdef ARDUINOPRT + if (sendcr) outch('\r'); +#endif + outch('\n'); +} + +/* send a space */ +void outspc() { + outch(' '); +} + +/* + * outs() outputs a string of length x at index ir - basic style + * default is a character by character operation, block + * oriented write needs special functions + */ +void outs(char *ir, address_t l){ + address_t i; + + switch (od) { +#ifdef ARDUINORF24 + case ORADIO: + radioouts(ir, l); + break; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case OWIRE: + wireouts(ir, l); + break; +#endif +#ifdef ARDUINOMQTT + case OMQTT: + mqttouts(ir, l); + break; +#endif +#ifdef GRAPHDISPLAYDRIVER + case ODSP: + dspouts(ir, l); + break; +#endif + default: + for(i=0; i i) { + f=f-i; + while (f--) outspc(); + } +} + +/* + * reading a positive number from a char buffer + * maximum number of digits is adjusted to 16 + * ugly here, testcode when introducting + * number_t was only 16 bit before + */ +address_t parsenumber(char *c, number_t *r) { + address_t nd = 0; + + *r=0; + while (*c >= '0' && *c <= '9' && *c != 0) { + *r=*r*10+*c++-'0'; + nd++; + if (nd == SBUFSIZE) break; + } + return nd; +} + + +#ifdef HASFLOAT +/* a poor man's atof implementation with character count */ +address_t parsenumber2(char *c, number_t *r) { + address_t nd = 0; + index_t i; + number_t fraction = 0; + number_t exponent = 0; + mem_t nexp = 0; + + *r=0; + +/* integer part */ + i=parsenumber(c, r); + c+=i; + nd+=i; + +/* the fractional part */ + if (*c == '.') { + c++; + nd++; + + i=parsenumber(c, &fraction); + c+=i; + nd+=i; + + if (i > 0) { + while ((--i)>=0) fraction=fraction/10; + *r+=fraction; + } + } + +/* the exponent */ + if (*c == 'E' || *c == 'e') { + c++; + nd++; + if (*c == '-') {c++; nd++; nexp=1;}; + i=parsenumber(c, &exponent); + nd+=i; + while ((--exponent)>=0) if (nexp) *r=*r/10; else *r=*r*10; + } + + return nd; +} +#endif + +/* + * convert a number to a string + * the argument type controls the largerst displayable integer + * default is int but it can be increased without any side effects + */ +address_t writenumber(char *c, wnumber_t v){ + address_t nd = 0; + index_t i,j; + mem_t s = 1; + char c1; + +/* the sign */ + if (v<0) s=-1; + +/* the digits */ + do { + c[nd++]=(v%10)*s+'0'; + v=v/10; + } while (v != 0); + +/* print the minus */ + if (s < 0 ) c[nd]='-'; else nd--; + +/* reverse the order of digits */ + i=0; + j=nd; + while (j>i) { + c1=c[i]; + c[i]=c[j]; + c[j]=c1; + i++; + j--; + } + + nd++; + c[nd]=0; + return nd; +} + +#ifdef HASFLOAT +/* + * this is for floats, handling output without library + * functions as well. + */ + +address_t tinydtostrf(number_t v, index_t p, char* c) { + index_t i; + address_t nd = 0; + number_t f; + +/* we do the sign here and don't rely on writenumbers sign handling, guess why */ + if (v<0) { + v=fabs(v); + c[nd++]='-'; + } + +/* write the integer part */ + nd+=writenumber(c+nd, (int)v); + c[nd++]='.'; + +/* only the fraction to precision p */ + f=fabs(v); + +/* get p digits of the fraction */ + for (i=p; i>0; i--) { + f=f-floor(f); + f=f*10; + c[nd++]=(int)floor(f)+'0'; + } + +/* and a terminating 0 */ + c[nd]=0; + return nd; +} + +address_t writenumber2(char *c, number_t vi) { + index_t i; + index_t nd; + number_t f; + index_t exponent = 0; + mem_t eflag=0; + const int p = 5; + +/* pseudo integers are displayed as integer + zero trapped here */ + f=floor(vi); + if (f == vi && fabs(vi) < maxnum) return writenumber(c, vi); + +/* floats are displayed using the libraries */ +#ifndef ARDUINO + return sprintf(c, "%g", vi); +#else + +/* on an Arduino we have gcc, we check if we have anything to write */ + if (!isfinite(vi)) { + c[0]='*'; + c[1]=0; + return 1; + } + +/* normalize the number and see which exponent we have to deal with */ + f=vi; + while (fabs(f)<1.0) { f=f*10; exponent--; } + while (fabs(f)>=10.0-0.00001) { f=f/10; exponent++; } + +/* there are platforms where dtostrf is broken, we do things by hand in a simple way */ + + if (exponent > -2 && exponent < 7) { + tinydtostrf(vi, 5, c); + } else { + tinydtostrf(f, 5, c); + eflag=1; + } + +/* remove trailing zeros */ + for (i=0; (i < SBUFSIZE && c[i] !=0 ); i++); + i--; + while (c[i] == '0' && i>1) {i--;} + i++; + +/* add the exponent */ + if (eflag && exponent != 0) { + c[i++]='E'; + i+=writenumber(c+i, exponent); + } + + c[i]=0; + return i; + +#endif +} +#endif + +/* + * innumber() uses sbuffer as a char buffer to get a number input + */ +char innumber(number_t *r) { + index_t i = 1; + index_t s = 1; + +again: + *r=0; + sbuffer[1]=0; + ins(sbuffer, SBUFSIZE); + while (i < SBUFSIZE) { + if (sbuffer[i] == ' ' || sbuffer[i] == '\t') i++; + if (sbuffer[i] == BREAKCHAR) return BREAKCHAR; + if (sbuffer[i] == 0) { ert=1; return 1; } + if (sbuffer[i] == '-') { + s=-1; + i++; + } +#ifndef HASFLOAT + if (sbuffer[i] >= '0' && sbuffer[i] <= '9') { + (void) parsenumber(&sbuffer[i], r); +#else + if ((sbuffer[i] >= '0' && sbuffer[i] <= '9') || sbuffer[i] == '.') { + (void) parsenumber2(&sbuffer[i], r); +#endif + *r*=s; + return 0; + } else { + if (id == ISERIAL || id == IKEYBOARD) { + printmessage(ENUMBER); + outspc(); + printmessage(EGENERAL); + outcr(); + *r=0; + s=1; + i=1; + goto again; + } else { + ert=1; + return 1; + } + } + } + return 0; +} + +/* prints a number */ +void outnumber(number_t n){ + address_t nd, i; + +#ifndef HASFLOAT + nd=writenumber(sbuffer, n); +#else + nd=writenumber2(sbuffer, n); +#endif + +/* negative number format aligns right */ + if (form < 0) { i=nd; while(i < -form) {outspc(); i++;} } + +/* the number */ + outs(sbuffer, nd); + +/* number formats in Palo Alto style, positive nimbers align left */ + if (form > 0) { while (nd < form) {outspc(); nd++;} } +} + +/* + * Layer 1 functions - providing data into the global variable and + * changing the interpreter state + */ + +/* + * Lexical analyser - tokenizes the input line. + * + * nexttoken() increments the input buffer index bi and delivers values in the global + * variable token, with arguments in the accumulator x and the index register ir + * xc is used in the routine. + * + * xc, ir and x change values in nexttoken and deliver the result to the calling + * function. + * + * bi and ibuffer should not be changed or used for any other function in + * interactive node as they contain the state of nexttoken(). In run mode + * bi and ibuffer are not used as the program is fully tokenized in mem. + */ + +/* skip whitespaces */ +void whitespaces(){ + while (*bi == ' ' || *bi == '\t') bi++; +} + +/* the token stream */ +void nexttoken() { + +/* RUN mode vs. INT mode, in RUN mode we read from mem via gettoken() */ + if (st == SRUN || st == SERUN) { +/* in the token stream we call the fastticker - all fast timing functions are in stream*/ + fastticker(); +/* read the token from memory */ + gettoken(); +/* show what we are doing */ + if (debuglevel>1) { debugtoken(); outcr(); } + return; + } + +/* after change in buffer logic the first byte is reserved for the length */ + if (bi == ibuffer) bi++; + +/* literal mode - experimental - only(!) EOL ends literal mode*/ + if (lexliteral) { + token=*bi; + if (*bi != '\0') bi++; else lexliteral=0; + return; + } + +/* remove whitespaces outside strings */ + whitespaces(); + +/* end of line token */ + if (*bi == '\0') { + token=EOL; + if (DEBUG) debugtoken(); + return; + } + +/* unsigned numbers, value returned in x */ +#ifndef HASFLOAT + if (*bi <='9' && *bi >= '0') { + bi+=parsenumber(bi, &x); +#else + if ((*bi <='9' && *bi >= '0') || *bi == '.') { + bi+=parsenumber2(bi, &x); +#endif + token=NUMBER; + if (DEBUG) debugtoken(); + return; + } + +/* strings between " " or " EOL, value returned in ir */ + if (*bi == '"') { + x=0; + bi++; + ir=bi; + while(*bi != '"' && *bi !='\0') { + x++; + bi++; + } + bi++; + token=STRING; + if (DEBUG) debugtoken(); + return; + } + +/* single character operators are their own tokens */ + if (*bi == '+' || *bi == '-' || *bi == '*' || *bi == '/' || *bi == '%' || + *bi == '\\' || *bi == ':' || *bi == ',' || *bi == '(' || *bi == ')' ) { + token=*bi; + bi++; + if (DEBUG) debugtoken(); + return; + } + +/* + * relations + * single character relations are their own token + * >=, =<, =<, =>, <> are tokenized + */ + if (*bi == '=') { + bi++; + whitespaces(); + if (*bi == '>') { + token=GREATEREQUAL; + bi++; + } else if (*bi == '<') { + token=LESSEREQUAL; + bi++; + } else { + token='='; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '>'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=GREATEREQUAL; + bi++; + } else { + token='>'; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '<'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=LESSEREQUAL; + bi++; + } else if (*bi == '>') { + token=NOTEQUAL; + bi++; + } else { + token='<'; + } + if (DEBUG) debugtoken(); + return; + } + +/* + * keyworks and variables + * + * isolate a word, bi points to the beginning, x is the length of the word + * ir points to the end of the word after isolating. + * @ is a letter here to make the special @ arrays possible + */ + x=0; + ir=bi; + while (-1) { +/* toupper code */ + if (*ir >= 'a' && *ir <= 'z') { + *ir-=32; + ir++; + x++; + } else if (*ir >= '@' && *ir <= 'Z') { + ir++; + x++; + } else { + break; + } + } + +/* + * ir is reused here to implement string compares + * scanning the keyword array. + * Once a keyword is detected the input buffer is advanced + * by its length, and the token value is returned. + * + * keywords are an array of null terminated strings. + */ + yc=0; + while (gettokenvalue(yc) != 0) { + ir=getkeyword(yc); + xc=0; + while (*(ir+xc) != 0) { + if (*(ir+xc) != *(bi+xc)) { + yc++; + xc=0; + break; + } else + xc++; + } + if (xc == 0) continue; + bi+=xc; + token=gettokenvalue(yc); + if (token == TREM) lexliteral=1; + if (DEBUG) debugtoken(); + return; + } + +/* + * a variable has length 2 with either two letters or a letter + * and a number. @ can be the first letter of a variable. + * here, no tokens can appear any more as they have been processed + * further up. + */ + if ( x == 1 || x == 2 ) { + token=VARIABLE; + xc=*bi; + yc=0; + bi++; + if ((*bi >= '0' && *bi <= '9') || (*bi >= 'A' && *bi <= 'Z')) { + yc=*bi; + bi++; + } + if (*bi == '$') { + token=STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token=ARRAYVAR; + } + if (DEBUG) debugtoken(); + return; + } + + +/* other single characters are parsed and stored */ + token=*bi; + bi++; + if (DEBUG) debugtoken(); + return; +} + +/* + * Layer 1 - program editor + * + * Editing the program, the structure of a line is + * LINENUMBER linenumber(2 or more bytes) token(n bytes) + * + * store* stores something to memory + * get* retrieves information + * + * No matter how long number_t is in the C implementation + * we pack into bytes, this is clumsy but portable + * the store and get commands all operate on here + * and advance it + * + * storetoken() operates on the variable top. + * We always append at the end and then sort. + * + * gettoken() operate on the variable here + * which will also be the key variable in run mode. + * + * tokens are stored including their payload. + * + * This group of functions changes global states and + * cannot be called at program runtime with saving + * the relevant global variable to the stack. + */ + +/* + * check if we still have memory left, on RAM only systems we make + * sure that we don't hit himem. On systems with EEPROM program storage we make + * sure that we stay within the EEPROM range. + */ +char nomemory(number_t b){ +#ifndef EEPROMMEMINTERFACE + if (top >= himem-b) return 1; else return 0; +#else + if (top >= elength()-eheadersize-b) return 1; else return 0; +#endif +} + +/* store a token - check free memory before changing anything */ +void storetoken() { + index_t i=x; + switch (token) { + case LINENUMBER: + if (nomemory(addrsize+1)) break; + memwrite2(top++, token); + z.a=ax; + setnumber(top, addrsize); + top+=addrsize; + return; + case NUMBER: + if (nomemory(numsize+1)) break; + memwrite2(top++, token); + z.i=x; + setnumber(top, numsize); + top+=numsize; + return; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + if (nomemory(3)) break; + memwrite2(top++, token); + memwrite2(top++, xc); + memwrite2(top++, yc); + return; + case STRING: + if (nomemory(x+2)) break; + memwrite2(top++, token); + memwrite2(top++, i); + while (i > 0) { + memwrite2(top++, *ir++); + i--; + } + return; + default: + if (token >= -127) { /* the good old code with just one byte token */ + if (nomemory(1)) break; + memwrite2(top++, token); + } else { +#ifdef HASLONGTOKENS + if (nomemory(2)) break; /* this is the two byte token extension */ + memwrite2(top++, TEXT1); + memwrite2(top++, token+255); +#endif + } + return; + } + error(EOUTOFMEMORY); +} + + +/* + * wrappers around mem access in genereal + * + * memread is used only in the token stream, it reads from a stream + * read only. If run is done from eeprom then bytes are taken from this + * stream, this would also be the place to implement direct run from + * another device like a file system or embedded programs on flash. + * Only the token stream uses memread. + * + * memread2 and memwrite2 always go to ram. They are read/write. Variables and + * the program editor uses these functions. + * + * currently only the SPIRAM and the EEPROM direct edit interface is implemented. + * This is handled in hardware-arduino.h. + * + * USEMEMINTERFACE is the macro to control this. + * + * The POSIX code has a test interface for SPIRAM as a dummy. + * + */ +#ifndef USEMEMINTERFACE +mem_t memread(address_t a) { + if (st != SERUN) { + return mem[a]; + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return mem[a]; } + +void memwrite2(address_t a, mem_t c) { mem[a]=c; } +#else +#if defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR) +mem_t memread(address_t a) { + if (st != SERUN) { + return spiram_robufferread(a); + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return spiram_rwbufferread(a); } + +void memwrite2(address_t a, mem_t c) { spiram_rwbufferwrite(a, c); } +#else +#ifdef EEPROMMEMINTERFACE +mem_t memread(address_t a) { + if (a < elength()-eheadersize) return eread(a+eheadersize); else return mem[a-(elength()-eheadersize)]; +} + +mem_t memread2(address_t a) { return memread(a); } + +void memwrite2(address_t a, mem_t c) { + if (a < elength()-eheadersize) eupdate(a+eheadersize, c); else mem[a-(elength()-eheadersize)]=c; +} +#endif +#endif +#endif + + +/* get a token from memory */ +void gettoken() { + int i; + +/* if we have reached the end of the program, EOL is always returned + we don't rely on mem having a trailing EOL */ + if (here >= top) { + token=EOL; + return; + } + +/* if we have no data type we are done reading just one byte */ + token=memread(here++); + +/* if there are multibyte tokens, get the next byte and construct a token value <-127 */ +#ifdef HASLONGTOKENS + if (token == TEXT1) { + token=memread(here++)-255; + } +#endif + + /* otherwise we check for the argument */ + switch (token) { + case LINENUMBER: +#ifdef USEMEMINTERFACE + if (st != SERUN) pgetnumber(here, addrsize); else egetnumber(here+eheadersize, addrsize); +#else + if (st != SERUN) getnumber(here, addrsize); else egetnumber(here+eheadersize, addrsize); +#endif + // x=z.a; + ax=z.a; + here+=addrsize; + break; + case NUMBER: +#ifdef USEMEMINTERFACE + if (st !=SERUN) pgetnumber(here, numsize); else egetnumber(here+eheadersize, numsize); +#else + if (st !=SERUN) getnumber(here, numsize); else egetnumber(here+eheadersize, numsize); +#endif + x=z.i; + here+=numsize; + break; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + xc=memread(here++); + yc=memread(here++); + break; + case STRING: + x=(unsigned char)memread(here++); +/* if we run interactive or from mem, pass back the mem location + * of the string constant + * if we run from EEPROM or SPI ram and cannot simply pass a pointer + * we (ab)use the input buffer which is not needed here, this limits + * the string constant length to the length of the input buffer + */ +#if defined(USEMEMINTERFACE) + for(i=0; i= top) { + here=top; + ax=0; + return; + } + } +} + +/* + * the line cache mechanism, useful for large codes. + * addlinecache does not test if the line already exist because it + * assumes that findline calls it only if a new line is to be stored + * the LINECACHE size depends on the architecture. + */ +#if defined(LINECACHESIZE) && LINECACHESIZE>0 +const unsigned char linecachedepth = LINECACHESIZE; +typedef struct {address_t l; address_t h;} linecacheentry; +linecacheentry linecache[LINECACHESIZE]; +unsigned char linecachehere = 0; + +void clrlinecache() { + unsigned char i; + for(i=0; i= h) break; + gettoken(); + } + here=here2; + if (token == LINENUMBER) + return l1; + else + return l; +} + +/* + * Move a block of storage beginng at b ending at e + * to destination d. No error handling here!! + */ +void moveblock(address_t b, address_t l, address_t d) { + address_t i; + + if (d+l > himem) { + error(EOUTOFMEMORY); + return; + } + if (l<1) return; + + if (b < d) + for (i=l; i>0; i--) + memwrite2(d+i-1, memread2(b+i-1)); + else + for (i=0; i himem) { + error(EOUTOFMEMORY); + return; + } + if (l<1) return; + + for (i=0; i y) break; + } + +/* + * at this point y contains the number of the line to be inserted + * x contains the number of the first line with a higher line number + * or 0 if the line is to be inserted at the end + * here points to the following line and here2 points to the previous line + */ + if (ax == 0) { + here=here3-lnlength; + gettoken(); + if (token == LINENUMBER && ax == y) { // we have a double line at the end + here2-=lnlength; + here-=lnlength; + moveblock(here2, linelength, here); + top=here+linelength; + } + return; + } + here-=lnlength; + t1=here; + here=here2-lnlength; + t2=here; + gettoken(); + if (ax == y) { /* the line already exists and has to be replaced */ + here2=t2; /* this is the line we are dealing with */ + here=t1; /* this is the next line */ + y=here-here2; /* the length of the line as it is */ + if (linelength == y) { /* no change in line length */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else if (linelength > y) { /* the new line is longer than the old one */ + moveblock(here, top-here, here+linelength-y); + here=here+linelength-y; + top=top+linelength-y; + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else { /* the new line is short than the old one */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + moveblock(here, top-here, here2+linelength); + top=top-y+linelength; + } + } else { /* the line has to be inserted in between */ + here=t1; + moveblock(here, top-here, here+linelength); + moveblock(top, linelength, here); + } + } +} + +/* + * Layer 1 - the code in this section calculates an expression + * with a recursive descent algorithm + * + * all function use the stack to pass values back. We use the + * Backus-Naur form of basic from here https://rosettacode.org/wiki/BNF_Grammar + * implementing a C style logical expression model + */ + +/* the terminal symbol it ends a statement list - ELSE is one too as it ends a statement list */ +char termsymbol() { + return (token == LINENUMBER || token == ':' || token == EOL || token == TELSE); +} + +/* a little helpers - one token expect */ +char expect(token_t t, mem_t e) { + nexttoken(); + if (token != t) {error(e); return 0; } else return 1; +} + +/* a little helpers - expression expect */ +char expectexpr() { + nexttoken(); + expression(); + if (er != 0) return 0; else return 1; +} + +/* parses a list of expression, this may be recursive! */ +void parsearguments() { + short argsl; + +/* begin counting */ + argsl=0; + +/* having 0 args at the end of a command is legal */ + if (!termsymbol()) { + +/* list of expressions separated by commas */ + do { + expression(); + if (er != 0) break; + argsl++; + if (token != ',') break; + nexttoken(); + } while (1); + } + +/* because of the recursion ... */ + args=argsl; +} + + +/* expect exactly n arguments */ +void parsenarguments(char n) { + parsearguments(); + if (args != n) error(EARGS); +} + +/* counts and parses the number of arguments given in brakets */ +void parsesubscripts() { + args=0; + if (token != '(') return; /* zero arguments is legal here */ + nexttoken(); +#ifdef HASMULTIDIM + if (token == ')') { + args=-1; + return; /* () is interpreted as no argument at all -> needed for string arrays */ + } +#endif + parsearguments(); + if (er != 0) return; + if (token != ')') {error(EARGS); return; } /* we return with ) as a last token on success */ +} + + +/* parse a function argument ae is the number of + expected expressions in the argument list */ +void parsefunction(void (*f)(), short ae){ + nexttoken(); + parsesubscripts(); + if (er != 0) return; + if (args == ae) f(); else error(EARGS); +} + +/* helper function in the recursive decent parser */ +void parseoperator(void (*f)()) { + mem_t u=1; + + nexttoken(); + if (token == '-') { + u=-1; + nexttoken(); + } + f(); + if (er !=0 ) return; + y=pop(); + if (u == -1) y=-y; + x=pop(); +} + +#ifdef HASAPPLE1 +/* substring evaluation, mind the rewinding here - a bit of a hack + * this is one of the few places in the code where the token stream + * cannot be interpreted forward i.e. without looking back. Reason is + * an inconsistency the the way expression() is implemented + */ +void parsesubstring() { + char xc1, yc1; + address_t h1; /* remember the here */ + char* bi1; /* or the postion in the input buffer */ + mem_t a1; /* some info on args remembered as well for multidim */ + address_t j; /* the index of a string array */ + +/* remember the string name */ + xc1=xc; + yc1=yc; + +/* Remember the token before the first parsesubscript */ + if (st == SINT) bi1=bi; else h1=here; + + nexttoken(); + parsesubscripts(); + if (er != 0) return; + +#ifndef HASSTRINGARRAYS + +/* the stack has - the first index, the second index */ + switch(args) { + case 2: + break; + case 1: + push(lenstring(xc1, yc1, arraylimit)); + break; + case 0: +/* rewind the token if there were no braces to be in sync */ + if (st == SINT) bi=bi1; else here=h1; +/* no rewind in the () construct */ + case -1: + args=0; + push(1); + push(lenstring(xc1, yc1, arraylimit)); + break; + } + +#else +/* for a string array the situation is more complicated as we + need to parse the argument completely including the possible subscript */ + +/* how many args has the first parsesubsscript scanned, if none, we are done + rewind and set the parametes*/ + +/* the stack has - the first string index, the second string index, the array index */ + if ( args == 0 ) { + + if (st == SINT) bi=bi1; else here=h1; + + j=arraylimit; + push(1); + push(lenstring(xc1, yc1, j)); + push(j); + +/* if more then zero or an empty (), we need a second parsesubscript */ + } else { + + if (st == SINT) bi1=bi; + else h1=here; + + a1=args; + + nexttoken(); + parsesubscripts(); + + switch (args) { + case 1: + j=popaddress(); + if (er != 0) return; + break; + case 0: + j=arraylimit; + if (st == SINT) bi=bi1; else here=h1; + break; + default: + error(EARGS); + return; + } + +/* which part of the string */ + switch(a1) { + case 2: + break; + case 1: + push(lenstring(xc1, yc1, j)); + break; + case 0: + case -1: + push(1); + push(lenstring(xc1, yc1, j)); + break; + } + +/* and which index element */ + push(j); + + } +#endif + +} +#endif + +/* + * ABS absolute value + */ +void xabs(){ + number_t x; + if ((x=pop())<0) { x=-x; } + push(x); +} + +/* + * SGN evaluates the sign + */ +void xsgn(){ + number_t x; + x=pop(); + if (x>0) x=1; + if (x<0) x=-1; + push(x); +} + +/* + * PEEK on an arduino, negative values of peek address + * the EEPROM range -1 .. -1024 on an UNO + */ +void xpeek(){ + address_t amax; + index_t a; + + a=pop(); + +/* 16 bit numbers can't peek big addresses */ + if ((long) memsize > (long) maxnum) amax=(address_t) maxnum; else amax=memsize; + + if (a >= 0 && a=0) + push((long)rd*r/0x10000); + else + push((long)rd*r/0x10000+1); +#else +/* glibc parameters */ + rd= (110351245*rd + 12345) % (1 << 31); + if (r>=0) + push(rd*r/(unsigned long)(1 << 31)); + else + push(rd*r/(unsigned long)(1 << 31)+1); +#endif +} + + + +#ifndef HASFLOAT +/* + * SQR - a very simple approximate square root formula + * for integers, for floats we use the library + */ +void sqr(){ + number_t t,r; + number_t l=0; + r=pop(); + t=r; + while (t > 0) { + t>>=1; + l++; + } + l=l/2; + t=1; + t<<=l; + do { + l=t; + t=(t+r/t)/2; + } while (abs(t-l)>1); + push(t); +} +#else +void sqr(){ + push(sqrt(pop())); +} +#endif + + +/* + * POW(X, N) evaluates powers + */ + +/* this function is called by POW(a, c) in BASIC */ +void xpow(){ + number_t n; + number_t a; + + n=pop(); + a=pop(); + push(bpow(a, n)); +} + +/* while this is needed by ^*/ +number_t bpow(number_t x, number_t y) { +#ifdef HASFLOAT + return pow(x, y); +#else + number_t r; + address_t i; + + r=1; + if (y>=0) for(i=0; i 0) push(y-x+1); else push(0); + if (DEBUG) { outsc("** in stringvalue, length "); outnumber(y-x+1); outsc(" from "); outnumber(x); outspc(); outnumber(y); outcr(); } + xc=xcl; + yc=ycl; + } else if (token == TSTR) { + nexttoken(); + if ( token != '(') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; +#ifdef HASFLOAT + push(writenumber2(sbuffer, pop())); +#else + push(writenumber(sbuffer, pop())); +#endif + ir2=sbuffer; + x=1; + if (er != 0) return 0; + if (token != ')') {error(EARGS); return 0; } +#endif + } else { + return 0; + } + return 1; +} + + +/* + * (numerical) evaluation of a string expression, used for + * comparison and for string rightvalues as numbers + * the token rewind here is needed as streval is called in + * factor - no factor function should nexttoken + */ +void streval(){ + char *irl; + address_t xl, x; + token_t t; + address_t h1; + char* b1; + index_t k; + + if (!stringvalue()) { + error(EUNKNOWN); + return; + } + if (er != 0) return; + + irl=ir2; + xl=popaddress(); + if (er != 0) return; + +/* with the mem interface -> copy, irl now point to buffer2 */ +#ifdef USEMEMINTERFACE + for(k=0; k, =>, <=; + * NOT; AND; OR + * + */ + +/* + * factor() - contrary to all other function + * nothing here should end with a new token - this is handled + * in factors calling function + * + * evaluates constants, variables and all functions + */ + +/* helpers of factor - array access */ +void factorarray() { + mem_t xcl, ycl; + address_t ix, iy; + number_t v; + +/* remember the variable, because parsesubscript changes this */ + ycl=yc; + xcl=xc; + + nexttoken(); + parsesubscripts(); + if (er != 0 ) return; + + switch(args) { + case 1: + ix=popaddress(); + if (er != 0) return; + iy=arraylimit; + break; +#ifdef HASMULTIDIM + case 2: + iy=popaddress(); + ix=popaddress(); + if (er != 0) return; + break; +#endif + default: + error(EARGS); + return; + } + array('g', xcl, ycl, ix, iy, &v); + push(v); +} + +/* helpers of factor - string length */ +void factorlen() { + address_t a; + + nexttoken(); + if ( token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue()) { +#ifdef HASDARKARTS + expression(); + if (er != 0) return; + a=pop(); + push(blength(TBUFFER, a%256, a/256)); + return; +#else + error(EUNKNOWN); + return; +#endif + } + if (er != 0) return; + + nexttoken(); + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the VAL command */ +void factorval() { + address_t a; + index_t y; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue()) { error(EUNKNOWN); return; } + if (er != 0) return; + +/* not super clean - handling of terminal symbol dirty + stringtobuffer needed !! */ + vlength=0; + while(*ir2==' ' || *ir2=='\t') { ir2++; vlength++; } + if(*ir2=='-') { y=-1; ir2++; vlength++; } else y=1; + + x=0; +#ifdef HASFLOAT + if ((a=parsenumber2(ir2, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#else + if ((a=parsenumber(ir2, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#endif + (void) pop(); + push(x*y); + + nexttoken(); + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the INSTR command */ +void factorinstr() { + address_t y; + char ch; + address_t a; + char* ir; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + nexttoken(); + + if (!stringvalue()) { error(EUNKNOWN); return; } + y=popaddress(); + ir=ir2; + if (er != 0) return; + nexttoken(); + + if (token != ',') { error(EARGS); return; } + nexttoken(); + + expression(); + if (er != 0) return; + + ch=pop(); + for (a=1; a<=y; a++) {if (ir[a-1] == ch) break; } + if (a > y ) a=0; + push(a); + + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the NETSTAT command */ +void factornetstat() { + address_t x=0; + if (netconnected()) x=1; + if (mqttstate() == 0) x+=2; + push(x); +} + +void factor(){ + if (DEBUG) bdebug("factor\n"); + switch (token) { + case NUMBER: + push(x); + break; + case VARIABLE: + push(getvar(xc, yc)); + break; + case ARRAYVAR: + factorarray(); + break; + case '(': + nexttoken(); + expression(); + if (er != 0 ) return; + if (token != ')') { error(EARGS); return; } + break; +/* Palo Alto BASIC functions */ + case TABS: + parsefunction(xabs, 1); + break; + case TRND: + parsefunction(rnd, 1); + break; + case TSIZE: + push(himem-top); + break; +/* Apple 1 BASIC functions */ +#ifdef HASAPPLE1 + case TSGN: + parsefunction(xsgn, 1); + break; + case TPEEK: + parsefunction(xpeek, 1); + break; + case TLEN: + factorlen(); + break; +#ifdef HASIOT + case TAVAIL: + parsefunction(xavail, 1); + break; + case TOPEN: + parsefunction(xfopen, 1); + break; + case TSENSOR: + parsefunction(xfsensor, 2); + break; + case TVAL: + factorval(); + break; + case TINSTR: + factorinstr(); + break; + case TWIRE: + parsefunction(xfwire, 1); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + push(erh); + break; +#endif + case THIMEM: + push(himem); + break; +/* Apple 1 string compare code */ + case STRING: + case STRINGVAR: + streval(); + if (er != 0 ) return; + break; +#endif +/* Stefan's tinybasic additions */ +#ifdef HASSTEFANSEXT + case TSQR: + parsefunction(sqr, 1); + break; + case TMAP: + parsefunction(xmap, 5); + break; + case TUSR: + parsefunction(xusr, 2); + break; + case TPOW: + parsefunction(xpow, 2); + break; +#endif +/* Arduino I/O */ +#ifdef HASARDUINOIO + case TAREAD: + parsefunction(aread, 1); + break; + case TDREAD: + parsefunction(dread, 1); + break; + case TMILLIS: + parsefunction(bmillis, 1); + break; +#ifdef HASPULSE + case TPULSE: + parsefunction(bpulsein, 3); + break; +#endif + case TAZERO: +#if defined(ARDUINO) && defined(A0) + push(A0); +#else + push(0); +#endif + break; + case TLED: +#ifdef LED_BUILTIN + push(LED_BUILTIN); +#else + push(0); +#endif + break; +#endif +/* mathematical functions in case we have float */ +#ifdef HASFLOAT + case TSIN: + parsefunction(xsin, 1); + break; + case TCOS: + parsefunction(xcos, 1); + break; + case TTAN: + parsefunction(xtan, 1); + break; + case TATAN: + parsefunction(xatan, 1); + break; + case TLOG: + parsefunction(xlog, 1); + break; + case TEXP: + parsefunction(xexp, 1); + break; +#endif +/* int is always present to make programs compatible */ + case TINT: + parsefunction(xint, 1); + break; +#ifdef HASDARTMOUTH + case TFN: + xfn(); + break; +/* an arcane feature, DATA evaluates to the data record number */ + case TDATA: + push(datarc); + break; +#endif +#ifdef HASDARKARTS + case TMALLOC: + parsefunction(xmalloc, 2); + break; + case TFIND: + xfind(); + break; +#endif +#ifdef HASIOT + case TNETSTAT: + factornetstat(); + break; +#endif + +/* unknown function */ + default: + error(EUNKNOWN); + return; + } +} + +#ifdef POWERRIGHTTOLEFT +/* the recursive version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (er != 0) return; + + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + parseoperator(power); + if (er != 0) return; + push(bpow(x,y)); + } + if (DEBUG) bdebug("leaving power\n"); +} +#else +/* the left associative version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (er != 0) return; + +nextpower: + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + nexttoken(); + factor(); + if (er != 0) return; + y=pop(); + x=pop(); + push(bpow(x,y)); + goto nextpower; + } + if (DEBUG) bdebug("leaving power\n"); +} +#endif + + +/* + * term() evaluates multiplication, division and mod + */ +void term(){ + if (DEBUG) bdebug("term\n"); + power(); + if (er != 0) return; + +nextfactor: + // nexttoken(); + if (DEBUG) bdebug("in term\n"); + if (token == '*'){ + parseoperator(power); + if (er != 0) return; + push(x*y); + goto nextfactor; + } else if (token == '/'){ + parseoperator(power); + if (er != 0) return; + if (y != 0) + push(x/y); + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == '%') { + parseoperator(power); + if (er != 0) return; + if (y != 0) +#ifndef HASFLOAT + push(x%y); +#else + push((int)x%(int)y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } + if (DEBUG) bdebug("leaving term\n"); +} + +/* add and subtract */ +void addexpression(){ + if (DEBUG) bdebug("addexp\n"); + if (token != '+' && token != '-') { + term(); + if (er != 0) return; + } else { + push(0); + } + +nextterm: + if (token == '+' ) { + parseoperator(term); + if (er != 0) return; + push(x+y); + goto nextterm; + } else if (token == '-'){ + parseoperator(term); + if (er != 0) return; + push(x-y); + goto nextterm; + } +} + +/* comparisions */ +void compexpression() { + if (DEBUG) bdebug("compexp\n"); + addexpression(); + if (er != 0) return; + switch (token){ + case '=': + parseoperator(compexpression); + if (er != 0) return; + push(x == y ? -1 : 0); + break; + case NOTEQUAL: + parseoperator(compexpression); + if (er != 0) return; + push(x != y ? -1 : 0); + break; + case '>': + parseoperator(compexpression); + if (er != 0) return; + push(x > y ? -1 : 0); + break; + case '<': + parseoperator(compexpression); + if (er != 0) return; + push(x < y ? -1 : 0); + break; + case LESSEREQUAL: + parseoperator(compexpression); + if (er != 0) return; + push(x <= y ? -1 : 0); + break; + case GREATEREQUAL: + parseoperator(compexpression); + if (er != 0) return; + push(x >= y ? -1 : 0); + break; + } +} + +#ifdef HASAPPLE1 +/* boolean NOT */ +void notexpression() { + if (DEBUG) bdebug("notexp\n"); + if (token == TNOT) { + nexttoken(); + expression(); + if (er != 0) return; + push(~(int)pop()); + } else + compexpression(); +} + +/* boolean AND and at the same time bitwise */ +void andexpression() { + if (DEBUG) bdebug("andexp\n"); + notexpression(); + if (er != 0) return; + if (token == TAND) { + parseoperator(expression); + if (er != 0) return; + /* push(x && y); */ + push((int)x & (int)y); + } +} + +/* expression function and boolean OR at the same time bitwise !*/ +void expression(){ + if (DEBUG) bdebug("exp\n"); + andexpression(); + if (er != 0) return; + if (token == TOR) { + parseoperator(expression); + if (er != 0) return; + /* push(x || y); */ + push((int)x | (int)y); + } +} +#else + +/* expression function simplified */ +void expression(){ + if (DEBUG) bdebug("exp\n"); + compexpression(); + if (er != 0) return; + if (token == TOR) { + parseoperator(expression); + if (er != 0) return; + /* push(x || y); */ + push((int)x | (int)y); + } +} +#endif + + + + + + + + +/* + * Layer 2 - The commands and their helpers + * + * Palo Alto BASIC languge set - PRINT, LET, INPUT, GOTO, GOSUB, RETURN, + * IF, FOR, TO, NEXT, STEP, BREAK, STOP, END, LIST, NEW, RUN, REM + * BREAK is not Palo ALto but fits here, eEND is identical to STOP. + */ + +/* + * PRINT command + */ +void xprint(){ + char semicolon = 0; + char oldod; + char modifier = 0; + + form=0; + oldod=od; + nexttoken(); + +processsymbol: +/* at the end of a print statement, do we need a newline, restore the defaults */ + if (termsymbol()) { + if (!semicolon) outcr(); + od=oldod; + form=0; + return; + } + semicolon=0; + +/* output a string if we found it */ + if (stringvalue()) { + if (er != 0) return; + outs(ir2, pop()); + nexttoken(); + goto separators; + } + +/* modifiers of the print statement */ + if (token == '#' || token == '&') { + modifier=token; + nexttoken(); + expression(); + if (er != 0) return; + + switch(modifier) { + case '#': + form=pop(); + break; + case '&': + od=pop(); + break; + } + goto separators; + } + + if (token != ',' && token != ';') { + expression(); + if (er != 0) return; + outnumber(pop()); + } + +separators: + if (termsymbol()) goto processsymbol; + + switch (token) { + case ',': + if (!modifier) outspc(); + case ';': + semicolon=1; + nexttoken(); + break; + default: + error(EUNKNOWN); + return; + } + modifier=0; + + goto processsymbol; +} + +/* + * LET assigment code for various lefthand and righthand side. + * + * + * lefthandside is a helper function for reuse in other + * commands. It determines the address the value is to be + * assigned to and whether the assignment target is a + * "pure" i.e. subscriptless string expression + * + * assignnumber assigns a number to a given lefthandside + * + * in lefthandside the type of the object is determined and + * possible subscripts are parsed + * + * Variables have no subscripts. The arguments are unchanged. + * Arrays may have two subscript which will go to i, j + * Strings may have a string subscript, going to i and an array subscript + * going to j + * Strings without a subscript i.e. pure strings, set the ps flag + * + */ +void lefthandside(address_t* i, address_t* i2, address_t* j, mem_t* ps) { + number_t tmp; + switch (token) { + case VARIABLE: + nexttoken(); + break; + case ARRAYVAR: + nexttoken(); + parsesubscripts(); + nexttoken(); + if (er != 0) return; + switch(args) { + case 1: + *i=popaddress(); + if (er != 0) return; + *j=arraylimit; + break; + case 2: + *j=popaddress(); + if (er != 0) return; + *i=popaddress(); + if (er != 0) return; + break; + default: + error(EARGS); + return; + } + break; +#ifdef HASAPPLE1 + case STRINGVAR: +#ifndef HASSTRINGARRAYS + *j=arraylimit; + nexttoken(); + parsesubscripts(); + if (er != 0) return; + switch(args) { + case 0: + *i=1; + *ps=1; + break; + case 1: + *ps=0; + nexttoken(); + *i=popaddress(); + if (er != 0) return; + break; + case 2: + *ps=0; + nexttoken(); + *i2=popaddress(); + if (er != 0) return; + *i=popaddress(); + if (er != 0) return; + break; + default: + error(EARGS); + return; + } +#else + *j=arraylimit; + nexttoken(); + parsesubscripts(); + if (er != 0) return; + switch(args) { + case -1: + nexttoken(); + case 0: + *i=1; + *ps=1; + break; + case 1: + *ps=0; + nexttoken(); + *i=popaddress(); + if (er != 0) return; + break; + case 2: + *ps=0; + nexttoken(); + *i2=popaddress(); + if (er != 0) return; + *i=popaddress(); + if (er != 0) return; + break; + default: + error(EARGS); + return; + } +/* we deal with a string array */ + if (token == '(') { + parsesubscripts(); + if (er != 0) return; + switch(args) { + case 1: + *j=popaddress(); + if (er != 0) return; + nexttoken(); + break; + default: + error(EARGS); + return; + } + } +#endif + break; +#endif + default: + error(EUNKNOWN); + return; + } +} + +void assignnumber(signed char t, char xcl, char ycl, address_t i, address_t j, char ps) { + switch (t) { + case VARIABLE: + x=pop(); + setvar(xcl, ycl, x); + break; + case ARRAYVAR: + x=pop(); + array('s', xcl, ycl, i, j, &x); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + ir=getstring(xcl, ycl, i, j); + if (er != 0) return; +#ifndef USEMEMINTERFACE + ir[0]=pop(); +#else + if (ir == 0) memwrite2(ax, pop()); +#endif + if (ps) + setstringlength(xcl, ycl, 1, j); + else + if (lenstring(xcl, ycl, j) < i && i <= stringdim(xcl, ycl)) setstringlength(xcl, ycl, i, j); + break; +#endif + } +} + + +/* + * LET - the core assigment function, this is different from other BASICs + */ +void assignment() { + token_t t; /* remember the left hand side token until the end of the statement, type of the lhs */ + mem_t ps=1; /* also remember if the left hand side is a pure string of something with an index */ + mem_t xcl, ycl; /* to preserve the left hand side variable names */ + address_t i=1; /* and the beginning of the destination string */ + address_t i2=0; /* and the end of the destination string */ + address_t j=arraylimit; /* the second dimension of the array */ + address_t lensource, lendest, newlength, strdim, copybytes; + mem_t s; + index_t k; + +/* this code evaluates the left hand side */ + ycl=yc; + xcl=xc; + t=token; + + lefthandside(&i, &i2, &j, &ps); + if (er != 0) return; + + if (DEBUG) { + outsc("** in assignment lefthandside with "); + outnumber(i); outspc(); + outnumber(j); outspc(); + outnumber(ps); outcr(); + } + +/* the assignment part */ + if (token != '=') { + error(EUNKNOWN); + return; + } + nexttoken(); + +/* here comes the code for the right hand side */ + switch (t) { +/* the lefthandside is a scalar, evaluate the righthandside as a number */ + case VARIABLE: + case ARRAYVAR: + expression(); + if (er != 0) return; + assignnumber(t, xcl, ycl, i, j, ps); + break; +#ifdef HASAPPLE1 +/* the lefthandside is a string, try evaluate the righthandside as a stringvalue */ + case STRINGVAR: + s=stringvalue(); + if (er != 0) return; + +/* and then as an expression */ + if (!s) { + expression(); + if (er != 0) return; + assignnumber(t, xcl, ycl, i, j, ps); + break; + } + +/* this is the string righthandside code - how long is the rightandside */ + lensource=pop(); + +/* the destination address of the lefthandside, on an SPI RAM system, we + save the source in the second string buffer and let ir2 point to it + this is needed to avoid the overwrite from the second getstring + then reuse much of the old code */ +#ifdef USEMEMINTERFACE + for(k=0; k strdim)) { error(EORANGE); return; }; + +/* if we have a second index, is it in range */ + if((i2 !=0) && i2>strdim) { error(EORANGE); return; }; + +/* caculate the number of bytes we truely want to copy */ + if (i2 > 0) copybytes=((i2-i+1) > lensource) ? lensource : (i2-i+1); else copybytes=lensource; + +/* this code is needed to make sure we can copy one string to the same string + without overwriting stuff, we go either left to right or backwards */ +#ifndef USEMEMINTERFACE + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; + +#else +/* on an SPIRAM system we need to go through the mem interface + for write, if ir is zero i.e. is not a valid memory location */ + if (ir != 0) { + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; + } else { + for (k=0; k lendest) newlength=i+copybytes-1; else newlength=lendest; + } + + setstringlength(xcl, ycl, newlength, j); + nexttoken(); + break; +#endif + } +} + +/* + * INPUT ["string",] variable [,["string",] variable]* + */ +void showprompt() { + outsc("? "); +} + +void xinput(){ + mem_t oldid = id; + mem_t prompt = 1; + address_t l; + number_t xv; + mem_t xcl, ycl; + address_t k; + + nexttoken(); + +/* modifiers of the input statement (stream) */ + if (token == '&') { + if(!expectexpr()) return; + oldid=id; + id=pop(); + if (id != ISERIAL || id !=IKEYBOARD) prompt=0; + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } +/* unlink print, form can appear only once in input after the + stream, it controls character counts in wire */ +#if (defined(HASWIRE) && defined(HASFILEIO)) + if (token == '#') { + if(!expectexpr()) return; + form=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } +#endif + +nextstring: + if (token == STRING && id != IFILE) { + prompt=0; + outs(ir, x); + nexttoken(); + if (token != ',' && token != ';') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + +nextvariable: + if (token == VARIABLE) { + if (prompt) showprompt(); + if (innumber(&xv) == BREAKCHAR) { + st=SINT; + token=EOL; + goto resetinput; + } else { + setvar(xc, yc, xv); + } + } + +/* we don't use the lefthandside call here because the input loop token handling + is different */ +#ifndef HASMULTIDIM + if (token == ARRAYVAR) { + xcl=xc; + ycl=yc; + nexttoken(); + parsesubscripts(); + if (er != 0 ) return; + if (args != 1) { + error(EARGS); + return; + } + + if (prompt) showprompt(); + if (innumber(&xv) == BREAKCHAR) { + st=SINT; + token=EOL; + goto resetinput; + } else { + array('s', xcl, ycl, pop(), arraylimit, &xv); + } + } +#else + if (token == ARRAYVAR) { + xcl=xc; + ycl=yc; + nexttoken(); + parsesubscripts(); + if (er != 0 ) return; + switch(args) { + case 1: + x=pop(); + y=arraylimit; + break; + case 2: + y=pop(); + x=pop(); + break; + default: + error(EARGS); + return; + } + + if (prompt) showprompt(); + if (innumber(&xv) == BREAKCHAR) { + st=SINT; + token=EOL; + goto resetinput; + } else { + array('s', xcl, ycl, x, y, &xv); + } + } +#endif + +#ifdef HASAPPLE1 +/* strings are not passed through the input buffer but inputed directly + in the string memory location, ir after getstring points to the first data byte */ + if (token == STRINGVAR) { + ir=getstring(xc, yc, 1, arraylimit); + if (prompt) showprompt(); + l=stringdim(xc, yc); +/* the form parameter in WIRE can be used to set the expected number of bytes */ + if (id == IWIRE && form != 0 && form < l) l=form; +#ifndef USEMEMINTERFACE + ins(ir-1, l); +/* this is the length information correction for large strings, ins + stored the string length in z.a as a side effect */ + if (xc != '@' && strindexsize == 2) { + *(ir-2)=z.b.l; + *(ir-1)=z.b.h; + } +#else + if (ir == 0) { + ins(spistrbuf1, l); + for(int k=0; k= BASEKEYWORD) || token < -127) { + if ((token == TTHEN || + token == TELSE || + token == TTO || + token == TSTEP || + token == TGOTO || + token == TGOSUB || + token == TOR || + token == TAND ) && lastouttoken != LINENUMBER) outspc(); + else + if (lastouttoken == NUMBER || lastouttoken == VARIABLE) outspc(); + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=token; i++); + outsc(getkeyword(i)); + if (token != GREATEREQUAL && token != NOTEQUAL && token != LESSEREQUAL && token != TREM) spaceafterkeyword=1; + break; + } + if (token >= 32) { + outch(token); + if (token == ':' && !outliteral) outspc(); + break; + } + outch(token); outspc(); outnumber(token); + } + + lastouttoken=token; +} + +/* + * LIST programs to an output device + */ +void xlist(){ + number_t b, e; + mem_t oflag = 0; + + lastouttoken=0; + spaceafterkeyword=0; + + nexttoken(); + parsearguments(); + if (er != 0) return; + + switch (args) { + case 0: + b=0; + e=32767; + break; + case 1: + b=pop(); + e=b; + break; + case 2: + e=pop(); + b=pop(); + break; + default: + error(EARGS); + return; + } + + if ( top == 0 ) { nexttoken(); return; } + + here=0; + gettoken(); + while (here < top) { + if (token == LINENUMBER && ax >= b) oflag=1; + if (token == LINENUMBER && ax > e) oflag=0; + if (oflag) outputtoken(); + gettoken(); + if (token == LINENUMBER && oflag) { + outcr(); +/* wait after every line on small displays + removed if ( dspactive() && (dsp_rows < 10) ){ if ( inch() == 27 ) break;} */ + if (dspactive()) + if ( dspwaitonscroll() == 27 ) break; + } + } + if (here == top && oflag) outputtoken(); + if (e == 32767 || b != e) outcr(); /* supress newlines in "list 50" - a little hack */ + + nexttoken(); + } + +/* + * RUN and CONTINUE are the same function + */ +void xrun(){ + if (token == TCONT) { + st=SRUN; + nexttoken(); + } else { + nexttoken(); + parsearguments(); + if (er != 0 ) return; + if (args > 1) { error(EARGS); return; } + if (args == 0) { + here=0; + } else { + findline(pop()); + } + if (er != 0) return; + if (st == SINT) st=SRUN; + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; +#ifdef HASEVENTS + events_enabled=1; +#endif + nexttoken(); + } + +/* once statement is called it stays into a loop until the token stream + is exhausted. Then we return to interactive mode. */ + statement(); + st=SINT; +/* flush the EEPROM when changing to interactive mode */ + eflush(); + +/* if called from command line with file arg - exit after run */ +#ifndef ARDUINO + if (bnointafterrun) restartsystem(); +#endif +} + +/* + * NEW the general cleanup function - new deletes everything + * + * restbasicstate() is a helper, it keeps the memory intact + * this is needed for EEPROM direct memory + */ +void resetbasicstate() { + + /* all stacks are purged */ + clearst(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrvars(); + clrlinecache(); + +/* error status reset */ + reseterror(); + +/* let here point to the beginning of the program */ + here=0; + +/* interactive mode */ + st=SINT; + +/* switch off timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +} + +void xnew(){ + +/* reset the state of the interpreter */ + resetbasicstate(); + +/* program memory back to zero and variable heap cleared */ + himem=memsize; + zeroblock(0, memsize); + top=0; + +/* on EEPROM systems also clear the stored state and top */ +#ifdef EEPROMMEMINTERFACE + eupdate(0, 0); + z.a=top; + esetnumber(1, addrsize); +#endif +} + +/* + * REM - skip everything + */ +void xrem() { + if (debuglevel == -1) outsc("REM: "); + while (token != LINENUMBER && token != EOL && here <= top) + { + nexttoken(); + if (debuglevel == -1) { + if (token != LINENUMBER) outputtoken(); else outcr(); + } + } +} + +/* + * The Apple 1 BASIC additions + * CLR, DIM, POKE, TAB + */ + +/* + * CLR - clearing variable space + */ +void xclr() { + +#ifdef HASDARKARTS + mem_t xcl, ycl, t; + + nexttoken(); + + if (termsymbol()) { + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + } else { + + xcl=xc; + ycl=yc; + t=token; + + switch (t) { + case VARIABLE: + if (xcl == '@' || ycl == 0) { error(EVARIABLE); return; } + break; + case ARRAYVAR: + nexttoken(); + if (token != '(') { error(EVARIABLE); return; } + nexttoken(); + if (token != ')') { error(EVARIABLE); return; } + break; + case STRINGVAR: + if (xcl == '@') { error(EVARIABLE); return; } + break; + default: + expression(); + if (er != 0) return; + ax=pop(); + xcl=ax%256; + ycl=ax/256; + t=TBUFFER; + } + + ax=bfree(t, xcl, ycl); + if (ax == 0) { + if (t != TBUFFER) { error(EVARIABLE); return; } + else ert=1; + } + } + +#else + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; +#endif + nexttoken(); +} + +#ifdef HASAPPLE1 +/* + * DIM - the dimensioning of arrays and strings from Apple 1 BASIC + */ +void xdim(){ + mem_t xcl, ycl; + token_t t; + number_t x, y; + + nexttoken(); + +nextvariable: + if (token == ARRAYVAR || token == STRINGVAR ){ + + t=token; + xcl=xc; + ycl=yc; + + nexttoken(); + parsesubscripts(); + if (er != 0) return; + +#ifndef HASMULTIDIM + if (args != 1) {error(EARGS); return; } + + x=pop(); + if (x<=0) {error(EORANGE); return; } + if (t == STRINGVAR) { + if ( (x>255) && (strindexsize==1) ) {error(EORANGE); return; } + (void) createstring(xcl, ycl, x, 1); + } else { + (void) createarray(xcl, ycl, x, 1); + } +#else + if (args != 1 && args != 2) {error(EARGS); return; } + + x=pop(); + if (args == 2) {y=x; x=pop(); } else { y=1; } + + if (x <= 0 || y<=0) {error(EORANGE); return; } + if (t == STRINGVAR) { + if ( (x>255) && (strindexsize==1) ) {error(EORANGE); return; } +/* running from an SPI RAM means that we need to go through buffers in real memory which + limits string sizes, this should ne be here but encapsulated, todo after multidim string + implementation is complete */ +#ifdef SPIRAMSBSIZE + if (x>SPIRAMSBSIZE-1) {error(EORANGE); return; } +#endif + (void) createstring(xcl, ycl, x, y); + } else { + (void) createarray(xcl, ycl, x, y); + } +#endif + } else { + error(EUNKNOWN); + return; + } + + nexttoken(); + if (token == ',') { + nexttoken(); + goto nextvariable; + } + + nexttoken(); +} + + +/* + * POKE - low level poke to the basic memory, works only up to 32767 + * variables changed to local + */ +void xpoke(){ + address_t amax; + index_t a, v; /* both can be signed ! */ + +/* 16 bit numbers can't poke big addresses */ + if ( (long) memsize > (long) maxnum) amax=(address_t) maxnum; else amax=memsize; + + nexttoken(); + parsenarguments(2); + if (er != 0) return; + + v=pop(); /* the value */ + a=pop(); /* the address */ + + if (a >= 0 && a= -elength()) + eupdate(-a-1, v); + else { + error(EORANGE); + } +} + +/* + * TAB - spaces command of Apple 1 BASIC + * charcount mechanism for relative tab if HASMSTAB is set + */ +void xtab(){ + address_t tx; + + nexttoken(); + parsenarguments(1); + if (er != 0) return; + + tx=popaddress(); + if (er != 0) return; + +#ifdef HASMSTAB + if (reltab && od <= OPRT && od > 0) { + if (charcount[od-1] >= tx) tx=0; else tx=tx-charcount[od-1]-1; + } +#endif + while (tx-- > 0) outspc(); +} +#endif + +/* + * locate the curor on the screen + */ + +void xlocate() { + address_t cx, cy; + + nexttoken(); + parsenarguments(2); + if (er != 0) return; + + cy=popaddress(); + cx=popaddress(); + if (er != 0) return; + +/* for locate we go through the VT52 interface for cursor positioning*/ + if (cx > 0 && cy > 0 && cx < 224 && cy < 224) { + outch(27); outch('Y'); + outch(31+(unsigned int) cy); + outch(31+(unsigned int) cx); + } + +/* set the charcount, this is half broken on escape sequences */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=cx; +#endif + +} + +/* + * Stefan's additions to Palo Alto BASIC + * DUMP, SAVE, LOAD, GET, PUT, SET + * + */ + +/* + * DUMP - memory dump program + */ +void xdump() { + address_t a, x; + char eflag = 0; + + nexttoken(); + if (token == '!') { eflag=1; nexttoken(); } + parsearguments(); + if (er != 0) return; + + switch (args) { + case 0: + x=0; + a=memsize; + break; + case 1: + x=pop(); + a=memsize; + break; + case 2: + a=pop(); + x=pop(); + break; + default: + error(EARGS); + return; + } + + form=6; + if (a>x) dumpmem((a-x)/8+1, x, eflag); + form=0; +} + +/* + * helper of DUMP, wrote the memory out + */ +void dumpmem(address_t r, address_t b, char eflag) { + address_t j, i; + address_t k; + mem_t c; + address_t end; + + k=b; + i=r; + if (eflag) end=elength(); else end=memsize; + while (i>0) { + outnumber(k); outspc(); + for (j=0; j<8; j++) { + if (eflag) c=eread(k); else c=memread(k); + k++; + outnumber(c); outspc(); + if (k > end) break; + } + outcr(); + i--; + if (k > end) break; + } + if (eflag) { + outsc("elength: "); outnumber(elength()); outcr(); + } else { + outsc("top: "); outnumber(top); outcr(); + outsc("himem: "); outnumber(himem); outcr(); + } +} + +/* + * creates a C string from a BASIC string + * after reading a BASIC string ir2 contains a pointer + * to the data and x the string length + */ +void stringtobuffer(char *buffer) { + index_t i; + i=x; + if (i >= SBUFSIZE) i=SBUFSIZE-1; + buffer[i--]=0; + while (i >= 0) { buffer[i]=ir2[i]; i--; } +} + +/* get a file argument */ +void getfilename(char *buffer, char d) { + index_t s; + char *sbuffer; + + s=stringvalue(); + if (er != 0) return; + if (DEBUG) {outsc("** in getfilename2 stringvalue delivered "); outnumber(s); outcr(); } + + if (s) { + x=pop(); + if (DEBUG) {outsc("** in getfilename2 copying string of length "); outnumber(x); outcr(); } + stringtobuffer(buffer); + if (DEBUG) {outsc("** in getfilename2 stringvalue string "); outsc(buffer); outcr(); } + nexttoken(); + } else if (termsymbol()) { + if (d) { + sbuffer=getmessage(MFILE); + s=0; + while ((sbuffer[s] != 0) && (s < SBUFSIZE-1)) { buffer[s]=sbuffer[s]; s++; } + buffer[s]=0; + x=s; + } else { + buffer[0]=0; + x=0; + } + nexttoken(); + } else { + expression(); + if (er != 0) return; + buffer[0]=pop(); + buffer[1]=0; + } +} + +#if defined(FILESYSTEMDRIVER) +/* + * SAVE a file either to disk or to EEPROM + */ +void xsave() { + char filename[SBUFSIZE]; + address_t here2; + token_t t; + + nexttoken(); + getfilename(filename, 1); + if (er != 0) return; + t=token; + + if (filename[0] == '!') { + esave(); + } else { + if (DEBUG) { outsc("** Opening the file "); outsc(filename); outcr(); }; + + if (!ofileopen(filename, "w")) { + error(EFILE); + return; + } + +/* save the output mode and then save */ + push(od); + od=OFILE; + +/* the core save - xlist() not used any more */ + ert=0; /* reset error to trap file problems */ + here2=here; + here=0; + gettoken(); + while (here < top) { + outputtoken(); + if (ert) break; + gettoken(); + if (token == LINENUMBER) outcr(); + } + if (here == top) outputtoken(); + outcr(); + +/* back to where we were */ + here=here2; + +/* restore the output mode */ + od=pop(); + +/* clean up */ + ofileclose(); + +/* did an accident happen */ + if (ert) { printmessage(EGENERAL); outcr(); ert=0; } + } + +/* and continue remembering, where we were */ + token=t; +} + +/* + * LOAD a file + */ +void xload(const char* f) { + char filename[SBUFSIZE]; + char ch; + address_t here2; + mem_t chain = 0; + + if (f == 0) { + nexttoken(); + getfilename(filename, 1); + if (er != 0) return; + } else { + for(ch=0; ch BUFSIZE) { + error(EOUTOFMEMORY); + break; + } + } + ifileclose(); +/* after a successful load we save top to the EEPROM header */ +#ifdef EEPROMMEMINTERFACE + z.a=top; + esetnumber(1, addrsize); +#endif + +/* go back to run mode and start from the first line */ + if (chain) { + st=SRUN; + here=0; + nexttoken(); + } + } +} +#else +/* + * SAVE a file to EEPROM - minimal version for small Arduinos + */ +void xsave() { + esave(); + nexttoken(); +} +/* + * LOAD a file from EEPROM - minimal version for small Arduinos + */ +void xload(const char* f) { + eload(); + nexttoken(); +} +#endif + +/* + * GET just one character from input + */ +void xget(){ + token_t t; /* remember the left hand side token until the end of the statement, type of the lhs */ + mem_t ps=1; /* also remember if the left hand side is a pure string or something with an index */ + mem_t xcl, ycl; /* to preserve the left hand side variable names */ + address_t i=1; /* and the beginning of the destination string */ + address_t i2=1; /* and the end of the destination string */ + address_t j=1; /* the second dimension of the array if needed */ + mem_t oid=id; /* remember the input stream */ + char ch; + + nexttoken(); + +/* modifiers of the get statement */ + if (token == '&') { + + if (!expectexpr()) return; + id=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + +/* this code evaluates the left hand side - remember type and name */ + ycl=yc; + xcl=xc; + t=token; + +/* find the indices */ + lefthandside(&i, &i2, &j, &ps); + if (er != 0) return; + +/* get the data, non blocking on Arduino */ + if (availch()) ch=inch(); else ch=0; + +/* store the data element as a number expect for */ + push(ch); + assignnumber(t, xcl, ycl, i, j, ps); + +/* but then, strings where we deliver a string with length 0 if there is no data */ +#ifdef HASAPPLE1 + if (t == STRINGVAR && ch == 0 && ps) setstringlength(xcl, ycl, 0, arraylimit); +#endif + +/* restore the output device */ + id=oid; +} + +/* + * PUT writes one character to an output stream + */ +void xput(){ + mem_t ood=od; + index_t i; + + nexttoken(); + +/* modifiers of the put statement */ + if (token == '&') { + + if(!expectexpr()) return; + od=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + parsearguments(); + if (er != 0) return; + + for (i=args-1; i>=0; i--) sbuffer[i]=pop(); + outs(sbuffer, args); + + od=ood; +} + +/* + * SET - the command itself is also apocryphal it is a low level + * control command setting certain properties + * syntax, currently it is only SET expression, expression + */ +void xset(){ + address_t fn; + index_t args; + + nexttoken(); + parsenarguments(2); + if (er != 0) return; + + args=pop(); + fn=pop(); + switch (fn) { +/* runtime debug level */ + case 0: + debuglevel=args; + break; +/* autorun/run flag of the EEPROM 255 for clear, 0 for prog, 1 for autorun */ + case 1: + eupdate(0, args); + break; +/* change the output device */ + case 2: + switch (args) { + case 0: + od=OSERIAL; + break; + case 1: + od=ODSP; + break; + } + break; +/* change the default output device */ + case 3: + switch (args) { + case 0: + od=(odd=OSERIAL); + break; + case 1: + od=(odd=ODSP); + break; + } + break; + /* change the input device */ + case 4: + switch (args) { + case 0: + id=ISERIAL; + break; + case 1: + id=IKEYBOARD; + break; + } + break; + /* change the default input device */ + case 5: + switch (args) { + case 0: + idd=(id=ISERIAL); + break; + case 1: + idd=(id=IKEYBOARD); + break; + } + break; +#ifdef ARDUINOPRT +/* set the cr behaviour */ + case 6: + sendcr=(char)args; + break; +/* set the blockmode behaviour */ + case 7: + blockmode=args; + break; +/* set the second serial ports baudrate */ + case 8: + prtset(args); + break; +#endif +/* set the power amplifier level of the radio module */ +#ifdef ARDUINORF24 + case 9: + radioset(args); + break; +#endif +/* display update control for paged displays */ + case 10: + dspsetupdatemode(args); + break; +/* change the output device to a true TAB */ +#ifdef HASMSTAB + case 11: + reltab=args; + break; +#endif +/* change the lower array limit */ +#ifdef HASARRAYLIMIT + case 12: + arraylimit=args; + break; +#endif +#ifdef HASKEYPAD + case 13: + kbdrepeat=args; + break; +#endif +#ifdef HASPULSE + case 14: + bpulseunit=args; + break; +#endif +#ifdef POSIXVT52TOANSI + case 15: + vt52active=args; + break; +#endif + } +} + +/* + * NETSTAT - network status command, rudimentary + */ +void xnetstat(){ +#if defined(ARDUINOMQTT) + + nexttoken(); + parsearguments(); + if (er != 0) return; + + switch (args) { + case 0: + if (netconnected()) outsc("Network connected \n"); else outsc("Network not connected \n"); + outsc("MQTT state "); outnumber(mqttstate()); outcr(); + outsc("MQTT out topic "); outsc(mqtt_otopic); outcr(); + outsc("MQTT inp topic "); outsc(mqtt_itopic); outcr(); + outsc("MQTT name "); outsc(mqttname); outcr(); + break; + case 1: + ax=pop(); + switch (ax) { + case 0: + netstop(); + break; + case 1: + netbegin(); + break; + case 2: + if (!mqttreconnect()) ert=1; + break; + default: + error(EARGS); + return; + } + break; + default: + error(EARGS); + return; + } +#endif + nexttoken(); +} + +/* + * The arduino io functions. + * + * DWRITE - digital write + */ +void xdwrite(){ + address_t x,y; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + x=pop(); + y=pop(); + if (er !=0) return; + dwrite(y, x); +} + +/* + * AWRITE - analog write + */ +void xawrite(){ + address_t x,y; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + x=popaddress(); + y=popaddress(); + if (er != 0) return; + awrite(y, x); +} + +/* + * PINM - pin mode + */ +void xpinm(){ + address_t x,y; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + x=popaddress(); + y=popaddress(); + if (er != 0) return; + pinm(y, x); +} + +/* + * DELAY in milliseconds + * + * this must call bdelay() and not delay() as bdelay() + * handles all the yielding and timing functions + * + */ +void xdelay(){ + nexttoken(); + parsenarguments(1); + if (er != 0) return; + bdelay(pop()); +} + +/* tone if the platform has it -> BASIC command PLAY */ +#ifdef HASTONE +void xtone(){ + nexttoken(); + parsearguments(); + if (er != 0) return; + if (args>4 || args<2) { + error(EARGS); + return; + } + btone(args); +} +#endif + +/* pulse output - pin, duration, [value], [repetitions, delay] */ +#ifdef HASPULSE +void xpulse(){ + nexttoken(); + parsearguments(); + if (er != 0) return; + if (args>5 || args<2) { + error(EARGS); + return; + } + bpulseout(args); +} +#endif + + +#ifdef HASGRAPH +/* + * COLOR setting, accepting one or 3 arguments + */ +void xcolor() { + short r, g, b; + nexttoken(); + parsearguments(); + if (er != 0) return; + switch(args) { + case 1: + vgacolor(pop()); + break; + case 3: + b=pop(); + g=pop(); + r=pop(); + rgbcolor(r, g, b); + break; + default: + error(EARGS); + break; + } +} + +/* + * PLOT a pixel on the screen + */ +void xplot() { + short x0, y0; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + y0=pop(); + x0=pop(); + plot(x0, y0); +} + +/* + * LINE draws a line + */ +void xline() { + short x0, y0, x1, y1; + nexttoken(); + parsenarguments(4); + if (er != 0) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + line(x0, y0, x1, y1); +} + +void xrect() { + short x0, y0, x1, y1; + nexttoken(); + parsenarguments(4); + if (er != 0) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + rect(x0, y0, x1, y1); +} + +void xcircle() { + short x0, y0, r; + nexttoken(); + parsenarguments(3); + if (er != 0) return; + r=pop(); + y0=pop(); + x0=pop(); + circle(x0, y0, r); +} + +void xfrect() { + short x0, y0, x1, y1; + nexttoken(); + parsenarguments(4); + if (er != 0) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + frect(x0, y0, x1, y1); +} + +void xfcircle() { + short x0, y0, r; + nexttoken(); + parsenarguments(3); + if (er != 0) return; + r=pop(); + y0=pop(); + x0=pop(); + fcircle(x0, y0, r); +} +#endif + +#ifdef HASDARKARTS +/* + * MALLOC allocates a chunk of memory + */ +void xmalloc() { + address_t s; + address_t a; + + s=popaddress(); + a=popaddress(); + if (er != 0) return; + + push(bmalloc(TBUFFER, a%256, a/256, s)); +} + +/* + * FIND an object on the heap + * xfind can find things in the variable name space and the buffer space + */ + +void xfind() { + address_t a; + address_t n; + +/* is there a ( */ +if (!expect('(', EUNKNOWN)) return; + +/* after that, try to find the object on the heap */ + nexttoken(); + a=bfind(token, xc, yc); + +/* depending on the object, interpret the result */ + switch (token) { + case ARRAYVAR: + if (!expect('(', EUNKNOWN)) return; + if (!expect(')', EUNKNOWN)) return; + case VARIABLE: + case STRINGVAR: + nexttoken(); + break; + default: + expression(); /* do not use expectexpr here because of the token sequence */ + if (er != 0) return; + n=popaddress(); + if (er != 0) return; + a=bfind(TBUFFER, n%256, n/256); + } + +/* closing braket, dont use expect here because of the token sequence */ + if (token != ')') { error(EUNKNOWN); return; } + + push(a); +} + +/* + * EVAL can modify a program, there are serious side effects + * which are not caught (and cannot be). All FOR loops and RETURN + * vectors break if EVAL inserts in their range + */ +void xeval(){ + address_t i, l; + address_t mline, line; + + +/* get the line number to store */ + if (!expectexpr()) return; + line=popaddress(); + if (er != 0) return; + + if (token != ',') { + error(EUNKNOWN); + return; + } + +/* the line to be stored */ + nexttoken(); + if (!stringvalue()) { + error(EARGS); return; + } + +/* here we have the string to evaluate in ir2 and copy it to the ibuffer + only one line allowed, BUFSIZE is the limit */ + l=popaddress(); + if (er != 0) return; + + if (l>BUFSIZE-1) {error(EORANGE); return; } + + for (i=0; ienabled=0; + t->interval=0; + t->last=0; + t->type=0; + t->linenumber=0; +} + +void xtimer() { + token_t t; + btimer_t* timer; + +/* do we deal with every or after */ + if (token == TEVERY) timer=&every_timer; else timer=&after_timer; + + /* one argument expected, the time intervall */ + if (!expectexpr()) return; + + /* after that, a command GOTO or GOSUB with a line number + more commands thinkable */ + switch(token) { + case TGOSUB: + case TGOTO: + t=token; + if (!expectexpr()) return; + timer->last=millis(); + timer->type=t; + timer->linenumber=pop(); + timer->interval=pop(); + timer->enabled=1; + break; + default: + if (termsymbol()) { + x=pop(); + if (x == 0) + timer->enabled=0; + else { + if (timer->linenumber) { + timer->enabled=1; + timer->interval=x; + timer->last=millis(); + } else + error(EARGS); + } + } else + error(EUNKNOWN); + return; + } +} +#endif + +#ifdef HASEVENTS +/* the event BASIC commands */ +void initevents() { + int i; + for(i=0; i= 0) { + outnumber(eventlist[ax].pin); outspc(); + outnumber(eventlist[ax].mode); outspc(); + outnumber(eventlist[ax].type); outspc(); + outnumber(eventlist[ax].linenumber); outspc(); + outcr(); + } + } + outnumber(nevents); outcr(); + nexttoken(); + return; + } + +/* control of events */ + if (token == TSTOP) { + events_enabled=0; + nexttoken(); + return; + } + + if (token == TCONT) { + events_enabled=1; + nexttoken(); + return; + } + +/* argument parsing */ + parsearguments(); + if (er != 0) return; + + switch(args) { + case 2: + mode=pop(); + if (mode > 3) { + error(EARGS); + return; + } + case 1: + pin=pop(); + break; + default: + error(EARGS); + } + +/* followed by termsymbol, GOTO or GOSUB */ + if (token == TGOTO || token == TGOSUB) { + type=token; + +/* which line to go to */ + if (!expectexpr()) return; + line=pop(); + } + + +/* all done either set the interrupt up or delete it*/ + if (type) { + if (!addevent(pin, mode, type, line)) { + error(EARGS); + return; + } + } else { + disableevent(pin); + deleteevent(pin); + return; + } + +/* enable the interrupt */ + if (!enableevent(pin)) { + deleteevent(pin); + error(EARGS); + return; + } +} + +/* handling the event list */ +mem_t addevent(mem_t pin, mem_t mode, mem_t type, address_t linenumber) { + int i; + +/* is the event already there */ + for (i=0; i= EVENTLISTSIZE) return 0; + for (i=0; i=0){ + eventlist[i].enabled=0; + eventlist[i].pin=-1; + eventlist[i].mode=0; + eventlist[i].type=0; + eventlist[i].linenumber=0; + eventlist[i].active=0; + nevents--; + } +} + + +mem_t eventindex(mem_t pin) { + int i; + for(i=0; i0) outnumber(rootfilesize()); + outcr(); + if ( dspwaitonscroll() == 27 ) break; + } + } + rootfileclose(); + } + rootclose(); +#else + nexttoken(); +#endif +} + +/* + * DELETE a file + */ +void xdelete() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + + nexttoken(); + getfilename(filename, 0); + if (er != 0) return; + + removefile(filename); +#else + nexttoken(); +#endif +} + +/* + * OPEN a file or I/O stream - very raw mix of different functions + */ +void xopen() { +#if defined(FILESYSTEMDRIVER) || defined(ARDUINORF24) || defined(ARDUINOMQTT) || (defined(HASWIRE) && defined(HASFILEIO)) + char stream = IFILE; // default is file operation + char filename[SBUFSIZE]; + int mode; + +/* which stream do we open? default is FILE */ + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',') {error(EUNKNOWN); return; } + nexttoken(); + } + +/* the filename and its length */ + getfilename(filename, 0); + if (er != 0) return; + +/* and the arguments */ + args=0; + if (token == ',') { + nexttoken(); + parsearguments(); + } + +/* getting an argument, no argument is read, i.e. mode 0 */ + if (args == 0 ) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + switch(stream) { +#ifdef ARDUINOPRT + case ISERIAL1: + prtclose(); + if (mode == 0) mode=9600; + if (prtopen(filename, mode)) ert=0; else ert=1; + break; +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + switch (mode) { + case 1: + ofileclose(); + if (ofileopen(filename, "w")) ert=0; else ert=1; + break; + case 2: + ofileclose(); + if (ofileopen(filename, "a")) ert=0; else ert=1; + break; + default: + case 0: + ifileclose(); + if (ifileopen(filename)) ert=0; else ert=1; + break; + } + break; +#endif +#ifdef ARDUINORF24 + case IRADIO: + if (mode == 0) { + iradioopen(filename); + } else if (mode == 1) { + oradioopen(filename); + } + break; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + wireopen(filename[0], mode); + break; +#endif +#ifdef ARDUINOMQTT + case IMQTT: + if (mode == 0) { + mqttsubscribe(filename); + } else if (mode == 1) { + mqttsettopic(filename); + } + break; +#endif + default: + error(EORANGE); + return; + + } +#endif + nexttoken(); +} + +/* + * OPEN as a function, currently only implemented for MQTT + */ +void xfopen() { + short chan = pop(); + if (chan == 9) push(mqttstate()); else push(0); +} + +/* + * CLOSE a file or stream + */ +void xclose() { +#if defined(FILESYSTEMDRIVER) || defined(ARDUINORF24) || defined(ARDUINOMQTT) || (defined(HASWIRE) && defined(HASFILEIO)) + char stream = IFILE; + char mode; + + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',' && ! termsymbol()) {error(EUNKNOWN); return; } + nexttoken(); + } + + parsearguments(); + if (args == 0) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + + switch(stream) { + case IFILE: + if (mode == 1 || mode == 2) ofileclose(); else if (mode == 0) ifileclose(); + break; + } +#endif + nexttoken(); +} + +/* + * FDISK - format internal disk storages of RP2040, ESP and the like + */ +void xfdisk() { +#if defined(FILESYSTEMDRIVER) + nexttoken(); + parsearguments(); + if (er != 0) return; + if (args > 1) error(EORANGE); + if (args == 0) push(0); + outsc("Format disk (y/N)?"); + consins(sbuffer, SBUFSIZE); + if (sbuffer[1] == 'y') formatdisk(pop()); +#endif + nexttoken(); +} + +#ifdef HASSTEFANSEXT +/* + * USR low level function access of the interpreter + * for each group of functions there is a call vector + * and and argument. + * + * USR arguments from 0 to 31 are reserved for the + * interpreter status and the input output stream + * mechanisms. All other values are free and can be used + * for individual functions - see case 32 for an example. + */ +void xusr() { + address_t fn; + number_t v; + int arg; + address_t a; + + v=pop(); + arg=(int)v; /* a bit paranoid here */ + fn=pop(); + switch(fn) { +/* USR(0,y) delivers all the internal constants and variables or the interpreter */ + case 0: + switch(arg) { + case 0: push(bsystype); break; + case 1: /* language set identifier, odd because USR is part of STEFANSEXT*/ + a=0; +#ifdef HASAPPLE1 + a|=1; +#endif +#ifdef HASARDUINOIO + a|=2; +#endif +#ifdef HASFILEIO + a|=4; +#endif +#ifdef HASDARTMOUTH + a|=8; +#endif +#ifdef HASGRAPH + a|=16; +#endif +#ifdef HASDARKARTS + a|=32; +#endif +#ifdef HASIOT + a|=64; +#endif + push(a); + break; + case 2: push(0); break; /* reserved for system speed identifier */ + +#ifdef HASFLOAT + case 3: push(-1); break; +#else + case 3: push(0); break; +#endif + case 4: push(numsize); break; + case 5: push(maxnum); break; + case 6: push(addrsize); break; + case 7: push(maxaddr); break; + case 8: push(strindexsize); break; + case 9: push(memsize+1); break; + case 10: push(elength()); break; + case 11: push(GOSUBDEPTH); break; + case 12: push(FORDEPTH); break; + case 13: push(STACKSIZE); break; + case 14: push(BUFSIZE); break; + case 15: push(SBUFSIZE); break; + case 16: push(ARRAYSIZEDEF); break; + case 17: push(STRSIZEDEF); break; +/* - 24 reserved, don't use */ + case 24: push(top); break; + case 25: push(here); break; + case 26: push(himem); break; + case 27: push(nvars); break; + case 28: push(freeRam()); break; + case 29: push(gosubsp); break; + case 30: push(forsp); break; + case 31: push(0); break; /* fnc removed as interpreter variable */ + case 32: push(sp); break; +#ifdef HASDARTMOUTH + case 33: push(data); break; +#else + case 33: push(0); break; +#endif + case 34: push(0); break; +/* - 48 reserved, don't use */ + case 48: push(id); break; + case 49: push(idd); break; + case 50: push(od); break; + case 51: push(odd); break; + default: push(0); + } + break; +/* access to properties of stream 1 - serial */ + case 1: + push(serialstat(arg)); + break; +/* access to properties of stream 2 - display and keyboard */ + case 2: +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + push(dspstat(arg)); +#elif defined(ARDUINOVGA) + push(vgastat(arg)); +#else + push(0); +#endif + break; +/* access to properties of stream 4 - printer */ +#ifdef ARDUINOPRT + case 4: + push(prtstat(arg)); + break; +#endif +/* access to properties of stream 7 - wire */ +#if (defined(HASWIRE) && defined(HASFILEIO)) + case 7: + push(wirestat(arg)); + break; +#endif +/* access to properties of stream 8 - radio */ +#ifdef ARDUINORF24 + case 8: + push(radiostat(arg)); + break; +#endif +/* access to properties of stream 9 - mqtt */ +#ifdef ARDUINOMQTT + case 9: + push(mqttstat(arg)); + break; +#endif +/* access to properties of stream 16 - file */ +#ifdef FILESYSTEMDRIVER + case 16: + push(fsstat(arg)); + break; +#endif + case 32: +/* user function 32 and beyond can be used freely */ +/* all USR values not assigned return 0 */ + default: + if (fn>31) push(usrfunction(fn, v)); else push(0); + } +} + +#endif + +/* + * CALL currently only to exit the interpreter + */ +void xcall() { + int r; + + if (!expectexpr()) return; + r=pop(); + switch(r) { + case 0: +/* flush the EEPROM dummy and the output file and then exit */ + eflush(); + ofileclose(); +#if defined(POSIXFRAMEBUFFER) + vgaend(); /* clean up if you have played with the framebuffer */ +#endif + restartsystem(); + break; +/* restart the filesystem - only test code */ + case 1: + fsbegin(1); + break; +/* call values to 31 reserved! */ + default: +/* your custom code into usrcall() */ + if (r > 31) usrcall(r); else { error(EORANGE); return; } + nexttoken(); + return; + } +} + +/* the dartmouth stuff */ +#ifdef HASDARTMOUTH +/* + * DATA is simply skipped when encountered as a command + */ +void xdata() { + while (!termsymbol()) nexttoken(); +} + +/* + * for READ find the next data record, helper of READ + */ +#define DEBUG 0 +void nextdatarecord() { + address_t h; + mem_t s=1; + +/* save the location of the interpreter */ + h=here; + +/* data at zero means we need to init it, by searching the first data record */ + if (data == 0) { + here=0; + while (here stringdim(xcl, ycl)) { error(EORANGE); return; } + +/* this code is needed to make sure we can copy one string to the same string + without overwriting stuff, we go either left to right or backwards */ +#ifndef USEMEMINTERFACE + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; +#else +/* on an SPIRAM system we need to go through the mem interface + for write */ + if (ir != 0) { + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; + } else + for (k=0; k args && cr <= 0) ci=0; else ci=(int)cr; + +/* now find the line to jump to and clean the stack, reuse cr + * we need to clean the stack here completely, therefore complete the loop + * ERROR handling is needed for the trapping mechanism. No using popaddress() + * here, because of the needed stack cleanup. Unclear is this precaution is + * really needed. + */ + while (args) { + tmp=pop(); + if (args == ci) { + if (tmp < 0) er=ELINE; + line=tmp; + } + args--; + } + + if (er) return; + + if (DEBUG) { outsc("** in on found line as target "); outnumber(line); outcr(); } +/* no line found to jump to */ + if (line == 0) { + nexttoken(); + return; + } + +/* prepare for the jump */ + if (t == TGOSUB) pushgosubstack(0); + if (er != 0) return; + + findline(line); + if (er != 0) return; + +/* goto in interactive mode switched to RUN mode + no clearing of variables and stacks */ + if (st == SINT) st=SRUN; + + /* removed to avoid blocking in AFTER, EVERY and EVENT infinite loops */ + /* nexttoken(); */ +} + +#endif + +/* the structured BASIC extensions, WHILE, UNTIL, and SWITCH */ + +#ifdef HASSTRUCT + +void xwhile() { + +/* what? */ + if (DEBUG) { outsc("** in while "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points to the condition */ + pushforstack(); + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND and clear the stack*/ + if (!pop()) { + popforstack(); + if (st == SINT) bi=ibuffer+here; + findbraket(TWHILE, TWEND); + nexttoken(); + } +} + +void xwend() { + +/* remember where we are */ + pushlocation(); + +/* back to the condition */ + popforstack(); + if (er != 0) return; + +/* interactive run */ + if (st == SINT) bi=ibuffer+here; + +/* is this a while loop */ + if (token != TWHILE ) { + error(TWEND); + return; + } + +/* run the loop again - same code as xwhile */ + if (st == SINT) here=bi-ibuffer; + pushforstack(); + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND */ + if (!pop()) { + popforstack(); + poplocation(); + nexttoken(); + } +} + +void xrepeat() { + /* what? */ + if (DEBUG) { outsc("** in repeat "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points statement after repeat */ + pushforstack(); + +/* we are done here */ + nexttoken(); + +} + +void xuntil() { + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* remember the location */ + pushlocation(); + +/* look on the stack */ + popforstack(); + if (er != 0) return; + +/* if false, go back to the repeat */ + if (!pop()) { + +/* the right loop type ? */ + if (token != TREPEAT) { + error(TUNTIL); + return; + } + +/* correct for interactive */ + if (st == SINT) bi=ibuffer+here; + +/* write the stack back if we continue looping */ + pushforstack(); + + } else { + +/* back to where we were */ + poplocation(); + } + + nexttoken(); /* a bit of evil here, hobling over termsymbols */ + +} + +void xswitch() { + number_t r; + mem_t match = 0; + mem_t swcount = 0; + +/* lets look at the condition */ + if (!expectexpr()) return; + r=pop(); + +/* remember where we are */ + pushlocation(); + +/* seek the first case to match the condition */ + while (token != EOL) { + if (token == TSWEND) break; + /* nested SWITCH - skip them all*/ + if (token == TSWITCH) { + + if (DEBUG) { outsc("** in SWITCH - nesting found "); outcr(); } + + nexttoken(); + findbraket(TSWITCH, TSWEND); + + if (DEBUG) { outsc("** in SWITCH SWEND found at "); outnumber(here); outcr(); } + + if (er != 0) return; + } + /* a true case */ + if (token == TCASE) { + +/* more sophisticated, case can have an argument list */ + nexttoken(); + parsearguments(); + + if (DEBUG) { outsc("** in CASE found "); outnumber(args); outsc(" arguments"); outcr(); } + + if (er != 0) return; + if (args == 0) { + error(TCASE); + return; + } + while (args > 0) { + if (pop() == r) match=1; + args--; + } + + if (match) { + return; + } + } + nexttoken(); + } + +/* return to the original location and continue if no case is found */ + poplocation(); +} + +/* a nacked case statement always seeks the end of the switch */ +void xcase() { + while (token != EOL) { + nexttoken(); + if (token == TSWEND) break; +/* broken if switch is nested deeper then once, need the braket mechanism here */ +/* + if (token == TSWITCH) { + nexttoken(); + findbraket(TSWITCH, TSWEND); + } +*/ + } +} +#endif + + +/* + * statement processes an entire basic statement until the end + * of the line. + * + * The statement loop is a bit odd and requires some explanation. + * A statement function called in the central switch here must either + * call nexttoken as its last action to feed the loop with a new token + * and then break or it must return which means that the rest of the + * line is ignored. A function that doesn't call nexttoken and just + * breaks causes an infinite loop. + * + * statement is called once in interactive mode and terminates + * at end of a line. + */ +void statement(){ + if (DEBUG) bdebug("statement \n"); + while (token != EOL) { +#ifdef HASSTEFANSEXT +/* debug level 1 happens only in the statement loop */ + if (debuglevel == 1) { debugtoken(); outcr(); } +#endif + switch(token){ + case ':': + case LINENUMBER: + nexttoken(); + break; +/* Palo Alto BASIC language set + BREAK */ + case TPRINT: + xprint(); + break; + case TLET: + nexttoken(); + if ((token != ARRAYVAR) && (token != STRINGVAR) && (token != VARIABLE)) { + error(EUNKNOWN); + break; + } + case STRINGVAR: + case ARRAYVAR: + case VARIABLE: + assignment(); + break; + case TINPUT: + xinput(); + break; + case TRETURN: + xreturn(); + break; + case TGOSUB: + case TGOTO: + xgoto(); + break; + case TIF: + xif(); + break; + case TFOR: + xfor(); + break; + case TNEXT: + xnext(); + break; + case TBREAK: + xbreak(); + break; + case TSTOP: + case TEND: /* return here because new input is needed, end as a block end is handles elsewhere */ + *ibuffer=0; /* clear ibuffer - this is a hack */ + st=SINT; /* switch to interactive mode */ + eflush(); /* if there is an EEPROM dummy, flush it here (protects flash storage!) */ + ofileclose(); + return; + case TLIST: + xlist(); + break; + case TNEW: /* return here because new input is needed */ + xnew(); + return; + case TCONT: /* cont behaves differently in interactive and in run mode */ + if (st==SRUN || st==SERUN) { + xcont(); + break; + } /* no break here, because interactively CONT=RUN minus CLR */ + case TRUN: + xrun(); + return; + case TREM: + xrem(); + break; +/* Apple 1 language set */ +#ifdef HASAPPLE1 + case TDIM: + xdim(); + break; + case TCLR: + xclr(); + break; + case TTAB: + xtab(); + break; + case TPOKE: + xpoke(); + break; +#endif +/* Stefan's tinybasic additions */ + case TSAVE: + xsave(); + break; + case TLOAD: + xload(0); + if (st == SINT) return; /* interactive load doesn't like break as the ibuffer is messed up; */ + else break; +#ifdef HASSTEFANSEXT + case TDUMP: + xdump(); + break; + case TGET: + xget(); + break; + case TPUT: + xput(); + break; + case TSET: + xset(); + break; + case TNETSTAT: + xnetstat(); + break; + case TCLS: + xc=od; +/* if we have a display it is the default for CLS */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + od=ODSP; +#endif + outch(12); + od=xc; + nexttoken(); + break; + case TLOCATE: + xlocate(); + break; +/* low level functions as part of Stefan's extension */ + case TCALL: + xcall(); + break; +#endif +/* Arduino IO */ +#ifdef HASARDUINOIO + case TDWRITE: + xdwrite(); + break; + case TAWRITE: + xawrite(); + break; + case TPINM: + xpinm(); + break; + case TDELAY: + xdelay(); + break; +#ifdef HASTONE + case TTONE: + xtone(); + break; +#endif +#ifdef HASPULSE + case TPULSE: + xpulse(); + break; +#endif +#endif +/* BASIC DOS function */ +#ifdef HASFILEIO + case TCATALOG: + xcatalog(); + break; + case TDELETE: + xdelete(); + break; + case TOPEN: + xopen(); + break; + case TCLOSE: + xclose(); + break; + case TFDISK: + xfdisk(); + break; +#endif +/* graphics */ +#ifdef HASGRAPH + case TCOLOR: + xcolor(); + break; + case TPLOT: + xplot(); + break; + case TLINE: + xline(); + break; + case TRECT: + xrect(); + break; + case TCIRCLE: + xcircle(); + break; + case TFRECT: + xfrect(); + break; + case TFCIRCLE: + xfcircle(); + break; +#endif +#ifdef HASDARTMOUTH + case TDATA: + xdata(); + break; + case TREAD: + xread(); + break; + case TRESTORE: + xrestore(); + break; + case TDEF: + xdef(); + break; + case TON: + xon(); + break; +#endif +#ifdef HASSTEFANSEXT + case TELSE: + xelse(); + break; +#endif +#ifdef HASDARKARTS + case TEVAL: + xeval(); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + break; +#endif +#ifdef HASIOT + case TSLEEP: + xsleep(); + break; + case TWIRE: + xwire(); + break; +#endif +#ifdef HASTIMER + case TAFTER: + case TEVERY: + xtimer(); + break; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + break; +#endif +#ifdef HASSTRUCT + case TWHILE: + xwhile(); + break; + case TWEND: + xwend(); + break; + case TREPEAT: + xrepeat(); + break; + case TUNTIL: + xuntil(); + break; + case TSWITCH: + xswitch(); + break; + case TCASE: + xcase(); + break; + case TSWEND: + case TDO: + case TDEND: + nexttoken(); + break; +#endif + default: +/* strict syntax checking */ + error(EUNKNOWN); + return; + } + + +/* + * after each statement we check on a break character + * on an Arduino entering "#" at runtime stops the program + * for POSIXNONBLOCKING we do this in the background loop + * to avoid slowing down + */ +#if defined(BREAKCHAR) +#ifndef POSIXNONBLOCKING + if (checkch() == BREAKCHAR) { + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#else + if (breakcondition) { + breakcondition=0; + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#endif +#endif + +/* and after each statement, check the break pin */ +#if defined(BREAKPIN) && ( defined(ARDUINO) || defined(RASPPI) ) + if (digitalRead(BREAKPIN) == 0) { + st=SINT; + return; + }; +#endif + +/* and then there is also signal handling on some platforms */ +#if defined(POSIXSIGNALS) + if (breaksignal) { + st=SINT; + breaksignal=0; + serialflush(); + outcr(); + return; + } +#endif + +/* yield after each statement which is a 10-100 microsecond cycle + on Arduinos and the like, all background tasks are handled in byield */ + byield(); + +/* if error handling is compiled into the code, errors can be trapped here */ +#ifdef HASERRORHANDLING + if (er) { + if (st != SINT) { + erh=er; + er=0; + switch(berrorh.type) { + case TCONT: + while(!termsymbol()) nexttoken(); + break; + case TGOTO: + findline(berrorh.linenumber); + berrorh.type=0; + berrorh.linenumber=0; + if (er) return; + break; + case 0: + return; + default: + nexttoken(); + } + } else + return; + } +#else +/* when an error is encountered the statement loop is ended */ + if (er) return; +#endif + +/* + * if we run error free, interrupts and times can be processed + * + * We can savely interrupt and return only if here points either to + * a termsymbol : or LINENUMBER. NEXT is a special case. We need to + * catch this here because empty FOR loops never even have a termsymbol + * a : is swallowed after FOR. + * + */ +#ifdef HASTIMER + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* after is always processed before every */ + if (after_timer.enabled) { + if (millis() > after_timer.last + after_timer.interval) { + after_timer.enabled=0; + if (after_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + } + findline(after_timer.linenumber); + if (er) return; + } + } +/* periodic events */ + if (every_timer.enabled ) { + if (millis() > every_timer.last + every_timer.interval) { + every_timer.last=millis(); + if (every_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + if (er != 0) return; + } + findline(every_timer.linenumber); + if (er != 0) return; + } + } + } +#endif + +/* the branch code for interrupts, we round robin through the event list */ +#ifdef HASEVENTS + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* interrupts */ + if (events_enabled) { + for (ax=0; ax1 sets an input timeout in ms. In both cases INPUT &4 does not wait for a line feed. SET 7,0 resets block mode. + +SET 8,baud will set the baudrate of the secondary serial port and resets the port. Default is 9600. + +SET 9,n will set the radio signal strength. n is between 0 and 3. 3 is maximal signal strength. + +SET 10,1 sets the display update to page mode. In this mode the display does not display text or graphics until am ETX (ASCII 3) is sent. + +SET 11,1 sets the TAB command to Microsoft mode. In this mode the TAB position is the absolute character count and not a relative postion. SET 11,0 resets the behaviout. + +SET 12,0 sets the lower bound of all arrays to 0. This means that arrays with 8 elements DIMed with DIM A(8) go from 0 to 7 instead of 1 to 8. SET 12, 1 resets the value. This command does not change the array or anything in memory. It merely adds an offset. Any positive value can be used as an argument. + +SET 13, 1 sets the keypad to repeat mode. This setting is only used in analog keypads of LCD shields. These keypads normally block on key press until the key is released. This makes GET a semi blocking function. With SET 13, 1 the GET command does not block. It directly returns the pressed key and does not wait for key release. SET 13, 0 resets to blocking mode. + +More SET parameter will be implemented in the future. + +### USR + +USR calls a low level function, passes one value to it and returns the value. Typically USR would be used like + +A=USR(function, parameter) + +USR(0,x) returns an interpreter parameter or capability. The program can find out which platform it is running on. Please look at examples/00tutorial/hinv.bas for a list of the parameters and return values. + +Function numbers 1 to 31 are assigned to the I/O streams. Currently only USR(f, 0) is implemented for all I/O streams. They output the status of the stream. + +Function numbers 32 and above can be used to implement individual commands. See below for more information. + +### CALL + +Currently only CALL 0 is implemented. Call 0 flushes all buffers. On POSIX systems it ends the interpreter and returns to the OS. On Arduino AVR and ESP the microcontroller kernel is restarted. + +CALL parameters 0 to 31 are reserved. Values from 32 on can be used for implementing own commands. See below for more information. + +### SLEEP + +SLEEP n enters sleep mode. This is only implemented on ESPs and SAMD right now. n is the time in milliseconds. For ESP8266 the wiring for sleep mode has to be right. ESP32 can awake from SLEEP without additional wiring. ESPs restart after wakeup. An autorun program is needed for this. Once the restart happens, the program starts from the beginning. Reentry has to be handled in the program. On Arduino SAMD the interpreter uses the low power library. The program resumes after the sleep command. Sleep is experimental right now. + +### Stopping programs + +There are two mechanism implemented to stop programs. One listens to the default input stream, in general this is either default serial or the keyboard. The other monitors a pin. + +If BREAKCHAR is defined in the BASIC code, this character will stop the program if it is encountered in the input stream. It has to be found as a first character. Default BREAKCHAR is '#'. BREAKCHAR only works on Arduino implementations with keyboard and serial I/O. Posix systems cannot use BREAKCHAR as I/O is blocking on them. + +If BREAKPIN is defined, the interpreter will stop once this pin is pulled to low. By default, BREAKPIN is not defined, i.e. there is no BREAKPIN. This mechanism is for use cases where using BREAKCHAR is not practical. One can implement a separate stop button with it. + +If HASSIGNALS is defined in hardware-posix.h then Ctrl-C will stop a running program. This does not work on Arduino because there are no POSIX signals on the platform. This feature is alpha and currently only briefly tested on Mac and Windows. + +### Extending basic + +The BASIC interpreter has several mechanisms to extend the language set without having to work directly with the interpreter data structures. + +USR(N, X) with N greater than 32 will call the function usrfunction(). It gets both arguments as values and can return one number as reault. + +CALL N with N greater than 32 will call the function usrcall(). It gets N as an argument. + +@U is a special variable. Reading it will call getusrvar(), writing it will call setusrvar(). + +@U() is a special array. Reading it will call getusrarray(), writing it will call setusrarray(). In both cases the index is the array is passed on as argument. + +@U$ is the user string. It is read only. Reading it will trigger the function makeusrarray(). It can pass an set of characters to BASIC. + + + + + + diff --git a/data/Basic1/IotBasic/basic.h b/data/Basic1/IotBasic/basic.h new file mode 100644 index 0000000000000000000000000000000000000000..e4fac5371a4e7fc5dd45f35fa9f92d5d2acae365 --- /dev/null +++ b/data/Basic1/IotBasic/basic.h @@ -0,0 +1,1526 @@ +/* + * + * $Id: basic.h,v 1.13 2023/07/16 14:17:08 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * Playing around with frugal programming. See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * basic.h are the core defintions and function protypes + * + */ + +/* + * if the PROGMEM macro is define we compile on the Arduino IDE + * we undef all hardware settings otherwise a little odd + */ +#ifdef ARDUINO_ARCH_MBED +#define PROGMEM +#endif + +#ifdef PROGMEM +#define ARDUINOPROGMEM +#else +#undef ARDUINO +#undef ARDUINOSD +#undef ARDUINORF24 +#undef ARDUINORTC +#undef ARDUINOEEPROM +#undef ARDUINOEEPROMI2C +#undef ARDUINOWIRE +#endif + +/* + * MSDOS, Mac, Linux and Windows + */ +#ifndef ARDUINO +typedef unsigned char uint8_t; +#define PROGMEM +#include +#include +#ifdef HASFLOAT +#include +#include +#endif +#include +#include +#include +#ifndef MSDOS +#include +#include +#else +#include +#include +#endif +#ifdef MINGW +#include +#endif +#endif + + +#if defined(ARDUINO_ARCH_AVR) +/* the small memory model with shallow stacks and small buffers */ +#define BUFSIZE 80 +#define STACKSIZE 15 +#define GOSUBDEPTH 4 +#define FORDEPTH 4 +#define LINECACHESIZE 4 +#else +/* the for larger microcontrollers */ +#ifdef ARDUINO +#define BUFSIZE 128 +#define STACKSIZE 64 +#define GOSUBDEPTH 8 +#define FORDEPTH 8 +#define LINECACHESIZE 16 +#else +/* for real computers */ +#define BUFSIZE 256 +#define STACKSIZE 256 +#define GOSUBDEPTH 64 +#define FORDEPTH 64 +#define LINECACHESIZE 64 +#endif +#endif + +/* on the real small systems we remove the linecache and set a fixed memory size*/ +#ifdef ARDUINO_AVR_DUEMILANOVE +#undef LINECACHESIZE +#if MEMSIZE == 0 +#define MEMSIZE 512 +#endif +#endif + +/* more duffers and vars */ +#define SBUFSIZE 32 +#define VARSIZE 26 +/* default sizes of arrays and strings if they are not DIMed */ +#define ARRAYSIZEDEF 10 +#define STRSIZEDEF 32 + +/* + * the time intervall in ms needed for + * ESP8266 yields, network client loops + * and other timing related functions + */ +#define LONGYIELDINTERVAL 1000 +#define YIELDINTERVAL 32 +#define YIELDTIME 2 + +/* the default EEPROM dummy size */ +#define EEPROMSIZE 1024 + +/* after run behaviour on POSIX systems, 1 to terminate if started + on the command line with a file argument, 0 to stay active and + show a BASIC prompt*/ +#define TERMINATEAFTERRUN 1 + +/* + * The tokens for the BASIC keywords + * + * All single character operators are their own tokens + * ASCII values above 0x7f are used for tokens of keywords. + * EOL is a token + */ +#define EOL 0 +#define NUMBER -127 +#define LINENUMBER -126 +#define STRING -125 +#define VARIABLE -124 +#define STRINGVAR -123 +#define ARRAYVAR -122 +/* multi character tokens - BASEKEYWORD (3) */ +#define GREATEREQUAL -121 +#define LESSEREQUAL -120 +#define NOTEQUAL -119 +/* this is the Palo Alto Language Set (19) */ +#define TPRINT -118 +#define TLET -117 +#define TINPUT -116 +#define TGOTO -115 +#define TGOSUB -114 +#define TRETURN -113 +#define TIF -112 +#define TFOR -111 +#define TTO -110 +#define TSTEP -109 +#define TNEXT -108 +#define TSTOP -107 +#define TLIST -106 +#define TNEW -105 +#define TRUN -104 +#define TABS -103 +#define TRND -102 +#define TSIZE -101 +#define TREM -100 +/* this is the Apple 1 language set in addition to Palo Alto (14) */ +#define TNOT -99 +#define TAND -98 +#define TOR -97 +#define TLEN -96 +#define TSGN -95 +#define TPEEK -94 +#define TDIM -93 +#define TCLR -92 +#define THIMEM -91 +#define TTAB -90 +#define TTHEN -89 +#define TEND -88 +#define TPOKE -87 +/* Stefan's tinybasic additions (14) */ +#define TCONT -86 +#define TSQR -85 +#define TPOW -84 +#define TMAP -83 +#define TDUMP -82 +#define TBREAK -81 +#define TSAVE -80 +#define TLOAD -79 +#define TGET -78 +#define TPUT -77 +#define TSET -76 +#define TCLS -75 +#define TLOCATE -74 +#define TELSE -73 +/* Arduino functions (10) */ +#define TPINM -72 +#define TDWRITE -71 +#define TDREAD -70 +#define TAWRITE -69 +#define TAREAD -68 +#define TDELAY -67 +#define TMILLIS -66 +#define TTONE -65 +#define TPULSE -64 +#define TAZERO -63 +#define TLED -62 +/* the DOS functions (5) */ +#define TCATALOG -61 +#define TDELETE -60 +#define TOPEN -59 +#define TCLOSE -58 +#define TFDISK -57 +/* low level access of internal routines (2) */ +#define TUSR -56 +#define TCALL -55 +/* mathematical functions (7) */ +#define TSIN -54 +#define TCOS -53 +#define TTAN -52 +#define TATAN -51 +#define TLOG -50 +#define TEXP -49 +#define TINT -48 +/* graphics - experimental - rudimentary (7) */ +#define TCOLOR -47 +#define TPLOT -46 +#define TLINE -45 +#define TCIRCLE -44 +#define TRECT -43 +#define TFCIRCLE -42 +#define TFRECT -41 +/* the Dartmouth extensions (6) */ +#define TDATA -40 +#define TREAD -39 +#define TRESTORE -38 +#define TDEF -37 +#define TFN -36 +#define TON -35 +/* darkarts (3) */ +#define TMALLOC -34 +#define TFIND -33 +#define TEVAL -32 +/* iot extensions (9) */ +#define TERROR -31 +#define TAVAIL -30 +#define TSTR -29 +#define TINSTR -28 +#define TVAL -27 +#define TNETSTAT -26 +#define TSENSOR -25 +#define TWIRE -24 +#define TSLEEP -23 +/* events and interrupts */ +#define TAFTER -22 +#define TEVERY -21 +#define TEVENT -20 +/* experimental structured commands, currently partially implemented */ +#define TWHILE -19 +#define TWEND -18 +#define TREPEAT -17 +#define TUNTIL -16 +#define TSWITCH -15 +#define TCASE -14 +#define TSWEND -13 +#define TDO -12 +#define TDEND -11 +/* these are multibyte token extension, currently unused */ +/* using them would allow over 1000 BASIC keywords */ +#define TEXT1 -3 +/* end of tokens */ +/* constants used for some obscure purposes */ +#define TBUFFER -2 +/* UNKNOWN is not used in the current code, the + * lexer tokenizes everything blindly. There is a UNKNOWN hook + * in statement for a grammar aware lexer */ +#define UNKNOWN -1 + +/* extension tokens can be in the range from -128 to -255 + * one needs to set HASLONGTOKENS + */ +#undef HASLONGTOKEN +#define TTOKEN1 -128 + + +/* the number of keywords, and the base index of the keywords + * the number is irrelevant but BASEKEYWORD is used */ +#define NKEYWORDS 3+19+13+14+11+5+2+7+7+6+12+3+9 +#define BASEKEYWORD -121 + +/* + * Interpreter states + * SRUN means running from a programm + * SINT means interactive mode + * SERUN means running directly from EEPROM + * (enum would be the right way of doing this.) + * BREAKCHAR is the character stopping the program on Ardunios + * BREAKPIN can be set, it is a pin that needs to go to low to stop a BASIC program + * This should be done in hardware*.h + * BREAKSIGNAL can also be set, should be done in hardware*.h + */ +#define SINT 0 +#define SRUN 1 +#define SERUN 2 +#define BREAKCHAR '#' + +/* + * Input and output channels + */ +#define OSERIAL 1 +#define ODSP 2 +#define OPRT 4 +#define OWIRE 7 +#define ORADIO 8 +#define OMQTT 9 +#define OFILE 16 + +#define ISERIAL 1 +#define IKEYBOARD 2 +#define ISERIAL1 4 +#define IWIRE 7 +#define IRADIO 8 +#define IMQTT 9 +#define IFILE 16 + +/* + * All BASIC keywords for the tokens + */ +const char sge[] PROGMEM = "=>"; +const char sle[] PROGMEM = "<="; +const char sne[] PROGMEM = "<>"; +/* Palo Alto language set */ +const char sprint[] PROGMEM = "PRINT"; +const char slet[] PROGMEM = "LET"; +const char sinput[] PROGMEM = "INPUT"; +const char sgoto[] PROGMEM = "GOTO"; +const char sgosub[] PROGMEM = "GOSUB"; +const char sreturn[] PROGMEM = "RETURN"; +const char sif[] PROGMEM = "IF"; +const char sfor[] PROGMEM = "FOR"; +const char sto[] PROGMEM = "TO"; +const char sstep[] PROGMEM = "STEP"; +const char snext[] PROGMEM = "NEXT"; +const char sstop[] PROGMEM = "STOP"; +const char slist[] PROGMEM = "LIST"; +const char snew[] PROGMEM = "NEW"; +const char srun[] PROGMEM = "RUN"; +const char sabs[] PROGMEM = "ABS"; +const char srnd[] PROGMEM = "RND"; +const char ssize[] PROGMEM = "SIZE"; +const char srem[] PROGMEM = "REM"; +/* Apple 1 language set */ +#ifdef HASAPPLE1 +const char snot[] PROGMEM = "NOT"; +const char sand[] PROGMEM = "AND"; +const char sor[] PROGMEM = "OR"; +const char slen[] PROGMEM = "LEN"; +const char ssgn[] PROGMEM = "SGN"; +const char speek[] PROGMEM = "PEEK"; +const char sdim[] PROGMEM = "DIM"; +const char sclr[] PROGMEM = "CLR"; +const char shimem[] PROGMEM = "HIMEM"; +const char stab[] PROGMEM = "TAB"; +const char sthen[] PROGMEM = "THEN"; +const char sbend[] PROGMEM = "END"; +const char spoke[] PROGMEM = "POKE"; +#endif +/* Stefan's basic additions */ +#ifdef HASSTEFANSEXT +const char scont[] PROGMEM = "CONT"; +const char ssqr[] PROGMEM = "SQR"; +const char spow[] PROGMEM = "POW"; +const char smap[] PROGMEM = "MAP"; +const char sdump[] PROGMEM = "DUMP"; +const char sbreak[] PROGMEM = "BREAK"; +#endif +/* LOAD and SAVE is always there */ +const char ssave[] PROGMEM = "SAVE"; +const char sload[] PROGMEM = "LOAD"; +#ifdef HASSTEFANSEXT +const char sget[] PROGMEM = "GET"; +const char sput[] PROGMEM = "PUT"; +const char sset[] PROGMEM = "SET"; +const char scls[] PROGMEM = "CLS"; +const char slocate[] PROGMEM = "LOCATE"; +const char selse[] PROGMEM = "ELSE"; +#endif +/* Arduino functions */ +#ifdef HASARDUINOIO +const char spinm[] PROGMEM = "PINM"; +const char sdwrite[] PROGMEM = "DWRITE"; +const char sdread[] PROGMEM = "DREAD"; +const char sawrite[] PROGMEM = "AWRITE"; +const char saread[] PROGMEM = "AREAD"; +const char sdelay[] PROGMEM = "DELAY"; +const char smillis[] PROGMEM = "MILLIS"; +const char sazero[] PROGMEM = "AZERO"; +const char sled[] PROGMEM = "LED"; +#endif +#ifdef HASTONE +const char stone[] PROGMEM = "PLAY"; +#endif +#ifdef HASPULSE +const char spulse[] PROGMEM = "PULSE"; +#endif +/* DOS functions */ +#ifdef HASFILEIO +const char scatalog[] PROGMEM = "CATALOG"; +const char sdelete[] PROGMEM = "DELETE"; +const char sfopen[] PROGMEM = "OPEN"; +const char sfclose[] PROGMEM = "CLOSE"; +const char sfdisk[] PROGMEM = "FDISK"; +#endif +/* low level access functions */ +#ifdef HASSTEFANSEXT +const char susr[] PROGMEM = "USR"; +const char scall[] PROGMEM = "CALL"; +#endif +/* mathematics */ +#ifdef HASFLOAT +const char ssin[] PROGMEM = "SIN"; +const char scos[] PROGMEM = "COS"; +const char stan[] PROGMEM = "TAN"; +const char satan[] PROGMEM = "ATAN"; +const char slog[] PROGMEM = "LOG"; +const char sexp[] PROGMEM = "EXP"; +#endif +/* INT is always needed to make float/int programs compatible */ +const char sint[] PROGMEM = "INT"; +/* elemetars graphics */ +#ifdef HASGRAPH +const char scolor[] PROGMEM = "COLOR"; +const char splot[] PROGMEM = "PLOT"; +const char sline[] PROGMEM = "LINE"; +const char scircle[] PROGMEM = "CIRCLE"; +const char srect[] PROGMEM = "RECT"; +const char sfcircle[] PROGMEM = "FCIRCLE"; +const char sfrect[] PROGMEM = "FRECT"; +#endif +/* Dartmouth BASIC extensions */ +#ifdef HASDARTMOUTH +const char sdata[] PROGMEM = "DATA"; +const char sread[] PROGMEM = "READ"; +const char srestore[] PROGMEM = "RESTORE"; +const char sdef[] PROGMEM = "DEF"; +const char sfn[] PROGMEM = "FN"; +const char son[] PROGMEM = "ON"; +#endif +/* The Darkarts commands unthinkable in Dartmouth */ +#ifdef HASDARKARTS +const char smalloc[] PROGMEM = "MALLOC"; +const char sfind[] PROGMEM = "FIND"; +const char seval[] PROGMEM = "EVAL"; +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING +const char serror[] PROGMEM = "ERROR"; +#endif +/* iot extensions */ +#ifdef HASIOT +const char savail[] PROGMEM = "AVAIL"; +const char sstr[] PROGMEM = "STR"; +const char sinstr[] PROGMEM = "INSTR"; +const char sval[] PROGMEM = "VAL"; +const char snetstat[] PROGMEM = "NETSTAT"; +const char ssensor[] PROGMEM = "SENSOR"; +const char swire[] PROGMEM = "WIRE"; +const char ssleep[] PROGMEM = "SLEEP"; +#endif +/* events and interrupts */ +#ifdef HASTIMER +const char safter[] PROGMEM = "AFTER"; +const char severy[] PROGMEM = "EVERY"; +#endif +#ifdef HASEVENTS +const char sevent[] PROGMEM = "EVENT"; +#endif +#ifdef HASSTRUCT +const char swhile[] PROGMEM = "WHILE"; +const char swend[] PROGMEM = "WEND"; +const char srepeat[] PROGMEM = "REPEAT"; +const char suntil[] PROGMEM = "UNTIL"; +const char sswitch[] PROGMEM = "SWITCH"; +const char scase[] PROGMEM = "CASE"; +const char sswend[] PROGMEM = "SWEND"; +const char sdo[] PROGMEM = "DO"; +const char sdend[] PROGMEM = "DEND"; +#endif + + +/* zero terminated keyword storage */ +const char* const keyword[] PROGMEM = { + sge, sle, sne, sprint, slet, sinput, + sgoto, sgosub, sreturn, sif, sfor, sto, + sstep, snext, sstop, slist, snew, srun, + sabs, srnd, ssize, srem, +#ifdef HASAPPLE1 + snot, sand, sor, slen, ssgn, speek, sdim, + sclr, shimem, stab, sthen, + sbend, spoke, +#endif +#ifdef HASSTEFANSEXT + scont, ssqr, spow, smap, sdump, sbreak, +#endif + ssave, sload, +#ifdef HASSTEFANSEXT + sget, sput, sset, scls, slocate, selse, +#endif +#ifdef HASARDUINOIO + spinm, sdwrite, sdread, sawrite, saread, + sdelay, smillis, sazero, sled, +#endif +#ifdef HASTONE + stone, +#endif +#ifdef HASPULSE + spulse, +#endif +#ifdef HASFILEIO + scatalog, sdelete, sfopen, sfclose, sfdisk, +#endif +#ifdef HASSTEFANSEXT + susr, scall, +#endif +#ifdef HASFLOAT + ssin, scos, stan, satan, slog, sexp, +#endif + sint, +#ifdef HASGRAPH + scolor, splot, sline, scircle, srect, + sfcircle, sfrect, +#endif +#ifdef HASDARTMOUTH + sdata, sread, srestore, sdef, sfn, son, +#endif +#ifdef HASDARKARTS + smalloc, sfind, seval, +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING + serror, +#endif +#ifdef HASIOT + savail, sstr, sinstr, sval, + snetstat, ssensor, swire, ssleep, +#endif +#ifdef HASTIMER + safter, severy, +#endif +#ifdef HASEVENTS + sevent, +#endif +#ifdef HASSTRUCT + swhile, swend, srepeat, suntil, sswitch, scase, sswend, + sdo, sdend, +#endif + 0 +}; + +/* the zero terminated token dictonary needed for scalability */ +const signed char tokens[] PROGMEM = { + GREATEREQUAL, LESSEREQUAL, NOTEQUAL, TPRINT, TLET, + TINPUT, TGOTO, TGOSUB, TRETURN, TIF, TFOR, TTO, TSTEP, + TNEXT, TSTOP, TLIST, TNEW, TRUN, TABS, TRND, TSIZE, TREM, +#ifdef HASAPPLE1 + TNOT, TAND, TOR, TLEN, TSGN, TPEEK, TDIM, TCLR, + THIMEM, TTAB, TTHEN, TEND, TPOKE, +#endif +#ifdef HASSTEFANSEXT + TCONT, TSQR, TPOW, TMAP, TDUMP, TBREAK, +#endif + TSAVE, TLOAD, +#ifdef HASSTEFANSEXT + TGET, TPUT, TSET, TCLS, TLOCATE, TELSE, +#endif +#ifdef HASARDUINOIO + TPINM, TDWRITE, TDREAD, TAWRITE, TAREAD, TDELAY, TMILLIS, + TAZERO, TLED, +#endif +#ifdef HASTONE + TTONE, +#endif +#ifdef HASPULSE + TPULSE, +#endif +#ifdef HASFILEIO + TCATALOG, TDELETE, TOPEN, TCLOSE, TFDISK, +#endif +#ifdef HASSTEFANSEXT + TUSR, TCALL, +#endif +#ifdef HASFLOAT + TSIN, TCOS, TTAN, TATAN, TLOG, TEXP, +#endif + TINT, +#ifdef HASGRAPH + TCOLOR, TPLOT, TLINE, TCIRCLE, TRECT, + TFCIRCLE, TFRECT, +#endif +#ifdef HASDARTMOUTH + TDATA, TREAD, TRESTORE, TDEF, TFN, TON, +#endif +#ifdef HASDARKARTS + TMALLOC, TFIND, TEVAL, +#endif +#ifdef HASERRORHANDLING + TERROR, +#endif +#ifdef HASIOT + TAVAIL, TSTR, TINSTR, TVAL, TNETSTAT, + TSENSOR, TWIRE, TSLEEP, +#endif +#ifdef HASTIMER + TAFTER, TEVERY, +#endif +#ifdef HASEVENTS + TEVENT, +#endif +#ifdef HASSTRUCT + TWHILE, TWEND, TREPEAT, TUNTIL, TSWITCH, TCASE, TSWEND, + TDO, TDEND, +#endif + 0 +}; + +/* + * the message catalog + */ +#define MFILE 0 +#define MPROMPT 1 +#define MGREET 2 +#define MLINE 3 +#define MNUMBER 4 +#define MVARIABLE 5 +#define MARRAY 6 +#define MSTRING 7 +#define MSTRINGVAR 8 +#define EGENERAL 9 +#define EUNKNOWN 10 +#define ENUMBER 11 +#define EDIVIDE 12 +#define ELINE 13 +#define EOUTOFMEMORY 14 +#define ESTACK 15 +#define EORANGE 16 +#define ESTRING 17 +#define EVARIABLE 18 +#define ELOOP 19 +#define EFILE 20 +#define EFUN 21 +#define EARGS 22 +#define EEEPROM 23 +#define ESDCARD 24 + +const char mfile[] PROGMEM = "file.bas"; +const char mprompt[] PROGMEM = "> "; +const char mgreet[] PROGMEM = "Stefan's Basic 1.4"; +const char mline[] PROGMEM = "LINE"; +const char mnumber[] PROGMEM = "NUMBER"; +const char mvariable[] PROGMEM = "VARIABLE"; +const char marray[] PROGMEM = "ARRAY"; +const char mstring[] PROGMEM = "STRING"; +const char mstringv[] PROGMEM = "STRINGVAR"; +const char egeneral[] PROGMEM = "Error"; +#ifdef HASERRORMSG +const char eunknown[] PROGMEM = "Syntax"; +const char enumber[] PROGMEM = "Number"; +const char edivide[] PROGMEM = "Div by 0"; +const char eline[] PROGMEM = "Unknown Line"; +const char emem[] PROGMEM = "Memory"; +const char estack[] PROGMEM = "Stack"; +const char erange[] PROGMEM = "Range"; +const char estring[] PROGMEM = "String"; +const char evariable[] PROGMEM = "Variable"; +const char eloop[] PROGMEM = "Loop"; +const char efile[] PROGMEM = "File"; +const char efun[] PROGMEM = "Function"; +const char eargs[] PROGMEM = "Args"; +const char eeeprom[] PROGMEM = "EEPROM"; +const char esdcard[] PROGMEM = "SD card"; +#endif + +const char* const message[] PROGMEM = { + mfile, mprompt, mgreet, + mline, mnumber, mvariable, marray, + mstring, mstringv, + egeneral +#ifdef HASERRORMSG + , eunknown, enumber, edivide, eline, + emem, estack, erange, + estring, evariable, eloop, efile, efun, eargs, + eeeprom, esdcard +#endif +}; + +/* + * code for variable numbers and addresses sizes + * the original code was 16 bit but can be extended here + * to arbitrary types + * + * number_t is the type for numerical work - either float or int + * wnumber_t is the type containing the largest printable integer, + * for float keep this int on 32 bit and long on 8 bit unless you + * want to use very long integers, like 64 or 128 bit types. + * address_t is an unsigned type adddressing memory, default 16bit + * mem_t is a SIGNED 8bit character type. + * index_t is a SIGNED minimum 16 bit integer type + * + * works with the tacit assumption that + * sizeof(number_t) >= sizeof(address_t) + * and that the entire memory is smaller than the positive + * part of number type (!!) + * + * we assume that float >= 4 bytes in the following + * + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: the index size of strings either + * 1 byte or 2 bytes - no other values supported + */ +#ifdef HASFLOAT +typedef float number_t; +const number_t maxnum=16777216; +typedef long wnumber_t; +#else +typedef int number_t; +typedef int wnumber_t; +const number_t maxnum=(number_t)~((number_t)1<<(sizeof(number_t)*8-1)); +#endif +typedef unsigned short address_t; /* this type addresses memory */ +const int numsize=sizeof(number_t); +const int addrsize=sizeof(address_t); +const int eheadersize=sizeof(address_t)+1; +const int strindexsize=2; /* default in the meantime, strings up to unsigned 16 bit length */ +const address_t maxaddr=(address_t)(~0); +typedef signed char mem_t; /* a signed 8 bit type for the memory */ +typedef int index_t; /* this type counts at least 16 bit */ +#ifndef HASLONGTOKENS +typedef signed char token_t; /* the type of tokens, normally mem_t with a maximum of 127 commands and data types */ +#else +typedef short token_t; /* token type extension, allows an extra of 127 commands and symbols */ +#endif + +/* this type maps numbers to bytes */ +typedef struct {mem_t l; mem_t h;} twobytes_t; +typedef union { number_t i; address_t a; twobytes_t b; mem_t c[sizeof(number_t)]; } accu_t; + +/* the memreader function type */ +typedef mem_t (*memreader_t)(address_t); + +/* + * system type identifiers + */ + +#define SYSTYPE_UNKNOWN 0 +#define SYSTYPE_AVR 1 +#define SYSTYPE_ESP8266 2 +#define SYSTYPE_ESP32 3 +#define SYSTYPE_RP2040 4 +#define SYSTYPE_SAM 5 +#define SYSTYPE_XMC 6 +#define SYSTYPE_SMT32 7 +#define SYSTYPE_NRENESA 8 +#define SYSTYPE_POSIX 32 +#define SYSTYPE_MSDOS 33 +#define SYSTYPE_MINGW 34 +#define SYSTYPE_RASPPI 35 + +/* + * The basic interpreter is implemented as a stack machine + * with global variable for the interpreter state, the memory + * and the arithmetic during run time. + */ + +/* the stack, all BASIC arithmetic is done here */ +number_t stack[STACKSIZE]; +address_t sp=0; + +/* a small buffer to process string arguments, mostly used for Arduino PROGMEM */ +char sbuffer[SBUFSIZE]; + +/* the input buffer, the lexer can tokenize this and run from it, bi is an index to this. + bi must be global as it is the program cursor in interactive mode */ +char ibuffer[BUFSIZE] = "\0"; +char *bi; + +/* a static array of variables A-Z for the small systems that have no heap */ +number_t vars[VARSIZE]; + +/* the BASIC working memory, either malloced or allocated as a global array */ +#if MEMSIZE != 0 +mem_t mem[MEMSIZE]; +#else +mem_t* mem; +#endif +address_t himem, memsize; + +/* the for stack - remembers the variable, indices, and optionally a type for stuctured BASIC */ +struct forstackitem {mem_t varx; mem_t vary; address_t here; number_t to; number_t step; +#ifdef HASSTRUCT +mem_t type; +#endif +} forstack[FORDEPTH]; +index_t forsp = 0; + +/* the GOSUB stack remembers an address to jump to */ +address_t gosubstack[GOSUBDEPTH]; +index_t gosubsp = 0; + +/* this variable stores the location in pushlocation() and poplocation(), used to rewind the program cursor */ +address_t slocation; + +/* arithmetic accumulators - used by many statements, y may be obsolete in future*/ +number_t x, y; + +/* the names of a variable and small integer accumulator */ +mem_t xc, yc; + +/* an address accumulator, used a lot in string operations */ +address_t ax; + +/* z is another accumulator used to convert numbers and addressed to bytes and vice versa */ +/* this union is used to store larger objects into byte oriented memory */ +accu_t z; + +/* string index registers */ +char *ir, *ir2; + +/* the active token */ +token_t token; + +/* the curent error, can be a token, hance token type */ +token_t er; + +/* a trapable error */ +mem_t ert; + +/* the interpreter state, interactive, run or run from EEPROM */ +mem_t st; + +/* the current program location or "cursor" */ +address_t here; + +/* the topmost byte of a program in memory, beginning of free BASIC RAM */ +address_t top; + +/* the number of variables on the heap */ +address_t nvars = 0; + +/* used to format output with # */ +mem_t form = 0; + +/* counts the outputed characters on streams 0-3, used to emulate a real tab */ +#ifdef HASMSTAB +mem_t charcount[3]; /* devices 1-4 support tabing */ +mem_t reltab = 0; +#endif + +/* the lower limit of the array is one by default, can be a variable */ +#ifdef HASARRAYLIMIT +address_t arraylimit = 1; +#else +const address_t arraylimit = 1; +#endif + +/* the number of arguments parsed from a command */ +mem_t args; + +/* the random number seed, this is unsigned hence address_t */ +#ifndef HASFLOAT +address_t rd; +#else +unsigned long rd; +#endif + +/* output and input channels, used to direct output to various devices */ +mem_t id; +mem_t od; + +/* default IO - not constant, can be changed at runtime through a user call */ +mem_t idd = ISERIAL; +mem_t odd = OSERIAL; + +/* the runtime debuglevel */ +mem_t debuglevel = 0; + +/* DATA pointer, where is the current READ statement */ +#ifdef HASDARTMOUTH +address_t data = 0; +address_t datarc = 1; +#endif + +/* + * process command line arguments in the POSIX world + * bnointafterrun is a flag to remember if called as command + * line argument, in this case we don't return to interactive + */ +#ifndef ARDUINO +int bargc; +char** bargv; +mem_t bnointafterrun = 0; +#endif + +/* + * Yield counter, we count when we did yield the last time + * lastyield controlls the client loops of network functions + * like mqtt, scanned keyboard, and USB. + * + * lastlongyield controls longterm functions like DHCP lease + * renewal in Ethernet + * + * there variables are only needed if the platform has background + * tasks + */ +long lastyield=0; +long lastlongyield=0; + +/* formaters lastouttoken and spaceafterkeyword to make a nice LIST */ +mem_t lastouttoken; +mem_t spaceafterkeyword; +mem_t outliteral = 0; +mem_t lexliteral = 0; + +/* + * the cache for the heap search - helps the string code + * the last found object on the heap is remembered. This is needed + * because the string code sometime searches the heap twice during the + * same operation. + */ +#ifdef HASAPPLE1 +mem_t bfindc, bfindd, bfindt; +address_t bfinda, bfindz; +#endif + +/* + * a variable for some string operations + */ +int vlength; + +/* the timer code - very simple needs to to to a struct */ +/* timer type */ +typedef struct { + mem_t enabled; + unsigned long last; + unsigned long interval; + mem_t type; + address_t linenumber; +} btimer_t; + +#ifdef HASTIMER +btimer_t after_timer = {0, 0, 0, 0, 0}; +btimer_t every_timer = {0, 0, 0, 0, 0}; +#endif + +/* the event code */ +#ifdef HASEVENTS + +#define EVENTLISTSIZE 4 + +/* event type */ +typedef struct { + mem_t enabled; + mem_t pin; + mem_t mode; + mem_t type; + address_t linenumber; + mem_t active; +} bevent_t; + +/* the event list */ +int nevents = 0; +int ievent = 0; +static mem_t events_enabled = 1; +static volatile bevent_t eventlist[EVENTLISTSIZE]; + +/* the extension of the GOSUB stack */ +static mem_t gosubarg[GOSUBDEPTH]; + +/* handle the event list */ +mem_t addevent(mem_t, mem_t, mem_t, address_t); +void deleteevent(mem_t); +volatile bevent_t* findevent(mem_t); +mem_t eventindex(mem_t); +#endif + +#ifdef HASERRORHANDLING +/* the error handler type, very simple for now */ +typedef struct { + mem_t type; + address_t linenumber; +} berrorh_t; + +berrorh_t berrorh = {0 , 0}; +mem_t erh = 0; +#endif + +/* the string for real time clocks */ +char rtcstring[20] = { 0 }; + +/* the units pulse operates on, in microseconds*/ +short bpulseunit = 10; + +/* only needed for POSIXNONBLOCKING */ +mem_t breakcondition = 0; + +/* + * Function prototypes, ordered by layers + * HAL - hardware abstraction + * Layer 0 - memory and I/O + * Layer 1 - Program storage and control + * Layer 2 - Where stuff happens + */ + +/* + * HAL - see hardware-*.h + * This is the hardware abstraction layer of the BASIC + * interpreter + */ + +/* setup codes */ +void timeinit(); +void wiringbegin(); + +/* low level mem and hardware features */ +long freeRam(); +long freememorysize(); +void restartsystem(); +void activatesleep(long t); + +/* start the spi bus */ +void spibegin(); + +/* + * the hardware interface display driver functions, need to be + * implemented for the display driver to work + * dspupdate() only for display like Epapers + */ +void dspbegin(); +void dspprintchar(char, mem_t, mem_t); +void dspclear(); +void dspupdate(); + +/* keyboard code */ +void kbdbegin(); +int kbdstat(char); +char kbdavailable(); +char kbdread(); +char kbdcheckch(); + +/* graphics functions */ +void rgbcolor(int, int, int); +void vgacolor(short c); +void vgascale(int*, int*); +void plot(int, int); +void line(int, int, int, int); +void rect(int, int, int, int); +void frect(int, int, int, int); +void circle(int, int, int); +void fcircle(int, int, int); + +/* text output to a VGA display */ +void vgabegin(); +int vgastat(char); +void vgawrite(char); + +/* generic display code */ +void dspwrite(char); +void dspbegin(); +int dspstat(char); +char dspwaitonscroll(); +char dspactive(); +void dspsetupdatemode(char); +char dspgetupdatemode(); +void dspgraphupdate(); +void dspsetscrollmode(char, short); +void dspsetcursor(short, short); +void dspbufferclear(); +void dspscroll(mem_t, mem_t); +void dspreversescroll(mem_t); +void dspvt52(char *); + +/* real time clock */ +char* rtcmkstr(); +void rtcset(uint8_t, short); +short rtcget(short); + +/* network and mqtt functions */ +void netbegin(); +char netconnected(); +void mqttsetname(); +void mqttbegin(); +int mqttstat(char); +int mqttstate(); +void mqttsubscribe(char*); +void mqttsettopic(char*); +void mqttouts(char *, short); +void mqttins(char *, short); +char mqttinch(); + +/* low level EEPROM handling */ +void ebegin(); +void eflush(); +address_t elength(); +mem_t eread(address_t); +void eupdate(address_t, mem_t); + +/* arduino io functions */ +void aread(); +void dread(); +void awrite(address_t, address_t); +void dwrite(address_t, address_t); +void pinm(address_t, address_t); +void bmillis(); +void bpulsein(); +void xpulse(); +void bpulseout(short); +void btone(short); + +/* timing control for ESP and network */ +void byield(); +void bdelay(unsigned long); +void fastticker(); +void yieldfunction(); +void longyieldfunction(); + +/* the file interface */ +char* mkfilename(const char*); +const char* rmrootfsprefix(const char*); +void fsbegin(char); +int fsstat(char); +void filewrite(char); +char fileread(); +char ifileopen(const char*); +void ifileclose(); +char ofileopen(char*, const char*); +void ofileclose(); +int fileavailable(); +void rootopen(); +int rootnextfile(); +int rootisfile(); +const char* rootfilename(); +long rootfilesize(); +void rootfileclose(); +void rootclose(); +void removefile(char*); +void formatdisk(short); + +/* low level serial code */ +void picogetchar(char); +void picowrite(char); +void picobegin(unsigned long); +void picoins(char, short); +void serialbegin(); +int serialstat(char); +char serialread(); +void serialwrite(char); +short serialcheckch(); +short serialavailable(); +void serialflush(); +void consins(char*, short); +void prtbegin(); +int prtstat(char); +void prtset(int); +char prtopen(char *, int); +void prtclose(); +char prtread(); +void prtwrite(char); +short prtcheckch(); +short prtavailable(); + +/* generic wire access */ +void wirebegin(); +int wirestat(char); +void wireopen(char, char); +void wireins(char*, uint8_t); +void wireouts(char*, uint8_t); +short wireavailable(); +short wirereadbyte(short); +void wirewritebyte(short, short); + +/* RF24 radio input */ +int radiostat(char); +void radioset(int); +#ifdef ARDUINO +uint64_t pipeaddr(char*); +#else +long pipeaddr(char*); +#endif +void iradioopen(char*); +void oradioopen(char*); +void radioins(char*, short); +void radioouts(char* , short); +short radioavailable(); + +/* sensor control */ +void sensorbegin(); +number_t sensorread(short, short); + +/* SPI RAM code */ +address_t spirambegin(); +void spiramrawwrite(address_t, mem_t); +mem_t spiramrawread(address_t ); + +/* + * Layer 0 functions - I/O and memory management + */ + +/* make room for BASIC */ +address_t ballocmem(); + +/* handle files im EEPROM */ +void eload(); +void esave(); +char autorun(); + +/* the variable heap from Apple 1 BASIC */ +address_t bmalloc(mem_t, mem_t, mem_t, address_t); +address_t bfind(mem_t, mem_t, mem_t); +address_t bfree(mem_t, mem_t, mem_t); +address_t blength (mem_t, mem_t, mem_t); + +/* normal variables of number_t */ +number_t getvar(mem_t, mem_t); +void setvar(mem_t, mem_t, number_t); +void clrvars(); + +/* low level memory access packing n*8bit bit into n 8 bit objects + e* is for Arduino EEPROM */ +void getnumber(address_t, mem_t); +void setnumber(address_t, mem_t); +void egetnumber(address_t, mem_t); +void esetnumber(address_t, mem_t); +void pgetnumber(address_t, mem_t); + +/* array and string handling */ +/* the multidim extension is experimental, here only 2 array dimensions implemented as test */ +address_t createarray(mem_t, mem_t, address_t, address_t); +void array(mem_t, mem_t, mem_t, address_t, address_t, number_t*); +address_t createstring(char, char, address_t, address_t); +char* getstring(char, char, address_t, address_t); +number_t arraydim(char, char); +address_t stringdim(char, char); +address_t lenstring(char, char, address_t); +void setstringlength(char, char, address_t, address_t); +void setstring(char, char, address_t, char *, address_t, address_t); + +/* the user defined extension functions */ +number_t getusrvar(); +void setusrvar(number_t); +number_t getusrarray(address_t); +void setusrarray(address_t, number_t); +void makeusrstring(); +number_t usrfunction(address_t, number_t); +void usrcall(address_t); + +/* get keywords and tokens from PROGMEM */ +char* getkeyword(unsigned short); +char* getmessage(char); +signed char gettokenvalue(char); +void printmessage(char); + +/* error handling */ +void error(token_t); +void reseterror(); +void debugtoken(); +void bdebug(const char*); + +/* the arithemtic stack */ +void push(number_t); +number_t pop(); +address_t popaddress(); +void drop(); +void clearst(); + +/* READ DATA handling */ +void clrdata(); + +/* FOR NEXT GOSUB stacks */ +void pushforstack(); +void popforstack(); +void dropforstack(); +void clrforstack(); +void pushgosubstack(mem_t); +void popgosubstack(); +void dropgosubstack(); +void clrgosubstack(); + +/* general I/O initialisation */ +void ioinit(); +void iodefaults(); + +/* signal handling */ +void signalon(); +void signaloff(); +void signalhandler(int); + +/* character and string I/O functions */ +/* we live in world where char may be signed or unsigned and keep it + that way on the lowest level, hence this function, fully defined here, + mostly inlined anyway*/ +int cheof(int c) { if ((c == -1) || (c == 255)) return 1; else return 0; } +/* input */ +char inch(); +char checkch(); +short availch(); +void inb(char*, index_t); +void ins(char*, address_t); + +/* output */ +void outch(char); +void outcr(); +void outspc(); +void outs(char*, address_t); +void outsc(const char*); +void outscf(const char *, index_t); + +/* I/O of number_t - floats and integers */ +address_t parsenumber(char*, number_t*); +address_t parsenumber2(char*, number_t*); +address_t writenumber(char*, wnumber_t); +address_t writenumber2(char*, number_t); +address_t tinydtostrf(number_t, index_t, char*); +char innumber(number_t*); +void outnumber(number_t); + +/* + * Layer 1 functions, provide data and do the heavy lifting + * for layer 2 including lexical analysis, storing programs + * and expression evaluation + */ + +/* lexical analysis */ +void whitespaces(); +void nexttoken(); + +/* storing and retrieving programs */ +char nomemory(number_t); +void storetoken(); +mem_t memread(address_t); +mem_t memread2(address_t); +void memwrite2(address_t, mem_t); +void gettoken(); +void firstline(); +void nextline(); + +void clrlinecache(); +void addlinecache(address_t, address_t); +address_t findinlinecache(address_t); +void findline(address_t); +address_t myline(address_t); +void moveblock(address_t, address_t, address_t); +void zeroblock(address_t, address_t); +void diag(); +void storeline(); + +/* read arguments from the token stream and process them */ +char termsymbol(); +char expect(token_t, mem_t); +char expectexpr(); +void parsearguments(); +void parsenarguments(char); +void parsesubscripts(); +void parsefunction(void (*)(), short); +void parseoperator(void (*)()); +void parsesubstring(); + +/* mathematics and other functions for int and float */ +void xabs(); +void xsgn(); +void xpeek(); +void xmap(); +void rnd(); +void sqr(); +void xpow(); +number_t bpow(number_t, number_t); + +/* string values and string evaluation */ +char stringvalue(); +void streval(); + +/* floating point functions */ +void xsin(); +void xcos(); +void xtan(); +void xatan(); +void xlog(); +void xexp(); +void xint(); + +/* expression evaluation */ +void factor(); +void term(); +void addexpression(); +void compexpression(); +void notexpression(); +void andexpression(); +void expression(); + +/* + * Layer 2 - statements and functions + * use the global variables + */ + +/* basic commands of the core language set */ +void xprint(); +void lefthandside(address_t*, address_t*, address_t*, mem_t*); +void assignnumber(signed char, char, char, address_t, address_t, char); +void assignment(); +void showprompt(); +void xinput(); +void xgoto(); +void xreturn(); +void xif(); + +/* FOR NEXT loops */ +void findnextcmd(); +void findbraket(token_t, token_t); +void xfor(); +void xbreak(); +void xcont(); +void xnext(); + +/* WHILE WEND*/ +void xwhile(); +void xwend(); + +/* REPEAT UNTIL */ +void xrepeat(); +void xuntil(); + +/* control commands and misc */ +void outputtoken(); +void xlist(); +void xrun(); +void xnew(); +void xrem(); +void xclr(); +void xdim(); +void xpoke(); +void xtab(); +void xdump(); +void dumpmem(address_t, address_t, char); +void xlocate(); + +/* file access and other i/o */ +void stringtobuffer(char*); +void getfilename(char*, char); +void xsave(); +void xload(const char*); +void xget(); +void xput(); +void xset(); +void xnetstat(); + +/* Arduino IO control interface */ +void xdwrite(); +void xawrite(); +void xpinm(); +void xdelay(); +void xtone(); + +/* graphics commands */ +void xcolor(); +void xplot(); +void xline(); +void xrect(); +void xcircle(); +void xfrect(); +void xfcircle(); + +/* the darkarts */ +void xmalloc(); +void xfind(); +void xeval(); + +/* IoT commands */ +void xassign(); +void xavail(); +void xfsensor(); +void xsleep(); +void xwire(); +void xfwire(); + +/* timers */ +void xafter(); +void xevent(); + +/* File I/O functions */ +char streq(const char*, char*); +void xcatalog(); +void xdelete(); +void xopen(); +void xfopen(); +void xclose(); +void xfdisk(); + +/* low level access functions */ +void xcall(); +void xusr(); + +/* the dartmouth stuff */ +void xdata(); +void nextdatarecord(); +void xread(); +void xrestore(); +void xdef(); +void xfn(); +void xon(); + +/* timers and interrupts */ +void xtimer(); +void resettimer(btimer_t*); + +/* structured BASIC extensions */ +void xwhile(); +void xwend(); +void xrepeat(); +void xuntil(); +void xswitch(); +void xcase(); +void xendswitch(); + +/* the emulation of tone using the byield loop */ +void toggletone(); +void playtone(int, int, int); + +/* the statement loop */ +void statement(); + +/* the extension functions */ +void bsetup(); +void bloop(); + diff --git a/data/Basic1/IotBasic/font/firasans.h b/data/Basic1/IotBasic/font/firasans.h new file mode 100644 index 0000000000000000000000000000000000000000..81c6791a528ec08b7af3114a72f97204b783bf0a --- /dev/null +++ b/data/Basic1/IotBasic/font/firasans.h @@ -0,0 +1,8199 @@ +#pragma once +#include "epd_driver.h" +const uint8_t FiraSansBitmaps[120056] = { + 0x78, 0x9C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x78, 0x9C, 0xFB, 0xF4, 0x5F, 0xFE, 0xD3, 0x7F, + 0xFE, 0x8F, 0x30, 0xF4, 0x01, 0x8A, 0xF8, 0x20, 0xE8, 0xC1, 0x7F, 0x5E, 0x08, 0xBA, 0xF0, 0x9F, + 0x07, 0x82, 0x0E, 0xFC, 0xE7, 0x06, 0xA2, 0x0D, 0x20, 0xC4, 0xC5, 0x00, 0x03, 0x02, 0x69, 0x8C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x3E, 0xE5, 0x22, 0x9B, + 0x5F, 0x87, 0xDF, 0x40, 0xC2, 0x78, 0x9C, 0x45, 0x90, 0x3D, 0x12, 0x01, 0x41, 0x10, 0x85, 0xDF, + 0xFA, 0xFF, 0x5F, 0x47, 0xD8, 0x44, 0x49, 0x9D, 0x80, 0x4C, 0xEC, 0x08, 0x6E, 0x40, 0x24, 0x75, + 0x05, 0x81, 0xDC, 0x09, 0x94, 0x8D, 0xA4, 0x6E, 0xA0, 0xDC, 0x80, 0x40, 0xEE, 0x67, 0x2D, 0x96, + 0xAD, 0x7D, 0xFA, 0x6D, 0x15, 0xBA, 0x66, 0x6A, 0xBE, 0x99, 0x37, 0xDD, 0xF5, 0xBA, 0x01, 0xAC, + 0x93, 0x6D, 0x1B, 0x8A, 0x23, 0x2D, 0x8A, 0x06, 0x03, 0x01, 0x17, 0x46, 0x57, 0x6E, 0x5A, 0x73, + 0xB2, 0x00, 0xBC, 0x59, 0x06, 0x42, 0x36, 0xD0, 0xE1, 0xDE, 0x84, 0x19, 0xA7, 0xB6, 0x47, 0x46, + 0x9E, 0xDD, 0x77, 0x74, 0x55, 0x20, 0xA6, 0x73, 0x61, 0x5D, 0x14, 0xB1, 0x70, 0x63, 0x45, 0x74, + 0x67, 0xC9, 0x96, 0xE8, 0xC6, 0xEA, 0x53, 0x95, 0x54, 0xB5, 0x1E, 0x31, 0x2F, 0xB2, 0xEF, 0xAF, + 0x2F, 0x35, 0xDE, 0xCC, 0x89, 0xCE, 0x74, 0xFF, 0x6F, 0x7F, 0x8A, 0x7E, 0xB9, 0x8F, 0xD4, 0x24, + 0x02, 0xD6, 0x42, 0x99, 0x92, 0xAD, 0x72, 0xC0, 0xAA, 0xC8, 0xA4, 0xB3, 0x79, 0x84, 0xFC, 0x66, + 0x7D, 0xF6, 0x44, 0x24, 0x86, 0x69, 0x33, 0x03, 0xAE, 0x80, 0x84, 0x19, 0xE0, 0x20, 0xE5, 0xC1, + 0x2E, 0xBC, 0x58, 0x79, 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0x89, 0x01, 0x04, 0xFE, 0x0E, 0x79, 0x5A, 0x59, 0x09, 0x04, 0xFE, + 0xFE, 0x07, 0x83, 0xFB, 0x50, 0x7A, 0x3D, 0x94, 0xEE, 0x07, 0x00, 0xD8, 0x3F, 0x4B, 0x9A, 0x78, + 0x9C, 0x35, 0x90, 0xDB, 0x6D, 0xC2, 0x50, 0x10, 0x44, 0x37, 0x8E, 0x02, 0x01, 0x0B, 0x4C, 0x07, + 0xD0, 0x41, 0xDC, 0x01, 0xE9, 0xC0, 0x74, 0x80, 0x3B, 0x20, 0x1D, 0x40, 0x07, 0xD0, 0x81, 0xE9, + 0x00, 0x7F, 0x46, 0xCA, 0x07, 0xEE, 0xC0, 0x74, 0x60, 0x3A, 0xB0, 0xC1, 0x3C, 0x4D, 0xE0, 0x64, + 0xD7, 0x22, 0xFB, 0x71, 0xA5, 0x91, 0xE6, 0xEE, 0x99, 0x1D, 0xD9, 0x41, 0x53, 0x6C, 0x60, 0x2E, + 0xB2, 0x07, 0xD7, 0xC4, 0x08, 0x22, 0x91, 0x03, 0x78, 0xA6, 0x16, 0xB0, 0x12, 0x39, 0x42, 0x60, + 0x6A, 0x03, 0xA9, 0xC8, 0x29, 0x37, 0x87, 0xFD, 0x78, 0x64, 0x22, 0xE7, 0xF4, 0x96, 0x99, 0x3A, + 0xE5, 0x55, 0x2E, 0x72, 0x4D, 0xCF, 0x38, 0xAA, 0xAA, 0xA8, 0x42, 0xDF, 0x74, 0x5F, 0x23, 0x18, + 0x5F, 0x79, 0x91, 0xDB, 0x7A, 0x63, 0x08, 0x1F, 0xEF, 0xA2, 0x9E, 0xFB, 0x7A, 0x66, 0x88, 0x19, + 0xEE, 0x99, 0x57, 0x79, 0xAC, 0x7C, 0x43, 0x24, 0x34, 0x4F, 0xBC, 0x89, 0xEE, 0x7F, 0x28, 0x62, + 0x87, 0x73, 0xA4, 0xD1, 0xD3, 0x74, 0x95, 0x22, 0x8E, 0xB9, 0xA6, 0x6A, 0x0E, 0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x0C, 0x07, 0xFE, 0xF7, 0xFF, 0xFE, 0xCF, 0xCF, 0xF0, 0xE1, 0xFF, 0x79, + 0x28, 0x6F, 0x01, 0x44, 0x0E, 0x00, 0x52, 0x15, 0x12, 0x98, 0x78, 0x9C, 0x55, 0x50, 0x31, 0x6E, + 0xC2, 0x40, 0x10, 0x1C, 0xC7, 0xC4, 0x60, 0x61, 0x47, 0xD4, 0x88, 0xC2, 0x45, 0xFA, 0x50, 0x42, + 0x17, 0x29, 0x1F, 0x40, 0x7C, 0x20, 0xF4, 0x29, 0xCC, 0x0F, 0x9C, 0xD4, 0x14, 0xF0, 0x83, 0xF0, + 0x03, 0xF2, 0x03, 0x23, 0x51, 0x40, 0x07, 0xCA, 0x07, 0xA2, 0xA4, 0x46, 0x22, 0x20, 0x25, 0x11, + 0x58, 0xBE, 0x61, 0xCF, 0x17, 0xB0, 0xD9, 0x62, 0x4F, 0xA3, 0xBD, 0x9D, 0x9D, 0x19, 0x00, 0x68, + 0x2E, 0xD4, 0x66, 0x70, 0x05, 0x53, 0x9D, 0x94, 0x52, 0xB1, 0x9D, 0x81, 0x5A, 0xC2, 0xA7, 0xDB, + 0x87, 0x39, 0x87, 0x19, 0x7A, 0x67, 0x5D, 0x3F, 0x33, 0x56, 0xF5, 0x28, 0x7D, 0x34, 0x0B, 0x7F, + 0xB1, 0xB4, 0x37, 0x96, 0xD0, 0x5B, 0x7F, 0x94, 0xD1, 0x67, 0x19, 0xF8, 0x89, 0x10, 0x08, 0xCD, + 0xC6, 0xC6, 0xE1, 0x0E, 0x48, 0x7D, 0x7C, 0x6A, 0x4E, 0x17, 0xDB, 0x09, 0xEE, 0x79, 0x8D, 0x3D, + 0xDB, 0xDD, 0xB5, 0x85, 0x11, 0xAD, 0x11, 0x51, 0x63, 0x04, 0x04, 0x22, 0x82, 0xCE, 0x2A, 0x46, + 0x8F, 0xBE, 0x61, 0x55, 0xEE, 0xF7, 0x50, 0x7E, 0xB8, 0x06, 0x25, 0xDE, 0x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BB, 0x7C, 0x02, 0x26, + 0xB0, 0xB0, 0xC1, 0x01, 0x28, 0xC0, 0x01, 0x09, 0x4E, 0x16, 0x09, 0x38, 0x00, 0x09, 0x38, 0x00, + 0x27, 0x48, 0xD8, 0x03, 0x84, 0xEF, 0xA1, 0xCC, 0x40, 0x0F, 0x6D, 0x5E, 0xD3, 0x02, 0xBF, 0x1A, + 0x2B, 0x56, 0x56, 0xD8, 0xBD, 0x01, 0x36, 0x46, 0x17, 0x33, 0x94, 0x64, 0x32, 0x70, 0x31, 0x1B, + 0x1D, 0x70, 0xB3, 0x16, 0x04, 0x46, 0x52, 0x11, 0x78, 0x3E, 0xD4, 0x31, 0x43, 0x89, 0x5C, 0xFA, + 0x42, 0x72, 0xE5, 0x44, 0x1F, 0x2A, 0x26, 0x07, 0xAD, 0xA0, 0x43, 0x4B, 0x1F, 0x3C, 0x3A, 0x3E, + 0x99, 0xCE, 0xFA, 0xED, 0x7A, 0x20, 0xD6, 0x6F, 0x8C, 0x17, 0x0A, 0x15, 0x34, 0x81, 0x78, 0x9C, + 0x6D, 0x51, 0x3B, 0x52, 0x02, 0x41, 0x10, 0x6D, 0x94, 0x75, 0xC7, 0x0F, 0x68, 0x62, 0x8C, 0x37, + 0x60, 0x0F, 0xA0, 0x25, 0xE5, 0x01, 0x5C, 0x6F, 0x80, 0x99, 0x91, 0x05, 0x09, 0x65, 0x08, 0x37, + 0xC0, 0x1B, 0xC8, 0x0D, 0x20, 0x36, 0x50, 0x03, 0x43, 0xAB, 0x36, 0x37, 0x91, 0x1B, 0x80, 0x6C, + 0xB1, 0xB2, 0xEC, 0xE7, 0xD9, 0xDD, 0x3B, 0xB8, 0x04, 0x76, 0x30, 0xD5, 0xEF, 0xF5, 0xCC, 0x7B, + 0x3D, 0xDD, 0x44, 0x45, 0x5C, 0xD1, 0x56, 0xC4, 0xAF, 0x5B, 0x20, 0x1F, 0x97, 0xF9, 0x19, 0xDA, + 0x25, 0xE8, 0xE2, 0x78, 0x43, 0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, 0x61, 0x16, 0xD4, 0xF2, 0x4A, 0xBE, 0x5A, 0xFE, 0x52, 0x8F, 0x47, 0x23, 0x9F, 0x07, 0x8F, + 0xF3, 0xBD, 0x03, 0xEF, 0xD6, 0x76, 0x97, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, + 0xFE, 0x63, 0x01, 0xEB, 0x89, 0x17, 0x1C, 0x68, 0xE7, 0x8F, 0x82, 0x41, 0x04, 0x00, 0x95, 0x50, + 0x3D, 0xD2, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, 0x63, 0x01, 0xEB, 0x29, + 0x14, 0x1C, 0x68, 0x3F, 0x8D, 0x82, 0x41, 0x04, 0x00, 0xD2, 0x02, 0x52, 0x6D, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0x51, 0xD1, 0x51, 0xD1, + 0x51, 0x51, 0x7A, 0x88, 0x02, 0x00, 0xEA, 0xF7, 0x37, 0xC3, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, + 0x0B, 0x77, 0x79, 0x19, 0x30, 0xC0, 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0xA3, 0x82, 0xA3, 0x82, 0xA3, + 0x82, 0xA4, 0x0A, 0x02, 0x00, 0xD6, 0x8E, 0x69, 0x53, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, + 0x80, 0x20, 0xF8, 0xF7, 0x1F, 0x08, 0xF8, 0x19, 0x40, 0xE4, 0x7F, 0x5E, 0x08, 0xC5, 0x47, 0x9A, + 0xE8, 0x28, 0x18, 0x05, 0x04, 0x01, 0x00, 0x63, 0x07, 0x2D, 0x4F, 0x78, 0x9C, 0x63, 0x60, 0x18, + 0x05, 0xA3, 0x80, 0x20, 0xF8, 0xF7, 0x1F, 0x08, 0xF8, 0x19, 0x40, 0xE4, 0x7F, 0x5E, 0x08, 0xC5, + 0x47, 0x0D, 0xD1, 0x51, 0x30, 0x0A, 0x08, 0x02, 0x00, 0x70, 0x90, 0x3C, 0x69, 0x78, 0x9C, 0x63, + 0x60, 0x20, 0x07, 0xFC, 0xE7, 0x1F, 0x15, 0xC5, 0x2D, 0x7A, 0x86, 0x07, 0x9B, 0x28, 0xE5, 0x00, + 0xBB, 0xB9, 0x83, 0xC1, 0xC7, 0x83, 0x57, 0x94, 0x56, 0x60, 0x34, 0x2E, 0x48, 0x17, 0x25, 0x17, + 0x00, 0x00, 0xE6, 0x9C, 0x2B, 0xAB, 0x78, 0x9C, 0x63, 0x60, 0x20, 0x19, 0x7C, 0xF8, 0xCF, 0x3F, + 0x2A, 0x88, 0x0C, 0x0E, 0x9C, 0xE1, 0xC1, 0x14, 0xA4, 0x10, 0x60, 0x35, 0x73, 0x10, 0xFA, 0x7D, + 0x60, 0x05, 0x69, 0x01, 0x46, 0x43, 0x9E, 0x18, 0x41, 0xF2, 0x00, 0x00, 0x55, 0x82, 0x52, 0x7B, + 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0x12, 0xFE, 0xFF, 0xFF, 0xCF, 0xCF, 0x00, + 0x24, 0xF2, 0x19, 0xBE, 0x01, 0x49, 0x86, 0x4F, 0x40, 0x82, 0x85, 0x78, 0xC1, 0x81, 0x76, 0xFE, + 0x28, 0x18, 0x44, 0x00, 0x00, 0x3D, 0x68, 0x2C, 0x3B, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, + 0x00, 0x0A, 0x12, 0xFE, 0xFF, 0xFF, 0xCF, 0xCF, 0x00, 0x24, 0xF2, 0x19, 0xBE, 0x01, 0x49, 0x86, + 0x4F, 0x40, 0x82, 0x85, 0x42, 0xC1, 0x81, 0xF6, 0xD3, 0x28, 0x18, 0x44, 0x00, 0x00, 0xBB, 0xCC, + 0x3A, 0xF9, 0x78, 0x9C, 0x63, 0x60, 0xC0, 0x0F, 0x04, 0x19, 0xB1, 0x89, 0xFE, 0xE7, 0x1F, 0x0E, + 0xA2, 0xA1, 0xAC, 0xD8, 0x44, 0x29, 0x07, 0x83, 0xC1, 0x6F, 0x94, 0x8B, 0xA6, 0xB1, 0x61, 0x13, + 0xA5, 0x1C, 0x60, 0x37, 0x77, 0x30, 0xF8, 0x98, 0x72, 0x51, 0xCA, 0xC1, 0x68, 0xE8, 0x60, 0x02, + 0x00, 0xF7, 0x0B, 0x27, 0xA9, 0x78, 0x9C, 0x63, 0x60, 0xC0, 0x07, 0x04, 0x04, 0x19, 0x31, 0x05, + 0x3F, 0xFC, 0xE7, 0x1F, 0xBA, 0x82, 0x01, 0xA1, 0xAC, 0x98, 0x82, 0x14, 0x82, 0x41, 0xE8, 0x4D, + 0xE2, 0x05, 0x13, 0xD2, 0xD8, 0x30, 0x05, 0x29, 0x04, 0x58, 0xCD, 0x1C, 0x84, 0x7E, 0x27, 0x5E, + 0x90, 0x42, 0x30, 0x1A, 0x20, 0x10, 0x00, 0x00, 0x6B, 0x15, 0x4A, 0xE9, 0x78, 0x9C, 0x63, 0x60, + 0x18, 0x05, 0xA3, 0x80, 0x78, 0xF0, 0x1F, 0x01, 0x58, 0xC9, 0x14, 0xE5, 0xC7, 0x6A, 0xEE, 0xA8, + 0xE8, 0x08, 0x15, 0x7D, 0xC7, 0x87, 0x60, 0x03, 0x00, 0xEF, 0x82, 0x3B, 0x3B, 0x78, 0x9C, 0x63, + 0x60, 0x18, 0x05, 0xA3, 0x80, 0x78, 0xF0, 0x1F, 0x01, 0x58, 0xA9, 0x2A, 0xCA, 0x8F, 0xD5, 0xB6, + 0x51, 0xD1, 0x11, 0x2A, 0x9A, 0xC6, 0x86, 0x60, 0x03, 0x00, 0xA0, 0xBD, 0x45, 0xA5, 0x78, 0x9C, + 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x1D, 0x7C, 0xF8, 0x0F, 0x07, 0xF7, 0xC9, 0x12, 0xE4,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xB6, 0x6B, 0x5C, 0xA5, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, + 0x77, 0x7C, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0x51, 0x51, 0x24, 0x51, 0x04, 0x60, 0x25, + 0x4F, 0x74, 0x14, 0x8C, 0x02, 0x5C, 0x00, 0x00, 0x15, 0x02, 0x3B, 0x3B, 0x78, 0x9C, 0x63, 0x60, + 0x80, 0x81, 0x34, 0x36, 0x06, 0x2C, 0xE0, 0x3F, 0xFF, 0xA8, 0xE8, 0xA8, 0x28, 0x92, 0x28, 0x02, + 0xB0, 0x52, 0x53, 0x74, 0x14, 0x8C, 0x02, 0x5C, 0x00, 0x00, 0x78, 0xD6, 0x45, 0xA5, 0x78, 0x9C, + 0x63, 0x60, 0x80, 0x82, 0x07, 0xEF, 0xF8, 0x18, 0x30, 0xC0, 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0x23, + 0x52, 0x10, 0x0E, 0xEE, 0x93, 0x21, 0x38, 0x0A, 0x46, 0x01, 0x00, 0x5A, 0xC6, 0x54, 0xFC, 0x78, + 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, 0x0C, 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, + 0x88, 0x14, 0x84, 0x83, 0xFB, 0xD4, 0x12, 0x1C, 0x05, 0xA3, 0x00, 0x00, 0x1A, 0x2E, 0x5F, 0xB1, + 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0x77, 0x7C, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0x51, + 0xD1, 0xAF, 0xFF, 0xE1, 0x80, 0x4C, 0xD1, 0x51, 0x30, 0x0A, 0x08, 0x03, 0x00, 0x5D, 0x13, 0x3B, + 0x3B, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0x34, 0x36, 0x06, 0x2C, 0xE0, 0x3F, 0xFF, 0xA8, 0xE8, + 0xA8, 0xE8, 0xD7, 0xFF, 0x70, 0x40, 0x55, 0xD1, 0x51, 0x30, 0x0A, 0x08, 0x03, 0x00, 0x2E, 0x4C, + 0x45, 0xA5, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x07, 0xEF, 0xF8, 0x18, 0x30, 0xC0, 0x87, 0xFF, + 0xFC, 0xA3, 0x82, 0x23, 0x47, 0xF0, 0xEF, 0x7F, 0x38, 0x20, 0x47, 0x70, 0x14, 0x8C, 0x02, 0x38, + 0x00, 0x00, 0xA3, 0x72, 0x52, 0xB3, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, + 0x0C, 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xC8, 0x11, 0xFC, 0xFB, 0x1F, 0x0E, 0xA8, 0x26, 0x38, + 0x0A, 0x46, 0x01, 0x1C, 0x00, 0x00, 0x05, 0xC5, 0x5C, 0xA5, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, + 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0x51, 0x51, 0x24, 0xD1, 0xF7, 0xEF, 0x60, + 0x80, 0x15, 0x49, 0x14, 0x01, 0x08, 0x8B, 0xCA, 0x0B, 0xC2, 0xC0, 0xC0, 0xF9, 0x62, 0x54, 0x74, + 0x50, 0x8A, 0x02, 0x00, 0x05, 0xAE, 0x55, 0x87, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0xBB, 0xBC, + 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0x11, 0x2A, 0x9A, 0x9F, 0x06, 0x03, 0x4C, 0x48, 0xA2, + 0x08, 0xC0, 0x4A, 0xA6, 0xE8, 0xFC, 0x99, 0x30, 0xC0, 0x4C, 0x07, 0x5F, 0x8C, 0x8A, 0x0E, 0x21, + 0x51, 0x00, 0x46, 0xA9, 0x5F, 0x73, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x07, 0xEF, 0xF8, 0x18, + 0x30, 0xC0, 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0x23, 0x50, 0xB0, 0xE1, 0x3F, 0x1C, 0xDC, 0x27, 0x4B, + 0x90, 0x03, 0x9B, 0x99, 0xA3, 0x82, 0x23, 0x51, 0x50, 0xC1, 0x85, 0x09, 0xCE, 0x06, 0x00, 0xCA, + 0x90, 0x7A, 0x41, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0xBB, 0x6C, 0x0C, 0x18, 0xA0, 0xE1, + 0x3F, 0xC7, 0xA8, 0xE0, 0x88, 0x14, 0x7C, 0xFF, 0x0E, 0x0A, 0xCE, 0x21, 0x09, 0xC2, 0xC1, 0x7D, + 0xFC, 0x82, 0x1F, 0xFE, 0xCB, 0x0B, 0xC2, 0x00, 0x92, 0x20, 0x3F, 0xA6, 0x45, 0xA3, 0x82, 0xC3, + 0x55, 0x10, 0x00, 0x57, 0x96, 0x79, 0xB9, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x0B, 0x77, 0x79, + 0x19, 0x30, 0xC0, 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0x23, 0x52, 0xF0, 0xFD, 0x3B, 0x28, 0x38, 0x87, + 0x24, 0x08, 0x07, 0xF7, 0x09, 0x09, 0xCA, 0x0B, 0xC2, 0xC0, 0xA0, 0xF1, 0xD1, 0xA8, 0x20, 0x5D, + 0x05, 0x01, 0xE2, 0x2B, 0x86, 0xA8, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, + 0x0C, 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0x88, 0x14, 0x84, 0x83, 0xFB, 0x64, 0x09, 0xDE, 0xBB, + 0x0B, 0x05, 0x7B, 0xE1, 0x82, 0x0D, 0xFF, 0x39, 0x30, 0x2D, 0x1A, 0x15, 0x1C, 0xF6, 0x82, 0x06, + 0x69, 0xCC, 0x70, 0x36, 0x00, 0x99, 0x4B, 0x83, 0x9F, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x02, 0x87, + 0x99, 0x2C, 0x0C, 0x18, 0xA0, 0xE1, 0x3F, 0xC7, 0xA8, 0xE0, 0xF0, 0x16, 0x9C, 0xF0, 0xDF, 0xD2, + 0x18, 0x0A, 0x94, 0xE1, 0x82, 0x1F, 0xFE, 0xC3, 0xC1, 0x7D, 0xB2, 0x04, 0xEF, 0xDF, 0x85, 0x82, + 0xBD, 0x48, 0x82, 0xFC, 0x98, 0xB6, 0x8F, 0x0A, 0x0E, 0x7B, 0x41, 0x07, 0x17, 0x44, 0xC1, 0x02, + 0x00, 0x08, 0x3D, 0x85, 0x9C, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x0B, 0x77, 0x79, 0x19, 0x30, + 0xC0, 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0xC3, 0x5D, 0x30, 0x3F, 0x0D, 0x0A, 0xC2, 0x90, 0x04, 0xE1, + 0xE0, 0x3E, 0x59, 0x82, 0xF3, 0x67, 0x42, 0x41, 0xE7, 0x40, 0xF8, 0x68, 0x54, 0x70, 0xE0, 0x05, + 0x01, 0xCA, 0x50, 0x90, 0x6F, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, + 0x7F, 0xFE, 0x51, 0xD1, 0x51, 0xD1, 0x27, 0xEF, 0x60, 0x00, 0x59, 0xF4, 0xEB, 0x7F, 0x38, 0x20, + 0x28, 0x2A, 0x20, 0x08, 0x03, 0x83, 0xCD, 0x6F, 0xA3, 0xA2, 0x83, 0x47, 0x14, 0x00, 0x4B, 0x57, + 0x55, 0x86, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, + 0xD1, 0x91, 0x24, 0x9A, 0x94, 0x06, 0x03, 0xC8, 0xA2, 0x5F, 0xFF, 0xC3, 0x01, 0x99, 0xA2, 0x93, + 0x67, 0xC2, 0xC0, 0x60, 0xF3, 0xF1, 0xA8, 0xE8, 0xE0, 0x11, 0x05, 0x00, 0xFC, 0x10, 0x5F, 0x73, + 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x07, 0xEF, 0xF8, 0x18, 0x30, 0xC0, 0x87, 0xFF, 0xFC, 0xA3, + 0x82, 0x23, 0x47, 0xF0, 0xEF, 0x7F, 0x38, 0xE0, 0x20, 0x43, 0x10, 0x0E, 0x1A, 0x46, 0x05, 0x47, + 0x05, 0x61, 0x40, 0xC1, 0x85, 0x09, 0xCE, 0x06, 0x00, 0xAC, 0x07, 0x79, 0x33, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x82, 0x82, 0x77, 0xEC, 0x0C, 0x18, 0xA0, 0xE1, 0x3F, 0xC7, 0xA8, 0xE0, 0xC8, 0x11, + 0xFC, 0xFB, 0x1F, 0x0E, 0xC8, 0x11, 0x84, 0x83, 0x0F, 0xFF, 0xF9, 0x47, 0x05, 0x47, 0xA0, 0xE0, + 0x83, 0x77, 0x7C, 0x70, 0x36, 0x00, 0x09, 0xE1, 0x78, 0xAB, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, + 0x0B, 0x77, 0x79, 0x19, 0x30, 0xC0, 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0x23, 0x47, 0xF0, 0xCD, 0x3B, + 0x28, 0xF8, 0x87, 0x24, 0xF8, 0xF7, 0x3F, 0x1C, 0x10, 0x10, 0x14, 0x84, 0x81, 0x8F, 0x83, 0xC6, + 0x47, 0xA3, 0x82, 0x03, 0x25, 0x08, 0x00, 0x2E, 0x97, 0x84, 0x5F, 0x78, 0x9C, 0x63, 0x60, 0x80, + 0x82, 0x84, 0x34, 0x36, 0x06, 0x0C, 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xC8, 0x11, 0xFC, 0xFB, + 0x1F, 0x0E, 0xA8, 0x26, 0x08, 0x07, 0x0D, 0xFF, 0x39, 0x46, 0x05, 0x47, 0xA0, 0xA0, 0x41, 0x1A, + 0x33, 0x9C, 0x0D, 0x00, 0x43, 0x8A, 0x81, 0xE6, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x02, 0x83, 0x34, + 0x66, 0x06, 0x0C, 0xD0, 0xF0, 0x9F, 0x63, 0x54, 0x70, 0xE4, 0x08, 0xFE, 0xFD, 0x0F, 0x07, 0xFC, + 0xD4, 0x12, 0x84, 0x83, 0x0F, 0xA3, 0x82, 0x23, 0x52, 0x30, 0x21, 0x8D, 0x0D, 0xCE, 0x06, 0x00, + 0xC4, 0x5A, 0x81, 0xE6, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x0B, 0x77, 0x79, 0x19, 0x30, 0xC0, + 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0xC3, 0x52, 0x30, 0x35, 0x0D, 0x0A, 0xBE, 0x21, 0x09, 0xFE, 0xFD, + 0x0F, 0x07, 0xE4, 0x08, 0xCE, 0x98, 0x09, 0x05, 0x3F, 0x07, 0x8D, 0x37, 0x47, 0x05, 0x07, 0x4A, + 0x10, 0x00, 0xDD, 0x47, 0x8D, 0x63, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, + 0x63, 0x01, 0xEB, 0x89, 0x17, 0x84, 0x9B, 0xB3, 0xE0, 0x3F, 0x2B, 0xA6, 0xE1, 0xA3, 0x82, 0xC3, + 0x5E, 0x70, 0xC2, 0x3B, 0x84, 0x20, 0x00, 0xC8, 0x8A, 0x66, 0xB5, 0x78, 0x9C, 0x63, 0x60, 0x18, + 0x05, 0xA3, 0x00, 0x0A, 0xFE, 0xC3, 0xC0, 0xFA, 0x0E, 0x38, 0x88, 0xF8, 0x8F, 0x05, 0xAC, 0x27, + 0x24, 0x58, 0x55, 0x0E, 0x05, 0xE1, 0x70, 0xC3, 0x17, 0xFC, 0x67, 0xC5, 0xB4, 0x71,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0x60, 0x80, 0x82, 0x84, + 0x34, 0x06, 0x4C, 0xF0, 0xE1, 0xFF, 0xA8, 0xE0, 0x08, 0x12, 0xEC, 0x80, 0x81, 0x1F, 0xFF, 0xE1, + 0x20, 0xFE, 0x3F, 0x16, 0x80, 0x5D, 0xB0, 0x1C, 0x01, 0x10, 0x82, 0x58, 0xAC, 0x1C, 0x05, 0x23, + 0x15, 0x00, 0x00, 0x7B, 0x4C, 0x76, 0x4D, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x02, 0x87, 0x34, 0x26, + 0x06, 0x0C, 0xB0, 0xE0, 0x3F, 0xEB, 0xA8, 0xE0, 0xC8, 0x11, 0xFC, 0x8F, 0x05, 0xAC, 0xA7, 0x50, + 0x10, 0xD3, 0xC6, 0x51, 0x30, 0x62, 0x01, 0x00, 0x4B, 0xF0, 0x7A, 0x75, 0x78, 0x9C, 0x63, 0x60, + 0x80, 0x82, 0x47, 0xEF, 0x78, 0x18, 0x30, 0xC0, 0xA7, 0xFF, 0xBC, 0xA3, 0x82, 0x23, 0x47, 0xF0, + 0x3F, 0x16, 0xB0, 0x9E, 0x78, 0x41, 0x4C, 0xC3, 0x47, 0xC1, 0x88, 0x05, 0x00, 0xB2, 0x95, 0x6F, + 0x7E, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0xC4, 0x34, 0x56, 0x06, 0x0C, 0xF0, 0xF9, 0x3F, 0xEF, + 0xA8, 0xE0, 0xC8, 0x11, 0xFC, 0x8F, 0x00, 0x7D, 0x1D, 0x50, 0x10, 0xF1, 0x1F, 0x0B, 0x58, 0x4F, + 0x48, 0xB0, 0xAE, 0x1C, 0x0A, 0xC2, 0x31, 0x6D, 0x1C, 0x05, 0x23, 0x16, 0x00, 0x00, 0xA7, 0x0E, + 0x79, 0x88, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, 0x0C, 0xF0, 0xE1, 0x3F, + 0xFF, 0xA8, 0xE0, 0xC8, 0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x16, 0xC7, 0x7D, 0x37, 0x78, + 0x9C, 0x63, 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0x11, 0x2A, + 0x9A, 0x9F, 0x06, 0x03, 0x4C, 0x4F, 0xDE, 0xC1, 0xC0, 0x7F, 0x04, 0x60, 0xFD, 0xFA, 0x1F, 0x0B, + 0xC0, 0x21, 0x2A, 0x20, 0x08, 0x03, 0xFF, 0xE7, 0xCF, 0x84, 0x01, 0xE6, 0x41, 0xE6, 0xE3, 0x51, + 0xD1, 0x01, 0x16, 0x05, 0x00, 0xA6, 0xFA, 0x7D, 0x36, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x86, + 0xBB, 0x2C, 0x0C, 0x18, 0x60, 0xC1, 0x7F, 0xD6, 0x51, 0xC1, 0x61, 0x29, 0x98, 0x06, 0x03, 0xC7, + 0xFE, 0x67, 0xC2, 0x98, 0x6E, 0xFF, 0xB1, 0x80, 0xF5, 0xC4, 0x0B, 0xCE, 0x84, 0x81, 0x9B, 0xFF, + 0x67, 0xC3, 0x98, 0x99, 0x83, 0xD0, 0xEF, 0xA3, 0x82, 0x74, 0x10, 0x04, 0x00, 0xC1, 0x9A, 0xA2, + 0x8E, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x47, 0xEF, 0x78, 0x18, 0x30, 0xC0, 0xA7, 0xFF, 0xBC, + 0xA3, 0x82, 0x23, 0x47, 0xF0, 0x3F, 0x16, 0xB0, 0x9E, 0x78, 0x41, 0xB8, 0x39, 0x0B, 0xFE, 0xB3, + 0x62, 0x5A, 0x34, 0x2A, 0x38, 0xEC, 0x05, 0x27, 0xBC, 0x43, 0x08, 0x02, 0x00, 0xE5, 0xCF, 0x98, + 0x61, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x09, 0xEF, 0x58, 0x18, 0x30, 0xC0, 0x82, 0xFF, 0xAC, + 0xA3, 0x82, 0x23, 0x47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0x02, 0xC9, 0xAB, 0x6B, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x82, 0x4B, 0x77, 0xB9, 0x19, 0x30, 0xC0, 0xA7, 0xFF, 0xBC, 0xA3, 0x82, 0xC3, 0x52, + 0x30, 0x0D, 0x06, 0x7E, 0xFC, 0xCF, 0x83, 0x31, 0xDD, 0xFE, 0x63, 0x01, 0xEB, 0x89, 0x17, 0x9C, + 0x09, 0x03, 0xBF, 0xFE, 0xCF, 0x83, 0x31, 0x33, 0x07, 0xA1, 0xDF, 0x47, 0x05, 0xE9, 0x20, 0x08, + 0x00, 0x4E, 0x2E, 0xB3, 0xC8, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x80, 0x20, 0xF8, 0xFB, + 0x1F, 0x0A, 0x18, 0x3E, 0xC0, 0x58, 0xBC, 0xA4, 0x89, 0x8E, 0x82, 0x51, 0x40, 0x10, 0x00, 0x00, + 0xA3, 0x95, 0x35, 0xBF, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x80, 0x20, 0xF8, 0xFB, 0x1F, + 0x0A, 0x18, 0x3E, 0xC0, 0x58, 0xBC, 0xD4, 0x10, 0x1D, 0x05, 0xA3, 0x80, 0x20, 0x00, 0x00, 0x97, + 0xC2, 0x47, 0xA9, 0x78, 0x9C, 0x63, 0x60, 0x20, 0x07, 0xFC, 0xE7, 0x1F, 0x15, 0x1D, 0xEE, 0xA2, + 0x33, 0x39, 0xB1, 0x89, 0x52, 0x0E, 0xB0, 0x9B, 0x3B, 0x18, 0x7C, 0x3C, 0x2A, 0x4A, 0x5B, 0x51, + 0x72, 0x01, 0x00, 0xE1, 0xB6, 0x2F, 0xAD, 0x78, 0x9C, 0x63, 0x60, 0x20, 0x19, 0x7C, 0xF8, 0xCF, + 0x3F, 0x2A, 0x38, 0x6C, 0x04, 0x27, 0xCC, 0xE4, 0xC4, 0x14, 0xA4, 0x10, 0x60, 0x35, 0x73, 0x10, + 0xFA, 0x7D, 0x54, 0x90, 0x6C, 0x41, 0xF2, 0x00, 0x00, 0x87, 0x25, 0x5A, 0x0D, 0x78, 0x9C, 0x63, + 0x60, 0x18, 0x05, 0xC3, 0x07, 0xFC, 0xC7, 0x02, 0xD6, 0x13, 0x2F, 0x38, 0xA4, 0x6D, 0x1F, 0x05, + 0x83, 0x0A, 0x00, 0x00, 0x26, 0x56, 0x7B, 0xA3, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x0B, 0x77, + 0x41, 0x08, 0x1D, 0x7C, 0xF8, 0x0F, 0x42, 0xA3, 0xA2, 0xA3, 0xA2, 0xA3, 0xA2, 0xA3, 0xA2, 0xB4, + 0x17, 0x05, 0x00, 0x59, 0xD4, 0xCC, 0x73, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xC3, 0x10, 0x7C, + 0xF8, 0x0F, 0x07, 0xF7, 0xC9, 0x12, 0xC4, 0x6A, 0x26, 0xF1, 0x82, 0x03, 0x6B, 0xFB, 0xA8, 0xE0, + 0xC0, 0x08, 0x3E, 0x78, 0x87, 0x60, 0x03, 0x00, 0xA7, 0x37, 0x76, 0xD5, 0x78, 0x9C, 0x63, 0x60, + 0x18, 0x05, 0xA3, 0x80, 0x58, 0xF0, 0xE1, 0x3F, 0x12, 0x60, 0x25, 0x4F, 0x14, 0x84, 0x30, 0xCD, + 0x1D, 0x15, 0x1D, 0x99, 0xA2, 0x0F, 0xDE, 0x81, 0x10, 0x0C, 0x00, 0x00, 0x05, 0x0D, 0x87, 0x28, + 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0x23, 0x05, 0x7C, 0xF8, 0x8F, 0x04, 0x58, 0xC9, 0x13, 0xC5, + 0x6E, 0x2E, 0x49, 0xA2, 0x1F, 0xB0, 0x9A, 0x4B, 0x9A, 0x28, 0x76, 0x73, 0x47, 0x45, 0x87, 0x9C, + 0xE8, 0x83, 0x77, 0x20, 0x04, 0x03, 0x00, 0x2B, 0x72, 0xA4, 0xEC, 0x78, 0x9C, 0x63, 0x60, 0x18, + 0x05, 0xC3, 0x1D, 0x7C, 0xFD, 0x0F, 0x07, 0xFC, 0xE4, 0x89, 0x22, 0x00, 0xB9, 0xA2, 0x83, 0xC1, + 0x0D, 0xA3, 0xA2, 0x83, 0x51, 0xF4, 0x1D, 0x1F, 0x82, 0x0D, 0x00, 0xCE, 0xDC, 0x5C, 0x29, 0x78, + 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x80, 0x10, 0xF8, 0xFA, 0x1F, 0x09, 0x90, 0x25, 0x0A, 0x03, + 0x1F, 0xFE, 0x83, 0xD0, 0xA8, 0xE8, 0xA8, 0x28, 0x04, 0x3C, 0x78, 0x07, 0x42, 0x30, 0x00, 0x00, + 0x3B, 0xB7, 0x87, 0x28, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xC3, 0x1D, 0x7C, 0xFD, 0x8F, 0x04, + 0xC8, 0x12, 0x45, 0x02, 0x1F, 0xC8, 0x13, 0x45, 0x98, 0x4B, 0xAE, 0x28, 0x92, 0xA1, 0xA3, 0xA2, + 0xC3, 0x46, 0xF4, 0xC1, 0x3B, 0x10, 0x82, 0x01, 0x00, 0x87, 0x5F, 0xA4, 0xEC, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x80, 0x07, 0xEF, 0x18, 0xB0, 0x80, 0x0F, 0xFF, 0x47, 0x45, 0x87, 0x93, 0x28, 0x12, + 0x60, 0x25, 0x4F, 0x74, 0xE0, 0xDD, 0x30, 0x0A, 0x86, 0x2F, 0x00, 0x00, 0x37, 0xDE, 0x7D, 0xAD, + 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x07, 0xEF, 0x40, 0x08, 0x1D, 0x7C, 0xF8, 0x0F, 0x42, 0xA3, + 0xA2, 0xA3, 0xA2, 0x30, 0x51, 0x24, 0xC0, 0x4A, 0x8E, 0xE8, 0x28, 0x18, 0x05, 0xB8, 0x01, 0x00, + 0x8E, 0x56, 0x87, 0x28, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x07, 0xEF, 0x40, 0x08, 0x1D, 0x7C, + 0xF8, 0x0F, 0x42, 0xA3, 0xA2, 0xC3, 0x48, 0x14, 0x06, 0x58, 0xC9, 0x14, 0xC5, 0x02, 0x48, 0x13, + 0x45, 0x02, 0xAC, 0xE4, 0x88, 0x8E, 0x82, 0xE1, 0x0B, 0x00, 0x17, 0x42, 0xA4, 0xEC, 0x78, 0x9C, + 0x63, 0x60, 0x80, 0x81, 0x77, 0x7C, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0xA1, 0x2E, 0xFA, + 0xF5, 0x3F, 0x1C, 0x90, 0x29, 0x3A, 0xB8, 0xDC, 0x30, 0x0A, 0x86, 0x2B, 0x00, 0x00, 0x52, 0x96, + 0x5C, 0x29, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x07, 0xEF, 0x40, 0x08, 0x1D, 0x7C, 0xF8, 0x0F, + 0x42, 0xA3, 0xA2, 0x23, 0x5D, 0xF4, 0xEB, 0x7F, 0x24, 0x40, 0x96, 0xE8, 0x28, 0x18, 0x05, 0x84, + 0x01, 0x00, 0xC5, 0x00, 0x87, 0x28, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x07, 0xEF, 0x40, 0x08, + 0x1D, 0x7C, 0xF8, 0x0F, 0x42, 0xA3, 0xA2, 0x43, 0x5B, 0xF4, 0xEB, 0x7F, 0x18, 0x20, 0x57, 0x14, + 0xD5, 0x68, 0x72, 0x44, 0x11, 0xE6, 0x82, 0x8C, 0x26, 0x47, 0x74, 0x14, 0x0C, 0x7F, 0x00, 0x00, + 0x73, 0x2F, 0xA4, 0xEC, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F, + 0xFE, 0x51, 0xD1, 0x61, 0x24, 0x8A, 0x00, 0xAC, 0x64, 0x8A, 0xCA, 0x0B, 0xC2, 0x00, 0xB9, 0x6E, + 0x78, 0xFF, 0x0E, 0x06, 0x58, 0x06, 0xCC, 0x0D, 0xA3, 0xA2, 0x83, 0x52, 0x14, 0x00, 0xD6, 0x4E, + 0x73, 0xF3, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x0B, 0x77, 0x41, 0x08, 0x1D, 0x7C, 0xF8, 0x0F, + 0x42, 0xA3, 0xA2, 0xA3, 0xA2, 0x48, 0xA2, 0xEF, 0xA0, 0x80, 0x05, 0x45, 0x14, 0x06, 0x58, 0x89, + 0x10, 0x15, 0x84, 0x82, 0xC1, 0xE7, 0xB7, 0x51, 0xD1, 0x01, 0x15, 0x05, 0x00, 0x47, 0x0A, 0xE4, + 0x69, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x0B, 0x77, 0x41, 0x08, 0x1D, 0x7C, 0xF8, 0x0F, 0x42, + 0xA3, 0xA2, 0xC3, 0x48, 0x14, 0x06, 0x58, 0xB0, 0x8A, 0xB2, 0x12, 0x14, 0x15, 0x10, 0x84, 0x01, + 0x64, 0x73, 0xB1, 0x00, 0x9C, 0xA2, 0x0F, 0xDE, 0xC1, 0x00, 0xB9, 0x6E, 0xF8, 0xF0, 0x1F, 0x9B, + 0x1B, 0x06, 0x47, 0xF8, 0x8E, 0x8A, 0x52, 0x20, 0x0A, 0x00, 0x6A, 0xBC, 0xF7, 0x1A, 0x78, 0x9C, + 0x63, 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0xA1, 0x2E, 0xFA, + 0xE5, 0x3F, 0x1C, 0x20, 0x89, 0x7E, 0x25, 0x41, 0x54, 0x40, 0x10, 0x06, 0xC8, 0x75, 0xC3, 0x93, + 0x77, 0x30, 0x30, 0x70, 0x6E, 0x18, 0x15, 0x1D, 0xEC, 0xA2, 0x00, 0x6B, 0x03, 0x73, 0xF2, 0x78, + 0x9C, 0x63, 0x60, 0x80, 0x80, 0x0B, 0x77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9C, 0x63, 0x60, + 0x18, 0x05, 0xC3, 0x07, 0xFC, 0xC7, 0x02, 0xD6, 0x13, 0x2F, 0x48, 0x2D, 0xDB, 0xE3, 0x19, 0x7E, + 0x61, 0x5A, 0x44, 0x50, 0x10, 0x66, 0xCC, 0x6F, 0xA0, 0x60, 0x3C, 0xBA, 0xD9, 0xA3, 0x82, 0x83, + 0x5F, 0xF0, 0xA5, 0x1F, 0xC3, 0xCB, 0x38, 0x18, 0x07, 0x00, 0x65, 0xE5, 0xB1, 0xE4, 0x78, 0x9C, + 0x63, 0x60, 0x80, 0x82, 0x09, 0xEF, 0x58, 0x18, 0x30, 0xC0, 0x82, 0xFF, 0xAC, 0xA3, 0x82, 0x43, + 0x48, 0xF0, 0x3F, 0x16, 0xB0, 0x9E, 0x78, 0x41, 0x4C, 0xC3, 0x49, 0x02, 0x03, 0x6B, 0xFB, 0x28, + 0x18, 0x54, 0x00, 0x00, 0x15, 0x1B, 0x9F, 0x99, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x97, 0x7E, + 0x0C, 0x2F, 0xE3, 0x18, 0xD0, 0xC0, 0xEF, 0x78, 0x86, 0x5F, 0xF1, 0xA3, 0x82, 0x23, 0x46, 0xF0, + 0x3F, 0x16, 0xB0, 0x9E, 0x78, 0x41, 0x74, 0xB3, 0x47, 0xC1, 0x08, 0x06, 0x00, 0x1F, 0x29, 0x81, + 0x18, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x97, 0x7E, 0x0C, 0x2F, 0xE3, 0x18, 0xD0, 0xC0, 0xEF, + 0x78, 0x86, 0x5F, 0xF1, 0xA3, 0x82, 0x43, 0x47, 0xF0, 0x3F, 0x0C, 0x00, 0x05, 0x61, 0xCC, 0xF5, + 0xC4, 0x0B, 0xA2, 0x9B, 0x4D, 0x22, 0xF8, 0x8F, 0x05, 0xAC, 0x27, 0x5E, 0x90, 0x42, 0xDB, 0x47, + 0xC1, 0xA0, 0x02, 0x00, 0x22, 0x8B,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80, 0x8C, 0x3C, 0x4E, 0x74, 0x25, 0x1F, 0xE2, 0xC5, 0xE5, 0xF1, 0xA4, 0x28, 0xF9, 0x96, 0x99, + 0xE4, 0xD5, 0x80, 0xB4, 0x3C, 0xCE, 0x34, 0xC2, 0x99, 0x5F, 0x14, 0x24, 0xDF, 0x31, 0xD6, 0x66, + 0x48, 0xC9, 0xE3, 0x42, 0x5D, 0x72, 0x97, 0xBD, 0xE4, 0x46, 0xF3, 0x81, 0x91, 0xE4, 0x36, 0x24, + 0xE5, 0x71, 0xA5, 0x26, 0xF9, 0xC4, 0x64, 0x7E, 0x93, 0x0F, 0x65, 0x6E, 0x82, 0x25, 0x8F, 0x1B, + 0x15, 0xC9, 0xE7, 0x6C, 0xB4, 0xD9, 0x27, 0x27, 0xF9, 0x91, 0x41, 0x38, 0xF3, 0xDD, 0x60, 0x5E, + 0xB2, 0x92, 0xBC, 0xEC, 0x93, 0x35, 0x98, 0xFB, 0x92, 0xF7, 0xFE, 0x16, 0x89, 0x83, 0x67, 0x32, + 0xEB, 0x48, 0x7E, 0x98, 0x23, 0x8A, 0x24, 0x74, 0x9E, 0xE6, 0x48, 0xB4, 0xF9, 0x1B, 0x49, 0x34, + 0x79, 0xDA, 0x26, 0x73, 0xAB, 0x6D, 0x7D, 0x00, 0xAC, 0x64, 0x75, 0xBA, 0x78, 0x9C, 0x6D, 0x93, + 0xEB, 0x51, 0xC2, 0x40, 0x14, 0x85, 0x03, 0x3E, 0xC0, 0x07, 0x33, 0x34, 0xA0, 0x43, 0x05, 0x4A, + 0x07, 0xDA, 0x81, 0x76, 0x20, 0x1D, 0x68, 0x03, 0x8E, 0x76, 0x20, 0x1D, 0x68, 0x07, 0xA4, 0x03, + 0xE9, 0x00, 0xFC, 0xED, 0x30, 0x0E, 0x34, 0xC0, 0x4C, 0x0C, 0x11, 0x23, 0xC9, 0x31, 0x9B, 0x7D, + 0xDD, 0x7B, 0x37, 0xE7, 0x4F, 0x36, 0x07, 0x76, 0x4F,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0xC7, 0x89, 0xAA, + 0x69, 0xD9, 0xD0, 0x5E, 0x19, 0xA9, 0x1E, 0x57, 0x13, 0xD5, 0x92, 0xFE, 0x4A, 0xCD, 0x04, 0x99, + 0x05, 0x9F, 0x5A, 0xCD, 0xD0, 0x87, 0x9F, 0x1D, 0x23, 0x3D, 0x73, 0xC3, 0x20, 0x39, 0xD3, 0x93, + 0xE2, 0x66, 0xD3, 0xC8, 0xD2, 0x24, 0x21, 0x71, 0x0C, 0x08, 0x48, 0xDC, 0x2B, 0x87, 0xC4, 0x6F, + 0xE7, 0x78, 0x92, 0xB8, 0x8C, 0x40, 0x42, 0x3F, 0x8F, 0x42, 0xB2, 0xA4, 0xD7, 0xD9, 0x79, 0x48, + 0xD8, 0xF5, 0x57, 0x0E, 0x12, 0x5E, 0x2E, 0x0F, 0x89, 0x28, 0xAF, 0xC5, 0x73, 0x20, 0x8A, 0x62, + 0x93, 0xE7, 0xB2, 0x7D, 0x06, 0xCF, 0x5C, 0xB6, 0x3B, 0xA9, 0x21, 0x09, 0x50, 0x30, 0x90, 0xA4, + 0x61, 0x53, 0xB7, 0xD5, 0x80, 0x71, 0x00, 0xB5, 0x14, 0x9E, 0x0D, 0x28, 0x28, 0x48, 0xBA, 0xFF, + 0xEC, 0x1F, 0xE5, 0x4A, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, 0xC3, 0x01, + 0x2F, 0x39, 0x82, 0xA3, 0x60, 0x14, 0xC0, 0x01, 0x00, 0x06, 0x27, 0x1E, 0x0A, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x81, 0x34, 0x36, 0x06, 0x2C, 0xE0, 0x3F, 0xFF, 0xA8, 0xE8, 0xA8, 0x28, 0x79, 0xA2, + 0xA3, 0x60, 0x14, 0x50, 0x03, 0x00, 0x00, 0x58, 0x5C, 0x1B, 0xD9, 0x78, 0x9C, 0x63, 0x60, 0x18, + 0x05, 0xA3, 0x00, 0x03, 0x7C, 0xF8, 0x0F, 0x03, 0xF7, 0xC9, 0x11, 0x1C, 0x05, 0x23, 0x1E, 0x00, + 0x00, 0xBA, 0x33, 0x20, 0x53, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x80, 0x52, 0x60, 0xCC, + 0x8C, 0x4D, 0xF4, 0x3F, 0xFF, 0xA8, 0xE8, 0xA8, 0x28, 0x79, 0xA2, 0xC8, 0x29, 0x0A, 0x00, 0xA0, + 0xBF, 0x1B, 0xD9, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, 0xC3, 0x01, 0x2F, + 0xD5, 0x04, 0x47, 0xC1, 0x28, 0x80, 0x03, 0x00, 0xAB, 0x63, 0x28, 0x0D, 0x78, 0x9C, 0x63, 0x60, + 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, 0x0C, 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xA8, 0x20, 0x1E, + 0xC1, 0x51, 0x30, 0x0A, 0x88, 0x07, 0x00, 0xB4, 0xBB, 0x34, 0x99, 0x78, 0x9C, 0x63, 0x60, 0x18, + 0x05, 0xA3, 0x00, 0x03, 0x7C, 0xF8, 0x0F, 0x03, 0xF7, 0xA9, 0x26, 0x38, 0x0A, 0x46, 0x3C, 0x00, + 0x00, 0xBB, 0x80, 0x2B, 0x19, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x80, 0x28, 0x60, 0x60, + 0xCC, 0x8C, 0x29, 0xF8, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xA8, 0x20, 0x1E, 0x41, 0xE4, 0x64, 0x03, + 0x00, 0xA0, 0x02, 0x34, 0x99, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xDA, 0x3A, + 0x60, 0xE0, 0xC7, 0x7F, 0x18, 0xB8, 0xFF, 0xF7, 0x3F, 0x26, 0xC0, 0x2E, 0x58, 0x56, 0x0E, 0x03, + 0xDF, 0x11, 0x82, 0x03, 0xED, 0xA7, 0x51, 0x30, 0x88, 0x00, 0x00, 0x0B, 0x38, 0x49, 0x21, 0x78, + 0x9C, 0x63, 0x60, 0x80, 0x02, 0x87, 0x99, 0x2C, 0x0C, 0x18, 0xA0, 0xE1, 0x3F, 0xC7, 0xA8, 0xE0, + 0xA8, 0x20, 0x04, 0x4C, 0xF8, 0xCF, 0x89, 0x29, 0xF8, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xA8, 0x20, + 0x1E, 0x41, 0x03, 0x63, 0x66, 0x38, 0x1B, 0x00, 0x1F, 0x9F, 0x5C, 0xD7, 0x78, 0x9C, 0x63, 0x60, + 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, 0xC3, 0x41, 0x5F, 0x07, 0x0C, 0x44, 0xFC, 0xC7, 0x02, 0xD6, + 0x13, 0x10, 0xAC, 0x2B, 0x87, 0x81, 0xF0, 0x81, 0xF6, 0xD3, 0x28, 0x18, 0x44, 0x00, 0x00, 0x9D, + 0x49, 0x47, 0xD5, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, 0x0C, 0xF0, 0xE1, + 0x3F, 0xFF, 0xA8, 0xE0, 0xA8, 0x20, 0x1E, 0xC1, 0x86, 0xFF, 0x1C, 0xA3, 0x82, 0xA3, 0x82, 0x78, + 0x04, 0x0D, 0xD2, 0x98, 0xE1, 0x6C, 0x00, 0x79, 0x3C, 0x5C, 0xE8, 0x78, 0x9C, 0x4B, 0x4B, 0xC3, + 0x04, 0x6E, 0xFF, 0xB1, 0x80, 0xF5, 0xA3, 0x82, 0xA3, 0x82, 0x70, 0x41, 0x86, 0x51, 0x30, 0x0A, + 0x48, 0x07, 0x00, 0xE3, 0xA2, 0x20, 0x1B, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x60, 0x14, + 0x0C, 0x6D, 0xB0, 0x0A, 0x0B, 0xC8, 0xFA, 0x8F, 0x05, 0xAC, 0xA7, 0x9B, 0x20, 0x00, 0x1A, 0xC4, + 0x89, 0x55, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x60, 0x14, 0x50, 0x0A, 0xFE, 0x63, 0x01, + 0xEB, 0x47, 0xB2, 0xA0, 0x31, 0x16, 0xA0, 0x0C, 0x00, 0xB8, 0x50, 0x10, 0x0E, 0x78, 0x9C, 0x63, + 0x60, 0x18, 0x05, 0xA3, 0x60, 0x88, 0x81, 0xBB, 0x58, 0x40, 0xEF, 0x7F, 0x2C, 0x60, 0xFD, 0xA8, + 0xE0, 0x40, 0x09, 0x02, 0x00, 0xBB, 0xED, 0x99, 0x62, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, + 0x00, 0x1F, 0x30, 0xC6, 0x02, 0x94, 0xFF, 0x63, 0x01, 0xEB, 0x47, 0x05, 0x47, 0x05, 0xE1, 0x82, + 0x58, 0x93, 0x0D, 0x00, 0x47, 0x02, 0x20, 0x1B, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0x83, 0x1D, + 0xFC, 0xC7, 0x02, 0xD6, 0x8F, 0x0A, 0x8E, 0x0A, 0x0E, 0x66, 0x41, 0xAC, 0x29, 0x19, 0x00, 0x1D, + 0xAC, 0xA8, 0x1A, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0x28, 0x60, 0x26, 0x16, 0x90, 0xF9, 0x1F, + 0x0B, 0x58, 0x3F, 0x2A, 0x38, 0x2A, 0x38, 0x2A, 0x88, 0x4B, 0x10, 0x00, 0xEC, 0xD2, 0x30, 0x28, + 0x78, 0x9C, 0x63, 0x60, 0x18, 0x74, 0xE0, 0x3F, 0x16, 0xB0, 0x7E, 0x54, 0x70, 0x54, 0x70, 0x54, + 0x70, 0x08, 0x09, 0x1A, 0x63, 0x01, 0xCA, 0x00, 0x1E, 0xC3, 0xB8, 0x27, 0x78, 0x9C, 0xBB, 0x7B, + 0x17, 0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0x15, 0x1C, 0x15, 0x24, 0x4F, 0x10, 0x00, 0x8E, + 0x98, 0x08, 0x9A, 0x78, 0x9C, 0xBB, 0x7B, 0x57, 0x97, 0x01, 0x03, 0xFC, 0xFF, 0x6F, 0x3F, 0x2A, + 0x38, 0x2A, 0x38, 0x2A, 0x38, 0x2A, 0x48, 0xB6, 0x20, 0x00, 0x0D, 0xBA, 0x76, 0x4C, 0x78, 0x9C, + 0x63, 0x60, 0x80, 0x81, 0x0B, 0x77, 0x61, 0x60, 0x2D, 0x5C, 0x8C, 0xE1, 0xC3, 0x7F, 0x18, 0xB8, + 0x3F, 0x2A, 0x38, 0x2A, 0x38, 0x2A, 0x38, 0x2A, 0x48, 0xA4, 0x20, 0x00, 0x11, 0x9B, 0x39, 0x99, + 0x78, 0x9C, 0x5B, 0xC5, 0x96, 0xB0, 0x8A, 0x61, 0x19, 0x17, 0x90, 0x58, 0x90, 0xC5, 0xB0, 0x0A, + 0xC2, 0x61, 0xF8, 0xCF, 0x39, 0xE1, 0x3F, 0xC3, 0x4F, 0x7E, 0x20, 0xF1, 0x61, 0x3E, 0x8C, 0x83, + 0x5D, 0x90, 0x42, 0x40, 0xBC, 0x45, 0x60, 0xA7, 0x2D, 0x05, 0xBB, 0x33, 0x0A, 0xC6, 0xA1, 0x9D, + 0x45, 0xE8, 0x01, 0x42, 0x3C, 0xB8, 0xCB, 0xD1, 0x70, 0x97, 0xE1, 0x06, 0x2F, 0x90, 0xB8, 0xD0, + 0x0B, 0xE3, 0xD0, 0x24, 0x3C, 0xB1, 0xBA, 0x73, 0x10, 0x46, 0x1C, 0xD6, 0x00, 0xA1, 0x85, 0x45, + 0x14, 0xA6, 0x10, 0xBA, 0x85, 0xE7, 0x50, 0x89, 0x38, 0x0A, 0x33, 0x02, 0x56, 0x00, 0x00, 0x03, + 0xD6, 0x18, 0x6C, 0x78, 0x9C, 0x5B, 0xC5, 0x96, 0xB0, 0x8A, 0x61, 0x19, 0x17, 0x90, 0x58, 0x90, + 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 0x77, 0xA1, 0x9C, 0xB9, 0x34, 0x09, 0x4F, 0xAC, 0xEE, 0xA4, 0x85, 0x45, + 0x14, 0x86, 0x27, 0xD6, 0x00, 0x19, 0x84, 0x11, 0x47, 0xB7, 0xF0, 0x1C, 0x2A, 0x11, 0x47, 0x59, + 0x78, 0x1A, 0x33, 0x0A, 0x18, 0x33, 0x18, 0x32, 0x03, 0x09, 0x03, 0x61, 0x18, 0x87, 0x01, 0x00, + 0x23, 0xC1, 0x38, 0xF4, 0x78, 0x9C, 0x33, 0x36, 0xC6, 0x04, 0xCA, 0xFF, 0xB1, 0x80, 0xF5, 0x23, + 0x59, 0x90, 0x61, 0x14, 0x8C, 0x82, 0x51, 0x40, 0x31, 0x00, 0x00, 0xD0, 0xC9, 0x10, 0x0E, 0x78, + 0x9C, 0x63, 0x60, 0x40, 0x07, 0x97, 0xEE, 0xDE, 0xC5, 0x10, 0x63, 0xF8, 0xFC, 0xFF, 0xFF, 0xA8, + 0xE0, 0xA8, 0xE0, 0xA8, 0xE0, 0xA8, 0x20, 0x91, 0x82, 0x00, 0x1B, 0xE8, 0x9B, 0x81, 0x78, 0x9C, + 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x1F, 0x30, 0x86, 0x03, 0x26, 0x84, 0xE0, 0x7F, 0x38, 0xE0, + 0x1D, 0x15, 0x1C, 0x15, 0xC4, 0x22, 0x88, 0x48, 0x36, 0xCC, 0x08, 0x41, 0x00, 0xCA, 0xA3, 0x08, + 0x5F, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x80, 0x38, 0x60, 0x60, 0x0C, 0x03, 0xCA, 0x08, + 0xC1, 0x0F, 0xFF, 0x61, 0xE0, 0xFE, 0xA8, 0xE0, 0xA8, 0x20, 0x16, 0x41, 0x44, 0xB2, 0x31, 0x06, + 0x00, 0xAD, 0xF5, 0x1C, 0x78, 0x78, 0x9C, 0x4B, 0x4B, 0x83, 0x01, 0x56, 0x06, 0x38, 0xF8, 0x0F, + 0x07, 0xBC, 0xA3, 0x82, 0xA3, 0x82, 0x58, 0x04, 0x47, 0xC1, 0x28, 0x20, 0x03, 0x00, 0x00, 0x14, + 0xAF, 0x08, 0x5F, 0x78, 0x9C, 0x9B, 0x39, 0x13, 0x06, 0x38, 0x18, 0xE0, 0xE0, 0x3F, 0x1C, 0xF0, + 0x8E, 0x0A, 0x8E, 0x0A, 0xC2, 0x80, 0xAD, 0x31, 0x0C, 0x28, 0xFF, 0xC7, 0x02, 0xD6, 0x8F, 0x0A, + 0x8E, 0x0A, 0xC2, 0x05, 0x8D, 0xB1, 0x00, 0x65, 0x00, 0x9D, 0xA1, 0x28, 0x79, 0x78, 0x9C, 0x9B, + 0x39, 0x13, 0x06, 0x38, 0x18, 0xE0, 0xE0, 0x3F, 0x1C, 0xF0, 0x8E, 0x0A, 0x8E, 0x74, 0xC1, 0xBB, + 0x70, 0x60, 0x6D, 0x0C, 0x03, 0xCA, 0x08, 0xE9, 0x4F, 0x70, 0x3D, 0xEB, 0x47, 0x05, 0x47, 0x05, + 0xB1, 0x08, 0x1A, 0x20, 0x92, 0x0D, 0x00, 0x5A, 0xF6, 0x20, 0xC5, 0x78, 0x9C, 0x4B, 0x4B, 0xC3, + 0x04, 0x6E, 0xFF, 0xB1, 0x80, 0xF5, 0xA3, 0x82, 0xA3, 0x82, 0x58, 0x04, 0x79, 0x19, 0xE0, 0x60, + 0x54, 0x70, 0x54, 0x10, 0x0E, 0x10, 0xC5, 0x09, 0x2B, 0x42, 0x10, 0x00, 0x3B, 0xAA, 0x28, 0x79, + 0x78, 0x9C, 0x4B, 0x4D, 0xC3, 0x04, 0x61, 0x7F, 0xFF, 0x63, 0x82, 0xFB, 0xA3, 0x82, 0xA3, 0x82, + 0x70, 0x41, 0x06, 0x38, 0xF8, 0x30, 0x2A, 0x38, 0x2A, 0x88, 0x57, 0x30, 0x01, 0x51, 0xB0, 0x00, + 0x00, 0x42, 0x8B, 0x41, 0x4D, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0x84, 0x34, 0x18, 0x08, 0x83, + 0x8B, 0x31, 0x7C, 0xF8, 0x0F, 0x03, 0xF7, 0x47, 0x05, 0x47, 0x05, 0xB1, 0x08, 0x8E, 0x82, 0x51, + 0x40, 0x34, 0x00, 0x00, 0x3B, 0x83, 0x1C, 0x78, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0x89, 0x33, + 0x61, 0x20, 0x13, 0x2E, 0xC6, 0xF0, 0xE9, 0x3F, 0x0C, 0xAC, 0x1F, 0x15, 0x1C, 0x99, 0x82, 0xC6, + 0x70, 0x70, 0xE5, 0x2E, 0x0C, 0xF4, 0xC2, 0xA5, 0xFF, 0xF3, 0x22, 0x34, 0x8D, 0x0A, 0x8E, 0x0A, + 0xC2, 0x01, 0x22, 0xD9, 0x30, 0x23, 0x04, 0x01, 0x9A, 0xC8, 0x20, 0xC5, 0x78, 0x9C, 0x63, 0x60, + 0x80, 0x81, 0x09, 0x33, 0x61, 0xA0, 0x12, 0x2E, 0xC6, 0xF0, 0xE1, 0x3F, 0x0C, 0xDC, 0x1F, 0x15, + 0x1C, 0x99, 0x82, 0x46, 0xC6, 0x30, 0xF0, 0x19, 0x21, 0xF8, 0xF7, 0x3F, 0x26, 0x18, 0x15, 0x1C, + 0x15, 0x44, 0x08, 0x1A, 0x63, 0x03, 0x00, 0x2D, 0x83, 0x41, 0x4D, 0x78, 0x9C, 0x5D, 0x91, 0x3B, + 0x4B, 0x03, 0x51, 0x10, 0x85, 0xCF, 0x6E, 0xD4, 0x3C, 0x40, 0xD8, 0x4E, 0xED, 0x16, 0xEC, 0xB4, + 0x57, 0x10, 0xC5, 0xD4, 0x82, 0xAF, 0x3F, 0xA0, 0x9D, 0x8D, 0x10, 0x63, 0xE3, 0x4F, 0xB0, 0xCD, + 0x2A, 0x68, 0x6B, 0x63, 0x1F, 0x10, 0xAC, 0x2D, 0xC4, 0x7A, 0x03, 0x62, 0x9D, 0xDA, 0x34, 0x01, + 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 0xDB, 0x0B, 0x10, 0x97, 0x1F, 0xF2, + 0x65, 0x60, 0xD8, 0x64, 0x03, 0x62, 0xED, 0x74, 0xE0, 0x83, 0xB8, 0xE9, 0xA9, 0x14, 0x10, 0x73, + 0x32, 0x80, 0x9C, 0xD1, 0x0D, 0x11, 0x11, 0x78, 0x09, 0x34, 0xFD, 0x25, 0x2B, 0x83, 0x01, 0x1F, + 0xC3, 0x27, 0x68, 0xD8, 0x19, 0x9C, 0x01, 0x06, 0xDB, 0x1E, 0xA6, 0x03, 0xEC, 0x0C, 0x0D, 0x5C, + 0xB0, 0xA0, 0x9D, 0xC7, 0xC0, 0x90, 0x50, 0x77, 0x0A, 0xA8, 0xDC, 0x1E, 0x16, 0x28, 0x0B, 0x81, + 0xDE, 0x7C, 0x28, 0x0B, 0x64, 0x9C, 0x81, 0x87, 0xDC, 0x15, 0x6D, 0x86, 0x93, 0x40, 0x33, 0x14, + 0xFE, 0xB3, 0xC2, 0x85, 0x5E, 0x9C, 0xF0, 0x51, 0x16, 0x12, 0xBC, 0xFC, 0x9F, 0x07, 0x2E, 0xA2, + 0xF0, 0xF2, 0x3F, 0x18, 0x70, 0x31, 0xA0, 0x02, 0x41, 0x46, 0x06, 0x00, 0x81, 0x09, 0x58, 0x49, + 0x78, 0x9C, 0x63, 0x50, 0xF8, 0x0F, 0x07, 0x36, 0x0C, 0x60, 0x70, 0xF1, 0x1A, 0x17, 0x84, 0xC1, + 0x20, 0xF0, 0x9F, 0x03, 0x4C, 0xD7, 0x18, 0xE4, 0x43, 0x45, 0x18, 0x4E, 0xDE, 0x63, 0x06, 0x92, + 0x0B, 0xB8, 0x18, 0xBE, 0x31, 0x41, 0x45, 0x1E, 0x2F, 0xEC, 0x07, 0x92, 0x27, 0x80, 0x82, 0xBA, + 0x4A, 0x10, 0xF0, 0x88, 0xE5, 0x89, 0x2D, 0x03, 0x83, 0xBE, 0x83, 0x26, 0x03, 0xDC, 0x68, 0x4E, + 0x81, 0x5F, 0xEC, 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 0xFA, 0x76, 0x01, 0x8D, 0xB6, 0x87, + 0x08, 0x18, 0xDC, 0x61, 0x66, 0x50, 0x38, 0xC3, 0x74, 0x81, 0x8D, 0xA1, 0x01, 0x6A, 0xF0, 0x4F, + 0x76, 0x06, 0x86, 0x17, 0x6C, 0x0C, 0x06, 0x7C, 0x0C, 0x1F, 0x99, 0xC0, 0x02, 0x4F, 0xA5, 0x81, + 0x26, 0x4B, 0x01, 0x19, 0x39, 0x0C, 0x5D, 0x60, 0x81, 0x4D, 0x40, 0x53, 0x17, 0xFA, 0x82, 0x58, + 0x3B, 0x0D, 0xE4, 0x40, 0x54, 0xC1, 0x7C, 0x20, 0xEE, 0x03, 0x4B, 0xBD, 0x3B, 0xC0, 0x06, 0xA4, + 0x1C, 0xCE, 0x32, 0x33, 0x18, 0xEC, 0x05, 0x69, 0x2F, 0xA8, 0xFB, 0x70, 0x1D, 0x24, 0xF1, 0x8B, + 0x8D, 0x41, 0xE0, 0x25, 0xC8, 0x59, 0x06, 0x6B, 0x19, 0x3F, 0xF8, 0x83, 0x94, 0xDC, 0x3B, 0x9F, + 0xF9, 0x4C, 0x12, 0xE4, 0xC9, 0x9B, 0x2C, 0x0C, 0x0F, 0xB8, 0x81, 0x8C, 0x06, 0x0E, 0x83, 0xED, + 0x60, 0x57, 0x3D, 0xE5, 0x60, 0x60, 0xB8, 0x0E, 0xD2, 0x7C, 0x81, 0x85, 0x81, 0x21, 0x06, 0x48, + 0x1F, 0xD2, 0x06, 0xBA, 0x80, 0x13, 0x24, 0xF5, 0x11, 0x88, 0x1F, 0x03, 0x95, 0x82, 0x5C, 0x60, + 0x03, 0x76, 0xCC, 0x51, 0x86, 0x37, 0xAC, 0x13, 0x38, 0x1C, 0xE6, 0x02, 0xFD, 0x96, 0x07, 0xF1, + 0x40, 0xA7, 0xC0, 0x7F, 0x7B, 0x01, 0xBB, 0x53, 0x40, 0x17, 0xAC, 0x81, 0x06, 0xDF, 0x4C, 0x86, + 0x7F, 0xFB, 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+ 0x4E, 0x21, 0x65, 0xD3, 0xF7, 0x8A, 0x21, 0x84, 0xFC, 0x19, 0x18, 0x4A, 0x3A, 0x56, 0x9E, 0x9E, + 0xC7, 0x8C, 0xD0, 0x38, 0x9F, 0x41, 0x00, 0x48, 0xEE, 0x67, 0x84, 0x19, 0x6F, 0xEB, 0xF0, 0xFF, + 0xBF, 0xC6, 0x15, 0x20, 0x83, 0x9D, 0x81, 0xE1, 0x2B, 0x44, 0x88, 0x99, 0xE1, 0x3B, 0x98, 0xCE, + 0x87, 0x3B, 0xB5, 0x9E, 0x81, 0xE1, 0x13, 0x98, 0xC1, 0x0E, 0x72, 0xFE, 0x76, 0xA0, 0x87, 0xCE, + 0xB2, 0x31, 0x30, 0x5C, 0x00, 0x89, 0xAC, 0x47, 0xF1, 0x76, 0x03, 0x48, 0x88, 0x17, 0x45, 0x08, + 0x64, 0xDD, 0x7F, 0x26, 0xD4, 0x00, 0x03, 0x5A, 0x64, 0x87, 0x16, 0xAA, 0x06, 0xBF, 0xE7, 0x41, + 0x02, 0x1F, 0x00, 0xE5, 0x2B, 0xB4, 0x9D, 0x78, 0x9C, 0x55, 0x90, 0x4D, 0x0E, 0x01, 0x41, 0x14, + 0x84, 0x7B, 0xFC, 0x27, 0x22, 0x71, 0x02, 0x71, 0x03, 0x6E, 0xC0, 0x0D, 0x1C, 0xC0, 0xC2, 0x15, + 0xDC, 0x80, 0xBD, 0x05, 0x37, 0xB1, 0xB3, 0xB1, 0x20, 0x2E, 0xC0, 0xD6, 0xCA, 0xDC, 0x01, 0x89, + 0x31, 0xF8, 0x74, 0x2F, 0x66, 0xBA, 0xDE, 0x5B, 0xF5, 0x97, 0xAA, 0xD4, 0xAB, 0x7E, 0xCE, 0xC9, + 0x74, 0x13, 0x81, 0xE1, 0x95, 0xA6, 0x48, 0x39, 0x67, 0x11, 0x2F, 0xD0, 0x13, 0xCC, 0xA1, 0x12, + 0x69, 0x09, 0x13, 0x11, 0x9F, 0x68, 0x50, 0x1F,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81, 0x0B, 0xB4, 0x51, 0xC9, 0x09, 0xC4, 0xF5, 0x07, + 0xB1, 0x98, 0x40, 0x0E, 0xFA, 0x0F, 0xE2, 0x42, 0x18, 0x10, 0x35, 0x40, 0x2E, 0x44, 0x17, 0x3A, + 0xF7, 0xC3, 0x7F, 0x04, 0x20, 0x95, 0x8B, 0x6A, 0x14, 0x9A, 0xBD, 0x68, 0xAE, 0xA2, 0xA2, 0x7F, + 0x21, 0xDC, 0x77, 0xEF, 0x18, 0x71, 0x87, 0x33, 0x5A, 0x2C, 0x20, 0xE2, 0x08, 0x00, 0xEF, 0xB0, + 0x7E, 0xBC, 0x78, 0x9C, 0x63, 0x60, 0x60, 0x60, 0x48, 0xB8, 0x0B, 0x04, 0xBA, 0x0C, 0x30, 0xD0, + 0xF0, 0x1F, 0x08, 0xF4, 0xE9, 0xCB, 0x75, 0x01, 0x82, 0x25, 0x20, 0x6E, 0x3E, 0x88, 0xC5, 0xFC, + 0x1F, 0x05, 0xF0, 0x0C, 0x14, 0x37, 0x14, 0x08, 0x96, 0x82, 0x58, 0xF5, 0x20, 0x16, 0xCB, 0x40, + 0x05, 0x0E, 0x1A, 0x17, 0x00, 0xCD, 0x2E, 0xE0, 0x49, 0x78, 0x9C, 0x63, 0x60, 0x00, 0x02, 0x81, + 0xFF, 0xFF, 0xF9, 0x19, 0x10, 0x60, 0xD0, 0x71, 0x05, 0x41, 0x40, 0xF1, 0xFF, 0x7F, 0x79, 0x30, + 0x83, 0xF1, 0x3F, 0x18, 0x98, 0x19, 0x7F, 0x05, 0xD3, 0xFC, 0x10, 0x2E, 0x0B, 0xC3, 0x67, 0xE2, + 0xB9, 0x70, 0xBD, 0x68, 0x26, 0x0F, 0x12, 0xFF, 0xE2, 0xE7, 0x02, 0x00, 0x7C, 0x5A, 0x71, 0x06, + 0x78, 0x9C, 0x63, 0x60, 0x60, 0x60, 0x48, 0xF8, 0x0F, 0x04, 0xF6, 0x0C, 0x30, 0x30, 0x08, 0xB8, + 0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x0E, 0x1C, 0xA0, 0xFF, 0x90, + 0x42, 0xE3, 0x1F, 0x50, 0xAD, 0xC1, 0x7F, 0x56, 0x06, 0x86, 0x9F, 0x60, 0xEE, 0x64, 0x76, 0x06, + 0x86, 0x04, 0x50, 0x48, 0x36, 0x78, 0x23, 0x62, 0x81, 0x07, 0x39, 0xD8, 0x0F, 0xFC, 0xE7, 0x47, + 0xE6, 0x4E, 0x40, 0xC4, 0x02, 0x18, 0x94, 0x33, 0x42, 0x68, 0x00, 0xA1, 0x7C, 0x71, 0x47, 0x78, + 0x9C, 0x4D, 0x90, 0x3D, 0x4E, 0xC3, 0x40, 0x10, 0x85, 0xC7, 0x71, 0x7E, 0x00, 0xF1, 0x93, 0x9A, + 0x20, 0x48, 0x41, 0x89, 0x94, 0x70, 0x01, 0x30, 0x34, 0x74, 0xC4, 0xB7, 0x80, 0x2E, 0x74, 0x94, + 0x71, 0xC1, 0x1D, 0x68, 0xC3, 0x01, 0x50, 0x72, 0x01, 0x94, 0x23, 0x98, 0x1B, 0x98, 0x20, 0xA8, + 0x22, 0xB1, 0x42, 0x82, 0xFC, 0xA1, 0xF8, 0x63, 0x76, 0x1D, 0x82, 0x9F, 0xB4, 0xD2, 0xBC, 0xDD, + 0x99, 0x7D, 0xF3, 0x9E, 0x88, 0x45, 0x37, 0xF1, 0x25, 0x87, 0x31, 0xDB, 0x79, 0x3A, 0xA3, 0x91, + 0xA7, 0x13, 0x0E, 0x44, 0x42, 0x37, 0x30, 0x6D, 0x8B, 0x7C, 0x69, 0x73, 0x3D, 0xED, 0x28, 0x0B, + 0xA1, 0x28, 0x9F, 0x6C, 0xCA, 0x33, 0x28, 0xBD, 0x81, 0x7D, 0x79, 0x61, 0x5D, 0xE7, 0xF1, 0x44, + 0xEA, 0x30, 0x90, 0x3E, 0xE5, 0x00, 0x7A, 0x76, 0xF6, 0x0D, 0x2A, 0x11, 0xFE, 0x10, 0xED, 0x50, + 0x54, 0xE7, 0x9C, 0x86, 0x78, 0x73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 0x4F, 0x21, 0x06, 0x86, 0x86, 0xFB, 0x2C, 0x0C, 0x40, 0xF0, + 0x83, 0x07, 0x44, 0x06, 0xFC, 0x67, 0x04, 0x51, 0x17, 0xCE, 0x83, 0x48, 0x86, 0x2F, 0xFF, 0x57, + 0xFE, 0x5B, 0xC7, 0xC4, 0xF0, 0xF3, 0x3F, 0x10, 0xE4, 0x33, 0xFC, 0x01, 0x51, 0xFF, 0x59, 0xFF, + 0x81, 0x29, 0x3E, 0x30, 0xF9, 0xDF, 0x1F, 0x42, 0xE5, 0xFF, 0x85, 0x50, 0x60, 0x95, 0xFF, 0xED, + 0x3F, 0x81, 0x29, 0xDE, 0x09, 0x60, 0x8A, 0x85, 0xE1, 0x17, 0x90, 0x8C, 0x67, 0x60, 0x70, 0xF8, + 0xFD, 0xBF, 0x17, 0x6C, 0x3A, 0x08, 0x00, 0x00, 0x81, 0xDD, 0x4B, 0x2C, 0x78, 0x9C, 0x63, 0x60, + 0x80, 0x00, 0x85, 0x9B, 0xFF, 0xE7, 0x31, 0x31, 0x30, 0xFC, 0xF8, 0xFF, 0xFF, 0x7F, 0x3E, 0x43, + 0xC1, 0x7F, 0x10, 0x60, 0xFD, 0x04, 0xA6, 0xF8, 0xBE, 0x83, 0xA9, 0xF8, 0x5F, 0x60, 0x6A, 0x3E, + 0x84, 0xDA, 0xFF, 0x03, 0x42, 0x41, 0x94, 0xAC, 0x6F, 0x80, 0xC8, 0x31, 0xFC, 0x04, 0xAB, 0x64, + 0x70, 0x78, 0xFD, 0x7E, 0xD7, 0x7F, 0x79, 0xB0, 0xB9, 0xFF, 0x39, 0x41, 0xA4, 0xC3, 0x7F, 0x26, + 0x10, 0xF5, 0x28, 0x1E, 0x44, 0x26, 0xFC, 0x67, 0x65, 0x60, 0x30, 0x5C, 0xFA, 0x4F, 0x8B, 0x81, + 0xE1, 0xC0, 0xBB, 0x39, 0x62, 0x40, 0x11, 0x00, 0x40, 0xF2, 0x4B, 0xFB, 0x78, 0x9C, 0x63, 0x60, + 0x40, 0x05, 0x01, 0xB7, 0xFE, 0xB3, 0x00, 0xC9, 0x9B, 0xFF, 0x99, 0x19, 0x18, 0x12, 0xFE, 0x65, + 0x33, 0x31, 0x30, 0x14, 0xFC, 0xCB, 0x06, 0xB2, 0x05, 0x7E, 0x6B, 0x01, 0x65, 0x05, 0xFE, 0x68, + 0x83, 0x14, 0x5D, 0xCC, 0x07, 0x91, 0x8F, 0xC0, 0x24, 0xC3, 0x1F, 0x36, 0x10, 0xF9, 0x17, 0x4C, + 0x16, 0x9C, 0x6F, 0xE9, 0x64, 0x65, 0x68, 0x38, 0xDF, 0x3C, 0x8B, 0x95, 0x81, 0xE1, 0xE3, 0xFF, + 0xFF, 0xFF, 0xDF, 0x33, 0x83, 0x49, 0x16, 0x86, 0x6F, 0x40, 0xEA, 0xBF, 0xFF, 0x77, 0x30, 0xC9, + 0xF0, 0x1B, 0x44, 0xBD, 0xFF, 0x0B, 0x26, 0x19, 0xFF, 0xFD, 0x47, 0x00, 0x0E, 0x24, 0xF6, 0x7F, + 0x1E, 0x64, 0x0E, 0xDF, 0x5F, 0x24, 0x0E, 0xEF, 0x0F, 0x24, 0x0E, 0xD7, 0x27, 0x30, 0xF5, 0x15, + 0x4C, 0xB2, 0x14, 0x80, 0xC8, 0xF5, 0x09, 0x60, 0x92, 0x81, 0x01, 0x64, 0x1F, 0x17, 0xC3, 0x0F, + 0x30, 0xC9, 0x60, 0xF0, 0xF2, 0xBD, 0x37, 0x03, 0x83, 0xC3, 0x6B, 0x10, 0x09, 0x00, 0xA5, 0x69, + 0x92, 0x86, 0x78, 0x9C, 0x63, 0x10, 0x98, 0x36, 0x8B, 0x95, 0x81, 0x41, 0x60, 0x79, 0x17, 0x0B, + 0x03, 0x03, 0xC3, 0xB7, 0xFF, 0xFF, 0xEF, 0x33, 0x83, 0xC8, 0xF3, 0x4C, 0x0C, 0x05, 0xFF, 0x81, + 0x40, 0xBF, 0x01, 0x44, 0xEA, 0x31, 0x7C,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xA4, 0xC2, 0x7F, + 0x76, 0x10, 0x35, 0xE1, 0x3D, 0x58, 0xEC, 0x3B, 0x58, 0x6A, 0xE1, 0x7B, 0x66, 0x06, 0x06, 0xC3, + 0x65, 0xFF, 0x25, 0x19, 0x18, 0x0E, 0xDC, 0x9B, 0x23, 0x0A, 0x14, 0x01, 0x00, 0x4A, 0x38, 0x4D, + 0xA4, 0x78, 0x9C, 0x63, 0x10, 0x58, 0x3E, 0x9B, 0x95, 0x81, 0x41, 0x60, 0xF9, 0x2C, 0x16, 0x06, + 0x06, 0x86, 0x6F, 0xFF, 0xFF, 0xBF, 0x67, 0x06, 0x91, 0xE7, 0x99, 0x18, 0x0A, 0xFE, 0x03, 0x81, + 0x7E, 0x03, 0x88, 0xD4, 0x63, 0xF8, 0x0C, 0xA2, 0xCE, 0x43, 0x48, 0x86, 0x5F, 0x20, 0xEA, 0xFF, + 0x5F, 0x30, 0xC9, 0xF2, 0xEF, 0x3F, 0x02, 0x70, 0x22, 0xB1, 0xFF, 0xF3, 0x22, 0xCB, 0xF0, 0xFD, + 0x42, 0x96, 0xF9, 0x02, 0xA6, 0x20, 0xF2, 0x3C, 0x13, 0xC0, 0xD4, 0x74, 0x88, 0x01, 0x0C, 0x3F, + 0x41, 0x14, 0x13, 0x98, 0x64, 0x61, 0x30, 0xB8, 0x75, 0xEE, 0xFA, 0x7E, 0x06, 0x87, 0xD7, 0xF7, + 0x6F, 0xDC, 0x67, 0x00, 0x81, 0xCF, 0xF6, 0x20, 0xF2, 0x93, 0x3F, 0x88, 0x14, 0xF8, 0xCB, 0x0E, + 0xA2, 0xFE, 0x70, 0x82, 0xC8, 0x8B, 0xEB, 0x41, 0xE4, 0x46, 0x30, 0x99, 0xF0, 0x9F, 0x03, 0x48, + 0x06, 0xFC, 0x03, 0x92, 0x02, 0x2D, 0xFF, 0x6C, 0x40, 0xE4, 0x5F, 0x1F, 0xA0, 0xC8, 0x97, 0x73, + 0x16, 0x60, 0xD2, 0x13, 0xA4, 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, 0x18, 0x02, 0x4E, 0xCD, 0x61, + 0x06, 0x52, 0x00, 0x53, 0xCA, 0xA2, 0x83, 0x78, 0x9C, 0x65, 0x90, 0x41, 0x0E, 0x82, 0x30, 0x10, + 0x45, 0x3F, 0x35, 0x9A, 0x26, 0x82, 0xBA, 0xF2, 0x7A, 0x7A, 0x04, 0x4F, 0xA0, 0x9E, 0x40, 0x08, + 0x7B, 0xA3, 0xC6, 0xBD, 0x5C, 0x41, 0x57, 0x2E, 0xBD, 0x0B, 0x31, 0x86, 0x44, 0xE4, 0xDB, 0xC2, + 0x18, 0x60, 0xFC, 0x9B, 0x79, 0x79, 0x9D, 0x34, 0xED, 0x07, 0x80, 0x00, 0x12, 0x81, 0x73, 0xC5, + 0xBD, 0xF1, 0x90, 0x56, 0xBC, 0x0C, 0xDC, 0x3C, 0xD2, 0x25, 0x76, 0xB0, 0xF5, 0x70, 0x70, 0xF0, + 0xF6, 0xC0, 0x71, 0x0B, 0xF5, 0x09, 0x99, 0x21, 0x69, 0x20, 0x46, 0xDE, 0x00, 0x87, 0x4F, 0x01, + 0x53, 0x08, 0x44, 0x1F, 0x01, 0x5B, 0x0A, 0x6C, 0x64, 0x32, 0xAC, 0xA8, 0x32, 0xD1, 0x82, 0xD3, + 0xFF, 0x9D, 0x52, 0x9B, 0xB0, 0xD0, 0xC6, 0xE6, 0xDA, 0x98, 0x44, 0x09, 0xF7, 0x31, 0x75, 0x51, + 0x04, 0xDC, 0x7A, 0xE2, 0xE1, 0x2B, 0xEA, 0xDD, 0x6D, 0x7D, 0x51, 0xB3, 0x7B, 0xBB, 0x31, 0x97, + 0x32, 0x53, 0x79, 0xE6, 0xCE, 0xFC, 0xEA, 0xC5, 0xAA, 0x16, 0x6B, 0x74, 0x72, 0x72, 0x22, 0x0B, + 0xBA, 0x06, 0x2F, 0x72, 0xD4, 0x13, 0x58, 0x72, 0x01, 0x95, 0xC2, 0x6A, 0x73, 0xD5, 0xA2, 0x93, + 0x2F, 0x5A, 0xB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 0x12, 0x28, 0x41, 0x07, 0xA6, 0x03, 0x3A, + 0xA0, 0x04, 0x2B, 0x0B, 0x1B, 0x3A, 0xA0, 0x03, 0x25, 0x50, 0x02, 0x71, 0xFD, 0x65, 0x38, 0xE4, + 0x4D, 0xBE, 0xD8, 0x3F, 0xC9, 0x39, 0x99, 0x16, 0xE1, 0xAC, 0x15, 0x38, 0x68, 0x1D, 0x56, 0xDA, + 0x85, 0x81, 0x4E, 0xA0, 0xA9, 0x5B, 0xE0, 0xA9, 0x39, 0xB8, 0x6B, 0x09, 0x4E, 0x41, 0xF7, 0x41, + 0x67, 0x41, 0xFB, 0x89, 0xEE, 0x3E, 0xF4, 0x3F, 0xE8, 0x2D, 0xD1, 0x6A, 0xD0, 0x06, 0x4C, 0xB5, + 0x97, 0x68, 0x5B, 0xD7, 0x51, 0x18, 0x45, 0xED, 0x37, 0xCA, 0xB5, 0xB8, 0xF8, 0x81, 0x4C, 0x0B, + 0xF0, 0xD2, 0x04, 0xFF, 0x74, 0x08, 0x9B, 0x80, 0xC7, 0x80, 0x17, 0x2D, 0xC3, 0xE3, 0x0B, 0x3B, + 0xBA, 0x84, 0x71, 0x82, 0xAD, 0x04, 0xAF, 0x01, 0xE7, 0x8B, 0x45, 0x1E, 0xDE, 0xA6, 0x92, 0x71, + 0x80, 0x78, 0x9C, 0x63, 0x60, 0x40, 0x03, 0x7F, 0xFE, 0xFF, 0xFF, 0xCF, 0x02, 0x66, 0x2D, 0x00, + 0xB2, 0xF2, 0x21, 0x82, 0xDF, 0x81, 0x4C, 0x4E, 0x30, 0xCB, 0x01, 0xC8, 0x3A, 0x0F, 0x11, 0xFC, + 0x04, 0x64, 0xCA, 0x81, 0x59, 0x02, 0x7F, 0x81, 0x4C, 0x66, 0x30, 0x73, 0x03, 0x90, 0x15, 0x0F, + 0x91, 0xFF, 0x01, 0x64, 0x72, 0x80, 0x59, 0x01, 0x40, 0xD6, 0x7E, 0x88, 0xE0, 0x67, 0x20, 0x93, + 0x17, 0xA2, 0xE9, 0xDF, 0xFF, 0xFF, 0xEF, 0x99, 0xC0, 0xCC, 0x03, 0x40, 0x41, 0x7F, 0x88, 0xFC, + 0x2F, 0x20, 0x93, 0x0D, 0xCC, 0x2A, 0x00, 0xB2, 0xE6, 0x43, 0x04, 0x3F, 0x02, 0x99, 0xFC, 0x10, + 0x66, 0x02, 0x42, 0x94, 0xE1, 0x27, 0x90, 0xCD, 0xCE, 0x80, 0x6E, 0x02, 0x92, 0xB9, 0x48, 0xB6, + 0x21, 0xBB, 0x01, 0xC9, 0x65, 0xC8, 0xEE, 0x65, 0x40, 0xF8, 0x02, 0xC9, 0x6F, 0xC8, 0x3E, 0x46, + 0x0A, 0x07, 0x70, 0xE8, 0xD4, 0x23, 0x87, 0x19, 0x00, 0x06, 0xA2, 0x74, 0x8E, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x83, 0x03, 0xFF, 0xFF, 0xFF, 0xF7, 0x87, 0x30, 0x05, 0xFE, 0xFD, 0xFF, 0xFF, 0x9E, + 0x09, 0xC2, 0xFE, 0x0C, 0x14, 0xE6, 0x85, 0x30, 0x03, 0x80, 0xCC, 0xFD, 0x50, 0xD5, 0x3F, 0x80, + 0x6C, 0x0E, 0x08, 0x73, 0x03, 0x90, 0x19, 0x0F, 0x15, 0xFE, 0x0B, 0x64, 0x33, 0x43, 0x98, 0x8F, + 0x80, 0x4C, 0x39, 0x08, 0xD3, 0x01, 0xC8, 0x3C, 0x0F, 0x55, 0xF1, 0x1D, 0xC8, 0xE6, 0x84, 0x30, + 0x17, 0x00, 0x99, 0xF9, 0x50, 0xE1, 0x3F, 0x40, 0x36, 0x0B, 0x84, 0xF9, 0x10, 0xC8, 0xD4, 0x83, + 0x30, 0x0D, 0x80, 0xCC, 0xFB, 0x50, 0x15, 0x3F, 0x81, 0x6C, 0x76, 0xB8, 0xE8, 0x79, 0x84, 0x5A, + 0x39, 0x84, 0x09, 0xCC, 0xE8, 0xE6, 0x22, 0x6C, 0x73, 0x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0x63, 0x08, 0xF8, 0xA7, 0xCB, 0xC0, 0xF0, 0x6B, + 0x3E, 0x50, 0xF4, 0x2F, 0xFF, 0x20, 0x22, 0xFC, 0x81, 0xC4, 0xC2, 0xFF, 0x1C, 0x40, 0xF2, 0xCA, + 0x79, 0x26, 0x20, 0xF9, 0x3D, 0x1E, 0x48, 0x08, 0xFC, 0xE2, 0x04, 0x92, 0x0E, 0xCC, 0x00, 0x30, + 0xFC, 0x2B, 0x81, 0x78, 0x9C, 0x63, 0x60, 0x00, 0x82, 0x0D, 0x71, 0x40, 0x42, 0xE0, 0x97, 0x36, + 0x90, 0x4C, 0xF8, 0xCF, 0x01, 0x24, 0x2F, 0xBD, 0x67, 0x05, 0x92, 0x3F, 0xD7, 0x03, 0x89, 0x0F, + 0xF7, 0x07, 0x0F, 0xF1, 0x05, 0x48, 0x34, 0xFC, 0x97, 0x62, 0x50, 0xF8, 0xE3, 0xCB, 0xC0, 0xF0, + 0xB5, 0x9E, 0x81, 0x61, 0xC2, 0x7A, 0x46, 0x06, 0x06, 0x03, 0x16, 0xA0, 0x14, 0x00, 0x2F, 0x93, + 0x41, 0x7A, 0x78, 0x9C, 0x63, 0x60, 0x00, 0x02, 0x45, 0x25, 0x20, 0x60, 0x02, 0x32, 0x04, 0x5E, + 0xFE, 0x07, 0x01, 0x5E, 0x20, 0xF3, 0x02, 0x88, 0xB1, 0x5F, 0x04, 0x24, 0xFD, 0x0D, 0xC4, 0xE4, + 0x01, 0xB1, 0x18, 0x7E, 0x81, 0x98, 0x6C, 0x60, 0xE6, 0x1F, 0x10, 0x93, 0x05, 0xCC, 0xFC, 0x07, + 0x62, 0x32, 0x81, 0x99, 0xFF, 0xD1, 0x98, 0x8C, 0x14, 0x30, 0x05, 0xC0, 0x4C, 0xB0, 0xA0, 0x01, + 0x88, 0xF5, 0x1E, 0xCC, 0x4C, 0x00, 0x3B, 0x0C, 0xCC, 0x3C, 0x00, 0x62, 0xE6, 0x83, 0x99, 0xDF, + 0xE1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CD, 0x47, 0xB7, 0x0D, 0xC9, 0x0D, 0x94, 0x7B, + 0xE8, 0x13, 0x1A, 0x93, 0x0F, 0x11, 0x92, 0x3C, 0x60, 0xE6, 0x77, 0x44, 0xF8, 0x82, 0x63, 0x83, + 0x15, 0xC8, 0x30, 0xBC, 0x0E, 0xF7, 0x25, 0xD8, 0xDD, 0xE7, 0xC0, 0x9E, 0x04, 0x00, 0xDD, 0x91, + 0xC8, 0xBF, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x00, 0xC3, 0x10, 0x57, 0x26, 0x06, 0x14, 0x90, 0xF8, + 0xFA, 0x3F, 0x10, 0xF4, 0x30, 0x23, 0x09, 0x2D, 0xFA, 0x0F, 0x01, 0xF7, 0x59, 0xE1, 0x42, 0x13, + 0xFE, 0xC3, 0xC0, 0x79, 0x98, 0x4A, 0x83, 0xBF, 0x70, 0xB1, 0xFF, 0xF5, 0x50, 0xB1, 0xAF, 0xFF, + 0x91, 0x00, 0x17, 0x58, 0x28, 0x00, 0x59, 0xE8, 0xFF, 0x7E, 0xB0, 0xD8, 0x17, 0x14, 0x31, 0xB0, + 0x42, 0x05, 0x54, 0x21, 0xB0, 0x89, 0x07, 0xA0, 0xEC, 0xF5, 0x4C, 0x50, 0x06, 0xD0, 0xEA, 0xEF, + 0x10, 0x97, 0x65, 0x31, 0x32, 0x40, 0xC5, 0x78, 0x19, 0x18, 0xFE, 0x81, 0x68, 0x7D, 0x90, 0xC1, + 0x50, 0xB1, 0x7C, 0x86, 0x02, 0x88, 0xB2, 0x33, 0x35, 0x70, 0xB1, 0xFB, 0x0C, 0x17, 0xE0, 0x2C, + 0x98, 0xD8, 0x7F, 0xE6, 0x4F, 0x98, 0x62, 0x9C, 0xDF, 0x30, 0xC5, 0x78, 0x7F, 0x61, 0x8A, 0xF1, + 0xFF, 0xC1, 0x14, 0xB3, 0xFF, 0x87, 0x29, 0x16, 0xFF, 0x9F, 0x38, 0xB1, 0x7C, 0x6C, 0xEA, 0xB0, + 0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12, 0x36, 0x2F, 0xDB, + 0x2C, 0x63, 0x1B, 0xC9, 0x9E, 0x7A, 0x61, 0x82, 0xCE, 0xB2, 0x7D, 0x6E, 0xF0, 0x93, 0x9D, 0x9A, + 0x7B, 0xEF, 0x5E, 0x7F, 0x4A, 0x71, 0xBF, 0xCD, 0x5F, 0xFF, 0x41, 0xA4, 0x12, 0x56, 0x78, 0x9C, + 0x55, 0x92, 0xBD, 0x4E, 0x42, 0x41, 0x10, 0x85, 0xCF, 0x45, 0xB9, 0xA2, 0x04, 0xA4, 0xB1, 0xD1, + 0x44, 0x79, 0x03, 0x78, 0x01, 0x13, 0xE9, 0x34, 0x26, 0x46, 0xE3, 0x03, 0xE8, 0x03, 0x68, 0x30, + 0x96, 0x16, 0x42, 0x61, 0x65, 0x23, 0x4F, 0x20, 0x96, 0x76, 0x60, 0x67, 0xA1, 0xB9, 0x74, 0x16, + 0x36, 0x14, 0x74, 0x16, 0x62, 0x62, 0x6B, 0xC0, 0xBF, 0x00, 0x22, 0xAE, 0x3B, 0x3F, 0x5C, 0xF6, + 0x9E, 0xE4, 0x66, 0x67, 0xBF, 0xB0, 0x33, 0x73, 0x86, 0x01, 0x58, 0x3B, 0xD7, 0x8F, 0x77, 0xE7, + 0x0B, 0x70, 0xF5, 0x60, 0x58, 0x07, 0x0E, 0xEA, 0x1B, 0xD5, 0x69, 0x88, 0x5E, 0x4D, 0xA8, 0x55, + 0x45, 0x65, 0xE3, 0xC8, 0x17, 0xF6, 0xE3, 0xB2, 0x0B, 0x46, 0x57, 0x26, 0xA2, 0x44, 0xA4, 0x80, + 0xA8, 0x68, 0xD1, 0xB6, 0xC6, 0x1B, 0x5E, 0x41, 0x92, 0x4C, 0x01, 0x2F, 0x82, 0x96, 0xB0, 0xEB, + 0xE5, 0xFF, 0x28, 0x4A, 0x01, 0x03, 0x46, 0x35, 0xD4, 0x4D, 0x12, 0xDF, 0x14, 0x96, 0x90, 0x95, + 0x9F, 0x25, 0x6D, 0x5A, 0x1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0x7B, 0x27, 0x09, 0x1B, 0x78, 0x9C, + 0x85, 0x92, 0xBD, 0x4E, 0x02, 0x41, 0x14, 0x85, 0xEF, 0xEE, 0x92, 0xAC, 0x82, 0x01, 0x1A, 0x5B, + 0xA5, 0x33, 0x56, 0x6E, 0x63, 0xAD, 0xA5, 0x8D, 0x41, 0x0A, 0x0B, 0x13, 0x13, 0x7C, 0x00, 0x13, + 0x7C, 0x02, 0x97, 0xC2, 0xCA, 0x06, 0x9E, 0x40, 0x28, 0xED, 0xF0, 0x01, 0x34, 0x50, 0x69, 0x61, + 0x21, 0x85, 0x9D, 0x89, 0x60, 0x45, 0x09, 0x1A, 0x04, 0x64, 0x81, 0xE3, 0xBD, 0xB3, 0xEB, 0x30, + 0x68, 0xE1, 0x49, 0x76, 0xB2, 0xF3, 0x25, 0xF7, 0x77, 0x0E, 0x91, 0x52, 0xEE, 0xFA, 0xF1, 0xF6, + 0x72, 0x95, 0x4C, 0xDD, 0x43, 0xE9, 0xD4, 0x40, 0x1D, 0x44, 0x3A, 0xD7, 0xE8, 0x19, 0x5A, 0xFB, + 0x11, 0x3A, 0x83, 0x21, 0x37, 0x64, 0x5F, 0x26, 0xAB, 0x28, 0x54, 0xC5, 0x82, 0x96, 0x85, 0x8D, + 0x16, 0x59, 0x89, 0xD1, 0x81, 0x8A, 0x08, 0xE4, 0x3C, 0xB6, 0x72, 0x53, 0x20, 0x46, 0xF4, 0xC6, + 0x97, 0xBA, 0x3D, 0xE0, 0xD3, 0x0F, 0x13, 0xAD, 0xA9, 0x0A, 0x57, 0x0E, 0x0D, 0x54, 0xA6, 0x8E, + 0x43, 0x13, 0xAE, 0x92, 0x09, 0xCB, 0x33, 0xEB, 0x52, 0x1A, 0x09, 0xFA, 0x00, 0xAC, 0x32, 0x70, + 0xB4, 0xAD, 0x58, 0x81, 0x53, 0xA7, 0x24, 0x78, 0xA9, 0x2D, 0xC9, 0x15, 0x5B, 0xA7, 0x22, 0xB6, + 0x68, 0x17, 0x48, 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18, 0x4D, + 0xDB, 0x94, 0xDE, 0xF3, 0xAC, 0x56, 0x1C, 0x2B, 0xA9, 0x69, 0x66, 0xB3, 0xAA, 0xA9, 0x72, 0x9D, + 0xA1, 0x33, 0xAE, 0xBC, 0x2B, 0xD7, 0x4C, 0xB3, 0x79, 0xEE, 0xFF, 0x11, 0xBA, 0xB1, 0x47, 0xBF, + 0x75, 0xFF, 0x81, 0xD1, 0xD3, 0xA9, 0xF9, 0xDA, 0x02, 0x98, 0x4B, 0x06, 0x7B, 0x78, 0x9C, 0x65, + 0x92, 0x3B, 0x4E, 0x03, 0x31, 0x10, 0x86, 0x67, 0x21, 0xC0, 0x2A, 0x89, 0x20, 0x27, 0x88, 0x96, + 0x82, 0x3A, 0x14, 0x48, 0x94, 0x49, 0x41, 0x87, 0x84, 0xA8, 0x69, 0x20, 0x27, 0x08, 0x37, 0xE0, + 0x00, 0x20, 0x16, 0x8A, 0xB4, 0x70, 0x02, 0x04, 0x37, 0x00, 0x4E, 0x00, 0x08, 0x89, 0x22, 0x08, + 0x6D, 0x45, 0x19, 0xAD, 0xC2, 0x23, 0x3C, 0xB4, 0x78, 0xB0, 0x3D, 0xB3, 0xEB, 0xD9, 0xF5, 0xDF, + 0xD8, 0xFE, 0xE4, 0xF1, 0xCC, 0x78, 0x7E, 0x00, 0x52, 0xB4, 0xB1, 0x36, 0x03, 0x25, 0x6D, 0x8F, + 0x50, 0xEB, 0x68, 0x56, 0xA0, 0x53, 0x24, 0x25, 0x73, 0x05, 0xDA, 0xC7, 0x5C, 0x49, 0x2D, 0x7F, + 0xEA, 0xAF, 0x60, 0x18, 0x33, 0xFB, 0x40, 0xA1, 0x06, 0xBD, 0x2F, 0x11, 0xDE, 0x05, 0xDE, 0x35, + 0xC4, 0xA6, 0x46, 0x2D, 0x55, 0x66, 0x97, 0x9A, 0xDD, 0x98, 0x4D, 0x48, 0x2F, 0xEF, 0x99, 0xBD, + 0xAE, 0x67, 0x5A, 0x65, 0x6D, 0x00, 0x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0x73, 0xFE, + 0xFF, 0xF7, 0x47, 0x51, 0xF4, 0x1B, 0x24, 0xC4, 0x8C, 0x2C, 0xB2, 0x01, 0x24, 0xA2, 0x87, 0xA2, + 0xE8, 0x17, 0x50, 0xE4, 0x3E, 0x23, 0x83, 0xC1, 0xEB, 0xFF, 0x28, 0x80, 0x87, 0xE1, 0x33, 0xAA, + 0xC0, 0xFF, 0xF5, 0x10, 0xF3, 0x90, 0x01, 0xE7, 0x3F, 0x74, 0x91, 0x7C, 0x0C, 0x11, 0xFB, 0x9F, + 0xE8, 0x22, 0x2C, 0x07, 0xD1, 0x35, 0x31, 0x30, 0x4C, 0x5D, 0x05, 0x03, 0x7F, 0x40, 0x22, 0x1C, + 0x48, 0x0E, 0x34, 0x00, 0x19, 0x39, 0x1F, 0xD9, 0xC9, 0xDF, 0x40, 0x4A, 0xB8, 0x91, 0x04, 0x1C, + 0x40, 0x02, 0xE7, 0x91, 0x95, 0x5C, 0x00, 0x89, 0xC8, 0xA1, 0x87, 0xE1, 0x7B, 0x26, 0x74, 0x11, + 0x7B, 0x94, 0xB0, 0x78, 0x00, 0x14, 0x61, 0x45, 0x11, 0x49, 0x00, 0xBB, 0x0E, 0x05, 0x6C, 0xD9, + 0x07, 0x09, 0x52, 0x00, 0x9D, 0x63, 0xCB, 0x15, 0x78, 0x9C, 0x63, 0x60, 0xC0, 0x0B, 0x5A, 0x31, + 0x44, 0xBE, 0x72, 0x60, 0x88, 0xF4, 0x63, 0x88, 0xFC, 0x47, 0x57, 0xF4, 0xF5, 0xFF, 0x7C, 0x0C, + 0x91, 0xFF, 0x9C, 0x18, 0x22, 0xF3, 0x31, 0x44, 0xFE, 0x73, 0xFE, 0x47, 0x07, 0xF5, 0x4A, 0xC8, + 0xE0, 0x1B, 0x50, 0x84, 0x1B, 0x5D, 0xD7, 0x7E, 0x0C, 0x73, 0xB8, 0xD1, 0x45, 0xD0, 0x94, 0x00, + 0x45, 0xB8, 0xD1, 0x45, 0xD6, 0x63, 0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, 0xFF, 0xBF, 0xD7, 0x40, 0x11, 0xB9, 0xF0, 0x1F, + 0x08, 0xA2, 0x91, 0x45, 0x1C, 0x40, 0x22, 0xFF, 0xFB, 0x18, 0x91, 0x84, 0x7E, 0x83, 0x85, 0xF6, + 0xB3, 0x20, 0x44, 0x3E, 0x81, 0x45, 0xFE, 0xDF, 0x17, 0x87, 0x8B, 0x34, 0xFC, 0x87, 0x02, 0x2F, + 0xB8, 0xD0, 0x3F, 0x98, 0x50, 0x2E, 0xCC, 0xB0, 0xAF, 0x30, 0x11, 0xB8, 0x63, 0x0F, 0xC0, 0x45, + 0xFE, 0x9F, 0x67, 0x03, 0x8B, 0x18, 0xFC, 0x47, 0x02, 0x9A, 0x48, 0xF6, 0x43, 0x01, 0x17, 0x50, + 0x40, 0x01, 0x59, 0x00, 0xEC, 0xFA, 0x0D, 0x08, 0x3E, 0xD4, 0x87, 0x5F, 0xD0, 0x0D, 0x66, 0xF8, + 0x8B, 0x6E, 0x79, 0x01, 0xDC, 0x81, 0x30, 0x27, 0x7F, 0x84, 0x0A, 0x58, 0xC1, 0x3D, 0xF1, 0x13, + 0xDD, 0xA3, 0x10, 0xF7, 0xAD, 0x47, 0x0A, 0x8C, 0x03, 0x18, 0x01, 0xF6, 0x15, 0x3D, 0x50, 0x81, + 0x61, 0x81, 0x16, 0xF0, 0x0D, 0x18, 0x91, 0xF3, 0x69, 0x3E, 0x13, 0xAA, 0x00, 0x43, 0x3A, 0x03, + 0x3A, 0x00, 0x00, 0x5B, 0xB5, 0xC1, 0x04, 0x78, 0x9C, 0x73, 0x65, 0xC0, 0x00, 0xF7, 0x31, 0x85, + 0xDE, 0x63, 0x0A, 0xFD, 0x67, 0x84, 0xB1, 0x02, 0x98, 0x60, 0x42, 0xEC, 0x30, 0xA1, 0x09, 0xF5, + 0x30, 0x21, 0x7B, 0xB8, 0xD0, 0x7F, 0x1D, 0xA8, 0xD0, 0xFF, 0x9E, 0xB0, 0x50, 0x30, 0xD8, 0xFA,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0x84, 0xE2, 0x11, 0x21, 0x61, 0x0B, 0x61, 0xFC, 0xE7, + 0x80, 0x0B, 0xF5, 0x43, 0x19, 0xFF, 0x99, 0x60, 0x42, 0x09, 0xCC, 0x50, 0xC6, 0x7B, 0xCC, 0x10, + 0xBF, 0x8F, 0x29, 0x14, 0x86, 0x29, 0x04, 0x00, 0x09, 0x3E, 0xCC, 0x02, 0x78, 0x9C, 0x65, 0xD0, + 0x5F, 0x0D, 0x80, 0x20, 0x10, 0xC0, 0x61, 0x50, 0x36, 0x37, 0x1C, 0x0F, 0x24, 0x30, 0x82, 0x11, + 0xB0, 0x81, 0x36, 0x31, 0x82, 0x11, 0xAC, 0xA0, 0x09, 0x8C, 0x60, 0x14, 0xA2, 0x9C, 0x3A, 0xF9, + 0xF1, 0x00, 0xF7, 0x72, 0xDF, 0xD8, 0xB8, 0x7F, 0x4A, 0xE5, 0x58, 0xC0, 0x61, 0x80, 0x03, 0x3B, + 0x90, 0xE6, 0x4B, 0xDE, 0x9F, 0xD2, 0x7F, 0x90, 0x37, 0x66, 0x10, 0x81, 0x74, 0x60, 0x04, 0x37, + 0x10, 0x03, 0x1C, 0xD8, 0x80, 0x68, 0x60, 0xC1, 0x0C, 0x22, 0x10, 0x53, 0xBE, 0x84, 0xEA, 0x17, + 0x75, 0xD6, 0xAA, 0x57, 0x9B, 0x70, 0x31, 0xCF, 0x50, 0xCE, 0x9C, 0xB7, 0x08, 0xAC, 0x6C, 0x81, + 0x4E, 0xD8, 0xAA, 0xFB, 0x70, 0xB1, 0xE9, 0x4F, 0x0F, 0xDF, 0x4C, 0xA5, 0x31, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x00, 0x77, 0x06, 0x34, 0xF0, 0x82, 0x11, 0x4D, 0xE0, 0x07, 0x37, 0x94, 0x21, 0x08, + 0x05, 0x3F, 0xE6, 0x43, 0x05, 0xFE, 0xC3, 0x01, 0x3B, 0xBA, 0x40, 0x3F, 0xBA, 0xC0, 0x7F, 0x2E, + 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x9A, 0xB5, 0x10, 0x87, 0x21, 0x39, 0xFD, 0xC7, 0xFF, 0xF5, + 0x28, 0xBE, 0x4D, 0x80, 0x78, 0x0E, 0xC3, 0xFB, 0xC8, 0x01, 0xA4, 0x8F, 0x12, 0x40, 0xE8, 0x41, + 0x08, 0x0C, 0xE4, 0x7C, 0x64, 0x47, 0x83, 0xA2, 0x81, 0x03, 0x59, 0x00, 0x18, 0x51, 0x95, 0x10, + 0x06, 0x00, 0x81, 0x44, 0x55, 0x29, 0x78, 0x9C, 0x63, 0x60, 0x00, 0x83, 0x09, 0x33, 0x67, 0xB2, + 0x30, 0x20, 0x83, 0x0F, 0xFF, 0xCF, 0xDB, 0xA1, 0x09, 0xF4, 0x3F, 0x65, 0x46, 0x13, 0x48, 0xD0, + 0x43, 0x13, 0x60, 0x78, 0xC6, 0x84, 0x26, 0x50, 0x20, 0x0B, 0x62, 0x09, 0x42, 0xC0, 0x47, 0xA0, + 0x00, 0xC3, 0x0D, 0x46, 0xA0, 0xC0, 0x7F, 0x18, 0x00, 0x0A, 0x4C, 0xE0, 0x01, 0x0B, 0x20, 0xD9, + 0x7F, 0x0A, 0x5D, 0x60, 0x03, 0x37, 0x9A, 0x00, 0xC3, 0x1A, 0x74, 0x81, 0x03, 0x9C, 0x68, 0x02, + 0x02, 0xBD, 0x84, 0x04, 0x2E, 0xA2, 0x6B, 0x41, 0x37, 0x14, 0xC3, 0xDA, 0x5D, 0x68, 0x4E, 0x5F, + 0xC0, 0x83, 0xEA, 0x5B, 0x86, 0x9B, 0x8C, 0xA8, 0x02, 0x0D, 0xB2, 0x68, 0xE1, 0xF1, 0x9C, 0x11, + 0x55, 0x00, 0x23, 0x08, 0x9F, 0x32, 0xA1, 0x0A, 0xA0, 0x45, 0x03, 0x30, 0xA2, 0xA0, 0xB1, 0x00, + 0x00, 0xBF, 0xF2, 0x5A, 0x17, 0x78, 0x9C, 0x63, 0x60, 0x40, 0x02, 0x2C, 0x0C, 0xA8, 0x20, 0x21, +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D, 0x40, 0x09, + 0x4E, 0x98, 0xDB, 0x02, 0xFE, 0xFF, 0x9F, 0xCF, 0xC0, 0xF0, 0x0F, 0xEC, 0x6A, 0x86, 0xAF, 0xFF, + 0xFF, 0x73, 0x30, 0x30, 0x3C, 0x02, 0x73, 0x80, 0x12, 0xFD, 0x40, 0xB5, 0x0A, 0x20, 0x29, 0xF9, + 0x6F, 0x60, 0x09, 0x06, 0x86, 0x4B, 0x40, 0x4E, 0x3D, 0x10, 0xC1, 0x2D, 0x07, 0xCA, 0xB2, 0xC3, + 0x39, 0x07, 0xFF, 0xE7, 0x23, 0x85, 0xC8, 0x0F, 0x36, 0x24, 0x8E, 0x00, 0x84, 0x02, 0x00, 0x4D, + 0x9C, 0x48, 0x37, 0x78, 0x9C, 0x4D, 0x90, 0xBB, 0x11, 0xC2, 0x30, 0x10, 0x44, 0x57, 0xC0, 0x20, + 0xC0, 0x89, 0xA9, 0xC0, 0x0C, 0x39, 0x9F, 0x0E, 0x70, 0x07, 0xD0, 0x81, 0x4B, 0x80, 0x0E, 0xA0, + 0x03, 0x97, 0xE0, 0x12, 0x4C, 0x0B, 0x14, 0x40, 0x42, 0x09, 0x26, 0x23, 0x21, 0x00, 0x7B, 0x88, + 0x58, 0x4E, 0xC6, 0xA3, 0xD3, 0x8E, 0x46, 0xDA, 0x77, 0x77, 0x3A, 0x7D, 0x00, 0xA7, 0x18, 0x81, + 0x3E, 0x43, 0xF5, 0x17, 0xEE, 0x15, 0xBE, 0xA4, 0x6D, 0xCD, 0x8D, 0xE4, 0x51, 0x86, 0xF3, 0x33, + 0x89, 0x32, 0x69, 0xC8, 0x91, 0x40, 0x45, 0x07, 0x3B, 0x32, 0xFF, 0x97, 0x0B, 0xA0, 0x26, 0xC7, + 0xC0, 0x66, 0x2A, 0x32, 0x90, 0x54, 0x01, 0xAC, 0xBA, 0x86, 0x6F, 0x72, 0xE2, 0x21, 0x25, 0x4B, + 0x0F, 0x78, 0x49, 0xCA, 0xC3, 0x5A,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 0x1F, 0x2B, 0x84, 0x05, 0x00, 0x22, 0x56, 0x51, 0x22, 0x78, 0x9C, 0x63, 0x60, 0x80, + 0x83, 0x00, 0x06, 0x74, 0xF0, 0x81, 0x0D, 0x43, 0x24, 0x1F, 0x43, 0xE4, 0x3F, 0x44, 0xD1, 0x84, + 0xBB, 0x30, 0xF0, 0xF7, 0x3F, 0x44, 0xD1, 0xCF, 0xFF, 0x70, 0xF0, 0x15, 0xAC, 0x68, 0x02, 0x42, + 0xE0, 0xBF, 0xC3, 0xFF, 0x7A, 0xA0, 0xC8, 0x05, 0x16, 0x24, 0x93, 0xBE, 0xFC, 0x67, 0x07, 0x3A, + 0x82, 0x07, 0x49, 0x04, 0xA2, 0x28, 0x86, 0x01, 0x5D, 0xD1, 0x15, 0x06, 0x14, 0x45, 0xFD, 0x0C, + 0x0C, 0x07, 0xD8, 0x50, 0x15, 0x31, 0xA3, 0x1A, 0xC4, 0x50, 0x10, 0xCF, 0xC0, 0xB0, 0x80, 0x1D, + 0x45, 0x0D, 0x2B, 0x03, 0xC3, 0x47, 0x46, 0x24, 0x01, 0x03, 0xA0, 0x12, 0x86, 0x15, 0xC8, 0x4A, + 0x1E, 0x03, 0x95, 0x30, 0xD8, 0x21, 0x09, 0x28, 0xC4, 0x01, 0x89, 0x04, 0x5E, 0x24, 0x91, 0x47, + 0x20, 0x7B, 0x0F, 0x20, 0xF9, 0x4B, 0x21, 0x0F, 0x24, 0x2C, 0x20, 0x08, 0x07, 0x1F, 0x2F, 0xA1, + 0x07, 0xE2, 0x87, 0x5C, 0x06, 0x74, 0x11, 0x8C, 0x70, 0x4E, 0x80, 0x50, 0x00, 0x7B, 0x3A, 0x4F, + 0x89, 0x78, 0x9C, 0x63, 0x60, 0x60, 0x70, 0xD8, 0xF1, 0xF6, 0xFF, 0xBD, 0x1E, 0x51, 0x06, 0x08, + 0x58, 0xF4, 0x1F, 0x08, 0xCE, 0xFF, 0xFB, 0x6F, 0x05, 0xE6, 0x4D, 0x00,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0x2C, 0x40, 0x91, 0x0D, 0x60, 0x99, 0x02, 0xA8, + 0x88, 0x3D, 0x50, 0x24, 0x00, 0x48, 0xB3, 0x31, 0x30, 0xFC, 0x81, 0x88, 0xBC, 0x67, 0x66, 0x60, + 0x30, 0x00, 0xD2, 0xF5, 0x0C, 0x0C, 0x9F, 0xA1, 0x8A, 0xEE, 0xAF, 0x5E, 0xF5, 0x1A, 0x62, 0xC7, + 0x84, 0xFF, 0xA8, 0x20, 0x9E, 0x41, 0x00, 0x4D, 0xE4, 0x3C, 0x58, 0x33, 0x32, 0xE8, 0x67, 0x38, + 0x00, 0x63, 0x9E, 0x3D, 0xF3, 0x17, 0x44, 0xF1, 0x30, 0x7C, 0x83, 0x0A, 0x00, 0xAD, 0x75, 0x00, + 0x52, 0xFB, 0x19, 0x04, 0xFE, 0x21, 0x1C, 0x0D, 0x12, 0xE1, 0x66, 0x58, 0x00, 0x55, 0xC2, 0x09, + 0x14, 0x01, 0xB2, 0xD7, 0x33, 0x30, 0x7C, 0x81, 0xD9, 0x00, 0xF1, 0x17, 0x27, 0xDC, 0xC9, 0x72, + 0x20, 0x91, 0x02, 0xB0, 0xDE, 0x67, 0x10, 0x25, 0x4C, 0xE0, 0xA0, 0x31, 0x64, 0x04, 0x12, 0x00, + 0x43, 0x89, 0xC0, 0x7F, 0x78, 0x9C, 0x63, 0x48, 0xEE, 0x00, 0x82, 0x8A, 0x74, 0x66, 0x06, 0x04, + 0x68, 0xF8, 0x0F, 0x01, 0xFB, 0x19, 0x19, 0x18, 0x04, 0x6E, 0x72, 0x80, 0xC5, 0x3E, 0x40, 0xC5, + 0xFE, 0x73, 0x33, 0x30, 0x2C, 0xF8, 0x7F, 0x9E, 0x11, 0x24, 0xF6, 0x09, 0x26, 0x16, 0xCF, 0xC0, + 0xF0, 0xE0, 0xFF, 0x7F, 0x19, 0x14, 0x75, 0xF7, 0x19, 0x18, 0x2E, 0xFC, 0x87, 0x28, 0x3C, 0x00, + 0x13, 0xFB, 0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2B, 0x3E, 0x3A, 0xF4, + 0x74, 0xEC, 0x5B, 0x43, 0x6E, 0x48, 0x59, 0x33, 0xF0, 0x8B, 0x18, 0x64, 0x1E, 0xFA, 0xB5, 0x52, + 0x8F, 0x9A, 0x4B, 0x5E, 0xC6, 0xAE, 0xFB, 0x55, 0xD0, 0xA6, 0x7D, 0x0F, 0x1A, 0x5B, 0x01, 0x48, + 0x4A, 0x00, 0x2F, 0x14, 0x3A, 0x13, 0x24, 0x47, 0x71, 0xE8, 0x55, 0xA0, 0x51, 0x00, 0x66, 0xE5, + 0x45, 0x90, 0xA1, 0x51, 0x1D, 0x98, 0xF0, 0xD3, 0xA2, 0x20, 0x57, 0xA5, 0x1D, 0x86, 0x6C, 0x26, + 0x51, 0x94, 0x83, 0x79, 0x99, 0x69, 0x64, 0x72, 0x3B, 0x8B, 0x49, 0x97, 0x52, 0xA1, 0x45, 0x21, + 0x7C, 0xA5, 0x9D, 0x08, 0x86, 0x59, 0x60, 0x11, 0x55, 0x7D, 0x66, 0x11, 0xD8, 0xD1, 0x71, 0x12, + 0xD3, 0x18, 0x70, 0xBA, 0x27, 0x48, 0xE9, 0x88, 0x5B, 0xF9, 0xBA, 0x55, 0x10, 0x6B, 0x9A, 0xD0, + 0x36, 0xE3, 0x64, 0xFA, 0x1A, 0x75, 0x54, 0x3A, 0x45, 0x53, 0x64, 0x50, 0x93, 0xE5, 0x11, 0xC5, + 0xFB, 0x59, 0xA4, 0x06, 0x46, 0x0D, 0xDC, 0x90, 0x06, 0x42, 0xA5, 0xE4, 0xC7, 0x26, 0x43, 0xDD, + 0x82, 0xA4, 0x10, 0xB7, 0xFD, 0x26, 0xDA, 0xE8, 0xA7, 0x51, 0x31, 0xD9, 0x41, 0x73, 0x88, 0xD5, + 0xBF, 0x12, 0x45, 0x0C, 0xD3, 0xFF, 0x59, 0x65, 0x2A, 0x70, 0x6B, 0x85, 0x81, 0xD4, 0xFC, 0x44, + 0x7E, 0x52, 0x42, 0x41, 0x2B, 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0x1F, 0x9C, 0xD5, 0x3D, 0x93, 0x8F, 0xEA, 0xF8, + 0xCE, 0x54, 0x68, 0xB5, 0x1C, 0x86, 0x0D, 0x63, 0x34, 0x4B, 0x0C, 0x56, 0xC5, 0x89, 0x37, 0x30, + 0xBD, 0xDC, 0x1F, 0x7E, 0x21, 0xBE, 0xD2, 0xCE, 0x20, 0xDF, 0x43, 0x8A, 0xC0, 0xA1, 0x29, 0xD1, + 0xB2, 0x95, 0x0D, 0x03, 0x4C, 0xA9, 0x67, 0xDE, 0x65, 0x7C, 0x2A, 0xA3, 0xE9, 0x6B, 0x2E, 0x49, + 0xB6, 0x7D, 0xA5, 0xF9, 0x89, 0x17, 0xE7, 0x43, 0x64, 0x48, 0x8F, 0x64, 0x16, 0x7D, 0x72, 0x93, + 0x90, 0xBA, 0x20, 0x2F, 0x02, 0x7D, 0x01, 0xFF, 0xBE, 0xF4, 0xCE, 0x77, 0xA2, 0x90, 0x83, 0x4C, + 0x90, 0x8C, 0x10, 0xDA, 0x8A, 0xE7, 0x25, 0x42, 0x33, 0x65, 0x32, 0xB7, 0xBB, 0x40, 0x43, 0xEC, + 0x11, 0xDD, 0x63, 0x31, 0x23, 0x31, 0x7D, 0x58, 0x8D, 0xC6, 0x9F, 0x40, 0xA9, 0x60, 0x93, 0x48, + 0x01, 0xFD, 0x01, 0x84, 0xDE, 0x25, 0xDA, 0x84, 0x6B, 0x42, 0xC7, 0x62, 0x97, 0x86, 0x65, 0xEE, + 0xA2, 0x0E, 0xDD, 0x18, 0x93, 0x84, 0xE1, 0x17, 0xC5, 0xDF, 0x98, 0x65, 0x78, 0x9C, 0x8D, 0x52, + 0x3D, 0x4B, 0xC3, 0x50, 0x14, 0x3D, 0x69, 0x12, 0xD3, 0xD2, 0xDA, 0x06, 0x37, 0x91, 0xB6, 0x59, + 0xBB, 0x68, 0x16, 0x07, 0x41, 0x68, 0x40, 0x70, 0x52, 0x1B, 0x5C, 0x05, 0xDB, 0x1F, 0x20, 0x36, +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A4, 0x33, 0x6E, 0x64, 0x79, 0xC0, 0xE1, 0xB0, 0x0E, 0x68, 0x80, 0x3F, 0x03, 0xC3, 0x6D, + 0x60, 0x10, 0xFD, 0xB7, 0x63, 0x60, 0x78, 0xC9, 0xC8, 0xF0, 0x88, 0x9D, 0xE1, 0x01, 0x3B, 0x03, + 0xC3, 0x43, 0x6E, 0x86, 0x09, 0x4A, 0x9C, 0xE0, 0x10, 0x73, 0xD0, 0x07, 0x5B, 0x64, 0xB0, 0x1E, + 0x6C, 0xC5, 0x77, 0xA0, 0x24, 0x43, 0x37, 0x10, 0x02, 0xC1, 0x63, 0x90, 0xB3, 0x37, 0xE7, 0x43, + 0x9C, 0x04, 0x09, 0xA4, 0x9F, 0xEB, 0x3A, 0x6E, 0xED, 0x07, 0x7B, 0xEA, 0x23, 0x83, 0x3E, 0x24, + 0xA8, 0xA7, 0xEE, 0xAE, 0x82, 0xF8, 0xF2, 0x03, 0x93, 0x3E, 0x83, 0x02, 0x2C, 0x74, 0x19, 0x18, + 0x16, 0xB0, 0x41, 0x44, 0xF8, 0xE1, 0x22, 0x07, 0xD8, 0x69, 0x2A, 0x02, 0x00, 0x72, 0x6E, 0x6A, + 0x09, 0x78, 0x9C, 0x45, 0xD1, 0xBD, 0x4A, 0x03, 0x41, 0x10, 0x07, 0xF0, 0x7F, 0xE2, 0x45, 0x43, + 0xE2, 0xC7, 0x45, 0xB0, 0x14, 0x63, 0x63, 0xA3, 0xC8, 0x81, 0x01, 0xCB, 0x08, 0x36, 0x6A, 0x93, + 0xF8, 0x02, 0x7E, 0x3C, 0x80, 0xA8, 0x95, 0x65, 0x04, 0x1F, 0xE0, 0xCE, 0x07, 0x08, 0xD7, 0x59, + 0x88, 0x85, 0x62, 0x19, 0x21, 0x62, 0x2B, 0x98, 0x14, 0x82, 0x44, 0x8B, 0x8D, 0x3E, 0x40, 0x82, + 0x97, 0x0F, 0x73, 0x5E, 0xEE, 0xC6, 0xD9, 0xBD, 0x1C, 0x6E, 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33, 0x4D, 0x77, 0xC0, 0xE8, 0x1F, 0x8C, 0x19, 0x37, 0x58, + 0xD6, 0xBA, 0xB6, 0xF2, 0x30, 0x2B, 0xE9, 0x16, 0xAC, 0xC7, 0xEF, 0x8F, 0x93, 0x37, 0xA9, 0x8B, + 0x46, 0xBA, 0x6F, 0xBE, 0xF5, 0xB1, 0x82, 0xFE, 0x34, 0xBC, 0x08, 0x6A, 0x05, 0xB5, 0x81, 0x65, + 0x87, 0x75, 0x30, 0xA2, 0xC4, 0xFC, 0xD2, 0x0B, 0x16, 0xFB, 0x50, 0xED, 0x44, 0x3B, 0x6C, 0xFD, + 0xBC, 0x96, 0x0F, 0x6E, 0x87, 0x02, 0x79, 0xA4, 0x25, 0x53, 0x86, 0xCE, 0xE7, 0xB6, 0x79, 0xB9, + 0x35, 0x35, 0x46, 0x9F, 0xF5, 0x12, 0x51, 0x51, 0xC0, 0x52, 0xCA, 0x10, 0x02, 0x87, 0xFB, 0x2F, + 0xC0, 0x22, 0x8F, 0xC8, 0x51, 0xCD, 0x28, 0xB7, 0x04, 0x4F, 0x9C, 0xED, 0x48, 0xC1, 0x76, 0xB8, + 0x25, 0x90, 0x32, 0xE8, 0xD9, 0x5D, 0xF0, 0x65, 0x07, 0xB1, 0xED, 0x04, 0xA9, 0xDC, 0xA0, 0x1E, + 0x37, 0x57, 0xAD, 0xDC, 0x22, 0x0F, 0xF3, 0x0B, 0x13, 0x61, 0xFD, 0x45, 0x78, 0x9C, 0x6D, 0x52, + 0x3B, 0x4E, 0xC3, 0x40, 0x10, 0xDD, 0x24, 0x04, 0x48, 0xC4, 0xC7, 0x05, 0x05, 0x42, 0x42, 0x04, + 0x71, 0x00, 0x22, 0x41, 0x41, 0x05, 0xA9, 0x69, 0x48, 0x43, 0xED, 0x1C, 0xC1, 0xA2, 0x84, 0x22, + 0xB9, 0x01, 0xDC, 0x20, 0xB9, 0x00, 0x4A, 0x04, 0x12, 0x94, 0x81, 0x8A, 0xD2, 0x88, 0x86,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 0xCC, 0xB8, 0x09, 0xFC, 0x35, 0x29, 0x8A, 0xC0, 0x1C, + 0x0D, 0x83, 0xE3, 0xCC, 0x8D, 0x90, 0xD4, 0x15, 0xD3, 0x43, 0x68, 0xDA, 0xE7, 0xF8, 0x8B, 0x37, + 0x3D, 0xF3, 0x20, 0x0A, 0x26, 0xE4, 0xC1, 0x4E, 0xFE, 0x28, 0x47, 0x14, 0xFB, 0x8F, 0x64, 0xFC, + 0x02, 0x54, 0x3B, 0x00, 0xA5, 0x78, 0x9C, 0x6D, 0x52, 0xBB, 0x4A, 0x03, 0x51, 0x10, 0x9D, 0x24, + 0x2E, 0x42, 0x94, 0x24, 0x10, 0x24, 0x8D, 0x8F, 0xF4, 0x82, 0xC4, 0x0F, 0x10, 0xB5, 0xB0, 0x36, + 0xBD, 0x85, 0x69, 0xC4, 0x4A, 0x22, 0x88, 0x95, 0x45, 0xF2, 0x05, 0x26, 0x7F, 0xA0, 0xE2, 0x07, + 0xAC, 0x7E, 0x81, 0xFA, 0x05, 0xB1, 0x50, 0x10, 0x9B, 0x25, 0x20, 0xB6, 0x6B, 0xD0, 0xF8, 0x48, + 0x36, 0x7B, 0x9C, 0xB9, 0x73, 0xAF, 0xC4, 0x25, 0xA7, 0x99, 0xE1, 0xDC, 0xD9, 0x39, 0x67, 0x66, + 0x96, 0x88, 0x51, 0xD9, 0xDB, 0x22, 0x87, 0x29, 0x0D, 0x97, 0x00, 0x6E, 0x6C, 0xFE, 0xEA, 0x9B, + 0x70, 0x0E, 0x41, 0x27, 0x2D, 0xF9, 0x23, 0x30, 0xCF, 0xA1, 0x30, 0x32, 0x1C, 0x76, 0x39, 0xBF, + 0xE6, 0x18, 0x66, 0x88, 0xEE, 0x61, 0x31, 0x4D, 0x35, 0x13, 0x17, 0x89, 0x7E, 0x80, 0xD3, 0x62, + 0xE1, 0x28, 0x42, 0x83, 0x06, 0x42, 0xED, 0xB0, 0x26, 0xD0, 0x92, 0x4E, 0xD5, 0x18, 0x4F, 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 0x8C, 0xB1, 0x07, 0x43, 0x84, + 0x14, 0xC6, 0xCE, 0xD9, 0x50, 0xC6, 0xEF, 0xFF, 0x50, 0xC6, 0xD2, 0x59, 0x50, 0xDB, 0xBF, 0xBF, + 0x87, 0xB8, 0x5E, 0xC0, 0x3C, 0x12, 0x22, 0x15, 0xE0, 0x92, 0xE8, 0x02, 0x66, 0x14, 0x38, 0x3B, + 0x96, 0x80, 0x19, 0x0D, 0x4E, 0x46, 0x2D, 0x10, 0x86, 0xB1, 0x32, 0x8C, 0x21, 0x02, 0x61, 0x04, + 0xA8, 0xA9, 0x85, 0x00, 0x29, 0x85, 0x72, 0x41, 0x49, 0x77, 0x31, 0x05, 0x66, 0x86, 0x54, 0x47, + 0x4D, 0x75, 0x77, 0x35, 0xF7, 0x29, 0x4C, 0x1C, 0xD9, 0x6D, 0x4E, 0xE9, 0x49, 0x33, 0xD8, 0x39, + 0x38, 0x99, 0x1B, 0x44, 0x54, 0x36, 0x33, 0xB1, 0x71, 0x4E, 0xE1, 0x10, 0x60, 0x67, 0xD0, 0x60, + 0x98, 0x05, 0xF2, 0x2C, 0x13, 0x03, 0x23, 0x90, 0x04, 0x00, 0x1B, 0x8D, 0x31, 0x30, 0x78, 0x9C, + 0x53, 0xE8, 0x62, 0x67, 0xC0, 0x00, 0x0D, 0x0C, 0x01, 0x98, 0x82, 0x01, 0x96, 0x1E, 0x98, 0x82, + 0x0C, 0x0C, 0xD8, 0x04, 0x1B, 0x4C, 0xB0, 0x08, 0x56, 0x32, 0x1B, 0x19, 0x3B, 0x0B, 0xA3, 0x99, + 0xC9, 0xDC, 0x52, 0x51, 0x11, 0xD6, 0x3C, 0xED, 0xDE, 0x5D, 0x20, 0x38, 0x5B, 0xC5, 0x0C, 0x11, + 0x75, 0x50, 0x61, 0x10, 0x34, 0x9A, 0xFA, 0x66, 0xCF, 0x99, 0x33, 0x67, 0xE6, 0xFC, 0xFB, 0xFF, + 0x5E, 0x13, 0x2C, 0x58, 0x3C, 0x33, 0xC3, 0x44, 0x68, 0xE6, 0xAF, 0xDF, 0xFF, 0xFF, 0xFF, 0xDF, + 0x73, 0xFF, 0xED, 0xDD, 0xFF, 0x5E, 0x2E, 0x2E, 0x8C, 0x0C, 0x01, 0xC6, 0x21, 0x65, 0x33, 0xAA, + 0xCF, 0xAC, 0xD9, 0xBD, 0x7B, 0xF7, 0xEC, 0xDE, 0xB6, 0xDD, 0x62, 0x20, 0x85, 0x09, 0x22, 0x65, + 0x6E, 0xC6, 0xC1, 0x69, 0x2E, 0x1D, 0x20, 0x50, 0xA1, 0x0A, 0xB5, 0xA9, 0x9D, 0xB9, 0xA4, 0xA3, + 0x42, 0x14, 0xCD, 0x49, 0x05, 0xD8, 0xDC, 0xC9, 0x10, 0x81, 0x29, 0x54, 0x30, 0x25, 0x15, 0x53, + 0x70, 0x02, 0xA3, 0x0B, 0xA6, 0xA0, 0x42, 0x27, 0x2B, 0xA6, 0x20, 0x00, 0xF0, 0xEB, 0x36, 0xF5, + 0x78, 0x9C, 0x63, 0x60, 0x80, 0x02, 0x07, 0x66, 0x06, 0x66, 0x06, 0x56, 0x86, 0x52, 0x46, 0x4F, + 0x36, 0x01, 0x76, 0xC6, 0x30, 0x06, 0x49, 0x4E, 0x0E, 0xF6, 0x46, 0xA1, 0xD4, 0x46, 0x56, 0x16, + 0x0E, 0x0E, 0xD3, 0x29, 0x4E, 0xE1, 0x2E, 0x2E, 0xCE, 0x6C, 0x05, 0x2B, 0x38, 0xD5, 0xCD, 0xD9, + 0x4B, 0xC2, 0x81, 0xCA, 0x05, 0x34, 0xCD, 0x55, 0xC1, 0xFA, 0x02, 0xD4, 0xC4, 0x52, 0xC0, 0x8C, + 0x06, 0x63, 0x91, 0x16, 0x08, 0xC3, 0x59, 0x19, 0xC2, 0x98, 0x10, 0x64, 0x04, 0x61, 0x14, 0x04, + 0x3B, 0x96, 0x40, 0x14, 0x87, 0x24, 0xBA, 0x80, 0x19, 0x02, 0xE6, 0x91, 0xEC, 0x10, 0x7B, 0xBF, + 0xBF, 0x67, 0x81, 0x30, 0x96, 0xCC, 0x62, 0x84, 0x30, 0x7E, 0xFF, 0x87, 0x4A, 0xED, 0x9C, 0x0D, + 0x65, 0xFC, 0xD8, 0x4F, 0x16, 0x63, 0x37, 0xBA, 0xC8, 0xAE, 0xD5, 0x50, 0xC6, 0xAF, 0xBD, 0x6C, + 0x10, 0xC6, 0xCF, 0x18, 0x56, 0x08, 0xE3, 0x5B, 0x2D, 0x13, 0x84, 0xF1, 0x79, 0x0F, 0x34, 0x40, + 0x3E, 0xC0, 0x18, 0x0B, 0xEA, 0xA1, 0x8C, 0x00, 0x79, 0x58, 0x60, 0xF1, 0xC2, 0x18, 0x2C, 0xA4, + 0x30, 0xC0, 0x36, 0x00, 0x00, 0xBA, 0x07, 0x30, 0x75, 0x78, 0x9C, 0x6D, 0x91, 0xB1, 0x4E, 0xC3, + 0x30, 0x10, 0x86, 0x2F, 0x4D, 0x40, 0x8A, 0x40, 0x6A, 0x36, 0x26, 0xA0, 0x33, 0x62, 0xC8, 0x84, + 0x58, 0x10, 0x7D, 0x02, 0x0A, 0xBC, 0x00, 0x30, 0x82, 0x22, 0xB5, 0x6F, 0x50, 0x56, 0x16, 0x9A, + 0x81, 0x01, 0x16, 0x18, 0x19, 0x90, 0x00, 0xB1, 0xA3, 0x64, 0x65, 0x21, 0x1D, 0x58, 0xAB, 0x48, + 0x0C, 0x0C, 0xA8, 0x92, 0x5B, 0xA8, 0x0A, 0xA1, 0x49, 0x7E, 0x6C, 0xC7, 0x2E, 0x95, 0xCA, 0x0D, + 0xA7, 0xBB, 0xEF, 0xEC, 0xDF, 0x77, 0x67, 0xA2, 0x69, 0x73, 0xFE, 0x61, 0x74, 0x21, 0xFD, 0x59, + 0x97, 0xAD, 0xFC, 0x31, 0x3F, 0x16, 0xFE, 0x05, 0x39, 0x50, 0x1A, 0xC3, 0x57, 0x88, 0x4A, 0x64, + 0x39, 0x19, 0x6C, 0xF7, 0xE9, 0x71,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0xAA, 0xF5, 0x88, 0x71, 0xA3, 0x86, 0x77, 0x2D, 0x3D, 0xFA, 0xCA, + 0x60, 0x8C, 0x5A, 0x44, 0x21, 0xE3, 0x72, 0x3A, 0x9D, 0xA0, 0xDA, 0xAF, 0x72, 0x1C, 0xDF, 0xF1, + 0x0C, 0x57, 0x94, 0x79, 0x25, 0xFF, 0xE6, 0xC2, 0xB9, 0xE4, 0x72, 0x06, 0x4D, 0x81, 0x51, 0xB7, + 0x97, 0xBD, 0xFF, 0x82, 0xDF, 0xB9, 0x15, 0xD5, 0x3E, 0x4A, 0xB8, 0xBD, 0xAA, 0xA2, 0xE8, 0x19, + 0x92, 0xB0, 0xD2, 0xBA, 0x4F, 0xCF, 0x67, 0x55, 0x74, 0xE0, 0x0B, 0x1F, 0xD4, 0x6B, 0x64, 0x8A, + 0xA7, 0x57, 0xF6, 0x64, 0x5F, 0x38, 0x29, 0xE1, 0x22, 0x07, 0xFD, 0xF7, 0xC9, 0x7F, 0xC2, 0x7C, + 0x58, 0x13, 0x47, 0x8E, 0xCB, 0xF0, 0x85, 0x99, 0xB3, 0x2E, 0xFA, 0xE2, 0x73, 0x6A, 0xAC, 0xE0, + 0x22, 0x4D, 0x3E, 0x04, 0x57, 0xE0, 0x9E, 0x39, +}; +const GFXglyph FiraSansGlyphs[] = { + { 0, 0, 11, 0, 0, 8, 0 }, // + { 6, 30, 10, 2, 29, 61, 8 }, // ! + { 13, 11, 17, 2, 29, 72, 69 }, // " + { 21, 29, 22, 0, 29, 185, 141 }, // # + { 20, 42, 22, 1, 35, 197, 326 }, // $ + { 32, 33, 34, 1, 31, 313, 523 }, // % + { 26, 31, 30, 3, 30, 266, 836 }, // & + { 5, 11, 9, 2, 29, 42, 1102 }, // ' + { 11, 43, 14, 1, 36, 156, 1144 }, // ( + { 11, 43, 14, 1, 36, 155, 1300 }, // ) + { 18, 17, 18, 0, 32, 124, 1455 }, // * + { 17, 16, 21, 2, 22, 37, 1579 }, // + + { 7, 12, 10, 1, 5, 54, 1616 }, // , + { 13, 4, 17, 2, 16, 19, 1670 }, // - + { 6, 7, 10, 2, 6, 29, 1689 }, // . + { 14, 39, 22, 4, 34, 159, 1718 }, // / + { 19, 30, 23, 2, 29, 202, 1877 }, // 0 + { 13, 29, 18, 1, 29, 61, 2079 }, // 1 + { 18, 29, 21, 1, 29, 160, 2140 }, // 2 + { 19, 30, 21, 0, 29, 188, 2300 }, // 3 + { 20, 30, 22, 1, 30, 133, 2488 }, // 4 + { 18, 30, 21, 1, 29, 139, 2621 }, // 5 + { 19, 30, 22, 2, 29, 217, 2760 }, // 6 + { 17, 30, 19, 1, 29, 90, 2977 }, // 7 + { 21, 30, 23, 1, 29, 234, 3067 }, // 8 + { 19, 31, 22, 1, 29, 209, 3301 }, // 9 + { 6, 22, 10, 2, 21, 35, 3510 }, // : + { 7, 28, 10, 1, 21, 79, 3545 }, // ; + { 17, 19, 21, 2, 23, 117, 3624 }, // < + { 17, 12, 21, 2, 21, 25, 3741 }, // = + { 17, 19, 21, 2, 23, 105, 3766 }, // > + { 17, 31, 19, 1, 30, 160, 3871 }, // ? + { 38, 39, 43, 2, 30, 393, 4031 }, // @ + { 24, 29, 24, 0, 29, 197, 4424 }, // A + { 20, 29, 25, 4, 29, 163, 4621 }, // B + { 21, 31, 23, 2, 30, 172, 4784 }, // C + { 21, 29, 27, 4, 29, 153, 4956 }, // D + { 17, 29, 22, 4, 29, 55, 5109 }, // E + { 16, 29, 20, 4, 29, 47, 5164 }, // F + { 22, 31, 26, 2, 30, 199, 5211 }, // G + { 21, 29, 28, 4, 29, 33, 5410 }, // H + { 5, 29, 12, 4, 29, 14, 5443 }, // I + { 9, 36, 13, 0, 29, 64, 5457 }, // J + { 21, 29, 25, 4, 29, 159, 5521 }, // K + { 16, 29, 21, 4, 29, 31, 5680 }, // L + { 28, 29, 32, 2, 29, 283, 5711 }, // M + { 21, 29, 28, 4, 29, 143, 5994 }, // N + { 25, 31, 29, 2, 30, 206, 6137 }, // O + { 19, 29, 24, 4, 29, 109, 6343 }, // P + { 26, 35, 29, 2, 30, 245, 6452 }, // Q + { 21, 29, 25, 4, 29, 161, 6697 }, // R + { 21, 31, 23, 1, 30, 211, 6858 }, // S + { 22, 29, 22, 0, 29, 41, 7069 }, // T + { 21, 30, 28, 3, 29, 106, 7110 }, // U + { 23, 29, 23, 0, 29, 199, 7216 }, // V + { 33, 29, 34, 1, 29, 303, 7415 }, // W + { 23, 29, 23, 0, 29, 203, 7718 }, // X + { 23, 29, 23, 0, 29, 149, 7921 }, // Y + { 19, 29, 22, 1, 29, 137, 8070 }, // Z + { 10, 40, 13, 2, 35, 31, 8207 }, // [ + { 14, 39, 22, 4, 34, 153, 8238 }, // + { 9, 40, 13, 2, 35, 32, 8391 }, // ] + { 20, 14, 23, 1, 36, 112, 8423 }, // ^ + { 21, 4, 22, 0, -2, 19, 8535 }, // _ + { 11, 8, 13, 1, 34, 48, 8554 }, // ` + { 20, 24, 22, 1, 23, 167, 8602 }, // a + { 20, 33, 24, 3, 32, 164, 8769 }, // b + { 17, 24, 20, 2, 23, 146, 8933 }, // c + { 19, 33, 25, 2, 32, 169, 9079 }, // d + { 19, 24, 23, 2, 23, 171, 9248 }, // e + { 17, 32, 14, 0, 32, 82, 9419 }, // f + { 21, 34, 22, 1, 25, 246, 9501 }, // g + { 18, 32, 24, 3, 32, 86, 9747 }, // h + { 6, 33, 12, 3, 33, 30, 9833 }, // i + { 10, 43, 12, -1, 33, 79, 9863 }, // j + { 19, 32, 21, 3, 32, 131, 9942 }, // k + { 9, 33, 12, 3, 32, 45, 10073 }, // l + { 29, 23, 35, 3, 23, 118, 10118 }, // m + { 18, 23, 24, 3, 23, 87, 10236 }, // n + { 20, 24, 24, 2, 23, 161, 10323 }, // o + { 20, 33, 24, 3, 23, 168, 10484 }, // p + { 19, 33, 25, 2, 23, 167, 10652 }, // q + { 13, 23, 16, 3, 23, 71, 10819 }, // r + { 17, 24, 19, 1, 23, 163, 10890 }, // s + { 16, 29, 15, 0, 28, 82, 11053 }, // t + { 18, 23, 24, 3, 22, 83, 11135 }, // u + { 21, 22, 21, 0, 22, 155, 11218 }, // v + { 30, 22, 30, 0, 22, 240, 11373 }, // w + { 20, 22, 20, 0, 22, 153, 11613 }, // x + { 21, 32, 21, 0, 22, 198, 11766 }, // y + { 16, 22, 18, 1, 22, 108, 11964 }, // z + { 11, 42, 13, 1, 36, 115, 12072 }, // { + { 5, 39, 17, 6, 35, 16, 12187 }, // | + { 12, 42, 13, 1, 36, 103, 12203 }, // } + { 18, 6, 20, 1, 17, 56, 12306 }, // ~ + { 0, 0, 11, 0, 0, 8, 12362 }, //   + { 6, 30, 10, 2, 21, 57, 12370 }, // ¡ + { 17, 35, 20, 2, 29, 147, 12427 }, // ¢ + { 20, 29, 22, 1, 29, 129, 12574 }, // £ + { 22, 23, 23, 1, 25, 186, 12703 }, // ¤ + { 23, 29, 22, 0, 29, 167, 12889 }, // ¥ + { 5, 39, 17, 6, 35, 21, 13056 }, // ¦ + { 18, 32, 22, 2, 29, 210, 13077 }, // § + { 14, 5, 16, 1, 33, 35, 13287 }, // ¨ + { 27, 27, 34, 3, 32, 248, 13322 }, // © + { 17, 29, 21, 2, 29, 141, 13570 }, // ª + { 20, 22, 24, 2, 23, 158, 13711 }, // « + { 17, 10, 21, 2, 16, 26, 13869 }, // ¬ + { 13, 4, 17, 2, 16, 19, 13895 }, // ­ + { 22, 22, 27, 2, 32, 202, 13914 }, // ® + { 12, 4, 14, 1, 32, 19, 14116 }, // ¯ + { 14, 14, 22, 2, 30, 77, 14135 }, // ° + { 17, 22, 21, 2, 23, 46, 14212 }, // ± + { 13, 19, 17, 2, 32, 105, 14258 }, // ² + { 13, 20, 17, 2, 32, 125, 14363 }, // ³ + { 11, 8, 13, 1, 34, 51, 14488 }, // ´ + { 19, 31, 24, 3, 22, 102, 14539 }, // µ + { 22, 39, 31, 3, 29, 97, 14641 }, // ¶ + { 6, 7, 10, 2, 17, 29, 14738 }, // · + { 10, 11, 11, 1, 1, 61, 14767 }, // ¸ + { 10, 18, 17, 2, 31, 43, 14828 }, // ¹ + { 17, 29, 21, 2, 29, 129, 14871 }, // º + { 20, 22, 24, 2, 23, 162, 15000 }, // » + { 36, 36, 39, 2, 32, 249, 15162 }, // ¼ + { 35, 36, 39, 2, 32, 254, 15411 }, // ½ + { 36, 36, 39, 2, 32, 305, 15665 }, // ¾ + { 17, 30, 19, 1, 21, 146, 15970 }, // ¿ + { 24, 38, 24, 0, 38, 234, 16116 }, // À + { 24, 38, 24, 0, 38, 234, 16350 }, // Á + { 24, 39, 24, 0, 39, 247, 16584 }, // Â + { 24, 39, 24, 0, 39, 244, 16831 }, // Ã + { 24, 38, 24, 0, 38, 233, 17075 }, // Ä + { 24, 41, 24, 0, 41, 247, 17308 }, // Å + { 33, 29, 34, -1, 29, 208, 17555 }, // Æ + { 21, 42, 23, 2, 30, 237, 17763 }, // Ç + { 17, 38, 22, 4, 38, 92, 18000 }, // È + { 17, 38, 22, 4, 38, 93, 18092 }, // É + { 17, 39, 22, 4, 39, 106, 18185 }, // Ê + { 17, 38, 22, 4, 38, 91, 18291 }, // Ë + { 11, 38, 12, 0, 38, 52, 18382 }, // Ì + { 11, 38, 12, 1, 38, 53, 18434 }, // Í + { 14, 39, 12, -1, 39, 65, 18487 }, // Î + { 14, 38, 12, -1, 38, 43, 18552 }, // Ï + { 26, 29, 27, 0, 29, 170, 18595 }, // Ð + { 21, 39, 28, 4, 39, 190, 18765 }, // Ñ + { 25, 39, 29, 2, 38, 242, 18955 }, // Ò + { 25, 39, 29, 2, 38, 245, 19197 }, // Ó + { 25, 40, 29, 2, 39, 253, 19442 }, // Ô + { 25, 40, 29, 2, 39, 242, 19695 }, // Õ + { 25, 39, 29, 2, 38, 241, 19937 }, // Ö + { 15, 16, 21, 3, 21, 108, 20178 }, // × + { 25, 41, 29, 2, 35, 311, 20286 }, // Ø + { 21, 39, 28, 3, 38, 142, 20597 }, // Ù + { 21, 39, 28, 3, 38, 144, 20739 }, // Ú + { 21, 40, 28, 3, 39, 159, 20883 }, // Û + { 21, 39, 28, 3, 38, 139, 21042 }, // Ü + { 23, 38, 23, 0, 38, 190, 21181 }, // Ý + { 19, 29, 24, 4, 29, 107, 21371 }, // Þ + { 20, 33, 25, 3, 32, 193, 21478 }, // ß + { 20, 35, 22, 1, 34, 197, 21671 }, // à + { 20, 35, 22, 1, 34, 206, 21868 }, // á + { 20, 35, 22, 1, 34, 212, 22074 }, // â + { 20, 35, 22, 1, 34, 209, 22286 }, // ã + { 20, 34, 22, 1, 33, 194, 22495 }, // ä + { 20, 37, 22, 1, 36, 205, 22689 }, // å + { 32, 24, 35, 1, 23, 251, 22894 }, // æ + { 17, 34, 20, 2, 23, 182, 23145 }, // ç + { 19, 35, 23, 2, 34, 201, 23327 }, // è + { 19, 35, 23, 2, 34, 211, 23528 }, // é + { 19, 35, 23, 2, 34, 212, 23739 }, // ê + { 19, 34, 23, 2, 33, 201, 23951 }, // ë + { 11, 34, 12, 1, 34, 55, 24152 }, // ì + { 11, 34, 12, 0, 34, 58, 24207 }, // í + { 15, 34, 12, -2, 34, 68, 24265 }, // î + { 15, 33, 12, -2, 33, 45, 24333 }, // ï + { 20, 34, 24, 2, 33, 232, 24378 }, // ð + { 18, 34, 24, 3, 34, 130, 24610 }, // ñ + { 20, 35, 24, 2, 34, 191, 24740 }, // ò + { 20, 35, 24, 2, 34, 190, 24931 }, // ó + { 20, 35, 24, 2, 34, 198, 25121 }, // ô + { 20, 35, 24, 2, 34, 199, 25319 }, // õ + { 20, 34, 24, 2, 33, 183, 25518 }, // ö + { 17, 26, 21, 2, 27, 57, 25701 }, // ÷ + { 20, 34, 24, 2, 28, 235, 25758 }, // ø + { 18, 35, 24, 3, 34, 123, 25993 }, // ù + { 18, 35, 24, 3, 34, 121, 26116 }, // ú + { 18, 35, 24, 3, 34, 131, 26237 }, // û + { 18, 34, 24, 3, 33, 111, 26368 }, // ü + { 21, 44, 21, 0, 34, 235, 26479 }, // ý + { 20, 42, 24, 3, 32, 166, 26714 }, // þ + { 21, 43, 21, 0, 33, 231, 26880 }, // ÿ + { 42, 53, 42, 0, 39, 27, 27111 }, // ─ + { 42, 54, 42, 0, 39, 27, 27138 }, // ━ + { 43, 53, 42, -1, 39, 29, 27165 }, // │ + { 42, 53, 42, 0, 39, 31, 27194 }, // ┃ + { 43, 53, 42, -1, 39, 34, 27225 }, // ┄ + { 43, 54, 42, -1, 39, 34, 27259 }, // ┅ + { 43, 54, 42, -1, 39, 41, 27293 }, // ┆ + { 42, 54, 42, 0, 39, 42, 27334 }, // ┇ + { 42, 53, 42, 0, 39, 41, 27376 }, // ┈ + { 42, 54, 42, 0, 39, 41, 27417 }, // ┉ + { 43, 54, 42, -1, 39, 51, 27458 }, // ┊ + { 42, 54, 42, 0, 39, 55, 27509 }, // ┋ + { 43, 53, 42, -1, 39, 33, 27564 }, // ┌ + { 43, 54, 42, -1, 39, 33, 27597 }, // ┍ + { 42, 53, 42, 0, 39, 35, 27630 }, // ┎ + { 42, 54, 42, 0, 39, 35, 27665 }, // ┏ + { 43, 53, 42, -1, 39, 33, 27700 }, // ┐ + { 43, 54, 42, -1, 39, 33, 27733 }, // ┑ + { 42, 53, 42, 0, 39, 34, 27766 }, // ┒ + { 42, 54, 42, 0, 39, 34, 27800 }, // ┓ + { 43, 53, 42, -1, 39, 34, 27834 }, // └ + { 43, 54, 42, -1, 39, 34, 27868 }, // ┕ + { 42, 53, 42, 0, 39, 33, 27902 }, // ┖ + { 42, 54, 42, 0, 39, 33, 27935 }, // ┗ + { 43, 53, 42, -1, 39, 33, 27968 }, // ┘ + { 43, 54, 42, -1, 39, 33, 28001 }, // ┙ + { 42, 53, 42, 0, 39, 36, 28034 }, // ┚ + { 42, 54, 42, 0, 39, 36, 28070 }, // ┛ + { 43, 53, 42, -1, 39, 46, 28106 }, // ├ + { 43, 53, 42, -1, 39, 46, 28152 }, // ┝ + { 42, 54, 42, 0, 39, 45, 28198 }, // ┞ + { 42, 53, 42, 0, 39, 52, 28243 }, // ┟ + { 42, 53, 42, 0, 39, 47, 28295 }, // ┠ + { 42, 54, 42, 0, 39, 51, 28342 }, // ┡ + { 42, 54, 42, 0, 39, 60, 28393 }, // ┢ + { 42, 53, 42, 0, 39, 48, 28453 }, // ┣ + { 43, 53, 42, -1, 39, 45, 28501 }, // ┤ + { 43, 53, 42, -1, 39, 46, 28546 }, // ┥ + { 42, 54, 42, 0, 39, 45, 28592 }, // ┦ + { 42, 53, 42, 0, 39, 45, 28637 }, // ┧ + { 42, 53, 42, 0, 39, 49, 28682 }, // ┨ + { 42, 54, 42, 0, 39, 45, 28731 }, // ┩ + { 42, 54, 42, 0, 39, 44, 28776 }, // ┪ + { 42, 53, 42, 0, 39, 50, 28820 }, // ┫ + { 42, 53, 42, 0, 39, 37, 28870 }, // ┬ + { 42, 54, 42, 0, 39, 49, 28907 }, // ┭ + { 42, 54, 42, 0, 39, 46, 28956 }, // ┮ + { 42, 54, 42, 0, 39, 38, 29002 }, // ┯ + { 42, 53, 42, 0, 39, 38, 29040 }, // ┰ + { 42, 54, 42, 0, 39, 51, 29078 }, // ┱ + { 42, 54, 42, 0, 39, 52, 29129 }, // ┲ + { 42, 54, 42, 0, 39, 38, 29181 }, // ┳ + { 42, 53, 42, 0, 39, 37, 29219 }, // ┴ + { 42, 54, 42, 0, 39, 49, 29256 }, // ┵ + { 42, 54, 42, 0, 39, 46, 29305 }, // ┶ + { 42, 54, 42, 0, 39, 37, 29351 }, // ┷ + { 42, 53, 42, 0, 39, 37, 29388 }, // ┸ + { 42, 54, 42, 0, 39, 49, 29425 }, // ┹ + { 42, 54, 42, 0, 39, 52, 29474 }, // ┺ + { 42, 54, 42, 0, 39, 40, 29526 }, // ┻ + { 42, 53, 42, 0, 39, 55, 29566 }, // ┼ + { 43, 53, 42, -1, 39, 58, 29621 }, // ┽ + { 43, 53, 42, -1, 39, 58, 29679 }, // ┾ + { 42, 53, 42, 0, 39, 56, 29737 }, // ┿ + { 42, 53, 42, 0, 39, 48, 29793 }, // ╀ + { 42, 53, 42, 0, 39, 48, 29841 }, // ╁ + { 42, 53, 42, 0, 39, 55, 29889 }, // ╂ + { 42, 54, 42, 0, 39, 61, 29944 }, // ╃ + { 42, 54, 42, 0, 39, 60, 30005 }, // ╄ + { 42, 54, 42, 0, 39, 61, 30065 }, // ╅ + { 42, 54, 42, 0, 39, 63, 30126 }, // ╆ + { 42, 54, 42, 0, 39, 51, 30189 }, // ╇ + { 42, 54, 42, 0, 39, 48, 30240 }, // ╈ + { 42, 53, 42, 0, 39, 64, 30288 }, // ╉ + { 42, 53, 42, 0, 39, 61, 30352 }, // ╊ + { 42, 53, 42, 0, 39, 56, 30413 }, // ╋ + { 43, 53, 42, -1, 39, 31, 30469 }, // ╌ + { 43, 54, 42, -1, 39, 31, 30500 }, // ╍ + { 43, 54, 42, -1, 39, 36, 30531 }, // ╎ + { 42, 54, 42, 0, 39, 38, 30567 }, // ╏ + { 42, 53, 42, 0, 39, 27, 30605 }, // ═ + { 43, 53, 42, -1, 39, 31, 30632 }, // ║ + { 42, 53, 42, 0, 39, 37, 30663 }, // ╒ + { 43, 53, 42, -1, 39, 36, 30700 }, // ╓ + { 43, 53, 42, -1, 39, 43, 30736 }, // ╔ + { 43, 53, 42, -1, 39, 36, 30779 }, // ╕ + { 43, 53, 42, -1, 39, 37, 30815 }, // ╖ + { 43, 53, 42, -1, 39, 41, 30852 }, // ╗ + { 43, 53, 42, -1, 39, 35, 30893 }, // ╘ + { 43, 53, 42, -1, 39, 36, 30928 }, // ╙ + { 43, 53, 42, -1, 39, 42, 30964 }, // ╚ + { 43, 53, 42, -1, 39, 36, 31006 }, // ╛ + { 43, 53, 42, -1, 39, 36, 31042 }, // ╜ + { 43, 53, 42, -1, 39, 46, 31078 }, // ╝ + { 43, 53, 42, -1, 39, 46, 31124 }, // ╞ + { 43, 53, 42, -1, 39, 47, 31170 }, // ╟ + { 43, 53, 42, -1, 39, 61, 31217 }, // ╠ + { 43, 53, 42, -1, 39, 49, 31278 }, // ╡ + { 43, 53, 42, -1, 39, 50, 31327 }, // ╢ + { 43, 53, 42, -1, 39, 59, 31377 }, // ╣ + { 42, 53, 42, 0, 39, 38, 31436 }, // ╤ + { 42, 53, 42, 0, 39, 42, 31474 }, // ╥ + { 42, 53, 42, 0, 39, 50, 31516 }, // ╦ + { 42, 53, 42, 0, 39, 42, 31566 }, // ╧ + { 42, 53, 42, 0, 39, 41, 31608 }, // ╨ + { 42, 53, 42, 0, 39, 55, 31649 }, // ╩ + { 42, 53, 42, 0, 39, 62, 31704 }, // ╪ + { 42, 53, 42, 0, 39, 59, 31766 }, // ╫ + { 43, 53, 42, -1, 39, 52, 31825 }, // ╬ + { 42, 53, 42, 0, 39, 161, 31877 }, // ╭ + { 42, 53, 42, 0, 39, 164, 32038 }, // ╮ + { 42, 53, 42, 0, 39, 154, 32202 }, // ╯ + { 42, 53, 42, 0, 39, 157, 32356 }, // ╰ + { 47, 54, 42, -3, 39, 200, 32513 }, // ╱ + { 47, 54, 42, -3, 39, 195, 32713 }, // ╲ + { 47, 53, 42, -3, 39, 360, 32908 }, // ╳ + { 42, 53, 42, 0, 39, 25, 33268 }, // ╴ + { 43, 54, 42, -1, 39, 30, 33293 }, // ╵ + { 42, 53, 42, 0, 39, 26, 33323 }, // ╶ + { 43, 54, 42, -1, 39, 30, 33349 }, // ╷ + { 42, 54, 42, 0, 39, 25, 33379 }, // ╸ + { 42, 54, 42, 0, 39, 31, 33404 }, // ╹ + { 42, 54, 42, 0, 39, 26, 33435 }, // ╺ + { 42, 54, 42, 0, 39, 32, 33461 }, // ╻ + { 42, 54, 42, 0, 39, 42, 33493 }, // ╼ + { 42, 54, 42, 0, 39, 45, 33535 }, // ╽ + { 42, 54, 42, 0, 39, 39, 33580 }, // ╾ + { 42, 54, 42, 0, 39, 40, 33619 }, // ╿ + { 42, 54, 42, 0, 39, 28, 33659 }, // ▀ + { 42, 53, 42, 0, 39, 27, 33687 }, // ▁ + { 42, 54, 42, 0, 39, 27, 33714 }, // ▂ + { 42, 53, 42, 0, 39, 28, 33741 }, // ▃ + { 42, 54, 42, 0, 39, 31, 33769 }, // ▄ + { 42, 54, 42, 0, 39, 27, 33800 }, // ▅ + { 42, 53, 42, 0, 39, 29, 33827 }, // ▆ + { 42, 54, 42, 0, 39, 28, 33856 }, // ▇ + { 42, 53, 42, 0, 39, 27, 33884 }, // █ + { 42, 53, 42, 0, 39, 29, 33911 }, // ▉ + { 42, 53, 42, 0, 39, 29, 33940 }, // ▊ + { 42, 53, 42, 0, 39, 27, 33969 }, // ▋ + { 42, 53, 42, 0, 39, 29, 33996 }, // ▌ + { 42, 53, 42, 0, 39, 29, 34025 }, // ▍ + { 42, 53, 42, 0, 39, 29, 34054 }, // ▎ + { 42, 53, 42, 0, 39, 27, 34083 }, // ▏ + { 42, 53, 42, 0, 39, 34, 34110 }, // ▐ + { 42, 54, 42, 0, 39, 99, 34144 }, // ░ + { 42, 53, 42, 0, 39, 134, 34243 }, // ▒ + { 42, 54, 42, 0, 39, 107, 34377 }, // ▓ + { 42, 54, 42, 0, 39, 27, 34484 }, // ▔ + { 42, 53, 42, 0, 39, 31, 34511 }, // ▕ + { 42, 54, 42, 0, 39, 35, 34542 }, // ▖ + { 42, 54, 42, 0, 39, 36, 34577 }, // ▗ + { 42, 54, 42, 0, 39, 30, 34613 }, // ▘ + { 42, 54, 42, 0, 39, 42, 34643 }, // ▙ + { 42, 54, 42, 0, 39, 46, 34685 }, // ▚ + { 42, 54, 42, 0, 39, 37, 34731 }, // ▛ + { 42, 54, 42, 0, 39, 37, 34768 }, // ▜ + { 42, 54, 42, 0, 39, 35, 34805 }, // ▝ + { 42, 54, 42, 0, 39, 52, 34840 }, // ▞ + { 42, 54, 42, 0, 39, 47, 34892 }, // ▟ + { 42, 31, 48, 3, 30, 304, 34939 }, // ✀ + { 38, 23, 42, 2, 26, 191, 35243 }, // ✁ + { 38, 23, 41, 1, 26, 220, 35434 }, // ✂ + { 38, 24, 42, 2, 26, 202, 35654 }, // ✃ + { 42, 31, 48, 3, 30, 407, 35856 }, // ✄ + { 34, 31, 36, 1, 30, 274, 36263 }, // ✅ + { 40, 40, 42, 1, 32, 409, 36537 }, // ✆ + { 40, 40, 42, 1, 32, 425, 36946 }, // ✇ + { 37, 37, 39, 1, 32, 262, 37371 }, // ✈ + { 26, 17, 30, 2, 23, 110, 37633 }, // ✉ + { 30, 33, 33, 2, 29, 365, 37743 }, // ✊ + { 29, 37, 32, 1, 31, 339, 38108 }, // ✋ + { 19, 34, 24, 3, 32, 278, 38447 }, // ✌ + { 35, 23, 38, 1, 22, 248, 38725 }, // ✍ + { 35, 26, 39, 2, 27, 307, 38973 }, // ✎ + { 36, 18, 40, 2, 23, 193, 39280 }, // ✏ + { 35, 26, 39, 2, 28, 309, 39473 }, // ✐ + { 37, 17, 40, 2, 23, 200, 39782 }, // ✑ + { 38, 21, 42, 2, 25, 201, 39982 }, // ✒ + { 29, 31, 33, 2, 30, 171, 40183 }, // ✓ + { 33, 31, 36, 2, 30, 211, 40354 }, // ✔ + { 29, 29, 33, 2, 29, 156, 40565 }, // ✕ + { 29, 29, 33, 2, 29, 180, 40721 }, // ✖ + { 24, 31, 28, 2, 28, 207, 40901 }, // ✗ + { 26, 31, 29, 2, 30, 210, 41108 }, // ✘ + { 29, 29, 33, 2, 29, 92, 41318 }, // ✙ + { 29, 29, 33, 2, 29, 55, 41410 }, // ✚ + { 29, 29, 33, 2, 29, 55, 41465 }, // ✛ + { 29, 29, 33, 2, 29, 56, 41520 }, // ✜ + { 18, 29, 22, 2, 29, 51, 41576 }, // ✝ + { 21, 29, 24, 2, 29, 97, 41627 }, // ✞ + { 20, 29, 24, 2, 29, 102, 41724 }, // ✟ + { 31, 31, 35, 2, 30, 211, 41826 }, // ✠ + { 26, 31, 30, 2, 30, 207, 42037 }, // ✡ + { 30, 30, 34, 2, 29, 197, 42244 }, // ✢ + { 30, 31, 34, 2, 30, 219, 42441 }, // ✣ + { 30, 31, 34, 2, 30, 223, 42660 }, // ✤ + { 31, 31, 34, 2, 30, 228, 42883 }, // ✥ + { 31, 31, 34, 2, 30, 175, 43111 }, // ✦ + { 31, 30, 34, 2, 29, 242, 43286 }, // ✧ + { 38, 37, 42, 2, 30, 279, 43528 }, // ✨ + { 32, 31, 35, 2, 30, 249, 43807 }, // ✩ + { 30, 31, 34, 2, 30, 280, 44056 }, // ✪ + { 33, 31, 36, 2, 30, 231, 44336 }, // ✫ + { 33, 31, 35, 1, 30, 290, 44567 }, // ✬ + { 32, 31, 36, 2, 30, 260, 44857 }, // ✭ + { 32, 31, 35, 2, 30, 296, 45117 }, // ✮ + { 30, 28, 33, 1, 28, 231, 45413 }, // ✯ + { 36, 31, 40, 2, 30, 279, 45644 }, // ✰ + { 29, 29, 32, 2, 29, 206, 45923 }, // ✱ + { 28, 29, 31, 2, 29, 181, 46129 }, // ✲ + { 29, 29, 32, 2, 29, 245, 46310 }, // ✳ + { 31, 30, 34, 2, 29, 239, 46555 }, // ✴ + { 32, 31, 34, 1, 27, 294, 46794 }, // ✵ + { 28, 31, 30, 1, 27, 207, 47088 }, // ✶ + { 30, 31, 33, 2, 30, 241, 47295 }, // ✷ + { 30, 31, 33, 2, 30, 218, 47536 }, // ✸ + { 32, 31, 34, 1, 27, 254, 47754 }, // ✹ + { 29, 29, 33, 2, 29, 338, 48008 }, // ✺ + { 27, 31, 31, 2, 30, 246, 48346 }, // ✻ + { 28, 30, 31, 1, 29, 248, 48592 }, // ✼ + { 27, 30, 30, 1, 29, 261, 48840 }, // ✽ + { 28, 31, 30, 1, 30, 301, 49101 }, // ✾ + { 32, 30, 36, 2, 29, 254, 49402 }, // ✿ + { 32, 31, 35, 2, 30, 346, 49656 }, // ❀ + { 30, 31, 34, 2, 30, 396, 50002 }, // ❁ + { 30, 31, 34, 2, 30, 336, 50398 }, // ❂ + { 27, 31, 31, 2, 30, 327, 50734 }, // ❃ + { 27, 29, 30, 1, 29, 282, 51061 }, // ❄ + { 27, 30, 30, 2, 30, 282, 51343 }, // ❅ + { 27, 29, 30, 1, 29, 306, 51625 }, // ❆ + { 31, 31, 34, 1, 30, 292, 51931 }, // ❇ + { 31, 31, 34, 1, 30, 283, 52223 }, // ❈ + { 27, 30, 31, 2, 29, 221, 52506 }, // ❉ + { 30, 31, 34, 2, 30, 264, 52727 }, // ❊ + { 30, 30, 34, 2, 29, 285, 52991 }, // ❋ + { 25, 25, 28, 1, 27, 137, 53276 }, // ❌ + { 34, 31, 38, 2, 30, 244, 53413 }, // ❍ + { 29, 29, 33, 2, 29, 171, 53657 }, // ❎ + { 29, 30, 33, 2, 29, 56, 53828 }, // ❏ + { 29, 29, 33, 2, 29, 61, 53884 }, // ❐ + { 29, 29, 33, 2, 29, 64, 53945 }, // ❑ + { 29, 29, 33, 2, 29, 66, 54009 }, // ❒ + { 26, 35, 29, 2, 30, 202, 54075 }, // ❓ + { 26, 35, 29, 2, 30, 258, 54277 }, // ❔ + { 13, 35, 17, 2, 30, 166, 54535 }, // ❕ + { 30, 31, 34, 2, 30, 204, 54701 }, // ❖ + { 11, 39, 17, 3, 32, 156, 54905 }, // ❗ + { 3, 29, 7, 2, 29, 14, 55061 }, // ❘ + { 9, 29, 13, 2, 29, 19, 55075 }, // ❙ + { 15, 29, 18, 2, 29, 18, 55094 }, // ❚ + { 14, 19, 18, 2, 29, 100, 55112 }, // ❛ + { 14, 19, 18, 2, 30, 96, 55212 }, // ❜ + { 25, 19, 29, 2, 30, 150, 55308 }, // ❝ + { 25, 20, 29, 2, 30, 157, 55458 }, // ❞ + { 14, 19, 18, 2, 10, 98, 55615 }, // ❟ + { 25, 19, 29, 2, 10, 154, 55713 }, // ❠ + { 28, 40, 32, 2, 32, 223, 55867 }, // ❡ + { 19, 31, 22, 2, 30, 159, 56090 }, // ❢ + { 20, 31, 24, 2, 30, 174, 56249 }, // ❣ + { 35, 27, 39, 2, 28, 174, 56423 }, // ❤ + { 25, 30, 29, 2, 29, 173, 56597 }, // ❥ + { 35, 36, 37, 1, 30, 338, 56770 }, // ❦ + { 42, 25, 42, 0, 25, 277, 57108 }, // ❧ + { 18, 40, 19, 1, 32, 186, 57385 }, // ❨ + { 18, 40, 18, 0, 32, 178, 57571 }, // ❩ + { 14, 38, 17, 1, 31, 160, 57749 }, // ❪ + { 14, 38, 16, 1, 31, 163, 57909 }, // ❫ + { 12, 39, 14, 1, 31, 141, 58072 }, // ❬ + { 12, 39, 14, 1, 31, 140, 58213 }, // ❭ + { 21, 30, 21, 0, 27, 140, 58353 }, // ❮ + { 21, 30, 21, 0, 27, 141, 58493 }, // ❯ + { 20, 39, 23, 1, 31, 161, 58634 }, // ❰ + { 20, 39, 23, 1, 31, 156, 58795 }, // ❱ + { 10, 40, 13, 2, 32, 60, 58951 }, // ❲ + { 10, 40, 10, 0, 32, 63, 59011 }, // ❳ + { 21, 40, 21, 0, 32, 151, 59074 }, // ❴ + { 21, 40, 21, 0, 32, 153, 59225 }, // ❵ + { 40, 40, 42, 1, 32, 260, 59378 }, // ❶ + { 40, 40, 42, 1, 32, 351, 59638 }, // ❷ + { 40, 40, 42, 1, 32, 362, 59989 }, // ❸ + { 40, 40, 42, 1, 32, 301, 60351 }, // ❹ + { 40, 40, 42, 1, 32, 354, 60652 }, // ❺ + { 40, 40, 42, 1, 32, 364, 61006 }, // ❻ + { 40, 40, 42, 1, 32, 326, 61370 }, // ❼ + { 40, 40, 42, 1, 32, 369, 61696 }, // ❽ + { 40, 40, 42, 1, 32, 365, 62065 }, // ❾ + { 40, 40, 42, 1, 32, 374, 62430 }, // ❿ + { 40, 40, 42, 1, 32, 282, 62804 }, // ➀ + { 40, 40, 42, 1, 32, 359, 63086 }, // ➁ + { 40, 40, 42, 1, 32, 370, 63445 }, // ➂ + { 40, 40, 42, 1, 32, 337, 63815 }, // ➃ + { 40, 40, 42, 1, 32, 350, 64152 }, // ➄ + { 40, 40, 42, 1, 32, 379, 64502 }, // ➅ + { 40, 40, 42, 1, 32, 333, 64881 }, // ➆ + { 40, 40, 42, 1, 32, 394, 65214 }, // ➇ + { 40, 40, 42, 1, 32, 376, 65608 }, // ➈ + { 40, 40, 42, 1, 32, 360, 65984 }, // ➉ + { 40, 40, 42, 1, 32, 231, 66344 }, // ➊ + { 40, 40, 42, 1, 32, 327, 66575 }, // ➋ + { 40, 40, 42, 1, 32, 344, 66902 }, // ➌ + { 40, 40, 42, 1, 32, 303, 67246 }, // ➍ + { 40, 40, 42, 1, 32, 310, 67549 }, // ➎ + { 40, 40, 42, 1, 32, 351, 67859 }, // ➏ + { 40, 40, 42, 1, 32, 304, 68210 }, // ➐ + { 40, 40, 42, 1, 32, 370, 68514 }, // ➑ + { 40, 40, 42, 1, 32, 351, 68884 }, // ➒ + { 40, 40, 42, 1, 32, 368, 69235 }, // ➓ + { 35, 25, 38, 2, 27, 115, 69603 }, // ➔ + { 29, 29, 33, 2, 29, 53, 69718 }, // ➕ + { 29, 5, 33, 2, 17, 19, 69771 }, // ➖ + { 29, 29, 33, 2, 29, 36, 69790 }, // ➗ + { 28, 22, 32, 2, 25, 145, 69826 }, // ➘ + { 36, 18, 40, 2, 23, 137, 69971 }, // ➙ + { 28, 22, 32, 2, 25, 138, 70108 }, // ➚ + { 36, 16, 39, 2, 22, 126, 70246 }, // ➛ + { 36, 27, 40, 2, 28, 164, 70372 }, // ➜ + { 36, 19, 40, 2, 24, 79, 70536 }, // ➝ + { 38, 21, 41, 2, 22, 149, 70615 }, // ➞ + { 38, 20, 42, 2, 22, 197, 70764 }, // ➟ + { 40, 25, 43, 2, 24, 275, 70961 }, // ➠ + { 37, 26, 42, 3, 26, 103, 71236 }, // ➡ + { 36, 21, 40, 2, 25, 159, 71339 }, // ➢ + { 36, 21, 40, 2, 25, 164, 71498 }, // ➣ + { 36, 29, 39, 2, 29, 169, 71662 }, // ➤ + { 37, 23, 40, 2, 26, 126, 71831 }, // ➥ + { 37, 23, 40, 2, 26, 135, 71957 }, // ➦ + { 17, 38, 20, 2, 32, 113, 72092 }, // ➧ + { 34, 24, 38, 2, 26, 107, 72205 }, // ➨ + { 33, 26, 36, 2, 27, 158, 72312 }, // ➩ + { 33, 26, 36, 2, 27, 127, 72470 }, // ➪ + { 34, 21, 37, 2, 25, 141, 72597 }, // ➫ + { 34, 21, 37, 2, 25, 141, 72738 }, // ➬ + { 26, 27, 30, 2, 28, 164, 72879 }, // ➭ + { 26, 27, 30, 2, 28, 173, 73043 }, // ➮ + { 35, 23, 38, 1, 26, 146, 73216 }, // ➯ + { 31, 19, 35, 2, 19, 169, 73362 }, // ➰ + { 35, 23, 38, 1, 26, 150, 73531 }, // ➱ + { 30, 29, 33, 1, 29, 175, 73681 }, // ➲ + { 37, 17, 41, 2, 23, 185, 73856 }, // ➳ + { 30, 27, 33, 2, 28, 189, 74041 }, // ➴ + { 34, 11, 37, 1, 20, 106, 74230 }, // ➵ + { 30, 27, 33, 2, 28, 191, 74336 }, // ➶ + { 35, 31, 38, 2, 30, 221, 74527 }, // ➷ + { 38, 19, 41, 2, 24, 182, 74748 }, // ➸ + { 35, 31, 38, 2, 30, 237, 74930 }, // ➹ + { 32, 21, 36, 2, 25, 168, 75167 }, // ➺ + { 34, 20, 37, 2, 25, 156, 75335 }, // ➻ + { 36, 17, 40, 2, 23, 161, 75491 }, // ➼ + { 39, 23, 41, 1, 26, 211, 75652 }, // ➽ + { 36, 21, 40, 2, 25, 154, 75863 }, // ➾ + { 49, 19, 53, 2, 19, 196, 76017 }, // ➿ + { 36, 36, 38, 1, 30, 365, 76213 }, // 😀 + { 36, 36, 38, 1, 30, 376, 76578 }, // 😁 + { 38, 36, 41, 2, 30, 428, 76954 }, // 😂 + { 36, 36, 38, 1, 30, 358, 77382 }, // 😃 + { 36, 36, 38, 1, 30, 369, 77740 }, // 😄 + { 36, 36, 38, 1, 30, 388, 78109 }, // 😅 + { 36, 36, 38, 1, 30, 369, 78497 }, // 😆 + { 36, 42, 38, 1, 33, 461, 78866 }, // 😇 + { 36, 40, 38, 1, 32, 390, 79327 }, // 😈 + { 36, 36, 38, 1, 30, 345, 79717 }, // 😉 + { 36, 36, 38, 1, 30, 361, 80062 }, // 😊 + { 36, 36, 38, 1, 30, 384, 80423 }, // 😋 + { 36, 36, 38, 1, 30, 328, 80807 }, // 😌 + { 36, 36, 38, 1, 30, 363, 81135 }, // 😍 + { 36, 36, 38, 1, 30, 353, 81498 }, // 😎 + { 36, 36, 38, 1, 30, 291, 81851 }, // 😏 + { 36, 36, 38, 1, 30, 304, 82142 }, // 😐 + { 36, 36, 38, 1, 30, 277, 82446 }, // 😑 + { 36, 36, 38, 1, 30, 324, 82723 }, // 😒 + { 38, 36, 40, 1, 30, 379, 83047 }, // 😓 + { 36, 36, 38, 1, 30, 324, 83426 }, // 😔 + { 36, 36, 38, 1, 30, 350, 83750 }, // 😕 + { 36, 36, 38, 1, 30, 338, 84100 }, // 😖 + { 36, 36, 38, 1, 30, 339, 84438 }, // 😗 + { 36, 36, 38, 1, 30, 365, 84777 }, // 😘 + { 36, 36, 38, 1, 30, 354, 85142 }, // 😙 + { 36, 36, 38, 1, 30, 348, 85496 }, // 😚 + { 36, 36, 38, 1, 30, 343, 85844 }, // 😛 + { 36, 36, 38, 1, 30, 342, 86187 }, // 😜 + { 36, 36, 38, 1, 30, 351, 86529 }, // 😝 + { 36, 36, 38, 1, 30, 375, 86880 }, // 😞 + { 36, 36, 38, 1, 30, 386, 87255 }, // 😟 + { 36, 36, 38, 1, 30, 361, 87641 }, // 😠 + { 36, 36, 38, 1, 30, 382, 88002 }, // 😡 + { 36, 36, 38, 1, 30, 375, 88384 }, // 😢 + { 36, 36, 38, 1, 30, 354, 88759 }, // 😣 + { 36, 41, 38, 1, 32, 507, 89113 }, // 😤 + { 36, 36, 38, 1, 30, 341, 89620 }, // 😥 + { 36, 36, 38, 1, 30, 366, 89961 }, // 😦 + { 36, 36, 38, 1, 30, 394, 90327 }, // 😧 + { 36, 36, 38, 1, 30, 429, 90721 }, // 😨 + { 36, 36, 38, 1, 30, 381, 91150 }, // 😩 + { 36, 36, 38, 1, 30, 398, 91531 }, // 😪 + { 36, 36, 38, 1, 30, 381, 91929 }, // 😫 + { 36, 36, 38, 1, 30, 315, 92310 }, // 😬 + { 36, 41, 38, 1, 32, 419, 92625 }, // 😭 + { 36, 36, 38, 1, 30, 343, 93044 }, // 😮 + { 36, 36, 38, 1, 30, 356, 93387 }, // 😯 + { 38, 36, 40, 1, 30, 404, 93743 }, // 😰 + { 36, 36, 40, 2, 30, 434, 94147 }, // 😱 + { 36, 36, 38, 1, 30, 373, 94581 }, // 😲 + { 36, 36, 38, 1, 30, 406, 94954 }, // 😳 + { 55, 39, 38, 1, 33, 434, 95360 }, // 😴 + { 36, 36, 38, 1, 30, 420, 95794 }, // 😵 + { 36, 36, 38, 1, 30, 311, 96214 }, // 😶 + { 36, 36, 38, 1, 30, 338, 96525 }, // 😷 + { 36, 40, 38, 1, 32, 404, 96863 }, // 😸 + { 42, 40, 44, 1, 32, 433, 97267 }, // 😹 + { 36, 40, 38, 1, 32, 393, 97700 }, // 😺 + { 36, 40, 38, 1, 32, 400, 98093 }, // 😻 + { 36, 40, 38, 1, 32, 378, 98493 }, // 😼 + { 36, 40, 38, 1, 32, 374, 98871 }, // 😽 + { 36, 40, 38, 1, 32, 420, 99245 }, // 😾 + { 36, 40, 38, 1, 32, 411, 99665 }, // 😿 + { 36, 40, 38, 1, 32, 405, 100076 }, // 🙀 + { 36, 36, 38, 1, 30, 342, 100481 }, // 🙁 + { 36, 36, 38, 1, 30, 343, 100823 }, // 🙂 + { 36, 36, 38, 1, 30, 347, 101166 }, // 🙃 + { 36, 36, 38, 1, 30, 372, 101513 }, // 🙄 + { 35, 34, 38, 2, 30, 431, 101885 }, // 🙅 + { 36, 35, 38, 1, 30, 423, 102316 }, // 🙆 + { 34, 33, 36, 1, 31, 368, 102739 }, // 🙇 + { 36, 30, 38, 2, 27, 403, 103107 }, // 🙈 + { 35, 31, 37, 1, 28, 428, 103510 }, // 🙉 + { 36, 33, 38, 1, 28, 443, 103938 }, // 🙊 + { 31, 37, 33, 1, 31, 369, 104381 }, // 🙋 + { 34, 27, 38, 2, 27, 342, 104750 }, // 🙌 + { 35, 27, 37, 1, 27, 328, 105092 }, // 🙍 + { 35, 32, 38, 2, 30, 309, 105420 }, // 🙎 + { 34, 32, 38, 2, 27, 368, 105729 }, // 🙏 + { 40, 40, 42, 1, 32, 379, 106097 }, // 🙐 + { 41, 40, 42, 0, 32, 378, 106476 }, // 🙑 + { 40, 41, 42, 1, 32, 383, 106854 }, // 🙒 + { 41, 41, 42, 0, 32, 388, 107237 }, // 🙓 + { 41, 41, 42, 0, 32, 396, 107625 }, // 🙔 + { 40, 41, 42, 1, 32, 386, 108021 }, // 🙕 + { 41, 40, 42, 0, 32, 383, 108407 }, // 🙖 + { 40, 40, 42, 1, 32, 381, 108790 }, // 🙗 + { 40, 23, 42, 1, 22, 275, 109171 }, // 🙘 + { 40, 22, 42, 1, 22, 268, 109446 }, // 🙙 + { 40, 23, 42, 1, 22, 276, 109714 }, // 🙚 + { 40, 22, 42, 1, 22, 273, 109990 }, // 🙛 + { 40, 23, 42, 1, 22, 280, 110263 }, // 🙜 + { 40, 23, 42, 1, 22, 275, 110543 }, // 🙝 + { 39, 23, 42, 1, 22, 268, 110818 }, // 🙞 + { 39, 23, 42, 1, 22, 275, 111086 }, // 🙟 + { 40, 23, 42, 1, 22, 302, 111361 }, // 🙠 + { 40, 23, 42, 1, 22, 303, 111663 }, // 🙡 + { 40, 23, 42, 1, 22, 301, 111966 }, // 🙢 + { 40, 23, 42, 1, 22, 302, 112267 }, // 🙣 + { 41, 22, 42, 0, 22, 306, 112569 }, // 🙤 + { 41, 24, 42, 0, 23, 312, 112875 }, // 🙥 + { 41, 22, 42, 0, 22, 305, 113187 }, // 🙦 + { 41, 24, 42, 0, 23, 310, 113492 }, // 🙧 + { 42, 43, 42, 0, 34, 647, 113802 }, // 🙨 + { 43, 42, 42, 0, 33, 658, 114449 }, // 🙩 + { 40, 42, 42, 1, 33, 491, 115107 }, // 🙪 + { 42, 42, 42, 0, 33, 484, 115598 }, // 🙫 + { 41, 17, 42, 0, 21, 163, 116082 }, // 🙬 + { 17, 40, 21, 2, 32, 169, 116245 }, // 🙭 + { 41, 17, 42, 0, 21, 162, 116414 }, // 🙮 + { 17, 41, 21, 2, 33, 169, 116576 }, // 🙯 + { 42, 29, 44, 3, 24, 332, 116745 }, // 🙰 + { 43, 30, 45, 3, 25, 343, 117077 }, // 🙱 + { 31, 32, 32, 1, 31, 229, 117420 }, // 🙲 + { 31, 32, 32, 1, 31, 242, 117649 }, // 🙳 + { 34, 32, 35, 0, 31, 294, 117891 }, // 🙴 + { 50, 38, 53, 2, 31, 447, 118185 }, // 🙵 + { 21, 16, 22, 1, 33, 95, 118632 }, // 🙶 + { 21, 15, 22, 1, 32, 93, 118727 }, // 🙷 + { 21, 16, 22, 1, 9, 95, 118820 }, // 🙸 + { 19, 33, 21, 1, 33, 172, 118915 }, // 🙹 + { 17, 33, 18, 0, 33, 152, 119087 }, // 🙺 + { 19, 33, 21, 1, 33, 161, 119239 }, // 🙻 + { 42, 42, 42, 0, 33, 58, 119400 }, // 🙼 + { 42, 42, 42, 0, 33, 47, 119458 }, // 🙽 + { 42, 42, 42, 0, 33, 46, 119505 }, // 🙾 + { 42, 42, 42, 0, 33, 41, 119551 }, // 🙿 + { 39, 38, 41, 1, 31, 464, 119592 }, // 🚀 +}; +const UnicodeInterval FiraSansIntervals[] = { + { 0x20, 0x7E, 0x0 }, + { 0xA0, 0xFF, 0x5F }, + { 0x2500, 0x259F, 0xBF }, + { 0x2700, 0x27BF, 0x15F }, + { 0x1F600, 0x1F680, 0x21F }, +}; +const GFXfont FiraSans = { + (uint8_t*)FiraSansBitmaps, + (GFXglyph*)FiraSansGlyphs, + (UnicodeInterval*)FiraSansIntervals, + 5, + 1, + 50, + 39, + -12, +}; diff --git a/data/Basic1/IotBasic/hardware-arduino.h b/data/Basic1/IotBasic/hardware-arduino.h new file mode 100644 index 0000000000000000000000000000000000000000..6855c170e9d3775dca7738d79c4a7c833419d4c9 --- /dev/null +++ b/data/Basic1/IotBasic/hardware-arduino.h @@ -0,0 +1,5545 @@ +/* + * + * $Id: hardware-arduino.h,v 1.8 2023/02/18 20:16:59 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * Playing around with frugal programming. See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Credits: + * - XMC contributed by Florian + * + * Hardware definition file coming with TinybasicArduino.ino aka basic.c + * + * - ARDUINOLCD, ARDUINOTFT and LCDSHIELD active the LCD code, + * LCDSHIELD automatically defines the right settings for + * the classical shield modules + * - ARDUINOPS2 activates the PS2 code. Default pins are 2 and 3. + * If you use other pins the respective changes have to be made + * below. + * - _if_ and PS2 are both activated STANDALONE cause the Arduino + * to start with keyboard and lcd as standard devices. + * - ARDUINOEEPROM includes the EEPROM access code + * - ARDUINOEFS, ARDUINOSD, ESPSPIFFS, RP2040LITTLEFS activate filesystem code + * - activating Picoserial, Picoserial doesn't work on MEGA + * + * Architectures and the definitions from the Arduino IDE + * + * ARDUINO_ARCH_SAM: no tone command, dtostrf + * ARDUINO_ARCH_RP2040: dtostrf (for ARDUINO_NANO_RP2040_CONNECT) + * ARDUINO_ARCH_SAMD: dtostrf (for ARDUINO_SAMD_MKRWIFI1010, ARDUINO_SEEED_XIAO_M0) + * ARDUINO_ARCH_ESP8266: SPIFFS, dtostrf (ESP8266) + * ARDUINO_AVR_MEGA2560, ARDUARDUINO_SAM_DUE: second serial port is Serial1-3 - no software serial + * ARDUINO_SAM_DUE: hardware heuristics + * ARDUINO_ARCH_AVR: nothing + * ARDUINO_ARCH_LGT8F: EEPROM code for flash EEPROM - platform fully supported now, yet no call 0 + * ARDUINO_ARCH_ESP32 and ARDUINO_TTGO_T7_V14_Mini32, no tone, no analogWrite, avr/xyz obsolete + * + * The code still contains hardware heuristics from my own projects, + * will be removed in the future + * + */ + +#if defined(ARDUINO) && ! defined(__HARDWAREH__) +#define __HARDWAREH__ + +/* + * Arduino hardware settings , set here what you need or + * use one of the predefined configurations below + * + * input/output methods USERPICOSERIAL, ARDUINOPS2 + * ARDUINOPRT, DISPLAYCANSCROLL, ARDUINOLCDI2C, + * ARDUINOTFT, ARDUINONOKIA51, ARDUINOILI9488, + * ARDUINOSSD1306, ARDUINOMCUFRIEND + * storage ARDUINOEEPROM, ARDUINOSD, ESPSPIFFS, RP2040LITTLEFS + * storage ARDUINOEFS, SM32SDIO + * sensors ARDUINOWIRE, ARDUINOSENSORS + * network ARDUINORF24, ARDUNIOMQTT + * memory ARDUINOSPIRAM + * real time clocks ARDUINORTC, ARDUINORTCEMULATION + * + * leave this unset if you use the definitions below + */ + +#undef USESPICOSERIAL +#undef ARDUINOPS2 +#undef ARDUINOUSBKBD +#undef ARDUINOZX81KBD +#undef ARDUINOPRT +#undef DISPLAYCANSCROLL +#undef ARDUINOLCDI2C +#undef ARDUINONOKIA51 +#undef ARDUINOILI9488 +#undef ARDUINOSSD1306 +#undef ARDUINOMCUFRIEND +#undef ARDUINOEDP47 +#undef ARDUINOGRAPHDUMMY +#undef LCDSHIELD +#undef ARDUINOTFT +#undef ARDUINOVGA +#define ARDUINOEEPROM +#undef ARDUINOI2CEEPROM +#undef ARDUINOEFS +#undef ARDUINOSD +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#undef STM32SDIO +#undef ARDUINORTC +#undef ARDUINORTCEMULATION +#undef ARDUINOTONEEMULATION +#undef ARDUINOWIRE +#undef ARDUINOWIRESLAVE +#undef ARDUINORF24 +#undef ARDUINOETH +#undef ARDUINOMQTT +#undef ARDUINOSENSORS +#undef ARDUINOSPIRAM +#undef STANDALONE +#undef STANDALONESECONDSERIAL + +/* experimental features, don't use unless you know the code */ +/* + * this setting uses the EEPROM as program storage + * The idea is to create a virtual memory layout starting from 0 with the EEPROM + * from elength() and then adding the BASIC RAM to it. himem and top need to be + * handled carefully. + */ +#undef ARDUINOPGMEEPROM + +/* + * Predefined hardware configurations, this assumes that all of the + * above are undef + * + * UNOPLAIN: + * a plain UNO with no peripherals + * AVRLCD: + * a AVR system with an LCD shield + * WEMOSSHIELD: + * a Wemos D1 with a modified simple datalogger shield + * optional keyboard and i2c display + * MEGASHIELD: + * an Arduino Mega with Ethernet Shield + * optional keyboard and i2c display + * TTGOVGA: + * TTGO VGA1.4 system with PS2 keyboard, standalone + * MEGATFT, DUETFT + * TFT 7inch screen systems, standalone + * NANOBOARD: + * Arduino Nano Every board with PS2 keyboard and sensor + * kit + * MEGABOARD: + * A board for the MEGA with 64 kB RAM, SD Card, and real time + * clock + * UNOBOARD: + * A board for an UNO with 64kB memory and EEPROM disk + * fits into an UNO flash only with integer + * ESP01BOARD: + * ESP01 based board as a sensor / MQTT interface + * RP2040BOARD: + * A ILI9488 hardware design based on an Arduino connect RP2040. + * RP2040BOARD2: + * like the one above but based on the Pi Pico core + * ESP32BOARD: + * same like above with an ESP32 core + * MKRBOARD: + * a digital signage and low energy board + */ + +#undef UNOPLAIN +#undef AVRLCD +#undef WEMOSSHIELD +#undef MEGASHIELD +#undef TTGOVGA +#undef DUETFT +#undef MEGATFT +#undef NANOBOARD +#undef MEGABOARD +#undef UNOBOARD +#undef ESP01BOARD +#undef RP2040BOARD +#undef RP2040BOARD2 +#undef ESP32BOARD +#undef MKR1010BOARD + +/* + * PIN settings and I2C addresses for various hardware configurations + * used a few heuristics and then the hardware definitions above + * + * #define SDPIN sets the SD CS pin - can be left as a default for most HW configs + * TTGO needs it as default definitions in the board file are broken + * #define PS2DATAPIN, PS2IRQPIN sets PS2 pin + */ + +/* PS2 Keyboard pins for AVR - use one interrupt pin 2 and one date pin + 5 not 4 because 4 conflicts with SDPIN of the standard SD shield */ +#define PS2DATAPIN 3 +#define PS2IRQPIN 2 + +/* Ethernet - 10 is the default */ +/* #define ETHPIN 10 */ + +/* The Pretzelboard definitions for Software Serial, conflicts with SPI */ +#define SOFTSERIALRX 11 +#define SOFTSERIALTX 12 + +/* near field pin settings for CE and CSN*/ +#define RF24CEPIN 8 +#define RF24CSNPIN 9 + +/* use standard I2C pins almost always */ +#undef SDA_PIN +#undef SCL_PIN + +/* set this is you want pin 4 on low interrupting the interpreter */ +/* #define BREAKPIN 4 */ +#undef BREAKPIN + +/* the primary serial stream aka serial aka sream 1 */ +#ifndef ALTSERIAL +#define SERIALPORT Serial +#endif + +/* the secondary serial port aka prt aka stream 4 */ +#ifndef PRTSERIAL +#define PRTSERIAL Serial1 +#endif + +/* + * Pin settings for the ZX81 Keyboard + * first the 8 rows, then the 5 columns or the keyboard + * + * MEGAs have many pins and default is to use the odd pins on the side + * UNOs, NANOs, and others use the lower pins by default avoiding the + * pin 13 which is LED and doesn't work with standard schematics + */ +#ifdef ARDUINOZX81KBD +#ifdef ARDUINO_AVR_MEGA2560 +const byte zx81pins[] = {37, 35, 33, 31, 29, 27, 25, 23, 47, 45, 43, 41, 39}; +#else +const char zx81pins[] = {7, 8, 9, 10, 11, 12, A0, A1, 2, 3, 4, 5, 6 }; +#endif +#endif + +/* + * this is soft SPI for SD cards on MEGAs using + * pins 10-13, a patched SD library is needed + * for this: https://github.com/slviajero/SoftSD + * only needed for MEGA boards with an UNO shield + */ +#undef SOFTWARE_SPI_FOR_SD + +/* + * list of default i2c addresses + * + * some clock modules do have their EEPROM at 0x57. + * 0x050 this is the default lowest adress of standard EEPROMs + * Configurable range is between 0x50 and 0x57 for modules with jumpers. + * Some clock modules do have their EEPROM at 0x57. + * + * Clock default for the size is 4096. Define your EFS EEPROM and I2C EEPROM + * size here. One parameter set is for EFS and one parameter set is for + * plain serial EEPROMs. + * + * RTCs are often at 0x68 + */ +#define EFSEEPROMADDR 0x050 +/* #define EFSEEPROMSIZE 32768 */ + +#define RTCI2CADDR 0x068 + +/* the size of the plain I2C EEPROM, typically a clock */ +#define I2CEEPROMADDR 0x057 +/* #define I2CEEPROMSIZE 4096 */ + +/* is the I2C EEPROM buffered */ +#define ARDUINOI2CEEPROM_BUFFERED + +/* + * Sensor library code - configure your sensors here + */ +#ifdef ARDUINOSENSORS +#undef ARDUINODHT +#define DHTTYPE DHT22 +#define DHTPIN 2 +#define ARDUINOSHT +#define ARDUINOMQ2 +#define MQ2PIN A0 +#undef ARDUINOLMS6 +#undef ARDUINOAHT +#undef ARDUINOBMP280 +#undef ARDUINOBME280 +#endif + + +#if defined(ARDUINOSHT) || defined(ARDUINOLMS6) || defined(ARDUINOAHT) || defined(ARDUINOBMP280) || defined(RDUINOBME280) +#define ARDUINOWIRE +#endif + +/* + * The hardware models. + * These are predefined hardware configurations. + */ + +/* an AVR based Arduino with nothing else */ +#if defined(UNOPLAIN) +#define ARDUINOEEPROM +#endif + +/* an AVR ARDUINO (UNO or MEGA) with the classical LCD shield */ +#if defined(AVRLCD) +#define ARDUINOEEPROM +#define DISPLAYCANSCROLL +#define LCDSHIELD +#endif + +/* + * a Wemos ESP8266 with a mdified datalogger shield + * standalone capable, with Wire and MQTT. + */ +#if defined(WEMOSSHIELD) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOSD +#define ARDUINORTC +#define ARDUINOWIRE +#define SDPIN D8 +#define PS2DATAPIN D2 +#define PS2IRQPIN D9 +#define ARDUINOMQTT +#endif + +/* + * mega with a Ethernet shield + * standalone capable, Ethernet is not enabled by default + */ +#if defined(MEGASHIELD) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define SDPIN 4 +#endif + +/* + * VGA system with SD card, based on the TTGO VGA 1.4 + * ESP32 + * standalone by default, with MQTT + */ +#if defined(TTGOVGA) +#define ARDUINOEEPROM +#define ARDUINOVGA +#define ARDUINOSD +/* #define ARDUINOMQTT */ +#define SDPIN 13 +#define STANDALONE +#endif + +/* + * MEGA with a TFT shield, standalone by default + */ +#if defined(MEGATFT) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOTFT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define PS2DATAPIN 18 +#define PS2IRQPIN 19 +#define SDPIN 53 +#define STANDALONE +#endif + +/* + * DUE with a TFT shield, standalone by default + */ +#if defined(DUETFT) +#undef ARDUINOEEPROM +#define ARDUINOPS2 +#undef ARDUINOUSBKBD +#define DISPLAYCANSCROLL +#define ARDUINOTFT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define ARDUINORTC +#define PS2DATAPIN 9 +#define PS2IRQPIN 8 +#define SDPIN 53 +#define STANDALONE +#endif + +#if defined(NANOBOARD) +#undef USESPICOSERIAL +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define ARDUINOPRT +#define ARDUINOEFS +#define ARDUINORTC +#define ARDUINOWIRE +#define EFSEEPROMADDR 0x050 /* use clock EEPROM 0x057, set to 0x050 for external EEPROM */ +#define STANDALONE +#endif + +/* a UNO shield with memory and EFS EEPROM */ +#if defined(UNOBOARD) +#define ARDUINOEEPROM +#define ARDUINOSPIRAM +#define ARDUINOEFS +#define ARDUINOWIRE +#define EFSEEPROMADDR 0x050 +#define EFSEEPROMSIZE 65534 +#endif + +/* a MEGA shield with memory and SD card */ +#if defined(MEGABOARD) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define ARDUINOPRT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINORTC +#define ARDUINOSPIRAM +#define RAMPIN 53 +#define SDPIN 49 +#endif + +/* an ESP01 board, using the internal flash + * with the ESP01-8266 only pins 0 and 2 are usable freely + * on ESP01-ESP32C3 this is 9 and 2 while 2 is an analog pin + * 9 cannot be pulled on low by any peripheral on boot because this + * brings the board to flash mode + */ +#if defined(ESP01BOARD) +#undef ARDUINOEEPROM +#define ESPSPIFFS +#define ARDUINOMQTT +#define ARDUINOWIRE +#if defined(ARDUINOWIRE) && defined(ARDUINO_ARCH_ESP8266) +#define SDA_PIN 0 +#define SCL_PIN 2 +#endif +/* see: https://github.com/espressif/arduino-esp32/issues/6376 + * nothing should block the port, e.g. DHT or anything + */ +#if defined(ARDUINOWIRE) && defined(ARDUINO_ARCH_ESP32) +#define SDA_PIN 9 +#define SCL_PIN 2 +#endif +/* + * + * Currently only 8=SDA and 9=SCL works / tested with AHT10 + */ +#endif + +/* an RP2040 based board with an ILI9488 display */ +#if defined(RP2040BOARD) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#undef ARDUINOEEPROM +#define ARDUINOI2CEEPROM +#define ARDUINOPRT +#define ARDUINOSD +#undef RP2040LITTLEFS +#define ARDUINOWIRE +#define ARDUINORTC +#define ARDUINOPS2 +#define ARDUINOMQTT +#undef STANDALONE +#endif + +/* an RP2040 Raspberry Pi Pico based board with an ILI9488 display */ +#if defined(RP2040BOARD2) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#undef ARDUINOEEPROM +#undef ARDUINOPRT +#undef ARDUINOSD +#define RP2040LITTLEFS +#undef ARDUINOWIRE +#undef ARDUINORTC +#undef ARDUINOPS2 +#undef ARDUINOMQTT +#undef STANDALONE +#define ILI_LED A2 +#define ILI_CS 15 +#define ILI_RST 14 +#define ILI_DC 13 +#endif + + +/* an ESP32 board with an ILI9488 display, + some SD problems here with some hardware */ +#if defined(ESP32BOARD) +#define ILI_CS 12 +#define ILI_DC 27 +#define ILI_RST 14 +#define ILI_LED 26 +#undef USESPICOSERIAL +#define ESPSPIFFS +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#define ARDUINOEEPROM +#define ARDUINOMQTT +#define ARDUINOWIRE +#endif + +/* a board based on the Arduino MKR 1010 Wifi + * made for low energy games + */ +#if defined(MKR1010BOARD) +#define ILI_CS 7 +#define ILI_DC 4 +#define ILI_RST 6 +#define ILI_LED A3 +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#define ARDUINOEFS +#define ARDUINOMQTT +#define ARDUINOWIRE +/* careful with the setting, lockout possible easily */ +#undef ARDUINOUSBKBD +#undef STANDALONE +#endif + +/* + * defining the systype variable which informs BASIC about the platform at runtime + */ + +#if defined(ARDUINO_ARCH_AVR) +const mem_t bsystype = SYSTYPE_AVR; +#elif defined(ARDUINO_ARCH_ESP8266) +const mem_t bsystype = SYSTYPE_ESP8266; +#elif defined(ARDUINO_ARCH_ESP32) +const mem_t bsystype = SYSTYPE_ESP32; +#elif defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +const mem_t bsystype = SYSTYPE_RP2040; +#elif defined(ARDUINO_ARCH_SAM) && defined(ARDUINO_ARCH_SAMD) +const mem_t bsystype = SYSTYPE_SAM; +#elif defined(ARDUINO_ARCH_XMC) +const mem_t bsystype = SYSTYPE_XMC; +#elif defined(ARDUINO_ARCH_SMT32) +const mem_t bsystype = SYSTYPE_SMT32; +#elif defined(ARDUINO_ARCH_RENESAS) +const mem_t bsystype = SYSTYPE_NRENESA; +#else +const mem_t bsystype = SYSTYPE_UNKNOWN; +#endif + +/* + * DUE has no tone, we switch to emulation mode automatically + */ +#ifdef ARDUINO_SAM_DUE +#define ARDUINOTONEEMULATION +#endif + +/* + * Some settings, defaults, and dependencies + * + * HASWIRE is set to start wire. Some libraries do this again. + * + * Handling Wire and SPI is tricky as some of the libraries + * also include and start SPI and Wire code. + */ + +/* a clock needs wire */ +#ifdef ARDUINORTC +#define ARDUINOWIRE +#endif + +/* a display needs wire */ +#if defined(ARDUINOLCDI2C) || defined(ARDUINOSSD1306) +#define ARDUINOWIRE +#endif + +/* EEPROM storage needs wire */ +#if defined(ARDUINOEFS) +#define ARDUINOWIRE +#endif + +/* external EEPROMs also need wire */ +#if defined(ARDUINOI2CEEPROM) +#define ARDUINOWIRE +#endif + +/* plain Wire support also needs wire ;-) */ +#if defined(ARDUINOWIRE) +#define HASWIRE +#endif + +/* radio needs SPI */ +#if defined(ARDUINORF24) +#define ARDUINOSPI +#endif + +/* a filesystem needs SPI */ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) +#define ARDUINOSPI +#endif + +/* networking may need SPI */ +#if defined(ARDUINOMQTT) +#define ARDUINOSPI +#endif + +/* the NOKIA and ILI9488 display needs SPI */ +#if defined(ARDUINONOKIA51) || defined(ARDUINOILI9488) +#define ARDUINOSPI +#endif + +/* the RAM chips */ +#if defined(ARDUINOSPIRAM) +#define ARDUINOSPI +#endif + + +/* Networking and keyboards need the background task capability */ +#if defined(ARDUINOMQTT) || defined(ARDUINOETH) || defined(ARDUINOUSBKBD) || defined(ARDUINOZX81KBD) +#define BASICBGTASK +#endif + +/* picoserial is not a available on many platforms */ +#ifdef USESPICOSERIAL +#ifndef UCSR0A +#undef USESPICOSERIAL +#endif +#endif + +/* + * graphics adapter only when graphics hardware, overriding the + * language setting + * this is odd and can be removed later on + */ +#if !defined(ARDUINOTFT) && !defined(ARDUINOVGA) && !defined(ARDUINOILI9488) && !defined(ARDUINONOKIA51) && !defined(ARDUINOSSD1306) && !defined(ARDUINOMCUFRIEND) && !defined(ARDUINOGRAPHDUMMY) && !defined(ARDUINOEDP47) +#undef HASGRAPH +#endif + +/* + * incompatibilities and library stuff + */ +/* these platforms have no EEPROM and no emulation built-in */ +#if defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +#undef ARDUINOEEPROM +#endif + +/* + * Keyboard library, on AVR systems Paul Stoffregens original + * PS2 library works. + * I recommend to use my patched version from + * https://github.com/slviajero/PS2Keyboard + * works with ESP, has keyboard.peek() + */ +#ifdef ARDUINOPS2 +#include +#endif + +/* + * The USB keyboard code - tested only on DUE and the like + * not really good + */ +#ifdef ARDUINOUSBKBD +#include +#endif + +/* + * The ZX81 keyboard code - tested on AVR MEGA256 + */ +#ifdef ARDUINOZX81KBD +#include +#endif + +/* + * ESPy stuff, pgmspace has changed location + */ +#ifdef ARDUINOPROGMEM +#ifdef ARDUINO_ARCH_ESP32 +#include +#else +#include +#endif +#endif + +/* + * Fix a few things around XMC, contributed by Florian + */ +#if defined(ARDUINO_ARCH_XMC) +#undef USESPICOSERIAL +#undef ARDUINOPROGMEM +#endif + +/* + * This works for AVR and ESP EEPROM dummy. + * On XMC you need https://github.com/slviajero/XMCEEPROMLib + * Throws a compiler error for other platforms. + */ +#ifdef ARDUINOEEPROM +#ifdef ARDUINO_ARCH_XMC +#include +#else +#ifdef ARDUINO_ARCH_SAMD +//#include +#else +#include +#endif +#endif +#endif + +/* Standard SPI */ +#ifdef ARDUINOSPI +#include +#endif + +/* Standard wire - triggered by the HASWIRE macro now */ +#ifdef HASWIRE +#include +#endif + +/* + * the display library includes for LCD + */ +#ifdef LCDSHIELD +#include +#endif + +/* + * I2C displays + */ + +#ifdef ARDUINOLCDI2C +#include +#endif + +/* + * This is the monochrome library of Oli Kraus + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * It can harware scroll, but this is not yet implemented + */ +#if defined(ARDUINONOKIA51) || defined(ARDUINOSSD1306) +#include +#endif + +/* + * This is the (old) ILI9488 library originally created by Jarett Burket + * https://github.com/slviajero/ILI9488 + * It can hardware scroll (not yet used) + */ +#ifdef ARDUINOILI9488 +#include +#include +#endif + +/* + * This is the MCUFRIED library originally for parallel TFTs + * https://github.com/prenticedavid/MCUFRIEND_kbv + * + */ +#ifdef ARDUINOMCUFRIEND +#include +#include +#endif + +/* + * For TFT we use the UTFT library + * http://www.rinkydinkelectronics.com/library.php?id=51 + * please note the License, it is not GPL but NON COMMERCIAL + * Creative Commons. + */ +#ifdef ARDUINOTFT +#include +#include +#endif + +/* + * Lilygo EDP47 displays, 4.7 inch epapers using the respective library + * from Lilygo + * https://github.com/Xinyuan-LilyGO/LilyGo-EPD47 + * + */ +#ifdef ARDUINOEDP47 +#include "epd_driver.h" +#include "font/firasans.h" +#endif + + +/* + * experimental networking code + * currently the standard Ethernet shield, ESP Wifi + * MKW Wifi, and RP2040 Wifi is supported. All of them + * with the standard library. + * + * In addition to this Pubsub is used + * https://github.com/slviajero/pubsubclient + * for MQTT + */ +#ifdef ARDUINOMQTT +#ifdef ARDUINOETH +#include +#else +#ifdef ARDUINO_ARCH_ESP8266 +#include +#endif +#ifdef ARDUINO_ARCH_ESP32 +#include +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) +#include +#endif +#if defined(ARDUINO_UNOR4_WIFI) +#include +#endif +#endif +#include +#endif + +/* + * VGA is only implemented on one platform - TTGO VGA 1.4 + * Needs https://github.com/slviajero/FabGL + */ +#if defined(ARDUINOVGA) && defined(ARDUINO_TTGO_T7_V14_Mini32) +#include +#include +#endif + +/* + * SD filesystems with the standard SD driver + * for MEGA 256 a soft SPI solution is needed + * if standard shields are used, this is a patched + * SD library https://github.com/slviajero/SoftSD + */ +#ifdef ARDUINOSD +#define FILESYSTEMDRIVER +#if defined(SOFTWARE_SPI_FOR_SD) +#include +#else +#include +#endif +#endif + +/* + * ESPSPIFFS tested on ESP8266 and ESP32 + * supports formating in BASIC + */ +#ifdef ESPSPIFFS +#define FILESYSTEMDRIVER +#ifdef ARDUINO_ARCH_ESP8266 +#include +#endif +#ifdef ARDUINO_ARCH_ESP32 +#include +#include +#endif +#endif + +/* + * RP2040 internal filesystem + * This is test code from https://github.com/slviajero/littlefs + * and the main branch is actively developed + */ +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +#define LFS_MBED_RP2040_VERSION_MIN_TARGET "LittleFS_Mbed_RP2040 v1.1.0" +#define LFS_MBED_RP2040_VERSION_MIN 1001000 +#define _LFS_LOGLEVEL_ 1 +#define RP2040_FS_SIZE_KB 1024 +#define FORCE_REFORMAT false +#include +#endif + +/* + * STM32 SDIO driver for he SD card slot of the STM32F4 boards (and others) + */ +#ifdef STM32SDIO +#define FILESYSTEMDRIVER +#include +#ifndef SD_DETECT_PIN +#define SD_DETECT_PIN SD_DETECT_NONE +#endif +#endif +/* + * external flash file systems override internal filesystems + * currently BASIC can only have one filesystem + */ +#ifdef ARDUINOSD +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#endif + +/* + * support for external EEPROMs as filesystem + * overriding all other filessystems. This is a minimalistic + * filesystem meant for very small systems with not enough + * memory for real filesystems + * https://github.com/slviajero/EepromFS + */ +#ifdef ARDUINOEFS +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#undef ARDUINOSD +#undef STM32SDIO +#define FILESYSTEMDRIVER +#endif + +/* the EFS object is used for filesystems and raw EEPROM access */ +#if (defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED)) || defined(ARDUINOEFS) +#include +#endif + +/* if there is an unbuffered I2C EEPROM, use an autodetect mechanism */ +#if defined(ARDUINOI2CEEPROM) +unsigned int i2ceepromsize = 0; +#endif + +/* + * Software SPI only on Mega2560 + */ +#ifndef ARDUINO_AVR_MEGA2560 +#undef SOFTWARE_SPI_FOR_SD +#endif + +/* + * Arduino default serial baudrate and serial flags for the + * two supported serial interfaces. Serial is always active and + * connected to channel &1 with 9600 baud. + * + * channel 4 (ARDUINOPRT) can be either in character or block + * mode. Blockmode is set as default here. This means that all + * available characters are always loaded to a string -> inb() + */ +const int serial_baudrate = 9600; +mem_t sendcr = 0; + +#ifdef ARDUINOPRT +int serial1_baudrate = 9600; +mem_t blockmode = 1; +#else +const int serial1_baudrate = 0; +mem_t blockmode = 0; +#endif + +/* handling time - part of the Arduino core - only needed on POSIX OSes */ +void timeinit() {} + +/* starting wiring is only needed on raspberry */ +void wiringbegin() {} + +/* POSIX signals - not needed here */ +void signalon() {} + +/* + * helper functions OS, heuristic on how much memory is + * available in BASIC + * Arduino information from + * data from https://docs.arduino.cc/learn/programming/memory-guide + */ +#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_XMC) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RENESAS) +extern "C" char* sbrk(int incr); +long freeRam() { + char top; + return &top - reinterpret_cast(sbrk(0)); +} +#elif defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_LGT8F) +long freeRam() { + extern int __heap_start,*__brkval; + int v; + return (int)&v - (__brkval == 0 + ? (int)&__heap_start : (int) __brkval); +} +#elif defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) +long freeRam() { + return ESP.getFreeHeap(); +} +#else +long freeRam() { + return 0; +} +#endif + +/* + * Heuristic Wifi systems reserve 4k by default, small 8 bit AVR try to guess sizes conservatively + * RP2040 cannot measure, we set to 16 bit full address space + */ +long freememorysize() { +#if defined(ARDUINO_ARCH_RENESAS) + return freeRam() - 2000; +#endif +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32) + return freeRam() - 4000; +#endif +#if defined(ARDUINO_ARCH_XMC) + return freeRam() - 2000; +#endif +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_LGT8F) + int overhead=192; +#ifdef HASFLOAT + overhead+=96; +#endif +#ifdef ARDUINO_AVR_MEGA2560 + overhead+=96; +#endif +#ifdef ARDUINOWIRE + overhead+=128; +#endif +#ifdef ARDUINORF24 + overhead+=128; +#endif +#if defined(ARDUINOSD) + overhead+=512; +#endif +#ifdef ARDUINOZX81KBD + overhead+=64; +#endif +#ifdef ARDUINOETH + overhead+=256; +#endif +#ifdef HASGRAPH + overhead+=256; /* a bit on the safe side */ +#endif + return freeRam() - overhead; +#endif +#if defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) + return 65536; +#endif + return 0; +} + +/* + * the sleep and restart functions - only implemented for some controllers + */ +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) +void(* callzero)() = 0; +#endif + +void restartsystem() { + eflush(); /* if there is a I2C eeprom dummy, flush the buffer */ +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + ESP.restart(); +#endif +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) + callzero(); +#endif +#if defined(ARDUINO_ARCH_LGT8F) +#endif +} + +/* + * I used these two articles + * https://randomnerdtutorials.com/esp8266-deep-sleep-with-arduino-ide/ + * https://randomnerdtutorials.com/esp32-deep-sleep-arduino-ide-wake-up-sources/ + * for this very simple implementation - needs to be improved (pass data from sleep + * state to sleep state via EEPROM) + */ +#if defined(ARDUINO_ARCH_SAMD) +#define HASBUILTINRTC +#include "RTCZero.h" +#include "ArduinoLowPower.h" +RTCZero rtc; +#endif + +/* STM32duino have the same structure */ +#if defined(ARDUINO_ARCH_STM32) +#define HASBUILTINRTC +#include "STM32RTC.h" +#include "STM32LowPower.h" +STM32RTC& rtc = STM32RTC::getInstance(); +#endif + +/* the NRENESA board have a buildin RTC as well */ +#if defined(ARDUINO_ARCH_RENESAS) +#define HASBUILTINRTC +#include "RTC.h" +RTCTime rtc; +#endif + + +/* for ESP32 we also include the time stuctures and offer a POSIX style clock*/ +#if defined(ARDUINO_ARCH_ESP32) +#include "time.h" +#include +#endif + + +/* this is unfinished, don't use */ +void rtcsqw(); + +#define LOWPOWERINTPIN 2 +void aftersleepinterrupt(void) { } + +void activatesleep(long t) { + eflush(); /* if there is a I2C eeprom dummy, flush the buffer */ +#if defined(ARDUINO_ARCH_ESP8266) + ESP.deepSleep(t*1000); +#endif +#if defined(ARDUINO_ARCH_ESP32) + esp_sleep_enable_timer_wakeup(t*1000); + esp_deep_sleep_start(); +#endif +#if defined(ARDUINO_ARCH_SAMD) + LowPower.sleep((int) t); +#endif +#if defined(ARDUINO_AVR_ATmega644) +/* unfinished, don't use, just test code + rtcsqw(); + pinMode(LOWPOWERINTPIN, INPUT_PULLUP); + attachInterrupt(digitalPinToInterrupt(LOWPOWERINTPIN), aftersleepinterrupt, CHANGE); + sleepMode(SLEEP_POWER_SAVE); + sleep(); + detachInterrupt(digitalPinToInterrupt(LOWPOWERINTPIN)); + noSleep(); +*/ +#endif +} + +/* + * start the SPI bus - this is a little mean as some libraries also + * try to start the SPI which may lead to on override of the PIN settings + * if the library code is not clean - currenty no conflict known + */ +void spibegin() { +#ifdef ARDUINOSPI +#ifdef ARDUINO_TTGO_T7_V14_Mini32 +/* this fixes the wrong board definition in the ESP32 core for this board */ + SPI.begin(14, 2, 12, 13); +#else + SPI.begin(); +#endif +#endif +} + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear(), dspupdate() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + * + * Non rgb ready displays on rgbcolor translate to their native color + * when BASIC requests an rgb color, in this case the nearest 4 bit + * color of the display is also stored for use in the text DISLAY driver + * code + */ + + /* generate a 4 bit vga color from a given rgb color */ +uint8_t rgbtovga(int r, int g, int b) { + short vga; + if (r>191 || g>191 || b>191) vga=8; else vga=0; + vga=vga+r/128+g/128*2+b/128*4; + return vga; +} + +/* + * global variables for a standard LCD shield. + * Includes the standard Arduino LiquidCrystal library + */ +#ifdef LCDSHIELD +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +/* LCD shield pins to Arduino + * RS, EN, d4, d5, d6, d7; + * backlight on pin 10; + */ +const int dsp_rows=2; +const int dsp_columns=16; +LiquidCrystal lcd( 8, 9, 4, 5, 6, 7); +void dspbegin() { lcd.begin(dsp_columns, dsp_rows); dspsetscrollmode(1, 1); } +void dspprintchar(char c, mem_t col, mem_t row) { lcd.setCursor(col, row); if (c) lcd.write(c);} +void dspclear() { lcd.clear(); } +void dspupdate() {} +void dspsetcursor(mem_t c) { if (c) lcd.blink(); else lcd.noBlink(); } +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +#define HASKEYPAD +/* elementary keypad reader left=1, right=2, up=3, down=4, select= */ +short keypadread(){ + int a=analogRead(A0); + if (a >= 850) return 0; + else if (a>=600 && a<850) return 10; + else if (a>=400 && a<600) return '1'; + else if (a>=200 && a<400) return '3'; + else if (a>=60 && a<200) return '4'; + else return '2'; +} +/* repeat mode of the keypad - off means block, on means return immediately */ +mem_t kbdrepeat=0; +#endif + +/* + * A LCD display connnected via I2C, uses the standard + * Arduino I2C display library. + */ +#ifdef ARDUINOLCDI2C +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +const int dsp_rows=4; +const int dsp_columns=20; +LiquidCrystal_I2C lcd(0x27, dsp_columns, dsp_rows); +void dspbegin() { lcd.init(); lcd.backlight(); dspsetscrollmode(1, 1); } +void dspprintchar(char c, mem_t col, mem_t row) { lcd.setCursor(col, row); if (c) lcd.write(c); } +void dspclear() { lcd.clear(); } +void dspupdate() {} +void dspsetcursor(mem_t c) { if (c) lcd.blink(); else lcd.noBlink(); } +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +#endif + +/* + * A Nokia 5110 with ug8lib2 - can scroll quite well + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + * + * default PIN settings here are for ESP8266, using the standard + * SPI SS for 15 for CS/CE, and 0 for DC, 2 for reset + * + */ +#ifdef ARDUINONOKIA51 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#ifndef NOKIA_CS +#define NOKIA_CS 15 +#endif +#ifndef NOKIA_DC +#define NOKIA_DC 0 +#endif +#ifndef NOKIA_RST +#define NOKIA_RST 2 +#endif +U8G2_PCD8544_84X48_F_4W_HW_SPI u8g2(U8G2_R0, NOKIA_CS, NOKIA_DC, NOKIA_RST); +const int dsp_rows=6; +const int dsp_columns=10; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +char dspfontsize = 8; +void dspbegin() { u8g2.begin(); u8g2.setFont(u8g2_font_amstrad_cpc_extended_8r); } +void dspprintchar(char c, mem_t col, mem_t row) { char b[] = { 0, 0 }; b[0]=c; if (c) u8g2.drawStr(col*dspfontsize+2, (row+1)*dspfontsize, b); } +void dspclear() { u8g2.clearBuffer(); u8g2.sendBuffer(); dspfgcolor=1; } +void dspupdate() { u8g2.sendBuffer(); } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; u8g2.setDrawColor(dspfgcolor); } +void plot(int x, int y) { u8g2.setDrawColor(dspfgcolor); u8g2.drawPixel(x, y); dspgraphupdate(); } +void line(int x0, int y0, int x1, int y1) { u8g2.drawLine(x0, y0, x1, y1); dspgraphupdate(); } +void rect(int x0, int y0, int x1, int y1) { u8g2.drawFrame(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void frect(int x0, int y0, int x1, int y1) { u8g2.drawBox(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void circle(int x0, int y0, int r) { u8g2.drawCircle(x0, y0, r); dspgraphupdate(); } +void fcircle(int x0, int y0, int r) { u8g2.drawDisc(x0, y0, r); dspgraphupdate(); } +#endif + +/* + * 4.7 inch epaper displays are derived from the NOKIA51 code, no grayscales + * at the moment. Forcing the font into rectangles and hoping this works. + * + * Epapers bypass the display driver here and use a graphics based display + * mode instead + */ +#ifdef ARDUINOEDP47 +#define GRAPHDISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +const int dsp_width=960; +const int dsp_height=540; +const int dsp_rows=0; +const int dsp_columns=0; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +char dspfontsize = 24; +int dspgraphcursor_x = 0; +int dspgraphcursor_y = dspfontsize; +void dspbegin() { epd_init(); dspclear(); } +void dspprintstring(char* s) { + epd_poweron(); + writeln((GFXfont *)&FiraSans, s, &dspgraphcursor_x, &dspgraphcursor_y, NULL); + epd_poweroff(); +} +void dspclear() { epd_poweron(); epd_clear(); epd_poweroff(); dspfgcolor=1; } +void dspupdate() { } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; } +void plot(int x, int y) { } +void line(int x0, int y0, int x1, int y1) { } +void rect(int x0, int y0, int x1, int y1) { } +void frect(int x0, int y0, int x1, int y1) { } +void circle(int x0, int y0, int r) { } +void fcircle(int x0, int y0, int r) { } +#endif + + +/* + * Small SSD1306 OLED displays with I2C interface + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + */ +#ifdef ARDUINOSSD1306 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#define SSD1306WIDTH 32 +#define SSD1306HEIGHT 128 +/* constructors may look like this, last argument is the reset pin + * //U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); + * //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); + */ +#if SSD1306WIDTH == 32 +/* U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); + * use hardware I2C instead of software. Tested (only) on ESP32C3 and ESP8266 so far. + */ +U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0); +#endif +#if SSD1306WIDTH == 64 +/* the Heltec board has an internal software I2C on pins 4=SDA and 15=SCL */ +#ifdef ARDUINO_heltec_wifi_lora_32_V2 +U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, 15, 4, 16); +#else +/* use hardware I2C instead of software. Tested (only) on ESP32C3 and ESP8266 so far. + */ +U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0); +#endif +#endif +const char dspfontsize = 8; +const int dsp_rows=SSD1306WIDTH/dspfontsize; +const int dsp_columns=SSD1306HEIGHT/dspfontsize; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +void dspbegin() { u8g2.begin(); u8g2.setFont(u8g2_font_amstrad_cpc_extended_8r); } +void dspprintchar(char c, mem_t col, mem_t row) { char b[] = { 0, 0 }; b[0]=c; if (c) u8g2.drawStr(col*dspfontsize+2, (row+1)*dspfontsize, b); } +void dspclear() { u8g2.clearBuffer(); u8g2.sendBuffer(); dspfgcolor=1; } +void dspupdate() { u8g2.sendBuffer(); } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; u8g2.setDrawColor(dspfgcolor); } +void plot(int x, int y) { u8g2.setDrawColor(dspfgcolor); u8g2.drawPixel(x, y); dspgraphupdate(); } +void line(int x0, int y0, int x1, int y1) { u8g2.drawLine(x0, y0, x1, y1); dspgraphupdate(); } +void rect(int x0, int y0, int x1, int y1) { u8g2.drawFrame(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void frect(int x0, int y0, int x1, int y1) { u8g2.drawBox(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void circle(int x0, int y0, int r) { u8g2.drawCircle(x0, y0, r); dspgraphupdate(); } +void fcircle(int x0, int y0, int r) { u8g2.drawDisc(x0, y0, r); dspgraphupdate(); } +#endif + +/* + * A ILI9488 with Jarett Burkets version of Adafruit GFX and patches + * by Stefan Lenz + * currently only slow software scrolling implemented in BASIC + * + * https://github.com/slviajero/ILI9488 + * + * we use 9, 8, 7 as CS, CE, RST by default and A7 for the led brightness control + */ + +#ifdef ARDUINOILI9488 +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#ifndef ILI_CS +#define ILI_CS 9 +#endif +#ifndef ILI_DC +#define ILI_DC 8 +#endif +#ifndef ILI_RST +#define ILI_RST 7 +#endif +#ifndef ILI_LED +#define ILI_LED A3 +#endif +ILI9488 tft = ILI9488(ILI_CS, ILI_DC, ILI_RST); +/* ILI in landscape */ +const int dsp_rows=20; +const int dsp_columns=30; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { + tft.begin(); + tft.setRotation(3); /* ILI in landscape, SD slot up */ + tft.setTextColor(dspfgcolor); + tft.setTextSize(2); + tft.fillScreen(dspbgcolor); + pinMode(ILI_LED, OUTPUT); + analogWrite(ILI_LED, 255); + dspsetscrollmode(1, 4); +} +void dspprintchar(char c, mem_t col, mem_t row) { if (c) tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, 2); } +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +/* + * A MCUFRIEND parallel port display for the various tft shields + * This implementation is mainly for Arduino MEGA + * + * currently only slow software scrolling implemented in BASIC + * + */ + +#ifdef ARDUINOMCUFRIEND +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#ifndef LCD_CS +#define LCD_CS A3 +#endif +#ifndef LCD_CD +#define LCD_CD A2 +#endif +#ifndef LCD_WR +#define LCD_WR A1 +#endif +#ifndef LCD_RD +#define LCD_RD A0 +#endif +#ifndef LCD_RESET +#define LCD_RESET A4 +#endif +MCUFRIEND_kbv tft; +/* ILI in landscape */ +const int dsp_rows=20; +const int dsp_columns=30; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { + uint16_t ID = tft.readID(); + if (ID == 0xD3D3) ID = 0x9481; /* write-only shield - taken from the MCDFRIEND demo */ + tft.begin(ID); + tft.setRotation(1); /* ILI in landscape, 3: SD slot on right the side */ + tft.setTextColor(dspfgcolor); + tft.setTextSize(2); + tft.fillScreen(dspbgcolor); + dspsetscrollmode(1, 4); /* scrolling is on, scroll 4 lines at once */ + } +void dspprintchar(char c, mem_t col, mem_t row) { if (c) tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, 2); } +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +/* + * A no operations graphics dummy + * Tests the BASIC side of the graphics code without triggering + * any output + */ +#ifdef ARDUINOGRAPHDUMMY +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +const int dsp_rows=20; +const int dsp_columns=30; +const uint16_t dspdefaultfgcolor = 1; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +dspcolor_t dspfgcolor = 0xFFFF; +dspcolor_t dspbgcolor = 0x0000; +void dspbegin() { dspsetscrollmode(1, 4); } +void dspprintchar(char c, mem_t col, mem_t row) {} +void dspclear() {} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgcolor=0; } +void vgacolor(short c) { + short base=128; + if (c==8) { rgbcolor(64, 64, 64); return; } + if (c>8) base=255; + rgbcolor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) {} +void line(int x0, int y0, int x1, int y1) {} +void rect(int x0, int y0, int x1, int y1) {} +void frect(int x0, int y0, int x1, int y1) {} +void circle(int x0, int y0, int r) {} +void fcircle(int x0, int y0, int r) {} +#endif + + +/* + * SD1963 TFT display code with UTFT. + * Tested witth SD1963 800*480 board. + * it is mainly intended for a MEGA or DUE as a all in one system + * this is for a MEGA shield and the CTE DUE shield, for the due + * you need to read the comment in Arduino/libraries/UTFT/hardware/arm + * HW_ARM_defines.h -> uncomment the DUE shield + * See also + * https://github.com/slviajero/tinybasic/wiki/Projects:-4.-A-standalone-computer-with-a-TFT-screen-based-on-a-DUE + */ +#ifdef ARDUINOTFT +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +extern uint8_t SmallFont[]; +extern uint8_t BigFont[]; +#ifdef ARDUINO_SAM_DUE +UTFT tft(CTE70,25,26,27,28); +#else +UTFT tft(CTE70,38,39,40,41); +#endif +const int dsp_rows=30; +const int dsp_columns=50; +char dspfontsize = 16; +const uint32_t dspdefaultfgcolor = 0x00FFFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +typedef uint32_t dspcolor_t; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { tft.InitLCD(); tft.setFont(BigFont); tft.clrScr(); dspsetscrollmode(1, 4); } +void dspprintchar(char c, mem_t col, mem_t row) { if (c) tft.printChar(c, col*dspfontsize, row*dspfontsize); } +void dspclear() { + tft.clrScr(); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; + vgacolor(dspfgvgacolor); +} +void rgbcolor(int r, int g, int b) { + tft.setColor(r,g,b); + dspfgcolor=((uint8_t)r << 16) + ((uint8_t)g << 8) + b; + dspfgvgacolor=rgbtovga(r, g, b); +} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { tft.setColor(64, 64, 64); return; } + if (c>8) base=255; + tft.setColor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void plot(int x, int y) { tft.drawPixel(x, y); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1); } +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r); } +#endif + +/* + * this is the VGA code for fablib - experimental + * not all modes and possibilities explored, with networking on an ESP + * VGA16 is advisable. It leaves enough memory for the interpreter and network. + * this code overrides the display driver logic as fabgl brings an own + * terminal emulation + */ +#if defined(ARDUINOVGA) && defined(ARDUINO_TTGO_T7_V14_Mini32) +/* static fabgl::VGAController VGAController; */ +fabgl::VGA16Controller VGAController; /* 16 color object with less memory */ +static fabgl::Terminal Terminal; +static Canvas cv(&VGAController); +TerminalController tc(&Terminal); +Color vga_graph_pen = Color::BrightWhite; +Color vga_graph_brush = Color::Black; +Color vga_txt_pen = Color::BrightGreen; +Color vga_txt_background = Color::Black; +#ifdef HASTONE +fabgl::SoundGenerator soundGenerator; +#endif + + +/* this starts the vga controller and the terminal right now */ +void vgabegin() { + VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_15); + VGAController.setResolution(VGA_640x200_70Hz); + Terminal.begin(&VGAController); + Terminal.setBackgroundColor(vga_txt_background); + Terminal.setForegroundColor(vga_txt_pen); + Terminal.connectLocally(); + Terminal.clear(); + Terminal.enableCursor(1); + Terminal.setTerminalType(TermType::VT52); +} + +int vgastat(char c) {return 0; } + +/* scale the screen size */ +void vgascale(int* x, int* y) { + *y=*y*10/24; +} + +void rgbcolor(int r, int g, int b) { + short vga; + if (r>191 || g>191 || b>191) vga=8; else vga=0; + vga=vga+r/128+g/128*2+b/128*4; + vga_graph_pen=fabgl::Color(vga); +} + +void vgacolor(short c) { vga_graph_pen = fabgl::Color(c%16); } +void plot(int x, int y) { + vgascale(&x, &y); + cv.setPenColor(vga_graph_pen); + cv.setPixel(x,y); + cv.setPenColor(vga_txt_pen); +} + +void line(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawLine(x0, y0, x1, y1); + cv.setPenColor(vga_txt_pen); +} + +void rect(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawRectangle(x0, y0, x1, y1); + cv.setPenColor(vga_txt_pen); +} + +void frect(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setBrushColor(vga_graph_pen); + cv.fillRectangle(x0, y0, x1, y1); + cv.setBrushColor(vga_txt_background); +} + +void circle(int x0, int y0, int r) { + int rx = r; + int ry = r; + vgascale(&x0, &y0); + vgascale(&rx, &ry); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawEllipse(x0, y0, rx, ry); + cv.setPenColor(vga_txt_pen); +} + +void fcircle(int x0, int y0, int r) { + int rx = r; + int ry = r; + vgascale(&x0, &y0); + vgascale(&rx, &ry); + cv.setBrushColor(vga_graph_pen); + cv.fillEllipse(x0, y0, rx, ry); + cv.setBrushColor(vga_txt_background); +} + +void vgawrite(char c){ + switch(c) { + case 12: /* form feed is clear screen */ + Terminal.write(27); Terminal.write('H'); + Terminal.write(27); Terminal.write('J'); + return; + case 10: /* this is LF Unix style doing also a CR */ + Terminal.write(10); Terminal.write(13); + return; + } + Terminal.write(c); +} +#else +void vgabegin(){} +int vgastat(char c) {return 0; } +void vgawrite(char c){} +#endif + +/* + * Keyboard code for either the Fablib Terminal class or + * PS2Keyboard - please note that you need the ESP patched + * version here as mentioned above + * + * sets HASKEYBOARD to inform basic about this capability + * + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +#ifdef ARDUINO_TTGO_T7_V14_Mini32 +#define PS2FABLIB +#define HASKEYBOARD +fabgl::PS2Controller PS2Controller; +char fabgllastchar = 0; +#else +#if defined(ARDUINO) && defined(ARDUINOPS2) +#define PS2KEYBOARD +#define HASKEYBOARD +PS2Keyboard keyboard; +#else +#if defined(ARDUINO) && defined(ARDUINOUSBKBD) +#define HASKEYBOARD +#define USBKEYBOARD +USBHost usb; +KeyboardController keyboard(usb); +char usbkey=0; +#else +#if defined(ARDUINOZX81KBD) +#define HASKEYBOARD +#define ZX81KEYBOARD +ZX81Keyboard keyboard; +#endif +#endif +#endif +#endif + +/* + * Experimental, unfinished, rudimentary + */ +#if defined(ARDUINOUSBKBD) +/* not really needed, only here for reference */ +char usbkeymapUS[] = +{' ', '"', '!', '#', '$', '%', '&', '\'', '(', ')', '*', '+', + ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', + 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', + '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', 0, 0}; +/* map the ASCII codes of the essential keys for BASIC of a + * German keyboard, most notable is < and > which is ö/a + */ +char usbkeymapGerman[] = +{' ', '!', '!', '#', '$', '%', '/', '>', ')', '=', '(', '+', + ',', '-', '.', '-', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', '<', ';', '=', ':', '_', '"', 'A', 'B', 'C', + 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Z', 'Y', '[', + '#', '+', '&', '?', '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'z', 'y', '{', '\'', '*', 0, 0}; + +/* + * he weak functions from the keyboard controller class implemented + */ +void keyPressed() {} +void keyReleased() { + switch (keyboard.getOemKey()) { + case 40: + usbkey=10; + break; + case 42: + case 76: + usbkey=127; + break; + case 41: + usbkey=27; + break; + default: + usbkey=keyboard.getKey(); + if (usbkey>31 && usbkey<128) usbkey=usbkeymapGerman[usbkey-32]; + } +} +#endif + +/* + * keyboard controller code + */ + +void kbdbegin() { +#ifdef PS2KEYBOARD + keyboard.begin(PS2DATAPIN, PS2IRQPIN, PS2Keymap_German); +#else +#ifdef PS2FABLIB + PS2Controller.begin(PS2Preset::KeyboardPort0); + PS2Controller.keyboard()->setLayout(&fabgl::GermanLayout); +#else +#ifdef USBKEYBOARD +/* nothing to be done here */ +#else +#ifdef ZX81KEYBOARD + keyboard.begin(zx81pins); +#endif +#endif +#endif +#endif +} + +int kbdstat(char c) {return 0; } + +char kbdavailable(){ +#ifdef PS2KEYBOARD + return keyboard.available(); +#else +#ifdef PS2FABLIB + if (fabgllastchar) return Terminal.available()+1; else return Terminal.available(); +#else +#ifdef USBKEYBOARD +/* if we already have a key, tell the caller we have one */ + if (usbkey) return 1; +/* if not, look it up */ + if (usbkey) return 1; else return 0; +#else +#ifdef ZX81KEYBOARD + return keyboard.available(); +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD +/* a poor man's debouncer, unstable state returns 0 */ + char c=keypadread(); + if (c != 0) { + bdelay(2); + if (c == keypadread()) return 1; + } +#endif + return 0; +} + +char kbdread() { + char c = 0; + while(!kbdavailable()) byield(); +#ifdef PS2KEYBOARD + c=keyboard.read(); +#endif +#ifdef PS2FABLIB + if (fabgllastchar) { c=fabgllastchar; fabgllastchar=0; } + else c=Terminal.read(); +#else +#ifdef USBKEYBOARD +/* if we have read a key before, return it else look it up */ + c=usbkey; + usbkey=0; +#else +#ifdef ZX81KEYBOARD + c=keyboard.read(); +#endif +#endif +#endif +#ifdef HASKEYPAD + if (c == 0) { /* we have no character from a real keyboard, ask the keypad */ + c=keypadread(); +/* if the keypad is in non repeat mode, block */ + if (!kbdrepeat) while(kbdavailable()) byield(); + } +#endif + if (c == 13) c=10; + return c; +} + +char kbdcheckch() { +#ifdef PS2KEYBOARD +/* + * only works with the patched library https://github.com/slviajero/PS2Keyboard + */ +#ifdef PS2KEYBOARD_HASPEEK + return keyboard.peek(); +#else +/* + * for the original library https://github.com/PaulStoffregen/PS2Keyboard + * GET does not work properly with it as there is no peek functionality which is needed + * for non blocking IO and the ability to stop programs + */ + if (kbdavailable()) return kbdread(); else return 0; +#endif +#else +#ifdef PS2FABLIB + if (fabgllastchar) return fabgllastchar; + if (kbdavailable()) { fabgllastchar=Terminal.read(); return fabgllastchar; } +#else +#ifdef USBKEYBOARD + return usbkey; +#else +#ifdef ZX81KEYBOARD + return keyboard.lastKey; /* dont peek here as checkch called in a fast loop in statement(), peek done in byield*/ +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD + return keypadread(); +#endif + return 0; +} + +/* + * this is a generic display code + * it combines the functions of LCD and TFT drivers + * if this code is active + * + * dspprintchar(char c, short col, short row) + * dspclear() + * dspbegin() + * dspupdate() + * dspsetcursor(mem_t c) + * dspsetfgcolor(address_t c) + * void dspsetbgcolor(address_t c) + * void dspsetreverse(mem_t c) + * mem_t dspident() + * + * have to be defined before in a hardware dependent section. + * Only dspprintchar and dspclear are needed, all other can be stubs + * + * VGA systems don't use the display driver for text based output. + * + * The display driver exists as a buffered version that can scroll + * or an unbuffered version that cannot scroll. Interfaces to hardware + * scrolling are not yet implemented. + * + * A VT52 state engine is implemented and works for buffered and + * unbuffered displays. Only buffered displays have the full VT52 + * feature set including most of the GEMDOS extensions described here: + * https://en.wikipedia.org/wiki/VT52 + * + * dspupdatemode controls the page update behaviour + * 0: character mode, display each character separately + * 1: line mode, update the display after each line + * 2: page mode, update the display after an ETX + * ignored if the display has no update function + * + */ + +#ifdef DISPLAYDRIVER + +/* the cursor position */ +mem_t dspmycol = 0; +mem_t dspmyrow = 0; + +/* the escape state of the vt52 terminal */ +mem_t dspesc = 0; + +/* which update mode do we have */ +mem_t dspupdatemode = 0; + +/* how do we handle wrap 0 is wrap, 1 is no wrap */ +mem_t dspwrap = 0; + +/* the print mode */ +mem_t dspprintmode = 0; + +/* the scroll control variables */ +mem_t dspscrollmode = 0; +mem_t dsp_scroll_rows = 1; + +int dspstat(char c) { return 0; } + +void dspsetcursorx(mem_t c) { + if (c>=0 && c=0 && r=0 && i<=dsp_columns*dsp_rows-1) return dspbuffer[i/dsp_columns][i%dsp_columns]; else return 0; +} + +dspbuffer_t dspgetrc(mem_t r, mem_t c) { return dspbuffer[r][c]; } + +dspbuffer_t dspgetc(mem_t c) { return dspbuffer[dspmyrow][c]; } + +/* this functions prints a character and updates the display buffer */ +void dspsetxy(dspbuffer_t ch, mem_t c, mem_t r) { + if (r>=0 && c>=0 && r> 8) & 15); + dspprintchar(b & charmask, c, r); + dsprestorepen(); +#else + dspprintchar(b, c, r); +#endif + } else { + dspprintchar(' ', c, r); + } + } + dspbuffer[r][c]=b; + } + } + +/* delete the characters in the remaining lines */ + for (r=dsp_rows-scroll_rows; rline; r--) { + for (c=0; c> 8) & 15); + dspprintchar(b & charmask, c, r); + dsprestorepen(); +#else + dspprintchar(b, c, r); +#endif + } else { + dspprintchar(' ', c, r); + } + } + dspbuffer[r][c]=b; + } + } + +/* delete the characters in the remaining line */ + for (c=0; c= dsp_rows) dspscroll(dsp_scroll_rows); + dspmycol=0; + if (dspupdatemode == 1) dspupdate(); + return; + case 11: // vertical tab - converted to line feed without carriage return + if (dspmyrow < dsp_rows-1) dspmyrow++; + return; + case 12: // form feed is clear screen plus home + dspbufferclear(); + dspclear(); + return; + case 13: // classical carriage return, no form feed + dspmycol=0; + return; + case 27: // escape - initiate vtxxx mode + dspesc=1; + return; + case 28: // cursor back - this is what terminal applications send for cursor back + if (dspmycol > 0) dspmycol--; + return; + case 29: // cursor forward - this is what terminal applications send for cursor back + if (dspmycol < dsp_columns-1) dspmycol++; + return; + case 8: // back space is delete the moment + case 127: // delete + if (dspmycol > 0) { + dspmycol--; + dspsetxy(0, dspmycol, dspmyrow); + } + return; + case 2: // we abuse start of text as a home sequence, may also be needed for Epaper later + dspmycol=dspmyrow=0; + return; + case 3: // ETX = Update display for buffered display like Epaper + dspupdate(); + return; + default: // eliminate all non printables - problematic for LCD special character + if (c<32) return; + break; + } + + dspsetxy(c, dspmycol, dspmyrow); + dspmycol++; + if (dspmycol == dsp_columns) { + if (!dspwrap) { /* we simply ignore the cursor */ + dspmycol=0; + dspmyrow=(dspmyrow + 1); + } + if (dspmyrow >= dsp_rows) dspscroll(dsp_scroll_rows); + } + if (dspupdatemode == 0) dspupdate(); +} + +/* + * This is the minimalistic VT52 state engine. It is an interface to + * process single byte control sequences of the form char + */ + +#ifdef HASVT52 +/* the state variable */ +char vt52s = 0; + +/* the graphics mode mode - unused so far */ +mem_t vt52graph = 0; + +/* the secondary cursor */ +mem_t vt52mycol = 0; +mem_t vt52myrow = 0; + +/* temp variables for column and row , do them here and not in the case: guess why */ +mem_t vt52tmpr; +mem_t vt52tmpc; + +/* an output buffer for the vt52 terminal */ +const mem_t vt52buffersize = 4; +char vt52outbuffer[vt52buffersize] = { 0, 0, 0, 0 }; +mem_t vt52bi = 0; +mem_t vt52bj = 0; + +/* the reader from the buffer */ +char vt52read() { + if (vt52bi<=vt52bj) { vt52bi = 0; vt52bj = 0; } /* empty, reset */ + if (vt52bi>vt52bj) return vt52outbuffer[vt52bj++]; + return 0; +} + +/* the avail from the buffer */ +mem_t vt52avail() { return vt52bi-vt52bj; } + +/* putting something into the buffer */ +void vt52push(char c) { + if (vt52bi < vt52buffersize) vt52outbuffer[vt52bi++]=c; +} + +/* clear the buffer */ +void vt52clear() { + vt52bi=0; +} + +/* something little */ +uint8_t vt52number(char c) { + uint8_t b=c; + if (b>31) return b-32; else return 0; +} + +/* + * The VT52 data registers for the graphics and wiring extension. + * x,y are 14 bit and z is 7bit. Data is transferred in VT52 style + * -> numerical value plus 32 to map the data to printable characters + * Access is done through the the ESC x, ESC y and ESC z sequences: + * ESC x #1 #2 + * sets the xregister to (#1-32)+(#2-32)*128 + */ + +#if defined(DISPLAYHASGRAPH) || defined(VT52WIRING) +#define VT52HASREGISTERS +/* the three register variables */ +uint16_t vt52regx = 0; +uint16_t vt52regy = 0; +uint8_t vt52regz = 0; + +/* one argument cache for two byte arguments */ +uint8_t vt52arg = 0; +#endif + +/* + * graphics code in VT52, if you want to control graphics from the character stream + * The ESC g sequence sends a graphics command as the second byte after the g + * + * Valid values for g are + * s: set the graphics cursor + * p: plot a point + * l: draw a line + * L: draw a line and move the cursor to the endpoint + * r: draw a rectangle + * R: draw a filled rectangle + * c: draw a circle + * C: draw a filled circle + * + */ +#ifdef DISPLAYHASGRAPH +/* the grahics cursor of VT52 */ +uint16_t vt52graphx = 0; +uint16_t vt52graphy = 0; + +/* execute one graphics command */ +void vt52graphcommand(uint8_t c) { + switch(c) { + case 's': /* set the cursor */ + vt52graphx=vt52regx; + vt52graphy=vt52regy; + break; + case 'p': /* plot a point at the cursor */ + plot(vt52graphx, vt52graphy); + break; + case 'l': /* plot a line */ + line(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'L': /* plot a line and update the cursor, needed for drawing shapes */ + line(vt52graphx, vt52graphy, vt52regx, vt52regy); + vt52graphx=vt52regx; + vt52graphy=vt52regy; + break; + case 'r': /* plot a rectangle */ + rect(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'c': /* plot a circle */ + circle(vt52graphx, vt52graphy, vt52regx); + break; + case 'R': /* plot a filled rectangle */ + frect(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'C': /* plot a filled circle */ + fcircle(vt52graphx, vt52graphy, vt52regx); + break; + } +} +#endif + +/* + * this is an odd part of the vt52 code with this, the terminal + * can control the digital and analog pins. + * it is meant for situations where the terminal is controlled by a (powerful) + * device with no or very few I/O pins. It can use the pins of the Arduino through + * the terminal. This works as long as everything stays within the terminals timescale + * On a 9600 baud interface, the character processing time is 1ms, everything slower + * than approximately 10ms can be done through the serial line. + */ + +#ifdef VT52WIRING +#define VT52HASREGISTERS + void vt52wiringcommand(uint8_t c) { + switch(c) { + case 'p': /* pinMode z */ + pinMode(vt52regz); + break; + case 'l': /* digital write low pin z*/ + digitalWrite(vt52regz, LOW); + break; + case 'h': /* digital write high pin z*/ + digitalWrite(vt52regz, HIGH); + break; + case 'r': /* digital read from pin z */ + vt52push(digitalRead(vt52regz)+32); + break; + case 'a': /* analog write pin z to value x */ + analogWrite(vt52regz, vt52regx); + break; + case 'A': /* analog read from pin z */ + break; + case 't': /* tone at pin z, frequency x, duration y */ + tone(vt52regz, vt52regx, vt52regy); + break; + } + } +#endif + + +/* vt52 state engine */ +void dspvt52(char* c){ + +/* reading and processing multi byte commands */ + switch (vt52s) { + case 'Y': + if (dspesc == 2) { + dspsetcursory(vt52number(*c)); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + dspsetcursorx(vt52number(*c)); + *c=0; + } + vt52s=0; + break; + case 'b': + dspsetfgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + case 'c': + dspsetbgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; +#ifdef VT52HASREGISTERS + case 'x': + if (dspesc == 2) { + vt52arg=vt52number(*c); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + vt52regx=vt52arg+vt52number(*c)*128; + *c=0; + } + vt52s=0; + break; + case 'y': + if (dspesc == 2) { + vt52arg=vt52number(*c); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + vt52regy=vt52arg+vt52number(*c)*127; + *c=0; + } + vt52s=0; + break; + case 'z': + vt52regz=vt52number(*c); + *c=0; + vt52s=0; + break; +#endif +#ifdef DISPLAYHASGRAPH + case 'g': + vt52graphcommand(*c); + *c=0; + vt52s=0; + break; +#endif +#ifdef VT52WIRING + case 'a': + vt52wiringcommand(*c); + *c=0; + vt52s=0; + break; +#endif + } + +/* commands of the terminal in text mode */ + + switch (*c) { + case 'v': /* GEMDOS / TOS extension enable wrap */ + dspwrap=0; + break; + case 'w': /* GEMDOS / TOS extension disable wrap */ + dspwrap=1; + break; + case '^': /* Printer extensions - print on */ + dspprintmode=1; + break; + case '_': /* Printer extensions - print off */ + dspprintmode=0; + break; + case 'W': /* Printer extensions - print without display on */ + dspprintmode=2; + break; + case 'X': /* Printer extensions - print without display off */ + dspprintmode=0; + break; + case 'V': /* Printer extensions - print cursor line */ +#if defined(ARDUINOPRT) && defined(DISPLAYCANSCROLL) + for (mem_t i=0; i': // alternate keypad off + break; + case 'b': // GEMDOS / TOS extension text color + case 'c': // GEMDOS / TOS extension background color + vt52s=*c; + dspesc=1; + *c=0; + return; + case 'e': // GEMDOS / TOS extension enable cursor + dspsetcursor(1); + break; + case 'f': // GEMDOS / TOS extension disable cursor + dspsetcursor(0); + break; + case 'p': // GEMDOS / TOS extension reverse video + dspsetreverse(1); + break; + case 'q': // GEMDOS / TOS extension normal video + dspsetreverse(0); + break; + case 'A': // cursor up + if (dspmyrow>0) dspmyrow--; + break; + case 'B': // cursor down + if (dspmyrow < dsp_rows-1) dspmyrow++; + break; + case 'C': // cursor right + if (dspmycol < dsp_columns-1) dspmycol++; + break; + case 'D': // cursor left + if (dspmycol>0) dspmycol--; + break; + case 'E': // GEMDOS / TOS extension clear screen + dspbufferclear(); + dspclear(); + break; + case 'H': // cursor home + dspmyrow=dspmycol=0; + break; + case 'Y': // Set cursor position + vt52s='Y'; + dspesc=2; + *c=0; + return; + case 'J': // clear to end of screen + for (int i=dspmycol+dsp_columns*dspmyrow; i0) dspmyrow--; else dspreversescroll(0); + break; + case 'L': // Insert line + dspreversescroll(dspmyrow); + break; + case 'M': + vt52tmpr = dspmyrow; + vt52tmpc = dspmycol; + dspscroll(1, dspmyrow); + dspmyrow=vt52tmpr; + dspmycol=vt52tmpc; + break; +#ifdef VT52REGISTERS + case 'x': // set the x register + case 'y': // set the y register + vt52s=*c; + dspesc=2; + *c=0; + return; + case 'z': // set the z register + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif +#ifdef DISPLAYHASGRAPH + case 'g': // execute a graphics command + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif +#ifdef VT52WIRING + case 'a': + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif + } + dspesc=0; + *c=0; +} +#endif + +#else +#ifdef GRAPHDISPLAYDRIVER +/* a super simple display driver for graphics only systems, only handles drawing + and graphics cursor stuff, experimental for epapers */ +#undef HASVT52 +#define GBUFFERSIZE 80 +static char gbuffer[GBUFFERSIZE]; +void dspouts(char* s, address_t l) { + int i; + for (i=0; i> 4) & 0b00000111) * 10; + case 2: + return (v & 0b00001111)+((v >> 4) & 0b00000011) * 10 ; /* only 24 hour support */ + case 3: + return (v & 0b00001111); + case 4: + return (v & 0b00001111) + ((v >> 4) & 0b00000011) * 10; + case 5: + return (v & 0b00001111) + ((v >> 4) & 0b00000001) * 10; + case 6: + return (v & 0b00001111) + (v >> 4) * 10; + default: + return v; + } +} + +/* set the registers */ +void rtcset(uint8_t i, short v) { + uint8_t b; + + /* to bcd if we deal with a clock byte (0-6) */ + if (i<7) b=(v%10 + ((v/10) << 4)); else b=v; + + switch (i) { + case 0: + case 1: + b = b & 0b01111111; + break; + case 2: + case 4: + b = b & 0b00111111; /* only 24 hour support */ + break; + case 3: + b = b & 0b00000111; + break; + case 5: + b = b & 0b00011111; + } + +/* send the address and then the byte */ + Wire.beginTransmission(RTCI2CADDR); + Wire.write(i); + Wire.write(b); + Wire.endTransmission(); +} +#else +#if defined(HASBUILTINRTC) +#define HASCLOCK +/* + * Built-in clocks of STM32 and MKR are based on the RTCZero interface + * an rtc object is created after loading the libraries + * for NRENESAs the interface is slightly different + */ +#ifndef ARDUINO_ARCH_RENESAS +/* begin method */ +void rtcbegin() { + rtc.begin(); /* 24 hours mode */ +} + +/* get the time */ +short rtcget(short i) { + switch (i) { + case 0: + return rtc.getSeconds(); + case 1: + return rtc.getMinutes(); + case 2: + return rtc.getHours(); + case 3: + // return rtc.getWeekDay(); + return 0; + case 4: + return rtc.getDay(); + case 5: + return rtc.getMonth(); + case 6: + return rtc.getYear(); + default: + return 0; + } +} + +/* set the time */ +void rtcset(uint8_t i, short v) { + switch (i) { + case 0: + rtc.setSeconds(v); + break; + case 1: + rtc.setMinutes(v); + break; + case 2: + rtc.setHours(v); + break; + case 3: + // rtc.setWeekDay(v); + break; + case 4: + rtc.setDay(v); + break; + case 5: + rtc.setMonth(v); + break; + case 6: + rtc.setYear(v); + break; + default: + return; + } +} +#else +/* NRENESA code, interface different to my great ennui! */ +/* begin method */ +void rtcbegin() { + RTC.begin(); /* 24 hours mode */ +} + +/* get the time */ +short rtcget(short i) { + RTC.getTime(rtc); + switch (i) { + case 0: + return rtc.getSeconds(); + case 1: + return rtc.getMinutes(); + case 2: + return rtc.getHour(); + case 3: + return static_cast(rtc.getDayOfWeek()); + case 4: + return rtc.getDayOfMonth(); + case 5: + return Month2int(rtc.getMonth()); + case 6: + return rtc.getYear(); + default: + return 0; + } +} + +/* set the time */ +void rtcset(uint8_t i, short v) { + RTC.getTime(rtc); + switch (i) { + case 0: + rtc.setSecond(v); + break; + case 1: + rtc.setMinute(v); + break; + case 2: + rtc.setHour(v); + break; + case 3: + rtc.setDayOfWeek(static_cast(v)); + break; + case 4: + rtc.setDayOfMonth(v); + break; + case 5: + rtc.setMonthOfYear(static_cast(v-1)); + break; + case 6: + rtc.setYear(v); + break; + default: + return; + } + RTC.setTime(rtc); +} +#endif +#else +#ifdef ARDUINORTCEMULATION +#define HASCLOCK +/* + * A millis() based real time clock emulation. It creates a 32bit Unix time + * variable and adds millis()/1000 + */ + +/* the begin method - standard interface to BASIC*/ +void rtcbegin() {} + +/* the current unix time - initialized to the begin of the epoch */ +long rtcutime = 0; + +/* the offset of millis()/1000 when we last set the clock */ +long rtcutimeoffset = 0; + +/* the current unix date - initialized to the begin of the epoch */ +struct { uint8_t second; uint8_t minute; uint8_t hour; uint8_t weekday; uint8_t day; uint8_t month; uint16_t year; } + rtctime = { 0, 0, 0, 4, 1, 1, 1970 }; + +/* the number of days per month */ +const int rtcmonthdays[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; + + +/* convert the time to a unix time number from https://de.wikipedia.org/wiki/Unixzeit */ +void rtctimetoutime() { + int leapyear = ((rtctime.year-1)-1968)/4 - ((rtctime.year-1)-1900)/100 + ((rtctime.year-1)-1600)/400; + long epochdays = (rtctime.year-1970)*365 + leapyear + rtcmonthdays[rtctime.month-1] + rtctime.day - 1; + if ((rtctime.month > 2) && (rtctime.year%4 == 0 && (rtctime.year%100 != 0 || rtctime.year%400 == 0))) epochdays+=1; + rtcutime = rtctime.second + 60*(rtctime.minute + 60*(rtctime.hour + 24*epochdays)); +} + +/* convert the unix time to time and date from https://de.wikipedia.org/wiki/Unixzeit */ +void rtcutimetotime() { + const unsigned long int secondsperday = 86400ul; /* 24* 60 * 60 */ + const unsigned long int daysperyear = 365ul; /* no leap year */ + const unsigned long int daysinfoury = 1461ul; /* 4*365 + 1 */ + const unsigned long int daysinhundredy = 36524ul; /* 100*365 + 25 - 1 */ + const unsigned long int daysinfourhundredy = 146097ul; /* 400*365 + 100 - 4 + 1 */ + const unsigned long int daynumberzero = 719468ul; /* day number of March, 1 1970 */ + + unsigned long int daynumber = daynumberzero + rtcutime/secondsperday; + unsigned long int secondssincemidnight = rtcutime%secondsperday; + unsigned long int temp; + + /* the weekday is based in the daynumber since March, 1, 1970 a SUNDAY */ + rtctime.weekday = daynumber % 7; + + /* leap years of the Gregorian calendar */ + temp = 4 * (daynumber + daysinhundredy + 1) / daysinfourhundredy - 1; + rtctime.year = 100 * temp; + daynumber -= daysinhundredy * temp + temp / 4; + + /* leap years of the Julian calendar */ + temp = 4 * (daynumber + daysperyear + 1) / daysinfoury - 1; + rtctime.year += temp; + daynumber -= daysperyear * temp + temp / 4; + + /* calculate day and month, reference March 1 */ + rtctime.month = (5 * daynumber + 2) / 153; + rtctime.day = daynumber - (rtctime.month * 153 + 2) / 5 + 1; + + /* recalulate to a normal year */ + rtctime.month += 3; + if (rtctime.month > 12) { + rtctime.month -= 12; + rtctime.year++; + } + + /* calculate hours, months, seconds */ + rtctime.hour = secondssincemidnight / 3600; + rtctime.minute = secondssincemidnight % 3600 / 60; + rtctime.second = secondssincemidnight % 60; +} + +/* get the time elements -> standard interface to BASIC */ +short rtcget(short i) { +/* add to the last time we set the clock and subtract the offset*/ + rtcutime = millis()/1000 + rtcutimeoffset; +/* calulate the time data */ + rtcutimetotime(); + + switch (i) { + case 0: + return rtctime.second; + case 1: + return rtctime.minute; + case 2: + return rtctime.hour; + case 3: + return rtctime.weekday; + case 4: + return rtctime.day; + case 5: + return rtctime.month; + case 6: + return rtctime.year; + default: + return 0; + } +} + +/* set the time elements -> standard interface to BASIC */ +void rtcset(uint8_t i, short v) { +/* how much time has elapsed since we last set the clock */ + rtcutime = millis()/1000 + rtcutimeoffset; + +/* generate the time structure */ + rtcutimetotime(); + +/* set the clock */ + switch (i) { + case 0: + if (v>=0 && v<60) rtctime.second=v; + break; + case 1: + if (v>=0 && v<60) rtctime.minute=v; + break; + case 2: + if (v>=0 && v<24) rtctime.hour=v; + break; + case 3: + if (v>=0 && v<7) rtctime.weekday=v; + break; + case 4: + if (v>0 && v<32) rtctime.day=v; + break; + case 5: + if (v>0 && v<13) rtctime.month=v; + break; + case 6: + if (v>=1970 && v<2100) rtctime.year=v; + break; + default: + return; + } + + /* recalulate the right offset by first finding the second value of the new date*/ + rtctimetoutime(); + +/* remember when we set the clock */ + rtcutimeoffset = rtcutime - millis()/1000; +} +#else +#if defined(ARDUINO_ARCH_ESP32) +#define HASCLOCK +/* + * On ESP32 we use the builtin clock, this is a generic Unix time mechanism equivalent + * to the code in hardware-posix.h + */ + +/* no begin needed */ +void rtcbegin() {} + +/* get the time */ +short rtcget(short i) { + struct tm rtctime; + time_t now; + time(&now); + localtime_r(&now, &rtctime); + + switch (i) { + case 0: + return rtctime.tm_sec; + case 1: + return rtctime.tm_min; + case 2: + return rtctime.tm_hour; + case 3: + return rtctime.tm_wday; + case 4: + return rtctime.tm_mday; + case 5: + return rtctime.tm_mon+1; + case 6: + if (rtctime.tm_year > 100) return rtctime.tm_year-100; else return rtctime.tm_year; + default: + return 0; + } + + return 0; +} + +/* set the time */ +void rtcset(uint8_t i, short v) { + struct tm rtctime; + struct timeval tv; + + /* get the time stucture from the system */ + time_t now; + time(&now); + localtime_r(&now, &rtctime); + + /* change what needs to be changed */ + switch (i) { + case 0: + rtctime.tm_sec = v%60; + break; + case 1: + rtctime.tm_min = v%60; + break; + case 2: + rtctime.tm_hour = v%24; + break; + case 3: + rtctime.tm_wday = v%7; + break; + case 4: + rtctime.tm_mday = v; + break; + case 5: + rtctime.tm_mon = v-1; + break; + case 6: + if (v > 1900) v=v-1900; /* get years to the right value */ + if (v < 50) v=v+100; + rtctime.tm_year = v; + break; + } + + /* calculate the seconds and put it back*/ + time_t epocht = mktime(&rtctime); + if (epocht > 2082758399){ + tv.tv_sec = epocht - 2082758399; + } else { + tv.tv_sec = epocht; + } + tv.tv_usec = 0; + settimeofday(&tv, NULL); +} +#else +/* no clock at all, no operations */ +void rtcbegin() {} +short rtcget(short i) { return 0; } +void rtcset(uint8_t i, short v) { } +#endif +#endif +#endif +#endif + +/* + * External EEPROM is handled through an EFS filesystem object + * see https://github.com/slviajero/EepromFS + * for details. Here the most common parameters are set as a default. +*/ +#ifdef ARDUINOEFS +#undef ARDUINOI2CEEPROM +#ifndef EFSEEPROMADDR +#define EFSEEPROMADDR 0x50 +#endif +#ifdef EFSEEPROMSIZE +EepromFS EFS(EFSEEPROMADDR, EFSEEPROMSIZE); +#else +EepromFS EFS(EFSEEPROMADDR); +#endif +#endif + +/* + * External EEPROM is handled through an EFS filesystem object in raw mode + * see https://github.com/slviajero/EepromFS + * for details. Here the most common parameters are set as a default. +*/ + +#if defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED) +#ifndef I2CEEPROMADDR +#define I2CEEPROMADDR 0x50 +#endif +#ifdef I2CEEPROMSIZE +EepromFS EFSRAW(I2CEEPROMADDR, I2CEEPROMSIZE); +#else +EepromFS EFSRAW(I2CEEPROMADDR); +#endif +#endif + +/* + * definitions for ESP Wifi and MQTT, super experimental. + * As networking is only used for MQTT at the moment, + * mqtt, Wifi and Ethernet comes all in one. + * + * No encryption/authetication is implemented in MQTT. + * Only public, open servers can be used. + * + * MQTT topics can only be 32 bytes long. + * Buffered incoming and outgoing messages can be 128 bytes + * per default. + * + * wifisettings.h is the generic network definition file + * all network settings are compiled into the code + * BASIC cannot change them at runtime. + */ +#ifdef ARDUINOMQTT +#include "wifisettings.h" +#ifdef ARDUINOETH +EthernetClient bethclient; +PubSubClient bmqtt(bethclient); +#else +WiFiClient bwifi; +PubSubClient bmqtt(bwifi); +#endif + +/* the buffers of the outgoing and incoming MQTT topic */ +#define MQTTLENGTH 32 +static char mqtt_otopic[MQTTLENGTH]; +static char mqtt_itopic[MQTTLENGTH]; + +/* + * the buffers for MQTT messages, input and output goes + * through these static buffers. + */ +#define MQTTBLENGTH 128 +volatile char mqtt_buffer[MQTTBLENGTH]; +volatile short mqtt_messagelength; +volatile char mqtt_obuffer[MQTTBLENGTH]; +volatile short mqtt_charsforsend; + +/* the name of the client, generated pseudo randomly to avoind + naming conflicts */ +static char mqttname[12] = "iotbasicxxx"; +void mqttsetname() { + long m = millis(); + mqttname[8]=(char)(65+m%26); + m=m/26; + mqttname[9]=(char)(65+m%26); + m=m/26; + mqttname[10]=(char)(65+m%26); +} + +/* + * network begin method + * needs the settings from wifisettings.h + * + * Default is right now that Wifi is started at boot + * This may change in the future. + * + * Ethernet begin has to be reviewed to avoid DHCP + * start timeout if network is not connected + */ +void netbegin() { +#ifdef ARDUINOETH +#ifdef ETHPIN + Ethernet.init(ETHPIN); +#endif + Ethernet.begin(mac); +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.mode(WIFI_STA); + WiFi.begin(ssid, password); + WiFi.setAutoReconnect(1); +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) + WiFi.begin(ssid, password); +#endif +#endif +} + +/* + * network stop methode, needed sometime to reinit networking + * completely or to save power + * + */ +void netstop() { +#ifdef ARDUINOETH +/* to be done */ +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.mode(WIFI_OFF); +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) + WiFi.end(); +#endif +#endif +} + +/* + * network reconnect methode + * + */ +void netreconnect() { +#ifdef ARDUINOETH +/* */ +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.reconnect(); + bdelay(1000); +#elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) + WiFi.end(); + WiFi.begin(ssid, password); + bdelay(1000); +#endif +#endif +} + +/* + * network connected method + * on ESP Wifi try to reconnect, the delay is odd + * This is a partial reconnect, BASIC needs to handle + * repeated reconnects + */ +char netconnected() { +#ifdef ARDUINOETH + return bethclient.connected(); +#else + return(WiFi.status() == WL_CONNECTED); +#endif +} + +/* + * mqtt callback function, using the byte type here + * because payload can be binary - interface to BASIC + * strings need to be done + * + * mqtt event handling in BASIC can be triggered here + */ +void mqttcallback(char* t, byte* p, unsigned int l) { + short i; + mqtt_messagelength=l; + for(i=0; i MQTTBLENGTH) { + if (!mqttreconnect()) {ert=1; return;}; + if (!bmqtt.publish(mqtt_otopic, (uint8_t*) mqtt_obuffer, (unsigned int) mqtt_charsforsend-1, false)) ert=1; + mqtt_charsforsend=0; + } +} + +/* + * ins copies the buffer into a basic string + * - behold the jabberwock - length gynmastics + * z.a has to be the loop variable and contain the length after this -> intended side effect + */ +void mqttins(char *b, short nb) { + for (z.a=0; z.a0) { + ch=mqtt_buffer[0]; + for (i=0; i= 0 && v<256) analogWrite(p, v); + else error(EORANGE); +} + +void dwrite(address_t p, address_t v){ + if (v == 0) digitalWrite(p, LOW); + else if (v == 1) digitalWrite(p, HIGH); + else error(EORANGE); +} + +/* we normalize the pinMode as ESP32, ESP8266, and other boards behave rather + * differently. Following Arduino conventions we map 0 always to INPUT + * and 1 always to OUTPUT, all the other numbers are passed through to the HAL + * layer of the platform. + * Example: OUTPUT on ESP32 is 3 and 1 is assigned to INPUT. + * XMC also needs special treatment here. + */ +void pinm(address_t p, address_t m){ + uint8_t ml = m; + uint8_t pl = p; + switch (ml) { + case 0: + pinMode(pl, INPUT); + break; + case 1: + pinMode(pl, OUTPUT); + break; + default: + pinMode(pl, ml); + break; + } +} + +/* read a pulse, units given by bpulseunit - default 10 microseconds */ +void bpulsein() { + address_t x,y; + unsigned long t, pt; + + t=((unsigned long) pop())*1000; + y=popaddress(); + x=popaddress(); + if (er != 0) return; + + pt=pulseIn(x, y, t)/bpulseunit; + push(pt); +} + +/* write a pulse in microsecond range */ +void bpulseout(short a) { + short pin, duration; + short value = 1; + short intervall = 0; + short repetition = 1; + if (a == 5) { intervall=pop(); repetition=pop(); } + if (a > 2) value=pop(); + duration=pop(); + pin=pop(); + + while (repetition--) { + digitalWrite(pin, value); + delayMicroseconds(duration*bpulseunit); + digitalWrite(pin, !value); + delayMicroseconds(intervall*bpulseunit); + } +} + +void btone(short a) { + number_t d = 0; + number_t v = 100; + if (a == 4) v=pop(); + if (a >= 3) d=pop(); + x=pop(); + y=pop(); +#if defined(ARDUINO_TTGO_T7_V14_Mini32) && defined(HASTONE) +/* fabGL soundgenerator code of suggestes by testerrossa + * pin numbers below 128 are real arduino pins while + * pin numvers from 128 onwards are sound generator capabilities + * this is different from the original code + * + * Sound generator capabilities are numbered as follows + * 128: Sine wave + * 129: Symmetric square wave + * 130: Sawtooth + * 131: Triangle + * 132: VIC noise + * 133: noise + * + * 256-511: square wave with variable duty cycle + * + */ + if (x == 0) { + soundGenerator.play(false); + soundGenerator.clear(); + return; + } + if (a == 2) d=60000; + if (y == 128) soundGenerator.playSound(SineWaveformGenerator(), x, d, v); + if (y == 129) soundGenerator.playSound(SquareWaveformGenerator(), x, d, v); + if (y == 130) soundGenerator.playSound(SawtoothWaveformGenerator(), x, d, v); + if (y == 131) soundGenerator.playSound(TriangleWaveformGenerator(), x, d, v); + if (y == 132) soundGenerator.playSound(VICNoiseGenerator(), x, d, v); + if (y == 133) soundGenerator.playSound(NoiseWaveformGenerator(), x, d, v); + if (y >= 255 && y < 512 ) { + y=y-255; + SquareWaveformGenerator sqw; + sqw.setDutyCycle(y); + soundGenerator.playSound(sqw, x, d, v); + } + return; +#endif + +#ifndef ARDUINOTONEEMULATION + if (x == 0) { + noTone(y); + } else if (a == 2) { + tone(y, x); + } else { + tone(y, x, d); + } +#else + if (x == 0) { + playtone(0, 0, 0); + } else if (a == 2) { + playtone(y, x, 32767); + } else { + playtone(y, x, d); + } +#endif +} + +/* + * the byield function is called after every statement + * it allows two levels of background tasks. + * + * BASICBGTASK controls if time for background tasks is + * needed, usually set by hardware features + * + * YIELDINTERVAL by default is 32, generating a 32 ms call + * to the network loop function. YIELDTIME is 2 generating + * a 2 ms wait after the network loop to allow for buffer + * clearing after - this is needed on ESP8266 + * + * LONGYIELDINTERVAL by default is 1000, generating a one second + * call to maintenance functions. + * + * On an ESP8266 byield() is called every 100 microseconds + * (after each statement) in RUN mode. BASIC DELAY calls + * this every YIELDTIME ms. + */ + +/* everything that needs to be done often - 32 ms */ +void yieldfunction() { +#ifdef ARDUINOMQTT + bmqtt.loop(); +#endif +#ifdef ARDUINOUSBKBD + usb.Task(); +#endif +#ifdef ARDUINOZX81KBD + (void) keyboard.peek(); /* scan once and set lastkey properly every 32 ms */ +#endif +/* this was delay(YIELDTIME) originally - removed now */ +} + +/* everything that needs to be done not so often - 1 second */ +void longyieldfunction() { +#ifdef ARDUINOETH + Ethernet.maintain(); +#endif +} + +void yieldschedule() { +/* delay(0) is only needed on ESP8266! it calls the scheduler - no bdelay here!! */ + #if defined(ARDUINO_ARCH_ESP8266) + delay(0); + #endif + } + +/* + * The file system driver - all methods needed to support BASIC fs access + * Different filesystems need different prefixes and fs objects, these + * filesystems use the stream API + */ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) +File ifile; +File ofile; +char tempname[SBUFSIZE]; +#if defined(ARDUINOSD) || defined(STM32SDIO) +File root; +File file; +#ifdef ARDUINO_ARCH_ESP32 +const char rootfsprefix[2] = "/"; +#else +const char rootfsprefix[1] = ""; +#endif +#endif +#ifdef ESPSPIFFS +const char rootfsprefix[2] = "/"; +#ifdef ARDUINO_ARCH_ESP8266 +Dir root; +File file; +#endif +#ifdef ARDUINO_ARCH_ESP32 +File root; +File file; +#endif +#endif +#ifdef ARDUINO_ARCH_ESP8266 +#define FILE_OWRITE (sdfat::O_READ | sdfat::O_WRITE | sdfat::O_CREAT | sdfat::O_TRUNC) +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_STM32) +#define FILE_OWRITE FILE_WRITE +#else +#define FILE_OWRITE (O_READ | O_WRITE | O_CREAT | O_TRUNC) +#endif +#endif +#endif + +/* using the POSIX API in LittleFS */ +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +FILE* ifile; +FILE* ofile; +DIR* root; +struct dirent* file; +LittleFS_MBED *myFS; +const char rootfsprefix[10] = MBED_LITTLEFS_FILE_PREFIX; +#endif + +/* use EEPROM as filesystem */ +#ifdef ARDUINOEFS +byte ifile; +byte ofile; +byte file; +#endif + +/* these filesystems may have a path prefixes, we treat STM32SDIO like an SD here */ +#if defined(RP2040LITTLEFS) || defined(ESPSPIFFS) || defined(ARDUINOSD) +char tmpfilename[10+SBUFSIZE]; + +/* add the prefix to the filename */ +char* mkfilename(const char* filename) { + short i,j; + for(i=0; i<10 && rootfsprefix[i]!=0; i++) tmpfilename[i]=rootfsprefix[i]; + tmpfilename[i++]='/'; + for(j=0; jinit() && v) outsc("LittleFS ok \n"); +#endif +#ifdef ARDUINOEFS + int s=EFS.begin(); + if (s>0 && v) { + outsc("Mounted EFS with "); outnumber(s); outsc(" slots.\n"); + } else { + if (EFS.format(32) && v) outsc("EFS: formating 32 slots.\n"); + } +#endif +} + +int fsstat(char c) { +#if defined(FILESYSTEMDRIVER) + if (c == 0) return 1; +#endif + return 0; +} + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char c) { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + if (ofile) ofile.write(c); else ert=1; +#endif +#if defined(RP2040LITTLEFS) + if (ofile) fputc(c, ofile); else ert=1; +#endif +#if defined(ARDUINOEFS) + if (ofile) { + if (!EFS.fputc(c, ofile)) ert=-1; + } else ert=1; +#endif +} + +char fileread(){ + char c; +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + if (ifile) c=ifile.read(); else { ert=1; return 0; } + if (c == -1 || c == 255) ert=-1; + return c; +#endif +#ifdef RP2040LITTLEFS + if (ifile) c=fgetc(ifile); else { ert=1; return 0; } + if (c == -1 || c == 255) ert=-1; + return c; +#endif +#ifdef ARDUINOEFS + if (ifile) c=EFS.fgetc(ifile); else { ert=1; return 0; } + if (c == -1|| c == 255) ert=-1; + return c; +#endif + return 0; +} + +int fileavailable(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + return ifile.available(); +#endif +#ifdef RP2040LITTLEFS + return !feof(ifile); +#endif +#ifdef ARDUINOEFS + return EFS.available(ifile); +#endif + return 0; +} + +char ifileopen(const char* filename){ +#if defined(ARDUINOSD) + ifile=SD.open(mkfilename(filename), FILE_READ); + return (int) ifile; +#endif +#if defined(STM32SDIO) + ifile=SD.open(filename); + return (int) ifile; +#endif +#ifdef ESPSPIFFS + ifile=SPIFFS.open(mkfilename(filename), "r"); + return (int) ifile; +#endif +#ifdef RP2040LITTLEFS + ifile=fopen(mkfilename(filename), "r"); + return (int) ifile; +#endif +#ifdef ARDUINOEFS + ifile=EFS.fopen(filename, "r"); + return (int) ifile; +#endif + return 0; +} + +void ifileclose(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + ifile.close(); +#endif +#ifdef RP2040LITTLEFS + if (ifile) fclose(ifile); + ifile=NULL; +#endif +#ifdef ARDUINOEFS + if (ifile) EFS.fclose(ifile); + ifile=0; +#endif +} + +char ofileopen(char* filename, const char* m){ +#if defined(ARDUINOSD) + if (*m == 'w') ofile=SD.open(mkfilename(filename), FILE_OWRITE); +/* ESP32 has FILE_APPEND defined */ +#ifdef FILE_APPEND + if (*m == 'a') ofile=SD.open(mkfilename(filename), FILE_APPEND); +#else + if (*m == 'a') ofile=SD.open(mkfilename(filename), FILE_WRITE); +#endif + return (int) ofile; +#endif +#if defined(STM32SDIO) + if (*m == 'w') ofile=SD.open(filename, FILE_OWRITE); +/* ESP32 has FILE_APPEND defined */ +#ifdef FILE_APPEND + if (*m == 'a') ofile=SD.open(filename, FILE_APPEND); +#else + if (*m == 'a') ofile=SD.open(filename, FILE_WRITE); +#endif + return (int) ofile; +#endif +#ifdef ESPSPIFFS + ofile=SPIFFS.open(mkfilename(filename), m); + return (int) ofile; +#endif +#ifdef RP2040LITTLEFS + ofile=fopen(mkfilename(filename), m); + return (int) ofile; +#endif +#ifdef ARDUINOEFS + ofile=EFS.fopen(filename, m); + return (int) ofile; +#endif + return 0; +} + +void ofileclose(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + ofile.close(); +#endif +#ifdef RP2040LITTLEFS + if (ofile) fclose(ofile); +#endif +#ifdef ARDUINOEFS + if (ofile) EFS.fclose(ofile); +#endif +} + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +void rootopen() { +#if defined(ARDUINOSD) || defined(STM32SDIO) + root=SD.open("/"); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + root=SPIFFS.openDir("/"); +#endif +#ifdef ARDUINO_ARCH_ESP32 + root=SPIFFS.open("/"); +#endif +#endif +#ifdef RP2040LITTLEFS + root=opendir(rootfsprefix); +#endif +#ifdef ARDUINOEFS + EFS.dirp=0; +#endif +} + +int rootnextfile() { +#if defined(ARDUINOSD) || defined(STM32SDIO) + file=root.openNextFile(); + return (file != 0); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + if (root.next()) { + file=root.openFile("r"); + return 1; + } else { + return 0; + } +#endif +#ifdef ARDUINO_ARCH_ESP32 + file=root.openNextFile(); + return (file != 0); +#endif +#endif +#ifdef RP2040LITTLEFS + file = readdir(root); + return (file != 0); +#endif +#ifdef ARDUINOEFS + file = EFS.readdir(); + return (file != 0); +#endif + return 0; +} + +int rootisfile() { +#if defined(ARDUINOSD) || defined(STM32SDIO) + return (! file.isDirectory()); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + return 1; +#endif +#ifdef ARDUINO_ARCH_ESP32 + return (! file.isDirectory()); +#endif +#endif +#ifdef RP2040LITTLEFS + return (file->d_type == DT_REG); +#endif +#ifdef ARDUINOEFS + return 1; +#endif + return 0; +} + +const char* rootfilename() { +#if defined(ARDUINOSD) + //return (char*) file.name(); + return rmrootfsprefix(file.name()); +#endif +#if defined(STM32SDIO) + return (char*) file.name(); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + // c_str() and copy - real ugly + int i=0; + String s=root.fileName(); + for (i=0; id_name); +#endif +#ifdef ARDUINOEFS + return EFS.filename(file); +#endif + return 0; +} + +long rootfilesize() { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + return file.size(); +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS + return EFS.filesize(file); +#endif + return 0; +} + +void rootfileclose() { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + file.close(); +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS +#endif +} + +void rootclose(){ +#if defined(ARDUINOSD) || defined(STM32SDIO) + root.close(); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + return; +#endif +#ifdef ARDUINO_ARCH_ESP32 + root.close(); +#endif +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS +#endif +} + +/* + * remove method for files + */ +void removefile(char *filename) { +#if defined(ARDUINOSD) + SD.remove(mkfilename(filename)); + return; +#endif +#if defined(STM32SDIO) + SD.remove(filename); + return; +#endif +#ifdef ESPSPIFFS + SPIFFS.remove(mkfilename(filename)); + return; +#endif +#ifdef RP2040LITTLEFS + remove(mkfilename(filename)); + return; +#endif +#ifdef ARDUINOEFS + EFS.remove(filename); + return; +#endif +} + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(short i) { +#if defined(ARDUINOSD) || defined(STM32SDIO) + return; +#endif +#ifdef ESPSPIFFS + if (SPIFFS.format()) { SPIFFS.begin(); outsc("ok\n"); } else { outsc("fail\n"); } +#endif +#ifdef RP2040LITTLEFS + fs.reformat(&bd); + return; +#endif +#ifdef ARDUINOEFS + if (i>0 && i<256) { + if (EFS.format(i)) { EFS.begin(); outsc("ok\n"); } else { outsc("fail\n"); } + outcr(); + } else error(EORANGE); + return; +#endif +} + +/* + * Primary serial code uses the Serial object or Picoserial + * + * The picoseria an own interrupt function. This is used to fill + * the input buffer directly on read. Write is standard like in + * the serial code. + * + * As echoing is done in the interrupt routine, the code cannot be + * used to receive keystrokes from serial and then display the echo + * directly to a display. To do this the write command in picogetchar + * would have to be replaced with a outch() that then redirects to the + * display driver. This would be very tricky from the timing point of + * view if the display driver code is slow. + * + * The code for the UART control is mostly taken from PicoSerial + * https://github.com/gitcnd/PicoSerial, originally written by Chris Drake + * and published under GPL3.0 just like this code + * + */ +#ifdef USESPICOSERIAL +volatile static char picochar; +volatile static char picoa = 0; +volatile static char* picob = NULL; +static short picobsize = 0; +volatile static short picoi = 1; + +/* this is mostly taken from PicoSerial */ +const uint16_t MIN_2X_BAUD = F_CPU/(4*(2*0XFFF + 1)) + 1; + +/* the begin code */ +void picobegin(unsigned long baud) { + uint16_t baud_setting; + cli(); + if ((F_CPU != 16000000UL || baud != 57600) && baud > MIN_2X_BAUD) { + UCSR0A = 1 << U2X0; + baud_setting = (F_CPU / 4 / baud - 1) / 2; + } else { + UCSR0A = 0; + baud_setting = (F_CPU / 8 / baud - 1) / 2; + } +/* assign the baud_setting */ + UBRR0H = baud_setting >> 8; + UBRR0L = baud_setting; +/* enable transmit and receive */ + UCSR0B |= (1 << TXEN0) | (1 << RXEN0) | (1 << RXCIE0); + sei(); +} + +/* the write code, sending bytes directly to the UART */ +void picowrite(char b) { + while (((1 << UDRIE0) & UCSR0B) || !(UCSR0A & (1 << UDRE0))) {} + UDR0 = b; +} + +/* + * picogetchar: this is the interrupt service routine. It + * recieves a character and feeds it into a buffer and echos it + * back. The logic here is that the ins() code sets the buffer + * to the input buffer. Only then the routine starts writing to the + * buffer. Once a newline is received, the length information is set + * and picoa is also set to 1 indicating an available string, this stops + * recevieing bytes until the input is processed by the calling code. + */ +void picogetchar(char c){ + if (picob && (! picoa)) { + picochar=c; + if (picochar != '\n' && picochar != '\r' && picoi1) picoi--; else return; + } else + picob[picoi++]=picochar; + picowrite(picochar); + } else { + picoa = 1; + picob[picoi]=0; + picob[0]=picoi; + z.a=picoi; + picoi=1; + } + picochar=0; /* every buffered byte is deleted */ + } else { + if (c != 10) picochar=c; + } +} + +/* the ins code of picoserial, called like this in consins */ +void picoins(char *b, short nb) { + char c; + picob=b; + picobsize=nb; + picoa=0; +/* once picoa is set, the interrupt routine records characters + * until a cr and then resets picoa to 0 */ + while (!picoa) byield(); + outcr(); + return; + } + +/* on an UART interrupt, the getchar function is called */ +#ifdef USART_RX_vect +ISR(USART_RX_vect) { + char c=UDR0; + picogetchar(c); +} +#else +/* for MEGAs and other with many UARTs */ + ISR(USART0_RX_vect) { + char c=UDR0; + picogetchar(c); +} +#endif +#endif + +/* + * blocking serial single char read for Serial + * unblocking for Picoserial because it is not + * character oriented -> blocking is handled in + * consins instead. + */ +char serialread() { +#ifdef USESPICOSERIAL + char c; + c=picochar; + picochar=0; + return c; +#else + while (!SERIALPORT.available()) byield(); + return SERIALPORT.read(); +#endif +} + +/* + * serial begin code with a one second delay after start + * this is not needed any more + */ +void serialbegin() { +#ifdef USESPICOSERIAL + picobegin(serial_baudrate); +#else + SERIALPORT.begin(serial_baudrate); +#endif + bdelay(1000); +} + +/* state information on the serial port */ +int serialstat(char c) { + if (c == 0) return 1; + if (c == 1) return serial_baudrate; + return 0; +} + +/* write to a serial stream */ +void serialwrite(char c) { +#ifdef USESPICOSERIAL + picowrite(c); +#else +/* write never blocks. discard any bytes we can't get rid of */ + SERIALPORT.write(c); +/* if (Serial.availableForWrite()>0) Serial.write(c); */ +#endif +} + +/* check on a character, needed for breaking */ +short serialcheckch() { +#ifdef USESPICOSERIAL + return picochar; +#else + if (SERIALPORT.available()) return SERIALPORT.peek(); else return 0; // should really be -1 +#endif +} + +/* avail method, needed for AVAIL() */ +short serialavailable() { +#ifdef USESPICOSERIAL + return picoi; +#else + return SERIALPORT.available(); +#endif +} + +/* flush serial */ +void serialflush() { +#ifdef USESPICOSERIAL + return; +#else + while (SERIALPORT.available()) SERIALPORT.read(); +#endif +} + + +/* + * reading from the console with inch or the picoserial callback + * this mixes interpreter levels as inch/outch are used here + * this code needs to go to the main interpreter section after + * thorough rewrite + */ +void consins(char *b, short nb) { + char c; + + z.a = 1; +#ifdef USESPICOSERIAL + if (id == ISERIAL) { + picoins(b, nb); + return; + } +#endif + while(z.a < nb) { + c=inch(); + if (id == ISERIAL || id == IKEYBOARD) outch(c); /* this is local echo */ + if (c == '\r') c=inch(); /* skip carriage return */ + if (c == '\n' || c == -1 || c == 255) { /* terminal character is either newline or EOF */ + break; + } else if (c == 127 || c == 8) { + if (z.a>1) z.a--; + } else { + b[z.a++]=c; + } + } + b[z.a]=0; + z.a--; + b[0]=(unsigned char)z.a; +} + +/* + * Start a secondary serial port for printing and/or networking + * This is either Serial1 on a MEGA or DUE or Nano Every or a SoftwareSerial + * instance + */ +#ifdef ARDUINOPRT +#if !defined(ARDUINO_AVR_MEGA2560) && !defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_AVR_NANO_EVERY) && !defined(ARDUINO_NANO_RP2040_CONNECT) && !defined(ARDUINO_RASPBERRY_PI_PICO) && !defined(ARDUINO_SEEED_XIAO_M0) +#include +const int software_serial_rx = SOFTSERIALRX; +const int software_serial_tx = SOFTSERIALTX; +SoftwareSerial PRTSERIAL(software_serial_rx, software_serial_tx); +#endif + +/* second serial port */ +void prtbegin() { + PRTSERIAL.begin(serial1_baudrate); +} + +/* the open functions are not needed here */ +char prtopen(char* filename, int mode) {} +void prtclose() {} + +int prtstat(char c) { + if (c == 0) return 1; + if (c == 1) return serial1_baudrate; + return 0; +} + +void prtwrite(char c) { + PRTSERIAL.write(c); +} + +char prtread() { + while (!PRTSERIAL.available()) byield(); + return PRTSERIAL.read(); +} + +short prtcheckch() { + if (PRTSERIAL.available()) return PRTSERIAL.peek(); else return 0; +} + +short prtavailable() { + return PRTSERIAL.available(); +} + +void prtset(int s) { + serial1_baudrate=s; + prtbegin(); +} +#endif + + +/* + * The wire code, direct access to wire communication + * in master mode wire_slaveid is the I2C address bound + * to channel &7 and wire_myid is 0 + * in slave mode wire_myid is the devices slave address + * and wire_slaveid is 0 + * ARDUINOWIREBUFFER is the maximum length of meesages the + * underlying library can process. This is 32 for the Wire + * library + */ + +/* this is always here, if Wire is needed by a subsysem */ +#ifdef HASWIRE +/* default begin is as a master + * This doesn't work properly on the ESP32C3 platform + * See https://github.com/espressif/arduino-esp32/issues/6376 + * for more details + */ +void wirebegin() { +#ifndef SDA_PIN + Wire.begin(); +#else + Wire.begin(SDA_PIN, SCL_PIN); +#endif +} +#endif + +/* this is code needed for the OPEN/CLOSE and wireslave mechanisms */ +#if (defined(ARDUINOWIRE) && defined(HASFILEIO)) +uint8_t wire_slaveid = 0; +uint8_t wire_myid = 0; +#define ARDUINOWIREBUFFER 32 +#ifdef ARDUINOWIRESLAVE +char wirereceivebuffer[ARDUINOWIREBUFFER]; +short wirereceivechars = 0; +char wirerequestbuffer[ARDUINOWIREBUFFER]; +short wirerequestchars = 0; +#endif + +void wireslavebegin(char s) { +#ifndef SDA_PIN + Wire.begin(s); +#else + Wire.begin(SDA_PIN, SCL_PIN, s); +#endif +} + +/* wire status - just checks if wire is compiled */ +int wirestat(char c) { + switch (c) { + case 0: + return 1; +#ifdef ARDUINOWIRESLAVE + case 1: + return wirerequestchars; +#endif + default: + return 0; + } +} + +/* available characters - test code ecapsulation prep for slave*/ +short wireavailable() { +/* as a master we return 1, as a slave the received chars*/ + if (wire_myid == 0) return 1; +#ifdef ARDUINOWIRESLAVE + else return wirereceivechars; +#else + else return 0; +#endif +} + +#ifdef ARDUINOWIRESLAVE +/* event handler for receive */ +void wireonreceive(int h) { + wirereceivechars=h; + if (h>ARDUINOWIREBUFFER) h=ARDUINOWIREBUFFER; + for (int i=0; iARDUINOWIREBUFFER) l=ARDUINOWIREBUFFER; + if (!Wire.requestFrom(wire_slaveid, l)) ert=1; + while (Wire.available() && z.aARDUINOWIREBUFFER) l=ARDUINOWIREBUFFER; + if (wire_myid == 0) { + Wire.beginTransmission(wire_slaveid); +#ifdef ARDUINO_ARCH_ESP32 + for(z.a=0; z.a +#include +rf24_pa_dbm_e rf24_pa = RF24_PA_MAX; +RF24 radio(rf24_ce, rf24_csn); + +/* radio status */ +int radiostat(char c) { +#if defined(ARDUINORF24) + if (c == 0) return 1; + if (c == 1) return radio.isChipConnected(); +#endif + return 0; +} + +/* generate a uint64_t pipe address from the filename string for RF24 */ +uint64_t pipeaddr(char * f){ + uint64_t t = 0; + t=(uint8_t)f[0]; + for(short i=1; i<=4; i++) t=t*256+(uint8_t)f[i]; + return t; +} +#endif + +/* read an entire string */ +void radioins(char *b, short nb) { +#ifdef ARDUINORF24 + if (radio.available()) { + radio.read(b+1, nb); + if (!blockmode) { + for (z.a=0; z.a nb) z.a=nb; + } + b[0]=z.a; + } else { + b[0]=0; + b[1]=0; + z.a=0; + } +#else + b[0]=0; + b[1]=0; + z.a=0; +#endif +} + +/* write to radio, no character mode here */ +void radioouts(char *b, short l) { +#ifdef ARDUINORF24 + radio.stopListening(); + if (!radio.write(b, l)) ert=1; + radio.startListening(); +#endif +} + +/* radio available */ +short radioavailable() { +#ifdef ARDUINORF24 + return radio.available(); +#endif + return 0; +} + +/* + * we always read from pipe 1 and use pipe 0 for writing, + * the filename is the pipe address, by default the radio + * goes to reading mode after open and is only stopped for + * write + */ +void iradioopen(char *filename) { +#ifdef ARDUINORF24 + if (!radio.begin()) ert=1; + radio.openReadingPipe(1, pipeaddr(filename)); + radio.startListening(); +#endif +} + +void oradioopen(char *filename) { +#ifdef ARDUINORF24 + if (!radio.begin()) ert=1; + radio.openWritingPipe(pipeaddr(filename)); +#endif +} + +void radioset(int s) { +#ifdef ARDUINORF24 + if ((s<0) && (s>3)) {error(EORANGE); return; } + rf24_pa=(rf24_pa_dbm_e) s; + radio.setPALevel(rf24_pa); +#endif +} + + +/* + * Arduino Sensor library code + * The sensorread() is a generic function called by + * SENSOR basic function and command. The first argument + * is the sensor and the second argument the value. + * sensorread(n, 0) checks if the sensorstatus. + */ +#ifdef ARDUINOSENSORS +#ifdef ARDUINODHT +#include "DHT.h" +DHT dht(DHTPIN, DHTTYPE); +#endif +#ifdef ARDUINOSHT +#include +SHT3x SHT; +#endif +#ifdef ARDUINOMQ2 +#include +MQ2 mq2(MQ2PIN); +#endif +#ifdef ARDUINOLMS6 +#include +/* https://www.arduino.cc/en/Reference/Arduino_LSM6DSOX */ +#endif +#ifdef ARDUINOAHT +#include +Adafruit_AHTX0 aht; +#endif +#ifdef ARDUINOBMP280 +#include +Adafruit_BMP280 bmp; +#endif +#ifdef ARDUINOBME280 +#include +Adafruit_BME280 bme; +/* add your own code here */ +#endif + + +void sensorbegin(){ +#ifdef ARDUINODHT +dht.begin(); +#endif +#ifdef ARDUINOSHT + SHT.Begin(); +#endif +#ifdef ARDUINOMQ2 + mq2.begin(); +#endif +#ifdef ARDUINOAHT + aht.begin(); +#endif +#ifdef ARDUINOBMP280 + bmp.begin(); + bmp.setSampling(Adafruit_BMP280::MODE_NORMAL, /* Operating Mode. */ + Adafruit_BMP280::SAMPLING_X2, /* Temp. oversampling */ + Adafruit_BMP280::SAMPLING_X16, /* Pressure oversampling */ + Adafruit_BMP280::FILTER_X16, /* Filtering. */ + Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */ +#endif +#ifdef ARDUINOBME280 + bme.begin(); +#endif +} + +number_t sensorread(short s, short v) { + switch (s) { + case 0: + return analogRead(A0+v); + case 1: +#ifdef ARDUINODHT + switch (v) { + case 0: + return 1; + case 1: + return dht.readHumidity(); + case 2: + return dht.readTemperature(); + } +#endif + return 0; + case 2: +#ifdef ARDUINOSHT + switch (v) { + case 0: + return 1; + case 1: + SHT.UpdateData(); + return SHT.GetRelHumidity(); + case 2: + SHT.UpdateData(); + return SHT.GetTemperature(); + } +#endif + return 0; + case 3: +#ifdef ARDUINOMQ2 + switch (v) { + case 0: + return 1; + case 1: + (void) mq2.read(false); + return mq2.readLPG();; + case 2: + (void) mq2.read(false); + return mq2.readCO(); + case 3: + (void) mq2.read(false); + return mq2.readSmoke(); + } +#endif + return 0; + case 4: +#ifdef ARDUINOAHT + sensors_event_t humidity, temp; + switch (v) { + case 0: + return 1; + case 1: + aht.getEvent(&humidity, &temp); + return temp.temperature; + case 2: + aht.getEvent(&humidity, &temp); + return humidity.relative_humidity; + } +#endif + return 0; + case 5: +#ifdef ARDUINOBMP280 + switch (v) { + case 0: + return 1; + case 1: + return bmp.readTemperature(); + case 2: + return bmp.readPressure() / 100.0; + case 3: + return bmp.readAltitude(1013.25); + } +#endif + return 0; + case 6: +#ifdef ARDUINOBME280 + switch (v) { + case 0: + return 1; + case 1: + return bme.readTemperature(); + case 2: + return bme.readPressure() / 100.0; + case 3: + return bme.readAltitude(1013.25); + case 4: + return bme.readHumidity(); + } +#endif +/* add your own sensor code here */ + return 0; + default: + return 0; + } +} + +#else +void sensorbegin() {} +number_t sensorread(short s, short v) {return 0;}; +#endif + + +/* + * Experimental code to drive SPI SRAM + * + * Currently only the 23LCV512 is implemented, assuming a + * 64kB SRAM + * The code below is taken in part from the SRAMsimple library + * + * two buffers are implemented: + * - a ro buffer used by memread, this buffer is mainly reading the token + * stream at runtime. + * - a rw buffer used by memread2 and memwrite2, this buffer is mainly accessing + * the heap at runtime. In interactive mode this is also the interface to read + * and write program code to memory + * + */ + +#ifdef ARDUINOSPIRAM +#define USEMEMINTERFACE +#define SPIRAMINTERFACE + +/* + * we use the standard slave select pin as default + * RAMPIN + */ +#ifndef RAMPIN +#define RAMPIN SS +#endif + +#define SPIRAMWRMR 1 +#define SPIRAMRDMR 5 +#define SPIRAMREAD 3 +#define SPIRAMWRITE 2 +#define SPIRAMRSTIO 0xFF +#define SPIRAMSEQ 0x40 +#define SPIRAMBYTE 0x00 + +/* the RAM begin method sets the RAM to sequential mode */ +address_t spirambegin() { + pinMode(RAMPIN, OUTPUT); + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMRSTIO); + SPI.transfer(SPIRAMWRMR); + //SPI.transfer(SPIRAMBYTE); + SPI.transfer(SPIRAMSEQ); + digitalWrite(RAMPIN, HIGH); + /* only 32 kB addressable with 16 bit integers because address_t has to fit into number_t + the interpreter would work also with 64kB but PEEK, POKE and the DARKARTS are broken then*/ + if (maxnum>32767) return 65534; else return 32766; +} + +/* the simple unbuffered byte read, with a cast to signed char */ +mem_t spiramrawread(address_t a) { + mem_t c; + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMREAD); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + c = SPI.transfer(0x00); + digitalWrite(RAMPIN, HIGH); + return c; +} + +/* one read only buffer for access from the token stream + memread calls this */ +address_t spiram_robufferaddr = 0; +mem_t spiram_robuffervalid=0; +const address_t spiram_robuffersize = 32; +mem_t spiram_robuffer[spiram_robuffersize]; + +/* one rw buffer for access to the heap and all the program editing + memread2 and memwrite2 call this*/ +address_t spiram_rwbufferaddr = 0; +mem_t spiram_rwbuffervalid=0; +const address_t spiram_rwbuffersize = 32; /* also change the addressmask if you want to play here */ +mem_t spiram_rwbuffer[spiram_rwbuffersize]; +mem_t spiram_rwbufferclean = 1; + +const address_t spiram_addrmask=0xffe0; +/* const address_t spiram_addrmask=0xffd0; // 64 byte frame */ + +/* the elementary buffer access functions used almost everywhere */ + +void spiram_bufferread(address_t a, mem_t* b, address_t l) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMREAD); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer(b, l); + digitalWrite(RAMPIN, HIGH); +} + +void spiram_bufferwrite(address_t a, mem_t* b, address_t l) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMWRITE); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer(b, l); + digitalWrite(RAMPIN, HIGH); +} + +mem_t spiram_robufferread(address_t a) { +/* we address a byte known to the rw buffer, then get it from there */ + if (spiram_rwbuffervalid && ((a & spiram_addrmask) == spiram_rwbufferaddr)) { + return spiram_rwbuffer[a-spiram_rwbufferaddr]; + } + +/* page fault, we dont have the byte in the ro buffer, so read from the chip*/ + if (!spiram_robuffervalid || a >= spiram_robufferaddr + spiram_robuffersize || a < spiram_robufferaddr ) { + spiram_bufferread(a, spiram_robuffer, spiram_robuffersize); + spiram_robufferaddr=a; + spiram_robuffervalid=1; + } + return spiram_robuffer[a-spiram_robufferaddr]; +} + +/* flush the buffer */ +void spiram_rwbufferflush() { + if (!spiram_rwbufferclean) { + spiram_bufferwrite(spiram_rwbufferaddr, spiram_rwbuffer, spiram_rwbuffersize); + spiram_rwbufferclean=1; + } +} + +mem_t spiram_rwbufferread(address_t a) { +/* page fault, do read, ignore the ro buffer buffer */ + address_t p=a & spiram_addrmask; + if (!spiram_rwbuffervalid || (p != spiram_rwbufferaddr)) { +/* flush the buffer if needed */ + spiram_rwbufferflush(); +/* and reload it */ + spiram_bufferread(p, spiram_rwbuffer, spiram_rwbuffersize); + spiram_rwbufferaddr = p; /* we only handle full pages here */ + spiram_rwbuffervalid=1; + } + return spiram_rwbuffer[a-spiram_rwbufferaddr]; +} + +/* the buffered file write */ +void spiram_rwbufferwrite(address_t a, mem_t c) { + address_t p=a&spiram_addrmask; +/* correct the two buffers if needed */ + if (spiram_robuffervalid && a >= spiram_robufferaddr && a < spiram_robufferaddr + spiram_robuffersize) { + spiram_robuffer[a-spiram_robufferaddr]=c; + } +/* if we have the frame, write it, mark the buffer dirty and return */ + if (spiram_rwbuffervalid && p == spiram_rwbufferaddr) { + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; + spiram_rwbufferclean=0; + return; + } +/* if we end up here the write was impossible because we dont have the frame, so flush and then get it */ + spiram_rwbufferflush(); + (void) spiram_rwbufferread(a); + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; + spiram_rwbufferclean=0; +} + +/* the simple unbuffered byte write, with a cast to signed char */ +void spiramrawwrite(address_t a, mem_t c) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMWRITE); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer((byte) c); + digitalWrite(RAMPIN, HIGH); +/* also refresh the ro buffer if in the frame */ + if (a >= spiram_robufferaddr && a < spiram_robufferaddr + spiram_robuffersize && spiram_robufferaddr > 0) + spiram_robuffer[a-spiram_robufferaddr]=c; +/* and the rw buffer if needed) */ + if (a >= spiram_rwbufferaddr && a < spiram_rwbufferaddr + spiram_rwbuffersize && spiram_rwbufferaddr > 0) + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; +} +#endif + + +/* the code to address EEPROMs directly */ +#ifdef ARDUINOPGMEEPROM +#define USEMEMINTERFACE +#define EEPROMMEMINTERFACE +#else +#undef EEPROMMEMINTERFACE +#endif + + +#if defined(USEMEMINTERFACE) +/* + * to handle strings in situations with a memory interface two more buffers are + * needed they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set + * + * default is 128, on an MEGA 512 is possible + */ +#ifdef ARDUINO_AVR_MEGA2560 +#define SPIRAMSBSIZE 512 +#else +#define SPIRAMSBSIZE 128 +#endif + +/* the string buffers of the memory interface */ +char spistrbuf1[SPIRAMSBSIZE]; +char spistrbuf2[SPIRAMSBSIZE]; +#endif + +/* + * A tone emulation based on the byield loop. The maximum frequency depends + * on the byield call speed. 10-20 kHz is possible. Will be unreliable if + * the loop functions need a lot of CPU cycles. + */ +#ifdef ARDUINOTONEEMULATION +static mem_t tone_enabled; +static mem_t tone_pinstate = 0; +static unsigned long tone_intervall; +static unsigned long tone_micros; +static int tone_duration; +static unsigned long tone_start; +static mem_t tone_pin; + +void playtone(int pin, int frequency, int duration){ + +/* the pin we are using is reset every time this is called*/ + tone_pin=pin; + pinMode(tone_pin, OUTPUT); + digitalWrite(tone_pin, LOW); + tone_pinstate=0; + + /* duration 0 or frequency 0 stops playing */ + if (duration == 0 || frequency == 0) { + tone_enabled=0; + return; + } + +/* calculate the toggle intervall in micros and remember where we are */ + tone_intervall=1000000/frequency/2; + tone_micros=micros(); + +/* set the duration and remember where we are*/ + tone_duration=duration; + tone_start=millis(); + +/* start the play */ + tone_enabled=1; +} + +void tonetoggle() { + +/* is this active? */ + if (!tone_enabled) return; + +/* check if we are done playing */ + if (millis() > tone_duration+tone_start) { + tone_enabled=0; + digitalWrite(tone_pin, LOW); + tone_pinstate=0; + return; + } + +/* if not, check if the intervall is over */ + if (micros() > tone_intervall+tone_micros) { + tone_micros=micros(); + tone_pinstate=!tone_pinstate; + digitalWrite(tone_pin, tone_pinstate); + } +} +#endif + +/* + * the events API for Arduino with interrupt service routines + * analogous to the timer API + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + */ + +#ifdef HASEVENTS +/* interrupts in BASIC fire once and then disable themselves, BASIC reenables them */ +void bintroutine0() { + eventlist[0].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[0].pin)); +} +void bintroutine1() { + eventlist[1].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[1].pin)); +} +void bintroutine2() { + eventlist[2].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[2].pin)); +} +void bintroutine3() { + eventlist[3].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[3].pin)); +} + + +#if !(defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_MBED_NANO) || defined(ARDUINO_ARCH_RENESAS)) +typedef int PinStatus; +#endif + + +mem_t enableevent(int pin) { + mem_t interrupt; + int i; + +/* do we have the data */ + if ((i=eventindex(pin))<0) return 0; + +/* can we use this pin */ + interrupt=digitalPinToInterrupt(eventlist[i].pin); + if (interrupt < 0) return 0; + +/* attach the interrupt function to this pin */ + switch(i) { + case 0: + attachInterrupt(interrupt, bintroutine0, (PinStatus) eventlist[i].mode); + break; + case 1: + attachInterrupt(interrupt, bintroutine1, (PinStatus) eventlist[i].mode); + break; + case 2: + attachInterrupt(interrupt, bintroutine2, (PinStatus) eventlist[i].mode); + break; + case 3: + attachInterrupt(interrupt, bintroutine3, (PinStatus) eventlist[i].mode); + break; + default: + return 0; + } + +/* now set it enabled in BASIC */ + eventlist[i].enabled=1; + return 1; + +} + +void disableevent(mem_t pin) { + detachInterrupt(digitalPinToInterrupt(pin)); +} +#endif + + +/* + * This code measures the fast ticker frequency in microseconds + * It leaves the data in variable F. Activate this only for test + * purposes. + */ +#undef FASTTICKERPROFILE + +#ifdef FASTTICKERPROFILE +static unsigned long lastfasttick = 0; +static unsigned long fasttickcalls = 0; +static int avgfasttick = 0; +static long devfasttick = 0; + +void fasttickerprofile() { + if (lastfasttick == 0) { lastfasttick=micros(); return; } + int delta=micros()-lastfasttick; + lastfasttick=micros(); + avgfasttick=(avgfasttick*fasttickcalls+delta)/(fasttickcalls+1); + fasttickcalls++; + vars[5]=avgfasttick; +} +#endif + + + +// defined HARDWARE_H +#endif diff --git a/data/Basic1/IotBasic/wifisettings.h b/data/Basic1/IotBasic/wifisettings.h new file mode 100644 index 0000000000000000000000000000000000000000..754e5f4c0973a00b701402339f1edc8216e84127 --- /dev/null +++ b/data/Basic1/IotBasic/wifisettings.h @@ -0,0 +1,5 @@ +const char* ssid = "myssid"; +const char* password = "mypasswd"; +const char* mqtt_server = "test.mosquitto.org"; +const short mqtt_port = 1883; +byte mac[] = {0xDE, 0xAD, 0xBE, 0xE9, 0xE9, 0xE9}; diff --git a/data/Basic1/TinyVT52/TinyVT52.ino b/data/Basic1/TinyVT52/TinyVT52.ino new file mode 100644 index 0000000000000000000000000000000000000000..ac7f7b62254b90a04fa11c7762f8ffb5c9e5d806 --- /dev/null +++ b/data/Basic1/TinyVT52/TinyVT52.ino @@ -0,0 +1,110 @@ +/* + * + * $Id: TinyVT52.ino,v 1.1 2022/12/13 19:00:16 stefan Exp stefan $ + * + * Stefan's TinyVT52 derived from the IoT BASIC interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Device drivers and low level I/O routines are used from the BASIC code + * These definitions are in basic.h and hardware-arduino.h. These two files + * are exactly identical to the BASIC language files to make sure that further + * work on the device drivers can be used here without changes. + * + * To use the terminal, the hardware definition in hardware-arduino.h need to be set + * + * Any one of the following macros need to be defined + * + * Always set #define DISPLAYCANSCROLL + * + * Displays: define one(!) of the following displays in hardware + * ARDUINOLCDI2C, ARDUINONOKIA51, ARDUINOILI9488, ARDUINOSSD1306 + * ARDUINOMCUFRIEND, ARDUINOGRAPHDUMMY, LCDSHIELD, ARDUINOTFT + * + * Keyboards: + * ARDUINOPS2, ARDUINOUSBKBD (alpha!!), ARDUINOZX81KBD + * + * Printers: + * ARDUINOPRT + * + */ + +/* which serial port is used for terminal I/O */ +#define SERIALPORT Serial + +/* which serial port is used for printer IO */ +#define PRTSERIAL Serial3 + +/* the only language feature of BASIC that we need is the VT52 component */ +#define HASVT52 + +/* should the VT52 also handle Wiring */ +#define VT52WIRING + +/* the device driver code from BASIC */ +#include "basic.h" +#include "hardware-arduino.h" + +/* XON and XOFF characters */ +#define XON 0x11 +#define XOFF 0x13 + +/* a shallow buffer */ +#define VT52BUFSIZE 64 +char vt52sbuf[VT52BUFSIZE]; +int vt52sbi = 0; + +void setup() { + +/* start the terminal interface */ + SERIALPORT.begin(9600); + +/* start the display stream */ + dspbegin(); + +/* if a printer port is defined, start the printer, this is Serial1 of Software Serial */ +#if defined(ARDUINOPRT) + prtbegin(); +#endif + +/* if any wire subsystem is requested, start it as well */ +#if defined(NEEDSWIRE) + wirebegin(); +#endif + +/* and then there is SPI */ +#if defined(ARDUINOSPI) + spibegin(); +#endif + +} + +void loop() { + char ch; + +/* first test, just use the serial port as in */ + +/* read a chunk of characters */ +/* display output is slow, it is an operation at the timescale of 10 ms per character, XOFF while we do it*/ + if (SERIALPORT.available()) { +/* send XOFF to hold the output */ + SERIALPORT.write(XOFF); +/* free the serial buffer immediately to be ready for characters sent before XOFF could be processes*/ + while (SERIALPORT.available() && vt52bi < VT52BUFSIZE) vt52sbuf[vt52bi++]=SERIALPORT.read(); +/* now empty the buffer completely */ + for (int i=0; i +#include +#ifdef HASFLOAT +#include +#include +#endif +#include +#include +#include +#ifndef MSDOS +#include +#include +#else +#include +#include +#endif +#ifdef MINGW +#include +#endif +#ifdef RASPPI +#include +#endif +#endif + + +#if defined(ARDUINO_ARCH_AVR) +/* the small memory model with shallow stacks and small buffers */ +#define BUFSIZE 80 +#define STACKSIZE 15 +#define GOSUBDEPTH 4 +#define FORDEPTH 4 +#define LINECACHESIZE 4 +#else +/* the for larger microcontrollers and real computers */ +#define BUFSIZE 128 +#define STACKSIZE 64 +#define GOSUBDEPTH 8 +#define FORDEPTH 8 +#define LINECACHESIZE 16 +#endif +/* more duffers and vars */ +#define SBUFSIZE 32 +#define VARSIZE 26 +/* default sizes of arrays and strings if they are not DIMed */ +#define ARRAYSIZEDEF 10 +#define STRSIZEDEF 32 + +/* + * the time intervall in ms needed for + * ESP8266 yields, network client loops + * and other timing related functions + */ +#define LONGYIELDINTERVAL 1000 +#define YIELDINTERVAL 32 +#define YIELDTIME 2 + +/* the default EEPROM dummy size */ +#define EEPROMSIZE 1024 + +/* + * The tokens for the BASIC keywords + * + * All single character operators are their own tokens + * ASCII values above 0x7f are used for tokens of keywords. + * EOL is a token + */ +#define EOL 0 +#define NUMBER -127 +#define LINENUMBER -126 +#define STRING -125 +#define VARIABLE -124 +#define STRINGVAR -123 +#define ARRAYVAR -122 +/* multi character tokens - BASEKEYWORD (3) */ +#define GREATEREQUAL -121 +#define LESSEREQUAL -120 +#define NOTEQUAL -119 +/* this is the Palo Alto Language Set (19) */ +#define TPRINT -118 +#define TLET -117 +#define TINPUT -116 +#define TGOTO -115 +#define TGOSUB -114 +#define TRETURN -113 +#define TIF -112 +#define TFOR -111 +#define TTO -110 +#define TSTEP -109 +#define TNEXT -108 +#define TSTOP -107 +#define TLIST -106 +#define TNEW -105 +#define TRUN -104 +#define TABS -103 +#define TRND -102 +#define TSIZE -101 +#define TREM -100 +/* this is the Apple 1 language set in addition to Palo Alto (14) */ +#define TNOT -99 +#define TAND -98 +#define TOR -97 +#define TLEN -96 +#define TSGN -95 +#define TPEEK -94 +#define TDIM -93 +#define TCLR -92 +#define THIMEM -91 +#define TTAB -90 +#define TTHEN -89 +#define TEND -88 +#define TPOKE -87 +/* Stefan's tinybasic additions (12) */ +#define TCONT -86 +#define TSQR -85 +#define TPOW -84 +#define TMAP -83 +#define TDUMP -82 +#define TBREAK -81 +#define TSAVE -80 +#define TLOAD -79 +#define TGET -78 +#define TPUT -77 +#define TSET -76 +#define TCLS -75 +/* Arduino functions (10) */ +#define TPINM -74 +#define TDWRITE -73 +#define TDREAD -72 +#define TAWRITE -71 +#define TAREAD -70 +#define TDELAY -69 +#define TMILLIS -68 +#define TTONE -67 +#define TPULSEIN -66 +#define TAZERO -65 +#define TLED -64 +/* the DOS functions (5) */ +#define TCATALOG -63 +#define TDELETE -62 +#define TOPEN -61 +#define TCLOSE -60 +#define TFDISK -59 +/* low level access of internal routines (2) */ +#define TUSR -58 +#define TCALL -57 +/* mathematical functions (7) */ +#define TSIN -56 +#define TCOS -55 +#define TTAN -54 +#define TATAN -53 +#define TLOG -52 +#define TEXP -51 +#define TINT -50 +/* graphics - experimental - rudimentary (7) */ +#define TCOLOR -49 +#define TPLOT -48 +#define TLINE -47 +#define TCIRCLE -46 +#define TRECT -45 +#define TFCIRCLE -44 +#define TFRECT -43 +/* the Dartmouth extensions (6) */ +#define TDATA -42 +#define TREAD -41 +#define TRESTORE -40 +#define TDEF -39 +#define TFN -38 +#define TON -37 +/* the latecomer ELSE */ +#define TELSE -36 +/* darkarts (3) */ +#define TMALLOC -35 +#define TFIND -34 +#define TEVAL -33 +/* iot extensions (9) */ +#define TASSIGN -32 +#define TAVAIL -31 +#define TSTR -30 +#define TINSTR -29 +#define TVAL -28 +#define TNETSTAT -27 +#define TSENSOR -26 +#define TWIRE -25 +#define TSLEEP -24 +/* constants used for some obscure purposes */ +#define TBUFFER -2 +/* UNKNOWN is not used in the current code, the + * lexer tokenizes everything blindly. There is a UNKNOWN hook + * in statement for a grammar aware lexer */ +#define UNKNOWN -1 + +/* the number of keywords, and the base index of the keywords */ +#define NKEYWORDS 3+19+13+12+11+5+2+7+7+7+12 +#define BASEKEYWORD -121 + +/* + * Interpreter states + * SRUN means running from a programm + * SINT means interactive mode + * SERUN means running directly from EEPROM + * (enum would be the right way of doing this.) + * BREAKCHAR is the character stopping the program on Ardunios + * BREAKPIN can be set, it is a pin that needs to go to low to stop a BASIC program + * This should be done in hardware*.h + * + */ +#define SINT 0 +#define SRUN 1 +#define SERUN 2 +#define BREAKCHAR '#' + +/* + * Arduino input and output channels + */ +#define OSERIAL 1 +#define ODSP 2 +#define OPRT 4 +#define OWIRE 7 +#define ORADIO 8 +#define OMQTT 9 +#define OFILE 16 + +#define ISERIAL 1 +#define IKEYBOARD 2 +#define ISERIAL1 4 +#define IWIRE 7 +#define IRADIO 8 +#define IMQTT 9 +#define IFILE 16 + +/* + * All BASIC keywords for the tokens + */ +const char sge[] PROGMEM = "=>"; +const char sle[] PROGMEM = "<="; +const char sne[] PROGMEM = "<>"; +/* Palo Alto language set */ +const char sprint[] PROGMEM = "PRINT"; +const char slet[] PROGMEM = "LET"; +const char sinput[] PROGMEM = "INPUT"; +const char sgoto[] PROGMEM = "GOTO"; +const char sgosub[] PROGMEM = "GOSUB"; +const char sreturn[] PROGMEM = "RETURN"; +const char sif[] PROGMEM = "IF"; +const char sfor[] PROGMEM = "FOR"; +const char sto[] PROGMEM = "TO"; +const char sstep[] PROGMEM = "STEP"; +const char snext[] PROGMEM = "NEXT"; +const char sstop[] PROGMEM = "STOP"; +const char slist[] PROGMEM = "LIST"; +const char snew[] PROGMEM = "NEW"; +const char srun[] PROGMEM = "RUN"; +const char sabs[] PROGMEM = "ABS"; +const char srnd[] PROGMEM = "RND"; +const char ssize[] PROGMEM = "SIZE"; +const char srem[] PROGMEM = "REM"; +/* Apple 1 language set */ +#ifdef HASAPPLE1 +const char snot[] PROGMEM = "NOT"; +const char sand[] PROGMEM = "AND"; +const char sor[] PROGMEM = "OR"; +const char slen[] PROGMEM = "LEN"; +const char ssgn[] PROGMEM = "SGN"; +const char speek[] PROGMEM = "PEEK"; +const char sdim[] PROGMEM = "DIM"; +const char sclr[] PROGMEM = "CLR"; +const char shimem[] PROGMEM = "HIMEM"; +const char stab[] PROGMEM = "TAB"; +const char sthen[] PROGMEM = "THEN"; +const char sbend[] PROGMEM = "END"; +const char spoke[] PROGMEM = "POKE"; +#endif +/* Stefan's basic additions */ +#ifdef HASSTEFANSEXT +const char scont[] PROGMEM = "CONT"; +const char ssqr[] PROGMEM = "SQR"; +const char spow[] PROGMEM = "POW"; +const char smap[] PROGMEM = "MAP"; +const char sdump[] PROGMEM = "DUMP"; +const char sbreak[] PROGMEM = "BREAK"; +#endif +/* LOAD and SAVE is always there */ +const char ssave[] PROGMEM = "SAVE"; +const char sload[] PROGMEM = "LOAD"; +#ifdef HASSTEFANSEXT +const char sget[] PROGMEM = "GET"; +const char sput[] PROGMEM = "PUT"; +const char sset[] PROGMEM = "SET"; +const char scls[] PROGMEM = "CLS"; +#endif +/* Arduino functions */ +#ifdef HASARDUINOIO +const char spinm[] PROGMEM = "PINM"; +const char sdwrite[] PROGMEM = "DWRITE"; +const char sdread[] PROGMEM = "DREAD"; +const char sawrite[] PROGMEM = "AWRITE"; +const char saread[] PROGMEM = "AREAD"; +const char sdelay[] PROGMEM = "DELAY"; +const char smillis[] PROGMEM = "MILLIS"; +const char sazero[] PROGMEM = "AZERO"; +const char sled[] PROGMEM = "LED"; +#endif +#ifdef HASTONE +const char stone[] PROGMEM = "PLAY"; +#endif +#ifdef HASPULSE +const char splusein[] PROGMEM = "PULSEIN"; +#endif +/* DOS functions */ +#ifdef HASFILEIO +const char scatalog[] PROGMEM = "CATALOG"; +const char sdelete[] PROGMEM = "DELETE"; +const char sfopen[] PROGMEM = "OPEN"; +const char sfclose[] PROGMEM = "CLOSE"; +const char sfdisk[] PROGMEM = "FDISK"; +#endif +/* low level access functions */ +#ifdef HASSTEFANSEXT +const char susr[] PROGMEM = "USR"; +const char scall[] PROGMEM = "CALL"; +#endif +/* mathematics */ +#ifdef HASFLOAT +const char ssin[] PROGMEM = "SIN"; +const char scos[] PROGMEM = "COS"; +const char stan[] PROGMEM = "TAN"; +const char satan[] PROGMEM = "ATAN"; +const char slog[] PROGMEM = "LOG"; +const char sexp[] PROGMEM = "EXP"; +#endif +/* INT is always needed to make float/int programs compatible */ +const char sint[] PROGMEM = "INT"; +/* elemetars graphics */ +#ifdef HASGRAPH +const char scolor[] PROGMEM = "COLOR"; +const char splot[] PROGMEM = "PLOT"; +const char sline[] PROGMEM = "LINE"; +const char scircle[] PROGMEM = "CIRCLE"; +const char srect[] PROGMEM = "RECT"; +const char sfcircle[] PROGMEM = "FCIRCLE"; +const char sfrect[] PROGMEM = "FRECT"; +#endif +/* Dartmouth BASIC extensions */ +#ifdef HASDARTMOUTH +const char sdata[] PROGMEM = "DATA"; +const char sread[] PROGMEM = "READ"; +const char srestore[] PROGMEM = "RESTORE"; +const char sdef[] PROGMEM = "DEF"; +const char sfn[] PROGMEM = "FN"; +const char son[] PROGMEM = "ON"; +#endif +/* a latecomer the ELSE command */ +#ifdef HASSTEFANSEXT +const char selse[] PROGMEM = "ELSE"; +#endif +/* The Darkarts commands unthinkable in Dartmouth */ +#ifdef HASDARKARTS +const char smalloc[] PROGMEM = "MALLOC"; +const char sfind[] PROGMEM = "FIND"; +const char seval[] PROGMEM = "EVAL"; +#endif +/* iot extensions */ +#ifdef HASIOT +const char sassign[] PROGMEM = "ASSIGN"; +const char savail[] PROGMEM = "AVAIL"; +const char sstr[] PROGMEM = "STR"; +const char sinstr[] PROGMEM = "INSTR"; +const char sval[] PROGMEM = "VAL"; +const char snetstat[] PROGMEM = "NETSTAT"; +const char ssensor[] PROGMEM = "SENSOR"; +const char swire[] PROGMEM = "WIRE"; +const char ssleep[] PROGMEM = "SLEEP"; +#endif + +/* zero terminated keyword storage */ +const char* const keyword[] PROGMEM = { + sge, sle, sne, sprint, slet, sinput, + sgoto, sgosub, sreturn, sif, sfor, sto, + sstep, snext, sstop, slist, snew, srun, + sabs, srnd, ssize, srem, +#ifdef HASAPPLE1 + snot, sand, sor, slen, ssgn, speek, sdim, + sclr, shimem, stab, sthen, + sbend, spoke, +#endif +#ifdef HASSTEFANSEXT + scont, ssqr, spow, smap, sdump, sbreak, +#endif + ssave, sload, +#ifdef HASSTEFANSEXT + sget, sput, sset, scls, +#endif +#ifdef HASARDUINOIO + spinm, sdwrite, sdread, sawrite, saread, + sdelay, smillis, sazero, sled, +#endif +#ifdef HASTONE + stone, +#endif +#ifdef HASPULSE + splusein, +#endif +#ifdef HASFILEIO + scatalog, sdelete, sfopen, sfclose, sfdisk, +#endif +#ifdef HASSTEFANSEXT + susr, scall, +#endif +#ifdef HASFLOAT + ssin, scos, stan, satan, slog, sexp, +#endif + sint, +#ifdef HASGRAPH + scolor, splot, sline, scircle, srect, + sfcircle, sfrect, +#endif +#ifdef HASDARTMOUTH + sdata, sread, srestore, sdef, sfn, son, +#endif +#ifdef HASSTEFANSEXT + selse, +#endif +#ifdef HASDARKARTS + smalloc, sfind, seval, +#endif +#ifdef HASIOT + sassign, savail, sstr, sinstr, sval, + snetstat, ssensor, swire, ssleep, +#endif + 0 +}; + +/* the zero terminated token dictonary needed for scalability */ +const signed char tokens[] PROGMEM = { + GREATEREQUAL, LESSEREQUAL, NOTEQUAL, TPRINT, TLET, + TINPUT, TGOTO, TGOSUB, TRETURN, TIF, TFOR, TTO, TSTEP, + TNEXT, TSTOP, TLIST, TNEW, TRUN, TABS, TRND, TSIZE, TREM, +#ifdef HASAPPLE1 + TNOT, TAND, TOR, TLEN, TSGN, TPEEK, TDIM, TCLR, + THIMEM, TTAB, TTHEN, TEND, TPOKE, +#endif +#ifdef HASSTEFANSEXT + TCONT, TSQR, TPOW, TMAP, TDUMP, TBREAK, +#endif + TSAVE, TLOAD, +#ifdef HASSTEFANSEXT + TGET, TPUT, TSET, TCLS, +#endif +#ifdef HASARDUINOIO + TPINM, TDWRITE, TDREAD, TAWRITE, TAREAD, TDELAY, TMILLIS, + TAZERO, TLED, +#endif +#ifdef HASTONE + TTONE, +#endif +#ifdef HASPULSE + TPULSEIN, +#endif +#ifdef HASFILEIO + TCATALOG, TDELETE, TOPEN, TCLOSE, TFDISK, +#endif +#ifdef HASSTEFANSEXT + TUSR, TCALL, +#endif +#ifdef HASFLOAT + TSIN, TCOS, TTAN, TATAN, TLOG, TEXP, +#endif + TINT, +#ifdef HASGRAPH + TCOLOR, TPLOT, TLINE, TCIRCLE, TRECT, + TFCIRCLE, TFRECT, +#endif +#ifdef HASDARTMOUTH + TDATA, TREAD, TRESTORE, TDEF, TFN, TON, +#endif +#ifdef HASSTEFANSEXT + TELSE, +#endif +#ifdef HASDARKARTS + TMALLOC, TFIND, TEVAL, +#endif +#ifdef HASIOT + TASSIGN, TAVAIL, TSTR, TINSTR, TVAL, TNETSTAT, + TSENSOR, TWIRE, TSLEEP, +#endif + 0 +}; + +/* + * the message catalog + */ +#define MFILE 0 +#define MPROMPT 1 +#define MGREET 2 +#define MLINE 3 +#define MNUMBER 4 +#define MVARIABLE 5 +#define MARRAY 6 +#define MSTRING 7 +#define MSTRINGVAR 8 +#define EGENERAL 9 +#define EUNKNOWN 10 +#define ENUMBER 11 +#define EDIVIDE 12 +#define ELINE 13 +#define ERETURN 14 +#define ENEXT 15 +#define EGOSUB 16 +#define EFOR 17 +#define EOUTOFMEMORY 18 +#define ESTACK 19 +#define EDIM 20 +#define EORANGE 21 +#define ESTRING 22 +#define EVARIABLE 23 +#define EFILE 24 +#define EFUN 25 +#define EARGS 26 +#define EEEPROM 27 +#define ESDCARD 28 + +const char mfile[] PROGMEM = "file.bas"; +const char mprompt[] PROGMEM = "> "; +const char mgreet[] PROGMEM = "Stefan's Basic 1.4a"; +const char mline[] PROGMEM = "LINE"; +const char mnumber[] PROGMEM = "NUMBER"; +const char mvariable[] PROGMEM = "VARIABLE"; +const char marray[] PROGMEM = "ARRAY"; +const char mstring[] PROGMEM = "STRING"; +const char mstringv[] PROGMEM = "STRINGVAR"; +const char egeneral[] PROGMEM = "Error"; +#ifdef HASERRORMSG +const char eunknown[] PROGMEM = "Syntax"; +const char enumber[] PROGMEM = "Number"; +const char edivide[] PROGMEM = "Div by 0"; +const char eline[] PROGMEM = "Unknown Line"; +const char ereturn[] PROGMEM = "Return"; +const char enext[] PROGMEM = "Next"; +const char egosub[] PROGMEM = "GOSUB"; +const char efor[] PROGMEM = "FOR"; +const char emem[] PROGMEM = "Memory"; +const char estack[] PROGMEM = "Stack"; +const char edim[] PROGMEM = "DIM"; +const char erange[] PROGMEM = "Range"; +const char estring[] PROGMEM = "String"; +const char evariable[] PROGMEM = "Variable"; +const char efile[] PROGMEM = "File"; +const char efun[] PROGMEM = "Function"; +const char eargs[] PROGMEM = "Args"; +const char eeeprom[] PROGMEM = "EEPROM"; +const char esdcard[] PROGMEM = "SD card"; +#endif + +const char* const message[] PROGMEM = { + mfile, mprompt, mgreet, + mline, mnumber, mvariable, marray, + mstring, mstringv, + egeneral +#ifdef HASERRORMSG + , eunknown, enumber, edivide, eline, ereturn, + enext, egosub, efor, emem, estack, edim, erange, + estring, evariable, efile, efun, eargs, + eeeprom, esdcard +#endif +}; + +/* + * code for variable numbers and addresses sizes + * the original code was 16 bit but can be extended here + * to arbitrary types + * + * number_t is the type for numerical work - either float or int + * wnumber_t is the type containing the largest printable integer, + * for float keep this int on 32 bit and long on 8 bit unless you + * want to use very long integers, like 64 or 128 bit types. + * address_t is an unsigned type adddressing memory + * mem_t is a SIGNED 8bit character type. + * index_t is a SIGNED minimum 16 bit integer type + * + * works with the tacit assumption that + * sizeof(number_t) >= sizeof(address_t) + * and that the entire memory is smaller than the positive + * part of number type (!!) + * + * we assume that float >= 4 bytes in the following + * + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: the index size of strings either + * 1 byte or 2 bytes - no other values supported + * + * + */ +#ifdef HASFLOAT +typedef float number_t; +const number_t maxnum=16777216; +typedef long wnumber_t; +#else +typedef int number_t; +typedef int wnumber_t; +const number_t maxnum=(number_t)~((number_t)1<<(sizeof(number_t)*8-1)); +#endif +typedef unsigned short address_t; /* this type addresses memory */ +const int numsize=sizeof(number_t); +const int addrsize=sizeof(address_t); +const int eheadersize=sizeof(address_t)+1; +const int strindexsize=2; /* default in the meantime, strings up to unsigned 16 bit length */ +const address_t maxaddr=(address_t)(~0); +typedef signed char mem_t; /* a signed 8 bit type for the memory */ +typedef short index_t; /* this type counts at least 16 bit */ + +/* + * system type identifiers + */ + +#define SYSTYPE_UNKNOWN 0 +#define SYSTYPE_AVR 1 +#define SYSTYPE_ESP8266 2 +#define SYSTYPE_ESP32 3 +#define SYSTYPE_RP2040 4 +#define SYSTYPE_SAM 5 +#define SYSTYPE_POSIX 32 +#define SYSTYPE_MSDOS 33 + +/* + * The basic interpreter is implemented as a stack machine + * with global variable for the interpreter state, the memory + * and the arithmetic during run time. + * + * stack is the stack memory and sp controls the stack. + * + * ibuffer is an input buffer and *bi a pointer to it. + * + * sbuffer is a short buffer for arduino progmem access. + * + * vars is a static array of 26 single character variables. + * + * mem is the working memory of the basic interperter. + * + * x, y, xc, yc are two n*8 bit and two 8 bit accumulators. + * + * ax, ax are address type accumulators. + * + * z is a mixed n*8 bit accumulator + * + * ir, ir2 are general index registers for string processing. + * + * token contains the actually processes token. + * + * er is the nontrapable error status + * + * ert is the trapable error status + * + * st, here and top are the interpreter runtime controls. + * + * nvars is the number of vars the interpreter has stored. + * + * form is used for number formation Palo Alto BASIC style. + * + * charcount counts the printed characters to create a real TAB + * only implemented on the serial stream + * reltab controls if the relative char mechanisms is active + * + * rd is the random number storage. + * + * fnc counts the depth of for - next loop nesting + * + * args is the global arg count variable + * + * id and od are the input and output model for an arduino + * they are set to serial by default + * + * idd and odd are the default values of the above + * + * debuglevel is the statement loop debug level + * + * data is the data pointer of the READ/DATA mechanism + * + * static keyword here is obsolete on most platforms + * + */ + +static number_t stack[STACKSIZE]; +static address_t sp=0; + +static char sbuffer[SBUFSIZE]; + +static char ibuffer[BUFSIZE] = "\0"; +static char *bi; + +static number_t vars[VARSIZE]; + +#if MEMSIZE != 0 +static mem_t mem[MEMSIZE]; +#else +static mem_t* mem; +#endif +static address_t himem, memsize; + +static struct {mem_t varx; mem_t vary; address_t here; number_t to; number_t step;} forstack[FORDEPTH]; +static index_t forsp = 0; +static mem_t fnc; + +static address_t gosubstack[GOSUBDEPTH]; +static index_t gosubsp = 0; + +static number_t x, y; +static mem_t xc, yc; + +static address_t ax, ay; + +/* this union is used to store larger objects into byte oriented memory */ +struct twobytes {mem_t l; mem_t h;}; +static union accunumber { number_t i; address_t a; struct twobytes b; mem_t c[sizeof(number_t)]; } z; + +static char *ir, *ir2; +static mem_t token; +static mem_t er; +static mem_t ert; + +static mem_t st; +static address_t here; +static address_t top; + +static address_t nvars = 0; + +static mem_t form = 0; + +#ifdef HASMSTAB +static mem_t charcount = 0; +static mem_t reltab = 0; +#endif + +#ifdef HASARRAYLIMIT +static address_t arraylimit = 1; +#else +const static address_t arraylimit = 1; +#endif + +static mem_t args; + +/* this is unsigned hence address_t */ +static address_t rd; + +/* output and input vector */ +static mem_t id; +static mem_t od; + +/* default IO - not constant, can be changed at runtime + through a user call */ +static mem_t idd = ISERIAL; +static mem_t odd = OSERIAL; + +/* the runtime debuglevel */ +static mem_t debuglevel = 0; + +/* data pointer */ +#ifdef HASDARTMOUTH +static address_t data = 0; +#endif + +/* + * process command line arguments in the POSIX world + * bnointafterrun is a flag to remember if called as command + * line argument, in this case we don't return to interactive + */ +#ifndef ARDUINO +int bargc; +char** bargv; +mem_t bnointafterrun = 0; +#endif + +/* + * Yield counter, we count when we did yield the last time + * lastyield controlls the client loops of network functions + * like mqtt, scanned keyboard, and USB. + * + * lastlongyield controls longterm functions like DHCP lease + * renewal in Ethernet + * + * there variables are only needed if the platform has background + * tasks + */ +static long lastyield=0; +static long lastlongyield=0; + +/* formaters lastouttoken and spaceafterkeyword to make a nice LIST */ +static mem_t lastouttoken; +static mem_t spaceafterkeyword; + +/* + * the cache for the heap search - helps the string code + * the last found object on the heap is remembered. This is needed + * because the string code sometime searches the heap twice during the + * same operation. + */ +#ifdef HASAPPLE1 +static mem_t bfindc, bfindd, bfindt; +static address_t bfinda, bfindz; +#endif + +/* the interrupt vector - not yet implemented */ +#ifdef HASINTERRUPTS +static short interruptvector; +#endif + +/* + * Function prototypes, ordered by layers + * HAL - hardware abstraction + * Layer 0 - memory and I/O + * Layer 1 - Program storage and control + * Layer 2 - Where stuff happens + */ + +/* + * HAL - see hardware-*.h + * This is the hardware abstraction layer of the BASIC + * interpreter + */ + +/* setup codes */ +void timeinit(); +void wiringbegin(); + +/* low level mem and hardware features */ +long freeRam(); +long freememorysize(); +void restartsystem(); +void activatesleep(long t); + +/* start the spi bus */ +void spibegin(); + +/* + * the hardware interface display driver functions, need to be + * implemented for the display driver to work + * dspupdate() only for display like Epapers + */ +void dspbegin(); +void dspprintchar(char, mem_t, mem_t); +void dspclear(); +void dspupdate(); + +/* keyboard code */ +void kbdbegin(); +int kbdstat(char); +char kbdavailable(); +char kbdread(); +char kbdcheckch(); + +/* graphics functions */ +void rgbcolor(int, int, int); +void vgacolor(short c); +void vgascale(int*, int*); +void plot(int, int); +void line(int, int, int, int); +void rect(int, int, int, int); +void frect(int, int, int, int); +void circle(int, int, int); +void fcircle(int, int, int); + +/* text output to a VGA display */ +void vgabegin(); +int vgastat(char); +void vgawrite(char); + +/* generic display code */ +void dspwrite(char); +void dspbegin(); +int dspstat(char); +char dspwaitonscroll(); +char dspactive(); +void dspsetupdatemode(char); +char dspgetupdatemode(); +void dspgraphupdate(); +void dspsetscrollmode(char, short); +void dspsetcursor(short, short); +void dspbufferclear(); +void dspscroll(mem_t, mem_t); +void dspreversescroll(mem_t); +void dspvt52(char *); + +/* real time clock */ +char* rtcmkstr(); +void rtcset(uint8_t, short); +short rtcget(short); + +/* network and mqtt functions */ +void netbegin(); +char netconnected(); +void mqttsetname(); +void mqttbegin(); +int mqttstat(char); +int mqttstate(); +void mqttsubscribe(char*); +void mqttsettopic(char*); +void mqttouts(char *, short); +void mqttins(char *, short); +char mqttinch(); + +/* low level EEPROM handling */ +void ebegin(); +void eflush(); +address_t elength(); +short eread(address_t); +void eupdate(address_t, short); + +/* arduino io functions */ +void aread(); +void dread(); +void awrite(number_t, number_t); +void dwrite(number_t, number_t); +void pinm(number_t, number_t); +void bmillis(); +void bpulsein(); +void btone(short); + +/* timing control for ESP and network */ +void byield(); +void yieldfunction(); +void longyieldfunction(); + +/* the file interface */ +char* mkfilename(const char*); +const char* rmrootfsprefix(const char*); +void fsbegin(char); +int fsstat(char); +void filewrite(char); +char fileread(); +char ifileopen(const char*); +void ifileclose(); +char ofileopen(char*, const char*); +void ofileclose(); +int fileavailable(); +void rootopen(); +int rootnextfile(); +int rootisfile(); +const char* rootfilename(); +int rootfilesize(); +void rootfileclose(); +void rootclose(); +void formatdisk(short i); + +/* low level serial code */ +void picogetchar(char); +void picowrite(char); +void picobegin(uint32_t); +void picoins(char, short); +void serialbegin(); +int serialstat(char); +char serialread(); +void serialwrite(char); +short serialcheckch(); +short serialavailable(); +void consins(char*, short); +void prtbegin(); +int prtstat(char); +void prtset(int); +char prtopen(char *, int); +void prtclose(); +char prtread(); +void prtwrite(char); +short prtcheckch(); +short prtavailable(); + +/* generic wire access */ +void wirebegin(); +int wirestat(char); +void wireopen(char, char); +void wireins(char*, uint8_t); +void wireouts(char*, uint8_t); +short wireavailable(); + +/* RF24 radio input */ +int radiostat(char); +void radioset(int); +#ifdef ARDUINO +uint64_t pipeaddr(char*); +#else +long pipeaddr(char*); +#endif +void iradioopen(char*); +void oradioopen(char*); +void radioins(char*, short); +void radioouts(char* , short); +short radioavailable(); + +/* sensor control */ +void sensorbegin(); +number_t sensorread(short, short); + +/* SPI RAM code */ +address_t spirambegin(); +void spiramrawwrite(address_t, mem_t); +mem_t spiramrawread(address_t ); + +/* + * Layer 0 functions - I/O and memory management + */ + +/* make room for BASIC */ +address_t ballocmem(); + +/* handle files im EEPROM */ +void eload(); +void esave(); +char autorun(); + +/* the variable heap from Apple 1 BASIC */ +address_t bmalloc(mem_t, mem_t, mem_t, address_t); +address_t bfind(mem_t, mem_t, mem_t); +address_t blength (mem_t, mem_t, mem_t); + +/* normal variables of number_t */ +void createvar(mem_t, mem_t); +number_t getvar(mem_t, mem_t); +void setvar(mem_t, mem_t, number_t); +void clrvars(); + +/* low level memory access packing n*8bit bit into n 8 bit objects + e* is for Arduino EEPROM */ +void getnumber(address_t, mem_t); +void setnumber(address_t, mem_t); +void egetnumber(address_t, mem_t); +void esetnumber(address_t, mem_t); + +/* array and string handling */ +/* the multidim extension is experimental, here only 2 array dimensions implemented as test */ +address_t createarray(mem_t, mem_t, address_t, address_t); +void array(mem_t, mem_t, mem_t, address_t, address_t, number_t*); +address_t createstring(char, char, address_t, address_t); +char* getstring(char, char, address_t, address_t); +number_t arraydim(char, char); +address_t stringdim(char, char); +address_t lenstring(char, char, address_t); +void setstringlength(char, char, address_t, address_t); +void setstring(char, char, address_t, char *, address_t, address_t); + +/* get keywords and tokens from PROGMEM */ +char* getkeyword(unsigned short); +char* getmessage(char); +signed char gettokenvalue(char); +void printmessage(char); + +/* error handling */ +void error(mem_t); +void reseterror(); +void debugtoken(); +void bdebug(const char*); + +/* the arithemtic stack */ +void push(number_t); +number_t pop(); +void drop(); +void clearst(); + +/* READ DATA handling */ +void clrdata(); + +/* FOR NEXT GOSUB stacks */ +void pushforstack(); +void popforstack(); +void dropforstack(); +void clrforstack(); +void pushgosubstack(); +void popgosubstack(); +void dropgosubstack(); +void clrgosubstack(); + +/* general I/O initialisation */ +void ioinit(); +void iodefaults(); + +/* character and string I/O functions */ +/* input */ +char inch(); +char checkch(); +short availch(); +void inb(char*, short); +void ins(char*, address_t); + +/* output */ +void outch(char); +void outcr(); +void outspc(); +void outs(char*, address_t); +void outsc(const char*); +void outscf(const char *, short); + +/* I/O of number_t - floats and integers */ +address_t parsenumber(char*, number_t*); +address_t parsenumber2(char*, number_t*); +address_t writenumber(char*, wnumber_t); +address_t writenumber2(char*, number_t); +char innumber(number_t*); +void outnumber(number_t); + +/* + * Layer 1 functions, provide data and do the heavy lifting + * for layer 2 including lexical analysis, storing programs + * and expression evaluation + */ + +/* lexical analysis */ +void whitespaces(); +void nexttoken(); + +/* storing and retrieving programs */ +char nomemory(number_t); +void storetoken(); +mem_t memread(address_t); +mem_t memread2(address_t); +void memwrite2(address_t, mem_t); +void gettoken(); +void firstline(); +void nextline(); + +void clrlinecache(); +void addlinecache(address_t, address_t); +address_t findinlinecache(address_t); +void findline(address_t); +address_t myline(address_t); +void moveblock(address_t, address_t, address_t); +void zeroblock(address_t, address_t); +void diag(); +void storeline(); + +/* read arguments from the token stream and process them */ +char termsymbol(); +char expect(mem_t, mem_t); +char expectexpr(); +void parsearguments(); +void parsenarguments(char); +void parsesubscripts(); +void parsefunction(void (*)(), short); +void parseoperator(void (*)()); +void parsesubstring(); + +/* mathematics and other functions for int and float */ +void xabs(); +void xsgn(); +void xpeek(); +void xmap(); +void rnd(); +void sqr(); +void xpow(); + +/* string values and string evaluation */ +char stringvalue(); +void streval(); + +/* floating point functions */ +void xsin(); +void xcos(); +void xtan(); +void xatan(); +void xlog(); +void xexp(); +void xint(); + +/* expression evaluation */ +void factor(); +void term(); +void addexpression(); +void compexpression(); +void notexpression(); +void andexpression(); +void expression(); + +/* + * Layer 2 - statements and functions + * use the global variables + */ + +/* basic commands of the core language set */ +void xprint(); +void lefthandside(address_t*, address_t*, address_t*, mem_t*); +void assignnumber(signed char, char, char, address_t, address_t, char); +void assignment(); +void showprompt(); +void xinput(); +void xgoto(); +void xreturn(); +void xif(); + +/* optional FOR NEXT loops */ +void findnextcmd(); +void xfor(); +void xbreak(); +void xcont(); +void xnext(); + +/* control commands and misc */ +void outputtoken(); +void xlist(); +void xrun(); +void xnew(); +void xrem(); +void xclr(); +void xdim(); +void xpoke(); +void xtab(); +void xdump(); +void dumpmem(address_t, address_t); + +/* file access and other i/o */ +void stringtobuffer(); +void getfilename(char*, char); +void xsave(); +void xload(const char* f); +void xget(); +void xput(); +void xset(); +void xnetstat(); + +/* Arduino IO control interface */ +void xdwrite(); +void xawrite(); +void xpinm(); +void xdelay(); +void xtone(); + +/* graphics commands */ +void xcolor(); +void xplot(); +void xline(); +void xrect(); +void xcircle(); +void xfrect(); +void xfcircle(); + +/* the darkarts */ +void xmalloc(); +void xfind(); +void xfind2(); +void xeval(); + +/* IoT commands */ +void xassign(); +void xavail(); +void xfsensor(); +void xsleep(); + +/* File I/O functions */ +char streq(const char*, char*); +void xcatalog(); +void xdelete(); +void xopen(); +void xfopen(); +void xclose(); +void xfdisk(); + +/* low level access functions */ +void xcall(); +void xusr(); + +/* the dartmouth stuff */ +void xdata(); +void nextdatarecord(); +void xread(); +void xrestore(); +void xdef(); +void xfn(); +void xon(); + +/* the statement loop */ +void statement(); + +/* stub for the interrupt code */ +void handleinterrupt(); diff --git a/data/Basic1/TinyVT52/hardware-arduino.h b/data/Basic1/TinyVT52/hardware-arduino.h new file mode 100644 index 0000000000000000000000000000000000000000..d017ff9475e21e346d3fa6e2fff3882c110e9c00 --- /dev/null +++ b/data/Basic1/TinyVT52/hardware-arduino.h @@ -0,0 +1,4748 @@ +/* + * + * $Id: hardware-arduino.h,v 1.7 2022/12/15 06:19:42 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * Playing around with frugal programming. See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Credits: + * - XMC contributed by Florian + * + * Hardware definition file coming with TinybasicArduino.ino aka basic.c + * + * - ARDUINOLCD, ARDUINOTFT and LCDSHIELD active the LCD code, + * LCDSHIELD automatically defines the right settings for + * the classical shield modules + * - ARDUINOPS2 activates the PS2 code. Default pins are 2 and 3. + * If you use other pins the respective changes have to be made + * below. + * - _if_ and PS2 are both activated STANDALONE cause the Arduino + * to start with keyboard and lcd as standard devices. + * - ARDUINOEEPROM includes the EEPROM access code + * - ARDUINOEFS, ARDUINOSD, ESPSPIFFS, RP2040LITTLEFS activate filesystem code + * - activating Picoserial, Picoserial doesn't work on MEGA + * + * Architectures and the definitions from the Arduino IDE + * + * ARDUINO_ARCH_SAM: no tone command, dtostrf + * ARDUINO_ARCH_RP2040: dtostrf (for ARDUINO_NANO_RP2040_CONNECT) + * ARDUINO_ARCH_SAMD: dtostrf (for ARDUINO_SAMD_MKRWIFI1010, ARDUINO_SEEED_XIAO_M0) + * ARDUINO_ARCH_ESP8266: SPIFFS, dtostrf (ESP8266) + * ARDUINO_AVR_MEGA2560, ARDUARDUINO_SAM_DUE: second serial port is Serial1-3 - no software serial + * ARDUINO_SAM_DUE: hardware heuristics + * ARDUINO_ARCH_AVR: nothing + * ARDUINO_ARCH_LGT8F: EEPROM code for flash EEPROM - platform fully supported now, yet no call 0 + * ARDUINO_ARCH_ESP32 and ARDUINO_TTGO_T7_V14_Mini32, no tone, no analogWrite, avr/xyz obsolete + * + * The code still contains hardware heuristics from my own projects, + * will be removed in the future + * + */ + +#if defined(ARDUINO) && ! defined(__HARDWAREH__) +#define __HARDWAREH__ + +/* + * Arduino hardware settings , set here what you need or + * use one of the predefined configurations below + * + * input/output methods USERPICOSERIAL, ARDUINOPS2 + * ARDUINOPRT, DISPLAYCANSCROLL, ARDUINOLCDI2C, + * ARDUINOTFT, ARDUINONOKIA51, ARDUINOILI9488, + * ARDUINOSSD1306, ARDUINOMCUFRIEND + * storage ARDUINOEEPROM, ARDUINOSD, ESPSPIFFS + * sensors ARDUINORTC, ARDUINOWIRE, ARDUINOSENSORS + * network ARDUINORF24, ARDUNIOMQTT + * memory ARDUINOSPIRAM + * + * leave this unset if you use the definitions below + */ + +#undef USESPICOSERIAL +#undef ARDUINOPS2 +#undef ARDUINOUSBKBD +#undef ARDUINOZX81KBD +#undef ARDUINOPRT +#undef DISPLAYCANSCROLL +#undef ARDUINOLCDI2C +#undef ARDUINONOKIA51 +#undef ARDUINOILI9488 +#undef ARDUINOSSD1306 +#undef ARDUINOMCUFRIEND +#undef ARDUINOGRAPHDUMMY +#undef LCDSHIELD +#undef ARDUINOTFT +#undef ARDUINOVGA +#define ARDUINOEEPROM +#undef ARDUINOI2CEEPROM +#undef ARDUINOEFS +#undef ARDUINOSD +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#undef ARDUINORTC +#undef ARDUINOWIRE +#undef ARDUINOWIRESLAVE +#undef ARDUINORF24 +#undef ARDUINOETH +#undef ARDUINOMQTT +#undef ARDUINOSENSORS +#undef ARDUINOSPIRAM +#undef STANDALONE +#undef STANDALONESECONDSERIAL + +/* experimental features, don't use unless you know the code */ +/* + * this setting uses the EEPROM as program storage + * The idea is to create a virtual memory layout starting from 0 with the EEPROM + * from elength() and then adding the BASIC RAM to it. himem and top need to be + * handled carefully. + */ +#undef ARDUINOPGMEEPROM + +/* + * Predefined hardware configurations, this assumes that all of the + * above are undef + * + * UNOPLAIN: + * a plain UNO with no peripherals + * AVRLCD: + * a AVR system with an LCD shield + * WEMOSSHIELD: + * a Wemos D1 with a modified simple datalogger shield + * optional keyboard and i2c display + * MEGASHIELD: + * an Arduino Mega with Ethernet Shield + * optional keyboard and i2c display + * TTGOVGA: + * TTGO VGA1.4 system with PS2 keyboard, standalone + * MEGATFT, DUETFT + * TFT 7inch screen systems, standalone + * NANOBOARD: + * Arduino Nano Every board with PS2 keyboard and sensor + * kit + * MEGABOARD: + * A board for the MEGA with 64 kB RAM, SD Card, and real time + * clock + * UNOBOARD: + * A board for an UNO with 64kB memory and EEPROM disk + * fits into an UNO flash only with integer + * ESP01BOARD: + * ESP01 based board as a sensor / MQTT interface + * RP2040BOARD: + * A ILI9488 hardware design based on an Arduino connect RP2040. + * RP2040BOARD2: + * like the one above but based on the Pi Pico core + * ESP32BOARD: + * same like above with an ESP32 core + * MKRBOARD: + * a digital signage and low energy board + */ + +#undef UNOPLAIN +#undef AVRLCD +#undef WEMOSSHIELD +#undef MEGASHIELD +#undef TTGOVGA +#undef DUETFT +#undef MEGATFT +#undef NANOBOARD +#undef MEGABOARD +#undef UNOBOARD +#undef ESP01BOARD +#undef RP2040BOARD +#undef RP2040BOARD2 +#undef ESP32BOARD +#undef MKR1010BOARD + +/* + * PIN settings and I2C addresses for various hardware configurations + * used a few heuristics and then the hardware definitions above + * + * #define SDPIN sets the SD CS pin - can be left as a default for most HW configs + * TTGO needs it as default definitions in the board file are broken + * #define PS2DATAPIN, PS2IRQPIN sets PS2 pin + */ + +/* PS2 Keyboard pins for AVR - use one interrupt pin 2 and one date pin + 5 not 4 because 4 conflicts with SDPIN of the standard SD shield */ +#define PS2DATAPIN 5 +#define PS2IRQPIN 2 + +/* Ethernet - 10 is the default */ +/* #define ETHPIN 10 */ + +/* The Pretzelboard definitions for Software Serial, conflicts with SPI */ +#define SOFTSERIALRX 11 +#define SOFTSERIALTX 12 + +/* near field pin settings for CE and CSN*/ +#define RF24CEPIN 8 +#define RF24CSNPIN 9 + +/* use standard I2C pins almost always */ +#undef SDA_PIN +#undef SCL_PIN + +/* set this is you want pin 4 on low interrupting the interpreter */ +/* #define BREAKPIN 4 */ +#undef BREAKPIN + +/* the secondary serial port aka prt aka stream 4 */ +#ifndef PRTSERIAL +#define PRTSERIAL Serial1 +#endif + +/* + * Pin settings for the ZX81 Keyboard + * first the 8 rows, then the 5 columns or the keyboard + * + * MEGAs have many pins and default is to use the odd pins on the side + * UNOs, NANOs, and others use the lower pins by default avoiding the + * pin 13 which is LED and doesn't work with standard schematics + */ +#ifdef ARDUINOZX81KBD +#ifdef ARDUINO_AVR_MEGA2560 +const byte zx81pins[] = {37, 35, 33, 31, 29, 27, 25, 23, 47, 45, 43, 41, 39}; +#else +const char zx81pins[] = {7, 8, 9, 10, 11, 12, A0, A1, 2, 3, 4, 5, 6 }; +#endif +#endif + +/* + * this is soft SPI for SD cards on MEGAs using + * pins 10-13, a patched SD library is needed + * for this: https://github.com/slviajero/SoftSD + * only needed for MEGA boards with an UNO shield + */ +#undef SOFTWARE_SPI_FOR_SD + +/* + * list of default i2c addresses + * + * some clock modules do have their EEPROM at 0x57. + * 0x050 this is the default lowest adress of standard EEPROMs + * Configurable range is between 0x50 and 0x57 for modules with jumpers. + * Some clock modules do have their EEPROM at 0x57. + * + * Clock default for the size is 4096. Define your EFS EEPROM and I2C EEPROM + * size here. One parameter set is for EFS and one parameter set is for + * plain serial EEPROMs. + * + * RTCs are often at 0x68 + */ +#define EFSEEPROMADDR 0x050 +/* #define EFSEEPROMSIZE 32768 */ + +#define RTCI2CADDR 0x068 + +/* the size of the plain I2C EEPROM, typically a clock */ +#define I2CEEPROMADDR 0x057 +/* #define I2CEEPROMSIZE 4096 */ + +/* is the I2C EEPROM buffered */ +#define ARDUINOI2CEEPROM_BUFFERED + +/* + * Sensor library code - configure your sensors here + */ +#ifdef ARDUINOSENSORS +#undef ARDUINODHT +#define DHTTYPE DHT22 +#define DHTPIN 2 +#undef ARDUINOSHT +#undef ARDUINOMQ2 +#define MQ2PIN A0 +#undef ARDUINOLMS6 +#undef ARDUINOAHT +#undef ARDUINOBMP280 +#undef ARDUINOBME280 +#endif + + +#if defined(ARDUINOSHT) || defined(ARDUINOLMS6) || defined(ARDUINOAHT) || defined(ARDUINOBMP280) || defined(RDUINOBME280) +#define NEEDSWIRE +#endif + +/* + * the hardware models + * These are predefined hardware configutations + */ + +/* an AVR based Arduino with nothing else */ +#if defined(UNOPLAIN) +#define ARDUINOEEPROM +#endif + +/* an AVR ARDUINO (UNO or MEGA) with the classical LCD shield */ +#if defined(AVRLCD) +#define ARDUINOEEPROM +#define DISPLAYCANSCROLL +#define LCDSHIELD +#endif + +/* + * a Wemos ESP8266 with a mdified datalogger shield + * standalone capable, with Wire and MQTT. + */ +#if defined(WEMOSSHIELD) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOSD +#define ARDUINORTC +#define ARDUINOWIRE +#define SDPIN D8 +#define PS2DATAPIN D2 +#define PS2IRQPIN D9 +#define ARDUINOMQTT +#endif + +/* + * mega with a Ethernet shield + * standalone capable, Ethernet is not enabled by default + */ +#if defined(MEGASHIELD) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define SDPIN 4 +#endif + +/* + * VGA system with SD card, based on the TTGO VGA 1.4 + * ESP32 + * standalone by default, with MQTT + */ +#if defined(TTGOVGA) +#define ARDUINOEEPROM +#define ARDUINOVGA +#define ARDUINOSD +/* #define ARDUINOMQTT */ +#define SDPIN 13 +#define STANDALONE +#endif + +/* + * MEGA with a TFT shield, standalone by default + */ +#if defined(MEGATFT) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOTFT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define PS2DATAPIN 18 +#define PS2IRQPIN 19 +#define SDPIN 53 +#define STANDALONE +#endif + +/* + * DUE with a TFT shield, standalone by default + */ +#if defined(DUETFT) +#undef ARDUINOEEPROM +#define ARDUINOPS2 +#undef ARDUINOUSBKBD +#define DISPLAYCANSCROLL +#define ARDUINOTFT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define ARDUINORTC +#define PS2DATAPIN 9 +#define PS2IRQPIN 8 +#define SDPIN 53 +#define STANDALONE +#endif + +#if defined(NANOBOARD) +#undef USESPICOSERIAL +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define ARDUINOPRT +#define ARDUINOEFS +#define ARDUINORTC +#define ARDUINOWIRE +#define EFSEEPROMADDR 0x050 /* use clock EEPROM 0x057, set to 0x050 for external EEPROM */ +#define STANDALONE +#endif + +/* a UNO shield with memory and EFS EEPROM */ +#if defined(UNOBOARD) +#define ARDUINOEEPROM +#define ARDUINOSPIRAM +#define ARDUINOEFS +#define ARDUINOWIRE +#define EFSEEPROMADDR 0x050 +#define EFSEEPROMSIZE 65534 +#endif + +/* a MEGA shield with memory and SD card */ +#if defined(MEGABOARD) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define ARDUINOPRT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINORTC +#define ARDUINOSPIRAM +#define RAMPIN 53 +#define SDPIN 49 +#endif + +/* an ESP01 board, using the internal flash + * with the ESP01-8266 only pins 0 and 2 are usable freely + * on ESP01-ESP32C3 this is 9 and 2 while 2 is an analog pin + * 9 cannot be pulled on low by any peripheral on boot because this + * brings the board to flash mode + */ +#if defined(ESP01BOARD) +#undef ARDUINOEEPROM +#define ESPSPIFFS +#define ARDUINOMQTT +#define ARDUINOWIRE +#if defined(ARDUINOWIRE) && defined(ARDUINO_ARCH_ESP8266) +#define SDA_PIN 0 +#define SCL_PIN 2 +#endif +/* see: https://github.com/espressif/arduino-esp32/issues/6376 + * nothing should block the port, e.g. DHT or anything + */ +#if defined(ARDUINOWIRE) && defined(ARDUINO_ARCH_ESP32) +#define SDA_PIN 9 +#define SCL_PIN 2 +#endif +/* + * + * Currently only 8=SDA and 9=SCL works / tested with AHT10 + */ +#endif + +/* an RP2040 based board with an ILI9488 display */ +#if defined(RP2040BOARD) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#undef ARDUINOEEPROM +#define ARDUINOI2CEEPROM +#define ARDUINOPRT +#define ARDUINOSD +#undef RP2040LITTLEFS +#define ARDUINOWIRE +#define ARDUINORTC +#define ARDUINOPS2 +#define ARDUINOMQTT +#undef STANDALONE +#endif + +/* an RP2040 Raspberry Pi Pico based board with an ILI9488 display */ +#if defined(RP2040BOARD2) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#undef ARDUINOEEPROM +#undef ARDUINOPRT +#undef ARDUINOSD +#define RP2040LITTLEFS +#undef ARDUINOWIRE +#undef ARDUINORTC +#undef ARDUINOPS2 +#undef ARDUINOMQTT +#undef STANDALONE +#define ILI_LED A2 +#define ILI_CS 15 +#define ILI_RST 14 +#define ILI_DC 13 +#endif + + +/* an ESP32 board with an ILI9488 display, + some SD problems here with some hardware */ +#if defined(ESP32BOARD) +#define ILI_CS 12 +#define ILI_DC 27 +#define ILI_RST 14 +#define ILI_LED 26 +#undef USESPICOSERIAL +#define ESPSPIFFS +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#define ARDUINOEEPROM +#define ARDUINOMQTT +#define ARDUINOWIRE +#endif + +/* a board based on the Arduino MKR 1010 Wifi + * made for low energy games + */ +#if defined(MKR1010BOARD) +#define ILI_CS 7 +#define ILI_DC 4 +#define ILI_RST 6 +#define ILI_LED A3 +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#define ARDUINOEFS +#define ARDUINOMQTT +#define ARDUINOWIRE +/* careful with the setting, lockout possible easily */ +#undef ARDUINOUSBKBD +#undef STANDALONE +#endif + +/* + * defining the systype variable which informs BASIC about the platform at runtime + */ + +#if defined(ARDUINO_ARCH_AVR) +const mem_t bsystype = SYSTYPE_AVR; +#elif defined(ARDUINO_ARCH_ESP8266) +const mem_t bsystype = SYSTYPE_ESP8266; +#elif defined(ARDUINO_ARCH_ESP32) +const mem_t bsystype = SYSTYPE_ESP32; +#elif defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +const mem_t bsystype = SYSTYPE_RP2040; +#elif defined(ARDUINO_ARCH_SAM) && defined(ARDUINO_ARCH_SAMD) +const mem_t bsystype = SYSTYPE_SAM; +#else +const mem_t bsystype = SYSTYPE_UNKNOWN; +#endif + +/* + * the non AVR arcitectures - this is somehow raw + * the ARDUINO 100 definition is probably not needed anymore + */ + +#if defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +/* removed, unneeded, takes more space than it should */ +/* #include */ +#define ARDUINO 100 +#endif + +/* + * Some settings, defaults, and dependencies + * + * NEEDSWIRE is set to start wire. Some libraries do this again. + * + * Handling Wire and SPI is tricky as some of the libraries + * also include and start SPI and Wire code. + */ + +/* a clock needs wire */ +#ifdef ARDUINORTC +#define NEEDSWIRE +#endif + +/* a display needs wire */ +#if defined(ARDUINOLCDI2C) || defined(ARDUINOSSD1306) +#define NEEDSWIRE +#endif + +/* EEPROM storage needs wire */ +#if defined(ARDUINOEFS) +#define NEEDSWIRE +#endif + +/* external EEPROMs also need wire */ +#if defined(ARDUINOI2CEEPROM) +#define NEEDSWIRE +#endif + +/* plain Wire support also needs wire ;-) */ +#if defined(ARDUINOWIRE) +#define NEEDSWIRE +#endif + +/* radio needs SPI */ +#ifdef ARDUINORF24 +#define ARDUINOSPI +#endif + +/* a filesystem needs SPI */ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) +#define ARDUINOSPI +#endif + +/* networking may need SPI */ +#ifdef ARDUINOMQTT +#define ARDUINOSPI +#endif + +/* the NOKIA and ILI9488 display needs SPI */ +#if defined(ARDUINONOKIA51) || defined(ARDUINOILI9488) +#define ARDUINOSPI +#endif + +/* the RAM chips */ +#if defined(ARDUINOSPIRAM) +#define ARDUINOSPI +#endif + + +/* Networking and keyboards need the background task capability */ +#if defined(ARDUINOMQTT) || defined(ARDUINOETH) || defined(ARDUINOUSBKBD) || defined(ARDUINOZX81KBD) +#define ARDUINOBGTASK +#endif + +/* picoserial is not a available on many platforms */ +#ifdef USESPICOSERIAL +#ifndef UCSR0A +#undef USESPICOSERIAL +#endif +#endif + +/* + * graphics adapter only when graphics hardware, overriding the + * language setting + * this is odd and can be removed later on + */ +#if !defined(ARDUINOTFT) && !defined(ARDUINOVGA) && !defined(ARDUINOILI9488) && !defined(ARDUINONOKIA51) && !defined(ARDUINOSSD1306) && !defined(ARDUINOMCUFRIEND) && !defined(ARDUINOGRAPHDUMMY) +#undef HASGRAPH +#endif + +/* + * Keyboard library, on AVR systems Paul Stoffregens original + * PS2 library works. + * I recommend to use my patched version from + * https://github.com/slviajero/PS2Keyboard + * works with ESP, has keyboard.peek() + */ +#ifdef ARDUINOPS2 +#include +#endif + +/* + * The USB keyboard code - tested only on DUE and the like + * not really good + */ +#ifdef ARDUINOUSBKBD +#include +#endif + +/* + * The ZX81 keyboard code - tested on AVR MEGA256 + */ +#ifdef ARDUINOZX81KBD +#include +#endif + +/* + * ESPy stuff, pgmspace has changed location + */ + +#ifdef ARDUINOPROGMEM +#ifdef ARDUINO_ARCH_ESP32 +#include +#else +#include +#endif +#endif + +/* + * Fix a few things around XMC, contributed by Florian + */ +#if defined(ARDUINO_ARCH_XMC) +#undef USESPICOSERIAL +#undef ARDUINOPROGMEM +#endif + +/* + * This works for AVR and ESP EEPROM dummy. + * On XMC you need https://github.com/slviajero/XMCEEPROMLib + * Throws a compiler error for other platforms. + */ +#ifdef ARDUINOEEPROM +#ifdef ARDUINO_ARCH_XMC +#include +#else +#include +#endif +#endif + +/* Standard SPI */ +#ifdef ARDUINOSPI +#include +#endif + +/* Standard wire - triggered by the NEEDSWIRE macro now */ +#ifdef NEEDSWIRE +#include +#endif + +/* + * the display library includes for LCD + */ +#ifdef LCDSHIELD +#include +#endif + +/* + * I2C displays + */ + +#ifdef ARDUINOLCDI2C +#include +#endif + +/* + * This is the monochrome library of Oli Kraus + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * It can harware scroll, but this is not yet implemented + */ +#if defined(ARDUINONOKIA51) || defined(ARDUINOSSD1306) +#include +#endif + +/* + * This is the (old) ILI9488 library originally created by Jarett Burket + * https://github.com/slviajero/ILI9488 + * It can hardware scroll (not yet used) + */ +#ifdef ARDUINOILI9488 +#include +#include +#endif + +/* + * This is the MCUFRIED library originally for parallel TFTs + * https://github.com/prenticedavid/MCUFRIEND_kbv + * + */ +#ifdef ARDUINOMCUFRIEND +#include +#include +#endif + +/* + * For TFT we use the UTFT library + * http://www.rinkydinkelectronics.com/library.php?id=51 + * please note the License, it is not GPL but NON COMMERCIAL + * Creative Commons. + */ +#ifdef ARDUINOTFT +#include +#include +#endif + +/* + * experimental networking code + * currently the standard Ethernet shield, ESP Wifi + * MKW Wifi, and RP2040 Wifi is supported. All of them + * with the standard library. + * + * In addition to this Pubsub is used + * https://github.com/slviajero/pubsubclient + * for MQTT + */ +#ifdef ARDUINOMQTT +#ifdef ARDUINOETH +#include +#else +#ifdef ARDUINO_ARCH_ESP8266 +#include +#endif +#ifdef ARDUINO_ARCH_ESP32 +#include +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) +#include +#endif +#endif +#include +#endif + +/* + * VGA is only implemented on one platform - TTGO VGA 1.4 + * Needs https://github.com/slviajero/FabGL + */ +#if defined(ARDUINOVGA) && defined(ARDUINO_TTGO_T7_V14_Mini32) +#include +#include +#endif + +/* + * SD filesystems with the standard SD driver + * for MEGA 256 a soft SPI solution is needed + * if standard shields are used, this is a patched + * SD library https://github.com/slviajero/SoftSD + */ +#ifdef ARDUINOSD +#define FILESYSTEMDRIVER +#if defined(SOFTWARE_SPI_FOR_SD) +#include +#else +#include +#endif +#endif + +/* + * ESPSPIFFS tested on ESP8266 and ESP32 + * supports formating in BASIC + */ +#ifdef ESPSPIFFS +#define FILESYSTEMDRIVER +#ifdef ARDUINO_ARCH_ESP8266 +#include +#endif +#ifdef ARDUINO_ARCH_ESP32 +#include +#include +#endif +#endif + +/* + * RP2040 internal filesystem + * This is test code from https://github.com/slviajero/littlefs + * and the main branch is actively developed + */ +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +#define LFS_MBED_RP2040_VERSION_MIN_TARGET "LittleFS_Mbed_RP2040 v1.1.0" +#define LFS_MBED_RP2040_VERSION_MIN 1001000 +#define _LFS_LOGLEVEL_ 1 +#define RP2040_FS_SIZE_KB 1024 +#define FORCE_REFORMAT false +#include +#endif + +/* + * external flash file systems override internal filesystems + * currently BASIC can only have one filesystem + */ +#ifdef ARDUINOSD +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#endif + +/* + * support for external EEPROMs as filesystem + * overriding all other filessystems. This is a minimalistic + * filesystem meant for very small systems with not enough + * memory for real filesystems + * https://github.com/slviajero/EepromFS + */ +#ifdef ARDUINOEFS +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#undef ARDUINOSD +#define FILESYSTEMDRIVER +#endif + +/* the EFS object is used for filesystems and raw EEPROM access */ +#if (defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED)) || defined(ARDUINOEFS) +#include +#endif + +/* if there is an unbuffered I2C EEPROM, use an autodetect mechanism */ +#if defined(ARDUINOI2CEEPROM) +unsigned int i2ceepromsize = 0; +#endif + +/* + * Software SPI only on Mega2560 + */ + +#ifndef ARDUINO_AVR_MEGA2560 +#undef SOFTWARE_SPI_FOR_SD +#endif + +/* + * Arduino default serial baudrate and serial flags for the + * two supported serial interfaces. Serial is always active and + * connected to channel &1 with 9600 baud. + * + * channel 4 (ARDUINOPRT) can be either in character or block + * mode. Blockmode is set as default here. This means that all + * available characters are always loaded to a string -> inb() + */ +const int serial_baudrate = 9600; +mem_t sendcr = 0; + +#ifdef ARDUINOPRT +int serial1_baudrate = 9600; +mem_t blockmode = 1; +#else +const int serial1_baudrate = 0; +mem_t blockmode = 0; +#endif + +/* handling time - part of the Arduino core - only needed on POSIX OSes */ +void timeinit() {} + +/* starting wiring is only needed on raspberry */ +void wiringbegin() {} + +/* + * helper functions OS, heuristic on how much memory is + * available in BASIC + * Arduino information from + * data from https://docs.arduino.cc/learn/programming/memory-guide + */ +#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_XMC) +extern "C" char* sbrk(int incr); +long freeRam() { + char top; + return &top - reinterpret_cast(sbrk(0)); +} +#elif defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_LGT8F) +long freeRam() { + extern int __heap_start,*__brkval; + int v; + return (int)&v - (__brkval == 0 + ? (int)&__heap_start : (int) __brkval); +} +#elif defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) +long freeRam() { + return ESP.getFreeHeap(); +} +#else +long freeRam() { + return 0; +} +#endif + +/* + * Heuristic Wifi systems reserve 4k by default, small 8 bit AVR try to guess sizes conservatively + * RP2040 cannot measure, we set to 16 bit full address space + */ +long freememorysize() { +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_SAMD) + return freeRam() - 4000; +#endif +#if defined(ARDUINO_ARCH_XMC) + return freeRam() - 2000; +#endif +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_LGT8F) + int overhead=192; +#ifdef ARDUINOWIRE + overhead+=128; +#endif +#ifdef ARDUINORF24 + overhead+=128; +#endif +#ifdef ARDUINOSD + overhead+=512; +#endif +#ifdef ARDUINOZX81KBD + overhead+=64; +#endif +#ifdef ARDUINOETH + overhead+=256; +#endif +#ifdef HASGRAPH + overhead+=256; /* a bit on the safe side */ +#endif + return freeRam() - overhead; +#endif +#if defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) + return 65536; +#endif + return 0; +} + +/* + * the sleep and restart functions - only implemented for some controllers + */ +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) +void(* callzero)() = 0; +#endif + +void restartsystem() { + eflush(); /* if there is a I2C eeprom dummy, flush the buffer */ +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + ESP.restart(); +#endif +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) + callzero(); +#endif +#if defined(ARDUINO_ARCH_LGT8F) +#endif +} + +/* + * Used these two articles + * https://randomnerdtutorials.com/esp8266-deep-sleep-with-arduino-ide/ + * https://randomnerdtutorials.com/esp32-deep-sleep-arduino-ide-wake-up-sources/ + * for this very simple implementation - needs to be improved (pass data from sleep + * state to sleep state via EEPROM) + */ +#if defined(ARDUINO_ARCH_SAMD) +#include "RTCZero.h" +#include "ArduinoLowPower.h" +#endif + +/* this is unfinished, don't use */ +void rtcsqw(); + +#define LOWPOWERINTPIN 2 +void aftersleepinterrupt(void) { } + +void activatesleep(long t) { + eflush(); /* if there is a I2C eeprom dummy, flush the buffer */ +#if defined(ARDUINO_ARCH_ESP8266) + ESP.deepSleep(t*1000); +#endif +#if defined(ARDUINO_ARCH_ESP32) + esp_sleep_enable_timer_wakeup(t*1000); + esp_deep_sleep_start(); +#endif +#if defined(ARDUINO_ARCH_SAMD) + LowPower.sleep((int) t); +#endif +#if defined(ARDUINO_AVR_ATmega644) +/* unfinished, don't use, just test code + rtcsqw(); + pinMode(LOWPOWERINTPIN, INPUT_PULLUP); + attachInterrupt(digitalPinToInterrupt(LOWPOWERINTPIN), aftersleepinterrupt, CHANGE); + sleepMode(SLEEP_POWER_SAVE); + sleep(); + detachInterrupt(digitalPinToInterrupt(LOWPOWERINTPIN)); + noSleep(); +*/ +#endif +} + +/* + * start the SPI bus - this is a little mean as some libraries also + * try to start the SPI which may lead to on override of the PIN settings + * if the library code is not clean - currenty no conflict known + */ +void spibegin() { +#ifdef ARDUINOSPI +#ifdef ARDUINO_TTGO_T7_V14_Mini32 +/* this fixes the wrong board definition in the ESP32 core for this board */ + SPI.begin(14, 2, 12, 13); +#else + SPI.begin(); +#endif +#endif +} + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear(), dspupdate() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + * + * Non rgb ready displays on rgbcolor translate to their native color + * when BASIC requests an rgb color, in this case the nearest 4 bit + * color of the display is also stored for use in the text DISLAY driver + * code + */ + + /* generate a 4 bit vga color from a given rgb color */ +uint8_t rgbtovga(int r, int g, int b) { + short vga; + if (r>191 || g>191 || b>191) vga=8; else vga=0; + vga=vga+r/128+g/128*2+b/128*4; + return vga; +} + +/* + * global variables for a standard LCD shield. + * Includes the standard Arduino LiquidCrystal library + */ +#ifdef LCDSHIELD +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +/* LCD shield pins to Arduino + * RS, EN, d4, d5, d6, d7; + * backlight on pin 10; + */ +const int dsp_rows=2; +const int dsp_columns=16; +LiquidCrystal lcd( 8, 9, 4, 5, 6, 7); +void dspbegin() { lcd.begin(dsp_columns, dsp_rows); dspsetscrollmode(1, 1); } +void dspprintchar(char c, mem_t col, mem_t row) { lcd.setCursor(col, row); lcd.write(c);} +void dspclear() { lcd.clear(); } +void dspupdate() {} +void dspsetcursor(mem_t c) { if (c) lcd.blink(); else lcd.noBlink(); } +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +#define HASKEYPAD +/* elementary keypad reader left=1, right=2, up=3, down=4, select= */ +short keypadread(){ + int a=analogRead(A0); + if (a >= 850) return 0; + else if (a>=600 && a<850) return 10; + else if (a>=400 && a<600) return '1'; + else if (a>=200 && a<400) return '3'; + else if (a>=60 && a<200) return '4'; + else return '2'; +} +#endif + +/* + * A LCD display connnected via I2C, uses the standard + * Arduino I2C display library. + */ +#ifdef ARDUINOLCDI2C +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +const int dsp_rows=4; +const int dsp_columns=20; +LiquidCrystal_I2C lcd(0x27, dsp_columns, dsp_rows); +void dspbegin() { lcd.init(); lcd.backlight(); dspsetscrollmode(1, 1); } +void dspprintchar(char c, mem_t col, mem_t row) { lcd.setCursor(col, row); lcd.write(c); } +void dspclear() { lcd.clear(); } +void dspupdate() {} +void dspsetcursor(mem_t c) { if (c) lcd.blink(); else lcd.noBlink(); } +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +#endif + +/* + * A Nokia 5110 with ug8lib2 - can scroll quite well + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + * + * default PIN settings here are for ESP8266, using the standard + * SPI SS for 15 for CS/CE, and 0 for DC, 2 for reset + * + */ +#ifdef ARDUINONOKIA51 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#ifndef NOKIA_CS +#define NOKIA_CS 15 +#endif +#ifndef NOKIA_DC +#define NOKIA_DC 0 +#endif +#ifndef NOKIA_RST +#define NOKIA_RST 2 +#endif +U8G2_PCD8544_84X48_F_4W_HW_SPI u8g2(U8G2_R0, NOKIA_CS, NOKIA_DC, NOKIA_RST); +const int dsp_rows=6; +const int dsp_columns=10; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +char dspfontsize = 8; +void dspbegin() { u8g2.begin(); u8g2.setFont(u8g2_font_amstrad_cpc_extended_8r); } +void dspprintchar(char c, mem_t col, mem_t row) { char b[] = { 0, 0 }; b[0]=c; u8g2.drawStr(col*dspfontsize+2, (row+1)*dspfontsize, b); } +void dspclear() { u8g2.clearBuffer(); u8g2.sendBuffer(); dspfgcolor=1; } +void dspupdate() { u8g2.sendBuffer(); } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; u8g2.setDrawColor(dspfgcolor); } +void plot(int x, int y) { u8g2.setDrawColor(dspfgcolor); u8g2.drawPixel(x, y); dspgraphupdate(); } +void line(int x0, int y0, int x1, int y1) { u8g2.drawLine(x0, y0, x1, y1); dspgraphupdate(); } +void rect(int x0, int y0, int x1, int y1) { u8g2.drawFrame(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void frect(int x0, int y0, int x1, int y1) { u8g2.drawBox(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void circle(int x0, int y0, int r) { u8g2.drawCircle(x0, y0, r); dspgraphupdate(); } +void fcircle(int x0, int y0, int r) { u8g2.drawDisc(x0, y0, r); dspgraphupdate(); } +#endif + +/* + * Small SSD1306 OLED displays with I2C interface + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + */ +#ifdef ARDUINOSSD1306 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#define SSD1306WIDTH 32 +#define SSD1306HEIGHT 128 +/* constructors may look like this, last argument is the reset pin + * //U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); + * //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); + */ +#if SSD1306WIDTH == 32 +/* U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); + * use hardware I2C instead of software. Tested (only) on ESP32C3 and ESP8266 so far. + */ +U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0); +#endif +#if SSD1306WIDTH == 64 +/* the Heltec board has an internal software I2C on pins 4=SDA and 15=SCL */ +#ifdef ARDUINO_heltec_wifi_lora_32_V2 +U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, 15, 4, 16); +#else +/* use hardware I2C instead of software. Tested (only) on ESP32C3 and ESP8266 so far. + */ +U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0); +#endif +#endif +const char dspfontsize = 8; +const int dsp_rows=SSD1306WIDTH/dspfontsize; +const int dsp_columns=SSD1306HEIGHT/dspfontsize; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +void dspbegin() { u8g2.begin(); u8g2.setFont(u8g2_font_amstrad_cpc_extended_8r); } +void dspprintchar(char c, mem_t col, mem_t row) { char b[] = { 0, 0 }; b[0]=c; u8g2.drawStr(col*dspfontsize+2, (row+1)*dspfontsize, b); } +void dspclear() { u8g2.clearBuffer(); u8g2.sendBuffer(); dspfgcolor=1; } +void dspupdate() { u8g2.sendBuffer(); } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; u8g2.setDrawColor(dspfgcolor); } +void plot(int x, int y) { u8g2.setDrawColor(dspfgcolor); u8g2.drawPixel(x, y); dspgraphupdate(); } +void line(int x0, int y0, int x1, int y1) { u8g2.drawLine(x0, y0, x1, y1); dspgraphupdate(); } +void rect(int x0, int y0, int x1, int y1) { u8g2.drawFrame(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void frect(int x0, int y0, int x1, int y1) { u8g2.drawBox(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void circle(int x0, int y0, int r) { u8g2.drawCircle(x0, y0, r); dspgraphupdate(); } +void fcircle(int x0, int y0, int r) { u8g2.drawDisc(x0, y0, r); dspgraphupdate(); } +#endif + +/* + * A ILI9488 with Jarett Burkets version of Adafruit GFX and patches + * by Stefan Lenz + * currently only slow software scrolling implemented in BASIC + * + * https://github.com/slviajero/ILI9488 + * + * we use 9, 8, 7 as CS, CE, RST by default and A7 for the led brightness control + */ + +#ifdef ARDUINOILI9488 +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#ifndef ILI_CS +#define ILI_CS 9 +#endif +#ifndef ILI_DC +#define ILI_DC 8 +#endif +#ifndef ILI_RST +#define ILI_RST 7 +#endif +#ifndef ILI_LED +#define ILI_LED A3 +#endif +ILI9488 tft = ILI9488(ILI_CS, ILI_DC, ILI_RST); +/* ILI in landscape */ +const int dsp_rows=20; +const int dsp_columns=30; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { + tft.begin(); + tft.setRotation(3); /* ILI in landscape, SD slot up */ + tft.setTextColor(dspfgcolor); + tft.setTextSize(2); + tft.fillScreen(dspbgcolor); + pinMode(ILI_LED, OUTPUT); + analogWrite(ILI_LED, 255); + dspsetscrollmode(1, 4); +} +void dspprintchar(char c, mem_t col, mem_t row) { tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, 2); } +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, x0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, x0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +/* + * A MCUFRIEND parallel port display for the various tft shields + * This implementation is mainly for Arduino MEGA + * + * currently only slow software scrolling implemented in BASIC + * + */ + +#ifdef ARDUINOMCUFRIEND +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#ifndef LCD_CS +#define LCD_CS A3 +#endif +#ifndef LCD_CD +#define LCD_CD A2 +#endif +#ifndef LCD_WR +#define LCD_WR A1 +#endif +#ifndef LCD_RD +#define LCD_RD A0 +#endif +#ifndef LCD_RESET +#define LCD_RESET A4 +#endif +MCUFRIEND_kbv tft; +/* ILI in landscape */ +const int dsp_rows=20; +const int dsp_columns=30; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { + uint16_t ID = tft.readID(); + if (ID == 0xD3D3) ID = 0x9481; /* write-only shield - taken from the MCDFRIEND demo */ + tft.begin(ID); + tft.setRotation(1); /* ILI in landscape, 3: SD slot on right the side */ + tft.setTextColor(dspfgcolor); + tft.setTextSize(2); + tft.fillScreen(dspbgcolor); + dspsetscrollmode(1, 4); /* scrolling is on, scroll 4 lines at once */ + } +void dspprintchar(char c, mem_t col, mem_t row) { tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, 2); } +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, x0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, x0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +/* + * A no operations graphics dummy + * Tests the BASIC side of the graphics code without triggering + * any output + */ +#ifdef ARDUINOGRAPHDUMMY +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +const int dsp_rows=20; +const int dsp_columns=30; +const uint16_t dspdefaultfgcolor = 1; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +dspcolor_t dspfgcolor = 0xFFFF; +dspcolor_t dspbgcolor = 0x0000; +void dspbegin() { dspsetscrollmode(1, 4); } +void dspprintchar(char c, mem_t col, mem_t row) {} +void dspclear() {} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgcolor=0; } +void vgacolor(short c) { + short base=128; + if (c==8) { rgbcolor(64, 64, 64); return; } + if (c>8) base=255; + rgbcolor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) {} +void line(int x0, int y0, int x1, int y1) {} +void rect(int x0, int y0, int x1, int y1) {} +void frect(int x0, int y0, int x1, int y1) {} +void circle(int x0, int y0, int r) {} +void fcircle(int x0, int y0, int r) {} +#endif + + +/* + * SD1963 TFT display code with UTFT. + * Tested witth SD1963 800*480 board. + * it is mainly intended for a MEGA or DUE as a all in one system + * this is for a MEGA shield and the CTE DUE shield, for the due + * you need to read the comment in Arduino/libraries/UTFT/hardware/arm + * HW_ARM_defines.h -> uncomment the DUE shield + * See also + * https://github.com/slviajero/tinybasic/wiki/Projects:-4.-A-standalone-computer-with-a-TFT-screen-based-on-a-DUE + */ +#ifdef ARDUINOTFT +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +extern uint8_t SmallFont[]; +extern uint8_t BigFont[]; +#ifdef ARDUINO_SAM_DUE +UTFT tft(CTE70,25,26,27,28); +#else +UTFT tft(CTE70,38,39,40,41); +#endif +const int dsp_rows=30; +const int dsp_columns=50; +char dspfontsize = 16; +const uint32_t dspdefaultfgcolor = 0x00FFFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +typedef uint32_t dspcolor_t; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { tft.InitLCD(); tft.setFont(BigFont); tft.clrScr(); dspsetscrollmode(1, 4); } +void dspprintchar(char c, mem_t col, mem_t row) { tft.printChar(c, col*dspfontsize, row*dspfontsize); } +void dspclear() { + tft.clrScr(); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; + vgacolor(dspfgvgacolor); +} +void rgbcolor(int r, int g, int b) { + tft.setColor(r,g,b); + dspfgcolor=((uint8_t)r << 16) + ((uint8_t)g << 8) + b; + dspfgvgacolor=rgbtovga(r, g, b); +} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { tft.setColor(64, 64, 64); return; } + if (c>8) base=255; + tft.setColor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void plot(int x, int y) { tft.drawPixel(x, y); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1); } +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r); } +#endif + +/* + * this is the VGA code for fablib - experimental + * not all modes and possibilities explored, with networking on an ESP + * VGA16 is advisable. It leaves enough memory for the interpreter and network. + * this code overrides the display driver logic as fabgl brings an own + * terminal emulation + */ +#if defined(ARDUINOVGA) && defined(ARDUINO_TTGO_T7_V14_Mini32) +/* static fabgl::VGAController VGAController; */ +fabgl::VGA16Controller VGAController; /* 16 color object with less memory */ +static fabgl::Terminal Terminal; +static Canvas cv(&VGAController); +TerminalController tc(&Terminal); +Color vga_graph_pen = Color::BrightWhite; +Color vga_graph_brush = Color::Black; +Color vga_txt_pen = Color::BrightGreen; +Color vga_txt_background = Color::Black; +#ifdef HASTONE +fabgl::SoundGenerator soundGenerator; +#endif + + +/* this starts the vga controller and the terminal right now */ +void vgabegin() { + VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_15); + VGAController.setResolution(VGA_640x200_70Hz); + Terminal.begin(&VGAController); + Terminal.setBackgroundColor(vga_txt_background); + Terminal.setForegroundColor(vga_txt_pen); + Terminal.connectLocally(); + Terminal.clear(); + Terminal.enableCursor(1); + Terminal.setTerminalType(TermType::VT52); +} + +int vgastat(char c) {return 0; } + +/* scale the screen size */ +void vgascale(int* x, int* y) { + *y=*y*10/24; +} + +void rgbcolor(int r, int g, int b) { + short vga; + if (r>191 || g>191 || b>191) vga=8; else vga=0; + vga=vga+r/128+g/128*2+b/128*4; + vga_graph_pen=fabgl::Color(vga); +} + +void vgacolor(short c) { vga_graph_pen = fabgl::Color(c%16); } +void plot(int x, int y) { + vgascale(&x, &y); + cv.setPenColor(vga_graph_pen); + cv.setPixel(x,y); + cv.setPenColor(vga_txt_pen); +} + +void line(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawLine(x0, y0, x1, y1); + cv.setPenColor(vga_txt_pen); +} + +void rect(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawRectangle(x0, y0, x1, y1); + cv.setPenColor(vga_txt_pen); +} + +void frect(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setBrushColor(vga_graph_pen); + cv.fillRectangle(x0, y0, x1, y1); + cv.setBrushColor(vga_txt_background); +} + +void circle(int x0, int y0, int r) { + int rx = r; + int ry = r; + vgascale(&x0, &y0); + vgascale(&rx, &ry); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawEllipse(x0, y0, rx, ry); + cv.setPenColor(vga_txt_pen); +} + +void fcircle(int x0, int y0, int r) { + int rx = r; + int ry = r; + vgascale(&x0, &y0); + vgascale(&rx, &ry); + cv.setBrushColor(vga_graph_pen); + cv.fillEllipse(x0, y0, rx, ry); + cv.setBrushColor(vga_txt_background); +} + +void vgawrite(char c){ + switch(c) { + case 12: /* form feed is clear screen */ + Terminal.write(27); Terminal.write('H'); + Terminal.write(27); Terminal.write('J'); + return; + case 10: /* this is LF Unix style doing also a CR */ + Terminal.write(10); Terminal.write(13); + return; + } + Terminal.write(c); +} +#else +void vgabegin(){} +int vgastat(char c) {return 0; } +void vgawrite(char c){} +#endif + +/* + * Keyboard code for either the Fablib Terminal class or + * PS2Keyboard - please note that you need the ESP patched + * version here as mentioned above + * + * sets HASKEYBOARD to inform basic about this capability + * + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +#ifdef ARDUINO_TTGO_T7_V14_Mini32 +#define PS2FABLIB +#define HASKEYBOARD +fabgl::PS2Controller PS2Controller; +char fabgllastchar = 0; +#else +#if defined(ARDUINO) && defined(ARDUINOPS2) +#define PS2KEYBOARD +#define HASKEYBOARD +PS2Keyboard keyboard; +#else +#if defined(ARDUINO) && defined(ARDUINOUSBKBD) +#define HASKEYBOARD +#define USBKEYBOARD +USBHost usb; +KeyboardController keyboard(usb); +char usbkey=0; +#else +#if defined(ARDUINOZX81KBD) +#define HASKEYBOARD +#define ZX81KEYBOARD +ZX81Keyboard keyboard; +#endif +#endif +#endif +#endif + +/* + * Experimental, unfinished, rudimentary + */ +#if defined(ARDUINOUSBKBD) +/* not really needed, only here for reference */ +char usbkeymapUS[] = +{' ', '"', '!', '#', '$', '%', '&', '\'', '(', ')', '*', '+', + ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', + 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', + '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', 0, 0}; +/* map the ASCII codes of the essential keys for BASIC of a + * German keyboard, most notable is < and > which is ö/a + */ +char usbkeymapGerman[] = +{' ', '!', '!', '#', '$', '%', '/', '>', ')', '=', '(', '+', + ',', '-', '.', '-', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', '<', ';', '=', ':', '_', '"', 'A', 'B', 'C', + 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Z', 'Y', '[', + '#', '+', '&', '?', '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'z', 'y', '{', '\'', '*', 0, 0}; + +/* + * he weak functions from the keyboard controller class implemented + */ +void keyPressed() {} +void keyReleased() { + switch (keyboard.getOemKey()) { + case 40: + usbkey=10; + break; + case 42: + case 76: + usbkey=127; + break; + case 41: + usbkey=27; + break; + default: + usbkey=keyboard.getKey(); + if (usbkey>31 && usbkey<128) usbkey=usbkeymapGerman[usbkey-32]; + } +} +#endif + +/* + * keyboard controller code + */ + +void kbdbegin() { +#ifdef PS2KEYBOARD + keyboard.begin(PS2DATAPIN, PS2IRQPIN, PS2Keymap_German); +#else +#ifdef PS2FABLIB + PS2Controller.begin(PS2Preset::KeyboardPort0); + PS2Controller.keyboard()->setLayout(&fabgl::GermanLayout); +#else +#ifdef USBKEYBOARD +/* nothing to be done here */ +#else +#ifdef ZX81KEYBOARD + keyboard.begin(zx81pins); +#endif +#endif +#endif +#endif +} + +int kbdstat(char c) {return 0; } + +char kbdavailable(){ +#ifdef PS2KEYBOARD + return keyboard.available(); +#else +#ifdef PS2FABLIB + if (fabgllastchar) return Terminal.available()+1; else return Terminal.available(); +#else +#ifdef USBKEYBOARD +/* if we already have a key, tell the caller we have one */ + if (usbkey) return 1; +/* if not, look it up */ + if (usbkey) return 1; else return 0; +#else +#ifdef ZX81KEYBOARD + return keyboard.available(); +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD +/* a poor man's debouncer, unstable state returns 0 */ + char c=keypadread(); + if (c) delay(2); else return 0; + if (c == keypadread()) return 1; else return 0; + /* return keypadread()!=0; */ +#endif + return 0; +} + +char kbdread() { + char c; + while(!kbdavailable()) byield(); +#ifdef PS2KEYBOARD + c=keyboard.read(); +#endif +#ifdef PS2FABLIB + if (fabgllastchar) { c=fabgllastchar; fabgllastchar=0; } + else c=Terminal.read(); +#else +#ifdef USBKEYBOARD +/* if we have read a key before, return it else look it up */ + c=usbkey; + usbkey=0; +#else +#ifdef ZX81KEYBOARD + c=keyboard.read(); +#endif +#endif +#endif +#ifdef HASKEYPAD + c=keypadread(); +/* if you uncommend this we wait for key release on a keypad */ + while(kbdavailable()) byield(); +#endif + if (c == 13) c=10; + return c; +} + +char kbdcheckch() { +char c; +#ifdef PS2KEYBOARD +/* + * only works with the patched library https://github.com/slviajero/PS2Keyboard + */ +#ifdef PS2KEYBOARD_HASPEEK + return keyboard.peek(); +#else +/* + * for the original library https://github.com/PaulStoffregen/PS2Keyboard + * GET does not work properly with it as there is no peek functionality which is needed + * for non blocking IO and the ability to stop programs + */ + if (kbdavailable()) return kbdread(); +#endif +#else +#ifdef PS2FABLIB + if (fabgllastchar) return fabgllastchar; + if (kbdavailable()) { fabgllastchar=Terminal.read(); return fabgllastchar; } +#else +#ifdef USBKEYBOARD + return usbkey; +#else +#ifdef ZX81KEYBOARD + return keyboard.lastKey; /* dont peek here as checkch called in a fast loop in statement(), peek done in byield*/ +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD + return keypadread(); +#endif + return 0; +} + +/* + * this is a generic display code + * it combines the functions of LCD and TFT drivers + * if this code is active + * + * dspprintchar(char c, short col, short row) + * dspclear() + * dspbegin() + * dspupdate() + * dspsetcursor(mem_t c) + * dspsetfgcolor(address_t c) + * void dspsetbgcolor(address_t c) + * void dspsetreverse(mem_t c) + * mem_t dspident() + * + * have to be defined before in a hardware dependent section. + * Only dspprintchar and dspclear are needed, all other can be stubs + * + * VGA systems don't use the display driver for text based output. + * + * The display driver exists as a buffered version that can scroll + * or an unbuffered version that cannot scroll. Interfaces to hardware + * scrolling are not yet implemented. + * + * A VT52 state engine is implemented and works for buffered and + * unbuffered displays. Only buffered displays have the full VT52 + * feature set including most of the GEMDOS extensions described here: + * https://en.wikipedia.org/wiki/VT52 + * + * dspupdatemode controls the page update behaviour + * 0: character mode, display each character separately + * 1: line mode, update the display after each line + * 2: page mode, update the display after an ETX + * ignored if the display has no update function + * + */ + +#ifdef DISPLAYDRIVER + +/* the cursor position */ +mem_t dspmycol = 0; +mem_t dspmyrow = 0; + +/* the escape state of the vt52 terminal */ +mem_t dspesc = 0; + +/* which update mode do we have */ +mem_t dspupdatemode = 0; + +/* how do we handle wrap 0 is wrap, 1 is no wrap */ +mem_t dspwrap = 0; + +/* the print mode */ +mem_t dspprintmode = 0; + +/* the scroll control variables */ +mem_t dspscrollmode = 0; +mem_t dsp_scroll_rows = 1; + +int dspstat(char c) { return 0; } + +void dspsetcursorx(mem_t c) { + if (c>=0 && c=0 && r=0 && i<=dsp_columns*dsp_rows-1) return dspbuffer[i/dsp_columns][i%dsp_columns]; else return 0; +} + +dspbuffer_t dspgetrc(mem_t r, mem_t c) { return dspbuffer[r][c]; } + +dspbuffer_t dspgetc(mem_t c) { return dspbuffer[dspmyrow][c]; } + +/* this functions prints a character and updates the display buffer */ +void dspsetxy(dspbuffer_t ch, mem_t c, mem_t r) { + if (r>=0 && c>=0 && r> 8) & 15); + dspprintchar(b & charmask, c, r); + dsprestorepen(); +#else + dspprintchar(b, c, r); +#endif + } else { + dspprintchar(' ', c, r); + } + } + dspbuffer[r][c]=b; + } + } + +/* delete the characters in the remaining lines */ + for (r=dsp_rows-scroll_rows; rline; r--) { + for (c=0; c> 8) & 15); + dspprintchar(b & charmask, c, r); + dsprestorepen(); +#else + dspprintchar(b, c, r); +#endif + } else { + dspprintchar(' ', c, r); + } + } + dspbuffer[r][c]=b; + } + } + +/* delete the characters in the remaining line */ + for (c=0; c= dsp_rows) dspscroll(dsp_scroll_rows); + dspmycol=0; + if (dspupdatemode == 1) dspupdate(); + return; + case 11: // vertical tab - converted to line feed without carriage return + if (dspmyrow < dsp_rows-1) dspmyrow++; + return; + case 12: // form feed is clear screen plus home + dspbufferclear(); + dspclear(); + return; + case 13: // classical carriage return, no form feed + dspmycol=0; + return; + case 27: // escape - initiate vtxxx mode + dspesc=1; + return; + case 28: // cursor back - this is what terminal applications send for cursor back + if (dspmycol > 0) dspmycol--; + return; + case 29: // cursor forward - this is what terminal applications send for cursor back + if (dspmycol < dsp_columns-1) dspmycol++; + return; + case 8: // back space is delete the moment + case 127: // delete + if (dspmycol > 0) { + dspmycol--; + dspsetxy(0, dspmycol, dspmyrow); + } + return; + case 2: // we abuse start of text as a home sequence, may also be needed for Epaper later + dspmycol=dspmyrow=0; + return; + case 3: // ETX = Update display for buffered display like Epaper + dspupdate(); + return; + default: // eliminate all non printables - problematic for LCD special character + if (c<32) return; + break; + } + + dspsetxy(c, dspmycol, dspmyrow); + dspmycol++; + if (dspmycol == dsp_columns) { + if (!dspwrap) { /* we simply ignore the cursor */ + dspmycol=0; + dspmyrow=(dspmyrow + 1); + } + if (dspmyrow >= dsp_rows) dspscroll(dsp_scroll_rows); + } + if (dspupdatemode == 0) dspupdate(); +} + +/* + * This is the minimalistic VT52 state engine. It is an interface to + * process single byte control sequences of the form char + */ + +#ifdef HASVT52 +/* the state variable */ +char vt52s = 0; + +/* the graphics mode mode - unused so far */ +mem_t vt52graph = 0; + +/* the secondary cursor */ +mem_t vt52mycol = 0; +mem_t vt52myrow = 0; + +/* temp variables for column and row , do them here and not in the case: guess why */ +mem_t vt52tmpr; +mem_t vt52tmpc; + +/* an output buffer for the vt52 terminal */ +const mem_t vt52buffersize = 4; +char vt52outbuffer[vt52buffersize] = { 0, 0, 0, 0 }; +mem_t vt52bi = 0; +mem_t vt52bj = 0; + +/* the reader from the buffer */ +char vt52read() { + if (vt52bi<=vt52bj) { vt52bi = 0; vt52bj = 0; } /* empty, reset */ + if (vt52bi>vt52bj) return vt52outbuffer[vt52bj++]; + return 0; +} + +/* the avail from the buffer */ +mem_t vt52avail() { return vt52bi-vt52bj; } + +/* putting something into the buffer */ +void vt52push(char c) { + if (vt52bi < vt52buffersize) vt52outbuffer[vt52bi++]=c; +} + +/* clear the buffer */ +void vt52clear() { + vt52bi=0; +} + +/* something little */ +uint8_t vt52number(char c) { + uint8_t b=c; + if (b>31) return b-32; else return 0; +} + +/* + * The VT52 data registers for the graphics and wiring extension. + * x,y are 14 bit and z is 7bit. Data is transferred in VT52 style + * -> numerical value plus 32 to map the data to printable characters + * Access is done through the the ESC x, ESC y and ESC z sequences: + * ESC x #1 #2 + * sets the xregister to (#1-32)+(#2-32)*128 + */ + +#if defined(DISPLAYHASGRAPH) || defined(VT52WIRING) +#define VT52HASREGISTERS +/* the three register variables */ +uint16_t vt52regx = 0; +uint16_t vt52regy = 0; +uint8_t vt52regz = 0; + +/* one argument cache for two byte arguments */ +uint8_t vt52arg = 0; +#endif + +/* + * graphics code in VT52, if you want to control graphics from the character stream + * The ESC g sequence sends a graphics command as the second byte after the g + * + * Valid values for g are + * s: set the graphics cursor + * p: plot a point + * l: draw a line + * L: draw a line and move the cursor to the endpoint + * r: draw a rectangle + * R: draw a filled rectangle + * c: draw a circle + * C: draw a filled circle + * + */ +#ifdef DISPLAYHASGRAPH +/* the grahics cursor of VT52 */ +uint16_t vt52graphx = 0; +uint16_t vt52graphy = 0; + +/* execute one graphics command */ +void vt52graphcommand(uint8_t c) { + switch(c) { + case 's': /* set the cursor */ + vt52graphx=vt52regx; + vt52graphy=vt52regy; + break; + case 'p': /* plot a point at the cursor */ + plot(vt52graphx, vt52graphy); + break; + case 'l': /* plot a line */ + line(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'L': /* plot a line and update the cursor, needed for drawing shapes */ + line(vt52graphx, vt52graphy, vt52regx, vt52regy); + vt52graphx=vt52regx; + vt52graphy=vt52regy; + break; + case 'r': /* plot a rectangle */ + rect(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'c': /* plot a circle */ + circle(vt52graphx, vt52graphy, vt52regx); + break; + case 'R': /* plot a filled rectangle */ + frect(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'C': /* plot a filled circle */ + fcircle(vt52graphx, vt52graphy, vt52regx); + break; + } +} +#endif + +/* + * this is an odd part of the vt52 code with this, the terminal + * can control the digital and analog pins. + * it is meant for situations where the terminal is controlled by a (powerful) + * device with no or very few I/O pins. It can use the pins of the Arduino through + * the terminal. This works as long as everything stays within the terminals timescale + * On a 9600 baud interface, the character processing time is 1ms, everything slower + * than approximately 10ms can be done through the serial line. + */ + +#ifdef VT52WIRING +#define VT52HASREGISTERS + void vt52wiringcommand(uint8_t c) { + switch(c) { + case 'p': /* pinMode z */ + pinMode(vt52regz); + break; + case 'l': /* digital write low pin z*/ + digitalWrite(vt52regz, LOW); + break; + case 'h': /* digital write high pin z*/ + digitalWrite(vt52regz, HIGH); + break; + case 'r': /* digital read from pin z */ + vt52push(digitalRead(vt52regz)+32); + break; + case 'a': /* analog write pin z to value x */ + analogWrite(vt52regz, vt52regx); + break; + case 'A': /* analog read from pin z */ + break; + case 't': /* tone at pin z, frequency x, duration y */ + tone(vt52regz, vt52regx, vt52regy); + break; + } + } +#endif + + +/* vt52 state engine */ +void dspvt52(char* c){ + +/* reading and processing multi byte commands */ + switch (vt52s) { + case 'Y': + if (dspesc == 2) { + dspsetcursory(vt52number(*c)); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + dspsetcursorx(vt52number(*c)); + *c=0; + } + vt52s=0; + break; + case 'b': + dspsetfgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + case 'c': + dspsetbgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; +#ifdef VT52HASREGISTERS + case 'x': + if (dspesc == 2) { + vt52arg=vt52number(*c); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + vt52regx=vt52arg+vt52number(*c)*128; + *c=0; + } + vt52s=0; + break; + case 'y': + if (dspesc == 2) { + vt52arg=vt52number(*c); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + vt52regy=vt52arg+vt52number(*c)*127; + *c=0; + } + vt52s=0; + break; + case 'z': + vt52regz=vt52number(*c); + *c=0; + vt52s=0; + break; +#endif +#ifdef DISPLAYHASGRAPH + case 'g': + vt52graphcommand(*c); + *c=0; + vt52s=0; + break; +#endif +#ifdef VT52WIRING + case 'a': + vt52wiringcommand(*c); + *c=0; + vt52s=0; + break; +#endif + } + +/* commands of the terminal in text mode */ + + switch (*c) { + case 'v': /* GEMDOS / TOS extension enable wrap */ + dspwrap=0; + break; + case 'w': /* GEMDOS / TOS extension disable wrap */ + dspwrap=1; + break; + case '^': /* Printer extensions - print on */ + dspprintmode=1; + break; + case '_': /* Printer extensions - print off */ + dspprintmode=0; + break; + case 'W': /* Printer extensions - print without display on */ + dspprintmode=2; + break; + case 'X': /* Printer extensions - print without display off */ + dspprintmode=0; + break; + case 'V': /* Printer extensions - print cursor line */ +#if defined(ARDUINOPRT) && defined(DISPLAYCANSCROLL) + for (mem_t i=0; i': // alternate keypad off + break; + case 'b': // GEMDOS / TOS extension text color + case 'c': // GEMDOS / TOS extension background color + vt52s=*c; + dspesc=1; + *c=0; + return; + case 'e': // GEMDOS / TOS extension enable cursor + dspsetcursor(1); + break; + case 'f': // GEMDOS / TOS extension disable cursor + dspsetcursor(0); + break; + case 'p': // GEMDOS / TOS extension reverse video + dspsetreverse(1); + break; + case 'q': // GEMDOS / TOS extension normal video + dspsetreverse(0); + break; + case 'A': // cursor up + if (dspmyrow>0) dspmyrow--; + break; + case 'B': // cursor down + if (dspmyrow < dsp_rows-1) dspmyrow++; + break; + case 'C': // cursor right + if (dspmycol < dsp_columns-1) dspmycol++; + break; + case 'D': // cursor left + if (dspmycol>0) dspmycol--; + break; + case 'E': // GEMDOS / TOS extension clear screen + dspbufferclear(); + dspclear(); + break; + case 'H': // cursor home + dspmyrow=dspmycol=0; + break; + case 'Y': // Set cursor position + vt52s='Y'; + dspesc=2; + *c=0; + return; + case 'J': // clear to end of screen + for (int i=dspmycol+dsp_columns*dspmyrow; i0) dspmyrow--; else dspreversescroll(0); + break; + case 'L': // Insert line + dspreversescroll(dspmyrow); + break; + case 'M': + vt52tmpr = dspmyrow; + vt52tmpc = dspmycol; + dspscroll(1, dspmyrow); + dspmyrow=vt52tmpr; + dspmycol=vt52tmpc; + break; +#ifdef VT52REGISTERS + case 'x': // set the x register + case 'y': // set the y register + vt52s=*c; + dspesc=2; + *c=0; + return; + case 'z': // set the z register + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif +#ifdef DISPLAYHASGRAPH + case 'g': // execute a graphics command + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif +#ifdef VT52WIRING + case 'a': + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif + } + dspesc=0; + *c=0; +} +#endif + +#else +/* stubs for systems without a display driver, BASIC uses these functions */ +const int dsp_rows=0; +const int dsp_columns=0; +void dspsetupdatemode(char c) {} +void dspwrite(char c){}; +void dspbegin() {}; +int dspstat(char c) {return 0; } +char dspwaitonscroll() { return 0; }; +char dspactive() {return 0; } +void dspsetscrollmode(char c, mem_t l) {} +void dspscroll(mem_t a, mem_t b){} +char vt52read() { return 0; } +mem_t vt52avail() { return 0; } +#endif + +/* + * Arduino Real Time clock. The interface here + * offers the values as number_t plus a string, + * combining all values. + * + * The code does not use an RTC library any more + * all the rtc support is builtin now. + * + * Supported clocks DS1307, DS3231, and DS3232 (not tested) + * + * rtcget accesses the internal registers of the clock. + * Registers 0-6 are bcd transformed to return + * seconds, minutes, hours, day of week, day, month, year + * + * Registers 7-255 are returned as + */ + +#ifdef ARDUINORTC +char rtcstring[20] = { 0 }; +short rtcget(short i) { + + /* set the address of the read */ + Wire.beginTransmission(RTCI2CADDR); + Wire.write(i); + Wire.endTransmission(); + + /* now read */ + Wire.requestFrom(RTCI2CADDR, 1); + uint8_t v=Wire.read(); + + switch (i) { + case 0: + case 1: + return (v & 0b00001111)+((v >> 4) & 0b00000111) * 10; + case 2: + return (v & 0b00001111)+((v >> 4) & 0b00000011) * 10 ; /* only 24 hour support */ + case 3: + return (v & 0b00001111); + case 4: + return (v & 0b00001111) + ((v >> 4) & 0b00000011) * 10; + case 5: + return (v & 0b00001111) + ((v >> 4) & 0b00000001) * 10; + case 6: + return (v & 0b00001111) + (v >> 4) * 10; + default: + return v; + } +} + +void rtcset(uint8_t i, short v) { + uint8_t b; + + /* to bcd if we deal with a clock byte (0-6) */ + if (i<7) b=(v%10 + ((v/10) << 4)); else b=v; + + switch (i) { + case 0: + case 1: + b = b & 0b01111111; + break; + case 2: + case 4: + b = b & 0b00111111; /* only 24 hour support */ + break; + case 3: + b = b & 0b00000111; + break; + case 5: + b = b & 0b00011111; + } + +/* send the address and then the byte */ + Wire.beginTransmission(RTCI2CADDR); + Wire.write(i); + Wire.write(b); + Wire.endTransmission(); +} + +char* rtcmkstr() { + int cc = 2; + short t; + char ch; + /* the first read refreshes - not needed here but still ... */ + t=rtcget(2); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + t=rtcget(1); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + t=rtcget(0); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='-'; + t=rtcget(4); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + t=rtcget(5); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + t=rtcget(6); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc]=0; + /* needed for BASIC strings, reserve the first byte for two byte length handling in the upstream code */ + rtcstring[1]=cc-2; + rtcstring[0]=0; + return rtcstring+1; +} +#endif + +/* + * External EEPROM is handled through an EFS filesystem object + * see https://github.com/slviajero/EepromFS + * for details. Here the most common parameters are set as a default. +*/ +#ifdef ARDUINOEFS +#undef ARDUINOI2CEEPROM +#ifndef EFSEEPROMADDR +#define EFSEEPROMADDR 0x50 +#endif +#ifdef EFSEEPROMSIZE +EepromFS EFS(EFSEEPROMADDR, EFSEEPROMSIZE); +#else +EepromFS EFS(EFSEEPROMADDR); +#endif +#endif + +/* + * External EEPROM is handled through an EFS filesystem object in raw mode + * see https://github.com/slviajero/EepromFS + * for details. Here the most common parameters are set as a default. +*/ + +#if defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED) +#ifndef I2CEEPROMADDR +#define I2CEEPROMADDR 0x50 +#endif +#ifdef I2CEEPROMSIZE +EepromFS EFSRAW(I2CEEPROMADDR, I2CEEPROMSIZE); +#else +EepromFS EFSRAW(I2CEEPROMADDR); +#endif +#endif + +/* + * definitions for ESP Wifi and MQTT, super experimental. + * As networking is only used for MQTT at the moment, + * mqtt, Wifi and Ethernet comes all in one. + * + * No encryption/authetication is implemented in MQTT. + * Only public, open servers can be used. + * + * MQTT topics can only be 32 bytes long. + * Buffered incoming and outgoing messages can be 128 bytes + * per default. + * + * wifisettings.h is the generic network definition file + * all network settings are compiled into the code + * BASIC cannot change them at runtime. + */ +#ifdef ARDUINOMQTT +#include "wifisettings.h" +#ifdef ARDUINOETH +EthernetClient bethclient; +PubSubClient bmqtt(bethclient); +#else +WiFiClient bwifi; +PubSubClient bmqtt(bwifi); +#endif + +/* the buffers of the outgoing and incoming MQTT topic */ +#define MQTTLENGTH 32 +static char mqtt_otopic[MQTTLENGTH]; +static char mqtt_itopic[MQTTLENGTH]; + +/* + * the buffers for MQTT messages, input and output goes + * through these static buffers. + */ +#define MQTTBLENGTH 128 +volatile char mqtt_buffer[MQTTBLENGTH]; +volatile short mqtt_messagelength; +volatile char mqtt_obuffer[MQTTBLENGTH]; +volatile short mqtt_charsforsend; + +/* the name of the client, generated pseudo randomly to avoind + naming conflicts */ +static char mqttname[12] = "iotbasicxxx"; +void mqttsetname() { + long m = millis(); + mqttname[8]=(char)(65+m%26); + m=m/26; + mqttname[9]=(char)(65+m%26); + m=m/26; + mqttname[10]=(char)(65+m%26); +} + +/* + * network begin method + * needs the settings from wifisettings.h + * + * Default is right now that Wifi is started at boot + * This may change in the future. + * + * Ethernet begin has to be reviewed to avoid DHCP + * start timeout if network is not connected + */ +void netbegin() { +#ifdef ARDUINOETH +#ifdef ETHPIN + Ethernet.init(ETHPIN); +#endif + Ethernet.begin(mac); +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.mode(WIFI_STA); + WiFi.begin(ssid, password); + WiFi.setAutoReconnect(1); +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) + WiFi.begin(ssid, password); +#endif +#endif +} + +/* + * network stop methode, needed sometime to reinit networking + * completely or to save power + * + */ +void netstop() { +#ifdef ARDUINOETH +/* to be done */ +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.mode(WIFI_OFF); +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) + WiFi.end(); +#endif +#endif +} + +/* + * network reconnect methode + * + */ +void netreconnect() { +#ifdef ARDUINOETH +/* */ +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.reconnect(); + delay(1000); +#elif defined(ARDUINO_ARCH_SAMD) + WiFi.end(); + WiFi.begin(ssid, password); + delay(1000); +#endif +#endif +} + +/* + * network connected method + * on ESP Wifi try to reconnect, the delay is odd + * This is a partial reconnect, BASIC needs to handle + * repeated reconnects + */ +char netconnected() { +#ifdef ARDUINOETH + return bethclient.connected(); +#else + return(WiFi.status() == WL_CONNECTED); +#endif +} + +/* + * mqtt callback function, using the byte type here + * because payload can be binary - interface to BASIC + * strings need to be done + * + * mqtt event handling in BASIC can be triggered here + */ +void mqttcallback(char* t, byte* p, unsigned int l) { + short i; + mqtt_messagelength=l; + for(i=0; i MQTTBLENGTH) { + if (!mqttreconnect()) {ert=1; return;}; + if (!bmqtt.publish(mqtt_otopic, (uint8_t*) mqtt_obuffer, (unsigned int) mqtt_charsforsend-1, false)) ert=1; + mqtt_charsforsend=0; + } +} + +/* + * ins copies the buffer into a basic string + * - behold the jabberwock - length gynmastics + * z.a has to be the loop variable and contain the length after this -> intended side effect + */ +void mqttins(char *b, short nb) { + for (z.a=0; z.a0) { + ch=mqtt_buffer[0]; + for (i=0; i= 0 && v<256) analogWrite(p, v); + else error(EORANGE); +} + +void dwrite(number_t p, number_t v){ + if (v == 0) digitalWrite(p, LOW); + else if (v == 1) digitalWrite(p, HIGH); + else error(EORANGE); +} + +/* we normalize the pinMode as ESP32, ESP8266, and other boards behave rather + * differently. Following Arduino conventions we map 0 always to INPUT + * and 1 always to OUTPUT, all the other numbers are passed through to the HAL + * layer of the platform. + * Example: OUTPUT on ESP32 is 3 and 1 is assigned to INPUT. + * XMC also needs special treatment here. + */ +void pinm(number_t p, number_t m){ + uint8_t ml = m; + uint8_t pl = p; + switch (ml) { + case 0: + pinMode(pl, INPUT); + break; + case 1: + pinMode(pl, OUTPUT); + break; + default: + pinMode(pl, ml); + break; + } +} + +void bmillis() { + number_t m; +/* millis is processed as integer and is cyclic mod maxnumber and not cast to float!! */ + m=(number_t) (millis()/(unsigned long)pop() % (unsigned long)maxnum); + push(m); +}; + +void bpulsein() { + unsigned long t, pt; + t=((unsigned long) pop())*1000; + y=pop(); + x=pop(); + pt=pulseIn(x, y, t)/10; + push(pt); +} + +void btone(short a) { + number_t d = 0; + number_t v = 100; + if (a == 4) v=pop(); + if (a >= 3) d=pop(); + x=pop(); + y=pop(); +#if defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_ESP32) +#if defined(ARDUINO_TTGO_T7_V14_Mini32) && defined(HASTONE) +/* fabGL soundgenerator code of suggestes by testerrossa + * pin numbers below 128 are real arduino pins while + * pin numvers from 128 onwards are sound generator capabilities + * this is different from the original code + * + * Sound generator capabilities are numbered as follows + * 128: Sine wave + * 129: Symmetric square wave + * 130: Sawtooth + * 131: Triangle + * 132: VIC noise + * 133: noise + * + * 256-511: square wave with variable duty cycle + * + */ + if (x == 0) { + soundGenerator.play(false); + soundGenerator.clear(); + return; + } + if (a == 2) d=60000; + if (y == 128) soundGenerator.playSound(SineWaveformGenerator(), x, d, v); + if (y == 129) soundGenerator.playSound(SquareWaveformGenerator(), x, d, v); + if (y == 130) soundGenerator.playSound(SawtoothWaveformGenerator(), x, d, v); + if (y == 131) soundGenerator.playSound(TriangleWaveformGenerator(), x, d, v); + if (y == 132) soundGenerator.playSound(VICNoiseGenerator(), x, d, v); + if (y == 133) soundGenerator.playSound(NoiseWaveformGenerator(), x, d, v); + if (y >= 255 && y < 512 ) { + y=y-255; + SquareWaveformGenerator sqw; + sqw.setDutyCycle(y); + soundGenerator.playSound(sqw, x, d, v); + } +#else + return; +#endif +#else + if (x == 0) { + noTone(y); + } else if (a == 2) { + tone(y, x); + } else { + tone(y, x, d); + } +#endif +} + +/* + * the byield function is called after every statement + * it allows two levels of background tasks. + * + * ARDUINOBGTASK controls if time for background tasks is + * needed, usually set by hardware features + * + * YIELDINTERVAL by default is 32, generating a 32 ms call + * to the network loop function. YIELDTIME is 2 generating + * a 2 ms wait after the network loop to allow for buffer + * clearing after - this is needed on ESP8266 + * + * LONGYIELDINTERVAL by default is 1000, generating a one second + * call to maintenance functions. + * + * On an ESP8266 byield() is called every 100 microseconds + * (after each statement) in RUN mode. BASIC DELAY calls + * this every YIELDTIME ms. + */ +void byield() { +#if defined(ARDUINOBGTASK) + if (millis()-lastyield > YIELDINTERVAL-1) { + yieldfunction(); + lastyield=millis(); + } + if (millis()-lastlongyield > LONGYIELDINTERVAL-1) { + longyieldfunction(); + lastlongyield=millis(); + } + #endif + /* delay 0 blocks XMC unlike other boards where it is either yield() or no operation, it is needed on ESP8266 */ + #if !defined(ARDUINO_ARCH_XMC) + delay(0); + #endif +} + +/* everything that needs to be done often - 32 ms */ +void yieldfunction() { +#ifdef ARDUINOMQTT + bmqtt.loop(); +#endif +#ifdef ARDUINOUSBKBD + usb.Task(); +#endif +#ifdef ARDUINOZX81KBD + (void) keyboard.peek(); /* scan once and set lastkey properly every 32 ms */ +#endif +#ifdef ARDUINOMQTT + delay(YIELDTIME); /* ESP8266 heuristics, needed for Wifi stability */ +#endif +} + +/* everything that needs to be done not so often - 1 second */ +void longyieldfunction() { +#ifdef ARDUINOETH + Ethernet.maintain(); +#endif +} + +/* + * The file system driver - all methods needed to support BASIC fs access + * Different filesystems need different prefixes and fs objects, these + * filesystems use the stream API + */ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) +File ifile; +File ofile; +char tempname[SBUFSIZE]; +#ifdef ARDUINOSD +File root; +File file; +#ifdef ARDUINO_ARCH_ESP32 +const char rootfsprefix[2] = "/"; +#else +const char rootfsprefix[1] = ""; +#endif +#endif +#ifdef ESPSPIFFS +const char rootfsprefix[2] = "/"; +#ifdef ARDUINO_ARCH_ESP8266 +Dir root; +File file; +#endif +#ifdef ARDUINO_ARCH_ESP32 +File root; +File file; +#endif +#endif +#ifdef ARDUINO_ARCH_ESP8266 +#define FILE_OWRITE (sdfat::O_READ | sdfat::O_WRITE | sdfat::O_CREAT | sdfat::O_TRUNC) +#else +#ifdef ARDUINO_ARCH_ESP32 +#define FILE_OWRITE FILE_WRITE +#else +#define FILE_OWRITE (O_READ | O_WRITE | O_CREAT | O_TRUNC) +#endif +#endif +#endif + +/* using the POSIX API in LittleFS */ +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +FILE* ifile; +FILE* ofile; +DIR* root; +struct dirent* file; +LittleFS_MBED *myFS; +const char rootfsprefix[10] = MBED_LITTLEFS_FILE_PREFIX; +#endif + +/* use EEPROM as filesystem */ +#ifdef ARDUINOEFS +byte ifile; +byte ofile; +byte file; +#endif + +/* these filesystems have a path prefix */ +#if defined(RP2040LITTLEFS) || defined(ESPSPIFFS) || defined(ARDUINOSD) +char tmpfilename[10+SBUFSIZE]; + +/* add the prefix to the filename */ +char* mkfilename(const char* filename) { + short i,j; + for(i=0; i<10 && rootfsprefix[i]!=0; i++) tmpfilename[i]=rootfsprefix[i]; + tmpfilename[i++]='/'; + for(j=0; jinit() && v) outsc("LittleFS ok \n"); +#endif +#ifdef ARDUINOEFS + int s=EFS.begin(); + if (s>0 && v) { + outsc("Mounted EFS with "); outnumber(s); outsc(" slots.\n"); + } else { + if (EFS.format(32) && v) outsc("EFS: formating 32 slots.\n"); + } +#endif +} + +int fsstat(char c) { +#if defined(FILESYSTEMDRIVER) + if (c == 0) return 1; +#endif + return 0; +} + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char c) { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) + if (ofile) ofile.write(c); else ert=1; +#endif +#if defined(RP2040LITTLEFS) + if (ofile) fputc(c, ofile); else ert=1; +#endif +#if defined(ARDUINOEFS) + if (ofile) { + if (!EFS.fputc(c, ofile)) ert=-1; + } else ert=1; +#endif +} + +char fileread(){ + char c; +#if defined(ARDUINOSD) || defined(ESPSPIFFS) + if (ifile) c=ifile.read(); else { ert=1; return 0; } + if (c == -1 || c == 255) ert=-1; + return c; +#endif +#ifdef RP2040LITTLEFS + if (ifile) c=fgetc(ifile); else { ert=1; return 0; } + if (c == -1 || c == 255) ert=-1; + return c; +#endif +#ifdef ARDUINOEFS + if (ifile) c=EFS.fgetc(ifile); else { ert=1; return 0; } + if (c == -1|| c == 255) ert=-1; + return c; +#endif + return 0; +} + +int fileavailable(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) + return ifile.available(); +#endif +#ifdef RP2040LITTLEFS + return !feof(ifile); +#endif +#ifdef ARDUINOEFS + return EFS.available(ifile); +#endif + return 0; +} + +char ifileopen(const char* filename){ +#ifdef ARDUINOSD + ifile=SD.open(mkfilename(filename), FILE_READ); + return (int) ifile; +#endif +#ifdef ESPSPIFFS + ifile=SPIFFS.open(mkfilename(filename), "r"); + return (int) ifile; +#endif +#ifdef RP2040LITTLEFS + ifile=fopen(mkfilename(filename), "r"); + return (int) ifile; +#endif +#ifdef ARDUINOEFS + ifile=EFS.fopen(filename, "r"); + return (int) ifile; +#endif + return 0; +} + +void ifileclose(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) + ifile.close(); +#endif +#ifdef RP2040LITTLEFS + if (ifile) fclose(ifile); + ifile=NULL; +#endif +#ifdef ARDUINOEFS + if (ifile) EFS.fclose(ifile); + ifile=0; +#endif +} + +char ofileopen(char* filename, const char* m){ +#ifdef ARDUINOSD + if (*m == 'w') ofile=SD.open(mkfilename(filename), FILE_OWRITE); +/* ESP32 has FILE_APPEND defined */ +#ifdef FILE_APPEND + if (*m == 'a') ofile=SD.open(mkfilename(filename), FILE_APPEND); +#else + if (*m == 'a') ofile=SD.open(mkfilename(filename), FILE_WRITE); +#endif + return (int) ofile; +#endif +#ifdef ESPSPIFFS + ofile=SPIFFS.open(mkfilename(filename), m); + return (int) ofile; +#endif +#ifdef RP2040LITTLEFS + ofile=fopen(mkfilename(filename), m); + return (int) ofile; +#endif +#ifdef ARDUINOEFS + ofile=EFS.fopen(filename, m); + return (int) ofile; +#endif + return 0; +} + +void ofileclose(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) + ofile.close(); +#endif +#ifdef RP2040LITTLEFS + if (ofile) fclose(ofile); +#endif +#ifdef ARDUINOEFS + if (ofile) EFS.fclose(ofile); +#endif +} + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +void rootopen() { +#ifdef ARDUINOSD + root=SD.open("/"); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + root=SPIFFS.openDir("/"); +#endif +#ifdef ARDUINO_ARCH_ESP32 + root=SPIFFS.open("/"); +#endif +#endif +#ifdef RP2040LITTLEFS + root=opendir(rootfsprefix); +#endif +#ifdef ARDUINOEFS + EFS.dirp=0; +#endif +} + +int rootnextfile() { +#ifdef ARDUINOSD + file=root.openNextFile(); + return (file != 0); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + if (root.next()) { + file=root.openFile("r"); + return 1; + } else { + return 0; + } +#endif +#ifdef ARDUINO_ARCH_ESP32 + file=root.openNextFile(); + return (file != 0); +#endif +#endif +#ifdef RP2040LITTLEFS + file = readdir(root); + return (file != 0); +#endif +#ifdef ARDUINOEFS + file = EFS.readdir(); + return (file != 0); +#endif + return 0; +} + +int rootisfile() { +#ifdef ARDUINOSD + return (! file.isDirectory()); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + return 1; +#endif +#ifdef ARDUINO_ARCH_ESP32 + return (! file.isDirectory()); +#endif +#endif +#ifdef RP2040LITTLEFS + return (file->d_type == DT_REG); +#endif +#ifdef ARDUINOEFS + return 1; +#endif + return 0; +} + +const char* rootfilename() { +#ifdef ARDUINOSD + //return (char*) file.name(); + return rmrootfsprefix(file.name()); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + // c_str() and copy - real ugly + int i=0; + String s=root.fileName(); + for (i=0; id_name); +#endif +#ifdef ARDUINOEFS + return EFS.filename(file); +#endif + return 0; +} + +int rootfilesize() { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) + return file.size(); +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS + return EFS.filesize(file); +#endif + return 0; +} + +void rootfileclose() { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) + file.close(); +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS +#endif +} + +void rootclose(){ +#ifdef ARDUINOSD + root.close(); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + return; +#endif +#ifdef ARDUINO_ARCH_ESP32 + root.close(); +#endif +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS +#endif +} + +/* + * remove method for files + */ +void removefile(char *filename) { +#ifdef ARDUINOSD + SD.remove(mkfilename(filename)); + return; +#endif +#ifdef ESPSPIFFS + SPIFFS.remove(mkfilename(filename)); + return; +#endif +#ifdef RP2040LITTLEFS + remove(mkfilename(filename)); + return; +#endif +#ifdef ARDUINOEFS + EFS.remove(filename); + return; +#endif +} + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(short i) { +#ifdef ARDUINOSD + return; +#endif +#ifdef ESPSPIFFS + if (SPIFFS.format()) { SPIFFS.begin(); outsc("ok\n"); } else { outsc("fail\n"); } +#endif +#ifdef RP2040LITTLEFS + fs.reformat(&bd); + return; +#endif +#ifdef ARDUINOEFS + if (i>0 && i<256) { + if (EFS.format(i)) { EFS.begin(); outsc("ok\n"); } else { outsc("fail\n"); } + outcr(); + } else error(EORANGE); + return; +#endif +} + +/* + * Primary serial code uses the Serial object or Picoserial + * + * The picoseria an own interrupt function. This is used to fill + * the input buffer directly on read. Write is standard like in + * the serial code. + * + * As echoing is done in the interrupt routine, the code cannot be + * used to receive keystrokes from serial and then display the echo + * directly to a display. To do this the write command in picogetchar + * would have to be replaced with a outch() that then redirects to the + * display driver. This would be very tricky from the timing point of + * view if the display driver code is slow. + * + * The code for the UART control is mostly taken from PicoSerial + * https://github.com/gitcnd/PicoSerial, originally written by Chris Drake + * and published under GPL3.0 just like this code + * + */ +#ifdef USESPICOSERIAL +volatile static char picochar; +volatile static char picoa = 0; +volatile static char* picob = NULL; +static short picobsize = 0; +volatile static short picoi = 1; + +/* this is mostly taken from PicoSerial */ +const uint16_t MIN_2X_BAUD = F_CPU/(4*(2*0XFFF + 1)) + 1; + +/* the begin code */ +void picobegin(uint32_t baud) { + uint16_t baud_setting; + cli(); + if ((F_CPU != 16000000UL || baud != 57600) && baud > MIN_2X_BAUD) { + UCSR0A = 1 << U2X0; + baud_setting = (F_CPU / 4 / baud - 1) / 2; + } else { + UCSR0A = 0; + baud_setting = (F_CPU / 8 / baud - 1) / 2; + } +/* assign the baud_setting */ + UBRR0H = baud_setting >> 8; + UBRR0L = baud_setting; +/* enable transmit and receive */ + UCSR0B |= (1 << TXEN0) | (1 << RXEN0) | (1 << RXCIE0); + sei(); +} + +/* the write code, sending bytes directly to the UART */ +void picowrite(char b) { + while (((1 << UDRIE0) & UCSR0B) || !(UCSR0A & (1 << UDRE0))) {} + UDR0 = b; +} + +/* + * picogetchar: this is the interrupt service routine. It + * recieves a character and feeds it into a buffer and echos it + * back. The logic here is that the ins() code sets the buffer + * to the input buffer. Only then the routine starts writing to the + * buffer. Once a newline is received, the length information is set + * and picoa is also set to 1 indicating an available string, this stops + * recevieing bytes until the input is processed by the calling code. + */ +void picogetchar(char c){ + if (picob && (! picoa)) { + picochar=c; + if (picochar != '\n' && picochar != '\r' && picoi1) picoi--; else return; + } else + picob[picoi++]=picochar; + picowrite(picochar); + } else { + picoa = 1; + picob[picoi]=0; + picob[0]=picoi; + z.a=picoi; + picoi=1; + } + picochar=0; /* every buffered byte is deleted */ + } else { + if (c != 10) picochar=c; + } +} + +/* the ins code of picoserial, called like this in consins */ +void picoins(char *b, short nb) { + char c; + picob=b; + picobsize=nb; + picoa=0; +/* once picoa is set, the interrupt routine records characters + * until a cr and then resets picoa to 0 */ + while (!picoa) byield(); + outcr(); + return; + } + +/* on an UART interrupt, the getchar function is called */ +#ifdef USART_RX_vect +ISR(USART_RX_vect) { + char c=UDR0; + picogetchar(c); +} +#else +/* for MEGAs and other with many UARTs */ + ISR(USART0_RX_vect) { + char c=UDR0; + picogetchar(c); +} +#endif +#endif + +/* + * blocking serial single char read for Serial + * unblocking for Picoserial because it is not + * character oriented -> blocking is handled in + * consins instead. + */ +char serialread() { +#ifdef USESPICOSERIAL + char c; + c=picochar; + picochar=0; + return c; +#else + while (!Serial.available()) byield(); + return Serial.read(); +#endif +} + +/* + * serial begin code with a one second delay after start + * this is not needed any more + */ +void serialbegin() { +#ifdef USESPICOSERIAL + picobegin(serial_baudrate); +#else + Serial.begin(serial_baudrate); +#endif + delay(1000); +} + +/* state information on the serial port */ +int serialstat(char c) { + if (c == 0) return 1; + if (c == 1) return serial_baudrate; + return 0; +} + +/* write to a serial stream */ +void serialwrite(char c) { +#ifdef HASMSTAB + if (c > 31) charcount+=1; + if (c == 10) charcount=0; +#endif +#ifdef USESPICOSERIAL + picowrite(c); +#else +/* write never blocks. discard any bytes we can't get rid of */ + Serial.write(c); +/* if (Serial.availableForWrite()>0) Serial.write(c); */ +#endif +} + +/* check on a character, needed for breaking */ +short serialcheckch() { +#ifdef USESPICOSERIAL + return picochar; +#else + if (Serial.available()) return Serial.peek(); else return 0; +#endif +} + +/* avail method, needed for AVAIL() */ +short serialavailable() { +#ifdef USESPICOSERIAL + return picoi; +#else + return Serial.available(); +#endif +} + +/* + * reading from the console with inch or the picoserial callback + * this mixes interpreter levels as inch/outch are used here + * this code needs to go to the main interpreter section after + * thorough rewrite + */ +void consins(char *b, short nb) { + char c; + + z.a = 1; +#ifdef USESPICOSERIAL + if (id == ISERIAL) { + picoins(b, nb); + return; + } +#endif + while(z.a < nb) { + c=inch(); + if (id == ISERIAL || id == IKEYBOARD) outch(c); /* this is local echo */ + if (c == '\r') c=inch(); /* skip carriage return */ + if (c == '\n' || c == -1 || c == 255) { /* terminal character is either newline or EOF */ + break; + } else if (c == 127 || c == 8) { + if (z.a>1) z.a--; + } else { + b[z.a++]=c; + } + } + b[z.a]=0; + z.a--; + b[0]=(unsigned char)z.a; +} + +/* + * Start a secondary serial port for printing and/or networking + * This is either Serial1 on a MEGA or DUE or Nano Every or a SoftwareSerial + * instance + */ +#ifdef ARDUINOPRT +#if !defined(ARDUINO_AVR_MEGA2560) && !defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_AVR_NANO_EVERY) && !defined(ARDUINO_NANO_RP2040_CONNECT) && !defined(ARDUINO_RASPBERRY_PI_PICO) && !defined(ARDUINO_SEEED_XIAO_M0) +#include +const int software_serial_rx = SOFTSERIALRX; +const int software_serial_tx = SOFTSERIALTX; +SoftwareSerial PRTSERIAL(software_serial_rx, software_serial_tx); +#endif + +/* second serial port */ +void prtbegin() { + PRTSERIAL.begin(serial1_baudrate); +} + +/* the open functions are not needed here */ +char prtopen(char* filename, int mode) {} +void prtclose() {} + +int prtstat(char c) { + if (c == 0) return 1; + if (c == 1) return serial1_baudrate; + return 0; +} + +void prtwrite(char c) { + PRTSERIAL.write(c); +} + +char prtread() { + while (!PRTSERIAL.available()) byield(); + return PRTSERIAL.read(); +} + +short prtcheckch() { + if (PRTSERIAL.available()) return PRTSERIAL.peek(); else return 0; +} + +short prtavailable() { + return PRTSERIAL.available(); +} + +void prtset(int s) { + serial1_baudrate=s; + prtbegin(); +} +#endif + + +/* + * The wire code, direct access to wire communication + * in master mode wire_slaveid is the I2C address bound + * to channel &7 and wire_myid is 0 + * in slave mode wire_myid is the devices slave address + * and wire_slaveid is 0 + * ARDUINOWIREBUFFER is the maximum length of meesages the + * underlying library can process. This is 32 for the Wire + * library + */ + +/* this is always here, if Wire is needed by a subsysem */ +#ifdef NEEDSWIRE +/* default begin is as a master + * This doesn't work properly on the ESP32C3 platform + * See https://github.com/espressif/arduino-esp32/issues/6376 + * for more details + */ +void wirebegin() { +#ifndef SDA_PIN + Wire.begin(); +#else + Wire.begin(SDA_PIN, SCL_PIN); +#endif +} +#else +void wirebegin() {} +#endif + +/* this is code needed for the OPEN/CLOSE and wireslave mechanisms */ +#ifdef ARDUINOWIRE +uint8_t wire_slaveid = 0; +uint8_t wire_myid = 0; +#define ARDUINOWIREBUFFER 32 +#ifdef ARDUINOWIRESLAVE +char wirereceivebuffer[ARDUINOWIREBUFFER]; +short wirereceivechars = 0; +char wirerequestbuffer[ARDUINOWIREBUFFER]; +short wirerequestchars = 0; +#endif + +void wireslavebegin(char s) { +#ifndef SDA_PIN + Wire.begin(s); +#else + Wire.begin(SDA_PIN, SCL_PIN, s); +#endif +} + +/* wire status - just checks if wire is compiled */ +int wirestat(char c) { + switch (c) { + case 0: + return 1; +#ifdef ARDUINOWIRESLAVE + case 1: + return wirerequestchars; +#endif + default: + return 0; + } +} + +/* available characters - test code ecapsulation prep for slave*/ +short wireavailable() { +/* as a master we return 1, as a slave the received chars*/ + if (wire_myid == 0) return 1; +#ifdef ARDUINOWIRESLAVE + else return wirereceivechars; +#endif +} + +#ifdef ARDUINOWIRESLAVE +/* event handler for receive */ +void wireonreceive(int h) { + wirereceivechars=h; + if (h>ARDUINOWIREBUFFER) h=ARDUINOWIREBUFFER; + for (int i=0; iARDUINOWIREBUFFER) l=ARDUINOWIREBUFFER; + if (!Wire.requestFrom(wire_slaveid, l)) ert=1; + while (Wire.available() && z.aARDUINOWIREBUFFER) l=ARDUINOWIREBUFFER; + if (wire_myid == 0) { + Wire.beginTransmission(wire_slaveid); +#ifdef ARDUINO_ARCH_ESP32 + for(z.a=0; z.a +#include +rf24_pa_dbm_e rf24_pa = RF24_PA_MAX; +RF24 radio(rf24_ce, rf24_csn); + +/* radio status */ +int radiostat(char c) { +#if defined(ARDUINORF24) + if (c == 0) return 1; + if (c == 1) return radio.isChipConnected(); +#endif + return 0; +} + +/* generate a uint64_t pipe address from the filename string for RF24 */ +uint64_t pipeaddr(char * f){ + uint64_t t = 0; + t=(uint8_t)f[0]; + for(short i=1; i<=4; i++) t=t*256+(uint8_t)f[i]; + return t; +} +#endif + +/* read an entire string */ +void radioins(char *b, short nb) { +#ifdef ARDUINORF24 + if (radio.available()) { + radio.read(b+1, nb); + if (!blockmode) { + for (z.a=0; z.a nb) z.a=nb; + } + b[0]=z.a; + } else { + b[0]=0; + b[1]=0; + z.a=0; + } +#else + b[0]=0; + b[1]=0; + z.a=0; +#endif +} + +/* write to radio, no character mode here */ +void radioouts(char *b, short l) { +#ifdef ARDUINORF24 + radio.stopListening(); + if (!radio.write(b, l)) ert=1; + radio.startListening(); +#endif +} + +/* radio available */ +short radioavailable() { +#ifdef ARDUINORF24 + return radio.available(); +#endif + return 0; +} + +/* + * we always read from pipe 1 and use pipe 0 for writing, + * the filename is the pipe address, by default the radio + * goes to reading mode after open and is only stopped for + * write + */ +void iradioopen(char *filename) { +#ifdef ARDUINORF24 + if (!radio.begin()) ert=1; + radio.openReadingPipe(1, pipeaddr(filename)); + radio.startListening(); +#endif +} + +void oradioopen(char *filename) { +#ifdef ARDUINORF24 + if (!radio.begin()) ert=1; + radio.openWritingPipe(pipeaddr(filename)); +#endif +} + +void radioset(int s) { +#ifdef ARDUINORF24 + if ((s<0) && (s>3)) {error(EORANGE); return; } + rf24_pa=(rf24_pa_dbm_e) s; + radio.setPALevel(rf24_pa); +#endif +} + + +/* + * Arduino Sensor library code + * The sensorread() is a generic function called by + * SENSOR basic function and command. The first argument + * is the sensor and the second argument the value. + * sensorread(n, 0) checks if the sensorstatus. + */ +#ifdef ARDUINOSENSORS +#ifdef ARDUINODHT +#include "DHT.h" +DHT dht(DHTPIN, DHTTYPE); +#endif +#ifdef ARDUINOSHT +#include +SHT3x SHT; +#endif +#ifdef ARDUINOMQ2 +#include +MQ2 mq2(MQ2PIN); +#endif +#ifdef ARDUINOLMS6 +#include +/* https://www.arduino.cc/en/Reference/Arduino_LSM6DSOX */ +#endif +#ifdef ARDUINOAHT +#include +Adafruit_AHTX0 aht; +#endif +#ifdef ARDUINOBMP280 +#include +Adafruit_BMP280 bmp; +#endif +#ifdef ARDUINOBME280 +#include +Adafruit_BME280 bme; +/* add your own code here */ +#endif + + +void sensorbegin(){ +#ifdef ARDUINODHT +dht.begin(); +#endif +#ifdef ARDUINOSHT + SHT.Begin(); +#endif +#ifdef ARDUINOMQ2 + mq2.begin(); +#endif +#ifdef ARDUINOAHT + aht.begin(); +#endif +#ifdef ARDUINOBMP280 + bmp.begin(); + bmp.setSampling(Adafruit_BMP280::MODE_NORMAL, /* Operating Mode. */ + Adafruit_BMP280::SAMPLING_X2, /* Temp. oversampling */ + Adafruit_BMP280::SAMPLING_X16, /* Pressure oversampling */ + Adafruit_BMP280::FILTER_X16, /* Filtering. */ + Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */ +#endif +#ifdef ARDUINOBME280 + bme.begin(); +#endif +} + +number_t sensorread(short s, short v) { + switch (s) { + case 0: + return analogRead(A0+v); + case 1: +#ifdef ARDUINODHT + switch (v) { + case 0: + return 1; + case 1: + return dht.readHumidity(); + case 2: + return dht.readTemperature(); + } +#endif + return 0; + case 2: +#ifdef ARDUINOSHT + switch (v) { + case 0: + return 1; + case 1: + SHT.UpdateData(); + return SHT.GetRelHumidity(); + case 2: + SHT.UpdateData(); + return SHT.GetTemperature(); + } +#endif + return 0; + case 3: +#ifdef ARDUINOMQ2 + switch (v) { + case 0: + return 1; + case 1: + (void) mq2.read(false); + return mq2.readLPG();; + case 2: + (void) mq2.read(false); + return mq2.readCO(); + case 3: + (void) mq2.read(false); + return mq2.readSmoke(); + } +#endif + return 0; + case 4: +#ifdef ARDUINOAHT + sensors_event_t humidity, temp; + switch (v) { + case 0: + return 1; + case 1: + aht.getEvent(&humidity, &temp); + return temp.temperature; + case 2: + aht.getEvent(&humidity, &temp); + return humidity.relative_humidity; + } +#endif + return 0; + case 5: +#ifdef ARDUINOBMP280 + switch (v) { + case 0: + return 1; + case 1: + return bmp.readTemperature(); + case 2: + return bmp.readPressure() / 100.0; + case 3: + return bmp.readAltitude(1013.25); + } +#endif + return 0; + case 6: +#ifdef ARDUINOBME280 + switch (v) { + case 0: + return 1; + case 1: + return bme.readTemperature(); + case 2: + return bme.readPressure() / 100.0; + case 3: + return bme.readAltitude(1013.25); + case 4: + return bme.readHumidity(); + } +#endif +/* add your own sensor code here */ + return 0; + default: + return 0; + } +} + +#else +void sensorbegin() {} +number_t sensorread(short s, short v) {return 0;}; +#endif + + +/* + * Experimental code to drive SPI SRAM + * + * Currently only the 23LCV512 is implemented, assuming a + * 64kB SRAM + * The code below is taken in part from the SRAMsimple library + * + * two buffers are implemented: + * - a ro buffer used by memread, this buffer is mainly reading the token + * stream at runtime. + * - a rw buffer used by memread2 and memwrite2, this buffer is mainly accessing + * the heap at runtime. In interactive mode this is also the interface to read + * and write program code to memory + * + */ + +#ifdef ARDUINOSPIRAM +#define USEMEMINTERFACE +#define SPIRAMINTERFACE + +/* + * we use the standard slave select pin as default + * RAMPIN + */ +#ifndef RAMPIN +#define RAMPIN SS +#endif + +#define SPIRAMWRMR 1 +#define SPIRAMRDMR 5 +#define SPIRAMREAD 3 +#define SPIRAMWRITE 2 +#define SPIRAMRSTIO 0xFF +#define SPIRAMSEQ 0x40 +#define SPIRAMBYTE 0x00 + +/* the RAM begin method sets the RAM to sequential mode */ +address_t spirambegin() { + pinMode(RAMPIN, OUTPUT); + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMRSTIO); + SPI.transfer(SPIRAMWRMR); + //SPI.transfer(SPIRAMBYTE); + SPI.transfer(SPIRAMSEQ); + digitalWrite(RAMPIN, HIGH); + /* only 32 kB addressable with 16 bit integers because address_t has to fit into number_t + the interpreter would work also with 64kB but PEEK, POKE and the DARKARTS are broken then*/ + if (maxnum>32767) return 65534; else return 32766; +} + +/* the simple unbuffered byte read, with a cast to signed char */ +mem_t spiramrawread(address_t a) { + mem_t c; + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMREAD); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + c = SPI.transfer(0x00); + digitalWrite(RAMPIN, HIGH); + return c; +} + +/* one read only buffer for access from the token stream + memread calls this */ +address_t spiram_robufferaddr = 0; +mem_t spiram_robuffervalid=0; +const address_t spiram_robuffersize = 32; +mem_t spiram_robuffer[spiram_robuffersize]; + +/* one rw buffer for access to the heap and all the program editing + memread2 and memwrite2 call this*/ +address_t spiram_rwbufferaddr = 0; +mem_t spiram_rwbuffervalid=0; +const address_t spiram_rwbuffersize = 32; /* also change the addressmask if you want to play here */ +mem_t spiram_rwbuffer[spiram_rwbuffersize]; +mem_t spiram_rwbufferclean = 1; + +const address_t spiram_addrmask=0xffe0; +/* const address_t spiram_addrmask=0xffd0; // 64 byte frame */ + +/* the elementary buffer access functions used almost everywhere */ + +void spiram_bufferread(address_t a, mem_t* b, address_t l) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMREAD); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer(b, l); + digitalWrite(RAMPIN, HIGH); +} + +void spiram_bufferwrite(address_t a, mem_t* b, address_t l) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMWRITE); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer(b, l); + digitalWrite(RAMPIN, HIGH); +} + +mem_t spiram_robufferread(address_t a) { +/* we address a byte known to the rw buffer, then get it from there */ + if (spiram_rwbuffervalid && ((a & spiram_addrmask) == spiram_rwbufferaddr)) { + return spiram_rwbuffer[a-spiram_rwbufferaddr]; + } + +/* page fault, we dont have the byte in the ro buffer, so read from the chip*/ + if (!spiram_robuffervalid || a >= spiram_robufferaddr + spiram_robuffersize || a < spiram_robufferaddr ) { + spiram_bufferread(a, spiram_robuffer, spiram_robuffersize); + spiram_robufferaddr=a; + spiram_robuffervalid=1; + } + return spiram_robuffer[a-spiram_robufferaddr]; +} + +/* flush the buffer */ +void spiram_rwbufferflush() { + if (!spiram_rwbufferclean) { + spiram_bufferwrite(spiram_rwbufferaddr, spiram_rwbuffer, spiram_rwbuffersize); + spiram_rwbufferclean=1; + } +} + +mem_t spiram_rwbufferread(address_t a) { +/* page fault, do read, ignore the ro buffer buffer */ + address_t p=a & spiram_addrmask; + if (!spiram_rwbuffervalid || (p != spiram_rwbufferaddr)) { +/* flush the buffer if needed */ + spiram_rwbufferflush(); +/* and reload it */ + spiram_bufferread(p, spiram_rwbuffer, spiram_rwbuffersize); + spiram_rwbufferaddr = p; /* we only handle full pages here */ + spiram_rwbuffervalid=1; + } + return spiram_rwbuffer[a-spiram_rwbufferaddr]; +} + +/* the buffered file write */ +void spiram_rwbufferwrite(address_t a, mem_t c) { + address_t p=a&spiram_addrmask; +/* correct the two buffers if needed */ + if (spiram_robuffervalid && a >= spiram_robufferaddr && a < spiram_robufferaddr + spiram_robuffersize) { + spiram_robuffer[a-spiram_robufferaddr]=c; + } +/* if we have the frame, write it, mark the buffer dirty and return */ + if (spiram_rwbuffervalid && p == spiram_rwbufferaddr) { + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; + spiram_rwbufferclean=0; + return; + } +/* if we end up here the write was impossible because we dont have the frame, so flush and then get it */ + spiram_rwbufferflush(); + (void) spiram_rwbufferread(a); + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; + spiram_rwbufferclean=0; +} + +/* the simple unbuffered byte write, with a cast to signed char */ +void spiramrawwrite(address_t a, mem_t c) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMWRITE); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer((byte) c); + digitalWrite(RAMPIN, HIGH); +/* also refresh the ro buffer if in the frame */ + if (a >= spiram_robufferaddr && a < spiram_robufferaddr + spiram_robuffersize && spiram_robufferaddr > 0) + spiram_robuffer[a-spiram_robufferaddr]=c; +/* and the rw buffer if needed) */ + if (a >= spiram_rwbufferaddr && a < spiram_rwbufferaddr + spiram_rwbuffersize && spiram_rwbufferaddr > 0) + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; +} +#endif + + +/* the code to address EEPROMs directly */ +#ifdef ARDUINOPGMEEPROM +#define USEMEMINTERFACE +#define EEPROMMEMINTERFACE +#else +#undef EEPROMMEMINTERFACE +#endif + + +#if defined(USEMEMINTERFACE) +/* + * to handle strings in situations with a memory interface two more buffers are + * needed they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set + * + * default is 128, on an MEGA 512 is possible + */ +#ifdef ARDUINO_AVR_MEGA2560 +#define SPIRAMSBSIZE 512 +#else +#define SPIRAMSBSIZE 128 +#endif + +/* the string buffers of the memory interface */ +char spistrbuf1[SPIRAMSBSIZE]; +char spistrbuf2[SPIRAMSBSIZE]; +#endif + +// defined HARDWARE_H +#endif diff --git a/data/Basic1/TinybasicArduino/TinybasicArduino.ino b/data/Basic1/TinybasicArduino/TinybasicArduino.ino new file mode 100644 index 0000000000000000000000000000000000000000..a2749b63b55b4bf9df57ecdaf776dd03d532ad84 --- /dev/null +++ b/data/Basic1/TinybasicArduino/TinybasicArduino.ino @@ -0,0 +1,8399 @@ +/* + * + * $Id: basic.c,v 1.144 2023/07/16 14:17:08 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * The first set of definions define the target. + * - MINGW switches on Windows calls - this is the mingw.org version + * _ MINGW64 like MINGW but with the mingw 64 support + * - MSDOS for MSDOS file access. + * - MAC doesn't need more settings here + * - RASPPI activates wiring code + * - Review hardware-*.h for settings specific Arduino hardware settings + * - HAS* activates or deactives features of the interpreter + * - the extension flags control features and code size + * + * MEMSIZE sets the BASIC main memory to a fixed value, + * if MEMSIZE=0 a heuristic is used based on free heap + * size and architecture parameters + * + * USEMEMINTERFACE controls the way memory is accessed. Don't change + * this here. It is a parameter set by hardware-arduino.h. + * This feature is experimental. + * + */ +#undef MINGW +#undef MSDOS +#undef RASPPI + +/* + interpreter feature sets, choose one of the predefines + or undefine all predefines and set the features in custom settings +*/ + +/* + * BASICFULL: full language set, use this with flash >32kB - ESPs, MKRs, Mega2560, RP2040, UNO R4 + * BASICINTEGER: integer BASIC with full language, use this with flash >32kB + * BASICSIMPLE: integer BASIC with reduced language set, 32kB capable - for UNOs with a lot of device drivers + * BASICSIMPLEWITHFLOAT: a small floating point BASIC, 32kB capable, for UNOs - good for UNOs with the need of float + * BASICTINYWITHFLOAT: a floating point tinybasic, if you have 32kB and need complex device drivers + * BASICMINIMAL: minimal language, just Palo Alto plus Arduino I/O, works on 168 with 1kB RAM and 16kB flash + */ +#undef BASICFULL +#undef BASICINTEGER +#define BASICSIMPLE +#undef BASICMINIMAL +#undef BASICSIMPLEWITHFLOAT +#undef BASICTINYWITHFLOAT + +/* + * custom settings undef all the the language sets + * when you def here + */ +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASMSTAB +#define HASARRAYLIMIT +#define HASSTRUCT + +/* Palo Alto plus Arduino functions */ +#ifdef BASICMINIMAL +#undef HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#undef HASSTEFANSEXT +#undef HASERRORMSG +#undef HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* all features minus float and tone */ +#ifdef BASICINTEGER +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASMSTAB +#define HASARRAYLIMIT +#define HASSTRUCT +#endif + +/* a simple integer basic for small systems (UNO etc) */ +#ifdef BASICSIMPLE +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#define HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* all features activated */ +#ifdef BASICFULL +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASMSTAB +#define HASARRAYLIMIT +#define HASSTRUCT +#endif + +/* a simple BASIC with float support */ +#ifdef BASICSIMPLEWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* a Tinybasic with float support */ +#ifdef BASICTINYWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* + * hardcoded memory size, set 0 for automatic malloc, don't redefine this beyond this point + */ +#define MEMSIZE 0 + +/* debug mode switch, set to 1 for hard debug mode with many messages */ +#define DEBUG 0 + +/* + * Language feature dependencies + * + * Dartmouth and darkarts needs the heap which is in Apple 1 + * IoT needs strings and the heap, also Apple 1 + * + * String arrays need multi dimensional capabilities + * + * The structured language set needs ELSE from STEFANSEXT + * + */ +#if defined(HASDARTMOUTH) || defined(HASDARKARTS) || defined(HASIOT) +#define HASAPPLE1 +#endif + +#if defined(HASSTRINGARRAYS) +#define HASMULTIDIM +#endif + +#ifdef HASSTRUCT +#define HASSTEFANSEXT +#endif + +/* + * if there are many commands we need the token extension i.e. 2 byte tokens + * #undef HASLONGTOKENS + * this is normally done in basic.h where the tokens are set + */ + + +/* + * the core basic language headers including some Arduino device stuff + */ +#include "basic.h" + +/* + * Hardware dependend definitions code are isolated in hardware-*.h + * Currently there are two versions + * hardware-arduino.h contains all platforms compiled in the Arduino IDE + * (ESP8266, ESP32, AVR, MEGAAVR, SAM*, RP2040) + * hardware-posix.h contains all platforms compiled in gcc with a POSIX OS + * (Mac, Raspberry, Windows/MINGW) plus rudimentary MSDOS with tc2.0. The + * latter will be removed soon. + */ +#ifdef ARDUINO +#include "hardware-arduino.h" +#else +#include "hardware-posix.h" +#endif + +/* + * + * BASIC timer stuff, this is a core interpreter function now + * + */ + +/* + * the byield function is called after every statement + * it allows four levels of background tasks. + * + * fastticker() is used to trigger all fast timing functions of + * the core interpreter. It can also be used to implement a + * "tone without timer solution" + * + * yieldfunction() triggers a 32ms timer which calls network + * and USB handling functions + * + * longyielfunction() is a 1s timer for long termin maintance + * functions + * + * yieldscheduler() is the hardware scheduler of some platforms + * + */ + +void byield() { + +/* the fast ticker for all fast timing functions */ + fastticker(); + +/* the loop function for non BASIC stuff */ + bloop(); + +#if defined(BASICBGTASK) +/* yield all 32 milliseconds */ + if (millis()-lastyield > YIELDINTERVAL-1) { + yieldfunction(); + lastyield=millis(); + } + +/* yield every second */ + if (millis()-lastlongyield > LONGYIELDINTERVAL-1) { + longyieldfunction(); + lastlongyield=millis(); + } + #endif + + /* call the background task scheduler on some platforms implemented in hardware-* */ + yieldschedule(); +} + +/* delay must be implemented to use byield() while waiting */ +void bdelay(unsigned long t) { + unsigned long i; + if (t>0) { + i=millis(); + while (millis() < i+t) byield(); + } +} + +/* fastticker is the hook for all timing functions */ +void fastticker() { +/* fastticker profiling test code */ +#ifdef FASTTICKERPROFILE + fasttickerprofile(); +#endif +/* toggle the tone pin */ +#ifdef ARDUINOTONEEMULATION + tonetoggle(); +#endif +} + +/* the millis function for BASIC */ +void bmillis() { + number_t m; +/* millis is processed as integer and is cyclic mod maxnumber and not cast to float!! */ + m=(number_t) (millis()/(unsigned long)pop() % (unsigned long)maxnum); + push(m); +} + +/* + * Determine the possible basic memory size. + * using malloc causes some overhead which can be relevant on the smaller + * boards. set MEMSIZE instead to a static value. In this case ballocmem + * just returns the static MEMSIZE. + * + * if SPIRAMINTERFACE is defined, we use the memory from a serial RAM and dont + * allocate it here at all. + * + */ +#if MEMSIZE == 0 && !(defined(SPIRAMINTERFACE)) +address_t ballocmem() { + +/* on most platforms we know the free memory for BASIC */ + long m=freememorysize(); + +/* we allocate as much as address_t can handle */ + if (m>maxaddr) m=maxaddr; + +/* try to allocate the memory */ + mem=(mem_t*)malloc(m); + if (mem != 0) return m-1; + +/* fallback if allocation failed, 128 bytes */ + mem=(mem_t*)malloc(128); + if (mem != 0) return 128; else return 0; + +} +#else +address_t ballocmem(){ return MEMSIZE-1; }; +#endif + +/* + * Layer 0 function - variable handling. + * + * These function access variables and data + */ + +/* + * eeprom load / save / autorun functions + * needed for SAVE and LOAD to an EEPROM + * autorun is generic + */ + +/* save a file to EEPROM, disabled if we use the EEPROM directly */ +void esave() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + + if (top+eheadersize < elength()) { + a=0; + /* EEPROM per default is 255, 0 indicates that there is a program */ + eupdate(a++, 0); + + /* store the size of the program in byte 1,2,... of the EEPROM*/ + z.a=top; + esetnumber(a, addrsize); + a+=addrsize; + + while (a < top+eheadersize){ + eupdate(a, memread2(a-eheadersize)); + a++; + } + eupdate(a++,0); + } else { + error(EOUTOFMEMORY); + er=0; + } +/* needed on I2C EEPROM and other platforms where we buffer */ + eflush(); +#endif +} + +/* load a file from EEPROM, disabled if the use the EEPROM directly */ +void eload() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + if (elength()>0 && (eread(a) == 0 || eread(a) == 1)) { + /* have we stored a program */ + a++; + + /* how long is it? */ + egetnumber(a, addrsize); + top=z.a; + a+=addrsize; + + while (a < top+eheadersize){ + memwrite2(a-eheadersize, eread(a)); + a++; + } + } else { + /* no valid program data is stored */ + error(EEEPROM); + } +#endif +} + +/* autorun something from EEPROM or a filesystem */ +char autorun() { +#if defined(ARDUINOEEPROM) || defined(ARDUINOI2CEEPROM) || ! defined(ARDUINO) + if (eread(0) == 1){ /* autorun from the EEPROM */ + egetnumber(1, addrsize); + top=z.a; + st=SERUN; + return 1; /* EEPROM autorun overrules filesystem autorun */ + } +#endif +#if defined(FILESYSTEMDRIVER) || !defined(ARDUINO) +/* on a POSIX or DOS platform, we check the command line first and the autoexec */ +#ifndef ARDUINO + if (bargc > 0) { + if (ifileopen(bargv[1])) { + xload(bargv[1]); + st=SRUN; + ifileclose(); + bnointafterrun=TERMINATEAFTERRUN; + return 1; + } + } +#endif + if (ifileopen("autoexec.bas")) { + xload("autoexec.bas"); + st=SRUN; + ifileclose(); + return 1; + } +#endif + return 0; +} + +#ifdef HASAPPLE1 +/* + * bmalloc() allocates a junk of memory for a variable on the + * heap, every objects is identified by name (c,d) and type t + * 3 bytes are used here. + */ +address_t bmalloc(mem_t t, mem_t c, mem_t d, address_t l) { + address_t vsize; /* the length of the header on the heap*/ + address_t b; + + if (DEBUG) { outsc("** bmalloc with token "); outnumber(t); outcr(); } + + /* check if the object already exists */ + if (bfind(t, c, d) != 0 ) { error(EVARIABLE); return 0; }; + +/* + * how much space is needed + * 3 bytes for the token and the 2 name characters + * numsize for every number including array length + * one byte for every string character + */ + switch(t) { + case VARIABLE: + vsize=numsize+3; + break; +#ifndef HASMULTIDIM + case ARRAYVAR: + vsize=numsize*l+addrsize+3; + break; +#else +/* multidim implementation for n=2 */ + case ARRAYVAR: + vsize=numsize*l+addrsize*2+3; + break; +#endif +#ifdef HASDARTMOUTH + case TFN: + vsize=addrsize+2+3; + break; +#endif + default: + vsize=l+addrsize+3; + } + +/* enough memory ?, on an EEPROM system we limit the heap to the RAM */ +#ifndef EEPROMMEMINTERFACE + if ((himem-top) < vsize) { error(EOUTOFMEMORY); return 0;} +#else + if (himem-(elength()-eheadersize) < vsize) { error(EOUTOFMEMORY); return 0;} +#endif + +/* store the name of the objects (2 chars) plus the type (1 char) as identifier */ + b=himem; + + memwrite2(b--, c); + memwrite2(b--, d); + memwrite2(b--, t); + + +/* for strings, arrays and buffers write the (maximum) length + directly after the header */ + if (t == ARRAYVAR || t == STRINGVAR || t == TBUFFER) { + b=b-addrsize+1; + z.a=vsize-(addrsize+3); + setnumber(b, addrsize); + b--; + } + +/* remark on multidim, the byte length is after the header and the following + address_t bytes are then reserved for the first dimension */ + +/* reserve space for the payload */ + himem-=vsize; + nvars++; + + return himem+1; +} + +/* + * bfind() passes back the location of the object as result + * the length of the object is in z.a as a side effect + * rememers the last search + * + */ +address_t bfind(mem_t t, mem_t c, mem_t d) { + address_t b = memsize; + mem_t t1; + mem_t c1, d1; + address_t i=0; + +/* the bfind cache, did we ask for that object before? - + needed to make the string code efficient */ + if (t == bfindt && c == bfindc && d == bfindd) { + z.a=bfindz; + return bfinda; + } + + +/* walk through the heap now */ + while (i < nvars) { + + c1=memread2(b--); + d1=memread2(b--); + t1=memread2(b--); + + switch(t1) { + case VARIABLE: + z.a=numsize; + break; + case TFN: + z.a=addrsize+2; + break; + default: + b=b-addrsize+1; + getnumber(b, addrsize); + b--; + } + + b-=z.a; + +/* once we found we cache and return the location */ + if (c1 == c && d1 == d && t1 == t) { + bfindc=c; + bfindd=d; + bfindt=t; + bfindz=z.a; + bfinda=b+1; + return b+1; + } + i++; + } + + return 0; +} + +/* finds an object and deletes the heap from this object on + including the object itself */ +address_t bfree(mem_t t, mem_t c, mem_t d) { + address_t b = memsize; + mem_t t1; + mem_t c1, d1; + address_t i=0; + + if (DEBUG) { outsc("*** bfree called for "); outch(c); outch(d); outsc(" on heap with token "); outnumber(t); outcr(); } + +/* walk through the heap to find the location */ + while (i < nvars) { + + c1=memread2(b--); + d1=memread2(b--); + t1=memread2(b--); + +/* found it */ + if (t == t1 && c == c1 && d == d1) { + +/* set the number of variables to the new value */ + nvars=i; + if (DEBUG) { outsc("*** bfree setting nvars to "); outnumber(nvars); outcr(); } + +/* clean up - this is somehow optional, one could drop this */ + if (DEBUG) { outsc("*** bfree clearing "); outnumber(himem); outspc(); outnumber(b+3); outcr(); } + for (i=himem; i<=b+3; i++) memwrite2(i, 0); + +/* now set the memory to the right address */ + himem=b+3; + +/* forget the chache, because heap structure has changed !! */ + bfindc=0; + bfindd=0; + bfindt=0; + bfindz=0; + bfinda=0; + + return himem; + } + + switch(t1) { + case VARIABLE: + z.a=numsize; + break; +#ifdef HASDARTMOUTH + case TFN: + z.a=addrsize+2; + break; +#endif + default: + b=b-addrsize+1; + getnumber(b, addrsize); + b--; + } + + b-=z.a; + i++; + } + return 0; +} + +/* the length of an object */ +address_t blength (mem_t t, mem_t c, mem_t d) { + if (bfind(t, c, d)) return z.a; else return 0; +} +#endif + +/* get and create a variable */ +number_t getvar(mem_t c, mem_t d){ + address_t a; + + if (DEBUG) { outsc("* getvar "); outch(c); outch(d); outspc(); outcr(); } + +/* the static variable array */ + if (c >= 65 && c <= 91 && d == 0) return vars[c-65]; + +/* the special variables */ + if ( c == '@' ) + switch (d) { + case 'A': + return availch(); + case 'S': + return ert; + case 'I': + return id; + case 'O': + return od; + case 'C': + if (availch()) return inch(); else return 0; + case 'E': + return elength()/numsize; + case 0: + return (himem-top)/numsize; + case 'R': + return rd; + case 'U': + return getusrvar(); +#ifdef HASIOT + case 'V': + return vlength; +#endif +#if defined(DISPLAYDRIVER) || defined (GRAPHDISPLAYDRIVER) + case 'X': + return dspgetcursorx(); + case 'Y': + return dspgetcursory(); +#endif + } + +#ifdef HASAPPLE1 +/* dynamically allocated vars, create them on the fly if needed */ + if (!(a=bfind(VARIABLE, c, d))) a=bmalloc(VARIABLE, c, d, 0); + if (er != 0) return 0; + +/* retrieve the value */ + getnumber(a, numsize); + return z.i; + +#else +/* systems without Apple1 extension i.e. HEAP throw an error */ + error(EVARIABLE); + return 0; +#endif +} + +/* set and create a variable */ +void setvar(mem_t c, mem_t d, number_t v){ + address_t a; + + if (DEBUG) { outsc("* setvar "); outch(c); outch(d); outspc(); outnumber(v); outcr(); } + +/* the static variable array */ + if (c >= 65 && c <= 91 && d == 0) { + vars[c-65]=v; + return; + } + +/* the special variables */ + if ( c == '@' ) + switch (d) { + case 'S': + ert=v; + return; + case 'I': + id=v; + return; + case 'O': + od=v; + return; + case 'C': + outch(v); + return; + case 'R': + rd=v; + return; + case 'U': + setusrvar(v); + return; +#ifdef HASIOT + case 'V': + return; +#endif +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case 'X': + dspsetcursorx((int)v); +/* set the charcount, this is half broken but works */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=v; +#endif + return; + case 'Y': + dspsetcursory((int)v); + return; +#endif + } + +#ifdef HASAPPLE1 +/* dynamically allocated vars */ + if (!(a=bfind(VARIABLE, c, d))) a=bmalloc(VARIABLE, c, d, 0); + if (er != 0) return; + +/* set the value */ + z.i=v; + setnumber(a, numsize); +#else + error(EVARIABLE); +#endif +} + +/* clr all variables */ +void clrvars() { + address_t i; + +/* delete all statics */ + for (i=0; i= dim + arraylimit) || (i < arraylimit) || (i >= h/dim + arraylimit)) { error(EORANGE); return; } +#else + if (DEBUG) { outsc("** in array "); outnumber(i); outspc(); outnumber(a); outcr(); } + if ( (i < arraylimit) || (i >= h + arraylimit) ) { error(EORANGE); return; } +#endif + +/* set or get the array */ + if (m == 'g') { + if (! e) { + getnumber(a, numsize); + } else { + egetnumber(a, numsize); + } + *v=z.i; + } else if ( m == 's') { + z.i=*v; + if (! e) { setnumber(a, numsize); } else { esetnumber(a, numsize); } + } +} + +/* create a string on the heap, i is the length of the string, j the dimension of the array */ +address_t createstring(char c, char d, address_t i, address_t j) { +#ifdef HASAPPLE1 + address_t a, zt; + + if (DEBUG) { outsc("Create string "); outch(c); outch(d); outspc(); outnumber(nvars); outcr(); } + +#ifndef HASSTRINGARRAYS +/* if no string arrays are in the code, we reserve the number of bytes i and space for the index */ + if (bfind(STRINGVAR, c, d)) error(EVARIABLE); else a=bmalloc(STRINGVAR, c, d, i+strindexsize); + if (er != 0) return 0; + return a; +#else +/* string arrays need the number of array elements which address_ hence addresize bytes and then + the space for j strings */ + if (bfind(STRINGVAR, c, d)) error(EVARIABLE); else a=bmalloc(STRINGVAR, c, d, addrsize+j*(i+strindexsize)); + if (er != 0) return 0; + +/* preserve z.a, this is a side effect of bmalloc and bfind */ + zt=z.a; + +/* set the dimension of the array */ + z.a=j; + setnumber(a+j*(i+strindexsize), addrsize); + z.a=zt; + + return a; +#endif + if (er != 0) return 0; + return a; +#else + return 0; +#endif +} + + +/* get a string at position b, the -1+stringdexsize is needed because a string index starts with 1 + * in addition to the memory pointer, return the address in memory. + * We use a pointer to memory here instead of going through the mem interface with an integer variable + * This makes string code lean to compile but is awkward for systems with serial memory + * + * The code may look like doing multiple heap scans for just one string as stringdim and lenstring are + * called here which causes bfind to called multiple time. This is harmless as bfind caches the last + * heap address. + * + * Getstring returns a pointer to the first string element in question. + * + * There are two side effects of getstring + * - ax has the address in memory of the string, if the string is on heap. 0 otherwise. + * - z.a has the number of bytes in the string payload area inculding the string length counter + */ + +char* getstring(char c, char d, address_t b, address_t j) { + address_t k, zt, dim, maxlen; + + ax=0; + if (DEBUG) { outsc("* get string var "); outch(c); outch(d); outspc(); outnumber(b); outcr(); } + +/* direct access to the input buffer - deprectated but still there */ + if ( c == '@' && d == 0) { + return ibuffer+b; + } + +#ifdef HASAPPLE1 +/* special strings */ + +/* the time string */ +#if defined(HASCLOCK) + if ( c == '@' && d == 'T') { + rtcmkstr(); + return rtcstring+1+b; + } +#endif + +/* a user definable special string in sbuffer, makeusrtring is a + user definable function */ + if ( c == '@' && d == 'U' ) { + makeusrstring(); + return sbuffer+b; + } + + +/* the arguments string on POSIX systems */ +#ifndef ARDUINO + if ( c == '@' && d == 'A' ) { + if (bargc > 2) return bargv[2]; else return 0; + } +#endif + + if ( c == '@') { error(EVARIABLE); return 0;} + +/* dynamically allocated strings, create on the fly */ + if (!(ax=bfind(STRINGVAR, c, d))) ax=createstring(c, d, STRSIZEDEF, 1); + + if (DEBUG) { + outsc("** heap address "); outnumber(ax); outcr(); + outsc("** byte length "); outnumber(z.a); outcr(); + } + + if (er != 0) return 0; + +#ifndef HASSTRINGARRAYS + + if ((b < 1) || (b > z.a-strindexsize )) { + error(EORANGE); return 0; + } + + ax=ax+strindexsize+(b-1); + +#else + +/* the dimension of the string array */ + + zt=z.a; + getnumber(ax+z.a-addrsize, addrsize); + dim=z.a; + + if ((j < arraylimit) || (j >= dim + arraylimit )) { + error(EORANGE); return 0; + } + + if (DEBUG) { outsc("** string dimension "); outnumber(dim); outcr(); } + +/* the max length of a string */ + maxlen=(zt-addrsize)/dim-strindexsize; + + if ((b < 1) || (b > maxlen )) { + error(EORANGE); return 0; + } + + if (DEBUG) { outsc("** maximum string length "); outnumber(maxlen); outcr(); } + +/* the base address of a string */ + ax=ax+(j-arraylimit)*(maxlen + strindexsize); + + if (DEBUG) { outsc("** string base address "); outnumber(ax); outcr(); } + +/* get the actual length */ +/* getnumber(ax, strindexsize); */ + +/* the address */ + ax=ax+b-1+strindexsize; + +/* leave the string data record length in z.a */ + z.a=maxlen+strindexsize; +#endif + + if (DEBUG) { outsc("** payload address address "); outnumber(ax); outcr(); } + +/* return value is 0 if we have no direct memory access, the caller needs to handle the string + through the mem address, we return no pointer but provide a copy of the string in the first + string buffer*/ +#ifdef USEMEMINTERFACE + for (k=0; k 2) while(a < SBUFSIZE && bargv[2][a] != 0) a++; + return a; + } +#endif + +/* locate the string */ + a=bfind(STRINGVAR, c, d); + if (er != 0) return 0; + +/* string does not yet exist, return length 0 */ + if (a == 0) return 0; + +/* get the string length from memory */ +#ifndef HASSTRINGARRAYS + getnumber(a, strindexsize); + return z.a; +#else + a=a+(stringdim(c, d)+strindexsize)*(j-arraylimit); + getnumber(a, strindexsize); + return z.a; +#endif +} + +/* set the length of a string */ +void setstringlength(char c, char d, address_t l, address_t j) { + address_t a, zt; + + if (DEBUG) { + outsc("** setstringlength "); + outch(c); outch(d); + outspc(); outnumber(l); outspc(); outnumber(j); + outcr(); + } + + if (c == '@') { + *ibuffer=l; + return; + } + +/* find the variable address */ + a=bfind(STRINGVAR, c, d); + if (er != 0) return; + + if (a == 0) { + error(EVARIABLE); + return; + } + +/* multiple calls of bfind here is harmless as bfind caches */ + a=a+(stringdim(c, d)+strindexsize)*(j-arraylimit); + + if (DEBUG) { outsc("** setstringlength writing to "); outnumber(a); outsc(" value "); outnumber(l); outcr(); } + + z.a=l; + setnumber(a, strindexsize); +} + +#endif + +/* the BASIC string mechanism for real time clocks, create a string with the clock data */ +#ifdef HASCLOCK +char* rtcmkstr() { + int cc = 2; + int t; + char ch; + +/* hours */ + t=rtcget(2); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* minutes */ + t=rtcget(1); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* seconds */ + t=rtcget(0); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='-'; + +/* days */ + t=rtcget(4); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* months */ + t=rtcget(5); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* years */ + t=rtcget(6)%100; /* only 100 years no 19xx epochs */ + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc]=0; + +/* needed for BASIC strings, reserve the first byte for two byte length handling in the upstream code */ + rtcstring[1]=cc-2; + rtcstring[0]=0; + return rtcstring+1; +} +#endif + +/* + * Layer 0 Extension: the user defined extension functions, use this function for a + * quick way to extend BASIC. + * + * @U is a single variable that can be set and get. Every access to this variable + * calls getusrvar() or setusrvar(). + * @U() is a 1d array every access calls get or setusrarray(). + * @U$ is a read only string created by makeusrstring(). + * USR(32, V) is a user defined function created by usrfunction(). + * CALL 32 is a user defined call + * + */ + +/* read or write the variable @U, you can do anything you want here */ +number_t getusrvar() { return 0; } +void setusrvar(number_t v) {return; } + + +/* read or write the array @U(), you can do anything you want here */ +number_t getusrarray(address_t i) {return 0;} +void setusrarray(address_t i, number_t v) {return; } + +/* make the usr string from @U$, this function can be called multiple times for one operation */ +void makeusrstring() { +/* + * sample code could be: + * + * mem_t i; + * const char text[] = "hello world"; + * for(i=0; i 31 calls this */ +number_t usrfunction(address_t i, number_t v) { return 0; } + +/* CALL with arguments > 31 calls this */ +void usrcall(address_t i) { return; } + +/* + * Layer 0 - keyword handling - PROGMEM logic goes here + * getkeyword(), getmessage(), and getokenvalue() are + * the only access to the keyword array in the code. + * + * Same for messages and errors + */ +char* getkeyword(unsigned short i) { + + if (DEBUG) { outsc("** getkeyword from index "); outnumber(i); outcr(); } + +#ifndef ARDUINOPROGMEM + return (char *) keyword[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(keyword[i]))); + return sbuffer; +#endif +} + +char* getmessage(char i) { + if (i >= sizeof(message) || i < 0) return 0; +#ifndef ARDUINOPROGMEM + return (char *) message[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(message[i]))); + return sbuffer; +#endif +} + +signed char gettokenvalue(char i) { + if (i >= sizeof(tokens)) return 0; +#ifndef ARDUINOPROGMEM + return tokens[i]; +#else + return (signed char) pgm_read_byte(&tokens[i]); +#endif +} + +void printmessage(char i){ +#ifndef HASERRORMSG + if (i > EGENERAL) return; +#endif + outsc((char *)getmessage(i)); +} + +/* + * Layer 0 - error handling + * + * The general error handler. The static variable er + * contains the error state. + * + * debugtoken() writes a token for debug + * bdebug() is the general debug message function + * + * Strategy: the error() function writes the message and then + * clears the stack. All calling functions must check er and + * return after funtion calls with no further messages etc. + * reseterror() sets the error state to normal and end the + * run loop. + */ +void error(token_t e){ + address_t i; + +/* store the error number */ + er=e; + +/* clear the stacks */ + clearst(); + clrforstack(); + clrgosubstack(); + +/* switch off all timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +/* is the error handler active? then silently go if we do GOTO or CONT actions in it */ +#ifdef HASERRORHANDLING + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) return; +#endif + +/* set input and output device back to default */ + iodefaults(); + +/* find the line number if in RUN modes */ + if (st != SINT) { + outnumber(myline(here)); + outch(':'); + outspc(); + } + +/* if we have error messages, display them */ +#ifdef HASERRORMSG + if (e > 0) + printmessage(e); + else { + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=e; i++); + outsc(getkeyword(i)); + } + outspc(); + printmessage(EGENERAL); +#else + printmessage(EGENERAL); + outspc(); + outnumber(er); +#endif + if (DEBUG) { outsc("** at "); outnumber(here); } + outcr(); +} + +void reseterror() { + er=0; + here=0; + st=SINT; +} + +void debugtoken(){ + outsc("* "); + if (debuglevel>2) { outnumber(here); outsc(" * "); } + + if (token == EOL) { + outsc("EOL"); + return; + } + switch(token) { + case LINENUMBER: + printmessage(MLINE); + break; + case NUMBER: + printmessage(MNUMBER); + break; + case VARIABLE: + printmessage(MVARIABLE); + break; + case ARRAYVAR: + printmessage(MARRAY); + break; + case STRING: + printmessage(MSTRING); + break; + case STRINGVAR: + printmessage(MSTRINGVAR); + break; + } + outspc(); + outputtoken(); +} + +void bdebug(const char *c){ + outch('*'); + outspc(); + outsc(c); + debugtoken(); + outcr(); +} + +/* + * Arithmetic and runtime operations are mostly done + * on a stack of number_t. + * + * push(), pop(), clearst() handle the stack + */ +void push(number_t t){ + if (DEBUG) {outsc("** push sp= "); outnumber(sp); outcr(); } + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++]=t; +} + +number_t pop(){ + if (DEBUG) {outsc("** pop sp= "); outnumber(sp); outcr(); } + if (sp == 0) { error(ESTACK); return 0; } + else + return stack[--sp]; +} + +/* this one gets a positive integer from the stack and traps the error*/ +address_t popaddress(){ + number_t tmp = 0; + tmp=pop(); + if (tmp < 0) { error(EORANGE); return 0;} else return (address_t) tmp; +} + +void clearst(){ + sp=0; +} + +/* + * clear the cursor for the READ/DATA mechanism + */ +void clrdata() { +#ifdef HASDARTMOUTH + data=0; +#endif +} + +/* + * Stack handling for FOR + */ +void pushforstack(){ + index_t i, j; + + if (DEBUG) { outsc("** forsp and here in pushforstack "); outnumber(forsp); outspc(); outnumber(here); outcr(); } + +/* before pushing into the for stack we check is an + old for exists - this is on reentering a for loop + this code removes all loop inside the for loop as well + for loops are identified by the variable name, anywhere + the variable is found again, it cleans the for stack + this makes the code stable against GOTO mess, + WHILE and REPEAT are identified with the here location + reentry cleans the stack */ +#ifndef HASSTRUCT + for(i=0; i0) { + forsp--; + } else { + error(ELOOP); + return; + } +#ifdef HASSTRUCT + token=forstack[forsp].type; +#endif + xc=forstack[forsp].varx; + yc=forstack[forsp].vary; + here=forstack[forsp].here; + x=forstack[forsp].to; + y=forstack[forsp].step; +} + +void dropforstack(){ + if (forsp>0) { + forsp--; + } else { + error(ELOOP); + return; + } +} + +token_t peekforstack() { + if (forsp>0) { +#ifdef HASSTRUCT + return forstack[forsp-1].type; +#else + return 0; +#endif + } else { + error(ELOOP); + return 0; + } +} + +void clrforstack() { + forsp=0; +} + +/* GOSUB stack handling */ +void pushgosubstack(mem_t a){ + if (gosubsp < GOSUBDEPTH) { + gosubstack[gosubsp]=here; +#ifdef HASEVENTS + gosubarg[gosubsp]=a; +#endif + gosubsp++; + } else + error(TGOSUB); +} + +void popgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TRETURN); + return; + } + here=gosubstack[gosubsp]; +} + +void dropgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TGOSUB); + } +} + +void clrgosubstack() { + gosubsp=0; +} + +/* two helper commands for structured BASIC, without the GOSUB stack */ + +void pushlocation() { + if (st == SINT) + slocation=bi-ibuffer; + else + slocation=here; +} + +void poplocation() { + if (st == SINT) + bi=ibuffer+slocation; + else + here=slocation; +} + +/* + * Input and output functions. + * + * ioinit(): called at setup to initialize what ever io is needed + * outch(): prints one ascii character + * inch(): gets one character (and waits for it) + * checkch(): checks for one character (non blocking) + * ins(): reads an entire line (uses inch except for pioserial) + * + */ +void ioinit() { + +/* a standalone system runs from keyboard and display */ +#ifdef STANDALONE + idd = IKEYBOARD; + odd = ODSP; +#endif + +/* run standalone on second serial, set the right parameters */ +#ifdef STANDALONESECONDSERIAL + idd = ISERIAL1; + odd = OPRT; + blockmode = 0; + sendcr = 0; +#endif + +/* signal handling - by default SIGINT which is ^C is always caught and + leads to program stop. Side effect: the interpreter cannot be stopped + with ^C, it has to be left with CALL 0, works on Linux, Mac and MINGW + but not on DOSBOX MSDOS as DOSBOS does not handle CTRL BREAK correctly + DOS can be interrupted with the CONIO mechanism using BREAKCHAR. +*/ + signalon(); + +/* this is only for RASPBERRY - wiring has to be started explicitly */ + wiringbegin(); + +/* all serial protocolls, ttl channels, SPI and Wire */ + serialbegin(); +#ifdef ARDUINOPRT + prtbegin(); +#endif +#ifdef ARDUINOSPI + spibegin(); +#endif +#ifdef HASWIRE + wirebegin(); +#endif + +/* filesystems and networks */ + fsbegin(1); +#ifdef ARDUINOMQTT + netbegin(); + mqttbegin(); +#endif + +/* the displays */ + kbdbegin(); +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + dspbegin(); +#endif +#if defined(ARDUINOVGA) || defined(POSIXFRAMEBUFFER) + vgabegin(); /* mind this - the fablib code and framebuffer is special here */ +#endif +#ifdef ARDUINOSENSORS + sensorbegin(); +#endif +#if defined(HASCLOCK) + rtcbegin(); +#endif + +/* the eeprom dummy */ + ebegin(); + +/* activate the iodefaults */ + iodefaults(); +} + +void iodefaults() { + od=odd; + id=idd; + form=0; +} + +/* + * Layer 0 - The generic IO code + * + * inch() reads one character from the stream, mostly blocking + * checkch() reads one character from the stream, unblocking, a peek(), + * inmplemented inconsistently + * availch() checks availablibity in the stream + * inb() a block read function for serial interfacing, developed for + * AT message receiving + */ + +/* the generic inch code reading one character from a stream */ +char inch() { + switch(id) { + case ISERIAL: + return serialread(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileread(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + ins(sbuffer, 1); + if (sbuffer[0]>0) return sbuffer[1]; else return 0; +#endif +#ifdef ARDUINORF24 +/* radio is not character oriented, this is only added to make GET work + or single byte payloads, radio, like file is treated nonblocking here */ + case IRADIO: + radioins(sbuffer, SBUFSIZE-1); + if (sbuffer[0]>0) return sbuffer[1]; else return 0; +#endif +#ifdef ARDUINOMQTT + case IMQTT: + return mqttinch(); +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtread(); +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) + case IKEYBOARD: +#if defined(HASVT52) + if (vt52avail()) return vt52read(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdread(); +#endif +#endif + } + return 0; +} + +/* checking on a character in the stream */ +char checkch(){ + switch (id) { + case ISERIAL: + return serialcheckch(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef ARDUINORF24 + case IRADIO: + return radio.available(); +#endif +#ifdef ARDUINOMQTT + case IMQTT: + if (mqtt_messagelength>0) return mqtt_buffer[0]; else return 0; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return 0; +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtcheckch(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdcheckch(); /* here no display read as this is only for break and scroll control */ +#endif + break; + } + return 0; +} + +/* character availability */ +short availch(){ + switch (id) { + case ISERIAL: + return serialavailable(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef ARDUINORF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef ARDUINOMQTT + case IMQTT: + return mqtt_messagelength; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return wireavailable(); +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtavailable(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) +#if defined(HASVT52) + if (vt52avail()) return vt52avail(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdavailable(); +#endif +#endif + break; + } + return 0; +} + +#ifdef ARDUINOPRT +/* + * the block mode reader for esp and sensor modules + * on a serial interface, it tries to read as many + * characters as possible into a buffer + * blockmode = 1 reads once availch() bytes + * blockmode > 1 implements a timeout mechanism and tries + * to read until blockmode milliseconds have expired + * this is needed for esps and other sensors without + * flow control and volatile timing to receive more + * then 64 bytes + */ +void inb(char *b, index_t nb) { + long m; + index_t i = 0; + + if (blockmode == 1 ) { + i=availch(); + if (i>nb-1) i=nb-1; + b[0]=(unsigned char)i; + z.a=i; + b[i+1]=0; + b++; + while (i--) {*b++=inch();} + } else if (blockmode > 1) { + m=millis(); + while (i < nb-1) { + if (availch()) b[++i]=inch(); + if (millis() > m+blockmode) break; + } + b[0]=(unsigned char)i; + z.a=i; + b[i+1]=0; + } else { + b[0]=0; + z.a=0; + b[1]=0; + } +} +#endif + +/* + * ins() is the generic reader into a string, by default + * it works in line mode and ends reading after newline + * + * the first element of the buffer is the lower byte of the length + * + * this is corrected later in xinput, z.a has to be set as + * a side effect + * + * for streams providing entire strings as an input the + * respective string method is called + * + * all other streams are read using consins() for character by character + * input until a terminal character is reached + */ +void ins(char *b, address_t nb) { + switch(id) { +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + wireins(b, nb); + break; +#endif +#ifdef ARDUINOMQTT + case IMQTT: + mqttins(b, nb); + break; +#endif +#ifdef ARDUINORF24 + case IRADIO: + radioins(b, nb); + break; +#endif + default: +#ifdef ARDUINOPRT +/* blockmode only implemented for ISERIAL1 right now */ + if (blockmode > 0 && id == ISERIAL1 ) inb(b, nb); else +#endif + consins(b, nb); + } +} + +/* + * outch() outputs one character to a stream + * block oriented i/o like in radio not implemented here + */ +void outch(char c) { + +/* do we have a MS style tab command, then count characters on stream 1-4 but not in fileio */ +/* this does not work for control characters - needs to go to vt52 later */ + +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) { + if (c > 31) charcount[od-1]+=1; + if (c == 10) charcount[od-1]=0; + } +#endif + + switch(od) { + case OSERIAL: + serialwrite(c); + break; +#ifdef FILESYSTEMDRIVER + case OFILE: + filewrite(c); + break; +#endif +#ifdef ARDUINOPRT + case OPRT: + prtwrite(c); + break; +#endif +#ifdef ARDUINOVGA + case ODSP: + vgawrite(c); + break; +#else +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case ODSP: + dspwrite(c); + break; +#endif +#endif +#ifdef ARDUINOMQTT + case OMQTT: + mqttouts(&c, 1); /* buffering for the PRINT command */ + break; +#endif + default: + break; + } + byield(); /* yield after every character for ESP8266 */ +} + +/* send a newline */ +void outcr() { +#ifdef ARDUINOPRT + if (sendcr) outch('\r'); +#endif + outch('\n'); +} + +/* send a space */ +void outspc() { + outch(' '); +} + +/* + * outs() outputs a string of length x at index ir - basic style + * default is a character by character operation, block + * oriented write needs special functions + */ +void outs(char *ir, address_t l){ + address_t i; + + switch (od) { +#ifdef ARDUINORF24 + case ORADIO: + radioouts(ir, l); + break; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case OWIRE: + wireouts(ir, l); + break; +#endif +#ifdef ARDUINOMQTT + case OMQTT: + mqttouts(ir, l); + break; +#endif +#ifdef GRAPHDISPLAYDRIVER + case ODSP: + dspouts(ir, l); + break; +#endif + default: + for(i=0; i i) { + f=f-i; + while (f--) outspc(); + } +} + +/* + * reading a positive number from a char buffer + * maximum number of digits is adjusted to 16 + * ugly here, testcode when introducting + * number_t was only 16 bit before + */ +address_t parsenumber(char *c, number_t *r) { + address_t nd = 0; + + *r=0; + while (*c >= '0' && *c <= '9' && *c != 0) { + *r=*r*10+*c++-'0'; + nd++; + if (nd == SBUFSIZE) break; + } + return nd; +} + + +#ifdef HASFLOAT +/* a poor man's atof implementation with character count */ +address_t parsenumber2(char *c, number_t *r) { + address_t nd = 0; + index_t i; + number_t fraction = 0; + number_t exponent = 0; + mem_t nexp = 0; + + *r=0; + +/* integer part */ + i=parsenumber(c, r); + c+=i; + nd+=i; + +/* the fractional part */ + if (*c == '.') { + c++; + nd++; + + i=parsenumber(c, &fraction); + c+=i; + nd+=i; + + if (i > 0) { + while ((--i)>=0) fraction=fraction/10; + *r+=fraction; + } + } + +/* the exponent */ + if (*c == 'E' || *c == 'e') { + c++; + nd++; + if (*c == '-') {c++; nd++; nexp=1;}; + i=parsenumber(c, &exponent); + nd+=i; + while ((--exponent)>=0) if (nexp) *r=*r/10; else *r=*r*10; + } + + return nd; +} +#endif + +/* + * convert a number to a string + * the argument type controls the largerst displayable integer + * default is int but it can be increased without any side effects + */ +address_t writenumber(char *c, wnumber_t v){ + address_t nd = 0; + index_t i,j; + mem_t s = 1; + char c1; + +/* the sign */ + if (v<0) s=-1; + +/* the digits */ + do { + c[nd++]=(v%10)*s+'0'; + v=v/10; + } while (v != 0); + +/* print the minus */ + if (s < 0 ) c[nd]='-'; else nd--; + +/* reverse the order of digits */ + i=0; + j=nd; + while (j>i) { + c1=c[i]; + c[i]=c[j]; + c[j]=c1; + i++; + j--; + } + + nd++; + c[nd]=0; + return nd; +} + +#ifdef HASFLOAT +/* + * this is for floats, handling output without library + * functions as well. + */ + +address_t tinydtostrf(number_t v, index_t p, char* c) { + index_t i; + address_t nd = 0; + number_t f; + +/* we do the sign here and don't rely on writenumbers sign handling, guess why */ + if (v<0) { + v=fabs(v); + c[nd++]='-'; + } + +/* write the integer part */ + nd+=writenumber(c+nd, (int)v); + c[nd++]='.'; + +/* only the fraction to precision p */ + f=fabs(v); + +/* get p digits of the fraction */ + for (i=p; i>0; i--) { + f=f-floor(f); + f=f*10; + c[nd++]=(int)floor(f)+'0'; + } + +/* and a terminating 0 */ + c[nd]=0; + return nd; +} + +address_t writenumber2(char *c, number_t vi) { + index_t i; + index_t nd; + number_t f; + index_t exponent = 0; + mem_t eflag=0; + const int p = 5; + +/* pseudo integers are displayed as integer + zero trapped here */ + f=floor(vi); + if (f == vi && fabs(vi) < maxnum) return writenumber(c, vi); + +/* floats are displayed using the libraries */ +#ifndef ARDUINO + return sprintf(c, "%g", vi); +#else + +/* on an Arduino we have gcc, we check if we have anything to write */ + if (!isfinite(vi)) { + c[0]='*'; + c[1]=0; + return 1; + } + +/* normalize the number and see which exponent we have to deal with */ + f=vi; + while (fabs(f)<1.0) { f=f*10; exponent--; } + while (fabs(f)>=10.0-0.00001) { f=f/10; exponent++; } + +/* there are platforms where dtostrf is broken, we do things by hand in a simple way */ + + if (exponent > -2 && exponent < 7) { + tinydtostrf(vi, 5, c); + } else { + tinydtostrf(f, 5, c); + eflag=1; + } + +/* remove trailing zeros */ + for (i=0; (i < SBUFSIZE && c[i] !=0 ); i++); + i--; + while (c[i] == '0' && i>1) {i--;} + i++; + +/* add the exponent */ + if (eflag && exponent != 0) { + c[i++]='E'; + i+=writenumber(c+i, exponent); + } + + c[i]=0; + return i; + +#endif +} +#endif + +/* + * innumber() uses sbuffer as a char buffer to get a number input + */ +char innumber(number_t *r) { + index_t i = 1; + index_t s = 1; + +again: + *r=0; + sbuffer[1]=0; + ins(sbuffer, SBUFSIZE); + while (i < SBUFSIZE) { + if (sbuffer[i] == ' ' || sbuffer[i] == '\t') i++; + if (sbuffer[i] == BREAKCHAR) return BREAKCHAR; + if (sbuffer[i] == 0) { ert=1; return 1; } + if (sbuffer[i] == '-') { + s=-1; + i++; + } +#ifndef HASFLOAT + if (sbuffer[i] >= '0' && sbuffer[i] <= '9') { + (void) parsenumber(&sbuffer[i], r); +#else + if ((sbuffer[i] >= '0' && sbuffer[i] <= '9') || sbuffer[i] == '.') { + (void) parsenumber2(&sbuffer[i], r); +#endif + *r*=s; + return 0; + } else { + if (id == ISERIAL || id == IKEYBOARD) { + printmessage(ENUMBER); + outspc(); + printmessage(EGENERAL); + outcr(); + *r=0; + s=1; + i=1; + goto again; + } else { + ert=1; + return 1; + } + } + } + return 0; +} + +/* prints a number */ +void outnumber(number_t n){ + address_t nd, i; + +#ifndef HASFLOAT + nd=writenumber(sbuffer, n); +#else + nd=writenumber2(sbuffer, n); +#endif + +/* negative number format aligns right */ + if (form < 0) { i=nd; while(i < -form) {outspc(); i++;} } + +/* the number */ + outs(sbuffer, nd); + +/* number formats in Palo Alto style, positive nimbers align left */ + if (form > 0) { while (nd < form) {outspc(); nd++;} } +} + +/* + * Layer 1 functions - providing data into the global variable and + * changing the interpreter state + */ + +/* + * Lexical analyser - tokenizes the input line. + * + * nexttoken() increments the input buffer index bi and delivers values in the global + * variable token, with arguments in the accumulator x and the index register ir + * xc is used in the routine. + * + * xc, ir and x change values in nexttoken and deliver the result to the calling + * function. + * + * bi and ibuffer should not be changed or used for any other function in + * interactive node as they contain the state of nexttoken(). In run mode + * bi and ibuffer are not used as the program is fully tokenized in mem. + */ + +/* skip whitespaces */ +void whitespaces(){ + while (*bi == ' ' || *bi == '\t') bi++; +} + +/* the token stream */ +void nexttoken() { + +/* RUN mode vs. INT mode, in RUN mode we read from mem via gettoken() */ + if (st == SRUN || st == SERUN) { +/* in the token stream we call the fastticker - all fast timing functions are in stream*/ + fastticker(); +/* read the token from memory */ + gettoken(); +/* show what we are doing */ + if (debuglevel>1) { debugtoken(); outcr(); } + return; + } + +/* after change in buffer logic the first byte is reserved for the length */ + if (bi == ibuffer) bi++; + +/* literal mode - experimental - only(!) EOL ends literal mode*/ + if (lexliteral) { + token=*bi; + if (*bi != '\0') bi++; else lexliteral=0; + return; + } + +/* remove whitespaces outside strings */ + whitespaces(); + +/* end of line token */ + if (*bi == '\0') { + token=EOL; + if (DEBUG) debugtoken(); + return; + } + +/* unsigned numbers, value returned in x */ +#ifndef HASFLOAT + if (*bi <='9' && *bi >= '0') { + bi+=parsenumber(bi, &x); +#else + if ((*bi <='9' && *bi >= '0') || *bi == '.') { + bi+=parsenumber2(bi, &x); +#endif + token=NUMBER; + if (DEBUG) debugtoken(); + return; + } + +/* strings between " " or " EOL, value returned in ir */ + if (*bi == '"') { + x=0; + bi++; + ir=bi; + while(*bi != '"' && *bi !='\0') { + x++; + bi++; + } + bi++; + token=STRING; + if (DEBUG) debugtoken(); + return; + } + +/* single character operators are their own tokens */ + if (*bi == '+' || *bi == '-' || *bi == '*' || *bi == '/' || *bi == '%' || + *bi == '\\' || *bi == ':' || *bi == ',' || *bi == '(' || *bi == ')' ) { + token=*bi; + bi++; + if (DEBUG) debugtoken(); + return; + } + +/* + * relations + * single character relations are their own token + * >=, =<, =<, =>, <> are tokenized + */ + if (*bi == '=') { + bi++; + whitespaces(); + if (*bi == '>') { + token=GREATEREQUAL; + bi++; + } else if (*bi == '<') { + token=LESSEREQUAL; + bi++; + } else { + token='='; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '>'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=GREATEREQUAL; + bi++; + } else { + token='>'; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '<'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=LESSEREQUAL; + bi++; + } else if (*bi == '>') { + token=NOTEQUAL; + bi++; + } else { + token='<'; + } + if (DEBUG) debugtoken(); + return; + } + +/* + * keyworks and variables + * + * isolate a word, bi points to the beginning, x is the length of the word + * ir points to the end of the word after isolating. + * @ is a letter here to make the special @ arrays possible + */ + x=0; + ir=bi; + while (-1) { +/* toupper code */ + if (*ir >= 'a' && *ir <= 'z') { + *ir-=32; + ir++; + x++; + } else if (*ir >= '@' && *ir <= 'Z') { + ir++; + x++; + } else { + break; + } + } + +/* + * ir is reused here to implement string compares + * scanning the keyword array. + * Once a keyword is detected the input buffer is advanced + * by its length, and the token value is returned. + * + * keywords are an array of null terminated strings. + */ + yc=0; + while (gettokenvalue(yc) != 0) { + ir=getkeyword(yc); + xc=0; + while (*(ir+xc) != 0) { + if (*(ir+xc) != *(bi+xc)) { + yc++; + xc=0; + break; + } else + xc++; + } + if (xc == 0) continue; + bi+=xc; + token=gettokenvalue(yc); + if (token == TREM) lexliteral=1; + if (DEBUG) debugtoken(); + return; + } + +/* + * a variable has length 2 with either two letters or a letter + * and a number. @ can be the first letter of a variable. + * here, no tokens can appear any more as they have been processed + * further up. + */ + if ( x == 1 || x == 2 ) { + token=VARIABLE; + xc=*bi; + yc=0; + bi++; + if ((*bi >= '0' && *bi <= '9') || (*bi >= 'A' && *bi <= 'Z')) { + yc=*bi; + bi++; + } + if (*bi == '$') { + token=STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token=ARRAYVAR; + } + if (DEBUG) debugtoken(); + return; + } + + +/* other single characters are parsed and stored */ + token=*bi; + bi++; + if (DEBUG) debugtoken(); + return; +} + +/* + * Layer 1 - program editor + * + * Editing the program, the structure of a line is + * LINENUMBER linenumber(2 or more bytes) token(n bytes) + * + * store* stores something to memory + * get* retrieves information + * + * No matter how long number_t is in the C implementation + * we pack into bytes, this is clumsy but portable + * the store and get commands all operate on here + * and advance it + * + * storetoken() operates on the variable top. + * We always append at the end and then sort. + * + * gettoken() operate on the variable here + * which will also be the key variable in run mode. + * + * tokens are stored including their payload. + * + * This group of functions changes global states and + * cannot be called at program runtime with saving + * the relevant global variable to the stack. + */ + +/* + * check if we still have memory left, on RAM only systems we make + * sure that we don't hit himem. On systems with EEPROM program storage we make + * sure that we stay within the EEPROM range. + */ +char nomemory(number_t b){ +#ifndef EEPROMMEMINTERFACE + if (top >= himem-b) return 1; else return 0; +#else + if (top >= elength()-eheadersize-b) return 1; else return 0; +#endif +} + +/* store a token - check free memory before changing anything */ +void storetoken() { + index_t i=x; + switch (token) { + case LINENUMBER: + if (nomemory(addrsize+1)) break; + memwrite2(top++, token); + z.a=ax; + setnumber(top, addrsize); + top+=addrsize; + return; + case NUMBER: + if (nomemory(numsize+1)) break; + memwrite2(top++, token); + z.i=x; + setnumber(top, numsize); + top+=numsize; + return; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + if (nomemory(3)) break; + memwrite2(top++, token); + memwrite2(top++, xc); + memwrite2(top++, yc); + return; + case STRING: + if (nomemory(x+2)) break; + memwrite2(top++, token); + memwrite2(top++, i); + while (i > 0) { + memwrite2(top++, *ir++); + i--; + } + return; + default: + if (token >= -127) { /* the good old code with just one byte token */ + if (nomemory(1)) break; + memwrite2(top++, token); + } else { +#ifdef HASLONGTOKENS + if (nomemory(2)) break; /* this is the two byte token extension */ + memwrite2(top++, TEXT1); + memwrite2(top++, token+255); +#endif + } + return; + } + error(EOUTOFMEMORY); +} + + +/* + * wrappers around mem access in genereal + * + * memread is used only in the token stream, it reads from a stream + * read only. If run is done from eeprom then bytes are taken from this + * stream, this would also be the place to implement direct run from + * another device like a file system or embedded programs on flash. + * Only the token stream uses memread. + * + * memread2 and memwrite2 always go to ram. They are read/write. Variables and + * the program editor uses these functions. + * + * currently only the SPIRAM and the EEPROM direct edit interface is implemented. + * This is handled in hardware-arduino.h. + * + * USEMEMINTERFACE is the macro to control this. + * + * The POSIX code has a test interface for SPIRAM as a dummy. + * + */ +#ifndef USEMEMINTERFACE +mem_t memread(address_t a) { + if (st != SERUN) { + return mem[a]; + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return mem[a]; } + +void memwrite2(address_t a, mem_t c) { mem[a]=c; } +#else +#if defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR) +mem_t memread(address_t a) { + if (st != SERUN) { + return spiram_robufferread(a); + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return spiram_rwbufferread(a); } + +void memwrite2(address_t a, mem_t c) { spiram_rwbufferwrite(a, c); } +#else +#ifdef EEPROMMEMINTERFACE +mem_t memread(address_t a) { + if (a < elength()-eheadersize) return eread(a+eheadersize); else return mem[a-(elength()-eheadersize)]; +} + +mem_t memread2(address_t a) { return memread(a); } + +void memwrite2(address_t a, mem_t c) { + if (a < elength()-eheadersize) eupdate(a+eheadersize, c); else mem[a-(elength()-eheadersize)]=c; +} +#endif +#endif +#endif + + +/* get a token from memory */ +void gettoken() { + int i; + +/* if we have reached the end of the program, EOL is always returned + we don't rely on mem having a trailing EOL */ + if (here >= top) { + token=EOL; + return; + } + +/* if we have no data type we are done reading just one byte */ + token=memread(here++); + +/* if there are multibyte tokens, get the next byte and construct a token value <-127 */ +#ifdef HASLONGTOKENS + if (token == TEXT1) { + token=memread(here++)-255; + } +#endif + + /* otherwise we check for the argument */ + switch (token) { + case LINENUMBER: +#ifdef USEMEMINTERFACE + if (st != SERUN) pgetnumber(here, addrsize); else egetnumber(here+eheadersize, addrsize); +#else + if (st != SERUN) getnumber(here, addrsize); else egetnumber(here+eheadersize, addrsize); +#endif + // x=z.a; + ax=z.a; + here+=addrsize; + break; + case NUMBER: +#ifdef USEMEMINTERFACE + if (st !=SERUN) pgetnumber(here, numsize); else egetnumber(here+eheadersize, numsize); +#else + if (st !=SERUN) getnumber(here, numsize); else egetnumber(here+eheadersize, numsize); +#endif + x=z.i; + here+=numsize; + break; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + xc=memread(here++); + yc=memread(here++); + break; + case STRING: + x=(unsigned char)memread(here++); +/* if we run interactive or from mem, pass back the mem location + * of the string constant + * if we run from EEPROM or SPI ram and cannot simply pass a pointer + * we (ab)use the input buffer which is not needed here, this limits + * the string constant length to the length of the input buffer + */ +#if defined(USEMEMINTERFACE) + for(i=0; i= top) { + here=top; + ax=0; + return; + } + } +} + +/* + * the line cache mechanism, useful for large codes. + * addlinecache does not test if the line already exist because it + * assumes that findline calls it only if a new line is to be stored + * the LINECACHE size depends on the architecture. + */ +#if defined(LINECACHESIZE) && LINECACHESIZE>0 +const unsigned char linecachedepth = LINECACHESIZE; +typedef struct {address_t l; address_t h;} linecacheentry; +linecacheentry linecache[LINECACHESIZE]; +unsigned char linecachehere = 0; + +void clrlinecache() { + unsigned char i; + for(i=0; i= h) break; + gettoken(); + } + here=here2; + if (token == LINENUMBER) + return l1; + else + return l; +} + +/* + * Move a block of storage beginng at b ending at e + * to destination d. No error handling here!! + */ +void moveblock(address_t b, address_t l, address_t d) { + address_t i; + + if (d+l > himem) { + error(EOUTOFMEMORY); + return; + } + if (l<1) return; + + if (b < d) + for (i=l; i>0; i--) + memwrite2(d+i-1, memread2(b+i-1)); + else + for (i=0; i himem) { + error(EOUTOFMEMORY); + return; + } + if (l<1) return; + + for (i=0; i y) break; + } + +/* + * at this point y contains the number of the line to be inserted + * x contains the number of the first line with a higher line number + * or 0 if the line is to be inserted at the end + * here points to the following line and here2 points to the previous line + */ + if (ax == 0) { + here=here3-lnlength; + gettoken(); + if (token == LINENUMBER && ax == y) { // we have a double line at the end + here2-=lnlength; + here-=lnlength; + moveblock(here2, linelength, here); + top=here+linelength; + } + return; + } + here-=lnlength; + t1=here; + here=here2-lnlength; + t2=here; + gettoken(); + if (ax == y) { /* the line already exists and has to be replaced */ + here2=t2; /* this is the line we are dealing with */ + here=t1; /* this is the next line */ + y=here-here2; /* the length of the line as it is */ + if (linelength == y) { /* no change in line length */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else if (linelength > y) { /* the new line is longer than the old one */ + moveblock(here, top-here, here+linelength-y); + here=here+linelength-y; + top=top+linelength-y; + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else { /* the new line is short than the old one */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + moveblock(here, top-here, here2+linelength); + top=top-y+linelength; + } + } else { /* the line has to be inserted in between */ + here=t1; + moveblock(here, top-here, here+linelength); + moveblock(top, linelength, here); + } + } +} + +/* + * Layer 1 - the code in this section calculates an expression + * with a recursive descent algorithm + * + * all function use the stack to pass values back. We use the + * Backus-Naur form of basic from here https://rosettacode.org/wiki/BNF_Grammar + * implementing a C style logical expression model + */ + +/* the terminal symbol it ends a statement list - ELSE is one too as it ends a statement list */ +char termsymbol() { + return (token == LINENUMBER || token == ':' || token == EOL || token == TELSE); +} + +/* a little helpers - one token expect */ +char expect(token_t t, mem_t e) { + nexttoken(); + if (token != t) {error(e); return 0; } else return 1; +} + +/* a little helpers - expression expect */ +char expectexpr() { + nexttoken(); + expression(); + if (er != 0) return 0; else return 1; +} + +/* parses a list of expression, this may be recursive! */ +void parsearguments() { + short argsl; + +/* begin counting */ + argsl=0; + +/* having 0 args at the end of a command is legal */ + if (!termsymbol()) { + +/* list of expressions separated by commas */ + do { + expression(); + if (er != 0) break; + argsl++; + if (token != ',') break; + nexttoken(); + } while (1); + } + +/* because of the recursion ... */ + args=argsl; +} + + +/* expect exactly n arguments */ +void parsenarguments(char n) { + parsearguments(); + if (args != n) error(EARGS); +} + +/* counts and parses the number of arguments given in brakets */ +void parsesubscripts() { + args=0; + if (token != '(') return; /* zero arguments is legal here */ + nexttoken(); +#ifdef HASMULTIDIM + if (token == ')') { + args=-1; + return; /* () is interpreted as no argument at all -> needed for string arrays */ + } +#endif + parsearguments(); + if (er != 0) return; + if (token != ')') {error(EARGS); return; } /* we return with ) as a last token on success */ +} + + +/* parse a function argument ae is the number of + expected expressions in the argument list */ +void parsefunction(void (*f)(), short ae){ + nexttoken(); + parsesubscripts(); + if (er != 0) return; + if (args == ae) f(); else error(EARGS); +} + +/* helper function in the recursive decent parser */ +void parseoperator(void (*f)()) { + mem_t u=1; + + nexttoken(); + if (token == '-') { + u=-1; + nexttoken(); + } + f(); + if (er !=0 ) return; + y=pop(); + if (u == -1) y=-y; + x=pop(); +} + +#ifdef HASAPPLE1 +/* substring evaluation, mind the rewinding here - a bit of a hack + * this is one of the few places in the code where the token stream + * cannot be interpreted forward i.e. without looking back. Reason is + * an inconsistency the the way expression() is implemented + */ +void parsesubstring() { + char xc1, yc1; + address_t h1; /* remember the here */ + char* bi1; /* or the postion in the input buffer */ + mem_t a1; /* some info on args remembered as well for multidim */ + address_t j; /* the index of a string array */ + +/* remember the string name */ + xc1=xc; + yc1=yc; + +/* Remember the token before the first parsesubscript */ + if (st == SINT) bi1=bi; else h1=here; + + nexttoken(); + parsesubscripts(); + if (er != 0) return; + +#ifndef HASSTRINGARRAYS + +/* the stack has - the first index, the second index */ + switch(args) { + case 2: + break; + case 1: + push(lenstring(xc1, yc1, arraylimit)); + break; + case 0: +/* rewind the token if there were no braces to be in sync */ + if (st == SINT) bi=bi1; else here=h1; +/* no rewind in the () construct */ + case -1: + args=0; + push(1); + push(lenstring(xc1, yc1, arraylimit)); + break; + } + +#else +/* for a string array the situation is more complicated as we + need to parse the argument completely including the possible subscript */ + +/* how many args has the first parsesubsscript scanned, if none, we are done + rewind and set the parametes*/ + +/* the stack has - the first string index, the second string index, the array index */ + if ( args == 0 ) { + + if (st == SINT) bi=bi1; else here=h1; + + j=arraylimit; + push(1); + push(lenstring(xc1, yc1, j)); + push(j); + +/* if more then zero or an empty (), we need a second parsesubscript */ + } else { + + if (st == SINT) bi1=bi; + else h1=here; + + a1=args; + + nexttoken(); + parsesubscripts(); + + switch (args) { + case 1: + j=popaddress(); + if (er != 0) return; + break; + case 0: + j=arraylimit; + if (st == SINT) bi=bi1; else here=h1; + break; + default: + error(EARGS); + return; + } + +/* which part of the string */ + switch(a1) { + case 2: + break; + case 1: + push(lenstring(xc1, yc1, j)); + break; + case 0: + case -1: + push(1); + push(lenstring(xc1, yc1, j)); + break; + } + +/* and which index element */ + push(j); + + } +#endif + +} +#endif + +/* + * ABS absolute value + */ +void xabs(){ + number_t x; + if ((x=pop())<0) { x=-x; } + push(x); +} + +/* + * SGN evaluates the sign + */ +void xsgn(){ + number_t x; + x=pop(); + if (x>0) x=1; + if (x<0) x=-1; + push(x); +} + +/* + * PEEK on an arduino, negative values of peek address + * the EEPROM range -1 .. -1024 on an UNO + */ +void xpeek(){ + address_t amax; + index_t a; + + a=pop(); + +/* 16 bit numbers can't peek big addresses */ + if ((long) memsize > (long) maxnum) amax=(address_t) maxnum; else amax=memsize; + + if (a >= 0 && a=0) + push((long)rd*r/0x10000); + else + push((long)rd*r/0x10000+1); +#else +/* glibc parameters */ + rd= (110351245*rd + 12345) % (1 << 31); + if (r>=0) + push(rd*r/(unsigned long)(1 << 31)); + else + push(rd*r/(unsigned long)(1 << 31)+1); +#endif +} + + + +#ifndef HASFLOAT +/* + * SQR - a very simple approximate square root formula + * for integers, for floats we use the library + */ +void sqr(){ + number_t t,r; + number_t l=0; + r=pop(); + t=r; + while (t > 0) { + t>>=1; + l++; + } + l=l/2; + t=1; + t<<=l; + do { + l=t; + t=(t+r/t)/2; + } while (abs(t-l)>1); + push(t); +} +#else +void sqr(){ + push(sqrt(pop())); +} +#endif + + +/* + * POW(X, N) evaluates powers + */ + +/* this function is called by POW(a, c) in BASIC */ +void xpow(){ + number_t n; + number_t a; + + n=pop(); + a=pop(); + push(bpow(a, n)); +} + +/* while this is needed by ^*/ +number_t bpow(number_t x, number_t y) { +#ifdef HASFLOAT + return pow(x, y); +#else + number_t r; + address_t i; + + r=1; + if (y>=0) for(i=0; i 0) push(y-x+1); else push(0); + if (DEBUG) { outsc("** in stringvalue, length "); outnumber(y-x+1); outsc(" from "); outnumber(x); outspc(); outnumber(y); outcr(); } + xc=xcl; + yc=ycl; + } else if (token == TSTR) { + nexttoken(); + if ( token != '(') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; +#ifdef HASFLOAT + push(writenumber2(sbuffer, pop())); +#else + push(writenumber(sbuffer, pop())); +#endif + ir2=sbuffer; + x=1; + if (er != 0) return 0; + if (token != ')') {error(EARGS); return 0; } +#endif + } else { + return 0; + } + return 1; +} + + +/* + * (numerical) evaluation of a string expression, used for + * comparison and for string rightvalues as numbers + * the token rewind here is needed as streval is called in + * factor - no factor function should nexttoken + */ +void streval(){ + char *irl; + address_t xl, x; + token_t t; + address_t h1; + char* b1; + index_t k; + + if (!stringvalue()) { + error(EUNKNOWN); + return; + } + if (er != 0) return; + + irl=ir2; + xl=popaddress(); + if (er != 0) return; + +/* with the mem interface -> copy, irl now point to buffer2 */ +#ifdef USEMEMINTERFACE + for(k=0; k, =>, <=; + * NOT; AND; OR + * + */ + +/* + * factor() - contrary to all other function + * nothing here should end with a new token - this is handled + * in factors calling function + * + * evaluates constants, variables and all functions + */ + +/* helpers of factor - array access */ +void factorarray() { + mem_t xcl, ycl; + address_t ix, iy; + number_t v; + +/* remember the variable, because parsesubscript changes this */ + ycl=yc; + xcl=xc; + + nexttoken(); + parsesubscripts(); + if (er != 0 ) return; + + switch(args) { + case 1: + ix=popaddress(); + if (er != 0) return; + iy=arraylimit; + break; +#ifdef HASMULTIDIM + case 2: + iy=popaddress(); + ix=popaddress(); + if (er != 0) return; + break; +#endif + default: + error(EARGS); + return; + } + array('g', xcl, ycl, ix, iy, &v); + push(v); +} + +/* helpers of factor - string length */ +void factorlen() { + address_t a; + + nexttoken(); + if ( token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue()) { +#ifdef HASDARKARTS + expression(); + if (er != 0) return; + a=pop(); + push(blength(TBUFFER, a%256, a/256)); + return; +#else + error(EUNKNOWN); + return; +#endif + } + if (er != 0) return; + + nexttoken(); + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the VAL command */ +void factorval() { + address_t a; + index_t y; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue()) { error(EUNKNOWN); return; } + if (er != 0) return; + +/* not super clean - handling of terminal symbol dirty + stringtobuffer needed !! */ + vlength=0; + while(*ir2==' ' || *ir2=='\t') { ir2++; vlength++; } + if(*ir2=='-') { y=-1; ir2++; vlength++; } else y=1; + + x=0; +#ifdef HASFLOAT + if ((a=parsenumber2(ir2, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#else + if ((a=parsenumber(ir2, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#endif + (void) pop(); + push(x*y); + + nexttoken(); + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the INSTR command */ +void factorinstr() { + address_t y; + char ch; + address_t a; + char* ir; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + nexttoken(); + + if (!stringvalue()) { error(EUNKNOWN); return; } + y=popaddress(); + ir=ir2; + if (er != 0) return; + nexttoken(); + + if (token != ',') { error(EARGS); return; } + nexttoken(); + + expression(); + if (er != 0) return; + + ch=pop(); + for (a=1; a<=y; a++) {if (ir[a-1] == ch) break; } + if (a > y ) a=0; + push(a); + + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the NETSTAT command */ +void factornetstat() { + address_t x=0; + if (netconnected()) x=1; + if (mqttstate() == 0) x+=2; + push(x); +} + +void factor(){ + if (DEBUG) bdebug("factor\n"); + switch (token) { + case NUMBER: + push(x); + break; + case VARIABLE: + push(getvar(xc, yc)); + break; + case ARRAYVAR: + factorarray(); + break; + case '(': + nexttoken(); + expression(); + if (er != 0 ) return; + if (token != ')') { error(EARGS); return; } + break; +/* Palo Alto BASIC functions */ + case TABS: + parsefunction(xabs, 1); + break; + case TRND: + parsefunction(rnd, 1); + break; + case TSIZE: + push(himem-top); + break; +/* Apple 1 BASIC functions */ +#ifdef HASAPPLE1 + case TSGN: + parsefunction(xsgn, 1); + break; + case TPEEK: + parsefunction(xpeek, 1); + break; + case TLEN: + factorlen(); + break; +#ifdef HASIOT + case TAVAIL: + parsefunction(xavail, 1); + break; + case TOPEN: + parsefunction(xfopen, 1); + break; + case TSENSOR: + parsefunction(xfsensor, 2); + break; + case TVAL: + factorval(); + break; + case TINSTR: + factorinstr(); + break; + case TWIRE: + parsefunction(xfwire, 1); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + push(erh); + break; +#endif + case THIMEM: + push(himem); + break; +/* Apple 1 string compare code */ + case STRING: + case STRINGVAR: + streval(); + if (er != 0 ) return; + break; +#endif +/* Stefan's tinybasic additions */ +#ifdef HASSTEFANSEXT + case TSQR: + parsefunction(sqr, 1); + break; + case TMAP: + parsefunction(xmap, 5); + break; + case TUSR: + parsefunction(xusr, 2); + break; + case TPOW: + parsefunction(xpow, 2); + break; +#endif +/* Arduino I/O */ +#ifdef HASARDUINOIO + case TAREAD: + parsefunction(aread, 1); + break; + case TDREAD: + parsefunction(dread, 1); + break; + case TMILLIS: + parsefunction(bmillis, 1); + break; +#ifdef HASPULSE + case TPULSE: + parsefunction(bpulsein, 3); + break; +#endif + case TAZERO: +#if defined(ARDUINO) && defined(A0) + push(A0); +#else + push(0); +#endif + break; + case TLED: +#ifdef LED_BUILTIN + push(LED_BUILTIN); +#else + push(0); +#endif + break; +#endif +/* mathematical functions in case we have float */ +#ifdef HASFLOAT + case TSIN: + parsefunction(xsin, 1); + break; + case TCOS: + parsefunction(xcos, 1); + break; + case TTAN: + parsefunction(xtan, 1); + break; + case TATAN: + parsefunction(xatan, 1); + break; + case TLOG: + parsefunction(xlog, 1); + break; + case TEXP: + parsefunction(xexp, 1); + break; +#endif +/* int is always present to make programs compatible */ + case TINT: + parsefunction(xint, 1); + break; +#ifdef HASDARTMOUTH + case TFN: + xfn(); + break; +/* an arcane feature, DATA evaluates to the data record number */ + case TDATA: + push(datarc); + break; +#endif +#ifdef HASDARKARTS + case TMALLOC: + parsefunction(xmalloc, 2); + break; + case TFIND: + xfind(); + break; +#endif +#ifdef HASIOT + case TNETSTAT: + factornetstat(); + break; +#endif + +/* unknown function */ + default: + error(EUNKNOWN); + return; + } +} + +#ifdef POWERRIGHTTOLEFT +/* the recursive version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (er != 0) return; + + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + parseoperator(power); + if (er != 0) return; + push(bpow(x,y)); + } + if (DEBUG) bdebug("leaving power\n"); +} +#else +/* the left associative version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (er != 0) return; + +nextpower: + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + nexttoken(); + factor(); + if (er != 0) return; + y=pop(); + x=pop(); + push(bpow(x,y)); + goto nextpower; + } + if (DEBUG) bdebug("leaving power\n"); +} +#endif + + +/* + * term() evaluates multiplication, division and mod + */ +void term(){ + if (DEBUG) bdebug("term\n"); + power(); + if (er != 0) return; + +nextfactor: + // nexttoken(); + if (DEBUG) bdebug("in term\n"); + if (token == '*'){ + parseoperator(power); + if (er != 0) return; + push(x*y); + goto nextfactor; + } else if (token == '/'){ + parseoperator(power); + if (er != 0) return; + if (y != 0) + push(x/y); + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == '%') { + parseoperator(power); + if (er != 0) return; + if (y != 0) +#ifndef HASFLOAT + push(x%y); +#else + push((int)x%(int)y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } + if (DEBUG) bdebug("leaving term\n"); +} + +/* add and subtract */ +void addexpression(){ + if (DEBUG) bdebug("addexp\n"); + if (token != '+' && token != '-') { + term(); + if (er != 0) return; + } else { + push(0); + } + +nextterm: + if (token == '+' ) { + parseoperator(term); + if (er != 0) return; + push(x+y); + goto nextterm; + } else if (token == '-'){ + parseoperator(term); + if (er != 0) return; + push(x-y); + goto nextterm; + } +} + +/* comparisions */ +void compexpression() { + if (DEBUG) bdebug("compexp\n"); + addexpression(); + if (er != 0) return; + switch (token){ + case '=': + parseoperator(compexpression); + if (er != 0) return; + push(x == y ? -1 : 0); + break; + case NOTEQUAL: + parseoperator(compexpression); + if (er != 0) return; + push(x != y ? -1 : 0); + break; + case '>': + parseoperator(compexpression); + if (er != 0) return; + push(x > y ? -1 : 0); + break; + case '<': + parseoperator(compexpression); + if (er != 0) return; + push(x < y ? -1 : 0); + break; + case LESSEREQUAL: + parseoperator(compexpression); + if (er != 0) return; + push(x <= y ? -1 : 0); + break; + case GREATEREQUAL: + parseoperator(compexpression); + if (er != 0) return; + push(x >= y ? -1 : 0); + break; + } +} + +#ifdef HASAPPLE1 +/* boolean NOT */ +void notexpression() { + if (DEBUG) bdebug("notexp\n"); + if (token == TNOT) { + nexttoken(); + expression(); + if (er != 0) return; + push(~(int)pop()); + } else + compexpression(); +} + +/* boolean AND and at the same time bitwise */ +void andexpression() { + if (DEBUG) bdebug("andexp\n"); + notexpression(); + if (er != 0) return; + if (token == TAND) { + parseoperator(expression); + if (er != 0) return; + /* push(x && y); */ + push((int)x & (int)y); + } +} + +/* expression function and boolean OR at the same time bitwise !*/ +void expression(){ + if (DEBUG) bdebug("exp\n"); + andexpression(); + if (er != 0) return; + if (token == TOR) { + parseoperator(expression); + if (er != 0) return; + /* push(x || y); */ + push((int)x | (int)y); + } +} +#else + +/* expression function simplified */ +void expression(){ + if (DEBUG) bdebug("exp\n"); + compexpression(); + if (er != 0) return; + if (token == TOR) { + parseoperator(expression); + if (er != 0) return; + /* push(x || y); */ + push((int)x | (int)y); + } +} +#endif + + + + + + + + +/* + * Layer 2 - The commands and their helpers + * + * Palo Alto BASIC languge set - PRINT, LET, INPUT, GOTO, GOSUB, RETURN, + * IF, FOR, TO, NEXT, STEP, BREAK, STOP, END, LIST, NEW, RUN, REM + * BREAK is not Palo ALto but fits here, eEND is identical to STOP. + */ + +/* + * PRINT command + */ +void xprint(){ + char semicolon = 0; + char oldod; + char modifier = 0; + + form=0; + oldod=od; + nexttoken(); + +processsymbol: +/* at the end of a print statement, do we need a newline, restore the defaults */ + if (termsymbol()) { + if (!semicolon) outcr(); + od=oldod; + form=0; + return; + } + semicolon=0; + +/* output a string if we found it */ + if (stringvalue()) { + if (er != 0) return; + outs(ir2, pop()); + nexttoken(); + goto separators; + } + +/* modifiers of the print statement */ + if (token == '#' || token == '&') { + modifier=token; + nexttoken(); + expression(); + if (er != 0) return; + + switch(modifier) { + case '#': + form=pop(); + break; + case '&': + od=pop(); + break; + } + goto separators; + } + + if (token != ',' && token != ';') { + expression(); + if (er != 0) return; + outnumber(pop()); + } + +separators: + if (termsymbol()) goto processsymbol; + + switch (token) { + case ',': + if (!modifier) outspc(); + case ';': + semicolon=1; + nexttoken(); + break; + default: + error(EUNKNOWN); + return; + } + modifier=0; + + goto processsymbol; +} + +/* + * LET assigment code for various lefthand and righthand side. + * + * + * lefthandside is a helper function for reuse in other + * commands. It determines the address the value is to be + * assigned to and whether the assignment target is a + * "pure" i.e. subscriptless string expression + * + * assignnumber assigns a number to a given lefthandside + * + * in lefthandside the type of the object is determined and + * possible subscripts are parsed + * + * Variables have no subscripts. The arguments are unchanged. + * Arrays may have two subscript which will go to i, j + * Strings may have a string subscript, going to i and an array subscript + * going to j + * Strings without a subscript i.e. pure strings, set the ps flag + * + */ +void lefthandside(address_t* i, address_t* i2, address_t* j, mem_t* ps) { + number_t tmp; + switch (token) { + case VARIABLE: + nexttoken(); + break; + case ARRAYVAR: + nexttoken(); + parsesubscripts(); + nexttoken(); + if (er != 0) return; + switch(args) { + case 1: + *i=popaddress(); + if (er != 0) return; + *j=arraylimit; + break; + case 2: + *j=popaddress(); + if (er != 0) return; + *i=popaddress(); + if (er != 0) return; + break; + default: + error(EARGS); + return; + } + break; +#ifdef HASAPPLE1 + case STRINGVAR: +#ifndef HASSTRINGARRAYS + *j=arraylimit; + nexttoken(); + parsesubscripts(); + if (er != 0) return; + switch(args) { + case 0: + *i=1; + *ps=1; + break; + case 1: + *ps=0; + nexttoken(); + *i=popaddress(); + if (er != 0) return; + break; + case 2: + *ps=0; + nexttoken(); + *i2=popaddress(); + if (er != 0) return; + *i=popaddress(); + if (er != 0) return; + break; + default: + error(EARGS); + return; + } +#else + *j=arraylimit; + nexttoken(); + parsesubscripts(); + if (er != 0) return; + switch(args) { + case -1: + nexttoken(); + case 0: + *i=1; + *ps=1; + break; + case 1: + *ps=0; + nexttoken(); + *i=popaddress(); + if (er != 0) return; + break; + case 2: + *ps=0; + nexttoken(); + *i2=popaddress(); + if (er != 0) return; + *i=popaddress(); + if (er != 0) return; + break; + default: + error(EARGS); + return; + } +/* we deal with a string array */ + if (token == '(') { + parsesubscripts(); + if (er != 0) return; + switch(args) { + case 1: + *j=popaddress(); + if (er != 0) return; + nexttoken(); + break; + default: + error(EARGS); + return; + } + } +#endif + break; +#endif + default: + error(EUNKNOWN); + return; + } +} + +void assignnumber(signed char t, char xcl, char ycl, address_t i, address_t j, char ps) { + switch (t) { + case VARIABLE: + x=pop(); + setvar(xcl, ycl, x); + break; + case ARRAYVAR: + x=pop(); + array('s', xcl, ycl, i, j, &x); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + ir=getstring(xcl, ycl, i, j); + if (er != 0) return; +#ifndef USEMEMINTERFACE + ir[0]=pop(); +#else + if (ir == 0) memwrite2(ax, pop()); +#endif + if (ps) + setstringlength(xcl, ycl, 1, j); + else + if (lenstring(xcl, ycl, j) < i && i <= stringdim(xcl, ycl)) setstringlength(xcl, ycl, i, j); + break; +#endif + } +} + + +/* + * LET - the core assigment function, this is different from other BASICs + */ +void assignment() { + token_t t; /* remember the left hand side token until the end of the statement, type of the lhs */ + mem_t ps=1; /* also remember if the left hand side is a pure string of something with an index */ + mem_t xcl, ycl; /* to preserve the left hand side variable names */ + address_t i=1; /* and the beginning of the destination string */ + address_t i2=0; /* and the end of the destination string */ + address_t j=arraylimit; /* the second dimension of the array */ + address_t lensource, lendest, newlength, strdim, copybytes; + mem_t s; + index_t k; + +/* this code evaluates the left hand side */ + ycl=yc; + xcl=xc; + t=token; + + lefthandside(&i, &i2, &j, &ps); + if (er != 0) return; + + if (DEBUG) { + outsc("** in assignment lefthandside with "); + outnumber(i); outspc(); + outnumber(j); outspc(); + outnumber(ps); outcr(); + } + +/* the assignment part */ + if (token != '=') { + error(EUNKNOWN); + return; + } + nexttoken(); + +/* here comes the code for the right hand side */ + switch (t) { +/* the lefthandside is a scalar, evaluate the righthandside as a number */ + case VARIABLE: + case ARRAYVAR: + expression(); + if (er != 0) return; + assignnumber(t, xcl, ycl, i, j, ps); + break; +#ifdef HASAPPLE1 +/* the lefthandside is a string, try evaluate the righthandside as a stringvalue */ + case STRINGVAR: + s=stringvalue(); + if (er != 0) return; + +/* and then as an expression */ + if (!s) { + expression(); + if (er != 0) return; + assignnumber(t, xcl, ycl, i, j, ps); + break; + } + +/* this is the string righthandside code - how long is the rightandside */ + lensource=pop(); + +/* the destination address of the lefthandside, on an SPI RAM system, we + save the source in the second string buffer and let ir2 point to it + this is needed to avoid the overwrite from the second getstring + then reuse much of the old code */ +#ifdef USEMEMINTERFACE + for(k=0; k strdim)) { error(EORANGE); return; }; + +/* if we have a second index, is it in range */ + if((i2 !=0) && i2>strdim) { error(EORANGE); return; }; + +/* caculate the number of bytes we truely want to copy */ + if (i2 > 0) copybytes=((i2-i+1) > lensource) ? lensource : (i2-i+1); else copybytes=lensource; + +/* this code is needed to make sure we can copy one string to the same string + without overwriting stuff, we go either left to right or backwards */ +#ifndef USEMEMINTERFACE + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; + +#else +/* on an SPIRAM system we need to go through the mem interface + for write, if ir is zero i.e. is not a valid memory location */ + if (ir != 0) { + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; + } else { + for (k=0; k lendest) newlength=i+copybytes-1; else newlength=lendest; + } + + setstringlength(xcl, ycl, newlength, j); + nexttoken(); + break; +#endif + } +} + +/* + * INPUT ["string",] variable [,["string",] variable]* + */ +void showprompt() { + outsc("? "); +} + +void xinput(){ + mem_t oldid = id; + mem_t prompt = 1; + address_t l; + number_t xv; + mem_t xcl, ycl; + address_t k; + + nexttoken(); + +/* modifiers of the input statement (stream) */ + if (token == '&') { + if(!expectexpr()) return; + oldid=id; + id=pop(); + if (id != ISERIAL || id !=IKEYBOARD) prompt=0; + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } +/* unlink print, form can appear only once in input after the + stream, it controls character counts in wire */ +#if (defined(HASWIRE) && defined(HASFILEIO)) + if (token == '#') { + if(!expectexpr()) return; + form=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } +#endif + +nextstring: + if (token == STRING && id != IFILE) { + prompt=0; + outs(ir, x); + nexttoken(); + if (token != ',' && token != ';') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + +nextvariable: + if (token == VARIABLE) { + if (prompt) showprompt(); + if (innumber(&xv) == BREAKCHAR) { + st=SINT; + token=EOL; + goto resetinput; + } else { + setvar(xc, yc, xv); + } + } + +/* we don't use the lefthandside call here because the input loop token handling + is different */ +#ifndef HASMULTIDIM + if (token == ARRAYVAR) { + xcl=xc; + ycl=yc; + nexttoken(); + parsesubscripts(); + if (er != 0 ) return; + if (args != 1) { + error(EARGS); + return; + } + + if (prompt) showprompt(); + if (innumber(&xv) == BREAKCHAR) { + st=SINT; + token=EOL; + goto resetinput; + } else { + array('s', xcl, ycl, pop(), arraylimit, &xv); + } + } +#else + if (token == ARRAYVAR) { + xcl=xc; + ycl=yc; + nexttoken(); + parsesubscripts(); + if (er != 0 ) return; + switch(args) { + case 1: + x=pop(); + y=arraylimit; + break; + case 2: + y=pop(); + x=pop(); + break; + default: + error(EARGS); + return; + } + + if (prompt) showprompt(); + if (innumber(&xv) == BREAKCHAR) { + st=SINT; + token=EOL; + goto resetinput; + } else { + array('s', xcl, ycl, x, y, &xv); + } + } +#endif + +#ifdef HASAPPLE1 +/* strings are not passed through the input buffer but inputed directly + in the string memory location, ir after getstring points to the first data byte */ + if (token == STRINGVAR) { + ir=getstring(xc, yc, 1, arraylimit); + if (prompt) showprompt(); + l=stringdim(xc, yc); +/* the form parameter in WIRE can be used to set the expected number of bytes */ + if (id == IWIRE && form != 0 && form < l) l=form; +#ifndef USEMEMINTERFACE + ins(ir-1, l); +/* this is the length information correction for large strings, ins + stored the string length in z.a as a side effect */ + if (xc != '@' && strindexsize == 2) { + *(ir-2)=z.b.l; + *(ir-1)=z.b.h; + } +#else + if (ir == 0) { + ins(spistrbuf1, l); + for(int k=0; k= BASEKEYWORD) || token < -127) { + if ((token == TTHEN || + token == TELSE || + token == TTO || + token == TSTEP || + token == TGOTO || + token == TGOSUB || + token == TOR || + token == TAND ) && lastouttoken != LINENUMBER) outspc(); + else + if (lastouttoken == NUMBER || lastouttoken == VARIABLE) outspc(); + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=token; i++); + outsc(getkeyword(i)); + if (token != GREATEREQUAL && token != NOTEQUAL && token != LESSEREQUAL && token != TREM) spaceafterkeyword=1; + break; + } + if (token >= 32) { + outch(token); + if (token == ':' && !outliteral) outspc(); + break; + } + outch(token); outspc(); outnumber(token); + } + + lastouttoken=token; +} + +/* + * LIST programs to an output device + */ +void xlist(){ + number_t b, e; + mem_t oflag = 0; + + lastouttoken=0; + spaceafterkeyword=0; + + nexttoken(); + parsearguments(); + if (er != 0) return; + + switch (args) { + case 0: + b=0; + e=32767; + break; + case 1: + b=pop(); + e=b; + break; + case 2: + e=pop(); + b=pop(); + break; + default: + error(EARGS); + return; + } + + if ( top == 0 ) { nexttoken(); return; } + + here=0; + gettoken(); + while (here < top) { + if (token == LINENUMBER && ax >= b) oflag=1; + if (token == LINENUMBER && ax > e) oflag=0; + if (oflag) outputtoken(); + gettoken(); + if (token == LINENUMBER && oflag) { + outcr(); +/* wait after every line on small displays + removed if ( dspactive() && (dsp_rows < 10) ){ if ( inch() == 27 ) break;} */ + if (dspactive()) + if ( dspwaitonscroll() == 27 ) break; + } + } + if (here == top && oflag) outputtoken(); + if (e == 32767 || b != e) outcr(); /* supress newlines in "list 50" - a little hack */ + + nexttoken(); + } + +/* + * RUN and CONTINUE are the same function + */ +void xrun(){ + if (token == TCONT) { + st=SRUN; + nexttoken(); + } else { + nexttoken(); + parsearguments(); + if (er != 0 ) return; + if (args > 1) { error(EARGS); return; } + if (args == 0) { + here=0; + } else { + findline(pop()); + } + if (er != 0) return; + if (st == SINT) st=SRUN; + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; +#ifdef HASEVENTS + events_enabled=1; +#endif + nexttoken(); + } + +/* once statement is called it stays into a loop until the token stream + is exhausted. Then we return to interactive mode. */ + statement(); + st=SINT; +/* flush the EEPROM when changing to interactive mode */ + eflush(); + +/* if called from command line with file arg - exit after run */ +#ifndef ARDUINO + if (bnointafterrun) restartsystem(); +#endif +} + +/* + * NEW the general cleanup function - new deletes everything + * + * restbasicstate() is a helper, it keeps the memory intact + * this is needed for EEPROM direct memory + */ +void resetbasicstate() { + + /* all stacks are purged */ + clearst(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrvars(); + clrlinecache(); + +/* error status reset */ + reseterror(); + +/* let here point to the beginning of the program */ + here=0; + +/* interactive mode */ + st=SINT; + +/* switch off timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +} + +void xnew(){ + +/* reset the state of the interpreter */ + resetbasicstate(); + +/* program memory back to zero and variable heap cleared */ + himem=memsize; + zeroblock(0, memsize); + top=0; + +/* on EEPROM systems also clear the stored state and top */ +#ifdef EEPROMMEMINTERFACE + eupdate(0, 0); + z.a=top; + esetnumber(1, addrsize); +#endif +} + +/* + * REM - skip everything + */ +void xrem() { + if (debuglevel == -1) outsc("REM: "); + while (token != LINENUMBER && token != EOL && here <= top) + { + nexttoken(); + if (debuglevel == -1) { + if (token != LINENUMBER) outputtoken(); else outcr(); + } + } +} + +/* + * The Apple 1 BASIC additions + * CLR, DIM, POKE, TAB + */ + +/* + * CLR - clearing variable space + */ +void xclr() { + +#ifdef HASDARKARTS + mem_t xcl, ycl, t; + + nexttoken(); + + if (termsymbol()) { + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + } else { + + xcl=xc; + ycl=yc; + t=token; + + switch (t) { + case VARIABLE: + if (xcl == '@' || ycl == 0) { error(EVARIABLE); return; } + break; + case ARRAYVAR: + nexttoken(); + if (token != '(') { error(EVARIABLE); return; } + nexttoken(); + if (token != ')') { error(EVARIABLE); return; } + break; + case STRINGVAR: + if (xcl == '@') { error(EVARIABLE); return; } + break; + default: + expression(); + if (er != 0) return; + ax=pop(); + xcl=ax%256; + ycl=ax/256; + t=TBUFFER; + } + + ax=bfree(t, xcl, ycl); + if (ax == 0) { + if (t != TBUFFER) { error(EVARIABLE); return; } + else ert=1; + } + } + +#else + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; +#endif + nexttoken(); +} + +#ifdef HASAPPLE1 +/* + * DIM - the dimensioning of arrays and strings from Apple 1 BASIC + */ +void xdim(){ + mem_t xcl, ycl; + token_t t; + number_t x, y; + + nexttoken(); + +nextvariable: + if (token == ARRAYVAR || token == STRINGVAR ){ + + t=token; + xcl=xc; + ycl=yc; + + nexttoken(); + parsesubscripts(); + if (er != 0) return; + +#ifndef HASMULTIDIM + if (args != 1) {error(EARGS); return; } + + x=pop(); + if (x<=0) {error(EORANGE); return; } + if (t == STRINGVAR) { + if ( (x>255) && (strindexsize==1) ) {error(EORANGE); return; } + (void) createstring(xcl, ycl, x, 1); + } else { + (void) createarray(xcl, ycl, x, 1); + } +#else + if (args != 1 && args != 2) {error(EARGS); return; } + + x=pop(); + if (args == 2) {y=x; x=pop(); } else { y=1; } + + if (x <= 0 || y<=0) {error(EORANGE); return; } + if (t == STRINGVAR) { + if ( (x>255) && (strindexsize==1) ) {error(EORANGE); return; } +/* running from an SPI RAM means that we need to go through buffers in real memory which + limits string sizes, this should ne be here but encapsulated, todo after multidim string + implementation is complete */ +#ifdef SPIRAMSBSIZE + if (x>SPIRAMSBSIZE-1) {error(EORANGE); return; } +#endif + (void) createstring(xcl, ycl, x, y); + } else { + (void) createarray(xcl, ycl, x, y); + } +#endif + } else { + error(EUNKNOWN); + return; + } + + nexttoken(); + if (token == ',') { + nexttoken(); + goto nextvariable; + } + + nexttoken(); +} + + +/* + * POKE - low level poke to the basic memory, works only up to 32767 + * variables changed to local + */ +void xpoke(){ + address_t amax; + index_t a, v; /* both can be signed ! */ + +/* 16 bit numbers can't poke big addresses */ + if ( (long) memsize > (long) maxnum) amax=(address_t) maxnum; else amax=memsize; + + nexttoken(); + parsenarguments(2); + if (er != 0) return; + + v=pop(); /* the value */ + a=pop(); /* the address */ + + if (a >= 0 && a= -elength()) + eupdate(-a-1, v); + else { + error(EORANGE); + } +} + +/* + * TAB - spaces command of Apple 1 BASIC + * charcount mechanism for relative tab if HASMSTAB is set + */ +void xtab(){ + address_t tx; + + nexttoken(); + parsenarguments(1); + if (er != 0) return; + + tx=popaddress(); + if (er != 0) return; + +#ifdef HASMSTAB + if (reltab && od <= OPRT && od > 0) { + if (charcount[od-1] >= tx) tx=0; else tx=tx-charcount[od-1]-1; + } +#endif + while (tx-- > 0) outspc(); +} +#endif + +/* + * locate the curor on the screen + */ + +void xlocate() { + address_t cx, cy; + + nexttoken(); + parsenarguments(2); + if (er != 0) return; + + cy=popaddress(); + cx=popaddress(); + if (er != 0) return; + +/* for locate we go through the VT52 interface for cursor positioning*/ + if (cx > 0 && cy > 0 && cx < 224 && cy < 224) { + outch(27); outch('Y'); + outch(31+(unsigned int) cy); + outch(31+(unsigned int) cx); + } + +/* set the charcount, this is half broken on escape sequences */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=cx; +#endif + +} + +/* + * Stefan's additions to Palo Alto BASIC + * DUMP, SAVE, LOAD, GET, PUT, SET + * + */ + +/* + * DUMP - memory dump program + */ +void xdump() { + address_t a, x; + char eflag = 0; + + nexttoken(); + if (token == '!') { eflag=1; nexttoken(); } + parsearguments(); + if (er != 0) return; + + switch (args) { + case 0: + x=0; + a=memsize; + break; + case 1: + x=pop(); + a=memsize; + break; + case 2: + a=pop(); + x=pop(); + break; + default: + error(EARGS); + return; + } + + form=6; + if (a>x) dumpmem((a-x)/8+1, x, eflag); + form=0; +} + +/* + * helper of DUMP, wrote the memory out + */ +void dumpmem(address_t r, address_t b, char eflag) { + address_t j, i; + address_t k; + mem_t c; + address_t end; + + k=b; + i=r; + if (eflag) end=elength(); else end=memsize; + while (i>0) { + outnumber(k); outspc(); + for (j=0; j<8; j++) { + if (eflag) c=eread(k); else c=memread(k); + k++; + outnumber(c); outspc(); + if (k > end) break; + } + outcr(); + i--; + if (k > end) break; + } + if (eflag) { + outsc("elength: "); outnumber(elength()); outcr(); + } else { + outsc("top: "); outnumber(top); outcr(); + outsc("himem: "); outnumber(himem); outcr(); + } +} + +/* + * creates a C string from a BASIC string + * after reading a BASIC string ir2 contains a pointer + * to the data and x the string length + */ +void stringtobuffer(char *buffer) { + index_t i; + i=x; + if (i >= SBUFSIZE) i=SBUFSIZE-1; + buffer[i--]=0; + while (i >= 0) { buffer[i]=ir2[i]; i--; } +} + +/* get a file argument */ +void getfilename(char *buffer, char d) { + index_t s; + char *sbuffer; + + s=stringvalue(); + if (er != 0) return; + if (DEBUG) {outsc("** in getfilename2 stringvalue delivered "); outnumber(s); outcr(); } + + if (s) { + x=pop(); + if (DEBUG) {outsc("** in getfilename2 copying string of length "); outnumber(x); outcr(); } + stringtobuffer(buffer); + if (DEBUG) {outsc("** in getfilename2 stringvalue string "); outsc(buffer); outcr(); } + nexttoken(); + } else if (termsymbol()) { + if (d) { + sbuffer=getmessage(MFILE); + s=0; + while ((sbuffer[s] != 0) && (s < SBUFSIZE-1)) { buffer[s]=sbuffer[s]; s++; } + buffer[s]=0; + x=s; + } else { + buffer[0]=0; + x=0; + } + nexttoken(); + } else { + expression(); + if (er != 0) return; + buffer[0]=pop(); + buffer[1]=0; + } +} + +#if defined(FILESYSTEMDRIVER) +/* + * SAVE a file either to disk or to EEPROM + */ +void xsave() { + char filename[SBUFSIZE]; + address_t here2; + token_t t; + + nexttoken(); + getfilename(filename, 1); + if (er != 0) return; + t=token; + + if (filename[0] == '!') { + esave(); + } else { + if (DEBUG) { outsc("** Opening the file "); outsc(filename); outcr(); }; + + if (!ofileopen(filename, "w")) { + error(EFILE); + return; + } + +/* save the output mode and then save */ + push(od); + od=OFILE; + +/* the core save - xlist() not used any more */ + ert=0; /* reset error to trap file problems */ + here2=here; + here=0; + gettoken(); + while (here < top) { + outputtoken(); + if (ert) break; + gettoken(); + if (token == LINENUMBER) outcr(); + } + if (here == top) outputtoken(); + outcr(); + +/* back to where we were */ + here=here2; + +/* restore the output mode */ + od=pop(); + +/* clean up */ + ofileclose(); + +/* did an accident happen */ + if (ert) { printmessage(EGENERAL); outcr(); ert=0; } + } + +/* and continue remembering, where we were */ + token=t; +} + +/* + * LOAD a file + */ +void xload(const char* f) { + char filename[SBUFSIZE]; + char ch; + address_t here2; + mem_t chain = 0; + + if (f == 0) { + nexttoken(); + getfilename(filename, 1); + if (er != 0) return; + } else { + for(ch=0; ch BUFSIZE) { + error(EOUTOFMEMORY); + break; + } + } + ifileclose(); +/* after a successful load we save top to the EEPROM header */ +#ifdef EEPROMMEMINTERFACE + z.a=top; + esetnumber(1, addrsize); +#endif + +/* go back to run mode and start from the first line */ + if (chain) { + st=SRUN; + here=0; + nexttoken(); + } + } +} +#else +/* + * SAVE a file to EEPROM - minimal version for small Arduinos + */ +void xsave() { + esave(); + nexttoken(); +} +/* + * LOAD a file from EEPROM - minimal version for small Arduinos + */ +void xload(const char* f) { + eload(); + nexttoken(); +} +#endif + +/* + * GET just one character from input + */ +void xget(){ + token_t t; /* remember the left hand side token until the end of the statement, type of the lhs */ + mem_t ps=1; /* also remember if the left hand side is a pure string or something with an index */ + mem_t xcl, ycl; /* to preserve the left hand side variable names */ + address_t i=1; /* and the beginning of the destination string */ + address_t i2=1; /* and the end of the destination string */ + address_t j=1; /* the second dimension of the array if needed */ + mem_t oid=id; /* remember the input stream */ + char ch; + + nexttoken(); + +/* modifiers of the get statement */ + if (token == '&') { + + if (!expectexpr()) return; + id=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + +/* this code evaluates the left hand side - remember type and name */ + ycl=yc; + xcl=xc; + t=token; + +/* find the indices */ + lefthandside(&i, &i2, &j, &ps); + if (er != 0) return; + +/* get the data, non blocking on Arduino */ + if (availch()) ch=inch(); else ch=0; + +/* store the data element as a number expect for */ + push(ch); + assignnumber(t, xcl, ycl, i, j, ps); + +/* but then, strings where we deliver a string with length 0 if there is no data */ +#ifdef HASAPPLE1 + if (t == STRINGVAR && ch == 0 && ps) setstringlength(xcl, ycl, 0, arraylimit); +#endif + +/* restore the output device */ + id=oid; +} + +/* + * PUT writes one character to an output stream + */ +void xput(){ + mem_t ood=od; + index_t i; + + nexttoken(); + +/* modifiers of the put statement */ + if (token == '&') { + + if(!expectexpr()) return; + od=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + parsearguments(); + if (er != 0) return; + + for (i=args-1; i>=0; i--) sbuffer[i]=pop(); + outs(sbuffer, args); + + od=ood; +} + +/* + * SET - the command itself is also apocryphal it is a low level + * control command setting certain properties + * syntax, currently it is only SET expression, expression + */ +void xset(){ + address_t fn; + index_t args; + + nexttoken(); + parsenarguments(2); + if (er != 0) return; + + args=pop(); + fn=pop(); + switch (fn) { +/* runtime debug level */ + case 0: + debuglevel=args; + break; +/* autorun/run flag of the EEPROM 255 for clear, 0 for prog, 1 for autorun */ + case 1: + eupdate(0, args); + break; +/* change the output device */ + case 2: + switch (args) { + case 0: + od=OSERIAL; + break; + case 1: + od=ODSP; + break; + } + break; +/* change the default output device */ + case 3: + switch (args) { + case 0: + od=(odd=OSERIAL); + break; + case 1: + od=(odd=ODSP); + break; + } + break; + /* change the input device */ + case 4: + switch (args) { + case 0: + id=ISERIAL; + break; + case 1: + id=IKEYBOARD; + break; + } + break; + /* change the default input device */ + case 5: + switch (args) { + case 0: + idd=(id=ISERIAL); + break; + case 1: + idd=(id=IKEYBOARD); + break; + } + break; +#ifdef ARDUINOPRT +/* set the cr behaviour */ + case 6: + sendcr=(char)args; + break; +/* set the blockmode behaviour */ + case 7: + blockmode=args; + break; +/* set the second serial ports baudrate */ + case 8: + prtset(args); + break; +#endif +/* set the power amplifier level of the radio module */ +#ifdef ARDUINORF24 + case 9: + radioset(args); + break; +#endif +/* display update control for paged displays */ + case 10: + dspsetupdatemode(args); + break; +/* change the output device to a true TAB */ +#ifdef HASMSTAB + case 11: + reltab=args; + break; +#endif +/* change the lower array limit */ +#ifdef HASARRAYLIMIT + case 12: + arraylimit=args; + break; +#endif +#ifdef HASKEYPAD + case 13: + kbdrepeat=args; + break; +#endif +#ifdef HASPULSE + case 14: + bpulseunit=args; + break; +#endif +#ifdef POSIXVT52TOANSI + case 15: + vt52active=args; + break; +#endif + } +} + +/* + * NETSTAT - network status command, rudimentary + */ +void xnetstat(){ +#if defined(ARDUINOMQTT) + + nexttoken(); + parsearguments(); + if (er != 0) return; + + switch (args) { + case 0: + if (netconnected()) outsc("Network connected \n"); else outsc("Network not connected \n"); + outsc("MQTT state "); outnumber(mqttstate()); outcr(); + outsc("MQTT out topic "); outsc(mqtt_otopic); outcr(); + outsc("MQTT inp topic "); outsc(mqtt_itopic); outcr(); + outsc("MQTT name "); outsc(mqttname); outcr(); + break; + case 1: + ax=pop(); + switch (ax) { + case 0: + netstop(); + break; + case 1: + netbegin(); + break; + case 2: + if (!mqttreconnect()) ert=1; + break; + default: + error(EARGS); + return; + } + break; + default: + error(EARGS); + return; + } +#endif + nexttoken(); +} + +/* + * The arduino io functions. + * + * DWRITE - digital write + */ +void xdwrite(){ + address_t x,y; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + x=pop(); + y=pop(); + if (er !=0) return; + dwrite(y, x); +} + +/* + * AWRITE - analog write + */ +void xawrite(){ + address_t x,y; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + x=popaddress(); + y=popaddress(); + if (er != 0) return; + awrite(y, x); +} + +/* + * PINM - pin mode + */ +void xpinm(){ + address_t x,y; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + x=popaddress(); + y=popaddress(); + if (er != 0) return; + pinm(y, x); +} + +/* + * DELAY in milliseconds + * + * this must call bdelay() and not delay() as bdelay() + * handles all the yielding and timing functions + * + */ +void xdelay(){ + nexttoken(); + parsenarguments(1); + if (er != 0) return; + bdelay(pop()); +} + +/* tone if the platform has it -> BASIC command PLAY */ +#ifdef HASTONE +void xtone(){ + nexttoken(); + parsearguments(); + if (er != 0) return; + if (args>4 || args<2) { + error(EARGS); + return; + } + btone(args); +} +#endif + +/* pulse output - pin, duration, [value], [repetitions, delay] */ +#ifdef HASPULSE +void xpulse(){ + nexttoken(); + parsearguments(); + if (er != 0) return; + if (args>5 || args<2) { + error(EARGS); + return; + } + bpulseout(args); +} +#endif + + +#ifdef HASGRAPH +/* + * COLOR setting, accepting one or 3 arguments + */ +void xcolor() { + short r, g, b; + nexttoken(); + parsearguments(); + if (er != 0) return; + switch(args) { + case 1: + vgacolor(pop()); + break; + case 3: + b=pop(); + g=pop(); + r=pop(); + rgbcolor(r, g, b); + break; + default: + error(EARGS); + break; + } +} + +/* + * PLOT a pixel on the screen + */ +void xplot() { + short x0, y0; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + y0=pop(); + x0=pop(); + plot(x0, y0); +} + +/* + * LINE draws a line + */ +void xline() { + short x0, y0, x1, y1; + nexttoken(); + parsenarguments(4); + if (er != 0) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + line(x0, y0, x1, y1); +} + +void xrect() { + short x0, y0, x1, y1; + nexttoken(); + parsenarguments(4); + if (er != 0) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + rect(x0, y0, x1, y1); +} + +void xcircle() { + short x0, y0, r; + nexttoken(); + parsenarguments(3); + if (er != 0) return; + r=pop(); + y0=pop(); + x0=pop(); + circle(x0, y0, r); +} + +void xfrect() { + short x0, y0, x1, y1; + nexttoken(); + parsenarguments(4); + if (er != 0) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + frect(x0, y0, x1, y1); +} + +void xfcircle() { + short x0, y0, r; + nexttoken(); + parsenarguments(3); + if (er != 0) return; + r=pop(); + y0=pop(); + x0=pop(); + fcircle(x0, y0, r); +} +#endif + +#ifdef HASDARKARTS +/* + * MALLOC allocates a chunk of memory + */ +void xmalloc() { + address_t s; + address_t a; + + s=popaddress(); + a=popaddress(); + if (er != 0) return; + + push(bmalloc(TBUFFER, a%256, a/256, s)); +} + +/* + * FIND an object on the heap + * xfind can find things in the variable name space and the buffer space + */ + +void xfind() { + address_t a; + address_t n; + +/* is there a ( */ +if (!expect('(', EUNKNOWN)) return; + +/* after that, try to find the object on the heap */ + nexttoken(); + a=bfind(token, xc, yc); + +/* depending on the object, interpret the result */ + switch (token) { + case ARRAYVAR: + if (!expect('(', EUNKNOWN)) return; + if (!expect(')', EUNKNOWN)) return; + case VARIABLE: + case STRINGVAR: + nexttoken(); + break; + default: + expression(); /* do not use expectexpr here because of the token sequence */ + if (er != 0) return; + n=popaddress(); + if (er != 0) return; + a=bfind(TBUFFER, n%256, n/256); + } + +/* closing braket, dont use expect here because of the token sequence */ + if (token != ')') { error(EUNKNOWN); return; } + + push(a); +} + +/* + * EVAL can modify a program, there are serious side effects + * which are not caught (and cannot be). All FOR loops and RETURN + * vectors break if EVAL inserts in their range + */ +void xeval(){ + address_t i, l; + address_t mline, line; + + +/* get the line number to store */ + if (!expectexpr()) return; + line=popaddress(); + if (er != 0) return; + + if (token != ',') { + error(EUNKNOWN); + return; + } + +/* the line to be stored */ + nexttoken(); + if (!stringvalue()) { + error(EARGS); return; + } + +/* here we have the string to evaluate in ir2 and copy it to the ibuffer + only one line allowed, BUFSIZE is the limit */ + l=popaddress(); + if (er != 0) return; + + if (l>BUFSIZE-1) {error(EORANGE); return; } + + for (i=0; ienabled=0; + t->interval=0; + t->last=0; + t->type=0; + t->linenumber=0; +} + +void xtimer() { + token_t t; + btimer_t* timer; + +/* do we deal with every or after */ + if (token == TEVERY) timer=&every_timer; else timer=&after_timer; + + /* one argument expected, the time intervall */ + if (!expectexpr()) return; + + /* after that, a command GOTO or GOSUB with a line number + more commands thinkable */ + switch(token) { + case TGOSUB: + case TGOTO: + t=token; + if (!expectexpr()) return; + timer->last=millis(); + timer->type=t; + timer->linenumber=pop(); + timer->interval=pop(); + timer->enabled=1; + break; + default: + if (termsymbol()) { + x=pop(); + if (x == 0) + timer->enabled=0; + else { + if (timer->linenumber) { + timer->enabled=1; + timer->interval=x; + timer->last=millis(); + } else + error(EARGS); + } + } else + error(EUNKNOWN); + return; + } +} +#endif + +#ifdef HASEVENTS +/* the event BASIC commands */ +void initevents() { + int i; + for(i=0; i= 0) { + outnumber(eventlist[ax].pin); outspc(); + outnumber(eventlist[ax].mode); outspc(); + outnumber(eventlist[ax].type); outspc(); + outnumber(eventlist[ax].linenumber); outspc(); + outcr(); + } + } + outnumber(nevents); outcr(); + nexttoken(); + return; + } + +/* control of events */ + if (token == TSTOP) { + events_enabled=0; + nexttoken(); + return; + } + + if (token == TCONT) { + events_enabled=1; + nexttoken(); + return; + } + +/* argument parsing */ + parsearguments(); + if (er != 0) return; + + switch(args) { + case 2: + mode=pop(); + if (mode > 3) { + error(EARGS); + return; + } + case 1: + pin=pop(); + break; + default: + error(EARGS); + } + +/* followed by termsymbol, GOTO or GOSUB */ + if (token == TGOTO || token == TGOSUB) { + type=token; + +/* which line to go to */ + if (!expectexpr()) return; + line=pop(); + } + + +/* all done either set the interrupt up or delete it*/ + if (type) { + if (!addevent(pin, mode, type, line)) { + error(EARGS); + return; + } + } else { + disableevent(pin); + deleteevent(pin); + return; + } + +/* enable the interrupt */ + if (!enableevent(pin)) { + deleteevent(pin); + error(EARGS); + return; + } +} + +/* handling the event list */ +mem_t addevent(mem_t pin, mem_t mode, mem_t type, address_t linenumber) { + int i; + +/* is the event already there */ + for (i=0; i= EVENTLISTSIZE) return 0; + for (i=0; i=0){ + eventlist[i].enabled=0; + eventlist[i].pin=-1; + eventlist[i].mode=0; + eventlist[i].type=0; + eventlist[i].linenumber=0; + eventlist[i].active=0; + nevents--; + } +} + + +mem_t eventindex(mem_t pin) { + int i; + for(i=0; i0) outnumber(rootfilesize()); + outcr(); + if ( dspwaitonscroll() == 27 ) break; + } + } + rootfileclose(); + } + rootclose(); +#else + nexttoken(); +#endif +} + +/* + * DELETE a file + */ +void xdelete() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + + nexttoken(); + getfilename(filename, 0); + if (er != 0) return; + + removefile(filename); +#else + nexttoken(); +#endif +} + +/* + * OPEN a file or I/O stream - very raw mix of different functions + */ +void xopen() { +#if defined(FILESYSTEMDRIVER) || defined(ARDUINORF24) || defined(ARDUINOMQTT) || (defined(HASWIRE) && defined(HASFILEIO)) + char stream = IFILE; // default is file operation + char filename[SBUFSIZE]; + int mode; + +/* which stream do we open? default is FILE */ + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',') {error(EUNKNOWN); return; } + nexttoken(); + } + +/* the filename and its length */ + getfilename(filename, 0); + if (er != 0) return; + +/* and the arguments */ + args=0; + if (token == ',') { + nexttoken(); + parsearguments(); + } + +/* getting an argument, no argument is read, i.e. mode 0 */ + if (args == 0 ) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + switch(stream) { +#ifdef ARDUINOPRT + case ISERIAL1: + prtclose(); + if (mode == 0) mode=9600; + if (prtopen(filename, mode)) ert=0; else ert=1; + break; +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + switch (mode) { + case 1: + ofileclose(); + if (ofileopen(filename, "w")) ert=0; else ert=1; + break; + case 2: + ofileclose(); + if (ofileopen(filename, "a")) ert=0; else ert=1; + break; + default: + case 0: + ifileclose(); + if (ifileopen(filename)) ert=0; else ert=1; + break; + } + break; +#endif +#ifdef ARDUINORF24 + case IRADIO: + if (mode == 0) { + iradioopen(filename); + } else if (mode == 1) { + oradioopen(filename); + } + break; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + wireopen(filename[0], mode); + break; +#endif +#ifdef ARDUINOMQTT + case IMQTT: + if (mode == 0) { + mqttsubscribe(filename); + } else if (mode == 1) { + mqttsettopic(filename); + } + break; +#endif + default: + error(EORANGE); + return; + + } +#endif + nexttoken(); +} + +/* + * OPEN as a function, currently only implemented for MQTT + */ +void xfopen() { + short chan = pop(); + if (chan == 9) push(mqttstate()); else push(0); +} + +/* + * CLOSE a file or stream + */ +void xclose() { +#if defined(FILESYSTEMDRIVER) || defined(ARDUINORF24) || defined(ARDUINOMQTT) || (defined(HASWIRE) && defined(HASFILEIO)) + char stream = IFILE; + char mode; + + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',' && ! termsymbol()) {error(EUNKNOWN); return; } + nexttoken(); + } + + parsearguments(); + if (args == 0) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + + switch(stream) { + case IFILE: + if (mode == 1 || mode == 2) ofileclose(); else if (mode == 0) ifileclose(); + break; + } +#endif + nexttoken(); +} + +/* + * FDISK - format internal disk storages of RP2040, ESP and the like + */ +void xfdisk() { +#if defined(FILESYSTEMDRIVER) + nexttoken(); + parsearguments(); + if (er != 0) return; + if (args > 1) error(EORANGE); + if (args == 0) push(0); + outsc("Format disk (y/N)?"); + consins(sbuffer, SBUFSIZE); + if (sbuffer[1] == 'y') formatdisk(pop()); +#endif + nexttoken(); +} + +#ifdef HASSTEFANSEXT +/* + * USR low level function access of the interpreter + * for each group of functions there is a call vector + * and and argument. + * + * USR arguments from 0 to 31 are reserved for the + * interpreter status and the input output stream + * mechanisms. All other values are free and can be used + * for individual functions - see case 32 for an example. + */ +void xusr() { + address_t fn; + number_t v; + int arg; + address_t a; + + v=pop(); + arg=(int)v; /* a bit paranoid here */ + fn=pop(); + switch(fn) { +/* USR(0,y) delivers all the internal constants and variables or the interpreter */ + case 0: + switch(arg) { + case 0: push(bsystype); break; + case 1: /* language set identifier, odd because USR is part of STEFANSEXT*/ + a=0; +#ifdef HASAPPLE1 + a|=1; +#endif +#ifdef HASARDUINOIO + a|=2; +#endif +#ifdef HASFILEIO + a|=4; +#endif +#ifdef HASDARTMOUTH + a|=8; +#endif +#ifdef HASGRAPH + a|=16; +#endif +#ifdef HASDARKARTS + a|=32; +#endif +#ifdef HASIOT + a|=64; +#endif + push(a); + break; + case 2: push(0); break; /* reserved for system speed identifier */ + +#ifdef HASFLOAT + case 3: push(-1); break; +#else + case 3: push(0); break; +#endif + case 4: push(numsize); break; + case 5: push(maxnum); break; + case 6: push(addrsize); break; + case 7: push(maxaddr); break; + case 8: push(strindexsize); break; + case 9: push(memsize+1); break; + case 10: push(elength()); break; + case 11: push(GOSUBDEPTH); break; + case 12: push(FORDEPTH); break; + case 13: push(STACKSIZE); break; + case 14: push(BUFSIZE); break; + case 15: push(SBUFSIZE); break; + case 16: push(ARRAYSIZEDEF); break; + case 17: push(STRSIZEDEF); break; +/* - 24 reserved, don't use */ + case 24: push(top); break; + case 25: push(here); break; + case 26: push(himem); break; + case 27: push(nvars); break; + case 28: push(freeRam()); break; + case 29: push(gosubsp); break; + case 30: push(forsp); break; + case 31: push(0); break; /* fnc removed as interpreter variable */ + case 32: push(sp); break; +#ifdef HASDARTMOUTH + case 33: push(data); break; +#else + case 33: push(0); break; +#endif + case 34: push(0); break; +/* - 48 reserved, don't use */ + case 48: push(id); break; + case 49: push(idd); break; + case 50: push(od); break; + case 51: push(odd); break; + default: push(0); + } + break; +/* access to properties of stream 1 - serial */ + case 1: + push(serialstat(arg)); + break; +/* access to properties of stream 2 - display and keyboard */ + case 2: +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + push(dspstat(arg)); +#elif defined(ARDUINOVGA) + push(vgastat(arg)); +#else + push(0); +#endif + break; +/* access to properties of stream 4 - printer */ +#ifdef ARDUINOPRT + case 4: + push(prtstat(arg)); + break; +#endif +/* access to properties of stream 7 - wire */ +#if (defined(HASWIRE) && defined(HASFILEIO)) + case 7: + push(wirestat(arg)); + break; +#endif +/* access to properties of stream 8 - radio */ +#ifdef ARDUINORF24 + case 8: + push(radiostat(arg)); + break; +#endif +/* access to properties of stream 9 - mqtt */ +#ifdef ARDUINOMQTT + case 9: + push(mqttstat(arg)); + break; +#endif +/* access to properties of stream 16 - file */ +#ifdef FILESYSTEMDRIVER + case 16: + push(fsstat(arg)); + break; +#endif + case 32: +/* user function 32 and beyond can be used freely */ +/* all USR values not assigned return 0 */ + default: + if (fn>31) push(usrfunction(fn, v)); else push(0); + } +} + +#endif + +/* + * CALL currently only to exit the interpreter + */ +void xcall() { + int r; + + if (!expectexpr()) return; + r=pop(); + switch(r) { + case 0: +/* flush the EEPROM dummy and the output file and then exit */ + eflush(); + ofileclose(); +#if defined(POSIXFRAMEBUFFER) + vgaend(); /* clean up if you have played with the framebuffer */ +#endif + restartsystem(); + break; +/* restart the filesystem - only test code */ + case 1: + fsbegin(1); + break; +/* call values to 31 reserved! */ + default: +/* your custom code into usrcall() */ + if (r > 31) usrcall(r); else { error(EORANGE); return; } + nexttoken(); + return; + } +} + +/* the dartmouth stuff */ +#ifdef HASDARTMOUTH +/* + * DATA is simply skipped when encountered as a command + */ +void xdata() { + while (!termsymbol()) nexttoken(); +} + +/* + * for READ find the next data record, helper of READ + */ +#define DEBUG 0 +void nextdatarecord() { + address_t h; + mem_t s=1; + +/* save the location of the interpreter */ + h=here; + +/* data at zero means we need to init it, by searching the first data record */ + if (data == 0) { + here=0; + while (here stringdim(xcl, ycl)) { error(EORANGE); return; } + +/* this code is needed to make sure we can copy one string to the same string + without overwriting stuff, we go either left to right or backwards */ +#ifndef USEMEMINTERFACE + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; +#else +/* on an SPIRAM system we need to go through the mem interface + for write */ + if (ir != 0) { + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; + } else + for (k=0; k args && cr <= 0) ci=0; else ci=(int)cr; + +/* now find the line to jump to and clean the stack, reuse cr + * we need to clean the stack here completely, therefore complete the loop + * ERROR handling is needed for the trapping mechanism. No using popaddress() + * here, because of the needed stack cleanup. Unclear is this precaution is + * really needed. + */ + while (args) { + tmp=pop(); + if (args == ci) { + if (tmp < 0) er=ELINE; + line=tmp; + } + args--; + } + + if (er) return; + + if (DEBUG) { outsc("** in on found line as target "); outnumber(line); outcr(); } +/* no line found to jump to */ + if (line == 0) { + nexttoken(); + return; + } + +/* prepare for the jump */ + if (t == TGOSUB) pushgosubstack(0); + if (er != 0) return; + + findline(line); + if (er != 0) return; + +/* goto in interactive mode switched to RUN mode + no clearing of variables and stacks */ + if (st == SINT) st=SRUN; + + /* removed to avoid blocking in AFTER, EVERY and EVENT infinite loops */ + /* nexttoken(); */ +} + +#endif + +/* the structured BASIC extensions, WHILE, UNTIL, and SWITCH */ + +#ifdef HASSTRUCT + +void xwhile() { + +/* what? */ + if (DEBUG) { outsc("** in while "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points to the condition */ + pushforstack(); + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND and clear the stack*/ + if (!pop()) { + popforstack(); + if (st == SINT) bi=ibuffer+here; + findbraket(TWHILE, TWEND); + nexttoken(); + } +} + +void xwend() { + +/* remember where we are */ + pushlocation(); + +/* back to the condition */ + popforstack(); + if (er != 0) return; + +/* interactive run */ + if (st == SINT) bi=ibuffer+here; + +/* is this a while loop */ + if (token != TWHILE ) { + error(TWEND); + return; + } + +/* run the loop again - same code as xwhile */ + if (st == SINT) here=bi-ibuffer; + pushforstack(); + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND */ + if (!pop()) { + popforstack(); + poplocation(); + nexttoken(); + } +} + +void xrepeat() { + /* what? */ + if (DEBUG) { outsc("** in repeat "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points statement after repeat */ + pushforstack(); + +/* we are done here */ + nexttoken(); + +} + +void xuntil() { + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* remember the location */ + pushlocation(); + +/* look on the stack */ + popforstack(); + if (er != 0) return; + +/* if false, go back to the repeat */ + if (!pop()) { + +/* the right loop type ? */ + if (token != TREPEAT) { + error(TUNTIL); + return; + } + +/* correct for interactive */ + if (st == SINT) bi=ibuffer+here; + +/* write the stack back if we continue looping */ + pushforstack(); + + } else { + +/* back to where we were */ + poplocation(); + } + + nexttoken(); /* a bit of evil here, hobling over termsymbols */ + +} + +void xswitch() { + number_t r; + mem_t match = 0; + mem_t swcount = 0; + +/* lets look at the condition */ + if (!expectexpr()) return; + r=pop(); + +/* remember where we are */ + pushlocation(); + +/* seek the first case to match the condition */ + while (token != EOL) { + if (token == TSWEND) break; + /* nested SWITCH - skip them all*/ + if (token == TSWITCH) { + + if (DEBUG) { outsc("** in SWITCH - nesting found "); outcr(); } + + nexttoken(); + findbraket(TSWITCH, TSWEND); + + if (DEBUG) { outsc("** in SWITCH SWEND found at "); outnumber(here); outcr(); } + + if (er != 0) return; + } + /* a true case */ + if (token == TCASE) { + +/* more sophisticated, case can have an argument list */ + nexttoken(); + parsearguments(); + + if (DEBUG) { outsc("** in CASE found "); outnumber(args); outsc(" arguments"); outcr(); } + + if (er != 0) return; + if (args == 0) { + error(TCASE); + return; + } + while (args > 0) { + if (pop() == r) match=1; + args--; + } + + if (match) { + return; + } + } + nexttoken(); + } + +/* return to the original location and continue if no case is found */ + poplocation(); +} + +/* a nacked case statement always seeks the end of the switch */ +void xcase() { + while (token != EOL) { + nexttoken(); + if (token == TSWEND) break; +/* broken if switch is nested deeper then once, need the braket mechanism here */ +/* + if (token == TSWITCH) { + nexttoken(); + findbraket(TSWITCH, TSWEND); + } +*/ + } +} +#endif + + +/* + * statement processes an entire basic statement until the end + * of the line. + * + * The statement loop is a bit odd and requires some explanation. + * A statement function called in the central switch here must either + * call nexttoken as its last action to feed the loop with a new token + * and then break or it must return which means that the rest of the + * line is ignored. A function that doesn't call nexttoken and just + * breaks causes an infinite loop. + * + * statement is called once in interactive mode and terminates + * at end of a line. + */ +void statement(){ + if (DEBUG) bdebug("statement \n"); + while (token != EOL) { +#ifdef HASSTEFANSEXT +/* debug level 1 happens only in the statement loop */ + if (debuglevel == 1) { debugtoken(); outcr(); } +#endif + switch(token){ + case ':': + case LINENUMBER: + nexttoken(); + break; +/* Palo Alto BASIC language set + BREAK */ + case TPRINT: + xprint(); + break; + case TLET: + nexttoken(); + if ((token != ARRAYVAR) && (token != STRINGVAR) && (token != VARIABLE)) { + error(EUNKNOWN); + break; + } + case STRINGVAR: + case ARRAYVAR: + case VARIABLE: + assignment(); + break; + case TINPUT: + xinput(); + break; + case TRETURN: + xreturn(); + break; + case TGOSUB: + case TGOTO: + xgoto(); + break; + case TIF: + xif(); + break; + case TFOR: + xfor(); + break; + case TNEXT: + xnext(); + break; + case TBREAK: + xbreak(); + break; + case TSTOP: + case TEND: /* return here because new input is needed, end as a block end is handles elsewhere */ + *ibuffer=0; /* clear ibuffer - this is a hack */ + st=SINT; /* switch to interactive mode */ + eflush(); /* if there is an EEPROM dummy, flush it here (protects flash storage!) */ + ofileclose(); + return; + case TLIST: + xlist(); + break; + case TNEW: /* return here because new input is needed */ + xnew(); + return; + case TCONT: /* cont behaves differently in interactive and in run mode */ + if (st==SRUN || st==SERUN) { + xcont(); + break; + } /* no break here, because interactively CONT=RUN minus CLR */ + case TRUN: + xrun(); + return; + case TREM: + xrem(); + break; +/* Apple 1 language set */ +#ifdef HASAPPLE1 + case TDIM: + xdim(); + break; + case TCLR: + xclr(); + break; + case TTAB: + xtab(); + break; + case TPOKE: + xpoke(); + break; +#endif +/* Stefan's tinybasic additions */ + case TSAVE: + xsave(); + break; + case TLOAD: + xload(0); + if (st == SINT) return; /* interactive load doesn't like break as the ibuffer is messed up; */ + else break; +#ifdef HASSTEFANSEXT + case TDUMP: + xdump(); + break; + case TGET: + xget(); + break; + case TPUT: + xput(); + break; + case TSET: + xset(); + break; + case TNETSTAT: + xnetstat(); + break; + case TCLS: + xc=od; +/* if we have a display it is the default for CLS */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + od=ODSP; +#endif + outch(12); + od=xc; + nexttoken(); + break; + case TLOCATE: + xlocate(); + break; +/* low level functions as part of Stefan's extension */ + case TCALL: + xcall(); + break; +#endif +/* Arduino IO */ +#ifdef HASARDUINOIO + case TDWRITE: + xdwrite(); + break; + case TAWRITE: + xawrite(); + break; + case TPINM: + xpinm(); + break; + case TDELAY: + xdelay(); + break; +#ifdef HASTONE + case TTONE: + xtone(); + break; +#endif +#ifdef HASPULSE + case TPULSE: + xpulse(); + break; +#endif +#endif +/* BASIC DOS function */ +#ifdef HASFILEIO + case TCATALOG: + xcatalog(); + break; + case TDELETE: + xdelete(); + break; + case TOPEN: + xopen(); + break; + case TCLOSE: + xclose(); + break; + case TFDISK: + xfdisk(); + break; +#endif +/* graphics */ +#ifdef HASGRAPH + case TCOLOR: + xcolor(); + break; + case TPLOT: + xplot(); + break; + case TLINE: + xline(); + break; + case TRECT: + xrect(); + break; + case TCIRCLE: + xcircle(); + break; + case TFRECT: + xfrect(); + break; + case TFCIRCLE: + xfcircle(); + break; +#endif +#ifdef HASDARTMOUTH + case TDATA: + xdata(); + break; + case TREAD: + xread(); + break; + case TRESTORE: + xrestore(); + break; + case TDEF: + xdef(); + break; + case TON: + xon(); + break; +#endif +#ifdef HASSTEFANSEXT + case TELSE: + xelse(); + break; +#endif +#ifdef HASDARKARTS + case TEVAL: + xeval(); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + break; +#endif +#ifdef HASIOT + case TSLEEP: + xsleep(); + break; + case TWIRE: + xwire(); + break; +#endif +#ifdef HASTIMER + case TAFTER: + case TEVERY: + xtimer(); + break; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + break; +#endif +#ifdef HASSTRUCT + case TWHILE: + xwhile(); + break; + case TWEND: + xwend(); + break; + case TREPEAT: + xrepeat(); + break; + case TUNTIL: + xuntil(); + break; + case TSWITCH: + xswitch(); + break; + case TCASE: + xcase(); + break; + case TSWEND: + case TDO: + case TDEND: + nexttoken(); + break; +#endif + default: +/* strict syntax checking */ + error(EUNKNOWN); + return; + } + + +/* + * after each statement we check on a break character + * on an Arduino entering "#" at runtime stops the program + * for POSIXNONBLOCKING we do this in the background loop + * to avoid slowing down + */ +#if defined(BREAKCHAR) +#ifndef POSIXNONBLOCKING + if (checkch() == BREAKCHAR) { + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#else + if (breakcondition) { + breakcondition=0; + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#endif +#endif + +/* and after each statement, check the break pin */ +#if defined(BREAKPIN) && ( defined(ARDUINO) || defined(RASPPI) ) + if (digitalRead(BREAKPIN) == 0) { + st=SINT; + return; + }; +#endif + +/* and then there is also signal handling on some platforms */ +#if defined(POSIXSIGNALS) + if (breaksignal) { + st=SINT; + breaksignal=0; + serialflush(); + outcr(); + return; + } +#endif + +/* yield after each statement which is a 10-100 microsecond cycle + on Arduinos and the like, all background tasks are handled in byield */ + byield(); + +/* if error handling is compiled into the code, errors can be trapped here */ +#ifdef HASERRORHANDLING + if (er) { + if (st != SINT) { + erh=er; + er=0; + switch(berrorh.type) { + case TCONT: + while(!termsymbol()) nexttoken(); + break; + case TGOTO: + findline(berrorh.linenumber); + berrorh.type=0; + berrorh.linenumber=0; + if (er) return; + break; + case 0: + return; + default: + nexttoken(); + } + } else + return; + } +#else +/* when an error is encountered the statement loop is ended */ + if (er) return; +#endif + +/* + * if we run error free, interrupts and times can be processed + * + * We can savely interrupt and return only if here points either to + * a termsymbol : or LINENUMBER. NEXT is a special case. We need to + * catch this here because empty FOR loops never even have a termsymbol + * a : is swallowed after FOR. + * + */ +#ifdef HASTIMER + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* after is always processed before every */ + if (after_timer.enabled) { + if (millis() > after_timer.last + after_timer.interval) { + after_timer.enabled=0; + if (after_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + } + findline(after_timer.linenumber); + if (er) return; + } + } +/* periodic events */ + if (every_timer.enabled ) { + if (millis() > every_timer.last + every_timer.interval) { + every_timer.last=millis(); + if (every_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + if (er != 0) return; + } + findline(every_timer.linenumber); + if (er != 0) return; + } + } + } +#endif + +/* the branch code for interrupts, we round robin through the event list */ +#ifdef HASEVENTS + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* interrupts */ + if (events_enabled) { + for (ax=0; ax +#include +#ifdef HASFLOAT +#include +#include +#endif +#include +#include +#include +#ifndef MSDOS +#include +#include +#else +#include +#include +#endif +#ifdef MINGW +#include +#endif +#endif + + +#if defined(ARDUINO_ARCH_AVR) +/* the small memory model with shallow stacks and small buffers */ +#define BUFSIZE 80 +#define STACKSIZE 15 +#define GOSUBDEPTH 4 +#define FORDEPTH 4 +#define LINECACHESIZE 4 +#else +/* the for larger microcontrollers */ +#ifdef ARDUINO +#define BUFSIZE 128 +#define STACKSIZE 64 +#define GOSUBDEPTH 8 +#define FORDEPTH 8 +#define LINECACHESIZE 16 +#else +/* for real computers */ +#define BUFSIZE 256 +#define STACKSIZE 256 +#define GOSUBDEPTH 64 +#define FORDEPTH 64 +#define LINECACHESIZE 64 +#endif +#endif + +/* on the real small systems we remove the linecache and set a fixed memory size*/ +#ifdef ARDUINO_AVR_DUEMILANOVE +#undef LINECACHESIZE +#if MEMSIZE == 0 +#define MEMSIZE 512 +#endif +#endif + +/* more duffers and vars */ +#define SBUFSIZE 32 +#define VARSIZE 26 +/* default sizes of arrays and strings if they are not DIMed */ +#define ARRAYSIZEDEF 10 +#define STRSIZEDEF 32 + +/* + * the time intervall in ms needed for + * ESP8266 yields, network client loops + * and other timing related functions + */ +#define LONGYIELDINTERVAL 1000 +#define YIELDINTERVAL 32 +#define YIELDTIME 2 + +/* the default EEPROM dummy size */ +#define EEPROMSIZE 1024 + +/* after run behaviour on POSIX systems, 1 to terminate if started + on the command line with a file argument, 0 to stay active and + show a BASIC prompt*/ +#define TERMINATEAFTERRUN 1 + +/* + * The tokens for the BASIC keywords + * + * All single character operators are their own tokens + * ASCII values above 0x7f are used for tokens of keywords. + * EOL is a token + */ +#define EOL 0 +#define NUMBER -127 +#define LINENUMBER -126 +#define STRING -125 +#define VARIABLE -124 +#define STRINGVAR -123 +#define ARRAYVAR -122 +/* multi character tokens - BASEKEYWORD (3) */ +#define GREATEREQUAL -121 +#define LESSEREQUAL -120 +#define NOTEQUAL -119 +/* this is the Palo Alto Language Set (19) */ +#define TPRINT -118 +#define TLET -117 +#define TINPUT -116 +#define TGOTO -115 +#define TGOSUB -114 +#define TRETURN -113 +#define TIF -112 +#define TFOR -111 +#define TTO -110 +#define TSTEP -109 +#define TNEXT -108 +#define TSTOP -107 +#define TLIST -106 +#define TNEW -105 +#define TRUN -104 +#define TABS -103 +#define TRND -102 +#define TSIZE -101 +#define TREM -100 +/* this is the Apple 1 language set in addition to Palo Alto (14) */ +#define TNOT -99 +#define TAND -98 +#define TOR -97 +#define TLEN -96 +#define TSGN -95 +#define TPEEK -94 +#define TDIM -93 +#define TCLR -92 +#define THIMEM -91 +#define TTAB -90 +#define TTHEN -89 +#define TEND -88 +#define TPOKE -87 +/* Stefan's tinybasic additions (14) */ +#define TCONT -86 +#define TSQR -85 +#define TPOW -84 +#define TMAP -83 +#define TDUMP -82 +#define TBREAK -81 +#define TSAVE -80 +#define TLOAD -79 +#define TGET -78 +#define TPUT -77 +#define TSET -76 +#define TCLS -75 +#define TLOCATE -74 +#define TELSE -73 +/* Arduino functions (10) */ +#define TPINM -72 +#define TDWRITE -71 +#define TDREAD -70 +#define TAWRITE -69 +#define TAREAD -68 +#define TDELAY -67 +#define TMILLIS -66 +#define TTONE -65 +#define TPULSE -64 +#define TAZERO -63 +#define TLED -62 +/* the DOS functions (5) */ +#define TCATALOG -61 +#define TDELETE -60 +#define TOPEN -59 +#define TCLOSE -58 +#define TFDISK -57 +/* low level access of internal routines (2) */ +#define TUSR -56 +#define TCALL -55 +/* mathematical functions (7) */ +#define TSIN -54 +#define TCOS -53 +#define TTAN -52 +#define TATAN -51 +#define TLOG -50 +#define TEXP -49 +#define TINT -48 +/* graphics - experimental - rudimentary (7) */ +#define TCOLOR -47 +#define TPLOT -46 +#define TLINE -45 +#define TCIRCLE -44 +#define TRECT -43 +#define TFCIRCLE -42 +#define TFRECT -41 +/* the Dartmouth extensions (6) */ +#define TDATA -40 +#define TREAD -39 +#define TRESTORE -38 +#define TDEF -37 +#define TFN -36 +#define TON -35 +/* darkarts (3) */ +#define TMALLOC -34 +#define TFIND -33 +#define TEVAL -32 +/* iot extensions (9) */ +#define TERROR -31 +#define TAVAIL -30 +#define TSTR -29 +#define TINSTR -28 +#define TVAL -27 +#define TNETSTAT -26 +#define TSENSOR -25 +#define TWIRE -24 +#define TSLEEP -23 +/* events and interrupts */ +#define TAFTER -22 +#define TEVERY -21 +#define TEVENT -20 +/* experimental structured commands, currently partially implemented */ +#define TWHILE -19 +#define TWEND -18 +#define TREPEAT -17 +#define TUNTIL -16 +#define TSWITCH -15 +#define TCASE -14 +#define TSWEND -13 +#define TDO -12 +#define TDEND -11 +/* these are multibyte token extension, currently unused */ +/* using them would allow over 1000 BASIC keywords */ +#define TEXT1 -3 +/* end of tokens */ +/* constants used for some obscure purposes */ +#define TBUFFER -2 +/* UNKNOWN is not used in the current code, the + * lexer tokenizes everything blindly. There is a UNKNOWN hook + * in statement for a grammar aware lexer */ +#define UNKNOWN -1 + +/* extension tokens can be in the range from -128 to -255 + * one needs to set HASLONGTOKENS + */ +#undef HASLONGTOKEN +#define TTOKEN1 -128 + + +/* the number of keywords, and the base index of the keywords + * the number is irrelevant but BASEKEYWORD is used */ +#define NKEYWORDS 3+19+13+14+11+5+2+7+7+6+12+3+9 +#define BASEKEYWORD -121 + +/* + * Interpreter states + * SRUN means running from a programm + * SINT means interactive mode + * SERUN means running directly from EEPROM + * (enum would be the right way of doing this.) + * BREAKCHAR is the character stopping the program on Ardunios + * BREAKPIN can be set, it is a pin that needs to go to low to stop a BASIC program + * This should be done in hardware*.h + * BREAKSIGNAL can also be set, should be done in hardware*.h + */ +#define SINT 0 +#define SRUN 1 +#define SERUN 2 +#define BREAKCHAR '#' + +/* + * Input and output channels + */ +#define OSERIAL 1 +#define ODSP 2 +#define OPRT 4 +#define OWIRE 7 +#define ORADIO 8 +#define OMQTT 9 +#define OFILE 16 + +#define ISERIAL 1 +#define IKEYBOARD 2 +#define ISERIAL1 4 +#define IWIRE 7 +#define IRADIO 8 +#define IMQTT 9 +#define IFILE 16 + +/* + * All BASIC keywords for the tokens + */ +const char sge[] PROGMEM = "=>"; +const char sle[] PROGMEM = "<="; +const char sne[] PROGMEM = "<>"; +/* Palo Alto language set */ +const char sprint[] PROGMEM = "PRINT"; +const char slet[] PROGMEM = "LET"; +const char sinput[] PROGMEM = "INPUT"; +const char sgoto[] PROGMEM = "GOTO"; +const char sgosub[] PROGMEM = "GOSUB"; +const char sreturn[] PROGMEM = "RETURN"; +const char sif[] PROGMEM = "IF"; +const char sfor[] PROGMEM = "FOR"; +const char sto[] PROGMEM = "TO"; +const char sstep[] PROGMEM = "STEP"; +const char snext[] PROGMEM = "NEXT"; +const char sstop[] PROGMEM = "STOP"; +const char slist[] PROGMEM = "LIST"; +const char snew[] PROGMEM = "NEW"; +const char srun[] PROGMEM = "RUN"; +const char sabs[] PROGMEM = "ABS"; +const char srnd[] PROGMEM = "RND"; +const char ssize[] PROGMEM = "SIZE"; +const char srem[] PROGMEM = "REM"; +/* Apple 1 language set */ +#ifdef HASAPPLE1 +const char snot[] PROGMEM = "NOT"; +const char sand[] PROGMEM = "AND"; +const char sor[] PROGMEM = "OR"; +const char slen[] PROGMEM = "LEN"; +const char ssgn[] PROGMEM = "SGN"; +const char speek[] PROGMEM = "PEEK"; +const char sdim[] PROGMEM = "DIM"; +const char sclr[] PROGMEM = "CLR"; +const char shimem[] PROGMEM = "HIMEM"; +const char stab[] PROGMEM = "TAB"; +const char sthen[] PROGMEM = "THEN"; +const char sbend[] PROGMEM = "END"; +const char spoke[] PROGMEM = "POKE"; +#endif +/* Stefan's basic additions */ +#ifdef HASSTEFANSEXT +const char scont[] PROGMEM = "CONT"; +const char ssqr[] PROGMEM = "SQR"; +const char spow[] PROGMEM = "POW"; +const char smap[] PROGMEM = "MAP"; +const char sdump[] PROGMEM = "DUMP"; +const char sbreak[] PROGMEM = "BREAK"; +#endif +/* LOAD and SAVE is always there */ +const char ssave[] PROGMEM = "SAVE"; +const char sload[] PROGMEM = "LOAD"; +#ifdef HASSTEFANSEXT +const char sget[] PROGMEM = "GET"; +const char sput[] PROGMEM = "PUT"; +const char sset[] PROGMEM = "SET"; +const char scls[] PROGMEM = "CLS"; +const char slocate[] PROGMEM = "LOCATE"; +const char selse[] PROGMEM = "ELSE"; +#endif +/* Arduino functions */ +#ifdef HASARDUINOIO +const char spinm[] PROGMEM = "PINM"; +const char sdwrite[] PROGMEM = "DWRITE"; +const char sdread[] PROGMEM = "DREAD"; +const char sawrite[] PROGMEM = "AWRITE"; +const char saread[] PROGMEM = "AREAD"; +const char sdelay[] PROGMEM = "DELAY"; +const char smillis[] PROGMEM = "MILLIS"; +const char sazero[] PROGMEM = "AZERO"; +const char sled[] PROGMEM = "LED"; +#endif +#ifdef HASTONE +const char stone[] PROGMEM = "PLAY"; +#endif +#ifdef HASPULSE +const char spulse[] PROGMEM = "PULSE"; +#endif +/* DOS functions */ +#ifdef HASFILEIO +const char scatalog[] PROGMEM = "CATALOG"; +const char sdelete[] PROGMEM = "DELETE"; +const char sfopen[] PROGMEM = "OPEN"; +const char sfclose[] PROGMEM = "CLOSE"; +const char sfdisk[] PROGMEM = "FDISK"; +#endif +/* low level access functions */ +#ifdef HASSTEFANSEXT +const char susr[] PROGMEM = "USR"; +const char scall[] PROGMEM = "CALL"; +#endif +/* mathematics */ +#ifdef HASFLOAT +const char ssin[] PROGMEM = "SIN"; +const char scos[] PROGMEM = "COS"; +const char stan[] PROGMEM = "TAN"; +const char satan[] PROGMEM = "ATAN"; +const char slog[] PROGMEM = "LOG"; +const char sexp[] PROGMEM = "EXP"; +#endif +/* INT is always needed to make float/int programs compatible */ +const char sint[] PROGMEM = "INT"; +/* elemetars graphics */ +#ifdef HASGRAPH +const char scolor[] PROGMEM = "COLOR"; +const char splot[] PROGMEM = "PLOT"; +const char sline[] PROGMEM = "LINE"; +const char scircle[] PROGMEM = "CIRCLE"; +const char srect[] PROGMEM = "RECT"; +const char sfcircle[] PROGMEM = "FCIRCLE"; +const char sfrect[] PROGMEM = "FRECT"; +#endif +/* Dartmouth BASIC extensions */ +#ifdef HASDARTMOUTH +const char sdata[] PROGMEM = "DATA"; +const char sread[] PROGMEM = "READ"; +const char srestore[] PROGMEM = "RESTORE"; +const char sdef[] PROGMEM = "DEF"; +const char sfn[] PROGMEM = "FN"; +const char son[] PROGMEM = "ON"; +#endif +/* The Darkarts commands unthinkable in Dartmouth */ +#ifdef HASDARKARTS +const char smalloc[] PROGMEM = "MALLOC"; +const char sfind[] PROGMEM = "FIND"; +const char seval[] PROGMEM = "EVAL"; +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING +const char serror[] PROGMEM = "ERROR"; +#endif +/* iot extensions */ +#ifdef HASIOT +const char savail[] PROGMEM = "AVAIL"; +const char sstr[] PROGMEM = "STR"; +const char sinstr[] PROGMEM = "INSTR"; +const char sval[] PROGMEM = "VAL"; +const char snetstat[] PROGMEM = "NETSTAT"; +const char ssensor[] PROGMEM = "SENSOR"; +const char swire[] PROGMEM = "WIRE"; +const char ssleep[] PROGMEM = "SLEEP"; +#endif +/* events and interrupts */ +#ifdef HASTIMER +const char safter[] PROGMEM = "AFTER"; +const char severy[] PROGMEM = "EVERY"; +#endif +#ifdef HASEVENTS +const char sevent[] PROGMEM = "EVENT"; +#endif +#ifdef HASSTRUCT +const char swhile[] PROGMEM = "WHILE"; +const char swend[] PROGMEM = "WEND"; +const char srepeat[] PROGMEM = "REPEAT"; +const char suntil[] PROGMEM = "UNTIL"; +const char sswitch[] PROGMEM = "SWITCH"; +const char scase[] PROGMEM = "CASE"; +const char sswend[] PROGMEM = "SWEND"; +const char sdo[] PROGMEM = "DO"; +const char sdend[] PROGMEM = "DEND"; +#endif + + +/* zero terminated keyword storage */ +const char* const keyword[] PROGMEM = { + sge, sle, sne, sprint, slet, sinput, + sgoto, sgosub, sreturn, sif, sfor, sto, + sstep, snext, sstop, slist, snew, srun, + sabs, srnd, ssize, srem, +#ifdef HASAPPLE1 + snot, sand, sor, slen, ssgn, speek, sdim, + sclr, shimem, stab, sthen, + sbend, spoke, +#endif +#ifdef HASSTEFANSEXT + scont, ssqr, spow, smap, sdump, sbreak, +#endif + ssave, sload, +#ifdef HASSTEFANSEXT + sget, sput, sset, scls, slocate, selse, +#endif +#ifdef HASARDUINOIO + spinm, sdwrite, sdread, sawrite, saread, + sdelay, smillis, sazero, sled, +#endif +#ifdef HASTONE + stone, +#endif +#ifdef HASPULSE + spulse, +#endif +#ifdef HASFILEIO + scatalog, sdelete, sfopen, sfclose, sfdisk, +#endif +#ifdef HASSTEFANSEXT + susr, scall, +#endif +#ifdef HASFLOAT + ssin, scos, stan, satan, slog, sexp, +#endif + sint, +#ifdef HASGRAPH + scolor, splot, sline, scircle, srect, + sfcircle, sfrect, +#endif +#ifdef HASDARTMOUTH + sdata, sread, srestore, sdef, sfn, son, +#endif +#ifdef HASDARKARTS + smalloc, sfind, seval, +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING + serror, +#endif +#ifdef HASIOT + savail, sstr, sinstr, sval, + snetstat, ssensor, swire, ssleep, +#endif +#ifdef HASTIMER + safter, severy, +#endif +#ifdef HASEVENTS + sevent, +#endif +#ifdef HASSTRUCT + swhile, swend, srepeat, suntil, sswitch, scase, sswend, + sdo, sdend, +#endif + 0 +}; + +/* the zero terminated token dictonary needed for scalability */ +const signed char tokens[] PROGMEM = { + GREATEREQUAL, LESSEREQUAL, NOTEQUAL, TPRINT, TLET, + TINPUT, TGOTO, TGOSUB, TRETURN, TIF, TFOR, TTO, TSTEP, + TNEXT, TSTOP, TLIST, TNEW, TRUN, TABS, TRND, TSIZE, TREM, +#ifdef HASAPPLE1 + TNOT, TAND, TOR, TLEN, TSGN, TPEEK, TDIM, TCLR, + THIMEM, TTAB, TTHEN, TEND, TPOKE, +#endif +#ifdef HASSTEFANSEXT + TCONT, TSQR, TPOW, TMAP, TDUMP, TBREAK, +#endif + TSAVE, TLOAD, +#ifdef HASSTEFANSEXT + TGET, TPUT, TSET, TCLS, TLOCATE, TELSE, +#endif +#ifdef HASARDUINOIO + TPINM, TDWRITE, TDREAD, TAWRITE, TAREAD, TDELAY, TMILLIS, + TAZERO, TLED, +#endif +#ifdef HASTONE + TTONE, +#endif +#ifdef HASPULSE + TPULSE, +#endif +#ifdef HASFILEIO + TCATALOG, TDELETE, TOPEN, TCLOSE, TFDISK, +#endif +#ifdef HASSTEFANSEXT + TUSR, TCALL, +#endif +#ifdef HASFLOAT + TSIN, TCOS, TTAN, TATAN, TLOG, TEXP, +#endif + TINT, +#ifdef HASGRAPH + TCOLOR, TPLOT, TLINE, TCIRCLE, TRECT, + TFCIRCLE, TFRECT, +#endif +#ifdef HASDARTMOUTH + TDATA, TREAD, TRESTORE, TDEF, TFN, TON, +#endif +#ifdef HASDARKARTS + TMALLOC, TFIND, TEVAL, +#endif +#ifdef HASERRORHANDLING + TERROR, +#endif +#ifdef HASIOT + TAVAIL, TSTR, TINSTR, TVAL, TNETSTAT, + TSENSOR, TWIRE, TSLEEP, +#endif +#ifdef HASTIMER + TAFTER, TEVERY, +#endif +#ifdef HASEVENTS + TEVENT, +#endif +#ifdef HASSTRUCT + TWHILE, TWEND, TREPEAT, TUNTIL, TSWITCH, TCASE, TSWEND, + TDO, TDEND, +#endif + 0 +}; + +/* + * the message catalog + */ +#define MFILE 0 +#define MPROMPT 1 +#define MGREET 2 +#define MLINE 3 +#define MNUMBER 4 +#define MVARIABLE 5 +#define MARRAY 6 +#define MSTRING 7 +#define MSTRINGVAR 8 +#define EGENERAL 9 +#define EUNKNOWN 10 +#define ENUMBER 11 +#define EDIVIDE 12 +#define ELINE 13 +#define EOUTOFMEMORY 14 +#define ESTACK 15 +#define EORANGE 16 +#define ESTRING 17 +#define EVARIABLE 18 +#define ELOOP 19 +#define EFILE 20 +#define EFUN 21 +#define EARGS 22 +#define EEEPROM 23 +#define ESDCARD 24 + +const char mfile[] PROGMEM = "file.bas"; +const char mprompt[] PROGMEM = "> "; +const char mgreet[] PROGMEM = "Stefan's Basic 1.4"; +const char mline[] PROGMEM = "LINE"; +const char mnumber[] PROGMEM = "NUMBER"; +const char mvariable[] PROGMEM = "VARIABLE"; +const char marray[] PROGMEM = "ARRAY"; +const char mstring[] PROGMEM = "STRING"; +const char mstringv[] PROGMEM = "STRINGVAR"; +const char egeneral[] PROGMEM = "Error"; +#ifdef HASERRORMSG +const char eunknown[] PROGMEM = "Syntax"; +const char enumber[] PROGMEM = "Number"; +const char edivide[] PROGMEM = "Div by 0"; +const char eline[] PROGMEM = "Unknown Line"; +const char emem[] PROGMEM = "Memory"; +const char estack[] PROGMEM = "Stack"; +const char erange[] PROGMEM = "Range"; +const char estring[] PROGMEM = "String"; +const char evariable[] PROGMEM = "Variable"; +const char eloop[] PROGMEM = "Loop"; +const char efile[] PROGMEM = "File"; +const char efun[] PROGMEM = "Function"; +const char eargs[] PROGMEM = "Args"; +const char eeeprom[] PROGMEM = "EEPROM"; +const char esdcard[] PROGMEM = "SD card"; +#endif + +const char* const message[] PROGMEM = { + mfile, mprompt, mgreet, + mline, mnumber, mvariable, marray, + mstring, mstringv, + egeneral +#ifdef HASERRORMSG + , eunknown, enumber, edivide, eline, + emem, estack, erange, + estring, evariable, eloop, efile, efun, eargs, + eeeprom, esdcard +#endif +}; + +/* + * code for variable numbers and addresses sizes + * the original code was 16 bit but can be extended here + * to arbitrary types + * + * number_t is the type for numerical work - either float or int + * wnumber_t is the type containing the largest printable integer, + * for float keep this int on 32 bit and long on 8 bit unless you + * want to use very long integers, like 64 or 128 bit types. + * address_t is an unsigned type adddressing memory, default 16bit + * mem_t is a SIGNED 8bit character type. + * index_t is a SIGNED minimum 16 bit integer type + * + * works with the tacit assumption that + * sizeof(number_t) >= sizeof(address_t) + * and that the entire memory is smaller than the positive + * part of number type (!!) + * + * we assume that float >= 4 bytes in the following + * + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: the index size of strings either + * 1 byte or 2 bytes - no other values supported + */ +#ifdef HASFLOAT +typedef float number_t; +const number_t maxnum=16777216; +typedef long wnumber_t; +#else +typedef int number_t; +typedef int wnumber_t; +const number_t maxnum=(number_t)~((number_t)1<<(sizeof(number_t)*8-1)); +#endif +typedef unsigned short address_t; /* this type addresses memory */ +const int numsize=sizeof(number_t); +const int addrsize=sizeof(address_t); +const int eheadersize=sizeof(address_t)+1; +const int strindexsize=2; /* default in the meantime, strings up to unsigned 16 bit length */ +const address_t maxaddr=(address_t)(~0); +typedef signed char mem_t; /* a signed 8 bit type for the memory */ +typedef int index_t; /* this type counts at least 16 bit */ +#ifndef HASLONGTOKENS +typedef signed char token_t; /* the type of tokens, normally mem_t with a maximum of 127 commands and data types */ +#else +typedef short token_t; /* token type extension, allows an extra of 127 commands and symbols */ +#endif + +/* this type maps numbers to bytes */ +typedef struct {mem_t l; mem_t h;} twobytes_t; +typedef union { number_t i; address_t a; twobytes_t b; mem_t c[sizeof(number_t)]; } accu_t; + +/* the memreader function type */ +typedef mem_t (*memreader_t)(address_t); + +/* + * system type identifiers + */ + +#define SYSTYPE_UNKNOWN 0 +#define SYSTYPE_AVR 1 +#define SYSTYPE_ESP8266 2 +#define SYSTYPE_ESP32 3 +#define SYSTYPE_RP2040 4 +#define SYSTYPE_SAM 5 +#define SYSTYPE_XMC 6 +#define SYSTYPE_SMT32 7 +#define SYSTYPE_NRENESA 8 +#define SYSTYPE_POSIX 32 +#define SYSTYPE_MSDOS 33 +#define SYSTYPE_MINGW 34 +#define SYSTYPE_RASPPI 35 + +/* + * The basic interpreter is implemented as a stack machine + * with global variable for the interpreter state, the memory + * and the arithmetic during run time. + */ + +/* the stack, all BASIC arithmetic is done here */ +number_t stack[STACKSIZE]; +address_t sp=0; + +/* a small buffer to process string arguments, mostly used for Arduino PROGMEM */ +char sbuffer[SBUFSIZE]; + +/* the input buffer, the lexer can tokenize this and run from it, bi is an index to this. + bi must be global as it is the program cursor in interactive mode */ +char ibuffer[BUFSIZE] = "\0"; +char *bi; + +/* a static array of variables A-Z for the small systems that have no heap */ +number_t vars[VARSIZE]; + +/* the BASIC working memory, either malloced or allocated as a global array */ +#if MEMSIZE != 0 +mem_t mem[MEMSIZE]; +#else +mem_t* mem; +#endif +address_t himem, memsize; + +/* the for stack - remembers the variable, indices, and optionally a type for stuctured BASIC */ +struct forstackitem {mem_t varx; mem_t vary; address_t here; number_t to; number_t step; +#ifdef HASSTRUCT +mem_t type; +#endif +} forstack[FORDEPTH]; +index_t forsp = 0; + +/* the GOSUB stack remembers an address to jump to */ +address_t gosubstack[GOSUBDEPTH]; +index_t gosubsp = 0; + +/* this variable stores the location in pushlocation() and poplocation(), used to rewind the program cursor */ +address_t slocation; + +/* arithmetic accumulators - used by many statements, y may be obsolete in future*/ +number_t x, y; + +/* the names of a variable and small integer accumulator */ +mem_t xc, yc; + +/* an address accumulator, used a lot in string operations */ +address_t ax; + +/* z is another accumulator used to convert numbers and addressed to bytes and vice versa */ +/* this union is used to store larger objects into byte oriented memory */ +accu_t z; + +/* string index registers */ +char *ir, *ir2; + +/* the active token */ +token_t token; + +/* the curent error, can be a token, hance token type */ +token_t er; + +/* a trapable error */ +mem_t ert; + +/* the interpreter state, interactive, run or run from EEPROM */ +mem_t st; + +/* the current program location or "cursor" */ +address_t here; + +/* the topmost byte of a program in memory, beginning of free BASIC RAM */ +address_t top; + +/* the number of variables on the heap */ +address_t nvars = 0; + +/* used to format output with # */ +mem_t form = 0; + +/* counts the outputed characters on streams 0-3, used to emulate a real tab */ +#ifdef HASMSTAB +mem_t charcount[3]; /* devices 1-4 support tabing */ +mem_t reltab = 0; +#endif + +/* the lower limit of the array is one by default, can be a variable */ +#ifdef HASARRAYLIMIT +address_t arraylimit = 1; +#else +const address_t arraylimit = 1; +#endif + +/* the number of arguments parsed from a command */ +mem_t args; + +/* the random number seed, this is unsigned hence address_t */ +#ifndef HASFLOAT +address_t rd; +#else +unsigned long rd; +#endif + +/* output and input channels, used to direct output to various devices */ +mem_t id; +mem_t od; + +/* default IO - not constant, can be changed at runtime through a user call */ +mem_t idd = ISERIAL; +mem_t odd = OSERIAL; + +/* the runtime debuglevel */ +mem_t debuglevel = 0; + +/* DATA pointer, where is the current READ statement */ +#ifdef HASDARTMOUTH +address_t data = 0; +address_t datarc = 1; +#endif + +/* + * process command line arguments in the POSIX world + * bnointafterrun is a flag to remember if called as command + * line argument, in this case we don't return to interactive + */ +#ifndef ARDUINO +int bargc; +char** bargv; +mem_t bnointafterrun = 0; +#endif + +/* + * Yield counter, we count when we did yield the last time + * lastyield controlls the client loops of network functions + * like mqtt, scanned keyboard, and USB. + * + * lastlongyield controls longterm functions like DHCP lease + * renewal in Ethernet + * + * there variables are only needed if the platform has background + * tasks + */ +long lastyield=0; +long lastlongyield=0; + +/* formaters lastouttoken and spaceafterkeyword to make a nice LIST */ +mem_t lastouttoken; +mem_t spaceafterkeyword; +mem_t outliteral = 0; +mem_t lexliteral = 0; + +/* + * the cache for the heap search - helps the string code + * the last found object on the heap is remembered. This is needed + * because the string code sometime searches the heap twice during the + * same operation. + */ +#ifdef HASAPPLE1 +mem_t bfindc, bfindd, bfindt; +address_t bfinda, bfindz; +#endif + +/* + * a variable for some string operations + */ +int vlength; + +/* the timer code - very simple needs to to to a struct */ +/* timer type */ +typedef struct { + mem_t enabled; + unsigned long last; + unsigned long interval; + mem_t type; + address_t linenumber; +} btimer_t; + +#ifdef HASTIMER +btimer_t after_timer = {0, 0, 0, 0, 0}; +btimer_t every_timer = {0, 0, 0, 0, 0}; +#endif + +/* the event code */ +#ifdef HASEVENTS + +#define EVENTLISTSIZE 4 + +/* event type */ +typedef struct { + mem_t enabled; + mem_t pin; + mem_t mode; + mem_t type; + address_t linenumber; + mem_t active; +} bevent_t; + +/* the event list */ +int nevents = 0; +int ievent = 0; +static mem_t events_enabled = 1; +static volatile bevent_t eventlist[EVENTLISTSIZE]; + +/* the extension of the GOSUB stack */ +static mem_t gosubarg[GOSUBDEPTH]; + +/* handle the event list */ +mem_t addevent(mem_t, mem_t, mem_t, address_t); +void deleteevent(mem_t); +volatile bevent_t* findevent(mem_t); +mem_t eventindex(mem_t); +#endif + +#ifdef HASERRORHANDLING +/* the error handler type, very simple for now */ +typedef struct { + mem_t type; + address_t linenumber; +} berrorh_t; + +berrorh_t berrorh = {0 , 0}; +mem_t erh = 0; +#endif + +/* the string for real time clocks */ +char rtcstring[20] = { 0 }; + +/* the units pulse operates on, in microseconds*/ +short bpulseunit = 10; + +/* only needed for POSIXNONBLOCKING */ +mem_t breakcondition = 0; + +/* + * Function prototypes, ordered by layers + * HAL - hardware abstraction + * Layer 0 - memory and I/O + * Layer 1 - Program storage and control + * Layer 2 - Where stuff happens + */ + +/* + * HAL - see hardware-*.h + * This is the hardware abstraction layer of the BASIC + * interpreter + */ + +/* setup codes */ +void timeinit(); +void wiringbegin(); + +/* low level mem and hardware features */ +long freeRam(); +long freememorysize(); +void restartsystem(); +void activatesleep(long t); + +/* start the spi bus */ +void spibegin(); + +/* + * the hardware interface display driver functions, need to be + * implemented for the display driver to work + * dspupdate() only for display like Epapers + */ +void dspbegin(); +void dspprintchar(char, mem_t, mem_t); +void dspclear(); +void dspupdate(); + +/* keyboard code */ +void kbdbegin(); +int kbdstat(char); +char kbdavailable(); +char kbdread(); +char kbdcheckch(); + +/* graphics functions */ +void rgbcolor(int, int, int); +void vgacolor(short c); +void vgascale(int*, int*); +void plot(int, int); +void line(int, int, int, int); +void rect(int, int, int, int); +void frect(int, int, int, int); +void circle(int, int, int); +void fcircle(int, int, int); + +/* text output to a VGA display */ +void vgabegin(); +int vgastat(char); +void vgawrite(char); + +/* generic display code */ +void dspwrite(char); +void dspbegin(); +int dspstat(char); +char dspwaitonscroll(); +char dspactive(); +void dspsetupdatemode(char); +char dspgetupdatemode(); +void dspgraphupdate(); +void dspsetscrollmode(char, short); +void dspsetcursor(short, short); +void dspbufferclear(); +void dspscroll(mem_t, mem_t); +void dspreversescroll(mem_t); +void dspvt52(char *); + +/* real time clock */ +char* rtcmkstr(); +void rtcset(uint8_t, short); +short rtcget(short); + +/* network and mqtt functions */ +void netbegin(); +char netconnected(); +void mqttsetname(); +void mqttbegin(); +int mqttstat(char); +int mqttstate(); +void mqttsubscribe(char*); +void mqttsettopic(char*); +void mqttouts(char *, short); +void mqttins(char *, short); +char mqttinch(); + +/* low level EEPROM handling */ +void ebegin(); +void eflush(); +address_t elength(); +mem_t eread(address_t); +void eupdate(address_t, mem_t); + +/* arduino io functions */ +void aread(); +void dread(); +void awrite(address_t, address_t); +void dwrite(address_t, address_t); +void pinm(address_t, address_t); +void bmillis(); +void bpulsein(); +void xpulse(); +void bpulseout(short); +void btone(short); + +/* timing control for ESP and network */ +void byield(); +void bdelay(unsigned long); +void fastticker(); +void yieldfunction(); +void longyieldfunction(); + +/* the file interface */ +char* mkfilename(const char*); +const char* rmrootfsprefix(const char*); +void fsbegin(char); +int fsstat(char); +void filewrite(char); +char fileread(); +char ifileopen(const char*); +void ifileclose(); +char ofileopen(char*, const char*); +void ofileclose(); +int fileavailable(); +void rootopen(); +int rootnextfile(); +int rootisfile(); +const char* rootfilename(); +long rootfilesize(); +void rootfileclose(); +void rootclose(); +void removefile(char*); +void formatdisk(short); + +/* low level serial code */ +void picogetchar(char); +void picowrite(char); +void picobegin(unsigned long); +void picoins(char, short); +void serialbegin(); +int serialstat(char); +char serialread(); +void serialwrite(char); +short serialcheckch(); +short serialavailable(); +void serialflush(); +void consins(char*, short); +void prtbegin(); +int prtstat(char); +void prtset(int); +char prtopen(char *, int); +void prtclose(); +char prtread(); +void prtwrite(char); +short prtcheckch(); +short prtavailable(); + +/* generic wire access */ +void wirebegin(); +int wirestat(char); +void wireopen(char, char); +void wireins(char*, uint8_t); +void wireouts(char*, uint8_t); +short wireavailable(); +short wirereadbyte(short); +void wirewritebyte(short, short); + +/* RF24 radio input */ +int radiostat(char); +void radioset(int); +#ifdef ARDUINO +uint64_t pipeaddr(char*); +#else +long pipeaddr(char*); +#endif +void iradioopen(char*); +void oradioopen(char*); +void radioins(char*, short); +void radioouts(char* , short); +short radioavailable(); + +/* sensor control */ +void sensorbegin(); +number_t sensorread(short, short); + +/* SPI RAM code */ +address_t spirambegin(); +void spiramrawwrite(address_t, mem_t); +mem_t spiramrawread(address_t ); + +/* + * Layer 0 functions - I/O and memory management + */ + +/* make room for BASIC */ +address_t ballocmem(); + +/* handle files im EEPROM */ +void eload(); +void esave(); +char autorun(); + +/* the variable heap from Apple 1 BASIC */ +address_t bmalloc(mem_t, mem_t, mem_t, address_t); +address_t bfind(mem_t, mem_t, mem_t); +address_t bfree(mem_t, mem_t, mem_t); +address_t blength (mem_t, mem_t, mem_t); + +/* normal variables of number_t */ +number_t getvar(mem_t, mem_t); +void setvar(mem_t, mem_t, number_t); +void clrvars(); + +/* low level memory access packing n*8bit bit into n 8 bit objects + e* is for Arduino EEPROM */ +void getnumber(address_t, mem_t); +void setnumber(address_t, mem_t); +void egetnumber(address_t, mem_t); +void esetnumber(address_t, mem_t); +void pgetnumber(address_t, mem_t); + +/* array and string handling */ +/* the multidim extension is experimental, here only 2 array dimensions implemented as test */ +address_t createarray(mem_t, mem_t, address_t, address_t); +void array(mem_t, mem_t, mem_t, address_t, address_t, number_t*); +address_t createstring(char, char, address_t, address_t); +char* getstring(char, char, address_t, address_t); +number_t arraydim(char, char); +address_t stringdim(char, char); +address_t lenstring(char, char, address_t); +void setstringlength(char, char, address_t, address_t); +void setstring(char, char, address_t, char *, address_t, address_t); + +/* the user defined extension functions */ +number_t getusrvar(); +void setusrvar(number_t); +number_t getusrarray(address_t); +void setusrarray(address_t, number_t); +void makeusrstring(); +number_t usrfunction(address_t, number_t); +void usrcall(address_t); + +/* get keywords and tokens from PROGMEM */ +char* getkeyword(unsigned short); +char* getmessage(char); +signed char gettokenvalue(char); +void printmessage(char); + +/* error handling */ +void error(token_t); +void reseterror(); +void debugtoken(); +void bdebug(const char*); + +/* the arithemtic stack */ +void push(number_t); +number_t pop(); +address_t popaddress(); +void drop(); +void clearst(); + +/* READ DATA handling */ +void clrdata(); + +/* FOR NEXT GOSUB stacks */ +void pushforstack(); +void popforstack(); +void dropforstack(); +void clrforstack(); +void pushgosubstack(mem_t); +void popgosubstack(); +void dropgosubstack(); +void clrgosubstack(); + +/* general I/O initialisation */ +void ioinit(); +void iodefaults(); + +/* signal handling */ +void signalon(); +void signaloff(); +void signalhandler(int); + +/* character and string I/O functions */ +/* we live in world where char may be signed or unsigned and keep it + that way on the lowest level, hence this function, fully defined here, + mostly inlined anyway*/ +int cheof(int c) { if ((c == -1) || (c == 255)) return 1; else return 0; } +/* input */ +char inch(); +char checkch(); +short availch(); +void inb(char*, index_t); +void ins(char*, address_t); + +/* output */ +void outch(char); +void outcr(); +void outspc(); +void outs(char*, address_t); +void outsc(const char*); +void outscf(const char *, index_t); + +/* I/O of number_t - floats and integers */ +address_t parsenumber(char*, number_t*); +address_t parsenumber2(char*, number_t*); +address_t writenumber(char*, wnumber_t); +address_t writenumber2(char*, number_t); +address_t tinydtostrf(number_t, index_t, char*); +char innumber(number_t*); +void outnumber(number_t); + +/* + * Layer 1 functions, provide data and do the heavy lifting + * for layer 2 including lexical analysis, storing programs + * and expression evaluation + */ + +/* lexical analysis */ +void whitespaces(); +void nexttoken(); + +/* storing and retrieving programs */ +char nomemory(number_t); +void storetoken(); +mem_t memread(address_t); +mem_t memread2(address_t); +void memwrite2(address_t, mem_t); +void gettoken(); +void firstline(); +void nextline(); + +void clrlinecache(); +void addlinecache(address_t, address_t); +address_t findinlinecache(address_t); +void findline(address_t); +address_t myline(address_t); +void moveblock(address_t, address_t, address_t); +void zeroblock(address_t, address_t); +void diag(); +void storeline(); + +/* read arguments from the token stream and process them */ +char termsymbol(); +char expect(token_t, mem_t); +char expectexpr(); +void parsearguments(); +void parsenarguments(char); +void parsesubscripts(); +void parsefunction(void (*)(), short); +void parseoperator(void (*)()); +void parsesubstring(); + +/* mathematics and other functions for int and float */ +void xabs(); +void xsgn(); +void xpeek(); +void xmap(); +void rnd(); +void sqr(); +void xpow(); +number_t bpow(number_t, number_t); + +/* string values and string evaluation */ +char stringvalue(); +void streval(); + +/* floating point functions */ +void xsin(); +void xcos(); +void xtan(); +void xatan(); +void xlog(); +void xexp(); +void xint(); + +/* expression evaluation */ +void factor(); +void term(); +void addexpression(); +void compexpression(); +void notexpression(); +void andexpression(); +void expression(); + +/* + * Layer 2 - statements and functions + * use the global variables + */ + +/* basic commands of the core language set */ +void xprint(); +void lefthandside(address_t*, address_t*, address_t*, mem_t*); +void assignnumber(signed char, char, char, address_t, address_t, char); +void assignment(); +void showprompt(); +void xinput(); +void xgoto(); +void xreturn(); +void xif(); + +/* FOR NEXT loops */ +void findnextcmd(); +void findbraket(token_t, token_t); +void xfor(); +void xbreak(); +void xcont(); +void xnext(); + +/* WHILE WEND*/ +void xwhile(); +void xwend(); + +/* REPEAT UNTIL */ +void xrepeat(); +void xuntil(); + +/* control commands and misc */ +void outputtoken(); +void xlist(); +void xrun(); +void xnew(); +void xrem(); +void xclr(); +void xdim(); +void xpoke(); +void xtab(); +void xdump(); +void dumpmem(address_t, address_t, char); +void xlocate(); + +/* file access and other i/o */ +void stringtobuffer(char*); +void getfilename(char*, char); +void xsave(); +void xload(const char*); +void xget(); +void xput(); +void xset(); +void xnetstat(); + +/* Arduino IO control interface */ +void xdwrite(); +void xawrite(); +void xpinm(); +void xdelay(); +void xtone(); + +/* graphics commands */ +void xcolor(); +void xplot(); +void xline(); +void xrect(); +void xcircle(); +void xfrect(); +void xfcircle(); + +/* the darkarts */ +void xmalloc(); +void xfind(); +void xeval(); + +/* IoT commands */ +void xassign(); +void xavail(); +void xfsensor(); +void xsleep(); +void xwire(); +void xfwire(); + +/* timers */ +void xafter(); +void xevent(); + +/* File I/O functions */ +char streq(const char*, char*); +void xcatalog(); +void xdelete(); +void xopen(); +void xfopen(); +void xclose(); +void xfdisk(); + +/* low level access functions */ +void xcall(); +void xusr(); + +/* the dartmouth stuff */ +void xdata(); +void nextdatarecord(); +void xread(); +void xrestore(); +void xdef(); +void xfn(); +void xon(); + +/* timers and interrupts */ +void xtimer(); +void resettimer(btimer_t*); + +/* structured BASIC extensions */ +void xwhile(); +void xwend(); +void xrepeat(); +void xuntil(); +void xswitch(); +void xcase(); +void xendswitch(); + +/* the emulation of tone using the byield loop */ +void toggletone(); +void playtone(int, int, int); + +/* the statement loop */ +void statement(); + +/* the extension functions */ +void bsetup(); +void bloop(); + diff --git a/data/Basic1/TinybasicArduino/hardware-arduino.h b/data/Basic1/TinybasicArduino/hardware-arduino.h new file mode 100644 index 0000000000000000000000000000000000000000..6855c170e9d3775dca7738d79c4a7c833419d4c9 --- /dev/null +++ b/data/Basic1/TinybasicArduino/hardware-arduino.h @@ -0,0 +1,5545 @@ +/* + * + * $Id: hardware-arduino.h,v 1.8 2023/02/18 20:16:59 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * Playing around with frugal programming. See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Credits: + * - XMC contributed by Florian + * + * Hardware definition file coming with TinybasicArduino.ino aka basic.c + * + * - ARDUINOLCD, ARDUINOTFT and LCDSHIELD active the LCD code, + * LCDSHIELD automatically defines the right settings for + * the classical shield modules + * - ARDUINOPS2 activates the PS2 code. Default pins are 2 and 3. + * If you use other pins the respective changes have to be made + * below. + * - _if_ and PS2 are both activated STANDALONE cause the Arduino + * to start with keyboard and lcd as standard devices. + * - ARDUINOEEPROM includes the EEPROM access code + * - ARDUINOEFS, ARDUINOSD, ESPSPIFFS, RP2040LITTLEFS activate filesystem code + * - activating Picoserial, Picoserial doesn't work on MEGA + * + * Architectures and the definitions from the Arduino IDE + * + * ARDUINO_ARCH_SAM: no tone command, dtostrf + * ARDUINO_ARCH_RP2040: dtostrf (for ARDUINO_NANO_RP2040_CONNECT) + * ARDUINO_ARCH_SAMD: dtostrf (for ARDUINO_SAMD_MKRWIFI1010, ARDUINO_SEEED_XIAO_M0) + * ARDUINO_ARCH_ESP8266: SPIFFS, dtostrf (ESP8266) + * ARDUINO_AVR_MEGA2560, ARDUARDUINO_SAM_DUE: second serial port is Serial1-3 - no software serial + * ARDUINO_SAM_DUE: hardware heuristics + * ARDUINO_ARCH_AVR: nothing + * ARDUINO_ARCH_LGT8F: EEPROM code for flash EEPROM - platform fully supported now, yet no call 0 + * ARDUINO_ARCH_ESP32 and ARDUINO_TTGO_T7_V14_Mini32, no tone, no analogWrite, avr/xyz obsolete + * + * The code still contains hardware heuristics from my own projects, + * will be removed in the future + * + */ + +#if defined(ARDUINO) && ! defined(__HARDWAREH__) +#define __HARDWAREH__ + +/* + * Arduino hardware settings , set here what you need or + * use one of the predefined configurations below + * + * input/output methods USERPICOSERIAL, ARDUINOPS2 + * ARDUINOPRT, DISPLAYCANSCROLL, ARDUINOLCDI2C, + * ARDUINOTFT, ARDUINONOKIA51, ARDUINOILI9488, + * ARDUINOSSD1306, ARDUINOMCUFRIEND + * storage ARDUINOEEPROM, ARDUINOSD, ESPSPIFFS, RP2040LITTLEFS + * storage ARDUINOEFS, SM32SDIO + * sensors ARDUINOWIRE, ARDUINOSENSORS + * network ARDUINORF24, ARDUNIOMQTT + * memory ARDUINOSPIRAM + * real time clocks ARDUINORTC, ARDUINORTCEMULATION + * + * leave this unset if you use the definitions below + */ + +#undef USESPICOSERIAL +#undef ARDUINOPS2 +#undef ARDUINOUSBKBD +#undef ARDUINOZX81KBD +#undef ARDUINOPRT +#undef DISPLAYCANSCROLL +#undef ARDUINOLCDI2C +#undef ARDUINONOKIA51 +#undef ARDUINOILI9488 +#undef ARDUINOSSD1306 +#undef ARDUINOMCUFRIEND +#undef ARDUINOEDP47 +#undef ARDUINOGRAPHDUMMY +#undef LCDSHIELD +#undef ARDUINOTFT +#undef ARDUINOVGA +#define ARDUINOEEPROM +#undef ARDUINOI2CEEPROM +#undef ARDUINOEFS +#undef ARDUINOSD +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#undef STM32SDIO +#undef ARDUINORTC +#undef ARDUINORTCEMULATION +#undef ARDUINOTONEEMULATION +#undef ARDUINOWIRE +#undef ARDUINOWIRESLAVE +#undef ARDUINORF24 +#undef ARDUINOETH +#undef ARDUINOMQTT +#undef ARDUINOSENSORS +#undef ARDUINOSPIRAM +#undef STANDALONE +#undef STANDALONESECONDSERIAL + +/* experimental features, don't use unless you know the code */ +/* + * this setting uses the EEPROM as program storage + * The idea is to create a virtual memory layout starting from 0 with the EEPROM + * from elength() and then adding the BASIC RAM to it. himem and top need to be + * handled carefully. + */ +#undef ARDUINOPGMEEPROM + +/* + * Predefined hardware configurations, this assumes that all of the + * above are undef + * + * UNOPLAIN: + * a plain UNO with no peripherals + * AVRLCD: + * a AVR system with an LCD shield + * WEMOSSHIELD: + * a Wemos D1 with a modified simple datalogger shield + * optional keyboard and i2c display + * MEGASHIELD: + * an Arduino Mega with Ethernet Shield + * optional keyboard and i2c display + * TTGOVGA: + * TTGO VGA1.4 system with PS2 keyboard, standalone + * MEGATFT, DUETFT + * TFT 7inch screen systems, standalone + * NANOBOARD: + * Arduino Nano Every board with PS2 keyboard and sensor + * kit + * MEGABOARD: + * A board for the MEGA with 64 kB RAM, SD Card, and real time + * clock + * UNOBOARD: + * A board for an UNO with 64kB memory and EEPROM disk + * fits into an UNO flash only with integer + * ESP01BOARD: + * ESP01 based board as a sensor / MQTT interface + * RP2040BOARD: + * A ILI9488 hardware design based on an Arduino connect RP2040. + * RP2040BOARD2: + * like the one above but based on the Pi Pico core + * ESP32BOARD: + * same like above with an ESP32 core + * MKRBOARD: + * a digital signage and low energy board + */ + +#undef UNOPLAIN +#undef AVRLCD +#undef WEMOSSHIELD +#undef MEGASHIELD +#undef TTGOVGA +#undef DUETFT +#undef MEGATFT +#undef NANOBOARD +#undef MEGABOARD +#undef UNOBOARD +#undef ESP01BOARD +#undef RP2040BOARD +#undef RP2040BOARD2 +#undef ESP32BOARD +#undef MKR1010BOARD + +/* + * PIN settings and I2C addresses for various hardware configurations + * used a few heuristics and then the hardware definitions above + * + * #define SDPIN sets the SD CS pin - can be left as a default for most HW configs + * TTGO needs it as default definitions in the board file are broken + * #define PS2DATAPIN, PS2IRQPIN sets PS2 pin + */ + +/* PS2 Keyboard pins for AVR - use one interrupt pin 2 and one date pin + 5 not 4 because 4 conflicts with SDPIN of the standard SD shield */ +#define PS2DATAPIN 3 +#define PS2IRQPIN 2 + +/* Ethernet - 10 is the default */ +/* #define ETHPIN 10 */ + +/* The Pretzelboard definitions for Software Serial, conflicts with SPI */ +#define SOFTSERIALRX 11 +#define SOFTSERIALTX 12 + +/* near field pin settings for CE and CSN*/ +#define RF24CEPIN 8 +#define RF24CSNPIN 9 + +/* use standard I2C pins almost always */ +#undef SDA_PIN +#undef SCL_PIN + +/* set this is you want pin 4 on low interrupting the interpreter */ +/* #define BREAKPIN 4 */ +#undef BREAKPIN + +/* the primary serial stream aka serial aka sream 1 */ +#ifndef ALTSERIAL +#define SERIALPORT Serial +#endif + +/* the secondary serial port aka prt aka stream 4 */ +#ifndef PRTSERIAL +#define PRTSERIAL Serial1 +#endif + +/* + * Pin settings for the ZX81 Keyboard + * first the 8 rows, then the 5 columns or the keyboard + * + * MEGAs have many pins and default is to use the odd pins on the side + * UNOs, NANOs, and others use the lower pins by default avoiding the + * pin 13 which is LED and doesn't work with standard schematics + */ +#ifdef ARDUINOZX81KBD +#ifdef ARDUINO_AVR_MEGA2560 +const byte zx81pins[] = {37, 35, 33, 31, 29, 27, 25, 23, 47, 45, 43, 41, 39}; +#else +const char zx81pins[] = {7, 8, 9, 10, 11, 12, A0, A1, 2, 3, 4, 5, 6 }; +#endif +#endif + +/* + * this is soft SPI for SD cards on MEGAs using + * pins 10-13, a patched SD library is needed + * for this: https://github.com/slviajero/SoftSD + * only needed for MEGA boards with an UNO shield + */ +#undef SOFTWARE_SPI_FOR_SD + +/* + * list of default i2c addresses + * + * some clock modules do have their EEPROM at 0x57. + * 0x050 this is the default lowest adress of standard EEPROMs + * Configurable range is between 0x50 and 0x57 for modules with jumpers. + * Some clock modules do have their EEPROM at 0x57. + * + * Clock default for the size is 4096. Define your EFS EEPROM and I2C EEPROM + * size here. One parameter set is for EFS and one parameter set is for + * plain serial EEPROMs. + * + * RTCs are often at 0x68 + */ +#define EFSEEPROMADDR 0x050 +/* #define EFSEEPROMSIZE 32768 */ + +#define RTCI2CADDR 0x068 + +/* the size of the plain I2C EEPROM, typically a clock */ +#define I2CEEPROMADDR 0x057 +/* #define I2CEEPROMSIZE 4096 */ + +/* is the I2C EEPROM buffered */ +#define ARDUINOI2CEEPROM_BUFFERED + +/* + * Sensor library code - configure your sensors here + */ +#ifdef ARDUINOSENSORS +#undef ARDUINODHT +#define DHTTYPE DHT22 +#define DHTPIN 2 +#define ARDUINOSHT +#define ARDUINOMQ2 +#define MQ2PIN A0 +#undef ARDUINOLMS6 +#undef ARDUINOAHT +#undef ARDUINOBMP280 +#undef ARDUINOBME280 +#endif + + +#if defined(ARDUINOSHT) || defined(ARDUINOLMS6) || defined(ARDUINOAHT) || defined(ARDUINOBMP280) || defined(RDUINOBME280) +#define ARDUINOWIRE +#endif + +/* + * The hardware models. + * These are predefined hardware configurations. + */ + +/* an AVR based Arduino with nothing else */ +#if defined(UNOPLAIN) +#define ARDUINOEEPROM +#endif + +/* an AVR ARDUINO (UNO or MEGA) with the classical LCD shield */ +#if defined(AVRLCD) +#define ARDUINOEEPROM +#define DISPLAYCANSCROLL +#define LCDSHIELD +#endif + +/* + * a Wemos ESP8266 with a mdified datalogger shield + * standalone capable, with Wire and MQTT. + */ +#if defined(WEMOSSHIELD) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOSD +#define ARDUINORTC +#define ARDUINOWIRE +#define SDPIN D8 +#define PS2DATAPIN D2 +#define PS2IRQPIN D9 +#define ARDUINOMQTT +#endif + +/* + * mega with a Ethernet shield + * standalone capable, Ethernet is not enabled by default + */ +#if defined(MEGASHIELD) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define SDPIN 4 +#endif + +/* + * VGA system with SD card, based on the TTGO VGA 1.4 + * ESP32 + * standalone by default, with MQTT + */ +#if defined(TTGOVGA) +#define ARDUINOEEPROM +#define ARDUINOVGA +#define ARDUINOSD +/* #define ARDUINOMQTT */ +#define SDPIN 13 +#define STANDALONE +#endif + +/* + * MEGA with a TFT shield, standalone by default + */ +#if defined(MEGATFT) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOTFT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define PS2DATAPIN 18 +#define PS2IRQPIN 19 +#define SDPIN 53 +#define STANDALONE +#endif + +/* + * DUE with a TFT shield, standalone by default + */ +#if defined(DUETFT) +#undef ARDUINOEEPROM +#define ARDUINOPS2 +#undef ARDUINOUSBKBD +#define DISPLAYCANSCROLL +#define ARDUINOTFT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define ARDUINORTC +#define PS2DATAPIN 9 +#define PS2IRQPIN 8 +#define SDPIN 53 +#define STANDALONE +#endif + +#if defined(NANOBOARD) +#undef USESPICOSERIAL +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define ARDUINOPRT +#define ARDUINOEFS +#define ARDUINORTC +#define ARDUINOWIRE +#define EFSEEPROMADDR 0x050 /* use clock EEPROM 0x057, set to 0x050 for external EEPROM */ +#define STANDALONE +#endif + +/* a UNO shield with memory and EFS EEPROM */ +#if defined(UNOBOARD) +#define ARDUINOEEPROM +#define ARDUINOSPIRAM +#define ARDUINOEFS +#define ARDUINOWIRE +#define EFSEEPROMADDR 0x050 +#define EFSEEPROMSIZE 65534 +#endif + +/* a MEGA shield with memory and SD card */ +#if defined(MEGABOARD) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define ARDUINOPRT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINORTC +#define ARDUINOSPIRAM +#define RAMPIN 53 +#define SDPIN 49 +#endif + +/* an ESP01 board, using the internal flash + * with the ESP01-8266 only pins 0 and 2 are usable freely + * on ESP01-ESP32C3 this is 9 and 2 while 2 is an analog pin + * 9 cannot be pulled on low by any peripheral on boot because this + * brings the board to flash mode + */ +#if defined(ESP01BOARD) +#undef ARDUINOEEPROM +#define ESPSPIFFS +#define ARDUINOMQTT +#define ARDUINOWIRE +#if defined(ARDUINOWIRE) && defined(ARDUINO_ARCH_ESP8266) +#define SDA_PIN 0 +#define SCL_PIN 2 +#endif +/* see: https://github.com/espressif/arduino-esp32/issues/6376 + * nothing should block the port, e.g. DHT or anything + */ +#if defined(ARDUINOWIRE) && defined(ARDUINO_ARCH_ESP32) +#define SDA_PIN 9 +#define SCL_PIN 2 +#endif +/* + * + * Currently only 8=SDA and 9=SCL works / tested with AHT10 + */ +#endif + +/* an RP2040 based board with an ILI9488 display */ +#if defined(RP2040BOARD) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#undef ARDUINOEEPROM +#define ARDUINOI2CEEPROM +#define ARDUINOPRT +#define ARDUINOSD +#undef RP2040LITTLEFS +#define ARDUINOWIRE +#define ARDUINORTC +#define ARDUINOPS2 +#define ARDUINOMQTT +#undef STANDALONE +#endif + +/* an RP2040 Raspberry Pi Pico based board with an ILI9488 display */ +#if defined(RP2040BOARD2) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#undef ARDUINOEEPROM +#undef ARDUINOPRT +#undef ARDUINOSD +#define RP2040LITTLEFS +#undef ARDUINOWIRE +#undef ARDUINORTC +#undef ARDUINOPS2 +#undef ARDUINOMQTT +#undef STANDALONE +#define ILI_LED A2 +#define ILI_CS 15 +#define ILI_RST 14 +#define ILI_DC 13 +#endif + + +/* an ESP32 board with an ILI9488 display, + some SD problems here with some hardware */ +#if defined(ESP32BOARD) +#define ILI_CS 12 +#define ILI_DC 27 +#define ILI_RST 14 +#define ILI_LED 26 +#undef USESPICOSERIAL +#define ESPSPIFFS +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#define ARDUINOEEPROM +#define ARDUINOMQTT +#define ARDUINOWIRE +#endif + +/* a board based on the Arduino MKR 1010 Wifi + * made for low energy games + */ +#if defined(MKR1010BOARD) +#define ILI_CS 7 +#define ILI_DC 4 +#define ILI_RST 6 +#define ILI_LED A3 +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#define ARDUINOEFS +#define ARDUINOMQTT +#define ARDUINOWIRE +/* careful with the setting, lockout possible easily */ +#undef ARDUINOUSBKBD +#undef STANDALONE +#endif + +/* + * defining the systype variable which informs BASIC about the platform at runtime + */ + +#if defined(ARDUINO_ARCH_AVR) +const mem_t bsystype = SYSTYPE_AVR; +#elif defined(ARDUINO_ARCH_ESP8266) +const mem_t bsystype = SYSTYPE_ESP8266; +#elif defined(ARDUINO_ARCH_ESP32) +const mem_t bsystype = SYSTYPE_ESP32; +#elif defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +const mem_t bsystype = SYSTYPE_RP2040; +#elif defined(ARDUINO_ARCH_SAM) && defined(ARDUINO_ARCH_SAMD) +const mem_t bsystype = SYSTYPE_SAM; +#elif defined(ARDUINO_ARCH_XMC) +const mem_t bsystype = SYSTYPE_XMC; +#elif defined(ARDUINO_ARCH_SMT32) +const mem_t bsystype = SYSTYPE_SMT32; +#elif defined(ARDUINO_ARCH_RENESAS) +const mem_t bsystype = SYSTYPE_NRENESA; +#else +const mem_t bsystype = SYSTYPE_UNKNOWN; +#endif + +/* + * DUE has no tone, we switch to emulation mode automatically + */ +#ifdef ARDUINO_SAM_DUE +#define ARDUINOTONEEMULATION +#endif + +/* + * Some settings, defaults, and dependencies + * + * HASWIRE is set to start wire. Some libraries do this again. + * + * Handling Wire and SPI is tricky as some of the libraries + * also include and start SPI and Wire code. + */ + +/* a clock needs wire */ +#ifdef ARDUINORTC +#define ARDUINOWIRE +#endif + +/* a display needs wire */ +#if defined(ARDUINOLCDI2C) || defined(ARDUINOSSD1306) +#define ARDUINOWIRE +#endif + +/* EEPROM storage needs wire */ +#if defined(ARDUINOEFS) +#define ARDUINOWIRE +#endif + +/* external EEPROMs also need wire */ +#if defined(ARDUINOI2CEEPROM) +#define ARDUINOWIRE +#endif + +/* plain Wire support also needs wire ;-) */ +#if defined(ARDUINOWIRE) +#define HASWIRE +#endif + +/* radio needs SPI */ +#if defined(ARDUINORF24) +#define ARDUINOSPI +#endif + +/* a filesystem needs SPI */ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) +#define ARDUINOSPI +#endif + +/* networking may need SPI */ +#if defined(ARDUINOMQTT) +#define ARDUINOSPI +#endif + +/* the NOKIA and ILI9488 display needs SPI */ +#if defined(ARDUINONOKIA51) || defined(ARDUINOILI9488) +#define ARDUINOSPI +#endif + +/* the RAM chips */ +#if defined(ARDUINOSPIRAM) +#define ARDUINOSPI +#endif + + +/* Networking and keyboards need the background task capability */ +#if defined(ARDUINOMQTT) || defined(ARDUINOETH) || defined(ARDUINOUSBKBD) || defined(ARDUINOZX81KBD) +#define BASICBGTASK +#endif + +/* picoserial is not a available on many platforms */ +#ifdef USESPICOSERIAL +#ifndef UCSR0A +#undef USESPICOSERIAL +#endif +#endif + +/* + * graphics adapter only when graphics hardware, overriding the + * language setting + * this is odd and can be removed later on + */ +#if !defined(ARDUINOTFT) && !defined(ARDUINOVGA) && !defined(ARDUINOILI9488) && !defined(ARDUINONOKIA51) && !defined(ARDUINOSSD1306) && !defined(ARDUINOMCUFRIEND) && !defined(ARDUINOGRAPHDUMMY) && !defined(ARDUINOEDP47) +#undef HASGRAPH +#endif + +/* + * incompatibilities and library stuff + */ +/* these platforms have no EEPROM and no emulation built-in */ +#if defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +#undef ARDUINOEEPROM +#endif + +/* + * Keyboard library, on AVR systems Paul Stoffregens original + * PS2 library works. + * I recommend to use my patched version from + * https://github.com/slviajero/PS2Keyboard + * works with ESP, has keyboard.peek() + */ +#ifdef ARDUINOPS2 +#include +#endif + +/* + * The USB keyboard code - tested only on DUE and the like + * not really good + */ +#ifdef ARDUINOUSBKBD +#include +#endif + +/* + * The ZX81 keyboard code - tested on AVR MEGA256 + */ +#ifdef ARDUINOZX81KBD +#include +#endif + +/* + * ESPy stuff, pgmspace has changed location + */ +#ifdef ARDUINOPROGMEM +#ifdef ARDUINO_ARCH_ESP32 +#include +#else +#include +#endif +#endif + +/* + * Fix a few things around XMC, contributed by Florian + */ +#if defined(ARDUINO_ARCH_XMC) +#undef USESPICOSERIAL +#undef ARDUINOPROGMEM +#endif + +/* + * This works for AVR and ESP EEPROM dummy. + * On XMC you need https://github.com/slviajero/XMCEEPROMLib + * Throws a compiler error for other platforms. + */ +#ifdef ARDUINOEEPROM +#ifdef ARDUINO_ARCH_XMC +#include +#else +#ifdef ARDUINO_ARCH_SAMD +//#include +#else +#include +#endif +#endif +#endif + +/* Standard SPI */ +#ifdef ARDUINOSPI +#include +#endif + +/* Standard wire - triggered by the HASWIRE macro now */ +#ifdef HASWIRE +#include +#endif + +/* + * the display library includes for LCD + */ +#ifdef LCDSHIELD +#include +#endif + +/* + * I2C displays + */ + +#ifdef ARDUINOLCDI2C +#include +#endif + +/* + * This is the monochrome library of Oli Kraus + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * It can harware scroll, but this is not yet implemented + */ +#if defined(ARDUINONOKIA51) || defined(ARDUINOSSD1306) +#include +#endif + +/* + * This is the (old) ILI9488 library originally created by Jarett Burket + * https://github.com/slviajero/ILI9488 + * It can hardware scroll (not yet used) + */ +#ifdef ARDUINOILI9488 +#include +#include +#endif + +/* + * This is the MCUFRIED library originally for parallel TFTs + * https://github.com/prenticedavid/MCUFRIEND_kbv + * + */ +#ifdef ARDUINOMCUFRIEND +#include +#include +#endif + +/* + * For TFT we use the UTFT library + * http://www.rinkydinkelectronics.com/library.php?id=51 + * please note the License, it is not GPL but NON COMMERCIAL + * Creative Commons. + */ +#ifdef ARDUINOTFT +#include +#include +#endif + +/* + * Lilygo EDP47 displays, 4.7 inch epapers using the respective library + * from Lilygo + * https://github.com/Xinyuan-LilyGO/LilyGo-EPD47 + * + */ +#ifdef ARDUINOEDP47 +#include "epd_driver.h" +#include "font/firasans.h" +#endif + + +/* + * experimental networking code + * currently the standard Ethernet shield, ESP Wifi + * MKW Wifi, and RP2040 Wifi is supported. All of them + * with the standard library. + * + * In addition to this Pubsub is used + * https://github.com/slviajero/pubsubclient + * for MQTT + */ +#ifdef ARDUINOMQTT +#ifdef ARDUINOETH +#include +#else +#ifdef ARDUINO_ARCH_ESP8266 +#include +#endif +#ifdef ARDUINO_ARCH_ESP32 +#include +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) +#include +#endif +#if defined(ARDUINO_UNOR4_WIFI) +#include +#endif +#endif +#include +#endif + +/* + * VGA is only implemented on one platform - TTGO VGA 1.4 + * Needs https://github.com/slviajero/FabGL + */ +#if defined(ARDUINOVGA) && defined(ARDUINO_TTGO_T7_V14_Mini32) +#include +#include +#endif + +/* + * SD filesystems with the standard SD driver + * for MEGA 256 a soft SPI solution is needed + * if standard shields are used, this is a patched + * SD library https://github.com/slviajero/SoftSD + */ +#ifdef ARDUINOSD +#define FILESYSTEMDRIVER +#if defined(SOFTWARE_SPI_FOR_SD) +#include +#else +#include +#endif +#endif + +/* + * ESPSPIFFS tested on ESP8266 and ESP32 + * supports formating in BASIC + */ +#ifdef ESPSPIFFS +#define FILESYSTEMDRIVER +#ifdef ARDUINO_ARCH_ESP8266 +#include +#endif +#ifdef ARDUINO_ARCH_ESP32 +#include +#include +#endif +#endif + +/* + * RP2040 internal filesystem + * This is test code from https://github.com/slviajero/littlefs + * and the main branch is actively developed + */ +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +#define LFS_MBED_RP2040_VERSION_MIN_TARGET "LittleFS_Mbed_RP2040 v1.1.0" +#define LFS_MBED_RP2040_VERSION_MIN 1001000 +#define _LFS_LOGLEVEL_ 1 +#define RP2040_FS_SIZE_KB 1024 +#define FORCE_REFORMAT false +#include +#endif + +/* + * STM32 SDIO driver for he SD card slot of the STM32F4 boards (and others) + */ +#ifdef STM32SDIO +#define FILESYSTEMDRIVER +#include +#ifndef SD_DETECT_PIN +#define SD_DETECT_PIN SD_DETECT_NONE +#endif +#endif +/* + * external flash file systems override internal filesystems + * currently BASIC can only have one filesystem + */ +#ifdef ARDUINOSD +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#endif + +/* + * support for external EEPROMs as filesystem + * overriding all other filessystems. This is a minimalistic + * filesystem meant for very small systems with not enough + * memory for real filesystems + * https://github.com/slviajero/EepromFS + */ +#ifdef ARDUINOEFS +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#undef ARDUINOSD +#undef STM32SDIO +#define FILESYSTEMDRIVER +#endif + +/* the EFS object is used for filesystems and raw EEPROM access */ +#if (defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED)) || defined(ARDUINOEFS) +#include +#endif + +/* if there is an unbuffered I2C EEPROM, use an autodetect mechanism */ +#if defined(ARDUINOI2CEEPROM) +unsigned int i2ceepromsize = 0; +#endif + +/* + * Software SPI only on Mega2560 + */ +#ifndef ARDUINO_AVR_MEGA2560 +#undef SOFTWARE_SPI_FOR_SD +#endif + +/* + * Arduino default serial baudrate and serial flags for the + * two supported serial interfaces. Serial is always active and + * connected to channel &1 with 9600 baud. + * + * channel 4 (ARDUINOPRT) can be either in character or block + * mode. Blockmode is set as default here. This means that all + * available characters are always loaded to a string -> inb() + */ +const int serial_baudrate = 9600; +mem_t sendcr = 0; + +#ifdef ARDUINOPRT +int serial1_baudrate = 9600; +mem_t blockmode = 1; +#else +const int serial1_baudrate = 0; +mem_t blockmode = 0; +#endif + +/* handling time - part of the Arduino core - only needed on POSIX OSes */ +void timeinit() {} + +/* starting wiring is only needed on raspberry */ +void wiringbegin() {} + +/* POSIX signals - not needed here */ +void signalon() {} + +/* + * helper functions OS, heuristic on how much memory is + * available in BASIC + * Arduino information from + * data from https://docs.arduino.cc/learn/programming/memory-guide + */ +#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_XMC) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RENESAS) +extern "C" char* sbrk(int incr); +long freeRam() { + char top; + return &top - reinterpret_cast(sbrk(0)); +} +#elif defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_LGT8F) +long freeRam() { + extern int __heap_start,*__brkval; + int v; + return (int)&v - (__brkval == 0 + ? (int)&__heap_start : (int) __brkval); +} +#elif defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) +long freeRam() { + return ESP.getFreeHeap(); +} +#else +long freeRam() { + return 0; +} +#endif + +/* + * Heuristic Wifi systems reserve 4k by default, small 8 bit AVR try to guess sizes conservatively + * RP2040 cannot measure, we set to 16 bit full address space + */ +long freememorysize() { +#if defined(ARDUINO_ARCH_RENESAS) + return freeRam() - 2000; +#endif +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32) + return freeRam() - 4000; +#endif +#if defined(ARDUINO_ARCH_XMC) + return freeRam() - 2000; +#endif +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_LGT8F) + int overhead=192; +#ifdef HASFLOAT + overhead+=96; +#endif +#ifdef ARDUINO_AVR_MEGA2560 + overhead+=96; +#endif +#ifdef ARDUINOWIRE + overhead+=128; +#endif +#ifdef ARDUINORF24 + overhead+=128; +#endif +#if defined(ARDUINOSD) + overhead+=512; +#endif +#ifdef ARDUINOZX81KBD + overhead+=64; +#endif +#ifdef ARDUINOETH + overhead+=256; +#endif +#ifdef HASGRAPH + overhead+=256; /* a bit on the safe side */ +#endif + return freeRam() - overhead; +#endif +#if defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) + return 65536; +#endif + return 0; +} + +/* + * the sleep and restart functions - only implemented for some controllers + */ +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) +void(* callzero)() = 0; +#endif + +void restartsystem() { + eflush(); /* if there is a I2C eeprom dummy, flush the buffer */ +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + ESP.restart(); +#endif +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) + callzero(); +#endif +#if defined(ARDUINO_ARCH_LGT8F) +#endif +} + +/* + * I used these two articles + * https://randomnerdtutorials.com/esp8266-deep-sleep-with-arduino-ide/ + * https://randomnerdtutorials.com/esp32-deep-sleep-arduino-ide-wake-up-sources/ + * for this very simple implementation - needs to be improved (pass data from sleep + * state to sleep state via EEPROM) + */ +#if defined(ARDUINO_ARCH_SAMD) +#define HASBUILTINRTC +#include "RTCZero.h" +#include "ArduinoLowPower.h" +RTCZero rtc; +#endif + +/* STM32duino have the same structure */ +#if defined(ARDUINO_ARCH_STM32) +#define HASBUILTINRTC +#include "STM32RTC.h" +#include "STM32LowPower.h" +STM32RTC& rtc = STM32RTC::getInstance(); +#endif + +/* the NRENESA board have a buildin RTC as well */ +#if defined(ARDUINO_ARCH_RENESAS) +#define HASBUILTINRTC +#include "RTC.h" +RTCTime rtc; +#endif + + +/* for ESP32 we also include the time stuctures and offer a POSIX style clock*/ +#if defined(ARDUINO_ARCH_ESP32) +#include "time.h" +#include +#endif + + +/* this is unfinished, don't use */ +void rtcsqw(); + +#define LOWPOWERINTPIN 2 +void aftersleepinterrupt(void) { } + +void activatesleep(long t) { + eflush(); /* if there is a I2C eeprom dummy, flush the buffer */ +#if defined(ARDUINO_ARCH_ESP8266) + ESP.deepSleep(t*1000); +#endif +#if defined(ARDUINO_ARCH_ESP32) + esp_sleep_enable_timer_wakeup(t*1000); + esp_deep_sleep_start(); +#endif +#if defined(ARDUINO_ARCH_SAMD) + LowPower.sleep((int) t); +#endif +#if defined(ARDUINO_AVR_ATmega644) +/* unfinished, don't use, just test code + rtcsqw(); + pinMode(LOWPOWERINTPIN, INPUT_PULLUP); + attachInterrupt(digitalPinToInterrupt(LOWPOWERINTPIN), aftersleepinterrupt, CHANGE); + sleepMode(SLEEP_POWER_SAVE); + sleep(); + detachInterrupt(digitalPinToInterrupt(LOWPOWERINTPIN)); + noSleep(); +*/ +#endif +} + +/* + * start the SPI bus - this is a little mean as some libraries also + * try to start the SPI which may lead to on override of the PIN settings + * if the library code is not clean - currenty no conflict known + */ +void spibegin() { +#ifdef ARDUINOSPI +#ifdef ARDUINO_TTGO_T7_V14_Mini32 +/* this fixes the wrong board definition in the ESP32 core for this board */ + SPI.begin(14, 2, 12, 13); +#else + SPI.begin(); +#endif +#endif +} + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear(), dspupdate() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + * + * Non rgb ready displays on rgbcolor translate to their native color + * when BASIC requests an rgb color, in this case the nearest 4 bit + * color of the display is also stored for use in the text DISLAY driver + * code + */ + + /* generate a 4 bit vga color from a given rgb color */ +uint8_t rgbtovga(int r, int g, int b) { + short vga; + if (r>191 || g>191 || b>191) vga=8; else vga=0; + vga=vga+r/128+g/128*2+b/128*4; + return vga; +} + +/* + * global variables for a standard LCD shield. + * Includes the standard Arduino LiquidCrystal library + */ +#ifdef LCDSHIELD +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +/* LCD shield pins to Arduino + * RS, EN, d4, d5, d6, d7; + * backlight on pin 10; + */ +const int dsp_rows=2; +const int dsp_columns=16; +LiquidCrystal lcd( 8, 9, 4, 5, 6, 7); +void dspbegin() { lcd.begin(dsp_columns, dsp_rows); dspsetscrollmode(1, 1); } +void dspprintchar(char c, mem_t col, mem_t row) { lcd.setCursor(col, row); if (c) lcd.write(c);} +void dspclear() { lcd.clear(); } +void dspupdate() {} +void dspsetcursor(mem_t c) { if (c) lcd.blink(); else lcd.noBlink(); } +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +#define HASKEYPAD +/* elementary keypad reader left=1, right=2, up=3, down=4, select= */ +short keypadread(){ + int a=analogRead(A0); + if (a >= 850) return 0; + else if (a>=600 && a<850) return 10; + else if (a>=400 && a<600) return '1'; + else if (a>=200 && a<400) return '3'; + else if (a>=60 && a<200) return '4'; + else return '2'; +} +/* repeat mode of the keypad - off means block, on means return immediately */ +mem_t kbdrepeat=0; +#endif + +/* + * A LCD display connnected via I2C, uses the standard + * Arduino I2C display library. + */ +#ifdef ARDUINOLCDI2C +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +const int dsp_rows=4; +const int dsp_columns=20; +LiquidCrystal_I2C lcd(0x27, dsp_columns, dsp_rows); +void dspbegin() { lcd.init(); lcd.backlight(); dspsetscrollmode(1, 1); } +void dspprintchar(char c, mem_t col, mem_t row) { lcd.setCursor(col, row); if (c) lcd.write(c); } +void dspclear() { lcd.clear(); } +void dspupdate() {} +void dspsetcursor(mem_t c) { if (c) lcd.blink(); else lcd.noBlink(); } +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +#endif + +/* + * A Nokia 5110 with ug8lib2 - can scroll quite well + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + * + * default PIN settings here are for ESP8266, using the standard + * SPI SS for 15 for CS/CE, and 0 for DC, 2 for reset + * + */ +#ifdef ARDUINONOKIA51 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#ifndef NOKIA_CS +#define NOKIA_CS 15 +#endif +#ifndef NOKIA_DC +#define NOKIA_DC 0 +#endif +#ifndef NOKIA_RST +#define NOKIA_RST 2 +#endif +U8G2_PCD8544_84X48_F_4W_HW_SPI u8g2(U8G2_R0, NOKIA_CS, NOKIA_DC, NOKIA_RST); +const int dsp_rows=6; +const int dsp_columns=10; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +char dspfontsize = 8; +void dspbegin() { u8g2.begin(); u8g2.setFont(u8g2_font_amstrad_cpc_extended_8r); } +void dspprintchar(char c, mem_t col, mem_t row) { char b[] = { 0, 0 }; b[0]=c; if (c) u8g2.drawStr(col*dspfontsize+2, (row+1)*dspfontsize, b); } +void dspclear() { u8g2.clearBuffer(); u8g2.sendBuffer(); dspfgcolor=1; } +void dspupdate() { u8g2.sendBuffer(); } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; u8g2.setDrawColor(dspfgcolor); } +void plot(int x, int y) { u8g2.setDrawColor(dspfgcolor); u8g2.drawPixel(x, y); dspgraphupdate(); } +void line(int x0, int y0, int x1, int y1) { u8g2.drawLine(x0, y0, x1, y1); dspgraphupdate(); } +void rect(int x0, int y0, int x1, int y1) { u8g2.drawFrame(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void frect(int x0, int y0, int x1, int y1) { u8g2.drawBox(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void circle(int x0, int y0, int r) { u8g2.drawCircle(x0, y0, r); dspgraphupdate(); } +void fcircle(int x0, int y0, int r) { u8g2.drawDisc(x0, y0, r); dspgraphupdate(); } +#endif + +/* + * 4.7 inch epaper displays are derived from the NOKIA51 code, no grayscales + * at the moment. Forcing the font into rectangles and hoping this works. + * + * Epapers bypass the display driver here and use a graphics based display + * mode instead + */ +#ifdef ARDUINOEDP47 +#define GRAPHDISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +const int dsp_width=960; +const int dsp_height=540; +const int dsp_rows=0; +const int dsp_columns=0; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +char dspfontsize = 24; +int dspgraphcursor_x = 0; +int dspgraphcursor_y = dspfontsize; +void dspbegin() { epd_init(); dspclear(); } +void dspprintstring(char* s) { + epd_poweron(); + writeln((GFXfont *)&FiraSans, s, &dspgraphcursor_x, &dspgraphcursor_y, NULL); + epd_poweroff(); +} +void dspclear() { epd_poweron(); epd_clear(); epd_poweroff(); dspfgcolor=1; } +void dspupdate() { } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; } +void plot(int x, int y) { } +void line(int x0, int y0, int x1, int y1) { } +void rect(int x0, int y0, int x1, int y1) { } +void frect(int x0, int y0, int x1, int y1) { } +void circle(int x0, int y0, int r) { } +void fcircle(int x0, int y0, int r) { } +#endif + + +/* + * Small SSD1306 OLED displays with I2C interface + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + */ +#ifdef ARDUINOSSD1306 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#define SSD1306WIDTH 32 +#define SSD1306HEIGHT 128 +/* constructors may look like this, last argument is the reset pin + * //U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); + * //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); + */ +#if SSD1306WIDTH == 32 +/* U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); + * use hardware I2C instead of software. Tested (only) on ESP32C3 and ESP8266 so far. + */ +U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0); +#endif +#if SSD1306WIDTH == 64 +/* the Heltec board has an internal software I2C on pins 4=SDA and 15=SCL */ +#ifdef ARDUINO_heltec_wifi_lora_32_V2 +U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, 15, 4, 16); +#else +/* use hardware I2C instead of software. Tested (only) on ESP32C3 and ESP8266 so far. + */ +U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0); +#endif +#endif +const char dspfontsize = 8; +const int dsp_rows=SSD1306WIDTH/dspfontsize; +const int dsp_columns=SSD1306HEIGHT/dspfontsize; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +void dspbegin() { u8g2.begin(); u8g2.setFont(u8g2_font_amstrad_cpc_extended_8r); } +void dspprintchar(char c, mem_t col, mem_t row) { char b[] = { 0, 0 }; b[0]=c; if (c) u8g2.drawStr(col*dspfontsize+2, (row+1)*dspfontsize, b); } +void dspclear() { u8g2.clearBuffer(); u8g2.sendBuffer(); dspfgcolor=1; } +void dspupdate() { u8g2.sendBuffer(); } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; u8g2.setDrawColor(dspfgcolor); } +void plot(int x, int y) { u8g2.setDrawColor(dspfgcolor); u8g2.drawPixel(x, y); dspgraphupdate(); } +void line(int x0, int y0, int x1, int y1) { u8g2.drawLine(x0, y0, x1, y1); dspgraphupdate(); } +void rect(int x0, int y0, int x1, int y1) { u8g2.drawFrame(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void frect(int x0, int y0, int x1, int y1) { u8g2.drawBox(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void circle(int x0, int y0, int r) { u8g2.drawCircle(x0, y0, r); dspgraphupdate(); } +void fcircle(int x0, int y0, int r) { u8g2.drawDisc(x0, y0, r); dspgraphupdate(); } +#endif + +/* + * A ILI9488 with Jarett Burkets version of Adafruit GFX and patches + * by Stefan Lenz + * currently only slow software scrolling implemented in BASIC + * + * https://github.com/slviajero/ILI9488 + * + * we use 9, 8, 7 as CS, CE, RST by default and A7 for the led brightness control + */ + +#ifdef ARDUINOILI9488 +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#ifndef ILI_CS +#define ILI_CS 9 +#endif +#ifndef ILI_DC +#define ILI_DC 8 +#endif +#ifndef ILI_RST +#define ILI_RST 7 +#endif +#ifndef ILI_LED +#define ILI_LED A3 +#endif +ILI9488 tft = ILI9488(ILI_CS, ILI_DC, ILI_RST); +/* ILI in landscape */ +const int dsp_rows=20; +const int dsp_columns=30; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { + tft.begin(); + tft.setRotation(3); /* ILI in landscape, SD slot up */ + tft.setTextColor(dspfgcolor); + tft.setTextSize(2); + tft.fillScreen(dspbgcolor); + pinMode(ILI_LED, OUTPUT); + analogWrite(ILI_LED, 255); + dspsetscrollmode(1, 4); +} +void dspprintchar(char c, mem_t col, mem_t row) { if (c) tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, 2); } +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +/* + * A MCUFRIEND parallel port display for the various tft shields + * This implementation is mainly for Arduino MEGA + * + * currently only slow software scrolling implemented in BASIC + * + */ + +#ifdef ARDUINOMCUFRIEND +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#ifndef LCD_CS +#define LCD_CS A3 +#endif +#ifndef LCD_CD +#define LCD_CD A2 +#endif +#ifndef LCD_WR +#define LCD_WR A1 +#endif +#ifndef LCD_RD +#define LCD_RD A0 +#endif +#ifndef LCD_RESET +#define LCD_RESET A4 +#endif +MCUFRIEND_kbv tft; +/* ILI in landscape */ +const int dsp_rows=20; +const int dsp_columns=30; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { + uint16_t ID = tft.readID(); + if (ID == 0xD3D3) ID = 0x9481; /* write-only shield - taken from the MCDFRIEND demo */ + tft.begin(ID); + tft.setRotation(1); /* ILI in landscape, 3: SD slot on right the side */ + tft.setTextColor(dspfgcolor); + tft.setTextSize(2); + tft.fillScreen(dspbgcolor); + dspsetscrollmode(1, 4); /* scrolling is on, scroll 4 lines at once */ + } +void dspprintchar(char c, mem_t col, mem_t row) { if (c) tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, 2); } +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +/* + * A no operations graphics dummy + * Tests the BASIC side of the graphics code without triggering + * any output + */ +#ifdef ARDUINOGRAPHDUMMY +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +const int dsp_rows=20; +const int dsp_columns=30; +const uint16_t dspdefaultfgcolor = 1; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +dspcolor_t dspfgcolor = 0xFFFF; +dspcolor_t dspbgcolor = 0x0000; +void dspbegin() { dspsetscrollmode(1, 4); } +void dspprintchar(char c, mem_t col, mem_t row) {} +void dspclear() {} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgcolor=0; } +void vgacolor(short c) { + short base=128; + if (c==8) { rgbcolor(64, 64, 64); return; } + if (c>8) base=255; + rgbcolor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) {} +void line(int x0, int y0, int x1, int y1) {} +void rect(int x0, int y0, int x1, int y1) {} +void frect(int x0, int y0, int x1, int y1) {} +void circle(int x0, int y0, int r) {} +void fcircle(int x0, int y0, int r) {} +#endif + + +/* + * SD1963 TFT display code with UTFT. + * Tested witth SD1963 800*480 board. + * it is mainly intended for a MEGA or DUE as a all in one system + * this is for a MEGA shield and the CTE DUE shield, for the due + * you need to read the comment in Arduino/libraries/UTFT/hardware/arm + * HW_ARM_defines.h -> uncomment the DUE shield + * See also + * https://github.com/slviajero/tinybasic/wiki/Projects:-4.-A-standalone-computer-with-a-TFT-screen-based-on-a-DUE + */ +#ifdef ARDUINOTFT +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +extern uint8_t SmallFont[]; +extern uint8_t BigFont[]; +#ifdef ARDUINO_SAM_DUE +UTFT tft(CTE70,25,26,27,28); +#else +UTFT tft(CTE70,38,39,40,41); +#endif +const int dsp_rows=30; +const int dsp_columns=50; +char dspfontsize = 16; +const uint32_t dspdefaultfgcolor = 0x00FFFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +typedef uint32_t dspcolor_t; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { tft.InitLCD(); tft.setFont(BigFont); tft.clrScr(); dspsetscrollmode(1, 4); } +void dspprintchar(char c, mem_t col, mem_t row) { if (c) tft.printChar(c, col*dspfontsize, row*dspfontsize); } +void dspclear() { + tft.clrScr(); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; + vgacolor(dspfgvgacolor); +} +void rgbcolor(int r, int g, int b) { + tft.setColor(r,g,b); + dspfgcolor=((uint8_t)r << 16) + ((uint8_t)g << 8) + b; + dspfgvgacolor=rgbtovga(r, g, b); +} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { tft.setColor(64, 64, 64); return; } + if (c>8) base=255; + tft.setColor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void plot(int x, int y) { tft.drawPixel(x, y); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1); } +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r); } +#endif + +/* + * this is the VGA code for fablib - experimental + * not all modes and possibilities explored, with networking on an ESP + * VGA16 is advisable. It leaves enough memory for the interpreter and network. + * this code overrides the display driver logic as fabgl brings an own + * terminal emulation + */ +#if defined(ARDUINOVGA) && defined(ARDUINO_TTGO_T7_V14_Mini32) +/* static fabgl::VGAController VGAController; */ +fabgl::VGA16Controller VGAController; /* 16 color object with less memory */ +static fabgl::Terminal Terminal; +static Canvas cv(&VGAController); +TerminalController tc(&Terminal); +Color vga_graph_pen = Color::BrightWhite; +Color vga_graph_brush = Color::Black; +Color vga_txt_pen = Color::BrightGreen; +Color vga_txt_background = Color::Black; +#ifdef HASTONE +fabgl::SoundGenerator soundGenerator; +#endif + + +/* this starts the vga controller and the terminal right now */ +void vgabegin() { + VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_15); + VGAController.setResolution(VGA_640x200_70Hz); + Terminal.begin(&VGAController); + Terminal.setBackgroundColor(vga_txt_background); + Terminal.setForegroundColor(vga_txt_pen); + Terminal.connectLocally(); + Terminal.clear(); + Terminal.enableCursor(1); + Terminal.setTerminalType(TermType::VT52); +} + +int vgastat(char c) {return 0; } + +/* scale the screen size */ +void vgascale(int* x, int* y) { + *y=*y*10/24; +} + +void rgbcolor(int r, int g, int b) { + short vga; + if (r>191 || g>191 || b>191) vga=8; else vga=0; + vga=vga+r/128+g/128*2+b/128*4; + vga_graph_pen=fabgl::Color(vga); +} + +void vgacolor(short c) { vga_graph_pen = fabgl::Color(c%16); } +void plot(int x, int y) { + vgascale(&x, &y); + cv.setPenColor(vga_graph_pen); + cv.setPixel(x,y); + cv.setPenColor(vga_txt_pen); +} + +void line(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawLine(x0, y0, x1, y1); + cv.setPenColor(vga_txt_pen); +} + +void rect(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawRectangle(x0, y0, x1, y1); + cv.setPenColor(vga_txt_pen); +} + +void frect(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setBrushColor(vga_graph_pen); + cv.fillRectangle(x0, y0, x1, y1); + cv.setBrushColor(vga_txt_background); +} + +void circle(int x0, int y0, int r) { + int rx = r; + int ry = r; + vgascale(&x0, &y0); + vgascale(&rx, &ry); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawEllipse(x0, y0, rx, ry); + cv.setPenColor(vga_txt_pen); +} + +void fcircle(int x0, int y0, int r) { + int rx = r; + int ry = r; + vgascale(&x0, &y0); + vgascale(&rx, &ry); + cv.setBrushColor(vga_graph_pen); + cv.fillEllipse(x0, y0, rx, ry); + cv.setBrushColor(vga_txt_background); +} + +void vgawrite(char c){ + switch(c) { + case 12: /* form feed is clear screen */ + Terminal.write(27); Terminal.write('H'); + Terminal.write(27); Terminal.write('J'); + return; + case 10: /* this is LF Unix style doing also a CR */ + Terminal.write(10); Terminal.write(13); + return; + } + Terminal.write(c); +} +#else +void vgabegin(){} +int vgastat(char c) {return 0; } +void vgawrite(char c){} +#endif + +/* + * Keyboard code for either the Fablib Terminal class or + * PS2Keyboard - please note that you need the ESP patched + * version here as mentioned above + * + * sets HASKEYBOARD to inform basic about this capability + * + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +#ifdef ARDUINO_TTGO_T7_V14_Mini32 +#define PS2FABLIB +#define HASKEYBOARD +fabgl::PS2Controller PS2Controller; +char fabgllastchar = 0; +#else +#if defined(ARDUINO) && defined(ARDUINOPS2) +#define PS2KEYBOARD +#define HASKEYBOARD +PS2Keyboard keyboard; +#else +#if defined(ARDUINO) && defined(ARDUINOUSBKBD) +#define HASKEYBOARD +#define USBKEYBOARD +USBHost usb; +KeyboardController keyboard(usb); +char usbkey=0; +#else +#if defined(ARDUINOZX81KBD) +#define HASKEYBOARD +#define ZX81KEYBOARD +ZX81Keyboard keyboard; +#endif +#endif +#endif +#endif + +/* + * Experimental, unfinished, rudimentary + */ +#if defined(ARDUINOUSBKBD) +/* not really needed, only here for reference */ +char usbkeymapUS[] = +{' ', '"', '!', '#', '$', '%', '&', '\'', '(', ')', '*', '+', + ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', + 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', + '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', 0, 0}; +/* map the ASCII codes of the essential keys for BASIC of a + * German keyboard, most notable is < and > which is ö/a + */ +char usbkeymapGerman[] = +{' ', '!', '!', '#', '$', '%', '/', '>', ')', '=', '(', '+', + ',', '-', '.', '-', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', '<', ';', '=', ':', '_', '"', 'A', 'B', 'C', + 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Z', 'Y', '[', + '#', '+', '&', '?', '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'z', 'y', '{', '\'', '*', 0, 0}; + +/* + * he weak functions from the keyboard controller class implemented + */ +void keyPressed() {} +void keyReleased() { + switch (keyboard.getOemKey()) { + case 40: + usbkey=10; + break; + case 42: + case 76: + usbkey=127; + break; + case 41: + usbkey=27; + break; + default: + usbkey=keyboard.getKey(); + if (usbkey>31 && usbkey<128) usbkey=usbkeymapGerman[usbkey-32]; + } +} +#endif + +/* + * keyboard controller code + */ + +void kbdbegin() { +#ifdef PS2KEYBOARD + keyboard.begin(PS2DATAPIN, PS2IRQPIN, PS2Keymap_German); +#else +#ifdef PS2FABLIB + PS2Controller.begin(PS2Preset::KeyboardPort0); + PS2Controller.keyboard()->setLayout(&fabgl::GermanLayout); +#else +#ifdef USBKEYBOARD +/* nothing to be done here */ +#else +#ifdef ZX81KEYBOARD + keyboard.begin(zx81pins); +#endif +#endif +#endif +#endif +} + +int kbdstat(char c) {return 0; } + +char kbdavailable(){ +#ifdef PS2KEYBOARD + return keyboard.available(); +#else +#ifdef PS2FABLIB + if (fabgllastchar) return Terminal.available()+1; else return Terminal.available(); +#else +#ifdef USBKEYBOARD +/* if we already have a key, tell the caller we have one */ + if (usbkey) return 1; +/* if not, look it up */ + if (usbkey) return 1; else return 0; +#else +#ifdef ZX81KEYBOARD + return keyboard.available(); +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD +/* a poor man's debouncer, unstable state returns 0 */ + char c=keypadread(); + if (c != 0) { + bdelay(2); + if (c == keypadread()) return 1; + } +#endif + return 0; +} + +char kbdread() { + char c = 0; + while(!kbdavailable()) byield(); +#ifdef PS2KEYBOARD + c=keyboard.read(); +#endif +#ifdef PS2FABLIB + if (fabgllastchar) { c=fabgllastchar; fabgllastchar=0; } + else c=Terminal.read(); +#else +#ifdef USBKEYBOARD +/* if we have read a key before, return it else look it up */ + c=usbkey; + usbkey=0; +#else +#ifdef ZX81KEYBOARD + c=keyboard.read(); +#endif +#endif +#endif +#ifdef HASKEYPAD + if (c == 0) { /* we have no character from a real keyboard, ask the keypad */ + c=keypadread(); +/* if the keypad is in non repeat mode, block */ + if (!kbdrepeat) while(kbdavailable()) byield(); + } +#endif + if (c == 13) c=10; + return c; +} + +char kbdcheckch() { +#ifdef PS2KEYBOARD +/* + * only works with the patched library https://github.com/slviajero/PS2Keyboard + */ +#ifdef PS2KEYBOARD_HASPEEK + return keyboard.peek(); +#else +/* + * for the original library https://github.com/PaulStoffregen/PS2Keyboard + * GET does not work properly with it as there is no peek functionality which is needed + * for non blocking IO and the ability to stop programs + */ + if (kbdavailable()) return kbdread(); else return 0; +#endif +#else +#ifdef PS2FABLIB + if (fabgllastchar) return fabgllastchar; + if (kbdavailable()) { fabgllastchar=Terminal.read(); return fabgllastchar; } +#else +#ifdef USBKEYBOARD + return usbkey; +#else +#ifdef ZX81KEYBOARD + return keyboard.lastKey; /* dont peek here as checkch called in a fast loop in statement(), peek done in byield*/ +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD + return keypadread(); +#endif + return 0; +} + +/* + * this is a generic display code + * it combines the functions of LCD and TFT drivers + * if this code is active + * + * dspprintchar(char c, short col, short row) + * dspclear() + * dspbegin() + * dspupdate() + * dspsetcursor(mem_t c) + * dspsetfgcolor(address_t c) + * void dspsetbgcolor(address_t c) + * void dspsetreverse(mem_t c) + * mem_t dspident() + * + * have to be defined before in a hardware dependent section. + * Only dspprintchar and dspclear are needed, all other can be stubs + * + * VGA systems don't use the display driver for text based output. + * + * The display driver exists as a buffered version that can scroll + * or an unbuffered version that cannot scroll. Interfaces to hardware + * scrolling are not yet implemented. + * + * A VT52 state engine is implemented and works for buffered and + * unbuffered displays. Only buffered displays have the full VT52 + * feature set including most of the GEMDOS extensions described here: + * https://en.wikipedia.org/wiki/VT52 + * + * dspupdatemode controls the page update behaviour + * 0: character mode, display each character separately + * 1: line mode, update the display after each line + * 2: page mode, update the display after an ETX + * ignored if the display has no update function + * + */ + +#ifdef DISPLAYDRIVER + +/* the cursor position */ +mem_t dspmycol = 0; +mem_t dspmyrow = 0; + +/* the escape state of the vt52 terminal */ +mem_t dspesc = 0; + +/* which update mode do we have */ +mem_t dspupdatemode = 0; + +/* how do we handle wrap 0 is wrap, 1 is no wrap */ +mem_t dspwrap = 0; + +/* the print mode */ +mem_t dspprintmode = 0; + +/* the scroll control variables */ +mem_t dspscrollmode = 0; +mem_t dsp_scroll_rows = 1; + +int dspstat(char c) { return 0; } + +void dspsetcursorx(mem_t c) { + if (c>=0 && c=0 && r=0 && i<=dsp_columns*dsp_rows-1) return dspbuffer[i/dsp_columns][i%dsp_columns]; else return 0; +} + +dspbuffer_t dspgetrc(mem_t r, mem_t c) { return dspbuffer[r][c]; } + +dspbuffer_t dspgetc(mem_t c) { return dspbuffer[dspmyrow][c]; } + +/* this functions prints a character and updates the display buffer */ +void dspsetxy(dspbuffer_t ch, mem_t c, mem_t r) { + if (r>=0 && c>=0 && r> 8) & 15); + dspprintchar(b & charmask, c, r); + dsprestorepen(); +#else + dspprintchar(b, c, r); +#endif + } else { + dspprintchar(' ', c, r); + } + } + dspbuffer[r][c]=b; + } + } + +/* delete the characters in the remaining lines */ + for (r=dsp_rows-scroll_rows; rline; r--) { + for (c=0; c> 8) & 15); + dspprintchar(b & charmask, c, r); + dsprestorepen(); +#else + dspprintchar(b, c, r); +#endif + } else { + dspprintchar(' ', c, r); + } + } + dspbuffer[r][c]=b; + } + } + +/* delete the characters in the remaining line */ + for (c=0; c= dsp_rows) dspscroll(dsp_scroll_rows); + dspmycol=0; + if (dspupdatemode == 1) dspupdate(); + return; + case 11: // vertical tab - converted to line feed without carriage return + if (dspmyrow < dsp_rows-1) dspmyrow++; + return; + case 12: // form feed is clear screen plus home + dspbufferclear(); + dspclear(); + return; + case 13: // classical carriage return, no form feed + dspmycol=0; + return; + case 27: // escape - initiate vtxxx mode + dspesc=1; + return; + case 28: // cursor back - this is what terminal applications send for cursor back + if (dspmycol > 0) dspmycol--; + return; + case 29: // cursor forward - this is what terminal applications send for cursor back + if (dspmycol < dsp_columns-1) dspmycol++; + return; + case 8: // back space is delete the moment + case 127: // delete + if (dspmycol > 0) { + dspmycol--; + dspsetxy(0, dspmycol, dspmyrow); + } + return; + case 2: // we abuse start of text as a home sequence, may also be needed for Epaper later + dspmycol=dspmyrow=0; + return; + case 3: // ETX = Update display for buffered display like Epaper + dspupdate(); + return; + default: // eliminate all non printables - problematic for LCD special character + if (c<32) return; + break; + } + + dspsetxy(c, dspmycol, dspmyrow); + dspmycol++; + if (dspmycol == dsp_columns) { + if (!dspwrap) { /* we simply ignore the cursor */ + dspmycol=0; + dspmyrow=(dspmyrow + 1); + } + if (dspmyrow >= dsp_rows) dspscroll(dsp_scroll_rows); + } + if (dspupdatemode == 0) dspupdate(); +} + +/* + * This is the minimalistic VT52 state engine. It is an interface to + * process single byte control sequences of the form char + */ + +#ifdef HASVT52 +/* the state variable */ +char vt52s = 0; + +/* the graphics mode mode - unused so far */ +mem_t vt52graph = 0; + +/* the secondary cursor */ +mem_t vt52mycol = 0; +mem_t vt52myrow = 0; + +/* temp variables for column and row , do them here and not in the case: guess why */ +mem_t vt52tmpr; +mem_t vt52tmpc; + +/* an output buffer for the vt52 terminal */ +const mem_t vt52buffersize = 4; +char vt52outbuffer[vt52buffersize] = { 0, 0, 0, 0 }; +mem_t vt52bi = 0; +mem_t vt52bj = 0; + +/* the reader from the buffer */ +char vt52read() { + if (vt52bi<=vt52bj) { vt52bi = 0; vt52bj = 0; } /* empty, reset */ + if (vt52bi>vt52bj) return vt52outbuffer[vt52bj++]; + return 0; +} + +/* the avail from the buffer */ +mem_t vt52avail() { return vt52bi-vt52bj; } + +/* putting something into the buffer */ +void vt52push(char c) { + if (vt52bi < vt52buffersize) vt52outbuffer[vt52bi++]=c; +} + +/* clear the buffer */ +void vt52clear() { + vt52bi=0; +} + +/* something little */ +uint8_t vt52number(char c) { + uint8_t b=c; + if (b>31) return b-32; else return 0; +} + +/* + * The VT52 data registers for the graphics and wiring extension. + * x,y are 14 bit and z is 7bit. Data is transferred in VT52 style + * -> numerical value plus 32 to map the data to printable characters + * Access is done through the the ESC x, ESC y and ESC z sequences: + * ESC x #1 #2 + * sets the xregister to (#1-32)+(#2-32)*128 + */ + +#if defined(DISPLAYHASGRAPH) || defined(VT52WIRING) +#define VT52HASREGISTERS +/* the three register variables */ +uint16_t vt52regx = 0; +uint16_t vt52regy = 0; +uint8_t vt52regz = 0; + +/* one argument cache for two byte arguments */ +uint8_t vt52arg = 0; +#endif + +/* + * graphics code in VT52, if you want to control graphics from the character stream + * The ESC g sequence sends a graphics command as the second byte after the g + * + * Valid values for g are + * s: set the graphics cursor + * p: plot a point + * l: draw a line + * L: draw a line and move the cursor to the endpoint + * r: draw a rectangle + * R: draw a filled rectangle + * c: draw a circle + * C: draw a filled circle + * + */ +#ifdef DISPLAYHASGRAPH +/* the grahics cursor of VT52 */ +uint16_t vt52graphx = 0; +uint16_t vt52graphy = 0; + +/* execute one graphics command */ +void vt52graphcommand(uint8_t c) { + switch(c) { + case 's': /* set the cursor */ + vt52graphx=vt52regx; + vt52graphy=vt52regy; + break; + case 'p': /* plot a point at the cursor */ + plot(vt52graphx, vt52graphy); + break; + case 'l': /* plot a line */ + line(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'L': /* plot a line and update the cursor, needed for drawing shapes */ + line(vt52graphx, vt52graphy, vt52regx, vt52regy); + vt52graphx=vt52regx; + vt52graphy=vt52regy; + break; + case 'r': /* plot a rectangle */ + rect(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'c': /* plot a circle */ + circle(vt52graphx, vt52graphy, vt52regx); + break; + case 'R': /* plot a filled rectangle */ + frect(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'C': /* plot a filled circle */ + fcircle(vt52graphx, vt52graphy, vt52regx); + break; + } +} +#endif + +/* + * this is an odd part of the vt52 code with this, the terminal + * can control the digital and analog pins. + * it is meant for situations where the terminal is controlled by a (powerful) + * device with no or very few I/O pins. It can use the pins of the Arduino through + * the terminal. This works as long as everything stays within the terminals timescale + * On a 9600 baud interface, the character processing time is 1ms, everything slower + * than approximately 10ms can be done through the serial line. + */ + +#ifdef VT52WIRING +#define VT52HASREGISTERS + void vt52wiringcommand(uint8_t c) { + switch(c) { + case 'p': /* pinMode z */ + pinMode(vt52regz); + break; + case 'l': /* digital write low pin z*/ + digitalWrite(vt52regz, LOW); + break; + case 'h': /* digital write high pin z*/ + digitalWrite(vt52regz, HIGH); + break; + case 'r': /* digital read from pin z */ + vt52push(digitalRead(vt52regz)+32); + break; + case 'a': /* analog write pin z to value x */ + analogWrite(vt52regz, vt52regx); + break; + case 'A': /* analog read from pin z */ + break; + case 't': /* tone at pin z, frequency x, duration y */ + tone(vt52regz, vt52regx, vt52regy); + break; + } + } +#endif + + +/* vt52 state engine */ +void dspvt52(char* c){ + +/* reading and processing multi byte commands */ + switch (vt52s) { + case 'Y': + if (dspesc == 2) { + dspsetcursory(vt52number(*c)); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + dspsetcursorx(vt52number(*c)); + *c=0; + } + vt52s=0; + break; + case 'b': + dspsetfgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + case 'c': + dspsetbgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; +#ifdef VT52HASREGISTERS + case 'x': + if (dspesc == 2) { + vt52arg=vt52number(*c); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + vt52regx=vt52arg+vt52number(*c)*128; + *c=0; + } + vt52s=0; + break; + case 'y': + if (dspesc == 2) { + vt52arg=vt52number(*c); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + vt52regy=vt52arg+vt52number(*c)*127; + *c=0; + } + vt52s=0; + break; + case 'z': + vt52regz=vt52number(*c); + *c=0; + vt52s=0; + break; +#endif +#ifdef DISPLAYHASGRAPH + case 'g': + vt52graphcommand(*c); + *c=0; + vt52s=0; + break; +#endif +#ifdef VT52WIRING + case 'a': + vt52wiringcommand(*c); + *c=0; + vt52s=0; + break; +#endif + } + +/* commands of the terminal in text mode */ + + switch (*c) { + case 'v': /* GEMDOS / TOS extension enable wrap */ + dspwrap=0; + break; + case 'w': /* GEMDOS / TOS extension disable wrap */ + dspwrap=1; + break; + case '^': /* Printer extensions - print on */ + dspprintmode=1; + break; + case '_': /* Printer extensions - print off */ + dspprintmode=0; + break; + case 'W': /* Printer extensions - print without display on */ + dspprintmode=2; + break; + case 'X': /* Printer extensions - print without display off */ + dspprintmode=0; + break; + case 'V': /* Printer extensions - print cursor line */ +#if defined(ARDUINOPRT) && defined(DISPLAYCANSCROLL) + for (mem_t i=0; i': // alternate keypad off + break; + case 'b': // GEMDOS / TOS extension text color + case 'c': // GEMDOS / TOS extension background color + vt52s=*c; + dspesc=1; + *c=0; + return; + case 'e': // GEMDOS / TOS extension enable cursor + dspsetcursor(1); + break; + case 'f': // GEMDOS / TOS extension disable cursor + dspsetcursor(0); + break; + case 'p': // GEMDOS / TOS extension reverse video + dspsetreverse(1); + break; + case 'q': // GEMDOS / TOS extension normal video + dspsetreverse(0); + break; + case 'A': // cursor up + if (dspmyrow>0) dspmyrow--; + break; + case 'B': // cursor down + if (dspmyrow < dsp_rows-1) dspmyrow++; + break; + case 'C': // cursor right + if (dspmycol < dsp_columns-1) dspmycol++; + break; + case 'D': // cursor left + if (dspmycol>0) dspmycol--; + break; + case 'E': // GEMDOS / TOS extension clear screen + dspbufferclear(); + dspclear(); + break; + case 'H': // cursor home + dspmyrow=dspmycol=0; + break; + case 'Y': // Set cursor position + vt52s='Y'; + dspesc=2; + *c=0; + return; + case 'J': // clear to end of screen + for (int i=dspmycol+dsp_columns*dspmyrow; i0) dspmyrow--; else dspreversescroll(0); + break; + case 'L': // Insert line + dspreversescroll(dspmyrow); + break; + case 'M': + vt52tmpr = dspmyrow; + vt52tmpc = dspmycol; + dspscroll(1, dspmyrow); + dspmyrow=vt52tmpr; + dspmycol=vt52tmpc; + break; +#ifdef VT52REGISTERS + case 'x': // set the x register + case 'y': // set the y register + vt52s=*c; + dspesc=2; + *c=0; + return; + case 'z': // set the z register + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif +#ifdef DISPLAYHASGRAPH + case 'g': // execute a graphics command + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif +#ifdef VT52WIRING + case 'a': + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif + } + dspesc=0; + *c=0; +} +#endif + +#else +#ifdef GRAPHDISPLAYDRIVER +/* a super simple display driver for graphics only systems, only handles drawing + and graphics cursor stuff, experimental for epapers */ +#undef HASVT52 +#define GBUFFERSIZE 80 +static char gbuffer[GBUFFERSIZE]; +void dspouts(char* s, address_t l) { + int i; + for (i=0; i> 4) & 0b00000111) * 10; + case 2: + return (v & 0b00001111)+((v >> 4) & 0b00000011) * 10 ; /* only 24 hour support */ + case 3: + return (v & 0b00001111); + case 4: + return (v & 0b00001111) + ((v >> 4) & 0b00000011) * 10; + case 5: + return (v & 0b00001111) + ((v >> 4) & 0b00000001) * 10; + case 6: + return (v & 0b00001111) + (v >> 4) * 10; + default: + return v; + } +} + +/* set the registers */ +void rtcset(uint8_t i, short v) { + uint8_t b; + + /* to bcd if we deal with a clock byte (0-6) */ + if (i<7) b=(v%10 + ((v/10) << 4)); else b=v; + + switch (i) { + case 0: + case 1: + b = b & 0b01111111; + break; + case 2: + case 4: + b = b & 0b00111111; /* only 24 hour support */ + break; + case 3: + b = b & 0b00000111; + break; + case 5: + b = b & 0b00011111; + } + +/* send the address and then the byte */ + Wire.beginTransmission(RTCI2CADDR); + Wire.write(i); + Wire.write(b); + Wire.endTransmission(); +} +#else +#if defined(HASBUILTINRTC) +#define HASCLOCK +/* + * Built-in clocks of STM32 and MKR are based on the RTCZero interface + * an rtc object is created after loading the libraries + * for NRENESAs the interface is slightly different + */ +#ifndef ARDUINO_ARCH_RENESAS +/* begin method */ +void rtcbegin() { + rtc.begin(); /* 24 hours mode */ +} + +/* get the time */ +short rtcget(short i) { + switch (i) { + case 0: + return rtc.getSeconds(); + case 1: + return rtc.getMinutes(); + case 2: + return rtc.getHours(); + case 3: + // return rtc.getWeekDay(); + return 0; + case 4: + return rtc.getDay(); + case 5: + return rtc.getMonth(); + case 6: + return rtc.getYear(); + default: + return 0; + } +} + +/* set the time */ +void rtcset(uint8_t i, short v) { + switch (i) { + case 0: + rtc.setSeconds(v); + break; + case 1: + rtc.setMinutes(v); + break; + case 2: + rtc.setHours(v); + break; + case 3: + // rtc.setWeekDay(v); + break; + case 4: + rtc.setDay(v); + break; + case 5: + rtc.setMonth(v); + break; + case 6: + rtc.setYear(v); + break; + default: + return; + } +} +#else +/* NRENESA code, interface different to my great ennui! */ +/* begin method */ +void rtcbegin() { + RTC.begin(); /* 24 hours mode */ +} + +/* get the time */ +short rtcget(short i) { + RTC.getTime(rtc); + switch (i) { + case 0: + return rtc.getSeconds(); + case 1: + return rtc.getMinutes(); + case 2: + return rtc.getHour(); + case 3: + return static_cast(rtc.getDayOfWeek()); + case 4: + return rtc.getDayOfMonth(); + case 5: + return Month2int(rtc.getMonth()); + case 6: + return rtc.getYear(); + default: + return 0; + } +} + +/* set the time */ +void rtcset(uint8_t i, short v) { + RTC.getTime(rtc); + switch (i) { + case 0: + rtc.setSecond(v); + break; + case 1: + rtc.setMinute(v); + break; + case 2: + rtc.setHour(v); + break; + case 3: + rtc.setDayOfWeek(static_cast(v)); + break; + case 4: + rtc.setDayOfMonth(v); + break; + case 5: + rtc.setMonthOfYear(static_cast(v-1)); + break; + case 6: + rtc.setYear(v); + break; + default: + return; + } + RTC.setTime(rtc); +} +#endif +#else +#ifdef ARDUINORTCEMULATION +#define HASCLOCK +/* + * A millis() based real time clock emulation. It creates a 32bit Unix time + * variable and adds millis()/1000 + */ + +/* the begin method - standard interface to BASIC*/ +void rtcbegin() {} + +/* the current unix time - initialized to the begin of the epoch */ +long rtcutime = 0; + +/* the offset of millis()/1000 when we last set the clock */ +long rtcutimeoffset = 0; + +/* the current unix date - initialized to the begin of the epoch */ +struct { uint8_t second; uint8_t minute; uint8_t hour; uint8_t weekday; uint8_t day; uint8_t month; uint16_t year; } + rtctime = { 0, 0, 0, 4, 1, 1, 1970 }; + +/* the number of days per month */ +const int rtcmonthdays[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; + + +/* convert the time to a unix time number from https://de.wikipedia.org/wiki/Unixzeit */ +void rtctimetoutime() { + int leapyear = ((rtctime.year-1)-1968)/4 - ((rtctime.year-1)-1900)/100 + ((rtctime.year-1)-1600)/400; + long epochdays = (rtctime.year-1970)*365 + leapyear + rtcmonthdays[rtctime.month-1] + rtctime.day - 1; + if ((rtctime.month > 2) && (rtctime.year%4 == 0 && (rtctime.year%100 != 0 || rtctime.year%400 == 0))) epochdays+=1; + rtcutime = rtctime.second + 60*(rtctime.minute + 60*(rtctime.hour + 24*epochdays)); +} + +/* convert the unix time to time and date from https://de.wikipedia.org/wiki/Unixzeit */ +void rtcutimetotime() { + const unsigned long int secondsperday = 86400ul; /* 24* 60 * 60 */ + const unsigned long int daysperyear = 365ul; /* no leap year */ + const unsigned long int daysinfoury = 1461ul; /* 4*365 + 1 */ + const unsigned long int daysinhundredy = 36524ul; /* 100*365 + 25 - 1 */ + const unsigned long int daysinfourhundredy = 146097ul; /* 400*365 + 100 - 4 + 1 */ + const unsigned long int daynumberzero = 719468ul; /* day number of March, 1 1970 */ + + unsigned long int daynumber = daynumberzero + rtcutime/secondsperday; + unsigned long int secondssincemidnight = rtcutime%secondsperday; + unsigned long int temp; + + /* the weekday is based in the daynumber since March, 1, 1970 a SUNDAY */ + rtctime.weekday = daynumber % 7; + + /* leap years of the Gregorian calendar */ + temp = 4 * (daynumber + daysinhundredy + 1) / daysinfourhundredy - 1; + rtctime.year = 100 * temp; + daynumber -= daysinhundredy * temp + temp / 4; + + /* leap years of the Julian calendar */ + temp = 4 * (daynumber + daysperyear + 1) / daysinfoury - 1; + rtctime.year += temp; + daynumber -= daysperyear * temp + temp / 4; + + /* calculate day and month, reference March 1 */ + rtctime.month = (5 * daynumber + 2) / 153; + rtctime.day = daynumber - (rtctime.month * 153 + 2) / 5 + 1; + + /* recalulate to a normal year */ + rtctime.month += 3; + if (rtctime.month > 12) { + rtctime.month -= 12; + rtctime.year++; + } + + /* calculate hours, months, seconds */ + rtctime.hour = secondssincemidnight / 3600; + rtctime.minute = secondssincemidnight % 3600 / 60; + rtctime.second = secondssincemidnight % 60; +} + +/* get the time elements -> standard interface to BASIC */ +short rtcget(short i) { +/* add to the last time we set the clock and subtract the offset*/ + rtcutime = millis()/1000 + rtcutimeoffset; +/* calulate the time data */ + rtcutimetotime(); + + switch (i) { + case 0: + return rtctime.second; + case 1: + return rtctime.minute; + case 2: + return rtctime.hour; + case 3: + return rtctime.weekday; + case 4: + return rtctime.day; + case 5: + return rtctime.month; + case 6: + return rtctime.year; + default: + return 0; + } +} + +/* set the time elements -> standard interface to BASIC */ +void rtcset(uint8_t i, short v) { +/* how much time has elapsed since we last set the clock */ + rtcutime = millis()/1000 + rtcutimeoffset; + +/* generate the time structure */ + rtcutimetotime(); + +/* set the clock */ + switch (i) { + case 0: + if (v>=0 && v<60) rtctime.second=v; + break; + case 1: + if (v>=0 && v<60) rtctime.minute=v; + break; + case 2: + if (v>=0 && v<24) rtctime.hour=v; + break; + case 3: + if (v>=0 && v<7) rtctime.weekday=v; + break; + case 4: + if (v>0 && v<32) rtctime.day=v; + break; + case 5: + if (v>0 && v<13) rtctime.month=v; + break; + case 6: + if (v>=1970 && v<2100) rtctime.year=v; + break; + default: + return; + } + + /* recalulate the right offset by first finding the second value of the new date*/ + rtctimetoutime(); + +/* remember when we set the clock */ + rtcutimeoffset = rtcutime - millis()/1000; +} +#else +#if defined(ARDUINO_ARCH_ESP32) +#define HASCLOCK +/* + * On ESP32 we use the builtin clock, this is a generic Unix time mechanism equivalent + * to the code in hardware-posix.h + */ + +/* no begin needed */ +void rtcbegin() {} + +/* get the time */ +short rtcget(short i) { + struct tm rtctime; + time_t now; + time(&now); + localtime_r(&now, &rtctime); + + switch (i) { + case 0: + return rtctime.tm_sec; + case 1: + return rtctime.tm_min; + case 2: + return rtctime.tm_hour; + case 3: + return rtctime.tm_wday; + case 4: + return rtctime.tm_mday; + case 5: + return rtctime.tm_mon+1; + case 6: + if (rtctime.tm_year > 100) return rtctime.tm_year-100; else return rtctime.tm_year; + default: + return 0; + } + + return 0; +} + +/* set the time */ +void rtcset(uint8_t i, short v) { + struct tm rtctime; + struct timeval tv; + + /* get the time stucture from the system */ + time_t now; + time(&now); + localtime_r(&now, &rtctime); + + /* change what needs to be changed */ + switch (i) { + case 0: + rtctime.tm_sec = v%60; + break; + case 1: + rtctime.tm_min = v%60; + break; + case 2: + rtctime.tm_hour = v%24; + break; + case 3: + rtctime.tm_wday = v%7; + break; + case 4: + rtctime.tm_mday = v; + break; + case 5: + rtctime.tm_mon = v-1; + break; + case 6: + if (v > 1900) v=v-1900; /* get years to the right value */ + if (v < 50) v=v+100; + rtctime.tm_year = v; + break; + } + + /* calculate the seconds and put it back*/ + time_t epocht = mktime(&rtctime); + if (epocht > 2082758399){ + tv.tv_sec = epocht - 2082758399; + } else { + tv.tv_sec = epocht; + } + tv.tv_usec = 0; + settimeofday(&tv, NULL); +} +#else +/* no clock at all, no operations */ +void rtcbegin() {} +short rtcget(short i) { return 0; } +void rtcset(uint8_t i, short v) { } +#endif +#endif +#endif +#endif + +/* + * External EEPROM is handled through an EFS filesystem object + * see https://github.com/slviajero/EepromFS + * for details. Here the most common parameters are set as a default. +*/ +#ifdef ARDUINOEFS +#undef ARDUINOI2CEEPROM +#ifndef EFSEEPROMADDR +#define EFSEEPROMADDR 0x50 +#endif +#ifdef EFSEEPROMSIZE +EepromFS EFS(EFSEEPROMADDR, EFSEEPROMSIZE); +#else +EepromFS EFS(EFSEEPROMADDR); +#endif +#endif + +/* + * External EEPROM is handled through an EFS filesystem object in raw mode + * see https://github.com/slviajero/EepromFS + * for details. Here the most common parameters are set as a default. +*/ + +#if defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED) +#ifndef I2CEEPROMADDR +#define I2CEEPROMADDR 0x50 +#endif +#ifdef I2CEEPROMSIZE +EepromFS EFSRAW(I2CEEPROMADDR, I2CEEPROMSIZE); +#else +EepromFS EFSRAW(I2CEEPROMADDR); +#endif +#endif + +/* + * definitions for ESP Wifi and MQTT, super experimental. + * As networking is only used for MQTT at the moment, + * mqtt, Wifi and Ethernet comes all in one. + * + * No encryption/authetication is implemented in MQTT. + * Only public, open servers can be used. + * + * MQTT topics can only be 32 bytes long. + * Buffered incoming and outgoing messages can be 128 bytes + * per default. + * + * wifisettings.h is the generic network definition file + * all network settings are compiled into the code + * BASIC cannot change them at runtime. + */ +#ifdef ARDUINOMQTT +#include "wifisettings.h" +#ifdef ARDUINOETH +EthernetClient bethclient; +PubSubClient bmqtt(bethclient); +#else +WiFiClient bwifi; +PubSubClient bmqtt(bwifi); +#endif + +/* the buffers of the outgoing and incoming MQTT topic */ +#define MQTTLENGTH 32 +static char mqtt_otopic[MQTTLENGTH]; +static char mqtt_itopic[MQTTLENGTH]; + +/* + * the buffers for MQTT messages, input and output goes + * through these static buffers. + */ +#define MQTTBLENGTH 128 +volatile char mqtt_buffer[MQTTBLENGTH]; +volatile short mqtt_messagelength; +volatile char mqtt_obuffer[MQTTBLENGTH]; +volatile short mqtt_charsforsend; + +/* the name of the client, generated pseudo randomly to avoind + naming conflicts */ +static char mqttname[12] = "iotbasicxxx"; +void mqttsetname() { + long m = millis(); + mqttname[8]=(char)(65+m%26); + m=m/26; + mqttname[9]=(char)(65+m%26); + m=m/26; + mqttname[10]=(char)(65+m%26); +} + +/* + * network begin method + * needs the settings from wifisettings.h + * + * Default is right now that Wifi is started at boot + * This may change in the future. + * + * Ethernet begin has to be reviewed to avoid DHCP + * start timeout if network is not connected + */ +void netbegin() { +#ifdef ARDUINOETH +#ifdef ETHPIN + Ethernet.init(ETHPIN); +#endif + Ethernet.begin(mac); +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.mode(WIFI_STA); + WiFi.begin(ssid, password); + WiFi.setAutoReconnect(1); +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) + WiFi.begin(ssid, password); +#endif +#endif +} + +/* + * network stop methode, needed sometime to reinit networking + * completely or to save power + * + */ +void netstop() { +#ifdef ARDUINOETH +/* to be done */ +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.mode(WIFI_OFF); +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) + WiFi.end(); +#endif +#endif +} + +/* + * network reconnect methode + * + */ +void netreconnect() { +#ifdef ARDUINOETH +/* */ +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.reconnect(); + bdelay(1000); +#elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) + WiFi.end(); + WiFi.begin(ssid, password); + bdelay(1000); +#endif +#endif +} + +/* + * network connected method + * on ESP Wifi try to reconnect, the delay is odd + * This is a partial reconnect, BASIC needs to handle + * repeated reconnects + */ +char netconnected() { +#ifdef ARDUINOETH + return bethclient.connected(); +#else + return(WiFi.status() == WL_CONNECTED); +#endif +} + +/* + * mqtt callback function, using the byte type here + * because payload can be binary - interface to BASIC + * strings need to be done + * + * mqtt event handling in BASIC can be triggered here + */ +void mqttcallback(char* t, byte* p, unsigned int l) { + short i; + mqtt_messagelength=l; + for(i=0; i MQTTBLENGTH) { + if (!mqttreconnect()) {ert=1; return;}; + if (!bmqtt.publish(mqtt_otopic, (uint8_t*) mqtt_obuffer, (unsigned int) mqtt_charsforsend-1, false)) ert=1; + mqtt_charsforsend=0; + } +} + +/* + * ins copies the buffer into a basic string + * - behold the jabberwock - length gynmastics + * z.a has to be the loop variable and contain the length after this -> intended side effect + */ +void mqttins(char *b, short nb) { + for (z.a=0; z.a0) { + ch=mqtt_buffer[0]; + for (i=0; i= 0 && v<256) analogWrite(p, v); + else error(EORANGE); +} + +void dwrite(address_t p, address_t v){ + if (v == 0) digitalWrite(p, LOW); + else if (v == 1) digitalWrite(p, HIGH); + else error(EORANGE); +} + +/* we normalize the pinMode as ESP32, ESP8266, and other boards behave rather + * differently. Following Arduino conventions we map 0 always to INPUT + * and 1 always to OUTPUT, all the other numbers are passed through to the HAL + * layer of the platform. + * Example: OUTPUT on ESP32 is 3 and 1 is assigned to INPUT. + * XMC also needs special treatment here. + */ +void pinm(address_t p, address_t m){ + uint8_t ml = m; + uint8_t pl = p; + switch (ml) { + case 0: + pinMode(pl, INPUT); + break; + case 1: + pinMode(pl, OUTPUT); + break; + default: + pinMode(pl, ml); + break; + } +} + +/* read a pulse, units given by bpulseunit - default 10 microseconds */ +void bpulsein() { + address_t x,y; + unsigned long t, pt; + + t=((unsigned long) pop())*1000; + y=popaddress(); + x=popaddress(); + if (er != 0) return; + + pt=pulseIn(x, y, t)/bpulseunit; + push(pt); +} + +/* write a pulse in microsecond range */ +void bpulseout(short a) { + short pin, duration; + short value = 1; + short intervall = 0; + short repetition = 1; + if (a == 5) { intervall=pop(); repetition=pop(); } + if (a > 2) value=pop(); + duration=pop(); + pin=pop(); + + while (repetition--) { + digitalWrite(pin, value); + delayMicroseconds(duration*bpulseunit); + digitalWrite(pin, !value); + delayMicroseconds(intervall*bpulseunit); + } +} + +void btone(short a) { + number_t d = 0; + number_t v = 100; + if (a == 4) v=pop(); + if (a >= 3) d=pop(); + x=pop(); + y=pop(); +#if defined(ARDUINO_TTGO_T7_V14_Mini32) && defined(HASTONE) +/* fabGL soundgenerator code of suggestes by testerrossa + * pin numbers below 128 are real arduino pins while + * pin numvers from 128 onwards are sound generator capabilities + * this is different from the original code + * + * Sound generator capabilities are numbered as follows + * 128: Sine wave + * 129: Symmetric square wave + * 130: Sawtooth + * 131: Triangle + * 132: VIC noise + * 133: noise + * + * 256-511: square wave with variable duty cycle + * + */ + if (x == 0) { + soundGenerator.play(false); + soundGenerator.clear(); + return; + } + if (a == 2) d=60000; + if (y == 128) soundGenerator.playSound(SineWaveformGenerator(), x, d, v); + if (y == 129) soundGenerator.playSound(SquareWaveformGenerator(), x, d, v); + if (y == 130) soundGenerator.playSound(SawtoothWaveformGenerator(), x, d, v); + if (y == 131) soundGenerator.playSound(TriangleWaveformGenerator(), x, d, v); + if (y == 132) soundGenerator.playSound(VICNoiseGenerator(), x, d, v); + if (y == 133) soundGenerator.playSound(NoiseWaveformGenerator(), x, d, v); + if (y >= 255 && y < 512 ) { + y=y-255; + SquareWaveformGenerator sqw; + sqw.setDutyCycle(y); + soundGenerator.playSound(sqw, x, d, v); + } + return; +#endif + +#ifndef ARDUINOTONEEMULATION + if (x == 0) { + noTone(y); + } else if (a == 2) { + tone(y, x); + } else { + tone(y, x, d); + } +#else + if (x == 0) { + playtone(0, 0, 0); + } else if (a == 2) { + playtone(y, x, 32767); + } else { + playtone(y, x, d); + } +#endif +} + +/* + * the byield function is called after every statement + * it allows two levels of background tasks. + * + * BASICBGTASK controls if time for background tasks is + * needed, usually set by hardware features + * + * YIELDINTERVAL by default is 32, generating a 32 ms call + * to the network loop function. YIELDTIME is 2 generating + * a 2 ms wait after the network loop to allow for buffer + * clearing after - this is needed on ESP8266 + * + * LONGYIELDINTERVAL by default is 1000, generating a one second + * call to maintenance functions. + * + * On an ESP8266 byield() is called every 100 microseconds + * (after each statement) in RUN mode. BASIC DELAY calls + * this every YIELDTIME ms. + */ + +/* everything that needs to be done often - 32 ms */ +void yieldfunction() { +#ifdef ARDUINOMQTT + bmqtt.loop(); +#endif +#ifdef ARDUINOUSBKBD + usb.Task(); +#endif +#ifdef ARDUINOZX81KBD + (void) keyboard.peek(); /* scan once and set lastkey properly every 32 ms */ +#endif +/* this was delay(YIELDTIME) originally - removed now */ +} + +/* everything that needs to be done not so often - 1 second */ +void longyieldfunction() { +#ifdef ARDUINOETH + Ethernet.maintain(); +#endif +} + +void yieldschedule() { +/* delay(0) is only needed on ESP8266! it calls the scheduler - no bdelay here!! */ + #if defined(ARDUINO_ARCH_ESP8266) + delay(0); + #endif + } + +/* + * The file system driver - all methods needed to support BASIC fs access + * Different filesystems need different prefixes and fs objects, these + * filesystems use the stream API + */ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) +File ifile; +File ofile; +char tempname[SBUFSIZE]; +#if defined(ARDUINOSD) || defined(STM32SDIO) +File root; +File file; +#ifdef ARDUINO_ARCH_ESP32 +const char rootfsprefix[2] = "/"; +#else +const char rootfsprefix[1] = ""; +#endif +#endif +#ifdef ESPSPIFFS +const char rootfsprefix[2] = "/"; +#ifdef ARDUINO_ARCH_ESP8266 +Dir root; +File file; +#endif +#ifdef ARDUINO_ARCH_ESP32 +File root; +File file; +#endif +#endif +#ifdef ARDUINO_ARCH_ESP8266 +#define FILE_OWRITE (sdfat::O_READ | sdfat::O_WRITE | sdfat::O_CREAT | sdfat::O_TRUNC) +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_STM32) +#define FILE_OWRITE FILE_WRITE +#else +#define FILE_OWRITE (O_READ | O_WRITE | O_CREAT | O_TRUNC) +#endif +#endif +#endif + +/* using the POSIX API in LittleFS */ +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +FILE* ifile; +FILE* ofile; +DIR* root; +struct dirent* file; +LittleFS_MBED *myFS; +const char rootfsprefix[10] = MBED_LITTLEFS_FILE_PREFIX; +#endif + +/* use EEPROM as filesystem */ +#ifdef ARDUINOEFS +byte ifile; +byte ofile; +byte file; +#endif + +/* these filesystems may have a path prefixes, we treat STM32SDIO like an SD here */ +#if defined(RP2040LITTLEFS) || defined(ESPSPIFFS) || defined(ARDUINOSD) +char tmpfilename[10+SBUFSIZE]; + +/* add the prefix to the filename */ +char* mkfilename(const char* filename) { + short i,j; + for(i=0; i<10 && rootfsprefix[i]!=0; i++) tmpfilename[i]=rootfsprefix[i]; + tmpfilename[i++]='/'; + for(j=0; jinit() && v) outsc("LittleFS ok \n"); +#endif +#ifdef ARDUINOEFS + int s=EFS.begin(); + if (s>0 && v) { + outsc("Mounted EFS with "); outnumber(s); outsc(" slots.\n"); + } else { + if (EFS.format(32) && v) outsc("EFS: formating 32 slots.\n"); + } +#endif +} + +int fsstat(char c) { +#if defined(FILESYSTEMDRIVER) + if (c == 0) return 1; +#endif + return 0; +} + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char c) { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + if (ofile) ofile.write(c); else ert=1; +#endif +#if defined(RP2040LITTLEFS) + if (ofile) fputc(c, ofile); else ert=1; +#endif +#if defined(ARDUINOEFS) + if (ofile) { + if (!EFS.fputc(c, ofile)) ert=-1; + } else ert=1; +#endif +} + +char fileread(){ + char c; +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + if (ifile) c=ifile.read(); else { ert=1; return 0; } + if (c == -1 || c == 255) ert=-1; + return c; +#endif +#ifdef RP2040LITTLEFS + if (ifile) c=fgetc(ifile); else { ert=1; return 0; } + if (c == -1 || c == 255) ert=-1; + return c; +#endif +#ifdef ARDUINOEFS + if (ifile) c=EFS.fgetc(ifile); else { ert=1; return 0; } + if (c == -1|| c == 255) ert=-1; + return c; +#endif + return 0; +} + +int fileavailable(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + return ifile.available(); +#endif +#ifdef RP2040LITTLEFS + return !feof(ifile); +#endif +#ifdef ARDUINOEFS + return EFS.available(ifile); +#endif + return 0; +} + +char ifileopen(const char* filename){ +#if defined(ARDUINOSD) + ifile=SD.open(mkfilename(filename), FILE_READ); + return (int) ifile; +#endif +#if defined(STM32SDIO) + ifile=SD.open(filename); + return (int) ifile; +#endif +#ifdef ESPSPIFFS + ifile=SPIFFS.open(mkfilename(filename), "r"); + return (int) ifile; +#endif +#ifdef RP2040LITTLEFS + ifile=fopen(mkfilename(filename), "r"); + return (int) ifile; +#endif +#ifdef ARDUINOEFS + ifile=EFS.fopen(filename, "r"); + return (int) ifile; +#endif + return 0; +} + +void ifileclose(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + ifile.close(); +#endif +#ifdef RP2040LITTLEFS + if (ifile) fclose(ifile); + ifile=NULL; +#endif +#ifdef ARDUINOEFS + if (ifile) EFS.fclose(ifile); + ifile=0; +#endif +} + +char ofileopen(char* filename, const char* m){ +#if defined(ARDUINOSD) + if (*m == 'w') ofile=SD.open(mkfilename(filename), FILE_OWRITE); +/* ESP32 has FILE_APPEND defined */ +#ifdef FILE_APPEND + if (*m == 'a') ofile=SD.open(mkfilename(filename), FILE_APPEND); +#else + if (*m == 'a') ofile=SD.open(mkfilename(filename), FILE_WRITE); +#endif + return (int) ofile; +#endif +#if defined(STM32SDIO) + if (*m == 'w') ofile=SD.open(filename, FILE_OWRITE); +/* ESP32 has FILE_APPEND defined */ +#ifdef FILE_APPEND + if (*m == 'a') ofile=SD.open(filename, FILE_APPEND); +#else + if (*m == 'a') ofile=SD.open(filename, FILE_WRITE); +#endif + return (int) ofile; +#endif +#ifdef ESPSPIFFS + ofile=SPIFFS.open(mkfilename(filename), m); + return (int) ofile; +#endif +#ifdef RP2040LITTLEFS + ofile=fopen(mkfilename(filename), m); + return (int) ofile; +#endif +#ifdef ARDUINOEFS + ofile=EFS.fopen(filename, m); + return (int) ofile; +#endif + return 0; +} + +void ofileclose(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + ofile.close(); +#endif +#ifdef RP2040LITTLEFS + if (ofile) fclose(ofile); +#endif +#ifdef ARDUINOEFS + if (ofile) EFS.fclose(ofile); +#endif +} + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +void rootopen() { +#if defined(ARDUINOSD) || defined(STM32SDIO) + root=SD.open("/"); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + root=SPIFFS.openDir("/"); +#endif +#ifdef ARDUINO_ARCH_ESP32 + root=SPIFFS.open("/"); +#endif +#endif +#ifdef RP2040LITTLEFS + root=opendir(rootfsprefix); +#endif +#ifdef ARDUINOEFS + EFS.dirp=0; +#endif +} + +int rootnextfile() { +#if defined(ARDUINOSD) || defined(STM32SDIO) + file=root.openNextFile(); + return (file != 0); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + if (root.next()) { + file=root.openFile("r"); + return 1; + } else { + return 0; + } +#endif +#ifdef ARDUINO_ARCH_ESP32 + file=root.openNextFile(); + return (file != 0); +#endif +#endif +#ifdef RP2040LITTLEFS + file = readdir(root); + return (file != 0); +#endif +#ifdef ARDUINOEFS + file = EFS.readdir(); + return (file != 0); +#endif + return 0; +} + +int rootisfile() { +#if defined(ARDUINOSD) || defined(STM32SDIO) + return (! file.isDirectory()); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + return 1; +#endif +#ifdef ARDUINO_ARCH_ESP32 + return (! file.isDirectory()); +#endif +#endif +#ifdef RP2040LITTLEFS + return (file->d_type == DT_REG); +#endif +#ifdef ARDUINOEFS + return 1; +#endif + return 0; +} + +const char* rootfilename() { +#if defined(ARDUINOSD) + //return (char*) file.name(); + return rmrootfsprefix(file.name()); +#endif +#if defined(STM32SDIO) + return (char*) file.name(); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + // c_str() and copy - real ugly + int i=0; + String s=root.fileName(); + for (i=0; id_name); +#endif +#ifdef ARDUINOEFS + return EFS.filename(file); +#endif + return 0; +} + +long rootfilesize() { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + return file.size(); +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS + return EFS.filesize(file); +#endif + return 0; +} + +void rootfileclose() { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + file.close(); +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS +#endif +} + +void rootclose(){ +#if defined(ARDUINOSD) || defined(STM32SDIO) + root.close(); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + return; +#endif +#ifdef ARDUINO_ARCH_ESP32 + root.close(); +#endif +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS +#endif +} + +/* + * remove method for files + */ +void removefile(char *filename) { +#if defined(ARDUINOSD) + SD.remove(mkfilename(filename)); + return; +#endif +#if defined(STM32SDIO) + SD.remove(filename); + return; +#endif +#ifdef ESPSPIFFS + SPIFFS.remove(mkfilename(filename)); + return; +#endif +#ifdef RP2040LITTLEFS + remove(mkfilename(filename)); + return; +#endif +#ifdef ARDUINOEFS + EFS.remove(filename); + return; +#endif +} + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(short i) { +#if defined(ARDUINOSD) || defined(STM32SDIO) + return; +#endif +#ifdef ESPSPIFFS + if (SPIFFS.format()) { SPIFFS.begin(); outsc("ok\n"); } else { outsc("fail\n"); } +#endif +#ifdef RP2040LITTLEFS + fs.reformat(&bd); + return; +#endif +#ifdef ARDUINOEFS + if (i>0 && i<256) { + if (EFS.format(i)) { EFS.begin(); outsc("ok\n"); } else { outsc("fail\n"); } + outcr(); + } else error(EORANGE); + return; +#endif +} + +/* + * Primary serial code uses the Serial object or Picoserial + * + * The picoseria an own interrupt function. This is used to fill + * the input buffer directly on read. Write is standard like in + * the serial code. + * + * As echoing is done in the interrupt routine, the code cannot be + * used to receive keystrokes from serial and then display the echo + * directly to a display. To do this the write command in picogetchar + * would have to be replaced with a outch() that then redirects to the + * display driver. This would be very tricky from the timing point of + * view if the display driver code is slow. + * + * The code for the UART control is mostly taken from PicoSerial + * https://github.com/gitcnd/PicoSerial, originally written by Chris Drake + * and published under GPL3.0 just like this code + * + */ +#ifdef USESPICOSERIAL +volatile static char picochar; +volatile static char picoa = 0; +volatile static char* picob = NULL; +static short picobsize = 0; +volatile static short picoi = 1; + +/* this is mostly taken from PicoSerial */ +const uint16_t MIN_2X_BAUD = F_CPU/(4*(2*0XFFF + 1)) + 1; + +/* the begin code */ +void picobegin(unsigned long baud) { + uint16_t baud_setting; + cli(); + if ((F_CPU != 16000000UL || baud != 57600) && baud > MIN_2X_BAUD) { + UCSR0A = 1 << U2X0; + baud_setting = (F_CPU / 4 / baud - 1) / 2; + } else { + UCSR0A = 0; + baud_setting = (F_CPU / 8 / baud - 1) / 2; + } +/* assign the baud_setting */ + UBRR0H = baud_setting >> 8; + UBRR0L = baud_setting; +/* enable transmit and receive */ + UCSR0B |= (1 << TXEN0) | (1 << RXEN0) | (1 << RXCIE0); + sei(); +} + +/* the write code, sending bytes directly to the UART */ +void picowrite(char b) { + while (((1 << UDRIE0) & UCSR0B) || !(UCSR0A & (1 << UDRE0))) {} + UDR0 = b; +} + +/* + * picogetchar: this is the interrupt service routine. It + * recieves a character and feeds it into a buffer and echos it + * back. The logic here is that the ins() code sets the buffer + * to the input buffer. Only then the routine starts writing to the + * buffer. Once a newline is received, the length information is set + * and picoa is also set to 1 indicating an available string, this stops + * recevieing bytes until the input is processed by the calling code. + */ +void picogetchar(char c){ + if (picob && (! picoa)) { + picochar=c; + if (picochar != '\n' && picochar != '\r' && picoi1) picoi--; else return; + } else + picob[picoi++]=picochar; + picowrite(picochar); + } else { + picoa = 1; + picob[picoi]=0; + picob[0]=picoi; + z.a=picoi; + picoi=1; + } + picochar=0; /* every buffered byte is deleted */ + } else { + if (c != 10) picochar=c; + } +} + +/* the ins code of picoserial, called like this in consins */ +void picoins(char *b, short nb) { + char c; + picob=b; + picobsize=nb; + picoa=0; +/* once picoa is set, the interrupt routine records characters + * until a cr and then resets picoa to 0 */ + while (!picoa) byield(); + outcr(); + return; + } + +/* on an UART interrupt, the getchar function is called */ +#ifdef USART_RX_vect +ISR(USART_RX_vect) { + char c=UDR0; + picogetchar(c); +} +#else +/* for MEGAs and other with many UARTs */ + ISR(USART0_RX_vect) { + char c=UDR0; + picogetchar(c); +} +#endif +#endif + +/* + * blocking serial single char read for Serial + * unblocking for Picoserial because it is not + * character oriented -> blocking is handled in + * consins instead. + */ +char serialread() { +#ifdef USESPICOSERIAL + char c; + c=picochar; + picochar=0; + return c; +#else + while (!SERIALPORT.available()) byield(); + return SERIALPORT.read(); +#endif +} + +/* + * serial begin code with a one second delay after start + * this is not needed any more + */ +void serialbegin() { +#ifdef USESPICOSERIAL + picobegin(serial_baudrate); +#else + SERIALPORT.begin(serial_baudrate); +#endif + bdelay(1000); +} + +/* state information on the serial port */ +int serialstat(char c) { + if (c == 0) return 1; + if (c == 1) return serial_baudrate; + return 0; +} + +/* write to a serial stream */ +void serialwrite(char c) { +#ifdef USESPICOSERIAL + picowrite(c); +#else +/* write never blocks. discard any bytes we can't get rid of */ + SERIALPORT.write(c); +/* if (Serial.availableForWrite()>0) Serial.write(c); */ +#endif +} + +/* check on a character, needed for breaking */ +short serialcheckch() { +#ifdef USESPICOSERIAL + return picochar; +#else + if (SERIALPORT.available()) return SERIALPORT.peek(); else return 0; // should really be -1 +#endif +} + +/* avail method, needed for AVAIL() */ +short serialavailable() { +#ifdef USESPICOSERIAL + return picoi; +#else + return SERIALPORT.available(); +#endif +} + +/* flush serial */ +void serialflush() { +#ifdef USESPICOSERIAL + return; +#else + while (SERIALPORT.available()) SERIALPORT.read(); +#endif +} + + +/* + * reading from the console with inch or the picoserial callback + * this mixes interpreter levels as inch/outch are used here + * this code needs to go to the main interpreter section after + * thorough rewrite + */ +void consins(char *b, short nb) { + char c; + + z.a = 1; +#ifdef USESPICOSERIAL + if (id == ISERIAL) { + picoins(b, nb); + return; + } +#endif + while(z.a < nb) { + c=inch(); + if (id == ISERIAL || id == IKEYBOARD) outch(c); /* this is local echo */ + if (c == '\r') c=inch(); /* skip carriage return */ + if (c == '\n' || c == -1 || c == 255) { /* terminal character is either newline or EOF */ + break; + } else if (c == 127 || c == 8) { + if (z.a>1) z.a--; + } else { + b[z.a++]=c; + } + } + b[z.a]=0; + z.a--; + b[0]=(unsigned char)z.a; +} + +/* + * Start a secondary serial port for printing and/or networking + * This is either Serial1 on a MEGA or DUE or Nano Every or a SoftwareSerial + * instance + */ +#ifdef ARDUINOPRT +#if !defined(ARDUINO_AVR_MEGA2560) && !defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_AVR_NANO_EVERY) && !defined(ARDUINO_NANO_RP2040_CONNECT) && !defined(ARDUINO_RASPBERRY_PI_PICO) && !defined(ARDUINO_SEEED_XIAO_M0) +#include +const int software_serial_rx = SOFTSERIALRX; +const int software_serial_tx = SOFTSERIALTX; +SoftwareSerial PRTSERIAL(software_serial_rx, software_serial_tx); +#endif + +/* second serial port */ +void prtbegin() { + PRTSERIAL.begin(serial1_baudrate); +} + +/* the open functions are not needed here */ +char prtopen(char* filename, int mode) {} +void prtclose() {} + +int prtstat(char c) { + if (c == 0) return 1; + if (c == 1) return serial1_baudrate; + return 0; +} + +void prtwrite(char c) { + PRTSERIAL.write(c); +} + +char prtread() { + while (!PRTSERIAL.available()) byield(); + return PRTSERIAL.read(); +} + +short prtcheckch() { + if (PRTSERIAL.available()) return PRTSERIAL.peek(); else return 0; +} + +short prtavailable() { + return PRTSERIAL.available(); +} + +void prtset(int s) { + serial1_baudrate=s; + prtbegin(); +} +#endif + + +/* + * The wire code, direct access to wire communication + * in master mode wire_slaveid is the I2C address bound + * to channel &7 and wire_myid is 0 + * in slave mode wire_myid is the devices slave address + * and wire_slaveid is 0 + * ARDUINOWIREBUFFER is the maximum length of meesages the + * underlying library can process. This is 32 for the Wire + * library + */ + +/* this is always here, if Wire is needed by a subsysem */ +#ifdef HASWIRE +/* default begin is as a master + * This doesn't work properly on the ESP32C3 platform + * See https://github.com/espressif/arduino-esp32/issues/6376 + * for more details + */ +void wirebegin() { +#ifndef SDA_PIN + Wire.begin(); +#else + Wire.begin(SDA_PIN, SCL_PIN); +#endif +} +#endif + +/* this is code needed for the OPEN/CLOSE and wireslave mechanisms */ +#if (defined(ARDUINOWIRE) && defined(HASFILEIO)) +uint8_t wire_slaveid = 0; +uint8_t wire_myid = 0; +#define ARDUINOWIREBUFFER 32 +#ifdef ARDUINOWIRESLAVE +char wirereceivebuffer[ARDUINOWIREBUFFER]; +short wirereceivechars = 0; +char wirerequestbuffer[ARDUINOWIREBUFFER]; +short wirerequestchars = 0; +#endif + +void wireslavebegin(char s) { +#ifndef SDA_PIN + Wire.begin(s); +#else + Wire.begin(SDA_PIN, SCL_PIN, s); +#endif +} + +/* wire status - just checks if wire is compiled */ +int wirestat(char c) { + switch (c) { + case 0: + return 1; +#ifdef ARDUINOWIRESLAVE + case 1: + return wirerequestchars; +#endif + default: + return 0; + } +} + +/* available characters - test code ecapsulation prep for slave*/ +short wireavailable() { +/* as a master we return 1, as a slave the received chars*/ + if (wire_myid == 0) return 1; +#ifdef ARDUINOWIRESLAVE + else return wirereceivechars; +#else + else return 0; +#endif +} + +#ifdef ARDUINOWIRESLAVE +/* event handler for receive */ +void wireonreceive(int h) { + wirereceivechars=h; + if (h>ARDUINOWIREBUFFER) h=ARDUINOWIREBUFFER; + for (int i=0; iARDUINOWIREBUFFER) l=ARDUINOWIREBUFFER; + if (!Wire.requestFrom(wire_slaveid, l)) ert=1; + while (Wire.available() && z.aARDUINOWIREBUFFER) l=ARDUINOWIREBUFFER; + if (wire_myid == 0) { + Wire.beginTransmission(wire_slaveid); +#ifdef ARDUINO_ARCH_ESP32 + for(z.a=0; z.a +#include +rf24_pa_dbm_e rf24_pa = RF24_PA_MAX; +RF24 radio(rf24_ce, rf24_csn); + +/* radio status */ +int radiostat(char c) { +#if defined(ARDUINORF24) + if (c == 0) return 1; + if (c == 1) return radio.isChipConnected(); +#endif + return 0; +} + +/* generate a uint64_t pipe address from the filename string for RF24 */ +uint64_t pipeaddr(char * f){ + uint64_t t = 0; + t=(uint8_t)f[0]; + for(short i=1; i<=4; i++) t=t*256+(uint8_t)f[i]; + return t; +} +#endif + +/* read an entire string */ +void radioins(char *b, short nb) { +#ifdef ARDUINORF24 + if (radio.available()) { + radio.read(b+1, nb); + if (!blockmode) { + for (z.a=0; z.a nb) z.a=nb; + } + b[0]=z.a; + } else { + b[0]=0; + b[1]=0; + z.a=0; + } +#else + b[0]=0; + b[1]=0; + z.a=0; +#endif +} + +/* write to radio, no character mode here */ +void radioouts(char *b, short l) { +#ifdef ARDUINORF24 + radio.stopListening(); + if (!radio.write(b, l)) ert=1; + radio.startListening(); +#endif +} + +/* radio available */ +short radioavailable() { +#ifdef ARDUINORF24 + return radio.available(); +#endif + return 0; +} + +/* + * we always read from pipe 1 and use pipe 0 for writing, + * the filename is the pipe address, by default the radio + * goes to reading mode after open and is only stopped for + * write + */ +void iradioopen(char *filename) { +#ifdef ARDUINORF24 + if (!radio.begin()) ert=1; + radio.openReadingPipe(1, pipeaddr(filename)); + radio.startListening(); +#endif +} + +void oradioopen(char *filename) { +#ifdef ARDUINORF24 + if (!radio.begin()) ert=1; + radio.openWritingPipe(pipeaddr(filename)); +#endif +} + +void radioset(int s) { +#ifdef ARDUINORF24 + if ((s<0) && (s>3)) {error(EORANGE); return; } + rf24_pa=(rf24_pa_dbm_e) s; + radio.setPALevel(rf24_pa); +#endif +} + + +/* + * Arduino Sensor library code + * The sensorread() is a generic function called by + * SENSOR basic function and command. The first argument + * is the sensor and the second argument the value. + * sensorread(n, 0) checks if the sensorstatus. + */ +#ifdef ARDUINOSENSORS +#ifdef ARDUINODHT +#include "DHT.h" +DHT dht(DHTPIN, DHTTYPE); +#endif +#ifdef ARDUINOSHT +#include +SHT3x SHT; +#endif +#ifdef ARDUINOMQ2 +#include +MQ2 mq2(MQ2PIN); +#endif +#ifdef ARDUINOLMS6 +#include +/* https://www.arduino.cc/en/Reference/Arduino_LSM6DSOX */ +#endif +#ifdef ARDUINOAHT +#include +Adafruit_AHTX0 aht; +#endif +#ifdef ARDUINOBMP280 +#include +Adafruit_BMP280 bmp; +#endif +#ifdef ARDUINOBME280 +#include +Adafruit_BME280 bme; +/* add your own code here */ +#endif + + +void sensorbegin(){ +#ifdef ARDUINODHT +dht.begin(); +#endif +#ifdef ARDUINOSHT + SHT.Begin(); +#endif +#ifdef ARDUINOMQ2 + mq2.begin(); +#endif +#ifdef ARDUINOAHT + aht.begin(); +#endif +#ifdef ARDUINOBMP280 + bmp.begin(); + bmp.setSampling(Adafruit_BMP280::MODE_NORMAL, /* Operating Mode. */ + Adafruit_BMP280::SAMPLING_X2, /* Temp. oversampling */ + Adafruit_BMP280::SAMPLING_X16, /* Pressure oversampling */ + Adafruit_BMP280::FILTER_X16, /* Filtering. */ + Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */ +#endif +#ifdef ARDUINOBME280 + bme.begin(); +#endif +} + +number_t sensorread(short s, short v) { + switch (s) { + case 0: + return analogRead(A0+v); + case 1: +#ifdef ARDUINODHT + switch (v) { + case 0: + return 1; + case 1: + return dht.readHumidity(); + case 2: + return dht.readTemperature(); + } +#endif + return 0; + case 2: +#ifdef ARDUINOSHT + switch (v) { + case 0: + return 1; + case 1: + SHT.UpdateData(); + return SHT.GetRelHumidity(); + case 2: + SHT.UpdateData(); + return SHT.GetTemperature(); + } +#endif + return 0; + case 3: +#ifdef ARDUINOMQ2 + switch (v) { + case 0: + return 1; + case 1: + (void) mq2.read(false); + return mq2.readLPG();; + case 2: + (void) mq2.read(false); + return mq2.readCO(); + case 3: + (void) mq2.read(false); + return mq2.readSmoke(); + } +#endif + return 0; + case 4: +#ifdef ARDUINOAHT + sensors_event_t humidity, temp; + switch (v) { + case 0: + return 1; + case 1: + aht.getEvent(&humidity, &temp); + return temp.temperature; + case 2: + aht.getEvent(&humidity, &temp); + return humidity.relative_humidity; + } +#endif + return 0; + case 5: +#ifdef ARDUINOBMP280 + switch (v) { + case 0: + return 1; + case 1: + return bmp.readTemperature(); + case 2: + return bmp.readPressure() / 100.0; + case 3: + return bmp.readAltitude(1013.25); + } +#endif + return 0; + case 6: +#ifdef ARDUINOBME280 + switch (v) { + case 0: + return 1; + case 1: + return bme.readTemperature(); + case 2: + return bme.readPressure() / 100.0; + case 3: + return bme.readAltitude(1013.25); + case 4: + return bme.readHumidity(); + } +#endif +/* add your own sensor code here */ + return 0; + default: + return 0; + } +} + +#else +void sensorbegin() {} +number_t sensorread(short s, short v) {return 0;}; +#endif + + +/* + * Experimental code to drive SPI SRAM + * + * Currently only the 23LCV512 is implemented, assuming a + * 64kB SRAM + * The code below is taken in part from the SRAMsimple library + * + * two buffers are implemented: + * - a ro buffer used by memread, this buffer is mainly reading the token + * stream at runtime. + * - a rw buffer used by memread2 and memwrite2, this buffer is mainly accessing + * the heap at runtime. In interactive mode this is also the interface to read + * and write program code to memory + * + */ + +#ifdef ARDUINOSPIRAM +#define USEMEMINTERFACE +#define SPIRAMINTERFACE + +/* + * we use the standard slave select pin as default + * RAMPIN + */ +#ifndef RAMPIN +#define RAMPIN SS +#endif + +#define SPIRAMWRMR 1 +#define SPIRAMRDMR 5 +#define SPIRAMREAD 3 +#define SPIRAMWRITE 2 +#define SPIRAMRSTIO 0xFF +#define SPIRAMSEQ 0x40 +#define SPIRAMBYTE 0x00 + +/* the RAM begin method sets the RAM to sequential mode */ +address_t spirambegin() { + pinMode(RAMPIN, OUTPUT); + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMRSTIO); + SPI.transfer(SPIRAMWRMR); + //SPI.transfer(SPIRAMBYTE); + SPI.transfer(SPIRAMSEQ); + digitalWrite(RAMPIN, HIGH); + /* only 32 kB addressable with 16 bit integers because address_t has to fit into number_t + the interpreter would work also with 64kB but PEEK, POKE and the DARKARTS are broken then*/ + if (maxnum>32767) return 65534; else return 32766; +} + +/* the simple unbuffered byte read, with a cast to signed char */ +mem_t spiramrawread(address_t a) { + mem_t c; + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMREAD); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + c = SPI.transfer(0x00); + digitalWrite(RAMPIN, HIGH); + return c; +} + +/* one read only buffer for access from the token stream + memread calls this */ +address_t spiram_robufferaddr = 0; +mem_t spiram_robuffervalid=0; +const address_t spiram_robuffersize = 32; +mem_t spiram_robuffer[spiram_robuffersize]; + +/* one rw buffer for access to the heap and all the program editing + memread2 and memwrite2 call this*/ +address_t spiram_rwbufferaddr = 0; +mem_t spiram_rwbuffervalid=0; +const address_t spiram_rwbuffersize = 32; /* also change the addressmask if you want to play here */ +mem_t spiram_rwbuffer[spiram_rwbuffersize]; +mem_t spiram_rwbufferclean = 1; + +const address_t spiram_addrmask=0xffe0; +/* const address_t spiram_addrmask=0xffd0; // 64 byte frame */ + +/* the elementary buffer access functions used almost everywhere */ + +void spiram_bufferread(address_t a, mem_t* b, address_t l) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMREAD); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer(b, l); + digitalWrite(RAMPIN, HIGH); +} + +void spiram_bufferwrite(address_t a, mem_t* b, address_t l) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMWRITE); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer(b, l); + digitalWrite(RAMPIN, HIGH); +} + +mem_t spiram_robufferread(address_t a) { +/* we address a byte known to the rw buffer, then get it from there */ + if (spiram_rwbuffervalid && ((a & spiram_addrmask) == spiram_rwbufferaddr)) { + return spiram_rwbuffer[a-spiram_rwbufferaddr]; + } + +/* page fault, we dont have the byte in the ro buffer, so read from the chip*/ + if (!spiram_robuffervalid || a >= spiram_robufferaddr + spiram_robuffersize || a < spiram_robufferaddr ) { + spiram_bufferread(a, spiram_robuffer, spiram_robuffersize); + spiram_robufferaddr=a; + spiram_robuffervalid=1; + } + return spiram_robuffer[a-spiram_robufferaddr]; +} + +/* flush the buffer */ +void spiram_rwbufferflush() { + if (!spiram_rwbufferclean) { + spiram_bufferwrite(spiram_rwbufferaddr, spiram_rwbuffer, spiram_rwbuffersize); + spiram_rwbufferclean=1; + } +} + +mem_t spiram_rwbufferread(address_t a) { +/* page fault, do read, ignore the ro buffer buffer */ + address_t p=a & spiram_addrmask; + if (!spiram_rwbuffervalid || (p != spiram_rwbufferaddr)) { +/* flush the buffer if needed */ + spiram_rwbufferflush(); +/* and reload it */ + spiram_bufferread(p, spiram_rwbuffer, spiram_rwbuffersize); + spiram_rwbufferaddr = p; /* we only handle full pages here */ + spiram_rwbuffervalid=1; + } + return spiram_rwbuffer[a-spiram_rwbufferaddr]; +} + +/* the buffered file write */ +void spiram_rwbufferwrite(address_t a, mem_t c) { + address_t p=a&spiram_addrmask; +/* correct the two buffers if needed */ + if (spiram_robuffervalid && a >= spiram_robufferaddr && a < spiram_robufferaddr + spiram_robuffersize) { + spiram_robuffer[a-spiram_robufferaddr]=c; + } +/* if we have the frame, write it, mark the buffer dirty and return */ + if (spiram_rwbuffervalid && p == spiram_rwbufferaddr) { + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; + spiram_rwbufferclean=0; + return; + } +/* if we end up here the write was impossible because we dont have the frame, so flush and then get it */ + spiram_rwbufferflush(); + (void) spiram_rwbufferread(a); + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; + spiram_rwbufferclean=0; +} + +/* the simple unbuffered byte write, with a cast to signed char */ +void spiramrawwrite(address_t a, mem_t c) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMWRITE); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer((byte) c); + digitalWrite(RAMPIN, HIGH); +/* also refresh the ro buffer if in the frame */ + if (a >= spiram_robufferaddr && a < spiram_robufferaddr + spiram_robuffersize && spiram_robufferaddr > 0) + spiram_robuffer[a-spiram_robufferaddr]=c; +/* and the rw buffer if needed) */ + if (a >= spiram_rwbufferaddr && a < spiram_rwbufferaddr + spiram_rwbuffersize && spiram_rwbufferaddr > 0) + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; +} +#endif + + +/* the code to address EEPROMs directly */ +#ifdef ARDUINOPGMEEPROM +#define USEMEMINTERFACE +#define EEPROMMEMINTERFACE +#else +#undef EEPROMMEMINTERFACE +#endif + + +#if defined(USEMEMINTERFACE) +/* + * to handle strings in situations with a memory interface two more buffers are + * needed they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set + * + * default is 128, on an MEGA 512 is possible + */ +#ifdef ARDUINO_AVR_MEGA2560 +#define SPIRAMSBSIZE 512 +#else +#define SPIRAMSBSIZE 128 +#endif + +/* the string buffers of the memory interface */ +char spistrbuf1[SPIRAMSBSIZE]; +char spistrbuf2[SPIRAMSBSIZE]; +#endif + +/* + * A tone emulation based on the byield loop. The maximum frequency depends + * on the byield call speed. 10-20 kHz is possible. Will be unreliable if + * the loop functions need a lot of CPU cycles. + */ +#ifdef ARDUINOTONEEMULATION +static mem_t tone_enabled; +static mem_t tone_pinstate = 0; +static unsigned long tone_intervall; +static unsigned long tone_micros; +static int tone_duration; +static unsigned long tone_start; +static mem_t tone_pin; + +void playtone(int pin, int frequency, int duration){ + +/* the pin we are using is reset every time this is called*/ + tone_pin=pin; + pinMode(tone_pin, OUTPUT); + digitalWrite(tone_pin, LOW); + tone_pinstate=0; + + /* duration 0 or frequency 0 stops playing */ + if (duration == 0 || frequency == 0) { + tone_enabled=0; + return; + } + +/* calculate the toggle intervall in micros and remember where we are */ + tone_intervall=1000000/frequency/2; + tone_micros=micros(); + +/* set the duration and remember where we are*/ + tone_duration=duration; + tone_start=millis(); + +/* start the play */ + tone_enabled=1; +} + +void tonetoggle() { + +/* is this active? */ + if (!tone_enabled) return; + +/* check if we are done playing */ + if (millis() > tone_duration+tone_start) { + tone_enabled=0; + digitalWrite(tone_pin, LOW); + tone_pinstate=0; + return; + } + +/* if not, check if the intervall is over */ + if (micros() > tone_intervall+tone_micros) { + tone_micros=micros(); + tone_pinstate=!tone_pinstate; + digitalWrite(tone_pin, tone_pinstate); + } +} +#endif + +/* + * the events API for Arduino with interrupt service routines + * analogous to the timer API + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + */ + +#ifdef HASEVENTS +/* interrupts in BASIC fire once and then disable themselves, BASIC reenables them */ +void bintroutine0() { + eventlist[0].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[0].pin)); +} +void bintroutine1() { + eventlist[1].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[1].pin)); +} +void bintroutine2() { + eventlist[2].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[2].pin)); +} +void bintroutine3() { + eventlist[3].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[3].pin)); +} + + +#if !(defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_MBED_NANO) || defined(ARDUINO_ARCH_RENESAS)) +typedef int PinStatus; +#endif + + +mem_t enableevent(int pin) { + mem_t interrupt; + int i; + +/* do we have the data */ + if ((i=eventindex(pin))<0) return 0; + +/* can we use this pin */ + interrupt=digitalPinToInterrupt(eventlist[i].pin); + if (interrupt < 0) return 0; + +/* attach the interrupt function to this pin */ + switch(i) { + case 0: + attachInterrupt(interrupt, bintroutine0, (PinStatus) eventlist[i].mode); + break; + case 1: + attachInterrupt(interrupt, bintroutine1, (PinStatus) eventlist[i].mode); + break; + case 2: + attachInterrupt(interrupt, bintroutine2, (PinStatus) eventlist[i].mode); + break; + case 3: + attachInterrupt(interrupt, bintroutine3, (PinStatus) eventlist[i].mode); + break; + default: + return 0; + } + +/* now set it enabled in BASIC */ + eventlist[i].enabled=1; + return 1; + +} + +void disableevent(mem_t pin) { + detachInterrupt(digitalPinToInterrupt(pin)); +} +#endif + + +/* + * This code measures the fast ticker frequency in microseconds + * It leaves the data in variable F. Activate this only for test + * purposes. + */ +#undef FASTTICKERPROFILE + +#ifdef FASTTICKERPROFILE +static unsigned long lastfasttick = 0; +static unsigned long fasttickcalls = 0; +static int avgfasttick = 0; +static long devfasttick = 0; + +void fasttickerprofile() { + if (lastfasttick == 0) { lastfasttick=micros(); return; } + int delta=micros()-lastfasttick; + lastfasttick=micros(); + avgfasttick=(avgfasttick*fasttickcalls+delta)/(fasttickcalls+1); + fasttickcalls++; + vars[5]=avgfasttick; +} +#endif + + + +// defined HARDWARE_H +#endif diff --git a/data/Basic1/TinybasicArduino/wifisettings.h b/data/Basic1/TinybasicArduino/wifisettings.h new file mode 100644 index 0000000000000000000000000000000000000000..10605cd6371e102638044f5b4cec7d7fd8614f3c --- /dev/null +++ b/data/Basic1/TinybasicArduino/wifisettings.h @@ -0,0 +1,5 @@ +const char* ssid = "daheim-iot"; +const char* password = "xacobeo7"; +const char* mqtt_server = "test.mosquitto.org"; +const short mqtt_port = 1883; +byte mac[] = {0xDE, 0xAD, 0xBE, 0xE9, 0xE9, 0xE9}; diff --git a/data/Basic1/basic.c b/data/Basic1/basic.c new file mode 100644 index 0000000000000000000000000000000000000000..9475aedf397a872d7f7056933589183aff15809d --- /dev/null +++ b/data/Basic1/basic.c @@ -0,0 +1,8399 @@ +/* + * + * $Id: basic.c,v 1.144 2023/07/16 14:17:08 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * The first set of definions define the target. + * - MINGW switches on Windows calls - this is the mingw.org version + * _ MINGW64 like MINGW but with the mingw 64 support + * - MSDOS for MSDOS file access. + * - MAC doesn't need more settings here + * - RASPPI activates wiring code + * - Review hardware-*.h for settings specific Arduino hardware settings + * - HAS* activates or deactives features of the interpreter + * - the extension flags control features and code size + * + * MEMSIZE sets the BASIC main memory to a fixed value, + * if MEMSIZE=0 a heuristic is used based on free heap + * size and architecture parameters + * + * USEMEMINTERFACE controls the way memory is accessed. Don't change + * this here. It is a parameter set by hardware-arduino.h. + * This feature is experimental. + * + */ +#undef MINGW +#undef MSDOS +#undef RASPPI + +/* + interpreter feature sets, choose one of the predefines + or undefine all predefines and set the features in custom settings +*/ + +/* + * BASICFULL: full language set, use this with flash >32kB - ESPs, MKRs, Mega2560, RP2040, UNO R4 + * BASICINTEGER: integer BASIC with full language, use this with flash >32kB + * BASICSIMPLE: integer BASIC with reduced language set, 32kB capable - for UNOs with a lot of device drivers + * BASICSIMPLEWITHFLOAT: a small floating point BASIC, 32kB capable, for UNOs - good for UNOs with the need of float + * BASICTINYWITHFLOAT: a floating point tinybasic, if you have 32kB and need complex device drivers + * BASICMINIMAL: minimal language, just Palo Alto plus Arduino I/O, works on 168 with 1kB RAM and 16kB flash + */ +#define BASICFULL +#undef BASICINTEGER +#undef BASICSIMPLE +#undef BASICMINIMAL +#undef BASICSIMPLEWITHFLOAT +#undef BASICTINYWITHFLOAT + +/* + * custom settings undef all the the language sets + * when you def here + */ +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASMSTAB +#define HASARRAYLIMIT +#define HASSTRUCT + +/* Palo Alto plus Arduino functions */ +#ifdef BASICMINIMAL +#undef HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#undef HASSTEFANSEXT +#undef HASERRORMSG +#undef HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* all features minus float and tone */ +#ifdef BASICINTEGER +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASMSTAB +#define HASARRAYLIMIT +#define HASSTRUCT +#endif + +/* a simple integer basic for small systems (UNO etc) */ +#ifdef BASICSIMPLE +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#define HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* all features activated */ +#ifdef BASICFULL +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASSTRINGARRAYS +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASMSTAB +#define HASARRAYLIMIT +#define HASSTRUCT +#endif + +/* a simple BASIC with float support */ +#ifdef BASICSIMPLEWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* a Tinybasic with float support */ +#ifdef BASICTINYWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASSTRINGARRAYS +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASMSTAB +#undef HASARRAYLIMIT +#undef HASSTRUCT +#endif + +/* + * hardcoded memory size, set 0 for automatic malloc, don't redefine this beyond this point + */ +#define MEMSIZE 0 + +/* debug mode switch, set to 1 for hard debug mode with many messages */ +#define DEBUG 0 + +/* + * Language feature dependencies + * + * Dartmouth and darkarts needs the heap which is in Apple 1 + * IoT needs strings and the heap, also Apple 1 + * + * String arrays need multi dimensional capabilities + * + * The structured language set needs ELSE from STEFANSEXT + * + */ +#if defined(HASDARTMOUTH) || defined(HASDARKARTS) || defined(HASIOT) +#define HASAPPLE1 +#endif + +#if defined(HASSTRINGARRAYS) +#define HASMULTIDIM +#endif + +#ifdef HASSTRUCT +#define HASSTEFANSEXT +#endif + +/* + * if there are many commands we need the token extension i.e. 2 byte tokens + * #undef HASLONGTOKENS + * this is normally done in basic.h where the tokens are set + */ + + +/* + * the core basic language headers including some Arduino device stuff + */ +#include "basic.h" + +/* + * Hardware dependend definitions code are isolated in hardware-*.h + * Currently there are two versions + * hardware-arduino.h contains all platforms compiled in the Arduino IDE + * (ESP8266, ESP32, AVR, MEGAAVR, SAM*, RP2040) + * hardware-posix.h contains all platforms compiled in gcc with a POSIX OS + * (Mac, Raspberry, Windows/MINGW) plus rudimentary MSDOS with tc2.0. The + * latter will be removed soon. + */ +#ifdef ARDUINO +#include "hardware-arduino.h" +#else +#include "hardware-posix.h" +#endif + +/* + * + * BASIC timer stuff, this is a core interpreter function now + * + */ + +/* + * the byield function is called after every statement + * it allows four levels of background tasks. + * + * fastticker() is used to trigger all fast timing functions of + * the core interpreter. It can also be used to implement a + * "tone without timer solution" + * + * yieldfunction() triggers a 32ms timer which calls network + * and USB handling functions + * + * longyielfunction() is a 1s timer for long termin maintance + * functions + * + * yieldscheduler() is the hardware scheduler of some platforms + * + */ + +void byield() { + +/* the fast ticker for all fast timing functions */ + fastticker(); + +/* the loop function for non BASIC stuff */ + bloop(); + +#if defined(BASICBGTASK) +/* yield all 32 milliseconds */ + if (millis()-lastyield > YIELDINTERVAL-1) { + yieldfunction(); + lastyield=millis(); + } + +/* yield every second */ + if (millis()-lastlongyield > LONGYIELDINTERVAL-1) { + longyieldfunction(); + lastlongyield=millis(); + } + #endif + + /* call the background task scheduler on some platforms implemented in hardware-* */ + yieldschedule(); +} + +/* delay must be implemented to use byield() while waiting */ +void bdelay(unsigned long t) { + unsigned long i; + if (t>0) { + i=millis(); + while (millis() < i+t) byield(); + } +} + +/* fastticker is the hook for all timing functions */ +void fastticker() { +/* fastticker profiling test code */ +#ifdef FASTTICKERPROFILE + fasttickerprofile(); +#endif +/* toggle the tone pin */ +#ifdef ARDUINOTONEEMULATION + tonetoggle(); +#endif +} + +/* the millis function for BASIC */ +void bmillis() { + number_t m; +/* millis is processed as integer and is cyclic mod maxnumber and not cast to float!! */ + m=(number_t) (millis()/(unsigned long)pop() % (unsigned long)maxnum); + push(m); +} + +/* + * Determine the possible basic memory size. + * using malloc causes some overhead which can be relevant on the smaller + * boards. set MEMSIZE instead to a static value. In this case ballocmem + * just returns the static MEMSIZE. + * + * if SPIRAMINTERFACE is defined, we use the memory from a serial RAM and dont + * allocate it here at all. + * + */ +#if MEMSIZE == 0 && !(defined(SPIRAMINTERFACE)) +address_t ballocmem() { + +/* on most platforms we know the free memory for BASIC */ + long m=freememorysize(); + +/* we allocate as much as address_t can handle */ + if (m>maxaddr) m=maxaddr; + +/* try to allocate the memory */ + mem=(mem_t*)malloc(m); + if (mem != 0) return m-1; + +/* fallback if allocation failed, 128 bytes */ + mem=(mem_t*)malloc(128); + if (mem != 0) return 128; else return 0; + +} +#else +address_t ballocmem(){ return MEMSIZE-1; }; +#endif + +/* + * Layer 0 function - variable handling. + * + * These function access variables and data + */ + +/* + * eeprom load / save / autorun functions + * needed for SAVE and LOAD to an EEPROM + * autorun is generic + */ + +/* save a file to EEPROM, disabled if we use the EEPROM directly */ +void esave() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + + if (top+eheadersize < elength()) { + a=0; + /* EEPROM per default is 255, 0 indicates that there is a program */ + eupdate(a++, 0); + + /* store the size of the program in byte 1,2,... of the EEPROM*/ + z.a=top; + esetnumber(a, addrsize); + a+=addrsize; + + while (a < top+eheadersize){ + eupdate(a, memread2(a-eheadersize)); + a++; + } + eupdate(a++,0); + } else { + error(EOUTOFMEMORY); + er=0; + } +/* needed on I2C EEPROM and other platforms where we buffer */ + eflush(); +#endif +} + +/* load a file from EEPROM, disabled if the use the EEPROM directly */ +void eload() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + if (elength()>0 && (eread(a) == 0 || eread(a) == 1)) { + /* have we stored a program */ + a++; + + /* how long is it? */ + egetnumber(a, addrsize); + top=z.a; + a+=addrsize; + + while (a < top+eheadersize){ + memwrite2(a-eheadersize, eread(a)); + a++; + } + } else { + /* no valid program data is stored */ + error(EEEPROM); + } +#endif +} + +/* autorun something from EEPROM or a filesystem */ +char autorun() { +#if defined(ARDUINOEEPROM) || defined(ARDUINOI2CEEPROM) || ! defined(ARDUINO) + if (eread(0) == 1){ /* autorun from the EEPROM */ + egetnumber(1, addrsize); + top=z.a; + st=SERUN; + return 1; /* EEPROM autorun overrules filesystem autorun */ + } +#endif +#if defined(FILESYSTEMDRIVER) || !defined(ARDUINO) +/* on a POSIX or DOS platform, we check the command line first and the autoexec */ +#ifndef ARDUINO + if (bargc > 0) { + if (ifileopen(bargv[1])) { + xload(bargv[1]); + st=SRUN; + ifileclose(); + bnointafterrun=TERMINATEAFTERRUN; + return 1; + } + } +#endif + if (ifileopen("autoexec.bas")) { + xload("autoexec.bas"); + st=SRUN; + ifileclose(); + return 1; + } +#endif + return 0; +} + +#ifdef HASAPPLE1 +/* + * bmalloc() allocates a junk of memory for a variable on the + * heap, every objects is identified by name (c,d) and type t + * 3 bytes are used here. + */ +address_t bmalloc(mem_t t, mem_t c, mem_t d, address_t l) { + address_t vsize; /* the length of the header on the heap*/ + address_t b; + + if (DEBUG) { outsc("** bmalloc with token "); outnumber(t); outcr(); } + + /* check if the object already exists */ + if (bfind(t, c, d) != 0 ) { error(EVARIABLE); return 0; }; + +/* + * how much space is needed + * 3 bytes for the token and the 2 name characters + * numsize for every number including array length + * one byte for every string character + */ + switch(t) { + case VARIABLE: + vsize=numsize+3; + break; +#ifndef HASMULTIDIM + case ARRAYVAR: + vsize=numsize*l+addrsize+3; + break; +#else +/* multidim implementation for n=2 */ + case ARRAYVAR: + vsize=numsize*l+addrsize*2+3; + break; +#endif +#ifdef HASDARTMOUTH + case TFN: + vsize=addrsize+2+3; + break; +#endif + default: + vsize=l+addrsize+3; + } + +/* enough memory ?, on an EEPROM system we limit the heap to the RAM */ +#ifndef EEPROMMEMINTERFACE + if ((himem-top) < vsize) { error(EOUTOFMEMORY); return 0;} +#else + if (himem-(elength()-eheadersize) < vsize) { error(EOUTOFMEMORY); return 0;} +#endif + +/* store the name of the objects (2 chars) plus the type (1 char) as identifier */ + b=himem; + + memwrite2(b--, c); + memwrite2(b--, d); + memwrite2(b--, t); + + +/* for strings, arrays and buffers write the (maximum) length + directly after the header */ + if (t == ARRAYVAR || t == STRINGVAR || t == TBUFFER) { + b=b-addrsize+1; + z.a=vsize-(addrsize+3); + setnumber(b, addrsize); + b--; + } + +/* remark on multidim, the byte length is after the header and the following + address_t bytes are then reserved for the first dimension */ + +/* reserve space for the payload */ + himem-=vsize; + nvars++; + + return himem+1; +} + +/* + * bfind() passes back the location of the object as result + * the length of the object is in z.a as a side effect + * rememers the last search + * + */ +address_t bfind(mem_t t, mem_t c, mem_t d) { + address_t b = memsize; + mem_t t1; + mem_t c1, d1; + address_t i=0; + +/* the bfind cache, did we ask for that object before? - + needed to make the string code efficient */ + if (t == bfindt && c == bfindc && d == bfindd) { + z.a=bfindz; + return bfinda; + } + + +/* walk through the heap now */ + while (i < nvars) { + + c1=memread2(b--); + d1=memread2(b--); + t1=memread2(b--); + + switch(t1) { + case VARIABLE: + z.a=numsize; + break; + case TFN: + z.a=addrsize+2; + break; + default: + b=b-addrsize+1; + getnumber(b, addrsize); + b--; + } + + b-=z.a; + +/* once we found we cache and return the location */ + if (c1 == c && d1 == d && t1 == t) { + bfindc=c; + bfindd=d; + bfindt=t; + bfindz=z.a; + bfinda=b+1; + return b+1; + } + i++; + } + + return 0; +} + +/* finds an object and deletes the heap from this object on + including the object itself */ +address_t bfree(mem_t t, mem_t c, mem_t d) { + address_t b = memsize; + mem_t t1; + mem_t c1, d1; + address_t i=0; + + if (DEBUG) { outsc("*** bfree called for "); outch(c); outch(d); outsc(" on heap with token "); outnumber(t); outcr(); } + +/* walk through the heap to find the location */ + while (i < nvars) { + + c1=memread2(b--); + d1=memread2(b--); + t1=memread2(b--); + +/* found it */ + if (t == t1 && c == c1 && d == d1) { + +/* set the number of variables to the new value */ + nvars=i; + if (DEBUG) { outsc("*** bfree setting nvars to "); outnumber(nvars); outcr(); } + +/* clean up - this is somehow optional, one could drop this */ + if (DEBUG) { outsc("*** bfree clearing "); outnumber(himem); outspc(); outnumber(b+3); outcr(); } + for (i=himem; i<=b+3; i++) memwrite2(i, 0); + +/* now set the memory to the right address */ + himem=b+3; + +/* forget the chache, because heap structure has changed !! */ + bfindc=0; + bfindd=0; + bfindt=0; + bfindz=0; + bfinda=0; + + return himem; + } + + switch(t1) { + case VARIABLE: + z.a=numsize; + break; +#ifdef HASDARTMOUTH + case TFN: + z.a=addrsize+2; + break; +#endif + default: + b=b-addrsize+1; + getnumber(b, addrsize); + b--; + } + + b-=z.a; + i++; + } + return 0; +} + +/* the length of an object */ +address_t blength (mem_t t, mem_t c, mem_t d) { + if (bfind(t, c, d)) return z.a; else return 0; +} +#endif + +/* get and create a variable */ +number_t getvar(mem_t c, mem_t d){ + address_t a; + + if (DEBUG) { outsc("* getvar "); outch(c); outch(d); outspc(); outcr(); } + +/* the static variable array */ + if (c >= 65 && c <= 91 && d == 0) return vars[c-65]; + +/* the special variables */ + if ( c == '@' ) + switch (d) { + case 'A': + return availch(); + case 'S': + return ert; + case 'I': + return id; + case 'O': + return od; + case 'C': + if (availch()) return inch(); else return 0; + case 'E': + return elength()/numsize; + case 0: + return (himem-top)/numsize; + case 'R': + return rd; + case 'U': + return getusrvar(); +#ifdef HASIOT + case 'V': + return vlength; +#endif +#if defined(DISPLAYDRIVER) || defined (GRAPHDISPLAYDRIVER) + case 'X': + return dspgetcursorx(); + case 'Y': + return dspgetcursory(); +#endif + } + +#ifdef HASAPPLE1 +/* dynamically allocated vars, create them on the fly if needed */ + if (!(a=bfind(VARIABLE, c, d))) a=bmalloc(VARIABLE, c, d, 0); + if (er != 0) return 0; + +/* retrieve the value */ + getnumber(a, numsize); + return z.i; + +#else +/* systems without Apple1 extension i.e. HEAP throw an error */ + error(EVARIABLE); + return 0; +#endif +} + +/* set and create a variable */ +void setvar(mem_t c, mem_t d, number_t v){ + address_t a; + + if (DEBUG) { outsc("* setvar "); outch(c); outch(d); outspc(); outnumber(v); outcr(); } + +/* the static variable array */ + if (c >= 65 && c <= 91 && d == 0) { + vars[c-65]=v; + return; + } + +/* the special variables */ + if ( c == '@' ) + switch (d) { + case 'S': + ert=v; + return; + case 'I': + id=v; + return; + case 'O': + od=v; + return; + case 'C': + outch(v); + return; + case 'R': + rd=v; + return; + case 'U': + setusrvar(v); + return; +#ifdef HASIOT + case 'V': + return; +#endif +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case 'X': + dspsetcursorx((int)v); +/* set the charcount, this is half broken but works */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=v; +#endif + return; + case 'Y': + dspsetcursory((int)v); + return; +#endif + } + +#ifdef HASAPPLE1 +/* dynamically allocated vars */ + if (!(a=bfind(VARIABLE, c, d))) a=bmalloc(VARIABLE, c, d, 0); + if (er != 0) return; + +/* set the value */ + z.i=v; + setnumber(a, numsize); +#else + error(EVARIABLE); +#endif +} + +/* clr all variables */ +void clrvars() { + address_t i; + +/* delete all statics */ + for (i=0; i= dim + arraylimit) || (i < arraylimit) || (i >= h/dim + arraylimit)) { error(EORANGE); return; } +#else + if (DEBUG) { outsc("** in array "); outnumber(i); outspc(); outnumber(a); outcr(); } + if ( (i < arraylimit) || (i >= h + arraylimit) ) { error(EORANGE); return; } +#endif + +/* set or get the array */ + if (m == 'g') { + if (! e) { + getnumber(a, numsize); + } else { + egetnumber(a, numsize); + } + *v=z.i; + } else if ( m == 's') { + z.i=*v; + if (! e) { setnumber(a, numsize); } else { esetnumber(a, numsize); } + } +} + +/* create a string on the heap, i is the length of the string, j the dimension of the array */ +address_t createstring(char c, char d, address_t i, address_t j) { +#ifdef HASAPPLE1 + address_t a, zt; + + if (DEBUG) { outsc("Create string "); outch(c); outch(d); outspc(); outnumber(nvars); outcr(); } + +#ifndef HASSTRINGARRAYS +/* if no string arrays are in the code, we reserve the number of bytes i and space for the index */ + if (bfind(STRINGVAR, c, d)) error(EVARIABLE); else a=bmalloc(STRINGVAR, c, d, i+strindexsize); + if (er != 0) return 0; + return a; +#else +/* string arrays need the number of array elements which address_ hence addresize bytes and then + the space for j strings */ + if (bfind(STRINGVAR, c, d)) error(EVARIABLE); else a=bmalloc(STRINGVAR, c, d, addrsize+j*(i+strindexsize)); + if (er != 0) return 0; + +/* preserve z.a, this is a side effect of bmalloc and bfind */ + zt=z.a; + +/* set the dimension of the array */ + z.a=j; + setnumber(a+j*(i+strindexsize), addrsize); + z.a=zt; + + return a; +#endif + if (er != 0) return 0; + return a; +#else + return 0; +#endif +} + + +/* get a string at position b, the -1+stringdexsize is needed because a string index starts with 1 + * in addition to the memory pointer, return the address in memory. + * We use a pointer to memory here instead of going through the mem interface with an integer variable + * This makes string code lean to compile but is awkward for systems with serial memory + * + * The code may look like doing multiple heap scans for just one string as stringdim and lenstring are + * called here which causes bfind to called multiple time. This is harmless as bfind caches the last + * heap address. + * + * Getstring returns a pointer to the first string element in question. + * + * There are two side effects of getstring + * - ax has the address in memory of the string, if the string is on heap. 0 otherwise. + * - z.a has the number of bytes in the string payload area inculding the string length counter + */ + +char* getstring(char c, char d, address_t b, address_t j) { + address_t k, zt, dim, maxlen; + + ax=0; + if (DEBUG) { outsc("* get string var "); outch(c); outch(d); outspc(); outnumber(b); outcr(); } + +/* direct access to the input buffer - deprectated but still there */ + if ( c == '@' && d == 0) { + return ibuffer+b; + } + +#ifdef HASAPPLE1 +/* special strings */ + +/* the time string */ +#if defined(HASCLOCK) + if ( c == '@' && d == 'T') { + rtcmkstr(); + return rtcstring+1+b; + } +#endif + +/* a user definable special string in sbuffer, makeusrtring is a + user definable function */ + if ( c == '@' && d == 'U' ) { + makeusrstring(); + return sbuffer+b; + } + + +/* the arguments string on POSIX systems */ +#ifndef ARDUINO + if ( c == '@' && d == 'A' ) { + if (bargc > 2) return bargv[2]; else return 0; + } +#endif + + if ( c == '@') { error(EVARIABLE); return 0;} + +/* dynamically allocated strings, create on the fly */ + if (!(ax=bfind(STRINGVAR, c, d))) ax=createstring(c, d, STRSIZEDEF, 1); + + if (DEBUG) { + outsc("** heap address "); outnumber(ax); outcr(); + outsc("** byte length "); outnumber(z.a); outcr(); + } + + if (er != 0) return 0; + +#ifndef HASSTRINGARRAYS + + if ((b < 1) || (b > z.a-strindexsize )) { + error(EORANGE); return 0; + } + + ax=ax+strindexsize+(b-1); + +#else + +/* the dimension of the string array */ + + zt=z.a; + getnumber(ax+z.a-addrsize, addrsize); + dim=z.a; + + if ((j < arraylimit) || (j >= dim + arraylimit )) { + error(EORANGE); return 0; + } + + if (DEBUG) { outsc("** string dimension "); outnumber(dim); outcr(); } + +/* the max length of a string */ + maxlen=(zt-addrsize)/dim-strindexsize; + + if ((b < 1) || (b > maxlen )) { + error(EORANGE); return 0; + } + + if (DEBUG) { outsc("** maximum string length "); outnumber(maxlen); outcr(); } + +/* the base address of a string */ + ax=ax+(j-arraylimit)*(maxlen + strindexsize); + + if (DEBUG) { outsc("** string base address "); outnumber(ax); outcr(); } + +/* get the actual length */ +/* getnumber(ax, strindexsize); */ + +/* the address */ + ax=ax+b-1+strindexsize; + +/* leave the string data record length in z.a */ + z.a=maxlen+strindexsize; +#endif + + if (DEBUG) { outsc("** payload address address "); outnumber(ax); outcr(); } + +/* return value is 0 if we have no direct memory access, the caller needs to handle the string + through the mem address, we return no pointer but provide a copy of the string in the first + string buffer*/ +#ifdef USEMEMINTERFACE + for (k=0; k 2) while(a < SBUFSIZE && bargv[2][a] != 0) a++; + return a; + } +#endif + +/* locate the string */ + a=bfind(STRINGVAR, c, d); + if (er != 0) return 0; + +/* string does not yet exist, return length 0 */ + if (a == 0) return 0; + +/* get the string length from memory */ +#ifndef HASSTRINGARRAYS + getnumber(a, strindexsize); + return z.a; +#else + a=a+(stringdim(c, d)+strindexsize)*(j-arraylimit); + getnumber(a, strindexsize); + return z.a; +#endif +} + +/* set the length of a string */ +void setstringlength(char c, char d, address_t l, address_t j) { + address_t a, zt; + + if (DEBUG) { + outsc("** setstringlength "); + outch(c); outch(d); + outspc(); outnumber(l); outspc(); outnumber(j); + outcr(); + } + + if (c == '@') { + *ibuffer=l; + return; + } + +/* find the variable address */ + a=bfind(STRINGVAR, c, d); + if (er != 0) return; + + if (a == 0) { + error(EVARIABLE); + return; + } + +/* multiple calls of bfind here is harmless as bfind caches */ + a=a+(stringdim(c, d)+strindexsize)*(j-arraylimit); + + if (DEBUG) { outsc("** setstringlength writing to "); outnumber(a); outsc(" value "); outnumber(l); outcr(); } + + z.a=l; + setnumber(a, strindexsize); +} + +#endif + +/* the BASIC string mechanism for real time clocks, create a string with the clock data */ +#ifdef HASCLOCK +char* rtcmkstr() { + int cc = 2; + int t; + char ch; + +/* hours */ + t=rtcget(2); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* minutes */ + t=rtcget(1); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* seconds */ + t=rtcget(0); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='-'; + +/* days */ + t=rtcget(4); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* months */ + t=rtcget(5); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* years */ + t=rtcget(6)%100; /* only 100 years no 19xx epochs */ + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc]=0; + +/* needed for BASIC strings, reserve the first byte for two byte length handling in the upstream code */ + rtcstring[1]=cc-2; + rtcstring[0]=0; + return rtcstring+1; +} +#endif + +/* + * Layer 0 Extension: the user defined extension functions, use this function for a + * quick way to extend BASIC. + * + * @U is a single variable that can be set and get. Every access to this variable + * calls getusrvar() or setusrvar(). + * @U() is a 1d array every access calls get or setusrarray(). + * @U$ is a read only string created by makeusrstring(). + * USR(32, V) is a user defined function created by usrfunction(). + * CALL 32 is a user defined call + * + */ + +/* read or write the variable @U, you can do anything you want here */ +number_t getusrvar() { return 0; } +void setusrvar(number_t v) {return; } + + +/* read or write the array @U(), you can do anything you want here */ +number_t getusrarray(address_t i) {return 0;} +void setusrarray(address_t i, number_t v) {return; } + +/* make the usr string from @U$, this function can be called multiple times for one operation */ +void makeusrstring() { +/* + * sample code could be: + * + * mem_t i; + * const char text[] = "hello world"; + * for(i=0; i 31 calls this */ +number_t usrfunction(address_t i, number_t v) { return 0; } + +/* CALL with arguments > 31 calls this */ +void usrcall(address_t i) { return; } + +/* + * Layer 0 - keyword handling - PROGMEM logic goes here + * getkeyword(), getmessage(), and getokenvalue() are + * the only access to the keyword array in the code. + * + * Same for messages and errors + */ +char* getkeyword(unsigned short i) { + + if (DEBUG) { outsc("** getkeyword from index "); outnumber(i); outcr(); } + +#ifndef ARDUINOPROGMEM + return (char *) keyword[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(keyword[i]))); + return sbuffer; +#endif +} + +char* getmessage(char i) { + if (i >= sizeof(message) || i < 0) return 0; +#ifndef ARDUINOPROGMEM + return (char *) message[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(message[i]))); + return sbuffer; +#endif +} + +signed char gettokenvalue(char i) { + if (i >= sizeof(tokens)) return 0; +#ifndef ARDUINOPROGMEM + return tokens[i]; +#else + return (signed char) pgm_read_byte(&tokens[i]); +#endif +} + +void printmessage(char i){ +#ifndef HASERRORMSG + if (i > EGENERAL) return; +#endif + outsc((char *)getmessage(i)); +} + +/* + * Layer 0 - error handling + * + * The general error handler. The static variable er + * contains the error state. + * + * debugtoken() writes a token for debug + * bdebug() is the general debug message function + * + * Strategy: the error() function writes the message and then + * clears the stack. All calling functions must check er and + * return after funtion calls with no further messages etc. + * reseterror() sets the error state to normal and end the + * run loop. + */ +void error(token_t e){ + address_t i; + +/* store the error number */ + er=e; + +/* clear the stacks */ + clearst(); + clrforstack(); + clrgosubstack(); + +/* switch off all timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +/* is the error handler active? then silently go if we do GOTO or CONT actions in it */ +#ifdef HASERRORHANDLING + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) return; +#endif + +/* set input and output device back to default */ + iodefaults(); + +/* find the line number if in RUN modes */ + if (st != SINT) { + outnumber(myline(here)); + outch(':'); + outspc(); + } + +/* if we have error messages, display them */ +#ifdef HASERRORMSG + if (e > 0) + printmessage(e); + else { + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=e; i++); + outsc(getkeyword(i)); + } + outspc(); + printmessage(EGENERAL); +#else + printmessage(EGENERAL); + outspc(); + outnumber(er); +#endif + if (DEBUG) { outsc("** at "); outnumber(here); } + outcr(); +} + +void reseterror() { + er=0; + here=0; + st=SINT; +} + +void debugtoken(){ + outsc("* "); + if (debuglevel>2) { outnumber(here); outsc(" * "); } + + if (token == EOL) { + outsc("EOL"); + return; + } + switch(token) { + case LINENUMBER: + printmessage(MLINE); + break; + case NUMBER: + printmessage(MNUMBER); + break; + case VARIABLE: + printmessage(MVARIABLE); + break; + case ARRAYVAR: + printmessage(MARRAY); + break; + case STRING: + printmessage(MSTRING); + break; + case STRINGVAR: + printmessage(MSTRINGVAR); + break; + } + outspc(); + outputtoken(); +} + +void bdebug(const char *c){ + outch('*'); + outspc(); + outsc(c); + debugtoken(); + outcr(); +} + +/* + * Arithmetic and runtime operations are mostly done + * on a stack of number_t. + * + * push(), pop(), clearst() handle the stack + */ +void push(number_t t){ + if (DEBUG) {outsc("** push sp= "); outnumber(sp); outcr(); } + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++]=t; +} + +number_t pop(){ + if (DEBUG) {outsc("** pop sp= "); outnumber(sp); outcr(); } + if (sp == 0) { error(ESTACK); return 0; } + else + return stack[--sp]; +} + +/* this one gets a positive integer from the stack and traps the error*/ +address_t popaddress(){ + number_t tmp = 0; + tmp=pop(); + if (tmp < 0) { error(EORANGE); return 0;} else return (address_t) tmp; +} + +void clearst(){ + sp=0; +} + +/* + * clear the cursor for the READ/DATA mechanism + */ +void clrdata() { +#ifdef HASDARTMOUTH + data=0; +#endif +} + +/* + * Stack handling for FOR + */ +void pushforstack(){ + index_t i, j; + + if (DEBUG) { outsc("** forsp and here in pushforstack "); outnumber(forsp); outspc(); outnumber(here); outcr(); } + +/* before pushing into the for stack we check is an + old for exists - this is on reentering a for loop + this code removes all loop inside the for loop as well + for loops are identified by the variable name, anywhere + the variable is found again, it cleans the for stack + this makes the code stable against GOTO mess, + WHILE and REPEAT are identified with the here location + reentry cleans the stack */ +#ifndef HASSTRUCT + for(i=0; i0) { + forsp--; + } else { + error(ELOOP); + return; + } +#ifdef HASSTRUCT + token=forstack[forsp].type; +#endif + xc=forstack[forsp].varx; + yc=forstack[forsp].vary; + here=forstack[forsp].here; + x=forstack[forsp].to; + y=forstack[forsp].step; +} + +void dropforstack(){ + if (forsp>0) { + forsp--; + } else { + error(ELOOP); + return; + } +} + +token_t peekforstack() { + if (forsp>0) { +#ifdef HASSTRUCT + return forstack[forsp-1].type; +#else + return 0; +#endif + } else { + error(ELOOP); + return 0; + } +} + +void clrforstack() { + forsp=0; +} + +/* GOSUB stack handling */ +void pushgosubstack(mem_t a){ + if (gosubsp < GOSUBDEPTH) { + gosubstack[gosubsp]=here; +#ifdef HASEVENTS + gosubarg[gosubsp]=a; +#endif + gosubsp++; + } else + error(TGOSUB); +} + +void popgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TRETURN); + return; + } + here=gosubstack[gosubsp]; +} + +void dropgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TGOSUB); + } +} + +void clrgosubstack() { + gosubsp=0; +} + +/* two helper commands for structured BASIC, without the GOSUB stack */ + +void pushlocation() { + if (st == SINT) + slocation=bi-ibuffer; + else + slocation=here; +} + +void poplocation() { + if (st == SINT) + bi=ibuffer+slocation; + else + here=slocation; +} + +/* + * Input and output functions. + * + * ioinit(): called at setup to initialize what ever io is needed + * outch(): prints one ascii character + * inch(): gets one character (and waits for it) + * checkch(): checks for one character (non blocking) + * ins(): reads an entire line (uses inch except for pioserial) + * + */ +void ioinit() { + +/* a standalone system runs from keyboard and display */ +#ifdef STANDALONE + idd = IKEYBOARD; + odd = ODSP; +#endif + +/* run standalone on second serial, set the right parameters */ +#ifdef STANDALONESECONDSERIAL + idd = ISERIAL1; + odd = OPRT; + blockmode = 0; + sendcr = 0; +#endif + +/* signal handling - by default SIGINT which is ^C is always caught and + leads to program stop. Side effect: the interpreter cannot be stopped + with ^C, it has to be left with CALL 0, works on Linux, Mac and MINGW + but not on DOSBOX MSDOS as DOSBOS does not handle CTRL BREAK correctly + DOS can be interrupted with the CONIO mechanism using BREAKCHAR. +*/ + signalon(); + +/* this is only for RASPBERRY - wiring has to be started explicitly */ + wiringbegin(); + +/* all serial protocolls, ttl channels, SPI and Wire */ + serialbegin(); +#ifdef ARDUINOPRT + prtbegin(); +#endif +#ifdef ARDUINOSPI + spibegin(); +#endif +#ifdef HASWIRE + wirebegin(); +#endif + +/* filesystems and networks */ + fsbegin(1); +#ifdef ARDUINOMQTT + netbegin(); + mqttbegin(); +#endif + +/* the displays */ + kbdbegin(); +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + dspbegin(); +#endif +#if defined(ARDUINOVGA) || defined(POSIXFRAMEBUFFER) + vgabegin(); /* mind this - the fablib code and framebuffer is special here */ +#endif +#ifdef ARDUINOSENSORS + sensorbegin(); +#endif +#if defined(HASCLOCK) + rtcbegin(); +#endif + +/* the eeprom dummy */ + ebegin(); + +/* activate the iodefaults */ + iodefaults(); +} + +void iodefaults() { + od=odd; + id=idd; + form=0; +} + +/* + * Layer 0 - The generic IO code + * + * inch() reads one character from the stream, mostly blocking + * checkch() reads one character from the stream, unblocking, a peek(), + * inmplemented inconsistently + * availch() checks availablibity in the stream + * inb() a block read function for serial interfacing, developed for + * AT message receiving + */ + +/* the generic inch code reading one character from a stream */ +char inch() { + switch(id) { + case ISERIAL: + return serialread(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileread(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + ins(sbuffer, 1); + if (sbuffer[0]>0) return sbuffer[1]; else return 0; +#endif +#ifdef ARDUINORF24 +/* radio is not character oriented, this is only added to make GET work + or single byte payloads, radio, like file is treated nonblocking here */ + case IRADIO: + radioins(sbuffer, SBUFSIZE-1); + if (sbuffer[0]>0) return sbuffer[1]; else return 0; +#endif +#ifdef ARDUINOMQTT + case IMQTT: + return mqttinch(); +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtread(); +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) + case IKEYBOARD: +#if defined(HASVT52) + if (vt52avail()) return vt52read(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdread(); +#endif +#endif + } + return 0; +} + +/* checking on a character in the stream */ +char checkch(){ + switch (id) { + case ISERIAL: + return serialcheckch(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef ARDUINORF24 + case IRADIO: + return radio.available(); +#endif +#ifdef ARDUINOMQTT + case IMQTT: + if (mqtt_messagelength>0) return mqtt_buffer[0]; else return 0; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return 0; +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtcheckch(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdcheckch(); /* here no display read as this is only for break and scroll control */ +#endif + break; + } + return 0; +} + +/* character availability */ +short availch(){ + switch (id) { + case ISERIAL: + return serialavailable(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef ARDUINORF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef ARDUINOMQTT + case IMQTT: + return mqtt_messagelength; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return wireavailable(); +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtavailable(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) +#if defined(HASVT52) + if (vt52avail()) return vt52avail(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdavailable(); +#endif +#endif + break; + } + return 0; +} + +#ifdef ARDUINOPRT +/* + * the block mode reader for esp and sensor modules + * on a serial interface, it tries to read as many + * characters as possible into a buffer + * blockmode = 1 reads once availch() bytes + * blockmode > 1 implements a timeout mechanism and tries + * to read until blockmode milliseconds have expired + * this is needed for esps and other sensors without + * flow control and volatile timing to receive more + * then 64 bytes + */ +void inb(char *b, index_t nb) { + long m; + index_t i = 0; + + if (blockmode == 1 ) { + i=availch(); + if (i>nb-1) i=nb-1; + b[0]=(unsigned char)i; + z.a=i; + b[i+1]=0; + b++; + while (i--) {*b++=inch();} + } else if (blockmode > 1) { + m=millis(); + while (i < nb-1) { + if (availch()) b[++i]=inch(); + if (millis() > m+blockmode) break; + } + b[0]=(unsigned char)i; + z.a=i; + b[i+1]=0; + } else { + b[0]=0; + z.a=0; + b[1]=0; + } +} +#endif + +/* + * ins() is the generic reader into a string, by default + * it works in line mode and ends reading after newline + * + * the first element of the buffer is the lower byte of the length + * + * this is corrected later in xinput, z.a has to be set as + * a side effect + * + * for streams providing entire strings as an input the + * respective string method is called + * + * all other streams are read using consins() for character by character + * input until a terminal character is reached + */ +void ins(char *b, address_t nb) { + switch(id) { +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + wireins(b, nb); + break; +#endif +#ifdef ARDUINOMQTT + case IMQTT: + mqttins(b, nb); + break; +#endif +#ifdef ARDUINORF24 + case IRADIO: + radioins(b, nb); + break; +#endif + default: +#ifdef ARDUINOPRT +/* blockmode only implemented for ISERIAL1 right now */ + if (blockmode > 0 && id == ISERIAL1 ) inb(b, nb); else +#endif + consins(b, nb); + } +} + +/* + * outch() outputs one character to a stream + * block oriented i/o like in radio not implemented here + */ +void outch(char c) { + +/* do we have a MS style tab command, then count characters on stream 1-4 but not in fileio */ +/* this does not work for control characters - needs to go to vt52 later */ + +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) { + if (c > 31) charcount[od-1]+=1; + if (c == 10) charcount[od-1]=0; + } +#endif + + switch(od) { + case OSERIAL: + serialwrite(c); + break; +#ifdef FILESYSTEMDRIVER + case OFILE: + filewrite(c); + break; +#endif +#ifdef ARDUINOPRT + case OPRT: + prtwrite(c); + break; +#endif +#ifdef ARDUINOVGA + case ODSP: + vgawrite(c); + break; +#else +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case ODSP: + dspwrite(c); + break; +#endif +#endif +#ifdef ARDUINOMQTT + case OMQTT: + mqttouts(&c, 1); /* buffering for the PRINT command */ + break; +#endif + default: + break; + } + byield(); /* yield after every character for ESP8266 */ +} + +/* send a newline */ +void outcr() { +#ifdef ARDUINOPRT + if (sendcr) outch('\r'); +#endif + outch('\n'); +} + +/* send a space */ +void outspc() { + outch(' '); +} + +/* + * outs() outputs a string of length x at index ir - basic style + * default is a character by character operation, block + * oriented write needs special functions + */ +void outs(char *ir, address_t l){ + address_t i; + + switch (od) { +#ifdef ARDUINORF24 + case ORADIO: + radioouts(ir, l); + break; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case OWIRE: + wireouts(ir, l); + break; +#endif +#ifdef ARDUINOMQTT + case OMQTT: + mqttouts(ir, l); + break; +#endif +#ifdef GRAPHDISPLAYDRIVER + case ODSP: + dspouts(ir, l); + break; +#endif + default: + for(i=0; i i) { + f=f-i; + while (f--) outspc(); + } +} + +/* + * reading a positive number from a char buffer + * maximum number of digits is adjusted to 16 + * ugly here, testcode when introducting + * number_t was only 16 bit before + */ +address_t parsenumber(char *c, number_t *r) { + address_t nd = 0; + + *r=0; + while (*c >= '0' && *c <= '9' && *c != 0) { + *r=*r*10+*c++-'0'; + nd++; + if (nd == SBUFSIZE) break; + } + return nd; +} + + +#ifdef HASFLOAT +/* a poor man's atof implementation with character count */ +address_t parsenumber2(char *c, number_t *r) { + address_t nd = 0; + index_t i; + number_t fraction = 0; + number_t exponent = 0; + mem_t nexp = 0; + + *r=0; + +/* integer part */ + i=parsenumber(c, r); + c+=i; + nd+=i; + +/* the fractional part */ + if (*c == '.') { + c++; + nd++; + + i=parsenumber(c, &fraction); + c+=i; + nd+=i; + + if (i > 0) { + while ((--i)>=0) fraction=fraction/10; + *r+=fraction; + } + } + +/* the exponent */ + if (*c == 'E' || *c == 'e') { + c++; + nd++; + if (*c == '-') {c++; nd++; nexp=1;}; + i=parsenumber(c, &exponent); + nd+=i; + while ((--exponent)>=0) if (nexp) *r=*r/10; else *r=*r*10; + } + + return nd; +} +#endif + +/* + * convert a number to a string + * the argument type controls the largerst displayable integer + * default is int but it can be increased without any side effects + */ +address_t writenumber(char *c, wnumber_t v){ + address_t nd = 0; + index_t i,j; + mem_t s = 1; + char c1; + +/* the sign */ + if (v<0) s=-1; + +/* the digits */ + do { + c[nd++]=(v%10)*s+'0'; + v=v/10; + } while (v != 0); + +/* print the minus */ + if (s < 0 ) c[nd]='-'; else nd--; + +/* reverse the order of digits */ + i=0; + j=nd; + while (j>i) { + c1=c[i]; + c[i]=c[j]; + c[j]=c1; + i++; + j--; + } + + nd++; + c[nd]=0; + return nd; +} + +#ifdef HASFLOAT +/* + * this is for floats, handling output without library + * functions as well. + */ + +address_t tinydtostrf(number_t v, index_t p, char* c) { + index_t i; + address_t nd = 0; + number_t f; + +/* we do the sign here and don't rely on writenumbers sign handling, guess why */ + if (v<0) { + v=fabs(v); + c[nd++]='-'; + } + +/* write the integer part */ + nd+=writenumber(c+nd, (int)v); + c[nd++]='.'; + +/* only the fraction to precision p */ + f=fabs(v); + +/* get p digits of the fraction */ + for (i=p; i>0; i--) { + f=f-floor(f); + f=f*10; + c[nd++]=(int)floor(f)+'0'; + } + +/* and a terminating 0 */ + c[nd]=0; + return nd; +} + +address_t writenumber2(char *c, number_t vi) { + index_t i; + index_t nd; + number_t f; + index_t exponent = 0; + mem_t eflag=0; + const int p = 5; + +/* pseudo integers are displayed as integer + zero trapped here */ + f=floor(vi); + if (f == vi && fabs(vi) < maxnum) return writenumber(c, vi); + +/* floats are displayed using the libraries */ +#ifndef ARDUINO + return sprintf(c, "%g", vi); +#else + +/* on an Arduino we have gcc, we check if we have anything to write */ + if (!isfinite(vi)) { + c[0]='*'; + c[1]=0; + return 1; + } + +/* normalize the number and see which exponent we have to deal with */ + f=vi; + while (fabs(f)<1.0) { f=f*10; exponent--; } + while (fabs(f)>=10.0-0.00001) { f=f/10; exponent++; } + +/* there are platforms where dtostrf is broken, we do things by hand in a simple way */ + + if (exponent > -2 && exponent < 7) { + tinydtostrf(vi, 5, c); + } else { + tinydtostrf(f, 5, c); + eflag=1; + } + +/* remove trailing zeros */ + for (i=0; (i < SBUFSIZE && c[i] !=0 ); i++); + i--; + while (c[i] == '0' && i>1) {i--;} + i++; + +/* add the exponent */ + if (eflag && exponent != 0) { + c[i++]='E'; + i+=writenumber(c+i, exponent); + } + + c[i]=0; + return i; + +#endif +} +#endif + +/* + * innumber() uses sbuffer as a char buffer to get a number input + */ +char innumber(number_t *r) { + index_t i = 1; + index_t s = 1; + +again: + *r=0; + sbuffer[1]=0; + ins(sbuffer, SBUFSIZE); + while (i < SBUFSIZE) { + if (sbuffer[i] == ' ' || sbuffer[i] == '\t') i++; + if (sbuffer[i] == BREAKCHAR) return BREAKCHAR; + if (sbuffer[i] == 0) { ert=1; return 1; } + if (sbuffer[i] == '-') { + s=-1; + i++; + } +#ifndef HASFLOAT + if (sbuffer[i] >= '0' && sbuffer[i] <= '9') { + (void) parsenumber(&sbuffer[i], r); +#else + if ((sbuffer[i] >= '0' && sbuffer[i] <= '9') || sbuffer[i] == '.') { + (void) parsenumber2(&sbuffer[i], r); +#endif + *r*=s; + return 0; + } else { + if (id == ISERIAL || id == IKEYBOARD) { + printmessage(ENUMBER); + outspc(); + printmessage(EGENERAL); + outcr(); + *r=0; + s=1; + i=1; + goto again; + } else { + ert=1; + return 1; + } + } + } + return 0; +} + +/* prints a number */ +void outnumber(number_t n){ + address_t nd, i; + +#ifndef HASFLOAT + nd=writenumber(sbuffer, n); +#else + nd=writenumber2(sbuffer, n); +#endif + +/* negative number format aligns right */ + if (form < 0) { i=nd; while(i < -form) {outspc(); i++;} } + +/* the number */ + outs(sbuffer, nd); + +/* number formats in Palo Alto style, positive nimbers align left */ + if (form > 0) { while (nd < form) {outspc(); nd++;} } +} + +/* + * Layer 1 functions - providing data into the global variable and + * changing the interpreter state + */ + +/* + * Lexical analyser - tokenizes the input line. + * + * nexttoken() increments the input buffer index bi and delivers values in the global + * variable token, with arguments in the accumulator x and the index register ir + * xc is used in the routine. + * + * xc, ir and x change values in nexttoken and deliver the result to the calling + * function. + * + * bi and ibuffer should not be changed or used for any other function in + * interactive node as they contain the state of nexttoken(). In run mode + * bi and ibuffer are not used as the program is fully tokenized in mem. + */ + +/* skip whitespaces */ +void whitespaces(){ + while (*bi == ' ' || *bi == '\t') bi++; +} + +/* the token stream */ +void nexttoken() { + +/* RUN mode vs. INT mode, in RUN mode we read from mem via gettoken() */ + if (st == SRUN || st == SERUN) { +/* in the token stream we call the fastticker - all fast timing functions are in stream*/ + fastticker(); +/* read the token from memory */ + gettoken(); +/* show what we are doing */ + if (debuglevel>1) { debugtoken(); outcr(); } + return; + } + +/* after change in buffer logic the first byte is reserved for the length */ + if (bi == ibuffer) bi++; + +/* literal mode - experimental - only(!) EOL ends literal mode*/ + if (lexliteral) { + token=*bi; + if (*bi != '\0') bi++; else lexliteral=0; + return; + } + +/* remove whitespaces outside strings */ + whitespaces(); + +/* end of line token */ + if (*bi == '\0') { + token=EOL; + if (DEBUG) debugtoken(); + return; + } + +/* unsigned numbers, value returned in x */ +#ifndef HASFLOAT + if (*bi <='9' && *bi >= '0') { + bi+=parsenumber(bi, &x); +#else + if ((*bi <='9' && *bi >= '0') || *bi == '.') { + bi+=parsenumber2(bi, &x); +#endif + token=NUMBER; + if (DEBUG) debugtoken(); + return; + } + +/* strings between " " or " EOL, value returned in ir */ + if (*bi == '"') { + x=0; + bi++; + ir=bi; + while(*bi != '"' && *bi !='\0') { + x++; + bi++; + } + bi++; + token=STRING; + if (DEBUG) debugtoken(); + return; + } + +/* single character operators are their own tokens */ + if (*bi == '+' || *bi == '-' || *bi == '*' || *bi == '/' || *bi == '%' || + *bi == '\\' || *bi == ':' || *bi == ',' || *bi == '(' || *bi == ')' ) { + token=*bi; + bi++; + if (DEBUG) debugtoken(); + return; + } + +/* + * relations + * single character relations are their own token + * >=, =<, =<, =>, <> are tokenized + */ + if (*bi == '=') { + bi++; + whitespaces(); + if (*bi == '>') { + token=GREATEREQUAL; + bi++; + } else if (*bi == '<') { + token=LESSEREQUAL; + bi++; + } else { + token='='; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '>'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=GREATEREQUAL; + bi++; + } else { + token='>'; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '<'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=LESSEREQUAL; + bi++; + } else if (*bi == '>') { + token=NOTEQUAL; + bi++; + } else { + token='<'; + } + if (DEBUG) debugtoken(); + return; + } + +/* + * keyworks and variables + * + * isolate a word, bi points to the beginning, x is the length of the word + * ir points to the end of the word after isolating. + * @ is a letter here to make the special @ arrays possible + */ + x=0; + ir=bi; + while (-1) { +/* toupper code */ + if (*ir >= 'a' && *ir <= 'z') { + *ir-=32; + ir++; + x++; + } else if (*ir >= '@' && *ir <= 'Z') { + ir++; + x++; + } else { + break; + } + } + +/* + * ir is reused here to implement string compares + * scanning the keyword array. + * Once a keyword is detected the input buffer is advanced + * by its length, and the token value is returned. + * + * keywords are an array of null terminated strings. + */ + yc=0; + while (gettokenvalue(yc) != 0) { + ir=getkeyword(yc); + xc=0; + while (*(ir+xc) != 0) { + if (*(ir+xc) != *(bi+xc)) { + yc++; + xc=0; + break; + } else + xc++; + } + if (xc == 0) continue; + bi+=xc; + token=gettokenvalue(yc); + if (token == TREM) lexliteral=1; + if (DEBUG) debugtoken(); + return; + } + +/* + * a variable has length 2 with either two letters or a letter + * and a number. @ can be the first letter of a variable. + * here, no tokens can appear any more as they have been processed + * further up. + */ + if ( x == 1 || x == 2 ) { + token=VARIABLE; + xc=*bi; + yc=0; + bi++; + if ((*bi >= '0' && *bi <= '9') || (*bi >= 'A' && *bi <= 'Z')) { + yc=*bi; + bi++; + } + if (*bi == '$') { + token=STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token=ARRAYVAR; + } + if (DEBUG) debugtoken(); + return; + } + + +/* other single characters are parsed and stored */ + token=*bi; + bi++; + if (DEBUG) debugtoken(); + return; +} + +/* + * Layer 1 - program editor + * + * Editing the program, the structure of a line is + * LINENUMBER linenumber(2 or more bytes) token(n bytes) + * + * store* stores something to memory + * get* retrieves information + * + * No matter how long number_t is in the C implementation + * we pack into bytes, this is clumsy but portable + * the store and get commands all operate on here + * and advance it + * + * storetoken() operates on the variable top. + * We always append at the end and then sort. + * + * gettoken() operate on the variable here + * which will also be the key variable in run mode. + * + * tokens are stored including their payload. + * + * This group of functions changes global states and + * cannot be called at program runtime with saving + * the relevant global variable to the stack. + */ + +/* + * check if we still have memory left, on RAM only systems we make + * sure that we don't hit himem. On systems with EEPROM program storage we make + * sure that we stay within the EEPROM range. + */ +char nomemory(number_t b){ +#ifndef EEPROMMEMINTERFACE + if (top >= himem-b) return 1; else return 0; +#else + if (top >= elength()-eheadersize-b) return 1; else return 0; +#endif +} + +/* store a token - check free memory before changing anything */ +void storetoken() { + index_t i=x; + switch (token) { + case LINENUMBER: + if (nomemory(addrsize+1)) break; + memwrite2(top++, token); + z.a=ax; + setnumber(top, addrsize); + top+=addrsize; + return; + case NUMBER: + if (nomemory(numsize+1)) break; + memwrite2(top++, token); + z.i=x; + setnumber(top, numsize); + top+=numsize; + return; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + if (nomemory(3)) break; + memwrite2(top++, token); + memwrite2(top++, xc); + memwrite2(top++, yc); + return; + case STRING: + if (nomemory(x+2)) break; + memwrite2(top++, token); + memwrite2(top++, i); + while (i > 0) { + memwrite2(top++, *ir++); + i--; + } + return; + default: + if (token >= -127) { /* the good old code with just one byte token */ + if (nomemory(1)) break; + memwrite2(top++, token); + } else { +#ifdef HASLONGTOKENS + if (nomemory(2)) break; /* this is the two byte token extension */ + memwrite2(top++, TEXT1); + memwrite2(top++, token+255); +#endif + } + return; + } + error(EOUTOFMEMORY); +} + + +/* + * wrappers around mem access in genereal + * + * memread is used only in the token stream, it reads from a stream + * read only. If run is done from eeprom then bytes are taken from this + * stream, this would also be the place to implement direct run from + * another device like a file system or embedded programs on flash. + * Only the token stream uses memread. + * + * memread2 and memwrite2 always go to ram. They are read/write. Variables and + * the program editor uses these functions. + * + * currently only the SPIRAM and the EEPROM direct edit interface is implemented. + * This is handled in hardware-arduino.h. + * + * USEMEMINTERFACE is the macro to control this. + * + * The POSIX code has a test interface for SPIRAM as a dummy. + * + */ +#ifndef USEMEMINTERFACE +mem_t memread(address_t a) { + if (st != SERUN) { + return mem[a]; + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return mem[a]; } + +void memwrite2(address_t a, mem_t c) { mem[a]=c; } +#else +#if defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR) +mem_t memread(address_t a) { + if (st != SERUN) { + return spiram_robufferread(a); + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return spiram_rwbufferread(a); } + +void memwrite2(address_t a, mem_t c) { spiram_rwbufferwrite(a, c); } +#else +#ifdef EEPROMMEMINTERFACE +mem_t memread(address_t a) { + if (a < elength()-eheadersize) return eread(a+eheadersize); else return mem[a-(elength()-eheadersize)]; +} + +mem_t memread2(address_t a) { return memread(a); } + +void memwrite2(address_t a, mem_t c) { + if (a < elength()-eheadersize) eupdate(a+eheadersize, c); else mem[a-(elength()-eheadersize)]=c; +} +#endif +#endif +#endif + + +/* get a token from memory */ +void gettoken() { + int i; + +/* if we have reached the end of the program, EOL is always returned + we don't rely on mem having a trailing EOL */ + if (here >= top) { + token=EOL; + return; + } + +/* if we have no data type we are done reading just one byte */ + token=memread(here++); + +/* if there are multibyte tokens, get the next byte and construct a token value <-127 */ +#ifdef HASLONGTOKENS + if (token == TEXT1) { + token=memread(here++)-255; + } +#endif + + /* otherwise we check for the argument */ + switch (token) { + case LINENUMBER: +#ifdef USEMEMINTERFACE + if (st != SERUN) pgetnumber(here, addrsize); else egetnumber(here+eheadersize, addrsize); +#else + if (st != SERUN) getnumber(here, addrsize); else egetnumber(here+eheadersize, addrsize); +#endif + // x=z.a; + ax=z.a; + here+=addrsize; + break; + case NUMBER: +#ifdef USEMEMINTERFACE + if (st !=SERUN) pgetnumber(here, numsize); else egetnumber(here+eheadersize, numsize); +#else + if (st !=SERUN) getnumber(here, numsize); else egetnumber(here+eheadersize, numsize); +#endif + x=z.i; + here+=numsize; + break; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + xc=memread(here++); + yc=memread(here++); + break; + case STRING: + x=(unsigned char)memread(here++); +/* if we run interactive or from mem, pass back the mem location + * of the string constant + * if we run from EEPROM or SPI ram and cannot simply pass a pointer + * we (ab)use the input buffer which is not needed here, this limits + * the string constant length to the length of the input buffer + */ +#if defined(USEMEMINTERFACE) + for(i=0; i= top) { + here=top; + ax=0; + return; + } + } +} + +/* + * the line cache mechanism, useful for large codes. + * addlinecache does not test if the line already exist because it + * assumes that findline calls it only if a new line is to be stored + * the LINECACHE size depends on the architecture. + */ +#if defined(LINECACHESIZE) && LINECACHESIZE>0 +const unsigned char linecachedepth = LINECACHESIZE; +typedef struct {address_t l; address_t h;} linecacheentry; +linecacheentry linecache[LINECACHESIZE]; +unsigned char linecachehere = 0; + +void clrlinecache() { + unsigned char i; + for(i=0; i= h) break; + gettoken(); + } + here=here2; + if (token == LINENUMBER) + return l1; + else + return l; +} + +/* + * Move a block of storage beginng at b ending at e + * to destination d. No error handling here!! + */ +void moveblock(address_t b, address_t l, address_t d) { + address_t i; + + if (d+l > himem) { + error(EOUTOFMEMORY); + return; + } + if (l<1) return; + + if (b < d) + for (i=l; i>0; i--) + memwrite2(d+i-1, memread2(b+i-1)); + else + for (i=0; i himem) { + error(EOUTOFMEMORY); + return; + } + if (l<1) return; + + for (i=0; i y) break; + } + +/* + * at this point y contains the number of the line to be inserted + * x contains the number of the first line with a higher line number + * or 0 if the line is to be inserted at the end + * here points to the following line and here2 points to the previous line + */ + if (ax == 0) { + here=here3-lnlength; + gettoken(); + if (token == LINENUMBER && ax == y) { // we have a double line at the end + here2-=lnlength; + here-=lnlength; + moveblock(here2, linelength, here); + top=here+linelength; + } + return; + } + here-=lnlength; + t1=here; + here=here2-lnlength; + t2=here; + gettoken(); + if (ax == y) { /* the line already exists and has to be replaced */ + here2=t2; /* this is the line we are dealing with */ + here=t1; /* this is the next line */ + y=here-here2; /* the length of the line as it is */ + if (linelength == y) { /* no change in line length */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else if (linelength > y) { /* the new line is longer than the old one */ + moveblock(here, top-here, here+linelength-y); + here=here+linelength-y; + top=top+linelength-y; + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else { /* the new line is short than the old one */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + moveblock(here, top-here, here2+linelength); + top=top-y+linelength; + } + } else { /* the line has to be inserted in between */ + here=t1; + moveblock(here, top-here, here+linelength); + moveblock(top, linelength, here); + } + } +} + +/* + * Layer 1 - the code in this section calculates an expression + * with a recursive descent algorithm + * + * all function use the stack to pass values back. We use the + * Backus-Naur form of basic from here https://rosettacode.org/wiki/BNF_Grammar + * implementing a C style logical expression model + */ + +/* the terminal symbol it ends a statement list - ELSE is one too as it ends a statement list */ +char termsymbol() { + return (token == LINENUMBER || token == ':' || token == EOL || token == TELSE); +} + +/* a little helpers - one token expect */ +char expect(token_t t, mem_t e) { + nexttoken(); + if (token != t) {error(e); return 0; } else return 1; +} + +/* a little helpers - expression expect */ +char expectexpr() { + nexttoken(); + expression(); + if (er != 0) return 0; else return 1; +} + +/* parses a list of expression, this may be recursive! */ +void parsearguments() { + short argsl; + +/* begin counting */ + argsl=0; + +/* having 0 args at the end of a command is legal */ + if (!termsymbol()) { + +/* list of expressions separated by commas */ + do { + expression(); + if (er != 0) break; + argsl++; + if (token != ',') break; + nexttoken(); + } while (1); + } + +/* because of the recursion ... */ + args=argsl; +} + + +/* expect exactly n arguments */ +void parsenarguments(char n) { + parsearguments(); + if (args != n) error(EARGS); +} + +/* counts and parses the number of arguments given in brakets */ +void parsesubscripts() { + args=0; + if (token != '(') return; /* zero arguments is legal here */ + nexttoken(); +#ifdef HASMULTIDIM + if (token == ')') { + args=-1; + return; /* () is interpreted as no argument at all -> needed for string arrays */ + } +#endif + parsearguments(); + if (er != 0) return; + if (token != ')') {error(EARGS); return; } /* we return with ) as a last token on success */ +} + + +/* parse a function argument ae is the number of + expected expressions in the argument list */ +void parsefunction(void (*f)(), short ae){ + nexttoken(); + parsesubscripts(); + if (er != 0) return; + if (args == ae) f(); else error(EARGS); +} + +/* helper function in the recursive decent parser */ +void parseoperator(void (*f)()) { + mem_t u=1; + + nexttoken(); + if (token == '-') { + u=-1; + nexttoken(); + } + f(); + if (er !=0 ) return; + y=pop(); + if (u == -1) y=-y; + x=pop(); +} + +#ifdef HASAPPLE1 +/* substring evaluation, mind the rewinding here - a bit of a hack + * this is one of the few places in the code where the token stream + * cannot be interpreted forward i.e. without looking back. Reason is + * an inconsistency the the way expression() is implemented + */ +void parsesubstring() { + char xc1, yc1; + address_t h1; /* remember the here */ + char* bi1; /* or the postion in the input buffer */ + mem_t a1; /* some info on args remembered as well for multidim */ + address_t j; /* the index of a string array */ + +/* remember the string name */ + xc1=xc; + yc1=yc; + +/* Remember the token before the first parsesubscript */ + if (st == SINT) bi1=bi; else h1=here; + + nexttoken(); + parsesubscripts(); + if (er != 0) return; + +#ifndef HASSTRINGARRAYS + +/* the stack has - the first index, the second index */ + switch(args) { + case 2: + break; + case 1: + push(lenstring(xc1, yc1, arraylimit)); + break; + case 0: +/* rewind the token if there were no braces to be in sync */ + if (st == SINT) bi=bi1; else here=h1; +/* no rewind in the () construct */ + case -1: + args=0; + push(1); + push(lenstring(xc1, yc1, arraylimit)); + break; + } + +#else +/* for a string array the situation is more complicated as we + need to parse the argument completely including the possible subscript */ + +/* how many args has the first parsesubsscript scanned, if none, we are done + rewind and set the parametes*/ + +/* the stack has - the first string index, the second string index, the array index */ + if ( args == 0 ) { + + if (st == SINT) bi=bi1; else here=h1; + + j=arraylimit; + push(1); + push(lenstring(xc1, yc1, j)); + push(j); + +/* if more then zero or an empty (), we need a second parsesubscript */ + } else { + + if (st == SINT) bi1=bi; + else h1=here; + + a1=args; + + nexttoken(); + parsesubscripts(); + + switch (args) { + case 1: + j=popaddress(); + if (er != 0) return; + break; + case 0: + j=arraylimit; + if (st == SINT) bi=bi1; else here=h1; + break; + default: + error(EARGS); + return; + } + +/* which part of the string */ + switch(a1) { + case 2: + break; + case 1: + push(lenstring(xc1, yc1, j)); + break; + case 0: + case -1: + push(1); + push(lenstring(xc1, yc1, j)); + break; + } + +/* and which index element */ + push(j); + + } +#endif + +} +#endif + +/* + * ABS absolute value + */ +void xabs(){ + number_t x; + if ((x=pop())<0) { x=-x; } + push(x); +} + +/* + * SGN evaluates the sign + */ +void xsgn(){ + number_t x; + x=pop(); + if (x>0) x=1; + if (x<0) x=-1; + push(x); +} + +/* + * PEEK on an arduino, negative values of peek address + * the EEPROM range -1 .. -1024 on an UNO + */ +void xpeek(){ + address_t amax; + index_t a; + + a=pop(); + +/* 16 bit numbers can't peek big addresses */ + if ((long) memsize > (long) maxnum) amax=(address_t) maxnum; else amax=memsize; + + if (a >= 0 && a=0) + push((long)rd*r/0x10000); + else + push((long)rd*r/0x10000+1); +#else +/* glibc parameters */ + rd= (110351245*rd + 12345) % (1 << 31); + if (r>=0) + push(rd*r/(unsigned long)(1 << 31)); + else + push(rd*r/(unsigned long)(1 << 31)+1); +#endif +} + + + +#ifndef HASFLOAT +/* + * SQR - a very simple approximate square root formula + * for integers, for floats we use the library + */ +void sqr(){ + number_t t,r; + number_t l=0; + r=pop(); + t=r; + while (t > 0) { + t>>=1; + l++; + } + l=l/2; + t=1; + t<<=l; + do { + l=t; + t=(t+r/t)/2; + } while (abs(t-l)>1); + push(t); +} +#else +void sqr(){ + push(sqrt(pop())); +} +#endif + + +/* + * POW(X, N) evaluates powers + */ + +/* this function is called by POW(a, c) in BASIC */ +void xpow(){ + number_t n; + number_t a; + + n=pop(); + a=pop(); + push(bpow(a, n)); +} + +/* while this is needed by ^*/ +number_t bpow(number_t x, number_t y) { +#ifdef HASFLOAT + return pow(x, y); +#else + number_t r; + address_t i; + + r=1; + if (y>=0) for(i=0; i 0) push(y-x+1); else push(0); + if (DEBUG) { outsc("** in stringvalue, length "); outnumber(y-x+1); outsc(" from "); outnumber(x); outspc(); outnumber(y); outcr(); } + xc=xcl; + yc=ycl; + } else if (token == TSTR) { + nexttoken(); + if ( token != '(') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; +#ifdef HASFLOAT + push(writenumber2(sbuffer, pop())); +#else + push(writenumber(sbuffer, pop())); +#endif + ir2=sbuffer; + x=1; + if (er != 0) return 0; + if (token != ')') {error(EARGS); return 0; } +#endif + } else { + return 0; + } + return 1; +} + + +/* + * (numerical) evaluation of a string expression, used for + * comparison and for string rightvalues as numbers + * the token rewind here is needed as streval is called in + * factor - no factor function should nexttoken + */ +void streval(){ + char *irl; + address_t xl, x; + token_t t; + address_t h1; + char* b1; + index_t k; + + if (!stringvalue()) { + error(EUNKNOWN); + return; + } + if (er != 0) return; + + irl=ir2; + xl=popaddress(); + if (er != 0) return; + +/* with the mem interface -> copy, irl now point to buffer2 */ +#ifdef USEMEMINTERFACE + for(k=0; k, =>, <=; + * NOT; AND; OR + * + */ + +/* + * factor() - contrary to all other function + * nothing here should end with a new token - this is handled + * in factors calling function + * + * evaluates constants, variables and all functions + */ + +/* helpers of factor - array access */ +void factorarray() { + mem_t xcl, ycl; + address_t ix, iy; + number_t v; + +/* remember the variable, because parsesubscript changes this */ + ycl=yc; + xcl=xc; + + nexttoken(); + parsesubscripts(); + if (er != 0 ) return; + + switch(args) { + case 1: + ix=popaddress(); + if (er != 0) return; + iy=arraylimit; + break; +#ifdef HASMULTIDIM + case 2: + iy=popaddress(); + ix=popaddress(); + if (er != 0) return; + break; +#endif + default: + error(EARGS); + return; + } + array('g', xcl, ycl, ix, iy, &v); + push(v); +} + +/* helpers of factor - string length */ +void factorlen() { + address_t a; + + nexttoken(); + if ( token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue()) { +#ifdef HASDARKARTS + expression(); + if (er != 0) return; + a=pop(); + push(blength(TBUFFER, a%256, a/256)); + return; +#else + error(EUNKNOWN); + return; +#endif + } + if (er != 0) return; + + nexttoken(); + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the VAL command */ +void factorval() { + address_t a; + index_t y; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue()) { error(EUNKNOWN); return; } + if (er != 0) return; + +/* not super clean - handling of terminal symbol dirty + stringtobuffer needed !! */ + vlength=0; + while(*ir2==' ' || *ir2=='\t') { ir2++; vlength++; } + if(*ir2=='-') { y=-1; ir2++; vlength++; } else y=1; + + x=0; +#ifdef HASFLOAT + if ((a=parsenumber2(ir2, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#else + if ((a=parsenumber(ir2, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#endif + (void) pop(); + push(x*y); + + nexttoken(); + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the INSTR command */ +void factorinstr() { + address_t y; + char ch; + address_t a; + char* ir; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + nexttoken(); + + if (!stringvalue()) { error(EUNKNOWN); return; } + y=popaddress(); + ir=ir2; + if (er != 0) return; + nexttoken(); + + if (token != ',') { error(EARGS); return; } + nexttoken(); + + expression(); + if (er != 0) return; + + ch=pop(); + for (a=1; a<=y; a++) {if (ir[a-1] == ch) break; } + if (a > y ) a=0; + push(a); + + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the NETSTAT command */ +void factornetstat() { + address_t x=0; + if (netconnected()) x=1; + if (mqttstate() == 0) x+=2; + push(x); +} + +void factor(){ + if (DEBUG) bdebug("factor\n"); + switch (token) { + case NUMBER: + push(x); + break; + case VARIABLE: + push(getvar(xc, yc)); + break; + case ARRAYVAR: + factorarray(); + break; + case '(': + nexttoken(); + expression(); + if (er != 0 ) return; + if (token != ')') { error(EARGS); return; } + break; +/* Palo Alto BASIC functions */ + case TABS: + parsefunction(xabs, 1); + break; + case TRND: + parsefunction(rnd, 1); + break; + case TSIZE: + push(himem-top); + break; +/* Apple 1 BASIC functions */ +#ifdef HASAPPLE1 + case TSGN: + parsefunction(xsgn, 1); + break; + case TPEEK: + parsefunction(xpeek, 1); + break; + case TLEN: + factorlen(); + break; +#ifdef HASIOT + case TAVAIL: + parsefunction(xavail, 1); + break; + case TOPEN: + parsefunction(xfopen, 1); + break; + case TSENSOR: + parsefunction(xfsensor, 2); + break; + case TVAL: + factorval(); + break; + case TINSTR: + factorinstr(); + break; + case TWIRE: + parsefunction(xfwire, 1); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + push(erh); + break; +#endif + case THIMEM: + push(himem); + break; +/* Apple 1 string compare code */ + case STRING: + case STRINGVAR: + streval(); + if (er != 0 ) return; + break; +#endif +/* Stefan's tinybasic additions */ +#ifdef HASSTEFANSEXT + case TSQR: + parsefunction(sqr, 1); + break; + case TMAP: + parsefunction(xmap, 5); + break; + case TUSR: + parsefunction(xusr, 2); + break; + case TPOW: + parsefunction(xpow, 2); + break; +#endif +/* Arduino I/O */ +#ifdef HASARDUINOIO + case TAREAD: + parsefunction(aread, 1); + break; + case TDREAD: + parsefunction(dread, 1); + break; + case TMILLIS: + parsefunction(bmillis, 1); + break; +#ifdef HASPULSE + case TPULSE: + parsefunction(bpulsein, 3); + break; +#endif + case TAZERO: +#if defined(ARDUINO) && defined(A0) + push(A0); +#else + push(0); +#endif + break; + case TLED: +#ifdef LED_BUILTIN + push(LED_BUILTIN); +#else + push(0); +#endif + break; +#endif +/* mathematical functions in case we have float */ +#ifdef HASFLOAT + case TSIN: + parsefunction(xsin, 1); + break; + case TCOS: + parsefunction(xcos, 1); + break; + case TTAN: + parsefunction(xtan, 1); + break; + case TATAN: + parsefunction(xatan, 1); + break; + case TLOG: + parsefunction(xlog, 1); + break; + case TEXP: + parsefunction(xexp, 1); + break; +#endif +/* int is always present to make programs compatible */ + case TINT: + parsefunction(xint, 1); + break; +#ifdef HASDARTMOUTH + case TFN: + xfn(); + break; +/* an arcane feature, DATA evaluates to the data record number */ + case TDATA: + push(datarc); + break; +#endif +#ifdef HASDARKARTS + case TMALLOC: + parsefunction(xmalloc, 2); + break; + case TFIND: + xfind(); + break; +#endif +#ifdef HASIOT + case TNETSTAT: + factornetstat(); + break; +#endif + +/* unknown function */ + default: + error(EUNKNOWN); + return; + } +} + +#ifdef POWERRIGHTTOLEFT +/* the recursive version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (er != 0) return; + + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + parseoperator(power); + if (er != 0) return; + push(bpow(x,y)); + } + if (DEBUG) bdebug("leaving power\n"); +} +#else +/* the left associative version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (er != 0) return; + +nextpower: + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + nexttoken(); + factor(); + if (er != 0) return; + y=pop(); + x=pop(); + push(bpow(x,y)); + goto nextpower; + } + if (DEBUG) bdebug("leaving power\n"); +} +#endif + + +/* + * term() evaluates multiplication, division and mod + */ +void term(){ + if (DEBUG) bdebug("term\n"); + power(); + if (er != 0) return; + +nextfactor: + // nexttoken(); + if (DEBUG) bdebug("in term\n"); + if (token == '*'){ + parseoperator(power); + if (er != 0) return; + push(x*y); + goto nextfactor; + } else if (token == '/'){ + parseoperator(power); + if (er != 0) return; + if (y != 0) + push(x/y); + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == '%') { + parseoperator(power); + if (er != 0) return; + if (y != 0) +#ifndef HASFLOAT + push(x%y); +#else + push((int)x%(int)y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } + if (DEBUG) bdebug("leaving term\n"); +} + +/* add and subtract */ +void addexpression(){ + if (DEBUG) bdebug("addexp\n"); + if (token != '+' && token != '-') { + term(); + if (er != 0) return; + } else { + push(0); + } + +nextterm: + if (token == '+' ) { + parseoperator(term); + if (er != 0) return; + push(x+y); + goto nextterm; + } else if (token == '-'){ + parseoperator(term); + if (er != 0) return; + push(x-y); + goto nextterm; + } +} + +/* comparisions */ +void compexpression() { + if (DEBUG) bdebug("compexp\n"); + addexpression(); + if (er != 0) return; + switch (token){ + case '=': + parseoperator(compexpression); + if (er != 0) return; + push(x == y ? -1 : 0); + break; + case NOTEQUAL: + parseoperator(compexpression); + if (er != 0) return; + push(x != y ? -1 : 0); + break; + case '>': + parseoperator(compexpression); + if (er != 0) return; + push(x > y ? -1 : 0); + break; + case '<': + parseoperator(compexpression); + if (er != 0) return; + push(x < y ? -1 : 0); + break; + case LESSEREQUAL: + parseoperator(compexpression); + if (er != 0) return; + push(x <= y ? -1 : 0); + break; + case GREATEREQUAL: + parseoperator(compexpression); + if (er != 0) return; + push(x >= y ? -1 : 0); + break; + } +} + +#ifdef HASAPPLE1 +/* boolean NOT */ +void notexpression() { + if (DEBUG) bdebug("notexp\n"); + if (token == TNOT) { + nexttoken(); + expression(); + if (er != 0) return; + push(~(int)pop()); + } else + compexpression(); +} + +/* boolean AND and at the same time bitwise */ +void andexpression() { + if (DEBUG) bdebug("andexp\n"); + notexpression(); + if (er != 0) return; + if (token == TAND) { + parseoperator(expression); + if (er != 0) return; + /* push(x && y); */ + push((int)x & (int)y); + } +} + +/* expression function and boolean OR at the same time bitwise !*/ +void expression(){ + if (DEBUG) bdebug("exp\n"); + andexpression(); + if (er != 0) return; + if (token == TOR) { + parseoperator(expression); + if (er != 0) return; + /* push(x || y); */ + push((int)x | (int)y); + } +} +#else + +/* expression function simplified */ +void expression(){ + if (DEBUG) bdebug("exp\n"); + compexpression(); + if (er != 0) return; + if (token == TOR) { + parseoperator(expression); + if (er != 0) return; + /* push(x || y); */ + push((int)x | (int)y); + } +} +#endif + + + + + + + + +/* + * Layer 2 - The commands and their helpers + * + * Palo Alto BASIC languge set - PRINT, LET, INPUT, GOTO, GOSUB, RETURN, + * IF, FOR, TO, NEXT, STEP, BREAK, STOP, END, LIST, NEW, RUN, REM + * BREAK is not Palo ALto but fits here, eEND is identical to STOP. + */ + +/* + * PRINT command + */ +void xprint(){ + char semicolon = 0; + char oldod; + char modifier = 0; + + form=0; + oldod=od; + nexttoken(); + +processsymbol: +/* at the end of a print statement, do we need a newline, restore the defaults */ + if (termsymbol()) { + if (!semicolon) outcr(); + od=oldod; + form=0; + return; + } + semicolon=0; + +/* output a string if we found it */ + if (stringvalue()) { + if (er != 0) return; + outs(ir2, pop()); + nexttoken(); + goto separators; + } + +/* modifiers of the print statement */ + if (token == '#' || token == '&') { + modifier=token; + nexttoken(); + expression(); + if (er != 0) return; + + switch(modifier) { + case '#': + form=pop(); + break; + case '&': + od=pop(); + break; + } + goto separators; + } + + if (token != ',' && token != ';') { + expression(); + if (er != 0) return; + outnumber(pop()); + } + +separators: + if (termsymbol()) goto processsymbol; + + switch (token) { + case ',': + if (!modifier) outspc(); + case ';': + semicolon=1; + nexttoken(); + break; + default: + error(EUNKNOWN); + return; + } + modifier=0; + + goto processsymbol; +} + +/* + * LET assigment code for various lefthand and righthand side. + * + * + * lefthandside is a helper function for reuse in other + * commands. It determines the address the value is to be + * assigned to and whether the assignment target is a + * "pure" i.e. subscriptless string expression + * + * assignnumber assigns a number to a given lefthandside + * + * in lefthandside the type of the object is determined and + * possible subscripts are parsed + * + * Variables have no subscripts. The arguments are unchanged. + * Arrays may have two subscript which will go to i, j + * Strings may have a string subscript, going to i and an array subscript + * going to j + * Strings without a subscript i.e. pure strings, set the ps flag + * + */ +void lefthandside(address_t* i, address_t* i2, address_t* j, mem_t* ps) { + number_t tmp; + switch (token) { + case VARIABLE: + nexttoken(); + break; + case ARRAYVAR: + nexttoken(); + parsesubscripts(); + nexttoken(); + if (er != 0) return; + switch(args) { + case 1: + *i=popaddress(); + if (er != 0) return; + *j=arraylimit; + break; + case 2: + *j=popaddress(); + if (er != 0) return; + *i=popaddress(); + if (er != 0) return; + break; + default: + error(EARGS); + return; + } + break; +#ifdef HASAPPLE1 + case STRINGVAR: +#ifndef HASSTRINGARRAYS + *j=arraylimit; + nexttoken(); + parsesubscripts(); + if (er != 0) return; + switch(args) { + case 0: + *i=1; + *ps=1; + break; + case 1: + *ps=0; + nexttoken(); + *i=popaddress(); + if (er != 0) return; + break; + case 2: + *ps=0; + nexttoken(); + *i2=popaddress(); + if (er != 0) return; + *i=popaddress(); + if (er != 0) return; + break; + default: + error(EARGS); + return; + } +#else + *j=arraylimit; + nexttoken(); + parsesubscripts(); + if (er != 0) return; + switch(args) { + case -1: + nexttoken(); + case 0: + *i=1; + *ps=1; + break; + case 1: + *ps=0; + nexttoken(); + *i=popaddress(); + if (er != 0) return; + break; + case 2: + *ps=0; + nexttoken(); + *i2=popaddress(); + if (er != 0) return; + *i=popaddress(); + if (er != 0) return; + break; + default: + error(EARGS); + return; + } +/* we deal with a string array */ + if (token == '(') { + parsesubscripts(); + if (er != 0) return; + switch(args) { + case 1: + *j=popaddress(); + if (er != 0) return; + nexttoken(); + break; + default: + error(EARGS); + return; + } + } +#endif + break; +#endif + default: + error(EUNKNOWN); + return; + } +} + +void assignnumber(signed char t, char xcl, char ycl, address_t i, address_t j, char ps) { + switch (t) { + case VARIABLE: + x=pop(); + setvar(xcl, ycl, x); + break; + case ARRAYVAR: + x=pop(); + array('s', xcl, ycl, i, j, &x); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + ir=getstring(xcl, ycl, i, j); + if (er != 0) return; +#ifndef USEMEMINTERFACE + ir[0]=pop(); +#else + if (ir == 0) memwrite2(ax, pop()); +#endif + if (ps) + setstringlength(xcl, ycl, 1, j); + else + if (lenstring(xcl, ycl, j) < i && i <= stringdim(xcl, ycl)) setstringlength(xcl, ycl, i, j); + break; +#endif + } +} + + +/* + * LET - the core assigment function, this is different from other BASICs + */ +void assignment() { + token_t t; /* remember the left hand side token until the end of the statement, type of the lhs */ + mem_t ps=1; /* also remember if the left hand side is a pure string of something with an index */ + mem_t xcl, ycl; /* to preserve the left hand side variable names */ + address_t i=1; /* and the beginning of the destination string */ + address_t i2=0; /* and the end of the destination string */ + address_t j=arraylimit; /* the second dimension of the array */ + address_t lensource, lendest, newlength, strdim, copybytes; + mem_t s; + index_t k; + +/* this code evaluates the left hand side */ + ycl=yc; + xcl=xc; + t=token; + + lefthandside(&i, &i2, &j, &ps); + if (er != 0) return; + + if (DEBUG) { + outsc("** in assignment lefthandside with "); + outnumber(i); outspc(); + outnumber(j); outspc(); + outnumber(ps); outcr(); + } + +/* the assignment part */ + if (token != '=') { + error(EUNKNOWN); + return; + } + nexttoken(); + +/* here comes the code for the right hand side */ + switch (t) { +/* the lefthandside is a scalar, evaluate the righthandside as a number */ + case VARIABLE: + case ARRAYVAR: + expression(); + if (er != 0) return; + assignnumber(t, xcl, ycl, i, j, ps); + break; +#ifdef HASAPPLE1 +/* the lefthandside is a string, try evaluate the righthandside as a stringvalue */ + case STRINGVAR: + s=stringvalue(); + if (er != 0) return; + +/* and then as an expression */ + if (!s) { + expression(); + if (er != 0) return; + assignnumber(t, xcl, ycl, i, j, ps); + break; + } + +/* this is the string righthandside code - how long is the rightandside */ + lensource=pop(); + +/* the destination address of the lefthandside, on an SPI RAM system, we + save the source in the second string buffer and let ir2 point to it + this is needed to avoid the overwrite from the second getstring + then reuse much of the old code */ +#ifdef USEMEMINTERFACE + for(k=0; k strdim)) { error(EORANGE); return; }; + +/* if we have a second index, is it in range */ + if((i2 !=0) && i2>strdim) { error(EORANGE); return; }; + +/* caculate the number of bytes we truely want to copy */ + if (i2 > 0) copybytes=((i2-i+1) > lensource) ? lensource : (i2-i+1); else copybytes=lensource; + +/* this code is needed to make sure we can copy one string to the same string + without overwriting stuff, we go either left to right or backwards */ +#ifndef USEMEMINTERFACE + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; + +#else +/* on an SPIRAM system we need to go through the mem interface + for write, if ir is zero i.e. is not a valid memory location */ + if (ir != 0) { + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; + } else { + for (k=0; k lendest) newlength=i+copybytes-1; else newlength=lendest; + } + + setstringlength(xcl, ycl, newlength, j); + nexttoken(); + break; +#endif + } +} + +/* + * INPUT ["string",] variable [,["string",] variable]* + */ +void showprompt() { + outsc("? "); +} + +void xinput(){ + mem_t oldid = id; + mem_t prompt = 1; + address_t l; + number_t xv; + mem_t xcl, ycl; + address_t k; + + nexttoken(); + +/* modifiers of the input statement (stream) */ + if (token == '&') { + if(!expectexpr()) return; + oldid=id; + id=pop(); + if (id != ISERIAL || id !=IKEYBOARD) prompt=0; + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } +/* unlink print, form can appear only once in input after the + stream, it controls character counts in wire */ +#if (defined(HASWIRE) && defined(HASFILEIO)) + if (token == '#') { + if(!expectexpr()) return; + form=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } +#endif + +nextstring: + if (token == STRING && id != IFILE) { + prompt=0; + outs(ir, x); + nexttoken(); + if (token != ',' && token != ';') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + +nextvariable: + if (token == VARIABLE) { + if (prompt) showprompt(); + if (innumber(&xv) == BREAKCHAR) { + st=SINT; + token=EOL; + goto resetinput; + } else { + setvar(xc, yc, xv); + } + } + +/* we don't use the lefthandside call here because the input loop token handling + is different */ +#ifndef HASMULTIDIM + if (token == ARRAYVAR) { + xcl=xc; + ycl=yc; + nexttoken(); + parsesubscripts(); + if (er != 0 ) return; + if (args != 1) { + error(EARGS); + return; + } + + if (prompt) showprompt(); + if (innumber(&xv) == BREAKCHAR) { + st=SINT; + token=EOL; + goto resetinput; + } else { + array('s', xcl, ycl, pop(), arraylimit, &xv); + } + } +#else + if (token == ARRAYVAR) { + xcl=xc; + ycl=yc; + nexttoken(); + parsesubscripts(); + if (er != 0 ) return; + switch(args) { + case 1: + x=pop(); + y=arraylimit; + break; + case 2: + y=pop(); + x=pop(); + break; + default: + error(EARGS); + return; + } + + if (prompt) showprompt(); + if (innumber(&xv) == BREAKCHAR) { + st=SINT; + token=EOL; + goto resetinput; + } else { + array('s', xcl, ycl, x, y, &xv); + } + } +#endif + +#ifdef HASAPPLE1 +/* strings are not passed through the input buffer but inputed directly + in the string memory location, ir after getstring points to the first data byte */ + if (token == STRINGVAR) { + ir=getstring(xc, yc, 1, arraylimit); + if (prompt) showprompt(); + l=stringdim(xc, yc); +/* the form parameter in WIRE can be used to set the expected number of bytes */ + if (id == IWIRE && form != 0 && form < l) l=form; +#ifndef USEMEMINTERFACE + ins(ir-1, l); +/* this is the length information correction for large strings, ins + stored the string length in z.a as a side effect */ + if (xc != '@' && strindexsize == 2) { + *(ir-2)=z.b.l; + *(ir-1)=z.b.h; + } +#else + if (ir == 0) { + ins(spistrbuf1, l); + for(int k=0; k= BASEKEYWORD) || token < -127) { + if ((token == TTHEN || + token == TELSE || + token == TTO || + token == TSTEP || + token == TGOTO || + token == TGOSUB || + token == TOR || + token == TAND ) && lastouttoken != LINENUMBER) outspc(); + else + if (lastouttoken == NUMBER || lastouttoken == VARIABLE) outspc(); + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=token; i++); + outsc(getkeyword(i)); + if (token != GREATEREQUAL && token != NOTEQUAL && token != LESSEREQUAL && token != TREM) spaceafterkeyword=1; + break; + } + if (token >= 32) { + outch(token); + if (token == ':' && !outliteral) outspc(); + break; + } + outch(token); outspc(); outnumber(token); + } + + lastouttoken=token; +} + +/* + * LIST programs to an output device + */ +void xlist(){ + number_t b, e; + mem_t oflag = 0; + + lastouttoken=0; + spaceafterkeyword=0; + + nexttoken(); + parsearguments(); + if (er != 0) return; + + switch (args) { + case 0: + b=0; + e=32767; + break; + case 1: + b=pop(); + e=b; + break; + case 2: + e=pop(); + b=pop(); + break; + default: + error(EARGS); + return; + } + + if ( top == 0 ) { nexttoken(); return; } + + here=0; + gettoken(); + while (here < top) { + if (token == LINENUMBER && ax >= b) oflag=1; + if (token == LINENUMBER && ax > e) oflag=0; + if (oflag) outputtoken(); + gettoken(); + if (token == LINENUMBER && oflag) { + outcr(); +/* wait after every line on small displays + removed if ( dspactive() && (dsp_rows < 10) ){ if ( inch() == 27 ) break;} */ + if (dspactive()) + if ( dspwaitonscroll() == 27 ) break; + } + } + if (here == top && oflag) outputtoken(); + if (e == 32767 || b != e) outcr(); /* supress newlines in "list 50" - a little hack */ + + nexttoken(); + } + +/* + * RUN and CONTINUE are the same function + */ +void xrun(){ + if (token == TCONT) { + st=SRUN; + nexttoken(); + } else { + nexttoken(); + parsearguments(); + if (er != 0 ) return; + if (args > 1) { error(EARGS); return; } + if (args == 0) { + here=0; + } else { + findline(pop()); + } + if (er != 0) return; + if (st == SINT) st=SRUN; + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; +#ifdef HASEVENTS + events_enabled=1; +#endif + nexttoken(); + } + +/* once statement is called it stays into a loop until the token stream + is exhausted. Then we return to interactive mode. */ + statement(); + st=SINT; +/* flush the EEPROM when changing to interactive mode */ + eflush(); + +/* if called from command line with file arg - exit after run */ +#ifndef ARDUINO + if (bnointafterrun) restartsystem(); +#endif +} + +/* + * NEW the general cleanup function - new deletes everything + * + * restbasicstate() is a helper, it keeps the memory intact + * this is needed for EEPROM direct memory + */ +void resetbasicstate() { + + /* all stacks are purged */ + clearst(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrvars(); + clrlinecache(); + +/* error status reset */ + reseterror(); + +/* let here point to the beginning of the program */ + here=0; + +/* interactive mode */ + st=SINT; + +/* switch off timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +} + +void xnew(){ + +/* reset the state of the interpreter */ + resetbasicstate(); + +/* program memory back to zero and variable heap cleared */ + himem=memsize; + zeroblock(0, memsize); + top=0; + +/* on EEPROM systems also clear the stored state and top */ +#ifdef EEPROMMEMINTERFACE + eupdate(0, 0); + z.a=top; + esetnumber(1, addrsize); +#endif +} + +/* + * REM - skip everything + */ +void xrem() { + if (debuglevel == -1) outsc("REM: "); + while (token != LINENUMBER && token != EOL && here <= top) + { + nexttoken(); + if (debuglevel == -1) { + if (token != LINENUMBER) outputtoken(); else outcr(); + } + } +} + +/* + * The Apple 1 BASIC additions + * CLR, DIM, POKE, TAB + */ + +/* + * CLR - clearing variable space + */ +void xclr() { + +#ifdef HASDARKARTS + mem_t xcl, ycl, t; + + nexttoken(); + + if (termsymbol()) { + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + } else { + + xcl=xc; + ycl=yc; + t=token; + + switch (t) { + case VARIABLE: + if (xcl == '@' || ycl == 0) { error(EVARIABLE); return; } + break; + case ARRAYVAR: + nexttoken(); + if (token != '(') { error(EVARIABLE); return; } + nexttoken(); + if (token != ')') { error(EVARIABLE); return; } + break; + case STRINGVAR: + if (xcl == '@') { error(EVARIABLE); return; } + break; + default: + expression(); + if (er != 0) return; + ax=pop(); + xcl=ax%256; + ycl=ax/256; + t=TBUFFER; + } + + ax=bfree(t, xcl, ycl); + if (ax == 0) { + if (t != TBUFFER) { error(EVARIABLE); return; } + else ert=1; + } + } + +#else + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; +#endif + nexttoken(); +} + +#ifdef HASAPPLE1 +/* + * DIM - the dimensioning of arrays and strings from Apple 1 BASIC + */ +void xdim(){ + mem_t xcl, ycl; + token_t t; + number_t x, y; + + nexttoken(); + +nextvariable: + if (token == ARRAYVAR || token == STRINGVAR ){ + + t=token; + xcl=xc; + ycl=yc; + + nexttoken(); + parsesubscripts(); + if (er != 0) return; + +#ifndef HASMULTIDIM + if (args != 1) {error(EARGS); return; } + + x=pop(); + if (x<=0) {error(EORANGE); return; } + if (t == STRINGVAR) { + if ( (x>255) && (strindexsize==1) ) {error(EORANGE); return; } + (void) createstring(xcl, ycl, x, 1); + } else { + (void) createarray(xcl, ycl, x, 1); + } +#else + if (args != 1 && args != 2) {error(EARGS); return; } + + x=pop(); + if (args == 2) {y=x; x=pop(); } else { y=1; } + + if (x <= 0 || y<=0) {error(EORANGE); return; } + if (t == STRINGVAR) { + if ( (x>255) && (strindexsize==1) ) {error(EORANGE); return; } +/* running from an SPI RAM means that we need to go through buffers in real memory which + limits string sizes, this should ne be here but encapsulated, todo after multidim string + implementation is complete */ +#ifdef SPIRAMSBSIZE + if (x>SPIRAMSBSIZE-1) {error(EORANGE); return; } +#endif + (void) createstring(xcl, ycl, x, y); + } else { + (void) createarray(xcl, ycl, x, y); + } +#endif + } else { + error(EUNKNOWN); + return; + } + + nexttoken(); + if (token == ',') { + nexttoken(); + goto nextvariable; + } + + nexttoken(); +} + + +/* + * POKE - low level poke to the basic memory, works only up to 32767 + * variables changed to local + */ +void xpoke(){ + address_t amax; + index_t a, v; /* both can be signed ! */ + +/* 16 bit numbers can't poke big addresses */ + if ( (long) memsize > (long) maxnum) amax=(address_t) maxnum; else amax=memsize; + + nexttoken(); + parsenarguments(2); + if (er != 0) return; + + v=pop(); /* the value */ + a=pop(); /* the address */ + + if (a >= 0 && a= -elength()) + eupdate(-a-1, v); + else { + error(EORANGE); + } +} + +/* + * TAB - spaces command of Apple 1 BASIC + * charcount mechanism for relative tab if HASMSTAB is set + */ +void xtab(){ + address_t tx; + + nexttoken(); + parsenarguments(1); + if (er != 0) return; + + tx=popaddress(); + if (er != 0) return; + +#ifdef HASMSTAB + if (reltab && od <= OPRT && od > 0) { + if (charcount[od-1] >= tx) tx=0; else tx=tx-charcount[od-1]-1; + } +#endif + while (tx-- > 0) outspc(); +} +#endif + +/* + * locate the curor on the screen + */ + +void xlocate() { + address_t cx, cy; + + nexttoken(); + parsenarguments(2); + if (er != 0) return; + + cy=popaddress(); + cx=popaddress(); + if (er != 0) return; + +/* for locate we go through the VT52 interface for cursor positioning*/ + if (cx > 0 && cy > 0 && cx < 224 && cy < 224) { + outch(27); outch('Y'); + outch(31+(unsigned int) cy); + outch(31+(unsigned int) cx); + } + +/* set the charcount, this is half broken on escape sequences */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=cx; +#endif + +} + +/* + * Stefan's additions to Palo Alto BASIC + * DUMP, SAVE, LOAD, GET, PUT, SET + * + */ + +/* + * DUMP - memory dump program + */ +void xdump() { + address_t a, x; + char eflag = 0; + + nexttoken(); + if (token == '!') { eflag=1; nexttoken(); } + parsearguments(); + if (er != 0) return; + + switch (args) { + case 0: + x=0; + a=memsize; + break; + case 1: + x=pop(); + a=memsize; + break; + case 2: + a=pop(); + x=pop(); + break; + default: + error(EARGS); + return; + } + + form=6; + if (a>x) dumpmem((a-x)/8+1, x, eflag); + form=0; +} + +/* + * helper of DUMP, wrote the memory out + */ +void dumpmem(address_t r, address_t b, char eflag) { + address_t j, i; + address_t k; + mem_t c; + address_t end; + + k=b; + i=r; + if (eflag) end=elength(); else end=memsize; + while (i>0) { + outnumber(k); outspc(); + for (j=0; j<8; j++) { + if (eflag) c=eread(k); else c=memread(k); + k++; + outnumber(c); outspc(); + if (k > end) break; + } + outcr(); + i--; + if (k > end) break; + } + if (eflag) { + outsc("elength: "); outnumber(elength()); outcr(); + } else { + outsc("top: "); outnumber(top); outcr(); + outsc("himem: "); outnumber(himem); outcr(); + } +} + +/* + * creates a C string from a BASIC string + * after reading a BASIC string ir2 contains a pointer + * to the data and x the string length + */ +void stringtobuffer(char *buffer) { + index_t i; + i=x; + if (i >= SBUFSIZE) i=SBUFSIZE-1; + buffer[i--]=0; + while (i >= 0) { buffer[i]=ir2[i]; i--; } +} + +/* get a file argument */ +void getfilename(char *buffer, char d) { + index_t s; + char *sbuffer; + + s=stringvalue(); + if (er != 0) return; + if (DEBUG) {outsc("** in getfilename2 stringvalue delivered "); outnumber(s); outcr(); } + + if (s) { + x=pop(); + if (DEBUG) {outsc("** in getfilename2 copying string of length "); outnumber(x); outcr(); } + stringtobuffer(buffer); + if (DEBUG) {outsc("** in getfilename2 stringvalue string "); outsc(buffer); outcr(); } + nexttoken(); + } else if (termsymbol()) { + if (d) { + sbuffer=getmessage(MFILE); + s=0; + while ((sbuffer[s] != 0) && (s < SBUFSIZE-1)) { buffer[s]=sbuffer[s]; s++; } + buffer[s]=0; + x=s; + } else { + buffer[0]=0; + x=0; + } + nexttoken(); + } else { + expression(); + if (er != 0) return; + buffer[0]=pop(); + buffer[1]=0; + } +} + +#if defined(FILESYSTEMDRIVER) +/* + * SAVE a file either to disk or to EEPROM + */ +void xsave() { + char filename[SBUFSIZE]; + address_t here2; + token_t t; + + nexttoken(); + getfilename(filename, 1); + if (er != 0) return; + t=token; + + if (filename[0] == '!') { + esave(); + } else { + if (DEBUG) { outsc("** Opening the file "); outsc(filename); outcr(); }; + + if (!ofileopen(filename, "w")) { + error(EFILE); + return; + } + +/* save the output mode and then save */ + push(od); + od=OFILE; + +/* the core save - xlist() not used any more */ + ert=0; /* reset error to trap file problems */ + here2=here; + here=0; + gettoken(); + while (here < top) { + outputtoken(); + if (ert) break; + gettoken(); + if (token == LINENUMBER) outcr(); + } + if (here == top) outputtoken(); + outcr(); + +/* back to where we were */ + here=here2; + +/* restore the output mode */ + od=pop(); + +/* clean up */ + ofileclose(); + +/* did an accident happen */ + if (ert) { printmessage(EGENERAL); outcr(); ert=0; } + } + +/* and continue remembering, where we were */ + token=t; +} + +/* + * LOAD a file + */ +void xload(const char* f) { + char filename[SBUFSIZE]; + char ch; + address_t here2; + mem_t chain = 0; + + if (f == 0) { + nexttoken(); + getfilename(filename, 1); + if (er != 0) return; + } else { + for(ch=0; ch BUFSIZE) { + error(EOUTOFMEMORY); + break; + } + } + ifileclose(); +/* after a successful load we save top to the EEPROM header */ +#ifdef EEPROMMEMINTERFACE + z.a=top; + esetnumber(1, addrsize); +#endif + +/* go back to run mode and start from the first line */ + if (chain) { + st=SRUN; + here=0; + nexttoken(); + } + } +} +#else +/* + * SAVE a file to EEPROM - minimal version for small Arduinos + */ +void xsave() { + esave(); + nexttoken(); +} +/* + * LOAD a file from EEPROM - minimal version for small Arduinos + */ +void xload(const char* f) { + eload(); + nexttoken(); +} +#endif + +/* + * GET just one character from input + */ +void xget(){ + token_t t; /* remember the left hand side token until the end of the statement, type of the lhs */ + mem_t ps=1; /* also remember if the left hand side is a pure string or something with an index */ + mem_t xcl, ycl; /* to preserve the left hand side variable names */ + address_t i=1; /* and the beginning of the destination string */ + address_t i2=1; /* and the end of the destination string */ + address_t j=1; /* the second dimension of the array if needed */ + mem_t oid=id; /* remember the input stream */ + char ch; + + nexttoken(); + +/* modifiers of the get statement */ + if (token == '&') { + + if (!expectexpr()) return; + id=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + +/* this code evaluates the left hand side - remember type and name */ + ycl=yc; + xcl=xc; + t=token; + +/* find the indices */ + lefthandside(&i, &i2, &j, &ps); + if (er != 0) return; + +/* get the data, non blocking on Arduino */ + if (availch()) ch=inch(); else ch=0; + +/* store the data element as a number expect for */ + push(ch); + assignnumber(t, xcl, ycl, i, j, ps); + +/* but then, strings where we deliver a string with length 0 if there is no data */ +#ifdef HASAPPLE1 + if (t == STRINGVAR && ch == 0 && ps) setstringlength(xcl, ycl, 0, arraylimit); +#endif + +/* restore the output device */ + id=oid; +} + +/* + * PUT writes one character to an output stream + */ +void xput(){ + mem_t ood=od; + index_t i; + + nexttoken(); + +/* modifiers of the put statement */ + if (token == '&') { + + if(!expectexpr()) return; + od=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + parsearguments(); + if (er != 0) return; + + for (i=args-1; i>=0; i--) sbuffer[i]=pop(); + outs(sbuffer, args); + + od=ood; +} + +/* + * SET - the command itself is also apocryphal it is a low level + * control command setting certain properties + * syntax, currently it is only SET expression, expression + */ +void xset(){ + address_t fn; + index_t args; + + nexttoken(); + parsenarguments(2); + if (er != 0) return; + + args=pop(); + fn=pop(); + switch (fn) { +/* runtime debug level */ + case 0: + debuglevel=args; + break; +/* autorun/run flag of the EEPROM 255 for clear, 0 for prog, 1 for autorun */ + case 1: + eupdate(0, args); + break; +/* change the output device */ + case 2: + switch (args) { + case 0: + od=OSERIAL; + break; + case 1: + od=ODSP; + break; + } + break; +/* change the default output device */ + case 3: + switch (args) { + case 0: + od=(odd=OSERIAL); + break; + case 1: + od=(odd=ODSP); + break; + } + break; + /* change the input device */ + case 4: + switch (args) { + case 0: + id=ISERIAL; + break; + case 1: + id=IKEYBOARD; + break; + } + break; + /* change the default input device */ + case 5: + switch (args) { + case 0: + idd=(id=ISERIAL); + break; + case 1: + idd=(id=IKEYBOARD); + break; + } + break; +#ifdef ARDUINOPRT +/* set the cr behaviour */ + case 6: + sendcr=(char)args; + break; +/* set the blockmode behaviour */ + case 7: + blockmode=args; + break; +/* set the second serial ports baudrate */ + case 8: + prtset(args); + break; +#endif +/* set the power amplifier level of the radio module */ +#ifdef ARDUINORF24 + case 9: + radioset(args); + break; +#endif +/* display update control for paged displays */ + case 10: + dspsetupdatemode(args); + break; +/* change the output device to a true TAB */ +#ifdef HASMSTAB + case 11: + reltab=args; + break; +#endif +/* change the lower array limit */ +#ifdef HASARRAYLIMIT + case 12: + arraylimit=args; + break; +#endif +#ifdef HASKEYPAD + case 13: + kbdrepeat=args; + break; +#endif +#ifdef HASPULSE + case 14: + bpulseunit=args; + break; +#endif +#ifdef POSIXVT52TOANSI + case 15: + vt52active=args; + break; +#endif + } +} + +/* + * NETSTAT - network status command, rudimentary + */ +void xnetstat(){ +#if defined(ARDUINOMQTT) + + nexttoken(); + parsearguments(); + if (er != 0) return; + + switch (args) { + case 0: + if (netconnected()) outsc("Network connected \n"); else outsc("Network not connected \n"); + outsc("MQTT state "); outnumber(mqttstate()); outcr(); + outsc("MQTT out topic "); outsc(mqtt_otopic); outcr(); + outsc("MQTT inp topic "); outsc(mqtt_itopic); outcr(); + outsc("MQTT name "); outsc(mqttname); outcr(); + break; + case 1: + ax=pop(); + switch (ax) { + case 0: + netstop(); + break; + case 1: + netbegin(); + break; + case 2: + if (!mqttreconnect()) ert=1; + break; + default: + error(EARGS); + return; + } + break; + default: + error(EARGS); + return; + } +#endif + nexttoken(); +} + +/* + * The arduino io functions. + * + * DWRITE - digital write + */ +void xdwrite(){ + address_t x,y; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + x=pop(); + y=pop(); + if (er !=0) return; + dwrite(y, x); +} + +/* + * AWRITE - analog write + */ +void xawrite(){ + address_t x,y; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + x=popaddress(); + y=popaddress(); + if (er != 0) return; + awrite(y, x); +} + +/* + * PINM - pin mode + */ +void xpinm(){ + address_t x,y; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + x=popaddress(); + y=popaddress(); + if (er != 0) return; + pinm(y, x); +} + +/* + * DELAY in milliseconds + * + * this must call bdelay() and not delay() as bdelay() + * handles all the yielding and timing functions + * + */ +void xdelay(){ + nexttoken(); + parsenarguments(1); + if (er != 0) return; + bdelay(pop()); +} + +/* tone if the platform has it -> BASIC command PLAY */ +#ifdef HASTONE +void xtone(){ + nexttoken(); + parsearguments(); + if (er != 0) return; + if (args>4 || args<2) { + error(EARGS); + return; + } + btone(args); +} +#endif + +/* pulse output - pin, duration, [value], [repetitions, delay] */ +#ifdef HASPULSE +void xpulse(){ + nexttoken(); + parsearguments(); + if (er != 0) return; + if (args>5 || args<2) { + error(EARGS); + return; + } + bpulseout(args); +} +#endif + + +#ifdef HASGRAPH +/* + * COLOR setting, accepting one or 3 arguments + */ +void xcolor() { + short r, g, b; + nexttoken(); + parsearguments(); + if (er != 0) return; + switch(args) { + case 1: + vgacolor(pop()); + break; + case 3: + b=pop(); + g=pop(); + r=pop(); + rgbcolor(r, g, b); + break; + default: + error(EARGS); + break; + } +} + +/* + * PLOT a pixel on the screen + */ +void xplot() { + short x0, y0; + nexttoken(); + parsenarguments(2); + if (er != 0) return; + y0=pop(); + x0=pop(); + plot(x0, y0); +} + +/* + * LINE draws a line + */ +void xline() { + short x0, y0, x1, y1; + nexttoken(); + parsenarguments(4); + if (er != 0) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + line(x0, y0, x1, y1); +} + +void xrect() { + short x0, y0, x1, y1; + nexttoken(); + parsenarguments(4); + if (er != 0) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + rect(x0, y0, x1, y1); +} + +void xcircle() { + short x0, y0, r; + nexttoken(); + parsenarguments(3); + if (er != 0) return; + r=pop(); + y0=pop(); + x0=pop(); + circle(x0, y0, r); +} + +void xfrect() { + short x0, y0, x1, y1; + nexttoken(); + parsenarguments(4); + if (er != 0) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + frect(x0, y0, x1, y1); +} + +void xfcircle() { + short x0, y0, r; + nexttoken(); + parsenarguments(3); + if (er != 0) return; + r=pop(); + y0=pop(); + x0=pop(); + fcircle(x0, y0, r); +} +#endif + +#ifdef HASDARKARTS +/* + * MALLOC allocates a chunk of memory + */ +void xmalloc() { + address_t s; + address_t a; + + s=popaddress(); + a=popaddress(); + if (er != 0) return; + + push(bmalloc(TBUFFER, a%256, a/256, s)); +} + +/* + * FIND an object on the heap + * xfind can find things in the variable name space and the buffer space + */ + +void xfind() { + address_t a; + address_t n; + +/* is there a ( */ +if (!expect('(', EUNKNOWN)) return; + +/* after that, try to find the object on the heap */ + nexttoken(); + a=bfind(token, xc, yc); + +/* depending on the object, interpret the result */ + switch (token) { + case ARRAYVAR: + if (!expect('(', EUNKNOWN)) return; + if (!expect(')', EUNKNOWN)) return; + case VARIABLE: + case STRINGVAR: + nexttoken(); + break; + default: + expression(); /* do not use expectexpr here because of the token sequence */ + if (er != 0) return; + n=popaddress(); + if (er != 0) return; + a=bfind(TBUFFER, n%256, n/256); + } + +/* closing braket, dont use expect here because of the token sequence */ + if (token != ')') { error(EUNKNOWN); return; } + + push(a); +} + +/* + * EVAL can modify a program, there are serious side effects + * which are not caught (and cannot be). All FOR loops and RETURN + * vectors break if EVAL inserts in their range + */ +void xeval(){ + address_t i, l; + address_t mline, line; + + +/* get the line number to store */ + if (!expectexpr()) return; + line=popaddress(); + if (er != 0) return; + + if (token != ',') { + error(EUNKNOWN); + return; + } + +/* the line to be stored */ + nexttoken(); + if (!stringvalue()) { + error(EARGS); return; + } + +/* here we have the string to evaluate in ir2 and copy it to the ibuffer + only one line allowed, BUFSIZE is the limit */ + l=popaddress(); + if (er != 0) return; + + if (l>BUFSIZE-1) {error(EORANGE); return; } + + for (i=0; ienabled=0; + t->interval=0; + t->last=0; + t->type=0; + t->linenumber=0; +} + +void xtimer() { + token_t t; + btimer_t* timer; + +/* do we deal with every or after */ + if (token == TEVERY) timer=&every_timer; else timer=&after_timer; + + /* one argument expected, the time intervall */ + if (!expectexpr()) return; + + /* after that, a command GOTO or GOSUB with a line number + more commands thinkable */ + switch(token) { + case TGOSUB: + case TGOTO: + t=token; + if (!expectexpr()) return; + timer->last=millis(); + timer->type=t; + timer->linenumber=pop(); + timer->interval=pop(); + timer->enabled=1; + break; + default: + if (termsymbol()) { + x=pop(); + if (x == 0) + timer->enabled=0; + else { + if (timer->linenumber) { + timer->enabled=1; + timer->interval=x; + timer->last=millis(); + } else + error(EARGS); + } + } else + error(EUNKNOWN); + return; + } +} +#endif + +#ifdef HASEVENTS +/* the event BASIC commands */ +void initevents() { + int i; + for(i=0; i= 0) { + outnumber(eventlist[ax].pin); outspc(); + outnumber(eventlist[ax].mode); outspc(); + outnumber(eventlist[ax].type); outspc(); + outnumber(eventlist[ax].linenumber); outspc(); + outcr(); + } + } + outnumber(nevents); outcr(); + nexttoken(); + return; + } + +/* control of events */ + if (token == TSTOP) { + events_enabled=0; + nexttoken(); + return; + } + + if (token == TCONT) { + events_enabled=1; + nexttoken(); + return; + } + +/* argument parsing */ + parsearguments(); + if (er != 0) return; + + switch(args) { + case 2: + mode=pop(); + if (mode > 3) { + error(EARGS); + return; + } + case 1: + pin=pop(); + break; + default: + error(EARGS); + } + +/* followed by termsymbol, GOTO or GOSUB */ + if (token == TGOTO || token == TGOSUB) { + type=token; + +/* which line to go to */ + if (!expectexpr()) return; + line=pop(); + } + + +/* all done either set the interrupt up or delete it*/ + if (type) { + if (!addevent(pin, mode, type, line)) { + error(EARGS); + return; + } + } else { + disableevent(pin); + deleteevent(pin); + return; + } + +/* enable the interrupt */ + if (!enableevent(pin)) { + deleteevent(pin); + error(EARGS); + return; + } +} + +/* handling the event list */ +mem_t addevent(mem_t pin, mem_t mode, mem_t type, address_t linenumber) { + int i; + +/* is the event already there */ + for (i=0; i= EVENTLISTSIZE) return 0; + for (i=0; i=0){ + eventlist[i].enabled=0; + eventlist[i].pin=-1; + eventlist[i].mode=0; + eventlist[i].type=0; + eventlist[i].linenumber=0; + eventlist[i].active=0; + nevents--; + } +} + + +mem_t eventindex(mem_t pin) { + int i; + for(i=0; i0) outnumber(rootfilesize()); + outcr(); + if ( dspwaitonscroll() == 27 ) break; + } + } + rootfileclose(); + } + rootclose(); +#else + nexttoken(); +#endif +} + +/* + * DELETE a file + */ +void xdelete() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + + nexttoken(); + getfilename(filename, 0); + if (er != 0) return; + + removefile(filename); +#else + nexttoken(); +#endif +} + +/* + * OPEN a file or I/O stream - very raw mix of different functions + */ +void xopen() { +#if defined(FILESYSTEMDRIVER) || defined(ARDUINORF24) || defined(ARDUINOMQTT) || (defined(HASWIRE) && defined(HASFILEIO)) + char stream = IFILE; // default is file operation + char filename[SBUFSIZE]; + int mode; + +/* which stream do we open? default is FILE */ + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',') {error(EUNKNOWN); return; } + nexttoken(); + } + +/* the filename and its length */ + getfilename(filename, 0); + if (er != 0) return; + +/* and the arguments */ + args=0; + if (token == ',') { + nexttoken(); + parsearguments(); + } + +/* getting an argument, no argument is read, i.e. mode 0 */ + if (args == 0 ) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + switch(stream) { +#ifdef ARDUINOPRT + case ISERIAL1: + prtclose(); + if (mode == 0) mode=9600; + if (prtopen(filename, mode)) ert=0; else ert=1; + break; +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + switch (mode) { + case 1: + ofileclose(); + if (ofileopen(filename, "w")) ert=0; else ert=1; + break; + case 2: + ofileclose(); + if (ofileopen(filename, "a")) ert=0; else ert=1; + break; + default: + case 0: + ifileclose(); + if (ifileopen(filename)) ert=0; else ert=1; + break; + } + break; +#endif +#ifdef ARDUINORF24 + case IRADIO: + if (mode == 0) { + iradioopen(filename); + } else if (mode == 1) { + oradioopen(filename); + } + break; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + wireopen(filename[0], mode); + break; +#endif +#ifdef ARDUINOMQTT + case IMQTT: + if (mode == 0) { + mqttsubscribe(filename); + } else if (mode == 1) { + mqttsettopic(filename); + } + break; +#endif + default: + error(EORANGE); + return; + + } +#endif + nexttoken(); +} + +/* + * OPEN as a function, currently only implemented for MQTT + */ +void xfopen() { + short chan = pop(); + if (chan == 9) push(mqttstate()); else push(0); +} + +/* + * CLOSE a file or stream + */ +void xclose() { +#if defined(FILESYSTEMDRIVER) || defined(ARDUINORF24) || defined(ARDUINOMQTT) || (defined(HASWIRE) && defined(HASFILEIO)) + char stream = IFILE; + char mode; + + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',' && ! termsymbol()) {error(EUNKNOWN); return; } + nexttoken(); + } + + parsearguments(); + if (args == 0) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + + switch(stream) { + case IFILE: + if (mode == 1 || mode == 2) ofileclose(); else if (mode == 0) ifileclose(); + break; + } +#endif + nexttoken(); +} + +/* + * FDISK - format internal disk storages of RP2040, ESP and the like + */ +void xfdisk() { +#if defined(FILESYSTEMDRIVER) + nexttoken(); + parsearguments(); + if (er != 0) return; + if (args > 1) error(EORANGE); + if (args == 0) push(0); + outsc("Format disk (y/N)?"); + consins(sbuffer, SBUFSIZE); + if (sbuffer[1] == 'y') formatdisk(pop()); +#endif + nexttoken(); +} + +#ifdef HASSTEFANSEXT +/* + * USR low level function access of the interpreter + * for each group of functions there is a call vector + * and and argument. + * + * USR arguments from 0 to 31 are reserved for the + * interpreter status and the input output stream + * mechanisms. All other values are free and can be used + * for individual functions - see case 32 for an example. + */ +void xusr() { + address_t fn; + number_t v; + int arg; + address_t a; + + v=pop(); + arg=(int)v; /* a bit paranoid here */ + fn=pop(); + switch(fn) { +/* USR(0,y) delivers all the internal constants and variables or the interpreter */ + case 0: + switch(arg) { + case 0: push(bsystype); break; + case 1: /* language set identifier, odd because USR is part of STEFANSEXT*/ + a=0; +#ifdef HASAPPLE1 + a|=1; +#endif +#ifdef HASARDUINOIO + a|=2; +#endif +#ifdef HASFILEIO + a|=4; +#endif +#ifdef HASDARTMOUTH + a|=8; +#endif +#ifdef HASGRAPH + a|=16; +#endif +#ifdef HASDARKARTS + a|=32; +#endif +#ifdef HASIOT + a|=64; +#endif + push(a); + break; + case 2: push(0); break; /* reserved for system speed identifier */ + +#ifdef HASFLOAT + case 3: push(-1); break; +#else + case 3: push(0); break; +#endif + case 4: push(numsize); break; + case 5: push(maxnum); break; + case 6: push(addrsize); break; + case 7: push(maxaddr); break; + case 8: push(strindexsize); break; + case 9: push(memsize+1); break; + case 10: push(elength()); break; + case 11: push(GOSUBDEPTH); break; + case 12: push(FORDEPTH); break; + case 13: push(STACKSIZE); break; + case 14: push(BUFSIZE); break; + case 15: push(SBUFSIZE); break; + case 16: push(ARRAYSIZEDEF); break; + case 17: push(STRSIZEDEF); break; +/* - 24 reserved, don't use */ + case 24: push(top); break; + case 25: push(here); break; + case 26: push(himem); break; + case 27: push(nvars); break; + case 28: push(freeRam()); break; + case 29: push(gosubsp); break; + case 30: push(forsp); break; + case 31: push(0); break; /* fnc removed as interpreter variable */ + case 32: push(sp); break; +#ifdef HASDARTMOUTH + case 33: push(data); break; +#else + case 33: push(0); break; +#endif + case 34: push(0); break; +/* - 48 reserved, don't use */ + case 48: push(id); break; + case 49: push(idd); break; + case 50: push(od); break; + case 51: push(odd); break; + default: push(0); + } + break; +/* access to properties of stream 1 - serial */ + case 1: + push(serialstat(arg)); + break; +/* access to properties of stream 2 - display and keyboard */ + case 2: +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + push(dspstat(arg)); +#elif defined(ARDUINOVGA) + push(vgastat(arg)); +#else + push(0); +#endif + break; +/* access to properties of stream 4 - printer */ +#ifdef ARDUINOPRT + case 4: + push(prtstat(arg)); + break; +#endif +/* access to properties of stream 7 - wire */ +#if (defined(HASWIRE) && defined(HASFILEIO)) + case 7: + push(wirestat(arg)); + break; +#endif +/* access to properties of stream 8 - radio */ +#ifdef ARDUINORF24 + case 8: + push(radiostat(arg)); + break; +#endif +/* access to properties of stream 9 - mqtt */ +#ifdef ARDUINOMQTT + case 9: + push(mqttstat(arg)); + break; +#endif +/* access to properties of stream 16 - file */ +#ifdef FILESYSTEMDRIVER + case 16: + push(fsstat(arg)); + break; +#endif + case 32: +/* user function 32 and beyond can be used freely */ +/* all USR values not assigned return 0 */ + default: + if (fn>31) push(usrfunction(fn, v)); else push(0); + } +} + +#endif + +/* + * CALL currently only to exit the interpreter + */ +void xcall() { + int r; + + if (!expectexpr()) return; + r=pop(); + switch(r) { + case 0: +/* flush the EEPROM dummy and the output file and then exit */ + eflush(); + ofileclose(); +#if defined(POSIXFRAMEBUFFER) + vgaend(); /* clean up if you have played with the framebuffer */ +#endif + restartsystem(); + break; +/* restart the filesystem - only test code */ + case 1: + fsbegin(1); + break; +/* call values to 31 reserved! */ + default: +/* your custom code into usrcall() */ + if (r > 31) usrcall(r); else { error(EORANGE); return; } + nexttoken(); + return; + } +} + +/* the dartmouth stuff */ +#ifdef HASDARTMOUTH +/* + * DATA is simply skipped when encountered as a command + */ +void xdata() { + while (!termsymbol()) nexttoken(); +} + +/* + * for READ find the next data record, helper of READ + */ +#define DEBUG 0 +void nextdatarecord() { + address_t h; + mem_t s=1; + +/* save the location of the interpreter */ + h=here; + +/* data at zero means we need to init it, by searching the first data record */ + if (data == 0) { + here=0; + while (here stringdim(xcl, ycl)) { error(EORANGE); return; } + +/* this code is needed to make sure we can copy one string to the same string + without overwriting stuff, we go either left to right or backwards */ +#ifndef USEMEMINTERFACE + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; +#else +/* on an SPIRAM system we need to go through the mem interface + for write */ + if (ir != 0) { + if (x > i) + for (k=0; k=0; k--) ir[k]=ir2[k]; + } else + for (k=0; k args && cr <= 0) ci=0; else ci=(int)cr; + +/* now find the line to jump to and clean the stack, reuse cr + * we need to clean the stack here completely, therefore complete the loop + * ERROR handling is needed for the trapping mechanism. No using popaddress() + * here, because of the needed stack cleanup. Unclear is this precaution is + * really needed. + */ + while (args) { + tmp=pop(); + if (args == ci) { + if (tmp < 0) er=ELINE; + line=tmp; + } + args--; + } + + if (er) return; + + if (DEBUG) { outsc("** in on found line as target "); outnumber(line); outcr(); } +/* no line found to jump to */ + if (line == 0) { + nexttoken(); + return; + } + +/* prepare for the jump */ + if (t == TGOSUB) pushgosubstack(0); + if (er != 0) return; + + findline(line); + if (er != 0) return; + +/* goto in interactive mode switched to RUN mode + no clearing of variables and stacks */ + if (st == SINT) st=SRUN; + + /* removed to avoid blocking in AFTER, EVERY and EVENT infinite loops */ + /* nexttoken(); */ +} + +#endif + +/* the structured BASIC extensions, WHILE, UNTIL, and SWITCH */ + +#ifdef HASSTRUCT + +void xwhile() { + +/* what? */ + if (DEBUG) { outsc("** in while "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points to the condition */ + pushforstack(); + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND and clear the stack*/ + if (!pop()) { + popforstack(); + if (st == SINT) bi=ibuffer+here; + findbraket(TWHILE, TWEND); + nexttoken(); + } +} + +void xwend() { + +/* remember where we are */ + pushlocation(); + +/* back to the condition */ + popforstack(); + if (er != 0) return; + +/* interactive run */ + if (st == SINT) bi=ibuffer+here; + +/* is this a while loop */ + if (token != TWHILE ) { + error(TWEND); + return; + } + +/* run the loop again - same code as xwhile */ + if (st == SINT) here=bi-ibuffer; + pushforstack(); + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND */ + if (!pop()) { + popforstack(); + poplocation(); + nexttoken(); + } +} + +void xrepeat() { + /* what? */ + if (DEBUG) { outsc("** in repeat "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points statement after repeat */ + pushforstack(); + +/* we are done here */ + nexttoken(); + +} + +void xuntil() { + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* remember the location */ + pushlocation(); + +/* look on the stack */ + popforstack(); + if (er != 0) return; + +/* if false, go back to the repeat */ + if (!pop()) { + +/* the right loop type ? */ + if (token != TREPEAT) { + error(TUNTIL); + return; + } + +/* correct for interactive */ + if (st == SINT) bi=ibuffer+here; + +/* write the stack back if we continue looping */ + pushforstack(); + + } else { + +/* back to where we were */ + poplocation(); + } + + nexttoken(); /* a bit of evil here, hobling over termsymbols */ + +} + +void xswitch() { + number_t r; + mem_t match = 0; + mem_t swcount = 0; + +/* lets look at the condition */ + if (!expectexpr()) return; + r=pop(); + +/* remember where we are */ + pushlocation(); + +/* seek the first case to match the condition */ + while (token != EOL) { + if (token == TSWEND) break; + /* nested SWITCH - skip them all*/ + if (token == TSWITCH) { + + if (DEBUG) { outsc("** in SWITCH - nesting found "); outcr(); } + + nexttoken(); + findbraket(TSWITCH, TSWEND); + + if (DEBUG) { outsc("** in SWITCH SWEND found at "); outnumber(here); outcr(); } + + if (er != 0) return; + } + /* a true case */ + if (token == TCASE) { + +/* more sophisticated, case can have an argument list */ + nexttoken(); + parsearguments(); + + if (DEBUG) { outsc("** in CASE found "); outnumber(args); outsc(" arguments"); outcr(); } + + if (er != 0) return; + if (args == 0) { + error(TCASE); + return; + } + while (args > 0) { + if (pop() == r) match=1; + args--; + } + + if (match) { + return; + } + } + nexttoken(); + } + +/* return to the original location and continue if no case is found */ + poplocation(); +} + +/* a nacked case statement always seeks the end of the switch */ +void xcase() { + while (token != EOL) { + nexttoken(); + if (token == TSWEND) break; +/* broken if switch is nested deeper then once, need the braket mechanism here */ +/* + if (token == TSWITCH) { + nexttoken(); + findbraket(TSWITCH, TSWEND); + } +*/ + } +} +#endif + + +/* + * statement processes an entire basic statement until the end + * of the line. + * + * The statement loop is a bit odd and requires some explanation. + * A statement function called in the central switch here must either + * call nexttoken as its last action to feed the loop with a new token + * and then break or it must return which means that the rest of the + * line is ignored. A function that doesn't call nexttoken and just + * breaks causes an infinite loop. + * + * statement is called once in interactive mode and terminates + * at end of a line. + */ +void statement(){ + if (DEBUG) bdebug("statement \n"); + while (token != EOL) { +#ifdef HASSTEFANSEXT +/* debug level 1 happens only in the statement loop */ + if (debuglevel == 1) { debugtoken(); outcr(); } +#endif + switch(token){ + case ':': + case LINENUMBER: + nexttoken(); + break; +/* Palo Alto BASIC language set + BREAK */ + case TPRINT: + xprint(); + break; + case TLET: + nexttoken(); + if ((token != ARRAYVAR) && (token != STRINGVAR) && (token != VARIABLE)) { + error(EUNKNOWN); + break; + } + case STRINGVAR: + case ARRAYVAR: + case VARIABLE: + assignment(); + break; + case TINPUT: + xinput(); + break; + case TRETURN: + xreturn(); + break; + case TGOSUB: + case TGOTO: + xgoto(); + break; + case TIF: + xif(); + break; + case TFOR: + xfor(); + break; + case TNEXT: + xnext(); + break; + case TBREAK: + xbreak(); + break; + case TSTOP: + case TEND: /* return here because new input is needed, end as a block end is handles elsewhere */ + *ibuffer=0; /* clear ibuffer - this is a hack */ + st=SINT; /* switch to interactive mode */ + eflush(); /* if there is an EEPROM dummy, flush it here (protects flash storage!) */ + ofileclose(); + return; + case TLIST: + xlist(); + break; + case TNEW: /* return here because new input is needed */ + xnew(); + return; + case TCONT: /* cont behaves differently in interactive and in run mode */ + if (st==SRUN || st==SERUN) { + xcont(); + break; + } /* no break here, because interactively CONT=RUN minus CLR */ + case TRUN: + xrun(); + return; + case TREM: + xrem(); + break; +/* Apple 1 language set */ +#ifdef HASAPPLE1 + case TDIM: + xdim(); + break; + case TCLR: + xclr(); + break; + case TTAB: + xtab(); + break; + case TPOKE: + xpoke(); + break; +#endif +/* Stefan's tinybasic additions */ + case TSAVE: + xsave(); + break; + case TLOAD: + xload(0); + if (st == SINT) return; /* interactive load doesn't like break as the ibuffer is messed up; */ + else break; +#ifdef HASSTEFANSEXT + case TDUMP: + xdump(); + break; + case TGET: + xget(); + break; + case TPUT: + xput(); + break; + case TSET: + xset(); + break; + case TNETSTAT: + xnetstat(); + break; + case TCLS: + xc=od; +/* if we have a display it is the default for CLS */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + od=ODSP; +#endif + outch(12); + od=xc; + nexttoken(); + break; + case TLOCATE: + xlocate(); + break; +/* low level functions as part of Stefan's extension */ + case TCALL: + xcall(); + break; +#endif +/* Arduino IO */ +#ifdef HASARDUINOIO + case TDWRITE: + xdwrite(); + break; + case TAWRITE: + xawrite(); + break; + case TPINM: + xpinm(); + break; + case TDELAY: + xdelay(); + break; +#ifdef HASTONE + case TTONE: + xtone(); + break; +#endif +#ifdef HASPULSE + case TPULSE: + xpulse(); + break; +#endif +#endif +/* BASIC DOS function */ +#ifdef HASFILEIO + case TCATALOG: + xcatalog(); + break; + case TDELETE: + xdelete(); + break; + case TOPEN: + xopen(); + break; + case TCLOSE: + xclose(); + break; + case TFDISK: + xfdisk(); + break; +#endif +/* graphics */ +#ifdef HASGRAPH + case TCOLOR: + xcolor(); + break; + case TPLOT: + xplot(); + break; + case TLINE: + xline(); + break; + case TRECT: + xrect(); + break; + case TCIRCLE: + xcircle(); + break; + case TFRECT: + xfrect(); + break; + case TFCIRCLE: + xfcircle(); + break; +#endif +#ifdef HASDARTMOUTH + case TDATA: + xdata(); + break; + case TREAD: + xread(); + break; + case TRESTORE: + xrestore(); + break; + case TDEF: + xdef(); + break; + case TON: + xon(); + break; +#endif +#ifdef HASSTEFANSEXT + case TELSE: + xelse(); + break; +#endif +#ifdef HASDARKARTS + case TEVAL: + xeval(); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + break; +#endif +#ifdef HASIOT + case TSLEEP: + xsleep(); + break; + case TWIRE: + xwire(); + break; +#endif +#ifdef HASTIMER + case TAFTER: + case TEVERY: + xtimer(); + break; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + break; +#endif +#ifdef HASSTRUCT + case TWHILE: + xwhile(); + break; + case TWEND: + xwend(); + break; + case TREPEAT: + xrepeat(); + break; + case TUNTIL: + xuntil(); + break; + case TSWITCH: + xswitch(); + break; + case TCASE: + xcase(); + break; + case TSWEND: + case TDO: + case TDEND: + nexttoken(); + break; +#endif + default: +/* strict syntax checking */ + error(EUNKNOWN); + return; + } + + +/* + * after each statement we check on a break character + * on an Arduino entering "#" at runtime stops the program + * for POSIXNONBLOCKING we do this in the background loop + * to avoid slowing down + */ +#if defined(BREAKCHAR) +#ifndef POSIXNONBLOCKING + if (checkch() == BREAKCHAR) { + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#else + if (breakcondition) { + breakcondition=0; + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#endif +#endif + +/* and after each statement, check the break pin */ +#if defined(BREAKPIN) && ( defined(ARDUINO) || defined(RASPPI) ) + if (digitalRead(BREAKPIN) == 0) { + st=SINT; + return; + }; +#endif + +/* and then there is also signal handling on some platforms */ +#if defined(POSIXSIGNALS) + if (breaksignal) { + st=SINT; + breaksignal=0; + serialflush(); + outcr(); + return; + } +#endif + +/* yield after each statement which is a 10-100 microsecond cycle + on Arduinos and the like, all background tasks are handled in byield */ + byield(); + +/* if error handling is compiled into the code, errors can be trapped here */ +#ifdef HASERRORHANDLING + if (er) { + if (st != SINT) { + erh=er; + er=0; + switch(berrorh.type) { + case TCONT: + while(!termsymbol()) nexttoken(); + break; + case TGOTO: + findline(berrorh.linenumber); + berrorh.type=0; + berrorh.linenumber=0; + if (er) return; + break; + case 0: + return; + default: + nexttoken(); + } + } else + return; + } +#else +/* when an error is encountered the statement loop is ended */ + if (er) return; +#endif + +/* + * if we run error free, interrupts and times can be processed + * + * We can savely interrupt and return only if here points either to + * a termsymbol : or LINENUMBER. NEXT is a special case. We need to + * catch this here because empty FOR loops never even have a termsymbol + * a : is swallowed after FOR. + * + */ +#ifdef HASTIMER + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* after is always processed before every */ + if (after_timer.enabled) { + if (millis() > after_timer.last + after_timer.interval) { + after_timer.enabled=0; + if (after_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + } + findline(after_timer.linenumber); + if (er) return; + } + } +/* periodic events */ + if (every_timer.enabled ) { + if (millis() > every_timer.last + every_timer.interval) { + every_timer.last=millis(); + if (every_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + if (er != 0) return; + } + findline(every_timer.linenumber); + if (er != 0) return; + } + } + } +#endif + +/* the branch code for interrupts, we round robin through the event list */ +#ifdef HASEVENTS + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* interrupts */ + if (events_enabled) { + for (ax=0; ax +#include +#ifdef HASFLOAT +#include +#include +#endif +#include +#include +#include +#ifndef MSDOS +#include +#include +#else +#include +#include +#endif +#ifdef MINGW +#include +#endif +#endif + + +#if defined(ARDUINO_ARCH_AVR) +/* the small memory model with shallow stacks and small buffers */ +#define BUFSIZE 80 +#define STACKSIZE 15 +#define GOSUBDEPTH 4 +#define FORDEPTH 4 +#define LINECACHESIZE 4 +#else +/* the for larger microcontrollers */ +#ifdef ARDUINO +#define BUFSIZE 128 +#define STACKSIZE 64 +#define GOSUBDEPTH 8 +#define FORDEPTH 8 +#define LINECACHESIZE 16 +#else +/* for real computers */ +#define BUFSIZE 256 +#define STACKSIZE 256 +#define GOSUBDEPTH 64 +#define FORDEPTH 64 +#define LINECACHESIZE 64 +#endif +#endif + +/* on the real small systems we remove the linecache and set a fixed memory size*/ +#ifdef ARDUINO_AVR_DUEMILANOVE +#undef LINECACHESIZE +#if MEMSIZE == 0 +#define MEMSIZE 512 +#endif +#endif + +/* more duffers and vars */ +#define SBUFSIZE 32 +#define VARSIZE 26 +/* default sizes of arrays and strings if they are not DIMed */ +#define ARRAYSIZEDEF 10 +#define STRSIZEDEF 32 + +/* + * the time intervall in ms needed for + * ESP8266 yields, network client loops + * and other timing related functions + */ +#define LONGYIELDINTERVAL 1000 +#define YIELDINTERVAL 32 +#define YIELDTIME 2 + +/* the default EEPROM dummy size */ +#define EEPROMSIZE 1024 + +/* after run behaviour on POSIX systems, 1 to terminate if started + on the command line with a file argument, 0 to stay active and + show a BASIC prompt*/ +#define TERMINATEAFTERRUN 1 + +/* + * The tokens for the BASIC keywords + * + * All single character operators are their own tokens + * ASCII values above 0x7f are used for tokens of keywords. + * EOL is a token + */ +#define EOL 0 +#define NUMBER -127 +#define LINENUMBER -126 +#define STRING -125 +#define VARIABLE -124 +#define STRINGVAR -123 +#define ARRAYVAR -122 +/* multi character tokens - BASEKEYWORD (3) */ +#define GREATEREQUAL -121 +#define LESSEREQUAL -120 +#define NOTEQUAL -119 +/* this is the Palo Alto Language Set (19) */ +#define TPRINT -118 +#define TLET -117 +#define TINPUT -116 +#define TGOTO -115 +#define TGOSUB -114 +#define TRETURN -113 +#define TIF -112 +#define TFOR -111 +#define TTO -110 +#define TSTEP -109 +#define TNEXT -108 +#define TSTOP -107 +#define TLIST -106 +#define TNEW -105 +#define TRUN -104 +#define TABS -103 +#define TRND -102 +#define TSIZE -101 +#define TREM -100 +/* this is the Apple 1 language set in addition to Palo Alto (14) */ +#define TNOT -99 +#define TAND -98 +#define TOR -97 +#define TLEN -96 +#define TSGN -95 +#define TPEEK -94 +#define TDIM -93 +#define TCLR -92 +#define THIMEM -91 +#define TTAB -90 +#define TTHEN -89 +#define TEND -88 +#define TPOKE -87 +/* Stefan's tinybasic additions (14) */ +#define TCONT -86 +#define TSQR -85 +#define TPOW -84 +#define TMAP -83 +#define TDUMP -82 +#define TBREAK -81 +#define TSAVE -80 +#define TLOAD -79 +#define TGET -78 +#define TPUT -77 +#define TSET -76 +#define TCLS -75 +#define TLOCATE -74 +#define TELSE -73 +/* Arduino functions (10) */ +#define TPINM -72 +#define TDWRITE -71 +#define TDREAD -70 +#define TAWRITE -69 +#define TAREAD -68 +#define TDELAY -67 +#define TMILLIS -66 +#define TTONE -65 +#define TPULSE -64 +#define TAZERO -63 +#define TLED -62 +/* the DOS functions (5) */ +#define TCATALOG -61 +#define TDELETE -60 +#define TOPEN -59 +#define TCLOSE -58 +#define TFDISK -57 +/* low level access of internal routines (2) */ +#define TUSR -56 +#define TCALL -55 +/* mathematical functions (7) */ +#define TSIN -54 +#define TCOS -53 +#define TTAN -52 +#define TATAN -51 +#define TLOG -50 +#define TEXP -49 +#define TINT -48 +/* graphics - experimental - rudimentary (7) */ +#define TCOLOR -47 +#define TPLOT -46 +#define TLINE -45 +#define TCIRCLE -44 +#define TRECT -43 +#define TFCIRCLE -42 +#define TFRECT -41 +/* the Dartmouth extensions (6) */ +#define TDATA -40 +#define TREAD -39 +#define TRESTORE -38 +#define TDEF -37 +#define TFN -36 +#define TON -35 +/* darkarts (3) */ +#define TMALLOC -34 +#define TFIND -33 +#define TEVAL -32 +/* iot extensions (9) */ +#define TERROR -31 +#define TAVAIL -30 +#define TSTR -29 +#define TINSTR -28 +#define TVAL -27 +#define TNETSTAT -26 +#define TSENSOR -25 +#define TWIRE -24 +#define TSLEEP -23 +/* events and interrupts */ +#define TAFTER -22 +#define TEVERY -21 +#define TEVENT -20 +/* experimental structured commands, currently partially implemented */ +#define TWHILE -19 +#define TWEND -18 +#define TREPEAT -17 +#define TUNTIL -16 +#define TSWITCH -15 +#define TCASE -14 +#define TSWEND -13 +#define TDO -12 +#define TDEND -11 +/* these are multibyte token extension, currently unused */ +/* using them would allow over 1000 BASIC keywords */ +#define TEXT1 -3 +/* end of tokens */ +/* constants used for some obscure purposes */ +#define TBUFFER -2 +/* UNKNOWN is not used in the current code, the + * lexer tokenizes everything blindly. There is a UNKNOWN hook + * in statement for a grammar aware lexer */ +#define UNKNOWN -1 + +/* extension tokens can be in the range from -128 to -255 + * one needs to set HASLONGTOKENS + */ +#undef HASLONGTOKEN +#define TTOKEN1 -128 + + +/* the number of keywords, and the base index of the keywords + * the number is irrelevant but BASEKEYWORD is used */ +#define NKEYWORDS 3+19+13+14+11+5+2+7+7+6+12+3+9 +#define BASEKEYWORD -121 + +/* + * Interpreter states + * SRUN means running from a programm + * SINT means interactive mode + * SERUN means running directly from EEPROM + * (enum would be the right way of doing this.) + * BREAKCHAR is the character stopping the program on Ardunios + * BREAKPIN can be set, it is a pin that needs to go to low to stop a BASIC program + * This should be done in hardware*.h + * BREAKSIGNAL can also be set, should be done in hardware*.h + */ +#define SINT 0 +#define SRUN 1 +#define SERUN 2 +#define BREAKCHAR '#' + +/* + * Input and output channels + */ +#define OSERIAL 1 +#define ODSP 2 +#define OPRT 4 +#define OWIRE 7 +#define ORADIO 8 +#define OMQTT 9 +#define OFILE 16 + +#define ISERIAL 1 +#define IKEYBOARD 2 +#define ISERIAL1 4 +#define IWIRE 7 +#define IRADIO 8 +#define IMQTT 9 +#define IFILE 16 + +/* + * All BASIC keywords for the tokens + */ +const char sge[] PROGMEM = "=>"; +const char sle[] PROGMEM = "<="; +const char sne[] PROGMEM = "<>"; +/* Palo Alto language set */ +const char sprint[] PROGMEM = "PRINT"; +const char slet[] PROGMEM = "LET"; +const char sinput[] PROGMEM = "INPUT"; +const char sgoto[] PROGMEM = "GOTO"; +const char sgosub[] PROGMEM = "GOSUB"; +const char sreturn[] PROGMEM = "RETURN"; +const char sif[] PROGMEM = "IF"; +const char sfor[] PROGMEM = "FOR"; +const char sto[] PROGMEM = "TO"; +const char sstep[] PROGMEM = "STEP"; +const char snext[] PROGMEM = "NEXT"; +const char sstop[] PROGMEM = "STOP"; +const char slist[] PROGMEM = "LIST"; +const char snew[] PROGMEM = "NEW"; +const char srun[] PROGMEM = "RUN"; +const char sabs[] PROGMEM = "ABS"; +const char srnd[] PROGMEM = "RND"; +const char ssize[] PROGMEM = "SIZE"; +const char srem[] PROGMEM = "REM"; +/* Apple 1 language set */ +#ifdef HASAPPLE1 +const char snot[] PROGMEM = "NOT"; +const char sand[] PROGMEM = "AND"; +const char sor[] PROGMEM = "OR"; +const char slen[] PROGMEM = "LEN"; +const char ssgn[] PROGMEM = "SGN"; +const char speek[] PROGMEM = "PEEK"; +const char sdim[] PROGMEM = "DIM"; +const char sclr[] PROGMEM = "CLR"; +const char shimem[] PROGMEM = "HIMEM"; +const char stab[] PROGMEM = "TAB"; +const char sthen[] PROGMEM = "THEN"; +const char sbend[] PROGMEM = "END"; +const char spoke[] PROGMEM = "POKE"; +#endif +/* Stefan's basic additions */ +#ifdef HASSTEFANSEXT +const char scont[] PROGMEM = "CONT"; +const char ssqr[] PROGMEM = "SQR"; +const char spow[] PROGMEM = "POW"; +const char smap[] PROGMEM = "MAP"; +const char sdump[] PROGMEM = "DUMP"; +const char sbreak[] PROGMEM = "BREAK"; +#endif +/* LOAD and SAVE is always there */ +const char ssave[] PROGMEM = "SAVE"; +const char sload[] PROGMEM = "LOAD"; +#ifdef HASSTEFANSEXT +const char sget[] PROGMEM = "GET"; +const char sput[] PROGMEM = "PUT"; +const char sset[] PROGMEM = "SET"; +const char scls[] PROGMEM = "CLS"; +const char slocate[] PROGMEM = "LOCATE"; +const char selse[] PROGMEM = "ELSE"; +#endif +/* Arduino functions */ +#ifdef HASARDUINOIO +const char spinm[] PROGMEM = "PINM"; +const char sdwrite[] PROGMEM = "DWRITE"; +const char sdread[] PROGMEM = "DREAD"; +const char sawrite[] PROGMEM = "AWRITE"; +const char saread[] PROGMEM = "AREAD"; +const char sdelay[] PROGMEM = "DELAY"; +const char smillis[] PROGMEM = "MILLIS"; +const char sazero[] PROGMEM = "AZERO"; +const char sled[] PROGMEM = "LED"; +#endif +#ifdef HASTONE +const char stone[] PROGMEM = "PLAY"; +#endif +#ifdef HASPULSE +const char spulse[] PROGMEM = "PULSE"; +#endif +/* DOS functions */ +#ifdef HASFILEIO +const char scatalog[] PROGMEM = "CATALOG"; +const char sdelete[] PROGMEM = "DELETE"; +const char sfopen[] PROGMEM = "OPEN"; +const char sfclose[] PROGMEM = "CLOSE"; +const char sfdisk[] PROGMEM = "FDISK"; +#endif +/* low level access functions */ +#ifdef HASSTEFANSEXT +const char susr[] PROGMEM = "USR"; +const char scall[] PROGMEM = "CALL"; +#endif +/* mathematics */ +#ifdef HASFLOAT +const char ssin[] PROGMEM = "SIN"; +const char scos[] PROGMEM = "COS"; +const char stan[] PROGMEM = "TAN"; +const char satan[] PROGMEM = "ATAN"; +const char slog[] PROGMEM = "LOG"; +const char sexp[] PROGMEM = "EXP"; +#endif +/* INT is always needed to make float/int programs compatible */ +const char sint[] PROGMEM = "INT"; +/* elemetars graphics */ +#ifdef HASGRAPH +const char scolor[] PROGMEM = "COLOR"; +const char splot[] PROGMEM = "PLOT"; +const char sline[] PROGMEM = "LINE"; +const char scircle[] PROGMEM = "CIRCLE"; +const char srect[] PROGMEM = "RECT"; +const char sfcircle[] PROGMEM = "FCIRCLE"; +const char sfrect[] PROGMEM = "FRECT"; +#endif +/* Dartmouth BASIC extensions */ +#ifdef HASDARTMOUTH +const char sdata[] PROGMEM = "DATA"; +const char sread[] PROGMEM = "READ"; +const char srestore[] PROGMEM = "RESTORE"; +const char sdef[] PROGMEM = "DEF"; +const char sfn[] PROGMEM = "FN"; +const char son[] PROGMEM = "ON"; +#endif +/* The Darkarts commands unthinkable in Dartmouth */ +#ifdef HASDARKARTS +const char smalloc[] PROGMEM = "MALLOC"; +const char sfind[] PROGMEM = "FIND"; +const char seval[] PROGMEM = "EVAL"; +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING +const char serror[] PROGMEM = "ERROR"; +#endif +/* iot extensions */ +#ifdef HASIOT +const char savail[] PROGMEM = "AVAIL"; +const char sstr[] PROGMEM = "STR"; +const char sinstr[] PROGMEM = "INSTR"; +const char sval[] PROGMEM = "VAL"; +const char snetstat[] PROGMEM = "NETSTAT"; +const char ssensor[] PROGMEM = "SENSOR"; +const char swire[] PROGMEM = "WIRE"; +const char ssleep[] PROGMEM = "SLEEP"; +#endif +/* events and interrupts */ +#ifdef HASTIMER +const char safter[] PROGMEM = "AFTER"; +const char severy[] PROGMEM = "EVERY"; +#endif +#ifdef HASEVENTS +const char sevent[] PROGMEM = "EVENT"; +#endif +#ifdef HASSTRUCT +const char swhile[] PROGMEM = "WHILE"; +const char swend[] PROGMEM = "WEND"; +const char srepeat[] PROGMEM = "REPEAT"; +const char suntil[] PROGMEM = "UNTIL"; +const char sswitch[] PROGMEM = "SWITCH"; +const char scase[] PROGMEM = "CASE"; +const char sswend[] PROGMEM = "SWEND"; +const char sdo[] PROGMEM = "DO"; +const char sdend[] PROGMEM = "DEND"; +#endif + + +/* zero terminated keyword storage */ +const char* const keyword[] PROGMEM = { + sge, sle, sne, sprint, slet, sinput, + sgoto, sgosub, sreturn, sif, sfor, sto, + sstep, snext, sstop, slist, snew, srun, + sabs, srnd, ssize, srem, +#ifdef HASAPPLE1 + snot, sand, sor, slen, ssgn, speek, sdim, + sclr, shimem, stab, sthen, + sbend, spoke, +#endif +#ifdef HASSTEFANSEXT + scont, ssqr, spow, smap, sdump, sbreak, +#endif + ssave, sload, +#ifdef HASSTEFANSEXT + sget, sput, sset, scls, slocate, selse, +#endif +#ifdef HASARDUINOIO + spinm, sdwrite, sdread, sawrite, saread, + sdelay, smillis, sazero, sled, +#endif +#ifdef HASTONE + stone, +#endif +#ifdef HASPULSE + spulse, +#endif +#ifdef HASFILEIO + scatalog, sdelete, sfopen, sfclose, sfdisk, +#endif +#ifdef HASSTEFANSEXT + susr, scall, +#endif +#ifdef HASFLOAT + ssin, scos, stan, satan, slog, sexp, +#endif + sint, +#ifdef HASGRAPH + scolor, splot, sline, scircle, srect, + sfcircle, sfrect, +#endif +#ifdef HASDARTMOUTH + sdata, sread, srestore, sdef, sfn, son, +#endif +#ifdef HASDARKARTS + smalloc, sfind, seval, +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING + serror, +#endif +#ifdef HASIOT + savail, sstr, sinstr, sval, + snetstat, ssensor, swire, ssleep, +#endif +#ifdef HASTIMER + safter, severy, +#endif +#ifdef HASEVENTS + sevent, +#endif +#ifdef HASSTRUCT + swhile, swend, srepeat, suntil, sswitch, scase, sswend, + sdo, sdend, +#endif + 0 +}; + +/* the zero terminated token dictonary needed for scalability */ +const signed char tokens[] PROGMEM = { + GREATEREQUAL, LESSEREQUAL, NOTEQUAL, TPRINT, TLET, + TINPUT, TGOTO, TGOSUB, TRETURN, TIF, TFOR, TTO, TSTEP, + TNEXT, TSTOP, TLIST, TNEW, TRUN, TABS, TRND, TSIZE, TREM, +#ifdef HASAPPLE1 + TNOT, TAND, TOR, TLEN, TSGN, TPEEK, TDIM, TCLR, + THIMEM, TTAB, TTHEN, TEND, TPOKE, +#endif +#ifdef HASSTEFANSEXT + TCONT, TSQR, TPOW, TMAP, TDUMP, TBREAK, +#endif + TSAVE, TLOAD, +#ifdef HASSTEFANSEXT + TGET, TPUT, TSET, TCLS, TLOCATE, TELSE, +#endif +#ifdef HASARDUINOIO + TPINM, TDWRITE, TDREAD, TAWRITE, TAREAD, TDELAY, TMILLIS, + TAZERO, TLED, +#endif +#ifdef HASTONE + TTONE, +#endif +#ifdef HASPULSE + TPULSE, +#endif +#ifdef HASFILEIO + TCATALOG, TDELETE, TOPEN, TCLOSE, TFDISK, +#endif +#ifdef HASSTEFANSEXT + TUSR, TCALL, +#endif +#ifdef HASFLOAT + TSIN, TCOS, TTAN, TATAN, TLOG, TEXP, +#endif + TINT, +#ifdef HASGRAPH + TCOLOR, TPLOT, TLINE, TCIRCLE, TRECT, + TFCIRCLE, TFRECT, +#endif +#ifdef HASDARTMOUTH + TDATA, TREAD, TRESTORE, TDEF, TFN, TON, +#endif +#ifdef HASDARKARTS + TMALLOC, TFIND, TEVAL, +#endif +#ifdef HASERRORHANDLING + TERROR, +#endif +#ifdef HASIOT + TAVAIL, TSTR, TINSTR, TVAL, TNETSTAT, + TSENSOR, TWIRE, TSLEEP, +#endif +#ifdef HASTIMER + TAFTER, TEVERY, +#endif +#ifdef HASEVENTS + TEVENT, +#endif +#ifdef HASSTRUCT + TWHILE, TWEND, TREPEAT, TUNTIL, TSWITCH, TCASE, TSWEND, + TDO, TDEND, +#endif + 0 +}; + +/* + * the message catalog + */ +#define MFILE 0 +#define MPROMPT 1 +#define MGREET 2 +#define MLINE 3 +#define MNUMBER 4 +#define MVARIABLE 5 +#define MARRAY 6 +#define MSTRING 7 +#define MSTRINGVAR 8 +#define EGENERAL 9 +#define EUNKNOWN 10 +#define ENUMBER 11 +#define EDIVIDE 12 +#define ELINE 13 +#define EOUTOFMEMORY 14 +#define ESTACK 15 +#define EORANGE 16 +#define ESTRING 17 +#define EVARIABLE 18 +#define ELOOP 19 +#define EFILE 20 +#define EFUN 21 +#define EARGS 22 +#define EEEPROM 23 +#define ESDCARD 24 + +const char mfile[] PROGMEM = "file.bas"; +const char mprompt[] PROGMEM = "> "; +const char mgreet[] PROGMEM = "Stefan's Basic 1.4"; +const char mline[] PROGMEM = "LINE"; +const char mnumber[] PROGMEM = "NUMBER"; +const char mvariable[] PROGMEM = "VARIABLE"; +const char marray[] PROGMEM = "ARRAY"; +const char mstring[] PROGMEM = "STRING"; +const char mstringv[] PROGMEM = "STRINGVAR"; +const char egeneral[] PROGMEM = "Error"; +#ifdef HASERRORMSG +const char eunknown[] PROGMEM = "Syntax"; +const char enumber[] PROGMEM = "Number"; +const char edivide[] PROGMEM = "Div by 0"; +const char eline[] PROGMEM = "Unknown Line"; +const char emem[] PROGMEM = "Memory"; +const char estack[] PROGMEM = "Stack"; +const char erange[] PROGMEM = "Range"; +const char estring[] PROGMEM = "String"; +const char evariable[] PROGMEM = "Variable"; +const char eloop[] PROGMEM = "Loop"; +const char efile[] PROGMEM = "File"; +const char efun[] PROGMEM = "Function"; +const char eargs[] PROGMEM = "Args"; +const char eeeprom[] PROGMEM = "EEPROM"; +const char esdcard[] PROGMEM = "SD card"; +#endif + +const char* const message[] PROGMEM = { + mfile, mprompt, mgreet, + mline, mnumber, mvariable, marray, + mstring, mstringv, + egeneral +#ifdef HASERRORMSG + , eunknown, enumber, edivide, eline, + emem, estack, erange, + estring, evariable, eloop, efile, efun, eargs, + eeeprom, esdcard +#endif +}; + +/* + * code for variable numbers and addresses sizes + * the original code was 16 bit but can be extended here + * to arbitrary types + * + * number_t is the type for numerical work - either float or int + * wnumber_t is the type containing the largest printable integer, + * for float keep this int on 32 bit and long on 8 bit unless you + * want to use very long integers, like 64 or 128 bit types. + * address_t is an unsigned type adddressing memory, default 16bit + * mem_t is a SIGNED 8bit character type. + * index_t is a SIGNED minimum 16 bit integer type + * + * works with the tacit assumption that + * sizeof(number_t) >= sizeof(address_t) + * and that the entire memory is smaller than the positive + * part of number type (!!) + * + * we assume that float >= 4 bytes in the following + * + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: the index size of strings either + * 1 byte or 2 bytes - no other values supported + */ +#ifdef HASFLOAT +typedef float number_t; +const number_t maxnum=16777216; +typedef long wnumber_t; +#else +typedef int number_t; +typedef int wnumber_t; +const number_t maxnum=(number_t)~((number_t)1<<(sizeof(number_t)*8-1)); +#endif +typedef unsigned short address_t; /* this type addresses memory */ +const int numsize=sizeof(number_t); +const int addrsize=sizeof(address_t); +const int eheadersize=sizeof(address_t)+1; +const int strindexsize=2; /* default in the meantime, strings up to unsigned 16 bit length */ +const address_t maxaddr=(address_t)(~0); +typedef signed char mem_t; /* a signed 8 bit type for the memory */ +typedef int index_t; /* this type counts at least 16 bit */ +#ifndef HASLONGTOKENS +typedef signed char token_t; /* the type of tokens, normally mem_t with a maximum of 127 commands and data types */ +#else +typedef short token_t; /* token type extension, allows an extra of 127 commands and symbols */ +#endif + +/* this type maps numbers to bytes */ +typedef struct {mem_t l; mem_t h;} twobytes_t; +typedef union { number_t i; address_t a; twobytes_t b; mem_t c[sizeof(number_t)]; } accu_t; + +/* the memreader function type */ +typedef mem_t (*memreader_t)(address_t); + +/* + * system type identifiers + */ + +#define SYSTYPE_UNKNOWN 0 +#define SYSTYPE_AVR 1 +#define SYSTYPE_ESP8266 2 +#define SYSTYPE_ESP32 3 +#define SYSTYPE_RP2040 4 +#define SYSTYPE_SAM 5 +#define SYSTYPE_XMC 6 +#define SYSTYPE_SMT32 7 +#define SYSTYPE_NRENESA 8 +#define SYSTYPE_POSIX 32 +#define SYSTYPE_MSDOS 33 +#define SYSTYPE_MINGW 34 +#define SYSTYPE_RASPPI 35 + +/* + * The basic interpreter is implemented as a stack machine + * with global variable for the interpreter state, the memory + * and the arithmetic during run time. + */ + +/* the stack, all BASIC arithmetic is done here */ +number_t stack[STACKSIZE]; +address_t sp=0; + +/* a small buffer to process string arguments, mostly used for Arduino PROGMEM */ +char sbuffer[SBUFSIZE]; + +/* the input buffer, the lexer can tokenize this and run from it, bi is an index to this. + bi must be global as it is the program cursor in interactive mode */ +char ibuffer[BUFSIZE] = "\0"; +char *bi; + +/* a static array of variables A-Z for the small systems that have no heap */ +number_t vars[VARSIZE]; + +/* the BASIC working memory, either malloced or allocated as a global array */ +#if MEMSIZE != 0 +mem_t mem[MEMSIZE]; +#else +mem_t* mem; +#endif +address_t himem, memsize; + +/* the for stack - remembers the variable, indices, and optionally a type for stuctured BASIC */ +struct forstackitem {mem_t varx; mem_t vary; address_t here; number_t to; number_t step; +#ifdef HASSTRUCT +mem_t type; +#endif +} forstack[FORDEPTH]; +index_t forsp = 0; + +/* the GOSUB stack remembers an address to jump to */ +address_t gosubstack[GOSUBDEPTH]; +index_t gosubsp = 0; + +/* this variable stores the location in pushlocation() and poplocation(), used to rewind the program cursor */ +address_t slocation; + +/* arithmetic accumulators - used by many statements, y may be obsolete in future*/ +number_t x, y; + +/* the names of a variable and small integer accumulator */ +mem_t xc, yc; + +/* an address accumulator, used a lot in string operations */ +address_t ax; + +/* z is another accumulator used to convert numbers and addressed to bytes and vice versa */ +/* this union is used to store larger objects into byte oriented memory */ +accu_t z; + +/* string index registers */ +char *ir, *ir2; + +/* the active token */ +token_t token; + +/* the curent error, can be a token, hance token type */ +token_t er; + +/* a trapable error */ +mem_t ert; + +/* the interpreter state, interactive, run or run from EEPROM */ +mem_t st; + +/* the current program location or "cursor" */ +address_t here; + +/* the topmost byte of a program in memory, beginning of free BASIC RAM */ +address_t top; + +/* the number of variables on the heap */ +address_t nvars = 0; + +/* used to format output with # */ +mem_t form = 0; + +/* counts the outputed characters on streams 0-3, used to emulate a real tab */ +#ifdef HASMSTAB +mem_t charcount[3]; /* devices 1-4 support tabing */ +mem_t reltab = 0; +#endif + +/* the lower limit of the array is one by default, can be a variable */ +#ifdef HASARRAYLIMIT +address_t arraylimit = 1; +#else +const address_t arraylimit = 1; +#endif + +/* the number of arguments parsed from a command */ +mem_t args; + +/* the random number seed, this is unsigned hence address_t */ +#ifndef HASFLOAT +address_t rd; +#else +unsigned long rd; +#endif + +/* output and input channels, used to direct output to various devices */ +mem_t id; +mem_t od; + +/* default IO - not constant, can be changed at runtime through a user call */ +mem_t idd = ISERIAL; +mem_t odd = OSERIAL; + +/* the runtime debuglevel */ +mem_t debuglevel = 0; + +/* DATA pointer, where is the current READ statement */ +#ifdef HASDARTMOUTH +address_t data = 0; +address_t datarc = 1; +#endif + +/* + * process command line arguments in the POSIX world + * bnointafterrun is a flag to remember if called as command + * line argument, in this case we don't return to interactive + */ +#ifndef ARDUINO +int bargc; +char** bargv; +mem_t bnointafterrun = 0; +#endif + +/* + * Yield counter, we count when we did yield the last time + * lastyield controlls the client loops of network functions + * like mqtt, scanned keyboard, and USB. + * + * lastlongyield controls longterm functions like DHCP lease + * renewal in Ethernet + * + * there variables are only needed if the platform has background + * tasks + */ +long lastyield=0; +long lastlongyield=0; + +/* formaters lastouttoken and spaceafterkeyword to make a nice LIST */ +mem_t lastouttoken; +mem_t spaceafterkeyword; +mem_t outliteral = 0; +mem_t lexliteral = 0; + +/* + * the cache for the heap search - helps the string code + * the last found object on the heap is remembered. This is needed + * because the string code sometime searches the heap twice during the + * same operation. + */ +#ifdef HASAPPLE1 +mem_t bfindc, bfindd, bfindt; +address_t bfinda, bfindz; +#endif + +/* + * a variable for some string operations + */ +int vlength; + +/* the timer code - very simple needs to to to a struct */ +/* timer type */ +typedef struct { + mem_t enabled; + unsigned long last; + unsigned long interval; + mem_t type; + address_t linenumber; +} btimer_t; + +#ifdef HASTIMER +btimer_t after_timer = {0, 0, 0, 0, 0}; +btimer_t every_timer = {0, 0, 0, 0, 0}; +#endif + +/* the event code */ +#ifdef HASEVENTS + +#define EVENTLISTSIZE 4 + +/* event type */ +typedef struct { + mem_t enabled; + mem_t pin; + mem_t mode; + mem_t type; + address_t linenumber; + mem_t active; +} bevent_t; + +/* the event list */ +int nevents = 0; +int ievent = 0; +static mem_t events_enabled = 1; +static volatile bevent_t eventlist[EVENTLISTSIZE]; + +/* the extension of the GOSUB stack */ +static mem_t gosubarg[GOSUBDEPTH]; + +/* handle the event list */ +mem_t addevent(mem_t, mem_t, mem_t, address_t); +void deleteevent(mem_t); +volatile bevent_t* findevent(mem_t); +mem_t eventindex(mem_t); +#endif + +#ifdef HASERRORHANDLING +/* the error handler type, very simple for now */ +typedef struct { + mem_t type; + address_t linenumber; +} berrorh_t; + +berrorh_t berrorh = {0 , 0}; +mem_t erh = 0; +#endif + +/* the string for real time clocks */ +char rtcstring[20] = { 0 }; + +/* the units pulse operates on, in microseconds*/ +short bpulseunit = 10; + +/* only needed for POSIXNONBLOCKING */ +mem_t breakcondition = 0; + +/* + * Function prototypes, ordered by layers + * HAL - hardware abstraction + * Layer 0 - memory and I/O + * Layer 1 - Program storage and control + * Layer 2 - Where stuff happens + */ + +/* + * HAL - see hardware-*.h + * This is the hardware abstraction layer of the BASIC + * interpreter + */ + +/* setup codes */ +void timeinit(); +void wiringbegin(); + +/* low level mem and hardware features */ +long freeRam(); +long freememorysize(); +void restartsystem(); +void activatesleep(long t); + +/* start the spi bus */ +void spibegin(); + +/* + * the hardware interface display driver functions, need to be + * implemented for the display driver to work + * dspupdate() only for display like Epapers + */ +void dspbegin(); +void dspprintchar(char, mem_t, mem_t); +void dspclear(); +void dspupdate(); + +/* keyboard code */ +void kbdbegin(); +int kbdstat(char); +char kbdavailable(); +char kbdread(); +char kbdcheckch(); + +/* graphics functions */ +void rgbcolor(int, int, int); +void vgacolor(short c); +void vgascale(int*, int*); +void plot(int, int); +void line(int, int, int, int); +void rect(int, int, int, int); +void frect(int, int, int, int); +void circle(int, int, int); +void fcircle(int, int, int); + +/* text output to a VGA display */ +void vgabegin(); +int vgastat(char); +void vgawrite(char); + +/* generic display code */ +void dspwrite(char); +void dspbegin(); +int dspstat(char); +char dspwaitonscroll(); +char dspactive(); +void dspsetupdatemode(char); +char dspgetupdatemode(); +void dspgraphupdate(); +void dspsetscrollmode(char, short); +void dspsetcursor(short, short); +void dspbufferclear(); +void dspscroll(mem_t, mem_t); +void dspreversescroll(mem_t); +void dspvt52(char *); + +/* real time clock */ +char* rtcmkstr(); +void rtcset(uint8_t, short); +short rtcget(short); + +/* network and mqtt functions */ +void netbegin(); +char netconnected(); +void mqttsetname(); +void mqttbegin(); +int mqttstat(char); +int mqttstate(); +void mqttsubscribe(char*); +void mqttsettopic(char*); +void mqttouts(char *, short); +void mqttins(char *, short); +char mqttinch(); + +/* low level EEPROM handling */ +void ebegin(); +void eflush(); +address_t elength(); +mem_t eread(address_t); +void eupdate(address_t, mem_t); + +/* arduino io functions */ +void aread(); +void dread(); +void awrite(address_t, address_t); +void dwrite(address_t, address_t); +void pinm(address_t, address_t); +void bmillis(); +void bpulsein(); +void xpulse(); +void bpulseout(short); +void btone(short); + +/* timing control for ESP and network */ +void byield(); +void bdelay(unsigned long); +void fastticker(); +void yieldfunction(); +void longyieldfunction(); + +/* the file interface */ +char* mkfilename(const char*); +const char* rmrootfsprefix(const char*); +void fsbegin(char); +int fsstat(char); +void filewrite(char); +char fileread(); +char ifileopen(const char*); +void ifileclose(); +char ofileopen(char*, const char*); +void ofileclose(); +int fileavailable(); +void rootopen(); +int rootnextfile(); +int rootisfile(); +const char* rootfilename(); +long rootfilesize(); +void rootfileclose(); +void rootclose(); +void removefile(char*); +void formatdisk(short); + +/* low level serial code */ +void picogetchar(char); +void picowrite(char); +void picobegin(unsigned long); +void picoins(char, short); +void serialbegin(); +int serialstat(char); +char serialread(); +void serialwrite(char); +short serialcheckch(); +short serialavailable(); +void serialflush(); +void consins(char*, short); +void prtbegin(); +int prtstat(char); +void prtset(int); +char prtopen(char *, int); +void prtclose(); +char prtread(); +void prtwrite(char); +short prtcheckch(); +short prtavailable(); + +/* generic wire access */ +void wirebegin(); +int wirestat(char); +void wireopen(char, char); +void wireins(char*, uint8_t); +void wireouts(char*, uint8_t); +short wireavailable(); +short wirereadbyte(short); +void wirewritebyte(short, short); + +/* RF24 radio input */ +int radiostat(char); +void radioset(int); +#ifdef ARDUINO +uint64_t pipeaddr(char*); +#else +long pipeaddr(char*); +#endif +void iradioopen(char*); +void oradioopen(char*); +void radioins(char*, short); +void radioouts(char* , short); +short radioavailable(); + +/* sensor control */ +void sensorbegin(); +number_t sensorread(short, short); + +/* SPI RAM code */ +address_t spirambegin(); +void spiramrawwrite(address_t, mem_t); +mem_t spiramrawread(address_t ); + +/* + * Layer 0 functions - I/O and memory management + */ + +/* make room for BASIC */ +address_t ballocmem(); + +/* handle files im EEPROM */ +void eload(); +void esave(); +char autorun(); + +/* the variable heap from Apple 1 BASIC */ +address_t bmalloc(mem_t, mem_t, mem_t, address_t); +address_t bfind(mem_t, mem_t, mem_t); +address_t bfree(mem_t, mem_t, mem_t); +address_t blength (mem_t, mem_t, mem_t); + +/* normal variables of number_t */ +number_t getvar(mem_t, mem_t); +void setvar(mem_t, mem_t, number_t); +void clrvars(); + +/* low level memory access packing n*8bit bit into n 8 bit objects + e* is for Arduino EEPROM */ +void getnumber(address_t, mem_t); +void setnumber(address_t, mem_t); +void egetnumber(address_t, mem_t); +void esetnumber(address_t, mem_t); +void pgetnumber(address_t, mem_t); + +/* array and string handling */ +/* the multidim extension is experimental, here only 2 array dimensions implemented as test */ +address_t createarray(mem_t, mem_t, address_t, address_t); +void array(mem_t, mem_t, mem_t, address_t, address_t, number_t*); +address_t createstring(char, char, address_t, address_t); +char* getstring(char, char, address_t, address_t); +number_t arraydim(char, char); +address_t stringdim(char, char); +address_t lenstring(char, char, address_t); +void setstringlength(char, char, address_t, address_t); +void setstring(char, char, address_t, char *, address_t, address_t); + +/* the user defined extension functions */ +number_t getusrvar(); +void setusrvar(number_t); +number_t getusrarray(address_t); +void setusrarray(address_t, number_t); +void makeusrstring(); +number_t usrfunction(address_t, number_t); +void usrcall(address_t); + +/* get keywords and tokens from PROGMEM */ +char* getkeyword(unsigned short); +char* getmessage(char); +signed char gettokenvalue(char); +void printmessage(char); + +/* error handling */ +void error(token_t); +void reseterror(); +void debugtoken(); +void bdebug(const char*); + +/* the arithemtic stack */ +void push(number_t); +number_t pop(); +address_t popaddress(); +void drop(); +void clearst(); + +/* READ DATA handling */ +void clrdata(); + +/* FOR NEXT GOSUB stacks */ +void pushforstack(); +void popforstack(); +void dropforstack(); +void clrforstack(); +void pushgosubstack(mem_t); +void popgosubstack(); +void dropgosubstack(); +void clrgosubstack(); + +/* general I/O initialisation */ +void ioinit(); +void iodefaults(); + +/* signal handling */ +void signalon(); +void signaloff(); +void signalhandler(int); + +/* character and string I/O functions */ +/* we live in world where char may be signed or unsigned and keep it + that way on the lowest level, hence this function, fully defined here, + mostly inlined anyway*/ +int cheof(int c) { if ((c == -1) || (c == 255)) return 1; else return 0; } +/* input */ +char inch(); +char checkch(); +short availch(); +void inb(char*, index_t); +void ins(char*, address_t); + +/* output */ +void outch(char); +void outcr(); +void outspc(); +void outs(char*, address_t); +void outsc(const char*); +void outscf(const char *, index_t); + +/* I/O of number_t - floats and integers */ +address_t parsenumber(char*, number_t*); +address_t parsenumber2(char*, number_t*); +address_t writenumber(char*, wnumber_t); +address_t writenumber2(char*, number_t); +address_t tinydtostrf(number_t, index_t, char*); +char innumber(number_t*); +void outnumber(number_t); + +/* + * Layer 1 functions, provide data and do the heavy lifting + * for layer 2 including lexical analysis, storing programs + * and expression evaluation + */ + +/* lexical analysis */ +void whitespaces(); +void nexttoken(); + +/* storing and retrieving programs */ +char nomemory(number_t); +void storetoken(); +mem_t memread(address_t); +mem_t memread2(address_t); +void memwrite2(address_t, mem_t); +void gettoken(); +void firstline(); +void nextline(); + +void clrlinecache(); +void addlinecache(address_t, address_t); +address_t findinlinecache(address_t); +void findline(address_t); +address_t myline(address_t); +void moveblock(address_t, address_t, address_t); +void zeroblock(address_t, address_t); +void diag(); +void storeline(); + +/* read arguments from the token stream and process them */ +char termsymbol(); +char expect(token_t, mem_t); +char expectexpr(); +void parsearguments(); +void parsenarguments(char); +void parsesubscripts(); +void parsefunction(void (*)(), short); +void parseoperator(void (*)()); +void parsesubstring(); + +/* mathematics and other functions for int and float */ +void xabs(); +void xsgn(); +void xpeek(); +void xmap(); +void rnd(); +void sqr(); +void xpow(); +number_t bpow(number_t, number_t); + +/* string values and string evaluation */ +char stringvalue(); +void streval(); + +/* floating point functions */ +void xsin(); +void xcos(); +void xtan(); +void xatan(); +void xlog(); +void xexp(); +void xint(); + +/* expression evaluation */ +void factor(); +void term(); +void addexpression(); +void compexpression(); +void notexpression(); +void andexpression(); +void expression(); + +/* + * Layer 2 - statements and functions + * use the global variables + */ + +/* basic commands of the core language set */ +void xprint(); +void lefthandside(address_t*, address_t*, address_t*, mem_t*); +void assignnumber(signed char, char, char, address_t, address_t, char); +void assignment(); +void showprompt(); +void xinput(); +void xgoto(); +void xreturn(); +void xif(); + +/* FOR NEXT loops */ +void findnextcmd(); +void findbraket(token_t, token_t); +void xfor(); +void xbreak(); +void xcont(); +void xnext(); + +/* WHILE WEND*/ +void xwhile(); +void xwend(); + +/* REPEAT UNTIL */ +void xrepeat(); +void xuntil(); + +/* control commands and misc */ +void outputtoken(); +void xlist(); +void xrun(); +void xnew(); +void xrem(); +void xclr(); +void xdim(); +void xpoke(); +void xtab(); +void xdump(); +void dumpmem(address_t, address_t, char); +void xlocate(); + +/* file access and other i/o */ +void stringtobuffer(char*); +void getfilename(char*, char); +void xsave(); +void xload(const char*); +void xget(); +void xput(); +void xset(); +void xnetstat(); + +/* Arduino IO control interface */ +void xdwrite(); +void xawrite(); +void xpinm(); +void xdelay(); +void xtone(); + +/* graphics commands */ +void xcolor(); +void xplot(); +void xline(); +void xrect(); +void xcircle(); +void xfrect(); +void xfcircle(); + +/* the darkarts */ +void xmalloc(); +void xfind(); +void xeval(); + +/* IoT commands */ +void xassign(); +void xavail(); +void xfsensor(); +void xsleep(); +void xwire(); +void xfwire(); + +/* timers */ +void xafter(); +void xevent(); + +/* File I/O functions */ +char streq(const char*, char*); +void xcatalog(); +void xdelete(); +void xopen(); +void xfopen(); +void xclose(); +void xfdisk(); + +/* low level access functions */ +void xcall(); +void xusr(); + +/* the dartmouth stuff */ +void xdata(); +void nextdatarecord(); +void xread(); +void xrestore(); +void xdef(); +void xfn(); +void xon(); + +/* timers and interrupts */ +void xtimer(); +void resettimer(btimer_t*); + +/* structured BASIC extensions */ +void xwhile(); +void xwend(); +void xrepeat(); +void xuntil(); +void xswitch(); +void xcase(); +void xendswitch(); + +/* the emulation of tone using the byield loop */ +void toggletone(); +void playtone(int, int, int); + +/* the statement loop */ +void statement(); + +/* the extension functions */ +void bsetup(); +void bloop(); + diff --git a/data/Basic1/hardware-arduino.h b/data/Basic1/hardware-arduino.h new file mode 100644 index 0000000000000000000000000000000000000000..6ac86267613f0536c0dd792a2bcf6b4bca7c42bc --- /dev/null +++ b/data/Basic1/hardware-arduino.h @@ -0,0 +1,5544 @@ +/* + * + * $Id: hardware-arduino.h,v 1.8 2023/02/18 20:16:59 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * Playing around with frugal programming. See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Credits: + * - XMC contributed by Florian + * + * Hardware definition file coming with TinybasicArduino.ino aka basic.c + * + * - ARDUINOLCD, ARDUINOTFT and LCDSHIELD active the LCD code, + * LCDSHIELD automatically defines the right settings for + * the classical shield modules + * - ARDUINOPS2 activates the PS2 code. Default pins are 2 and 3. + * If you use other pins the respective changes have to be made + * below. + * - _if_ and PS2 are both activated STANDALONE cause the Arduino + * to start with keyboard and lcd as standard devices. + * - ARDUINOEEPROM includes the EEPROM access code + * - ARDUINOEFS, ARDUINOSD, ESPSPIFFS, RP2040LITTLEFS activate filesystem code + * - activating Picoserial, Picoserial doesn't work on MEGA + * + * Architectures and the definitions from the Arduino IDE + * + * ARDUINO_ARCH_SAM: no tone command, dtostrf + * ARDUINO_ARCH_RP2040: dtostrf (for ARDUINO_NANO_RP2040_CONNECT) + * ARDUINO_ARCH_SAMD: dtostrf (for ARDUINO_SAMD_MKRWIFI1010, ARDUINO_SEEED_XIAO_M0) + * ARDUINO_ARCH_ESP8266: SPIFFS, dtostrf (ESP8266) + * ARDUINO_AVR_MEGA2560, ARDUARDUINO_SAM_DUE: second serial port is Serial1-3 - no software serial + * ARDUINO_SAM_DUE: hardware heuristics + * ARDUINO_ARCH_AVR: nothing + * ARDUINO_ARCH_LGT8F: EEPROM code for flash EEPROM - platform fully supported now, yet no call 0 + * ARDUINO_ARCH_ESP32 and ARDUINO_TTGO_T7_V14_Mini32, no tone, no analogWrite, avr/xyz obsolete + * + * The code still contains hardware heuristics from my own projects, + * will be removed in the future + * + */ + +#if defined(ARDUINO) && ! defined(__HARDWAREH__) +#define __HARDWAREH__ + +/* + * Arduino hardware settings , set here what you need or + * use one of the predefined configurations below + * + * input/output methods USERPICOSERIAL, ARDUINOPS2 + * ARDUINOPRT, DISPLAYCANSCROLL, ARDUINOLCDI2C, + * ARDUINOTFT, ARDUINONOKIA51, ARDUINOILI9488, + * ARDUINOSSD1306, ARDUINOMCUFRIEND + * storage ARDUINOEEPROM, ARDUINOSD, ESPSPIFFS, RP2040LITTLEFS + * storage ARDUINOEFS, SM32SDIO + * sensors ARDUINOWIRE, ARDUINOSENSORS + * network ARDUINORF24, ARDUNIOMQTT + * memory ARDUINOSPIRAM + * real time clocks ARDUINORTC, ARDUINORTCEMULATION + * + * leave this unset if you use the definitions below + */ + +#undef USESPICOSERIAL +#undef ARDUINOPS2 +#undef ARDUINOUSBKBD +#undef ARDUINOZX81KBD +#undef ARDUINOPRT +#undef DISPLAYCANSCROLL +#undef ARDUINOLCDI2C +#undef ARDUINONOKIA51 +#undef ARDUINOILI9488 +#undef ARDUINOSSD1306 +#undef ARDUINOMCUFRIEND +#undef ARDUINOEDP47 +#undef ARDUINOGRAPHDUMMY +#undef LCDSHIELD +#undef ARDUINOTFT +#undef ARDUINOVGA +#define ARDUINOEEPROM +#undef ARDUINOI2CEEPROM +#undef ARDUINOEFS +#undef ARDUINOSD +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#undef STM32SDIO +#undef ARDUINORTC +#undef ARDUINORTCEMULATION +#undef ARDUINOTONEEMULATION +#undef ARDUINOWIRE +#undef ARDUINOWIRESLAVE +#undef ARDUINORF24 +#undef ARDUINOETH +#undef ARDUINOMQTT +#undef ARDUINOSENSORS +#undef ARDUINOSPIRAM +#undef STANDALONE +#undef STANDALONESECONDSERIAL + +/* experimental features, don't use unless you know the code */ +/* + * this setting uses the EEPROM as program storage + * The idea is to create a virtual memory layout starting from 0 with the EEPROM + * from elength() and then adding the BASIC RAM to it. himem and top need to be + * handled carefully. + */ +#undef ARDUINOPGMEEPROM + +/* + * Predefined hardware configurations, this assumes that all of the + * above are undef + * + * UNOPLAIN: + * a plain UNO with no peripherals + * AVRLCD: + * a AVR system with an LCD shield + * WEMOSSHIELD: + * a Wemos D1 with a modified simple datalogger shield + * optional keyboard and i2c display + * MEGASHIELD: + * an Arduino Mega with Ethernet Shield + * optional keyboard and i2c display + * TTGOVGA: + * TTGO VGA1.4 system with PS2 keyboard, standalone + * MEGATFT, DUETFT + * TFT 7inch screen systems, standalone + * NANOBOARD: + * Arduino Nano Every board with PS2 keyboard and sensor + * kit + * MEGABOARD: + * A board for the MEGA with 64 kB RAM, SD Card, and real time + * clock + * UNOBOARD: + * A board for an UNO with 64kB memory and EEPROM disk + * fits into an UNO flash only with integer + * ESP01BOARD: + * ESP01 based board as a sensor / MQTT interface + * RP2040BOARD: + * A ILI9488 hardware design based on an Arduino connect RP2040. + * RP2040BOARD2: + * like the one above but based on the Pi Pico core + * ESP32BOARD: + * same like above with an ESP32 core + * MKRBOARD: + * a digital signage and low energy board + */ + +#undef UNOPLAIN +#undef AVRLCD +#undef WEMOSSHIELD +#undef MEGASHIELD +#undef TTGOVGA +#undef DUETFT +#undef MEGATFT +#undef NANOBOARD +#undef MEGABOARD +#undef UNOBOARD +#undef ESP01BOARD +#undef RP2040BOARD +#undef RP2040BOARD2 +#undef ESP32BOARD +#undef MKR1010BOARD + +/* + * PIN settings and I2C addresses for various hardware configurations + * used a few heuristics and then the hardware definitions above + * + * #define SDPIN sets the SD CS pin - can be left as a default for most HW configs + * TTGO needs it as default definitions in the board file are broken + * #define PS2DATAPIN, PS2IRQPIN sets PS2 pin + */ + +/* PS2 Keyboard pins for AVR - use one interrupt pin 2 and one date pin + 5 not 4 because 4 conflicts with SDPIN of the standard SD shield */ +#define PS2DATAPIN 3 +#define PS2IRQPIN 2 + +/* Ethernet - 10 is the default */ +/* #define ETHPIN 10 */ + +/* The Pretzelboard definitions for Software Serial, conflicts with SPI */ +#define SOFTSERIALRX 11 +#define SOFTSERIALTX 12 + +/* near field pin settings for CE and CSN*/ +#define RF24CEPIN 8 +#define RF24CSNPIN 9 + +/* use standard I2C pins almost always */ +#undef SDA_PIN +#undef SCL_PIN + +/* set this is you want pin 4 on low interrupting the interpreter */ +/* #define BREAKPIN 4 */ +#undef BREAKPIN + +/* the primary serial stream aka serial aka sream 1 */ +#ifndef ALTSERIAL +#define SERIALPORT Serial +#endif + +/* the secondary serial port aka prt aka stream 4 */ +#ifndef PRTSERIAL +#define PRTSERIAL Serial1 +#endif + +/* + * Pin settings for the ZX81 Keyboard + * first the 8 rows, then the 5 columns or the keyboard + * + * MEGAs have many pins and default is to use the odd pins on the side + * UNOs, NANOs, and others use the lower pins by default avoiding the + * pin 13 which is LED and doesn't work with standard schematics + */ +#ifdef ARDUINOZX81KBD +#ifdef ARDUINO_AVR_MEGA2560 +const byte zx81pins[] = {37, 35, 33, 31, 29, 27, 25, 23, 47, 45, 43, 41, 39}; +#else +const char zx81pins[] = {7, 8, 9, 10, 11, 12, A0, A1, 2, 3, 4, 5, 6 }; +#endif +#endif + +/* + * this is soft SPI for SD cards on MEGAs using + * pins 10-13, a patched SD library is needed + * for this: https://github.com/slviajero/SoftSD + * only needed for MEGA boards with an UNO shield + */ +#undef SOFTWARE_SPI_FOR_SD + +/* + * list of default i2c addresses + * + * some clock modules do have their EEPROM at 0x57. + * 0x050 this is the default lowest adress of standard EEPROMs + * Configurable range is between 0x50 and 0x57 for modules with jumpers. + * Some clock modules do have their EEPROM at 0x57. + * + * Clock default for the size is 4096. Define your EFS EEPROM and I2C EEPROM + * size here. One parameter set is for EFS and one parameter set is for + * plain serial EEPROMs. + * + * RTCs are often at 0x68 + */ +#define EFSEEPROMADDR 0x050 +/* #define EFSEEPROMSIZE 32768 */ + +#define RTCI2CADDR 0x068 + +/* the size of the plain I2C EEPROM, typically a clock */ +#define I2CEEPROMADDR 0x057 +/* #define I2CEEPROMSIZE 4096 */ + +/* is the I2C EEPROM buffered */ +#define ARDUINOI2CEEPROM_BUFFERED + +/* + * Sensor library code - configure your sensors here + */ +#ifdef ARDUINOSENSORS +#undef ARDUINODHT +#define DHTTYPE DHT22 +#define DHTPIN 2 +#define ARDUINOSHT +#define ARDUINOMQ2 +#define MQ2PIN A0 +#undef ARDUINOLMS6 +#undef ARDUINOAHT +#undef ARDUINOBMP280 +#undef ARDUINOBME280 +#endif + + +#if defined(ARDUINOSHT) || defined(ARDUINOLMS6) || defined(ARDUINOAHT) || defined(ARDUINOBMP280) || defined(RDUINOBME280) +#define ARDUINOWIRE +#endif + +/* + * The hardware models. + * These are predefined hardware configurations. + */ + +/* an AVR based Arduino with nothing else */ +#if defined(UNOPLAIN) +#define ARDUINOEEPROM +#endif + +/* an AVR ARDUINO (UNO or MEGA) with the classical LCD shield */ +#if defined(AVRLCD) +#define ARDUINOEEPROM +#define DISPLAYCANSCROLL +#define LCDSHIELD +#endif + +/* + * a Wemos ESP8266 with a mdified datalogger shield + * standalone capable, with Wire and MQTT. + */ +#if defined(WEMOSSHIELD) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOSD +#define ARDUINORTC +#define ARDUINOWIRE +#define SDPIN D8 +#define PS2DATAPIN D2 +#define PS2IRQPIN D9 +#define ARDUINOMQTT +#endif + +/* + * mega with a Ethernet shield + * standalone capable, Ethernet is not enabled by default + */ +#if defined(MEGASHIELD) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define SDPIN 4 +#endif + +/* + * VGA system with SD card, based on the TTGO VGA 1.4 + * ESP32 + * standalone by default, with MQTT + */ +#if defined(TTGOVGA) +#define ARDUINOEEPROM +#define ARDUINOVGA +#define ARDUINOSD +/* #define ARDUINOMQTT */ +#define SDPIN 13 +#define STANDALONE +#endif + +/* + * MEGA with a TFT shield, standalone by default + */ +#if defined(MEGATFT) +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOTFT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define PS2DATAPIN 18 +#define PS2IRQPIN 19 +#define SDPIN 53 +#define STANDALONE +#endif + +/* + * DUE with a TFT shield, standalone by default + */ +#if defined(DUETFT) +#undef ARDUINOEEPROM +#define ARDUINOPS2 +#undef ARDUINOUSBKBD +#define DISPLAYCANSCROLL +#define ARDUINOTFT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define ARDUINORTC +#define PS2DATAPIN 9 +#define PS2IRQPIN 8 +#define SDPIN 53 +#define STANDALONE +#endif + +#if defined(NANOBOARD) +#undef USESPICOSERIAL +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define ARDUINOPRT +#define ARDUINOEFS +#define ARDUINORTC +#define ARDUINOWIRE +#define EFSEEPROMADDR 0x050 /* use clock EEPROM 0x057, set to 0x050 for external EEPROM */ +#define STANDALONE +#endif + +/* a UNO shield with memory and EFS EEPROM */ +#if defined(UNOBOARD) +#define ARDUINOEEPROM +#define ARDUINOSPIRAM +#define ARDUINOEFS +#define ARDUINOWIRE +#define EFSEEPROMADDR 0x050 +#define EFSEEPROMSIZE 65534 +#endif + +/* a MEGA shield with memory and SD card */ +#if defined(MEGABOARD) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define ARDUINOPRT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINORTC +#define ARDUINOSPIRAM +#define RAMPIN 53 +#define SDPIN 49 +#endif + +/* an ESP01 board, using the internal flash + * with the ESP01-8266 only pins 0 and 2 are usable freely + * on ESP01-ESP32C3 this is 9 and 2 while 2 is an analog pin + * 9 cannot be pulled on low by any peripheral on boot because this + * brings the board to flash mode + */ +#if defined(ESP01BOARD) +#undef ARDUINOEEPROM +#define ESPSPIFFS +#define ARDUINOMQTT +#define ARDUINOWIRE +#if defined(ARDUINOWIRE) && defined(ARDUINO_ARCH_ESP8266) +#define SDA_PIN 0 +#define SCL_PIN 2 +#endif +/* see: https://github.com/espressif/arduino-esp32/issues/6376 + * nothing should block the port, e.g. DHT or anything + */ +#if defined(ARDUINOWIRE) && defined(ARDUINO_ARCH_ESP32) +#define SDA_PIN 9 +#define SCL_PIN 2 +#endif +/* + * + * Currently only 8=SDA and 9=SCL works / tested with AHT10 + */ +#endif + +/* an RP2040 based board with an ILI9488 display */ +#if defined(RP2040BOARD) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#undef ARDUINOEEPROM +#define ARDUINOI2CEEPROM +#define ARDUINOPRT +#define ARDUINOSD +#undef RP2040LITTLEFS +#define ARDUINOWIRE +#define ARDUINORTC +#define ARDUINOPS2 +#define ARDUINOMQTT +#undef STANDALONE +#endif + +/* an RP2040 Raspberry Pi Pico based board with an ILI9488 display */ +#if defined(RP2040BOARD2) +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#undef ARDUINOEEPROM +#undef ARDUINOPRT +#undef ARDUINOSD +#define RP2040LITTLEFS +#undef ARDUINOWIRE +#undef ARDUINORTC +#undef ARDUINOPS2 +#undef ARDUINOMQTT +#undef STANDALONE +#define ILI_LED A2 +#define ILI_CS 15 +#define ILI_RST 14 +#define ILI_DC 13 +#endif + + +/* an ESP32 board with an ILI9488 display, + some SD problems here with some hardware */ +#if defined(ESP32BOARD) +#define ILI_CS 12 +#define ILI_DC 27 +#define ILI_RST 14 +#define ILI_LED 26 +#undef USESPICOSERIAL +#define ESPSPIFFS +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#define ARDUINOEEPROM +#define ARDUINOMQTT +#define ARDUINOWIRE +#endif + +/* a board based on the Arduino MKR 1010 Wifi + * made for low energy games + */ +#if defined(MKR1010BOARD) +#define ILI_CS 7 +#define ILI_DC 4 +#define ILI_RST 6 +#define ILI_LED A3 +#undef USESPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#define ARDUINOEFS +#define ARDUINOMQTT +#define ARDUINOWIRE +/* careful with the setting, lockout possible easily */ +#undef ARDUINOUSBKBD +#undef STANDALONE +#endif + +/* + * defining the systype variable which informs BASIC about the platform at runtime + */ + +#if defined(ARDUINO_ARCH_AVR) +const mem_t bsystype = SYSTYPE_AVR; +#elif defined(ARDUINO_ARCH_ESP8266) +const mem_t bsystype = SYSTYPE_ESP8266; +#elif defined(ARDUINO_ARCH_ESP32) +const mem_t bsystype = SYSTYPE_ESP32; +#elif defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +const mem_t bsystype = SYSTYPE_RP2040; +#elif defined(ARDUINO_ARCH_SAM) && defined(ARDUINO_ARCH_SAMD) +const mem_t bsystype = SYSTYPE_SAM; +#elif defined(ARDUINO_ARCH_XMC) +const mem_t bsystype = SYSTYPE_XMC; +#elif defined(ARDUINO_ARCH_SMT32) +const mem_t bsystype = SYSTYPE_SMT32; +#elif defined(ARDUINO_ARCH_RENESAS) +const mem_t bsystype = SYSTYPE_NRENESA; +#else +const mem_t bsystype = SYSTYPE_UNKNOWN; +#endif + +/* + * DUE has no tone, we switch to emulation mode automatically + */ +#ifdef ARDUINO_SAM_DUE +#define ARDUINOTONEEMULATION +#endif + +/* + * Some settings, defaults, and dependencies + * + * HASWIRE is set to start wire. Some libraries do this again. + * + * Handling Wire and SPI is tricky as some of the libraries + * also include and start SPI and Wire code. + */ + +/* a clock needs wire */ +#ifdef ARDUINORTC +#define ARDUINOWIRE +#endif + +/* a display needs wire */ +#if defined(ARDUINOLCDI2C) || defined(ARDUINOSSD1306) +#define ARDUINOWIRE +#endif + +/* EEPROM storage needs wire */ +#if defined(ARDUINOEFS) +#define ARDUINOWIRE +#endif + +/* external EEPROMs also need wire */ +#if defined(ARDUINOI2CEEPROM) +#define ARDUINOWIRE +#endif + +/* plain Wire support also needs wire ;-) */ +#if defined(ARDUINOWIRE) +#define HASWIRE +#endif + +/* radio needs SPI */ +#if defined(ARDUINORF24) +#define ARDUINOSPI +#endif + +/* a filesystem needs SPI */ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) +#define ARDUINOSPI +#endif + +/* networking may need SPI */ +#if defined(ARDUINOMQTT) +#define ARDUINOSPI +#endif + +/* the NOKIA and ILI9488 display needs SPI */ +#if defined(ARDUINONOKIA51) || defined(ARDUINOILI9488) +#define ARDUINOSPI +#endif + +/* the RAM chips */ +#if defined(ARDUINOSPIRAM) +#define ARDUINOSPI +#endif + + +/* Networking and keyboards need the background task capability */ +#if defined(ARDUINOMQTT) || defined(ARDUINOETH) || defined(ARDUINOUSBKBD) || defined(ARDUINOZX81KBD) +#define BASICBGTASK +#endif + +/* picoserial is not a available on many platforms */ +#ifdef USESPICOSERIAL +#ifndef UCSR0A +#undef USESPICOSERIAL +#endif +#endif + +/* + * graphics adapter only when graphics hardware, overriding the + * language setting + * this is odd and can be removed later on + */ +#if !defined(ARDUINOTFT) && !defined(ARDUINOVGA) && !defined(ARDUINOILI9488) && !defined(ARDUINONOKIA51) && !defined(ARDUINOSSD1306) && !defined(ARDUINOMCUFRIEND) && !defined(ARDUINOGRAPHDUMMY) && !defined(ARDUINOEDP47) +#undef HASGRAPH +#endif + +/* + * incompatibilities and library stuff + */ +/* these platforms have no EEPROM and no emulation built-in */ +#if defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +#undef ARDUINOEEPROM +#endif + +/* + * Keyboard library, on AVR systems Paul Stoffregens original + * PS2 library works. + * I recommend to use my patched version from + * https://github.com/slviajero/PS2Keyboard + * works with ESP, has keyboard.peek() + */ +#ifdef ARDUINOPS2 +#include +#endif + +/* + * The USB keyboard code - tested only on DUE and the like + * not really good + */ +#ifdef ARDUINOUSBKBD +#include +#endif + +/* + * The ZX81 keyboard code - tested on AVR MEGA256 + */ +#ifdef ARDUINOZX81KBD +#include +#endif + +/* + * ESPy stuff, pgmspace has changed location + */ +#ifdef ARDUINOPROGMEM +#ifdef ARDUINO_ARCH_ESP32 +#include +#else +#include +#endif +#endif + +/* + * Fix a few things around XMC, contributed by Florian + */ +#if defined(ARDUINO_ARCH_XMC) +#undef USESPICOSERIAL +#undef ARDUINOPROGMEM +#endif + +/* + * This works for AVR and ESP EEPROM dummy. + * On XMC you need https://github.com/slviajero/XMCEEPROMLib + * Throws a compiler error for other platforms. + */ +#ifdef ARDUINOEEPROM +#ifdef ARDUINO_ARCH_XMC +#include +#else +#ifdef ARDUINO_ARCH_SAMD +//#include +#else +#include +#endif +#endif +#endif + +/* Standard SPI */ +#ifdef ARDUINOSPI +#include +#endif + +/* Standard wire - triggered by the HASWIRE macro now */ +#ifdef HASWIRE +#include +#endif + +/* + * the display library includes for LCD + */ +#ifdef LCDSHIELD +#include +#endif + +/* + * I2C displays + */ + +#ifdef ARDUINOLCDI2C +#include +#endif + +/* + * This is the monochrome library of Oli Kraus + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * It can harware scroll, but this is not yet implemented + */ +#if defined(ARDUINONOKIA51) || defined(ARDUINOSSD1306) +#include +#endif + +/* + * This is the (old) ILI9488 library originally created by Jarett Burket + * https://github.com/slviajero/ILI9488 + * It can hardware scroll (not yet used) + */ +#ifdef ARDUINOILI9488 +#include +#include +#endif + +/* + * This is the MCUFRIED library originally for parallel TFTs + * https://github.com/prenticedavid/MCUFRIEND_kbv + * + */ +#ifdef ARDUINOMCUFRIEND +#include +#include +#endif + +/* + * For TFT we use the UTFT library + * http://www.rinkydinkelectronics.com/library.php?id=51 + * please note the License, it is not GPL but NON COMMERCIAL + * Creative Commons. + */ +#ifdef ARDUINOTFT +#include +#include +#endif + +/* + * Lilygo EDP47 displays, 4.7 inch epapers using the respective library + * from Lilygo + * https://github.com/Xinyuan-LilyGO/LilyGo-EPD47 + * + */ +#ifdef ARDUINOEDP47 +#include "epd_driver.h" +#include "font/firasans.h" +#endif + + +/* + * experimental networking code + * currently the standard Ethernet shield, ESP Wifi + * MKW Wifi, and RP2040 Wifi is supported. All of them + * with the standard library. + * + * In addition to this Pubsub is used + * https://github.com/slviajero/pubsubclient + * for MQTT + */ +#ifdef ARDUINOMQTT +#ifdef ARDUINOETH +#include +#else +#ifdef ARDUINO_ARCH_ESP8266 +#include +#endif +#ifdef ARDUINO_ARCH_ESP32 +#include +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) +#include +#endif +#if defined(ARDUINO_UNOR4_WIFI) +#include +#endif +#endif +#include +#endif + +/* + * VGA is only implemented on one platform - TTGO VGA 1.4 + * Needs https://github.com/slviajero/FabGL + */ +#if defined(ARDUINOVGA) && defined(ARDUINO_TTGO_T7_V14_Mini32) +#include +#include +#endif + +/* + * SD filesystems with the standard SD driver + * for MEGA 256 a soft SPI solution is needed + * if standard shields are used, this is a patched + * SD library https://github.com/slviajero/SoftSD + */ +#ifdef ARDUINOSD +#define FILESYSTEMDRIVER +#if defined(SOFTWARE_SPI_FOR_SD) +#include +#else +#include +#endif +#endif + +/* + * ESPSPIFFS tested on ESP8266 and ESP32 + * supports formating in BASIC + */ +#ifdef ESPSPIFFS +#define FILESYSTEMDRIVER +#ifdef ARDUINO_ARCH_ESP8266 +#include +#endif +#ifdef ARDUINO_ARCH_ESP32 +#include +#include +#endif +#endif + +/* + * RP2040 internal filesystem + * This is test code from https://github.com/slviajero/littlefs + * and the main branch is actively developed + */ +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +#define LFS_MBED_RP2040_VERSION_MIN_TARGET "LittleFS_Mbed_RP2040 v1.1.0" +#define LFS_MBED_RP2040_VERSION_MIN 1001000 +#define _LFS_LOGLEVEL_ 1 +#define RP2040_FS_SIZE_KB 1024 +#define FORCE_REFORMAT false +#include +#endif + +/* + * STM32 SDIO driver for he SD card slot of the STM32F4 boards (and others) + */ +#ifdef STM32SDIO +#define FILESYSTEMDRIVER +#include +#ifndef SD_DETECT_PIN +#define SD_DETECT_PIN SD_DETECT_NONE +#endif +#endif +/* + * external flash file systems override internal filesystems + * currently BASIC can only have one filesystem + */ +#ifdef ARDUINOSD +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#endif + +/* + * support for external EEPROMs as filesystem + * overriding all other filessystems. This is a minimalistic + * filesystem meant for very small systems with not enough + * memory for real filesystems + * https://github.com/slviajero/EepromFS + */ +#ifdef ARDUINOEFS +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#undef ARDUINOSD +#undef STM32SDIO +#define FILESYSTEMDRIVER +#endif + +/* the EFS object is used for filesystems and raw EEPROM access */ +#if (defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED)) || defined(ARDUINOEFS) +#include +#endif + +/* if there is an unbuffered I2C EEPROM, use an autodetect mechanism */ +#if defined(ARDUINOI2CEEPROM) +unsigned int i2ceepromsize = 0; +#endif + +/* + * Software SPI only on Mega2560 + */ +#ifndef ARDUINO_AVR_MEGA2560 +#undef SOFTWARE_SPI_FOR_SD +#endif + +/* + * Arduino default serial baudrate and serial flags for the + * two supported serial interfaces. Serial is always active and + * connected to channel &1 with 9600 baud. + * + * channel 4 (ARDUINOPRT) can be either in character or block + * mode. Blockmode is set as default here. This means that all + * available characters are always loaded to a string -> inb() + */ +const int serial_baudrate = 9600; +mem_t sendcr = 0; + +#ifdef ARDUINOPRT +int serial1_baudrate = 9600; +mem_t blockmode = 1; +#else +const int serial1_baudrate = 0; +mem_t blockmode = 0; +#endif + +/* handling time - part of the Arduino core - only needed on POSIX OSes */ +void timeinit() {} + +/* starting wiring is only needed on raspberry */ +void wiringbegin() {} + +/* POSIX signals - not needed here */ +void signalon() {} + +/* + * helper functions OS, heuristic on how much memory is + * available in BASIC + * Arduino information from + * data from https://docs.arduino.cc/learn/programming/memory-guide + */ +#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_XMC) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RENESAS) +extern "C" char* sbrk(int incr); +long freeRam() { + char top; + return &top - reinterpret_cast(sbrk(0)); +} +#elif defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_LGT8F) +long freeRam() { + extern int __heap_start,*__brkval; + int v; + return (int)&v - (__brkval == 0 + ? (int)&__heap_start : (int) __brkval); +} +#elif defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) +long freeRam() { + return ESP.getFreeHeap(); +} +#else +long freeRam() { + return 0; +} +#endif + +/* + * Heuristic Wifi systems reserve 4k by default, small 8 bit AVR try to guess sizes conservatively + * RP2040 cannot measure, we set to 16 bit full address space + */ +long freememorysize() { +#if defined(ARDUINO_ARCH_RENESAS) + return freeRam() - 2000; +#endif +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32) + return freeRam() - 4000; +#endif +#if defined(ARDUINO_ARCH_XMC) + return freeRam() - 2000; +#endif +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_LGT8F) + int overhead=192; +#ifdef HASFLOAT + overhead+=96; +#endif +#ifdef ARDUINO_AVR_MEGA2560 + overhead+=96; +#endif +#ifdef ARDUINOWIRE + overhead+=128; +#endif +#ifdef ARDUINORF24 + overhead+=128; +#endif +#if defined(ARDUINOSD) + overhead+=512; +#endif +#ifdef ARDUINOZX81KBD + overhead+=64; +#endif +#ifdef ARDUINOETH + overhead+=256; +#endif +#ifdef HASGRAPH + overhead+=256; /* a bit on the safe side */ +#endif + return freeRam() - overhead; +#endif +#if defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) + return 65536; +#endif + return 0; +} + +/* + * the sleep and restart functions - only implemented for some controllers + */ +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) +void(* callzero)() = 0; +#endif + +void restartsystem() { + eflush(); /* if there is a I2C eeprom dummy, flush the buffer */ +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + ESP.restart(); +#endif +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) + callzero(); +#endif +#if defined(ARDUINO_ARCH_LGT8F) +#endif +} + +/* + * I used these two articles + * https://randomnerdtutorials.com/esp8266-deep-sleep-with-arduino-ide/ + * https://randomnerdtutorials.com/esp32-deep-sleep-arduino-ide-wake-up-sources/ + * for this very simple implementation - needs to be improved (pass data from sleep + * state to sleep state via EEPROM) + */ +#if defined(ARDUINO_ARCH_SAMD) +#define HASBUILTINRTC +#include "RTCZero.h" +#include "ArduinoLowPower.h" +RTCZero rtc; +#endif + +/* STM32duino have the same structure */ +#if defined(ARDUINO_ARCH_STM32) +#define HASBUILTINRTC +#include "STM32RTC.h" +#include "STM32LowPower.h" +STM32RTC& rtc = STM32RTC::getInstance(); +#endif + +/* the NRENESA board have a buildin RTC as well */ +#if defined(ARDUINO_ARCH_RENESAS) +#define HASBUILTINRTC +#include "RTC.h" +RTCTime rtc; +#endif + +/* for ESP32 we also include the time stuctures and offer a POSIX style clock*/ +#if defined(ARDUINO_ARCH_ESP32) +#include "time.h" +#include +#endif + + +/* this is unfinished, don't use */ +void rtcsqw(); + +#define LOWPOWERINTPIN 2 +void aftersleepinterrupt(void) { } + +void activatesleep(long t) { + eflush(); /* if there is a I2C eeprom dummy, flush the buffer */ +#if defined(ARDUINO_ARCH_ESP8266) + ESP.deepSleep(t*1000); +#endif +#if defined(ARDUINO_ARCH_ESP32) + esp_sleep_enable_timer_wakeup(t*1000); + esp_deep_sleep_start(); +#endif +#if defined(ARDUINO_ARCH_SAMD) + LowPower.sleep((int) t); +#endif +#if defined(ARDUINO_AVR_ATmega644) +/* unfinished, don't use, just test code + rtcsqw(); + pinMode(LOWPOWERINTPIN, INPUT_PULLUP); + attachInterrupt(digitalPinToInterrupt(LOWPOWERINTPIN), aftersleepinterrupt, CHANGE); + sleepMode(SLEEP_POWER_SAVE); + sleep(); + detachInterrupt(digitalPinToInterrupt(LOWPOWERINTPIN)); + noSleep(); +*/ +#endif +} + +/* + * start the SPI bus - this is a little mean as some libraries also + * try to start the SPI which may lead to on override of the PIN settings + * if the library code is not clean - currenty no conflict known + */ +void spibegin() { +#ifdef ARDUINOSPI +#ifdef ARDUINO_TTGO_T7_V14_Mini32 +/* this fixes the wrong board definition in the ESP32 core for this board */ + SPI.begin(14, 2, 12, 13); +#else + SPI.begin(); +#endif +#endif +} + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear(), dspupdate() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + * + * Non rgb ready displays on rgbcolor translate to their native color + * when BASIC requests an rgb color, in this case the nearest 4 bit + * color of the display is also stored for use in the text DISLAY driver + * code + */ + + /* generate a 4 bit vga color from a given rgb color */ +uint8_t rgbtovga(int r, int g, int b) { + short vga; + if (r>191 || g>191 || b>191) vga=8; else vga=0; + vga=vga+r/128+g/128*2+b/128*4; + return vga; +} + +/* + * global variables for a standard LCD shield. + * Includes the standard Arduino LiquidCrystal library + */ +#ifdef LCDSHIELD +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +/* LCD shield pins to Arduino + * RS, EN, d4, d5, d6, d7; + * backlight on pin 10; + */ +const int dsp_rows=2; +const int dsp_columns=16; +LiquidCrystal lcd( 8, 9, 4, 5, 6, 7); +void dspbegin() { lcd.begin(dsp_columns, dsp_rows); dspsetscrollmode(1, 1); } +void dspprintchar(char c, mem_t col, mem_t row) { lcd.setCursor(col, row); if (c) lcd.write(c);} +void dspclear() { lcd.clear(); } +void dspupdate() {} +void dspsetcursor(mem_t c) { if (c) lcd.blink(); else lcd.noBlink(); } +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +#define HASKEYPAD +/* elementary keypad reader left=1, right=2, up=3, down=4, select= */ +short keypadread(){ + int a=analogRead(A0); + if (a >= 850) return 0; + else if (a>=600 && a<850) return 10; + else if (a>=400 && a<600) return '1'; + else if (a>=200 && a<400) return '3'; + else if (a>=60 && a<200) return '4'; + else return '2'; +} +/* repeat mode of the keypad - off means block, on means return immediately */ +mem_t kbdrepeat=0; +#endif + +/* + * A LCD display connnected via I2C, uses the standard + * Arduino I2C display library. + */ +#ifdef ARDUINOLCDI2C +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +const int dsp_rows=4; +const int dsp_columns=20; +LiquidCrystal_I2C lcd(0x27, dsp_columns, dsp_rows); +void dspbegin() { lcd.init(); lcd.backlight(); dspsetscrollmode(1, 1); } +void dspprintchar(char c, mem_t col, mem_t row) { lcd.setCursor(col, row); if (c) lcd.write(c); } +void dspclear() { lcd.clear(); } +void dspupdate() {} +void dspsetcursor(mem_t c) { if (c) lcd.blink(); else lcd.noBlink(); } +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +#endif + +/* + * A Nokia 5110 with ug8lib2 - can scroll quite well + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + * + * default PIN settings here are for ESP8266, using the standard + * SPI SS for 15 for CS/CE, and 0 for DC, 2 for reset + * + */ +#ifdef ARDUINONOKIA51 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#ifndef NOKIA_CS +#define NOKIA_CS 15 +#endif +#ifndef NOKIA_DC +#define NOKIA_DC 0 +#endif +#ifndef NOKIA_RST +#define NOKIA_RST 2 +#endif +U8G2_PCD8544_84X48_F_4W_HW_SPI u8g2(U8G2_R0, NOKIA_CS, NOKIA_DC, NOKIA_RST); +const int dsp_rows=6; +const int dsp_columns=10; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +char dspfontsize = 8; +void dspbegin() { u8g2.begin(); u8g2.setFont(u8g2_font_amstrad_cpc_extended_8r); } +void dspprintchar(char c, mem_t col, mem_t row) { char b[] = { 0, 0 }; b[0]=c; if (c) u8g2.drawStr(col*dspfontsize+2, (row+1)*dspfontsize, b); } +void dspclear() { u8g2.clearBuffer(); u8g2.sendBuffer(); dspfgcolor=1; } +void dspupdate() { u8g2.sendBuffer(); } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; u8g2.setDrawColor(dspfgcolor); } +void plot(int x, int y) { u8g2.setDrawColor(dspfgcolor); u8g2.drawPixel(x, y); dspgraphupdate(); } +void line(int x0, int y0, int x1, int y1) { u8g2.drawLine(x0, y0, x1, y1); dspgraphupdate(); } +void rect(int x0, int y0, int x1, int y1) { u8g2.drawFrame(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void frect(int x0, int y0, int x1, int y1) { u8g2.drawBox(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void circle(int x0, int y0, int r) { u8g2.drawCircle(x0, y0, r); dspgraphupdate(); } +void fcircle(int x0, int y0, int r) { u8g2.drawDisc(x0, y0, r); dspgraphupdate(); } +#endif + +/* + * 4.7 inch epaper displays are derived from the NOKIA51 code, no grayscales + * at the moment. Forcing the font into rectangles and hoping this works. + * + * Epapers bypass the display driver here and use a graphics based display + * mode instead + */ +#ifdef ARDUINOEDP47 +#define GRAPHDISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +const int dsp_width=960; +const int dsp_height=540; +const int dsp_rows=0; +const int dsp_columns=0; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +char dspfontsize = 24; +int dspgraphcursor_x = 0; +int dspgraphcursor_y = dspfontsize; +void dspbegin() { epd_init(); dspclear(); } +void dspprintstring(char* s) { + epd_poweron(); + writeln((GFXfont *)&FiraSans, s, &dspgraphcursor_x, &dspgraphcursor_y, NULL); + epd_poweroff(); +} +void dspclear() { epd_poweron(); epd_clear(); epd_poweroff(); dspfgcolor=1; } +void dspupdate() { } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; } +void plot(int x, int y) { } +void line(int x0, int y0, int x1, int y1) { } +void rect(int x0, int y0, int x1, int y1) { } +void frect(int x0, int y0, int x1, int y1) { } +void circle(int x0, int y0, int r) { } +void fcircle(int x0, int y0, int r) { } +#endif + + +/* + * Small SSD1306 OLED displays with I2C interface + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + */ +#ifdef ARDUINOSSD1306 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#define SSD1306WIDTH 32 +#define SSD1306HEIGHT 128 +/* constructors may look like this, last argument is the reset pin + * //U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); + * //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); + */ +#if SSD1306WIDTH == 32 +/* U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); + * use hardware I2C instead of software. Tested (only) on ESP32C3 and ESP8266 so far. + */ +U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0); +#endif +#if SSD1306WIDTH == 64 +/* the Heltec board has an internal software I2C on pins 4=SDA and 15=SCL */ +#ifdef ARDUINO_heltec_wifi_lora_32_V2 +U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, 15, 4, 16); +#else +/* use hardware I2C instead of software. Tested (only) on ESP32C3 and ESP8266 so far. + */ +U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0); +#endif +#endif +const char dspfontsize = 8; +const int dsp_rows=SSD1306WIDTH/dspfontsize; +const int dsp_columns=SSD1306HEIGHT/dspfontsize; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +void dspbegin() { u8g2.begin(); u8g2.setFont(u8g2_font_amstrad_cpc_extended_8r); } +void dspprintchar(char c, mem_t col, mem_t row) { char b[] = { 0, 0 }; b[0]=c; if (c) u8g2.drawStr(col*dspfontsize+2, (row+1)*dspfontsize, b); } +void dspclear() { u8g2.clearBuffer(); u8g2.sendBuffer(); dspfgcolor=1; } +void dspupdate() { u8g2.sendBuffer(); } +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) { dspfgcolor=c%3; u8g2.setDrawColor(dspfgcolor); } +void plot(int x, int y) { u8g2.setDrawColor(dspfgcolor); u8g2.drawPixel(x, y); dspgraphupdate(); } +void line(int x0, int y0, int x1, int y1) { u8g2.drawLine(x0, y0, x1, y1); dspgraphupdate(); } +void rect(int x0, int y0, int x1, int y1) { u8g2.drawFrame(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void frect(int x0, int y0, int x1, int y1) { u8g2.drawBox(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void circle(int x0, int y0, int r) { u8g2.drawCircle(x0, y0, r); dspgraphupdate(); } +void fcircle(int x0, int y0, int r) { u8g2.drawDisc(x0, y0, r); dspgraphupdate(); } +#endif + +/* + * A ILI9488 with Jarett Burkets version of Adafruit GFX and patches + * by Stefan Lenz + * currently only slow software scrolling implemented in BASIC + * + * https://github.com/slviajero/ILI9488 + * + * we use 9, 8, 7 as CS, CE, RST by default and A7 for the led brightness control + */ + +#ifdef ARDUINOILI9488 +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#ifndef ILI_CS +#define ILI_CS 9 +#endif +#ifndef ILI_DC +#define ILI_DC 8 +#endif +#ifndef ILI_RST +#define ILI_RST 7 +#endif +#ifndef ILI_LED +#define ILI_LED A3 +#endif +ILI9488 tft = ILI9488(ILI_CS, ILI_DC, ILI_RST); +/* ILI in landscape */ +const int dsp_rows=20; +const int dsp_columns=30; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { + tft.begin(); + tft.setRotation(3); /* ILI in landscape, SD slot up */ + tft.setTextColor(dspfgcolor); + tft.setTextSize(2); + tft.fillScreen(dspbgcolor); + pinMode(ILI_LED, OUTPUT); + analogWrite(ILI_LED, 255); + dspsetscrollmode(1, 4); +} +void dspprintchar(char c, mem_t col, mem_t row) { if (c) tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, 2); } +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, x0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, x0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +/* + * A MCUFRIEND parallel port display for the various tft shields + * This implementation is mainly for Arduino MEGA + * + * currently only slow software scrolling implemented in BASIC + * + */ + +#ifdef ARDUINOMCUFRIEND +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#ifndef LCD_CS +#define LCD_CS A3 +#endif +#ifndef LCD_CD +#define LCD_CD A2 +#endif +#ifndef LCD_WR +#define LCD_WR A1 +#endif +#ifndef LCD_RD +#define LCD_RD A0 +#endif +#ifndef LCD_RESET +#define LCD_RESET A4 +#endif +MCUFRIEND_kbv tft; +/* ILI in landscape */ +const int dsp_rows=20; +const int dsp_columns=30; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { + uint16_t ID = tft.readID(); + if (ID == 0xD3D3) ID = 0x9481; /* write-only shield - taken from the MCDFRIEND demo */ + tft.begin(ID); + tft.setRotation(1); /* ILI in landscape, 3: SD slot on right the side */ + tft.setTextColor(dspfgcolor); + tft.setTextSize(2); + tft.fillScreen(dspbgcolor); + dspsetscrollmode(1, 4); /* scrolling is on, scroll 4 lines at once */ + } +void dspprintchar(char c, mem_t col, mem_t row) { if (c) tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, 2); } +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, x0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, x0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +/* + * A no operations graphics dummy + * Tests the BASIC side of the graphics code without triggering + * any output + */ +#ifdef ARDUINOGRAPHDUMMY +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +const int dsp_rows=20; +const int dsp_columns=30; +const uint16_t dspdefaultfgcolor = 1; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +dspcolor_t dspfgcolor = 0xFFFF; +dspcolor_t dspbgcolor = 0x0000; +void dspbegin() { dspsetscrollmode(1, 4); } +void dspprintchar(char c, mem_t col, mem_t row) {} +void dspclear() {} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0; } +void rgbcolor(int r, int g, int b) { dspfgcolor=0; } +void vgacolor(short c) { + short base=128; + if (c==8) { rgbcolor(64, 64, 64); return; } + if (c>8) base=255; + rgbcolor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) {} +void line(int x0, int y0, int x1, int y1) {} +void rect(int x0, int y0, int x1, int y1) {} +void frect(int x0, int y0, int x1, int y1) {} +void circle(int x0, int y0, int r) {} +void fcircle(int x0, int y0, int r) {} +#endif + + +/* + * SD1963 TFT display code with UTFT. + * Tested witth SD1963 800*480 board. + * it is mainly intended for a MEGA or DUE as a all in one system + * this is for a MEGA shield and the CTE DUE shield, for the due + * you need to read the comment in Arduino/libraries/UTFT/hardware/arm + * HW_ARM_defines.h -> uncomment the DUE shield + * See also + * https://github.com/slviajero/tinybasic/wiki/Projects:-4.-A-standalone-computer-with-a-TFT-screen-based-on-a-DUE + */ +#ifdef ARDUINOTFT +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +extern uint8_t SmallFont[]; +extern uint8_t BigFont[]; +#ifdef ARDUINO_SAM_DUE +UTFT tft(CTE70,25,26,27,28); +#else +UTFT tft(CTE70,38,39,40,41); +#endif +const int dsp_rows=30; +const int dsp_columns=50; +char dspfontsize = 16; +const uint32_t dspdefaultfgcolor = 0x00FFFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +typedef uint32_t dspcolor_t; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { tft.InitLCD(); tft.setFont(BigFont); tft.clrScr(); dspsetscrollmode(1, 4); } +void dspprintchar(char c, mem_t col, mem_t row) { if (c) tft.printChar(c, col*dspfontsize, row*dspfontsize); } +void dspclear() { + tft.clrScr(); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; + vgacolor(dspfgvgacolor); +} +void rgbcolor(int r, int g, int b) { + tft.setColor(r,g,b); + dspfgcolor=((uint8_t)r << 16) + ((uint8_t)g << 8) + b; + dspfgvgacolor=rgbtovga(r, g, b); +} +void vgacolor(short c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { tft.setColor(64, 64, 64); return; } + if (c>8) base=255; + tft.setColor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void dspupdate() {} +void dspsetcursor(mem_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(mem_t c) {} +mem_t dspident() {return 0;} +void plot(int x, int y) { tft.drawPixel(x, y); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1); } +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r); } +#endif + +/* + * this is the VGA code for fablib - experimental + * not all modes and possibilities explored, with networking on an ESP + * VGA16 is advisable. It leaves enough memory for the interpreter and network. + * this code overrides the display driver logic as fabgl brings an own + * terminal emulation + */ +#if defined(ARDUINOVGA) && defined(ARDUINO_TTGO_T7_V14_Mini32) +/* static fabgl::VGAController VGAController; */ +fabgl::VGA16Controller VGAController; /* 16 color object with less memory */ +static fabgl::Terminal Terminal; +static Canvas cv(&VGAController); +TerminalController tc(&Terminal); +Color vga_graph_pen = Color::BrightWhite; +Color vga_graph_brush = Color::Black; +Color vga_txt_pen = Color::BrightGreen; +Color vga_txt_background = Color::Black; +#ifdef HASTONE +fabgl::SoundGenerator soundGenerator; +#endif + + +/* this starts the vga controller and the terminal right now */ +void vgabegin() { + VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_15); + VGAController.setResolution(VGA_640x200_70Hz); + Terminal.begin(&VGAController); + Terminal.setBackgroundColor(vga_txt_background); + Terminal.setForegroundColor(vga_txt_pen); + Terminal.connectLocally(); + Terminal.clear(); + Terminal.enableCursor(1); + Terminal.setTerminalType(TermType::VT52); +} + +int vgastat(char c) {return 0; } + +/* scale the screen size */ +void vgascale(int* x, int* y) { + *y=*y*10/24; +} + +void rgbcolor(int r, int g, int b) { + short vga; + if (r>191 || g>191 || b>191) vga=8; else vga=0; + vga=vga+r/128+g/128*2+b/128*4; + vga_graph_pen=fabgl::Color(vga); +} + +void vgacolor(short c) { vga_graph_pen = fabgl::Color(c%16); } +void plot(int x, int y) { + vgascale(&x, &y); + cv.setPenColor(vga_graph_pen); + cv.setPixel(x,y); + cv.setPenColor(vga_txt_pen); +} + +void line(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawLine(x0, y0, x1, y1); + cv.setPenColor(vga_txt_pen); +} + +void rect(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawRectangle(x0, y0, x1, y1); + cv.setPenColor(vga_txt_pen); +} + +void frect(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setBrushColor(vga_graph_pen); + cv.fillRectangle(x0, y0, x1, y1); + cv.setBrushColor(vga_txt_background); +} + +void circle(int x0, int y0, int r) { + int rx = r; + int ry = r; + vgascale(&x0, &y0); + vgascale(&rx, &ry); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawEllipse(x0, y0, rx, ry); + cv.setPenColor(vga_txt_pen); +} + +void fcircle(int x0, int y0, int r) { + int rx = r; + int ry = r; + vgascale(&x0, &y0); + vgascale(&rx, &ry); + cv.setBrushColor(vga_graph_pen); + cv.fillEllipse(x0, y0, rx, ry); + cv.setBrushColor(vga_txt_background); +} + +void vgawrite(char c){ + switch(c) { + case 12: /* form feed is clear screen */ + Terminal.write(27); Terminal.write('H'); + Terminal.write(27); Terminal.write('J'); + return; + case 10: /* this is LF Unix style doing also a CR */ + Terminal.write(10); Terminal.write(13); + return; + } + Terminal.write(c); +} +#else +void vgabegin(){} +int vgastat(char c) {return 0; } +void vgawrite(char c){} +#endif + +/* + * Keyboard code for either the Fablib Terminal class or + * PS2Keyboard - please note that you need the ESP patched + * version here as mentioned above + * + * sets HASKEYBOARD to inform basic about this capability + * + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +#ifdef ARDUINO_TTGO_T7_V14_Mini32 +#define PS2FABLIB +#define HASKEYBOARD +fabgl::PS2Controller PS2Controller; +char fabgllastchar = 0; +#else +#if defined(ARDUINO) && defined(ARDUINOPS2) +#define PS2KEYBOARD +#define HASKEYBOARD +PS2Keyboard keyboard; +#else +#if defined(ARDUINO) && defined(ARDUINOUSBKBD) +#define HASKEYBOARD +#define USBKEYBOARD +USBHost usb; +KeyboardController keyboard(usb); +char usbkey=0; +#else +#if defined(ARDUINOZX81KBD) +#define HASKEYBOARD +#define ZX81KEYBOARD +ZX81Keyboard keyboard; +#endif +#endif +#endif +#endif + +/* + * Experimental, unfinished, rudimentary + */ +#if defined(ARDUINOUSBKBD) +/* not really needed, only here for reference */ +char usbkeymapUS[] = +{' ', '"', '!', '#', '$', '%', '&', '\'', '(', ')', '*', '+', + ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', + 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', + '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', 0, 0}; +/* map the ASCII codes of the essential keys for BASIC of a + * German keyboard, most notable is < and > which is ö/a + */ +char usbkeymapGerman[] = +{' ', '!', '!', '#', '$', '%', '/', '>', ')', '=', '(', '+', + ',', '-', '.', '-', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', '<', ';', '=', ':', '_', '"', 'A', 'B', 'C', + 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Z', 'Y', '[', + '#', '+', '&', '?', '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'z', 'y', '{', '\'', '*', 0, 0}; + +/* + * he weak functions from the keyboard controller class implemented + */ +void keyPressed() {} +void keyReleased() { + switch (keyboard.getOemKey()) { + case 40: + usbkey=10; + break; + case 42: + case 76: + usbkey=127; + break; + case 41: + usbkey=27; + break; + default: + usbkey=keyboard.getKey(); + if (usbkey>31 && usbkey<128) usbkey=usbkeymapGerman[usbkey-32]; + } +} +#endif + +/* + * keyboard controller code + */ + +void kbdbegin() { +#ifdef PS2KEYBOARD + keyboard.begin(PS2DATAPIN, PS2IRQPIN, PS2Keymap_German); +#else +#ifdef PS2FABLIB + PS2Controller.begin(PS2Preset::KeyboardPort0); + PS2Controller.keyboard()->setLayout(&fabgl::GermanLayout); +#else +#ifdef USBKEYBOARD +/* nothing to be done here */ +#else +#ifdef ZX81KEYBOARD + keyboard.begin(zx81pins); +#endif +#endif +#endif +#endif +} + +int kbdstat(char c) {return 0; } + +char kbdavailable(){ +#ifdef PS2KEYBOARD + return keyboard.available(); +#else +#ifdef PS2FABLIB + if (fabgllastchar) return Terminal.available()+1; else return Terminal.available(); +#else +#ifdef USBKEYBOARD +/* if we already have a key, tell the caller we have one */ + if (usbkey) return 1; +/* if not, look it up */ + if (usbkey) return 1; else return 0; +#else +#ifdef ZX81KEYBOARD + return keyboard.available(); +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD +/* a poor man's debouncer, unstable state returns 0 */ + char c=keypadread(); + if (c != 0) { + bdelay(2); + if (c == keypadread()) return 1; + } +#endif + return 0; +} + +char kbdread() { + char c = 0; + while(!kbdavailable()) byield(); +#ifdef PS2KEYBOARD + c=keyboard.read(); +#endif +#ifdef PS2FABLIB + if (fabgllastchar) { c=fabgllastchar; fabgllastchar=0; } + else c=Terminal.read(); +#else +#ifdef USBKEYBOARD +/* if we have read a key before, return it else look it up */ + c=usbkey; + usbkey=0; +#else +#ifdef ZX81KEYBOARD + c=keyboard.read(); +#endif +#endif +#endif +#ifdef HASKEYPAD + if (c == 0) { /* we have no character from a real keyboard, ask the keypad */ + c=keypadread(); +/* if the keypad is in non repeat mode, block */ + if (!kbdrepeat) while(kbdavailable()) byield(); + } +#endif + if (c == 13) c=10; + return c; +} + +char kbdcheckch() { +#ifdef PS2KEYBOARD +/* + * only works with the patched library https://github.com/slviajero/PS2Keyboard + */ +#ifdef PS2KEYBOARD_HASPEEK + return keyboard.peek(); +#else +/* + * for the original library https://github.com/PaulStoffregen/PS2Keyboard + * GET does not work properly with it as there is no peek functionality which is needed + * for non blocking IO and the ability to stop programs + */ + if (kbdavailable()) return kbdread(); else return 0; +#endif +#else +#ifdef PS2FABLIB + if (fabgllastchar) return fabgllastchar; + if (kbdavailable()) { fabgllastchar=Terminal.read(); return fabgllastchar; } +#else +#ifdef USBKEYBOARD + return usbkey; +#else +#ifdef ZX81KEYBOARD + return keyboard.lastKey; /* dont peek here as checkch called in a fast loop in statement(), peek done in byield*/ +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD + return keypadread(); +#endif + return 0; +} + +/* + * this is a generic display code + * it combines the functions of LCD and TFT drivers + * if this code is active + * + * dspprintchar(char c, short col, short row) + * dspclear() + * dspbegin() + * dspupdate() + * dspsetcursor(mem_t c) + * dspsetfgcolor(address_t c) + * void dspsetbgcolor(address_t c) + * void dspsetreverse(mem_t c) + * mem_t dspident() + * + * have to be defined before in a hardware dependent section. + * Only dspprintchar and dspclear are needed, all other can be stubs + * + * VGA systems don't use the display driver for text based output. + * + * The display driver exists as a buffered version that can scroll + * or an unbuffered version that cannot scroll. Interfaces to hardware + * scrolling are not yet implemented. + * + * A VT52 state engine is implemented and works for buffered and + * unbuffered displays. Only buffered displays have the full VT52 + * feature set including most of the GEMDOS extensions described here: + * https://en.wikipedia.org/wiki/VT52 + * + * dspupdatemode controls the page update behaviour + * 0: character mode, display each character separately + * 1: line mode, update the display after each line + * 2: page mode, update the display after an ETX + * ignored if the display has no update function + * + */ + +#ifdef DISPLAYDRIVER + +/* the cursor position */ +mem_t dspmycol = 0; +mem_t dspmyrow = 0; + +/* the escape state of the vt52 terminal */ +mem_t dspesc = 0; + +/* which update mode do we have */ +mem_t dspupdatemode = 0; + +/* how do we handle wrap 0 is wrap, 1 is no wrap */ +mem_t dspwrap = 0; + +/* the print mode */ +mem_t dspprintmode = 0; + +/* the scroll control variables */ +mem_t dspscrollmode = 0; +mem_t dsp_scroll_rows = 1; + +int dspstat(char c) { return 0; } + +void dspsetcursorx(mem_t c) { + if (c>=0 && c=0 && r=0 && i<=dsp_columns*dsp_rows-1) return dspbuffer[i/dsp_columns][i%dsp_columns]; else return 0; +} + +dspbuffer_t dspgetrc(mem_t r, mem_t c) { return dspbuffer[r][c]; } + +dspbuffer_t dspgetc(mem_t c) { return dspbuffer[dspmyrow][c]; } + +/* this functions prints a character and updates the display buffer */ +void dspsetxy(dspbuffer_t ch, mem_t c, mem_t r) { + if (r>=0 && c>=0 && r> 8) & 15); + dspprintchar(b & charmask, c, r); + dsprestorepen(); +#else + dspprintchar(b, c, r); +#endif + } else { + dspprintchar(' ', c, r); + } + } + dspbuffer[r][c]=b; + } + } + +/* delete the characters in the remaining lines */ + for (r=dsp_rows-scroll_rows; rline; r--) { + for (c=0; c> 8) & 15); + dspprintchar(b & charmask, c, r); + dsprestorepen(); +#else + dspprintchar(b, c, r); +#endif + } else { + dspprintchar(' ', c, r); + } + } + dspbuffer[r][c]=b; + } + } + +/* delete the characters in the remaining line */ + for (c=0; c= dsp_rows) dspscroll(dsp_scroll_rows); + dspmycol=0; + if (dspupdatemode == 1) dspupdate(); + return; + case 11: // vertical tab - converted to line feed without carriage return + if (dspmyrow < dsp_rows-1) dspmyrow++; + return; + case 12: // form feed is clear screen plus home + dspbufferclear(); + dspclear(); + return; + case 13: // classical carriage return, no form feed + dspmycol=0; + return; + case 27: // escape - initiate vtxxx mode + dspesc=1; + return; + case 28: // cursor back - this is what terminal applications send for cursor back + if (dspmycol > 0) dspmycol--; + return; + case 29: // cursor forward - this is what terminal applications send for cursor back + if (dspmycol < dsp_columns-1) dspmycol++; + return; + case 8: // back space is delete the moment + case 127: // delete + if (dspmycol > 0) { + dspmycol--; + dspsetxy(0, dspmycol, dspmyrow); + } + return; + case 2: // we abuse start of text as a home sequence, may also be needed for Epaper later + dspmycol=dspmyrow=0; + return; + case 3: // ETX = Update display for buffered display like Epaper + dspupdate(); + return; + default: // eliminate all non printables - problematic for LCD special character + if (c<32) return; + break; + } + + dspsetxy(c, dspmycol, dspmyrow); + dspmycol++; + if (dspmycol == dsp_columns) { + if (!dspwrap) { /* we simply ignore the cursor */ + dspmycol=0; + dspmyrow=(dspmyrow + 1); + } + if (dspmyrow >= dsp_rows) dspscroll(dsp_scroll_rows); + } + if (dspupdatemode == 0) dspupdate(); +} + +/* + * This is the minimalistic VT52 state engine. It is an interface to + * process single byte control sequences of the form char + */ + +#ifdef HASVT52 +/* the state variable */ +char vt52s = 0; + +/* the graphics mode mode - unused so far */ +mem_t vt52graph = 0; + +/* the secondary cursor */ +mem_t vt52mycol = 0; +mem_t vt52myrow = 0; + +/* temp variables for column and row , do them here and not in the case: guess why */ +mem_t vt52tmpr; +mem_t vt52tmpc; + +/* an output buffer for the vt52 terminal */ +const mem_t vt52buffersize = 4; +char vt52outbuffer[vt52buffersize] = { 0, 0, 0, 0 }; +mem_t vt52bi = 0; +mem_t vt52bj = 0; + +/* the reader from the buffer */ +char vt52read() { + if (vt52bi<=vt52bj) { vt52bi = 0; vt52bj = 0; } /* empty, reset */ + if (vt52bi>vt52bj) return vt52outbuffer[vt52bj++]; + return 0; +} + +/* the avail from the buffer */ +mem_t vt52avail() { return vt52bi-vt52bj; } + +/* putting something into the buffer */ +void vt52push(char c) { + if (vt52bi < vt52buffersize) vt52outbuffer[vt52bi++]=c; +} + +/* clear the buffer */ +void vt52clear() { + vt52bi=0; +} + +/* something little */ +uint8_t vt52number(char c) { + uint8_t b=c; + if (b>31) return b-32; else return 0; +} + +/* + * The VT52 data registers for the graphics and wiring extension. + * x,y are 14 bit and z is 7bit. Data is transferred in VT52 style + * -> numerical value plus 32 to map the data to printable characters + * Access is done through the the ESC x, ESC y and ESC z sequences: + * ESC x #1 #2 + * sets the xregister to (#1-32)+(#2-32)*128 + */ + +#if defined(DISPLAYHASGRAPH) || defined(VT52WIRING) +#define VT52HASREGISTERS +/* the three register variables */ +uint16_t vt52regx = 0; +uint16_t vt52regy = 0; +uint8_t vt52regz = 0; + +/* one argument cache for two byte arguments */ +uint8_t vt52arg = 0; +#endif + +/* + * graphics code in VT52, if you want to control graphics from the character stream + * The ESC g sequence sends a graphics command as the second byte after the g + * + * Valid values for g are + * s: set the graphics cursor + * p: plot a point + * l: draw a line + * L: draw a line and move the cursor to the endpoint + * r: draw a rectangle + * R: draw a filled rectangle + * c: draw a circle + * C: draw a filled circle + * + */ +#ifdef DISPLAYHASGRAPH +/* the grahics cursor of VT52 */ +uint16_t vt52graphx = 0; +uint16_t vt52graphy = 0; + +/* execute one graphics command */ +void vt52graphcommand(uint8_t c) { + switch(c) { + case 's': /* set the cursor */ + vt52graphx=vt52regx; + vt52graphy=vt52regy; + break; + case 'p': /* plot a point at the cursor */ + plot(vt52graphx, vt52graphy); + break; + case 'l': /* plot a line */ + line(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'L': /* plot a line and update the cursor, needed for drawing shapes */ + line(vt52graphx, vt52graphy, vt52regx, vt52regy); + vt52graphx=vt52regx; + vt52graphy=vt52regy; + break; + case 'r': /* plot a rectangle */ + rect(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'c': /* plot a circle */ + circle(vt52graphx, vt52graphy, vt52regx); + break; + case 'R': /* plot a filled rectangle */ + frect(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'C': /* plot a filled circle */ + fcircle(vt52graphx, vt52graphy, vt52regx); + break; + } +} +#endif + +/* + * this is an odd part of the vt52 code with this, the terminal + * can control the digital and analog pins. + * it is meant for situations where the terminal is controlled by a (powerful) + * device with no or very few I/O pins. It can use the pins of the Arduino through + * the terminal. This works as long as everything stays within the terminals timescale + * On a 9600 baud interface, the character processing time is 1ms, everything slower + * than approximately 10ms can be done through the serial line. + */ + +#ifdef VT52WIRING +#define VT52HASREGISTERS + void vt52wiringcommand(uint8_t c) { + switch(c) { + case 'p': /* pinMode z */ + pinMode(vt52regz); + break; + case 'l': /* digital write low pin z*/ + digitalWrite(vt52regz, LOW); + break; + case 'h': /* digital write high pin z*/ + digitalWrite(vt52regz, HIGH); + break; + case 'r': /* digital read from pin z */ + vt52push(digitalRead(vt52regz)+32); + break; + case 'a': /* analog write pin z to value x */ + analogWrite(vt52regz, vt52regx); + break; + case 'A': /* analog read from pin z */ + break; + case 't': /* tone at pin z, frequency x, duration y */ + tone(vt52regz, vt52regx, vt52regy); + break; + } + } +#endif + + +/* vt52 state engine */ +void dspvt52(char* c){ + +/* reading and processing multi byte commands */ + switch (vt52s) { + case 'Y': + if (dspesc == 2) { + dspsetcursory(vt52number(*c)); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + dspsetcursorx(vt52number(*c)); + *c=0; + } + vt52s=0; + break; + case 'b': + dspsetfgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + case 'c': + dspsetbgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; +#ifdef VT52HASREGISTERS + case 'x': + if (dspesc == 2) { + vt52arg=vt52number(*c); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + vt52regx=vt52arg+vt52number(*c)*128; + *c=0; + } + vt52s=0; + break; + case 'y': + if (dspesc == 2) { + vt52arg=vt52number(*c); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + vt52regy=vt52arg+vt52number(*c)*127; + *c=0; + } + vt52s=0; + break; + case 'z': + vt52regz=vt52number(*c); + *c=0; + vt52s=0; + break; +#endif +#ifdef DISPLAYHASGRAPH + case 'g': + vt52graphcommand(*c); + *c=0; + vt52s=0; + break; +#endif +#ifdef VT52WIRING + case 'a': + vt52wiringcommand(*c); + *c=0; + vt52s=0; + break; +#endif + } + +/* commands of the terminal in text mode */ + + switch (*c) { + case 'v': /* GEMDOS / TOS extension enable wrap */ + dspwrap=0; + break; + case 'w': /* GEMDOS / TOS extension disable wrap */ + dspwrap=1; + break; + case '^': /* Printer extensions - print on */ + dspprintmode=1; + break; + case '_': /* Printer extensions - print off */ + dspprintmode=0; + break; + case 'W': /* Printer extensions - print without display on */ + dspprintmode=2; + break; + case 'X': /* Printer extensions - print without display off */ + dspprintmode=0; + break; + case 'V': /* Printer extensions - print cursor line */ +#if defined(ARDUINOPRT) && defined(DISPLAYCANSCROLL) + for (mem_t i=0; i': // alternate keypad off + break; + case 'b': // GEMDOS / TOS extension text color + case 'c': // GEMDOS / TOS extension background color + vt52s=*c; + dspesc=1; + *c=0; + return; + case 'e': // GEMDOS / TOS extension enable cursor + dspsetcursor(1); + break; + case 'f': // GEMDOS / TOS extension disable cursor + dspsetcursor(0); + break; + case 'p': // GEMDOS / TOS extension reverse video + dspsetreverse(1); + break; + case 'q': // GEMDOS / TOS extension normal video + dspsetreverse(0); + break; + case 'A': // cursor up + if (dspmyrow>0) dspmyrow--; + break; + case 'B': // cursor down + if (dspmyrow < dsp_rows-1) dspmyrow++; + break; + case 'C': // cursor right + if (dspmycol < dsp_columns-1) dspmycol++; + break; + case 'D': // cursor left + if (dspmycol>0) dspmycol--; + break; + case 'E': // GEMDOS / TOS extension clear screen + dspbufferclear(); + dspclear(); + break; + case 'H': // cursor home + dspmyrow=dspmycol=0; + break; + case 'Y': // Set cursor position + vt52s='Y'; + dspesc=2; + *c=0; + return; + case 'J': // clear to end of screen + for (int i=dspmycol+dsp_columns*dspmyrow; i0) dspmyrow--; else dspreversescroll(0); + break; + case 'L': // Insert line + dspreversescroll(dspmyrow); + break; + case 'M': + vt52tmpr = dspmyrow; + vt52tmpc = dspmycol; + dspscroll(1, dspmyrow); + dspmyrow=vt52tmpr; + dspmycol=vt52tmpc; + break; +#ifdef VT52REGISTERS + case 'x': // set the x register + case 'y': // set the y register + vt52s=*c; + dspesc=2; + *c=0; + return; + case 'z': // set the z register + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif +#ifdef DISPLAYHASGRAPH + case 'g': // execute a graphics command + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif +#ifdef VT52WIRING + case 'a': + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif + } + dspesc=0; + *c=0; +} +#endif + +#else +#ifdef GRAPHDISPLAYDRIVER +/* a super simple display driver for graphics only systems, only handles drawing + and graphics cursor stuff, experimental for epapers */ +#undef HASVT52 +#define GBUFFERSIZE 80 +static char gbuffer[GBUFFERSIZE]; +void dspouts(char* s, address_t l) { + int i; + for (i=0; i> 4) & 0b00000111) * 10; + case 2: + return (v & 0b00001111)+((v >> 4) & 0b00000011) * 10 ; /* only 24 hour support */ + case 3: + return (v & 0b00001111); + case 4: + return (v & 0b00001111) + ((v >> 4) & 0b00000011) * 10; + case 5: + return (v & 0b00001111) + ((v >> 4) & 0b00000001) * 10; + case 6: + return (v & 0b00001111) + (v >> 4) * 10; + default: + return v; + } +} + +/* set the registers */ +void rtcset(uint8_t i, short v) { + uint8_t b; + + /* to bcd if we deal with a clock byte (0-6) */ + if (i<7) b=(v%10 + ((v/10) << 4)); else b=v; + + switch (i) { + case 0: + case 1: + b = b & 0b01111111; + break; + case 2: + case 4: + b = b & 0b00111111; /* only 24 hour support */ + break; + case 3: + b = b & 0b00000111; + break; + case 5: + b = b & 0b00011111; + } + +/* send the address and then the byte */ + Wire.beginTransmission(RTCI2CADDR); + Wire.write(i); + Wire.write(b); + Wire.endTransmission(); +} +#else +#if defined(HASBUILTINRTC) +#define HASCLOCK +/* + * Built-in clocks of STM32 and MKR are based on the RTCZero interface + * an rtc object is created after loading the libraries + * for NRENESAs the interface is slightly different + */ +#ifndef ARDUINO_ARCH_RENESAS +/* begin method */ +void rtcbegin() { + rtc.begin(); /* 24 hours mode */ +} + +/* get the time */ +short rtcget(short i) { + switch (i) { + case 0: + return rtc.getSeconds(); + case 1: + return rtc.getMinutes(); + case 2: + return rtc.getHours(); + case 3: + // return rtc.getWeekDay(); + return 0; + case 4: + return rtc.getDay(); + case 5: + return rtc.getMonth(); + case 6: + return rtc.getYear(); + default: + return 0; + } +} + +/* set the time */ +void rtcset(uint8_t i, short v) { + switch (i) { + case 0: + rtc.setSeconds(v); + break; + case 1: + rtc.setMinutes(v); + break; + case 2: + rtc.setHours(v); + break; + case 3: + // rtc.setWeekDay(v); + break; + case 4: + rtc.setDay(v); + break; + case 5: + rtc.setMonth(v); + break; + case 6: + rtc.setYear(v); + break; + default: + return; + } +} +#else +/* NRENESA code, interface different to my great ennui! */ +/* begin method */ +void rtcbegin() { + RTC.begin(); /* 24 hours mode */ +} + +/* get the time */ +short rtcget(short i) { + RTC.getTime(rtc); + switch (i) { + case 0: + return rtc.getSeconds(); + case 1: + return rtc.getMinutes(); + case 2: + return rtc.getHour(); + case 3: + return static_cast(rtc.getDayOfWeek()); + case 4: + return rtc.getDayOfMonth(); + case 5: + return Month2int(rtc.getMonth()); + case 6: + return rtc.getYear(); + default: + return 0; + } +} + +/* set the time */ +void rtcset(uint8_t i, short v) { + RTC.getTime(rtc); + switch (i) { + case 0: + rtc.setSecond(v); + break; + case 1: + rtc.setMinute(v); + break; + case 2: + rtc.setHour(v); + break; + case 3: + rtc.setDayOfWeek(static_cast(v)); + break; + case 4: + rtc.setDayOfMonth(v); + break; + case 5: + rtc.setMonthOfYear(static_cast(v-1)); + break; + case 6: + rtc.setYear(v); + break; + default: + return; + } + RTC.setTime(rtc); +} +#endif +#else +#ifdef ARDUINORTCEMULATION +#define HASCLOCK +/* + * A millis() based real time clock emulation. It creates a 32bit Unix time + * variable and adds millis()/1000 + */ + +/* the begin method - standard interface to BASIC*/ +void rtcbegin() {} + +/* the current unix time - initialized to the begin of the epoch */ +long rtcutime = 0; + +/* the offset of millis()/1000 when we last set the clock */ +long rtcutimeoffset = 0; + +/* the current unix date - initialized to the begin of the epoch */ +struct { uint8_t second; uint8_t minute; uint8_t hour; uint8_t weekday; uint8_t day; uint8_t month; uint16_t year; } + rtctime = { 0, 0, 0, 4, 1, 1, 1970 }; + +/* the number of days per month */ +const int rtcmonthdays[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; + + +/* convert the time to a unix time number from https://de.wikipedia.org/wiki/Unixzeit */ +void rtctimetoutime() { + int leapyear = ((rtctime.year-1)-1968)/4 - ((rtctime.year-1)-1900)/100 + ((rtctime.year-1)-1600)/400; + long epochdays = (rtctime.year-1970)*365 + leapyear + rtcmonthdays[rtctime.month-1] + rtctime.day - 1; + if ((rtctime.month > 2) && (rtctime.year%4 == 0 && (rtctime.year%100 != 0 || rtctime.year%400 == 0))) epochdays+=1; + rtcutime = rtctime.second + 60*(rtctime.minute + 60*(rtctime.hour + 24*epochdays)); +} + +/* convert the unix time to time and date from https://de.wikipedia.org/wiki/Unixzeit */ +void rtcutimetotime() { + const unsigned long int secondsperday = 86400ul; /* 24* 60 * 60 */ + const unsigned long int daysperyear = 365ul; /* no leap year */ + const unsigned long int daysinfoury = 1461ul; /* 4*365 + 1 */ + const unsigned long int daysinhundredy = 36524ul; /* 100*365 + 25 - 1 */ + const unsigned long int daysinfourhundredy = 146097ul; /* 400*365 + 100 - 4 + 1 */ + const unsigned long int daynumberzero = 719468ul; /* day number of March, 1 1970 */ + + unsigned long int daynumber = daynumberzero + rtcutime/secondsperday; + unsigned long int secondssincemidnight = rtcutime%secondsperday; + unsigned long int temp; + + /* the weekday is based in the daynumber since March, 1, 1970 a SUNDAY */ + rtctime.weekday = daynumber % 7; + + /* leap years of the Gregorian calendar */ + temp = 4 * (daynumber + daysinhundredy + 1) / daysinfourhundredy - 1; + rtctime.year = 100 * temp; + daynumber -= daysinhundredy * temp + temp / 4; + + /* leap years of the Julian calendar */ + temp = 4 * (daynumber + daysperyear + 1) / daysinfoury - 1; + rtctime.year += temp; + daynumber -= daysperyear * temp + temp / 4; + + /* calculate day and month, reference March 1 */ + rtctime.month = (5 * daynumber + 2) / 153; + rtctime.day = daynumber - (rtctime.month * 153 + 2) / 5 + 1; + + /* recalulate to a normal year */ + rtctime.month += 3; + if (rtctime.month > 12) { + rtctime.month -= 12; + rtctime.year++; + } + + /* calculate hours, months, seconds */ + rtctime.hour = secondssincemidnight / 3600; + rtctime.minute = secondssincemidnight % 3600 / 60; + rtctime.second = secondssincemidnight % 60; +} + +/* get the time elements -> standard interface to BASIC */ +short rtcget(short i) { +/* add to the last time we set the clock and subtract the offset*/ + rtcutime = millis()/1000 + rtcutimeoffset; +/* calulate the time data */ + rtcutimetotime(); + + switch (i) { + case 0: + return rtctime.second; + case 1: + return rtctime.minute; + case 2: + return rtctime.hour; + case 3: + return rtctime.weekday; + case 4: + return rtctime.day; + case 5: + return rtctime.month; + case 6: + return rtctime.year; + default: + return 0; + } +} + +/* set the time elements -> standard interface to BASIC */ +void rtcset(uint8_t i, short v) { +/* how much time has elapsed since we last set the clock */ + rtcutime = millis()/1000 + rtcutimeoffset; + +/* generate the time structure */ + rtcutimetotime(); + +/* set the clock */ + switch (i) { + case 0: + if (v>=0 && v<60) rtctime.second=v; + break; + case 1: + if (v>=0 && v<60) rtctime.minute=v; + break; + case 2: + if (v>=0 && v<24) rtctime.hour=v; + break; + case 3: + if (v>=0 && v<7) rtctime.weekday=v; + break; + case 4: + if (v>0 && v<32) rtctime.day=v; + break; + case 5: + if (v>0 && v<13) rtctime.month=v; + break; + case 6: + if (v>=1970 && v<2100) rtctime.year=v; + break; + default: + return; + } + + /* recalulate the right offset by first finding the second value of the new date*/ + rtctimetoutime(); + +/* remember when we set the clock */ + rtcutimeoffset = rtcutime - millis()/1000; +} +#else +#if defined(ARDUINO_ARCH_ESP32) +#define HASCLOCK +/* + * On ESP32 we use the builtin clock, this is a generic Unix time mechanism equivalent + * to the code in hardware-posix.h + */ + +/* no begin needed */ +void rtcbegin() {} + +/* get the time */ +short rtcget(short i) { + struct tm rtctime; + time_t now; + time(&now); + localtime_r(&now, &rtctime); + + switch (i) { + case 0: + return rtctime.tm_sec; + case 1: + return rtctime.tm_min; + case 2: + return rtctime.tm_hour; + case 3: + return rtctime.tm_wday; + case 4: + return rtctime.tm_mday; + case 5: + return rtctime.tm_mon+1; + case 6: + if (rtctime.tm_year > 100) return rtctime.tm_year-100; else return rtctime.tm_year; + default: + return 0; + } + + return 0; +} + +/* set the time */ +void rtcset(uint8_t i, short v) { + struct tm rtctime; + struct timeval tv; + + /* get the time stucture from the system */ + time_t now; + time(&now); + localtime_r(&now, &rtctime); + + /* change what needs to be changed */ + switch (i) { + case 0: + rtctime.tm_sec = v%60; + break; + case 1: + rtctime.tm_min = v%60; + break; + case 2: + rtctime.tm_hour = v%24; + break; + case 3: + rtctime.tm_wday = v%7; + break; + case 4: + rtctime.tm_mday = v; + break; + case 5: + rtctime.tm_mon = v-1; + break; + case 6: + if (v > 1900) v=v-1900; /* get years to the right value */ + if (v < 50) v=v+100; + rtctime.tm_year = v; + break; + } + + /* calculate the seconds and put it back*/ + time_t epocht = mktime(&rtctime); + if (epocht > 2082758399){ + tv.tv_sec = epocht - 2082758399; + } else { + tv.tv_sec = epocht; + } + tv.tv_usec = 0; + settimeofday(&tv, NULL); +} +#else +/* no clock at all, no operations */ +void rtcbegin() {} +short rtcget(short i) { return 0; } +void rtcset(uint8_t i, short v) { } +#endif +#endif +#endif +#endif + +/* + * External EEPROM is handled through an EFS filesystem object + * see https://github.com/slviajero/EepromFS + * for details. Here the most common parameters are set as a default. +*/ +#ifdef ARDUINOEFS +#undef ARDUINOI2CEEPROM +#ifndef EFSEEPROMADDR +#define EFSEEPROMADDR 0x50 +#endif +#ifdef EFSEEPROMSIZE +EepromFS EFS(EFSEEPROMADDR, EFSEEPROMSIZE); +#else +EepromFS EFS(EFSEEPROMADDR); +#endif +#endif + +/* + * External EEPROM is handled through an EFS filesystem object in raw mode + * see https://github.com/slviajero/EepromFS + * for details. Here the most common parameters are set as a default. +*/ + +#if defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED) +#ifndef I2CEEPROMADDR +#define I2CEEPROMADDR 0x50 +#endif +#ifdef I2CEEPROMSIZE +EepromFS EFSRAW(I2CEEPROMADDR, I2CEEPROMSIZE); +#else +EepromFS EFSRAW(I2CEEPROMADDR); +#endif +#endif + +/* + * definitions for ESP Wifi and MQTT, super experimental. + * As networking is only used for MQTT at the moment, + * mqtt, Wifi and Ethernet comes all in one. + * + * No encryption/authetication is implemented in MQTT. + * Only public, open servers can be used. + * + * MQTT topics can only be 32 bytes long. + * Buffered incoming and outgoing messages can be 128 bytes + * per default. + * + * wifisettings.h is the generic network definition file + * all network settings are compiled into the code + * BASIC cannot change them at runtime. + */ +#ifdef ARDUINOMQTT +#include "wifisettings.h" +#ifdef ARDUINOETH +EthernetClient bethclient; +PubSubClient bmqtt(bethclient); +#else +WiFiClient bwifi; +PubSubClient bmqtt(bwifi); +#endif + +/* the buffers of the outgoing and incoming MQTT topic */ +#define MQTTLENGTH 32 +static char mqtt_otopic[MQTTLENGTH]; +static char mqtt_itopic[MQTTLENGTH]; + +/* + * the buffers for MQTT messages, input and output goes + * through these static buffers. + */ +#define MQTTBLENGTH 128 +volatile char mqtt_buffer[MQTTBLENGTH]; +volatile short mqtt_messagelength; +volatile char mqtt_obuffer[MQTTBLENGTH]; +volatile short mqtt_charsforsend; + +/* the name of the client, generated pseudo randomly to avoind + naming conflicts */ +static char mqttname[12] = "iotbasicxxx"; +void mqttsetname() { + long m = millis(); + mqttname[8]=(char)(65+m%26); + m=m/26; + mqttname[9]=(char)(65+m%26); + m=m/26; + mqttname[10]=(char)(65+m%26); +} + +/* + * network begin method + * needs the settings from wifisettings.h + * + * Default is right now that Wifi is started at boot + * This may change in the future. + * + * Ethernet begin has to be reviewed to avoid DHCP + * start timeout if network is not connected + */ +void netbegin() { +#ifdef ARDUINOETH +#ifdef ETHPIN + Ethernet.init(ETHPIN); +#endif + Ethernet.begin(mac); +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.mode(WIFI_STA); + WiFi.begin(ssid, password); + WiFi.setAutoReconnect(1); +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) + WiFi.begin(ssid, password); +#endif +#endif +} + +/* + * network stop methode, needed sometime to reinit networking + * completely or to save power + * + */ +void netstop() { +#ifdef ARDUINOETH +/* to be done */ +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.mode(WIFI_OFF); +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) + WiFi.end(); +#endif +#endif +} + +/* + * network reconnect methode + * + */ +void netreconnect() { +#ifdef ARDUINOETH +/* */ +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.reconnect(); + bdelay(1000); +#elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) + WiFi.end(); + WiFi.begin(ssid, password); + bdelay(1000); +#endif +#endif +} + +/* + * network connected method + * on ESP Wifi try to reconnect, the delay is odd + * This is a partial reconnect, BASIC needs to handle + * repeated reconnects + */ +char netconnected() { +#ifdef ARDUINOETH + return bethclient.connected(); +#else + return(WiFi.status() == WL_CONNECTED); +#endif +} + +/* + * mqtt callback function, using the byte type here + * because payload can be binary - interface to BASIC + * strings need to be done + * + * mqtt event handling in BASIC can be triggered here + */ +void mqttcallback(char* t, byte* p, unsigned int l) { + short i; + mqtt_messagelength=l; + for(i=0; i MQTTBLENGTH) { + if (!mqttreconnect()) {ert=1; return;}; + if (!bmqtt.publish(mqtt_otopic, (uint8_t*) mqtt_obuffer, (unsigned int) mqtt_charsforsend-1, false)) ert=1; + mqtt_charsforsend=0; + } +} + +/* + * ins copies the buffer into a basic string + * - behold the jabberwock - length gynmastics + * z.a has to be the loop variable and contain the length after this -> intended side effect + */ +void mqttins(char *b, short nb) { + for (z.a=0; z.a0) { + ch=mqtt_buffer[0]; + for (i=0; i= 0 && v<256) analogWrite(p, v); + else error(EORANGE); +} + +void dwrite(address_t p, address_t v){ + if (v == 0) digitalWrite(p, LOW); + else if (v == 1) digitalWrite(p, HIGH); + else error(EORANGE); +} + +/* we normalize the pinMode as ESP32, ESP8266, and other boards behave rather + * differently. Following Arduino conventions we map 0 always to INPUT + * and 1 always to OUTPUT, all the other numbers are passed through to the HAL + * layer of the platform. + * Example: OUTPUT on ESP32 is 3 and 1 is assigned to INPUT. + * XMC also needs special treatment here. + */ +void pinm(address_t p, address_t m){ + uint8_t ml = m; + uint8_t pl = p; + switch (ml) { + case 0: + pinMode(pl, INPUT); + break; + case 1: + pinMode(pl, OUTPUT); + break; + default: + pinMode(pl, ml); + break; + } +} + +/* read a pulse, units given by bpulseunit - default 10 microseconds */ +void bpulsein() { + address_t x,y; + unsigned long t, pt; + + t=((unsigned long) pop())*1000; + y=popaddress(); + x=popaddress(); + if (er != 0) return; + + pt=pulseIn(x, y, t)/bpulseunit; + push(pt); +} + +/* write a pulse in microsecond range */ +void bpulseout(short a) { + short pin, duration; + short value = 1; + short intervall = 0; + short repetition = 1; + if (a == 5) { intervall=pop(); repetition=pop(); } + if (a > 2) value=pop(); + duration=pop(); + pin=pop(); + + while (repetition--) { + digitalWrite(pin, value); + delayMicroseconds(duration*bpulseunit); + digitalWrite(pin, !value); + delayMicroseconds(intervall*bpulseunit); + } +} + +void btone(short a) { + number_t d = 0; + number_t v = 100; + if (a == 4) v=pop(); + if (a >= 3) d=pop(); + x=pop(); + y=pop(); +#if defined(ARDUINO_TTGO_T7_V14_Mini32) && defined(HASTONE) +/* fabGL soundgenerator code of suggestes by testerrossa + * pin numbers below 128 are real arduino pins while + * pin numvers from 128 onwards are sound generator capabilities + * this is different from the original code + * + * Sound generator capabilities are numbered as follows + * 128: Sine wave + * 129: Symmetric square wave + * 130: Sawtooth + * 131: Triangle + * 132: VIC noise + * 133: noise + * + * 256-511: square wave with variable duty cycle + * + */ + if (x == 0) { + soundGenerator.play(false); + soundGenerator.clear(); + return; + } + if (a == 2) d=60000; + if (y == 128) soundGenerator.playSound(SineWaveformGenerator(), x, d, v); + if (y == 129) soundGenerator.playSound(SquareWaveformGenerator(), x, d, v); + if (y == 130) soundGenerator.playSound(SawtoothWaveformGenerator(), x, d, v); + if (y == 131) soundGenerator.playSound(TriangleWaveformGenerator(), x, d, v); + if (y == 132) soundGenerator.playSound(VICNoiseGenerator(), x, d, v); + if (y == 133) soundGenerator.playSound(NoiseWaveformGenerator(), x, d, v); + if (y >= 255 && y < 512 ) { + y=y-255; + SquareWaveformGenerator sqw; + sqw.setDutyCycle(y); + soundGenerator.playSound(sqw, x, d, v); + } + return; +#endif + +#ifndef ARDUINOTONEEMULATION + if (x == 0) { + noTone(y); + } else if (a == 2) { + tone(y, x); + } else { + tone(y, x, d); + } +#else + if (x == 0) { + playtone(0, 0, 0); + } else if (a == 2) { + playtone(y, x, 32767); + } else { + playtone(y, x, d); + } +#endif +} + +/* + * the byield function is called after every statement + * it allows two levels of background tasks. + * + * BASICBGTASK controls if time for background tasks is + * needed, usually set by hardware features + * + * YIELDINTERVAL by default is 32, generating a 32 ms call + * to the network loop function. YIELDTIME is 2 generating + * a 2 ms wait after the network loop to allow for buffer + * clearing after - this is needed on ESP8266 + * + * LONGYIELDINTERVAL by default is 1000, generating a one second + * call to maintenance functions. + * + * On an ESP8266 byield() is called every 100 microseconds + * (after each statement) in RUN mode. BASIC DELAY calls + * this every YIELDTIME ms. + */ + +/* everything that needs to be done often - 32 ms */ +void yieldfunction() { +#ifdef ARDUINOMQTT + bmqtt.loop(); +#endif +#ifdef ARDUINOUSBKBD + usb.Task(); +#endif +#ifdef ARDUINOZX81KBD + (void) keyboard.peek(); /* scan once and set lastkey properly every 32 ms */ +#endif +/* this was delay(YIELDTIME) originally - removed now */ +} + +/* everything that needs to be done not so often - 1 second */ +void longyieldfunction() { +#ifdef ARDUINOETH + Ethernet.maintain(); +#endif +} + +void yieldschedule() { +/* delay(0) is only needed on ESP8266! it calls the scheduler - no bdelay here!! */ + #if defined(ARDUINO_ARCH_ESP8266) + delay(0); + #endif + } + +/* + * The file system driver - all methods needed to support BASIC fs access + * Different filesystems need different prefixes and fs objects, these + * filesystems use the stream API + */ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) +File ifile; +File ofile; +char tempname[SBUFSIZE]; +#if defined(ARDUINOSD) || defined(STM32SDIO) +File root; +File file; +#ifdef ARDUINO_ARCH_ESP32 +const char rootfsprefix[2] = "/"; +#else +const char rootfsprefix[1] = ""; +#endif +#endif +#ifdef ESPSPIFFS +const char rootfsprefix[2] = "/"; +#ifdef ARDUINO_ARCH_ESP8266 +Dir root; +File file; +#endif +#ifdef ARDUINO_ARCH_ESP32 +File root; +File file; +#endif +#endif +#ifdef ARDUINO_ARCH_ESP8266 +#define FILE_OWRITE (sdfat::O_READ | sdfat::O_WRITE | sdfat::O_CREAT | sdfat::O_TRUNC) +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_STM32) +#define FILE_OWRITE FILE_WRITE +#else +#define FILE_OWRITE (O_READ | O_WRITE | O_CREAT | O_TRUNC) +#endif +#endif +#endif + +/* using the POSIX API in LittleFS */ +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +FILE* ifile; +FILE* ofile; +DIR* root; +struct dirent* file; +LittleFS_MBED *myFS; +const char rootfsprefix[10] = MBED_LITTLEFS_FILE_PREFIX; +#endif + +/* use EEPROM as filesystem */ +#ifdef ARDUINOEFS +byte ifile; +byte ofile; +byte file; +#endif + +/* these filesystems may have a path prefixes, we treat STM32SDIO like an SD here */ +#if defined(RP2040LITTLEFS) || defined(ESPSPIFFS) || defined(ARDUINOSD) +char tmpfilename[10+SBUFSIZE]; + +/* add the prefix to the filename */ +char* mkfilename(const char* filename) { + short i,j; + for(i=0; i<10 && rootfsprefix[i]!=0; i++) tmpfilename[i]=rootfsprefix[i]; + tmpfilename[i++]='/'; + for(j=0; jinit() && v) outsc("LittleFS ok \n"); +#endif +#ifdef ARDUINOEFS + int s=EFS.begin(); + if (s>0 && v) { + outsc("Mounted EFS with "); outnumber(s); outsc(" slots.\n"); + } else { + if (EFS.format(32) && v) outsc("EFS: formating 32 slots.\n"); + } +#endif +} + +int fsstat(char c) { +#if defined(FILESYSTEMDRIVER) + if (c == 0) return 1; +#endif + return 0; +} + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char c) { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + if (ofile) ofile.write(c); else ert=1; +#endif +#if defined(RP2040LITTLEFS) + if (ofile) fputc(c, ofile); else ert=1; +#endif +#if defined(ARDUINOEFS) + if (ofile) { + if (!EFS.fputc(c, ofile)) ert=-1; + } else ert=1; +#endif +} + +char fileread(){ + char c; +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + if (ifile) c=ifile.read(); else { ert=1; return 0; } + if (c == -1 || c == 255) ert=-1; + return c; +#endif +#ifdef RP2040LITTLEFS + if (ifile) c=fgetc(ifile); else { ert=1; return 0; } + if (c == -1 || c == 255) ert=-1; + return c; +#endif +#ifdef ARDUINOEFS + if (ifile) c=EFS.fgetc(ifile); else { ert=1; return 0; } + if (c == -1|| c == 255) ert=-1; + return c; +#endif + return 0; +} + +int fileavailable(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + return ifile.available(); +#endif +#ifdef RP2040LITTLEFS + return !feof(ifile); +#endif +#ifdef ARDUINOEFS + return EFS.available(ifile); +#endif + return 0; +} + +char ifileopen(const char* filename){ +#if defined(ARDUINOSD) + ifile=SD.open(mkfilename(filename), FILE_READ); + return (int) ifile; +#endif +#if defined(STM32SDIO) + ifile=SD.open(filename); + return (int) ifile; +#endif +#ifdef ESPSPIFFS + ifile=SPIFFS.open(mkfilename(filename), "r"); + return (int) ifile; +#endif +#ifdef RP2040LITTLEFS + ifile=fopen(mkfilename(filename), "r"); + return (int) ifile; +#endif +#ifdef ARDUINOEFS + ifile=EFS.fopen(filename, "r"); + return (int) ifile; +#endif + return 0; +} + +void ifileclose(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + ifile.close(); +#endif +#ifdef RP2040LITTLEFS + if (ifile) fclose(ifile); + ifile=NULL; +#endif +#ifdef ARDUINOEFS + if (ifile) EFS.fclose(ifile); + ifile=0; +#endif +} + +char ofileopen(char* filename, const char* m){ +#if defined(ARDUINOSD) + if (*m == 'w') ofile=SD.open(mkfilename(filename), FILE_OWRITE); +/* ESP32 has FILE_APPEND defined */ +#ifdef FILE_APPEND + if (*m == 'a') ofile=SD.open(mkfilename(filename), FILE_APPEND); +#else + if (*m == 'a') ofile=SD.open(mkfilename(filename), FILE_WRITE); +#endif + return (int) ofile; +#endif +#if defined(STM32SDIO) + if (*m == 'w') ofile=SD.open(filename, FILE_OWRITE); +/* ESP32 has FILE_APPEND defined */ +#ifdef FILE_APPEND + if (*m == 'a') ofile=SD.open(filename, FILE_APPEND); +#else + if (*m == 'a') ofile=SD.open(filename, FILE_WRITE); +#endif + return (int) ofile; +#endif +#ifdef ESPSPIFFS + ofile=SPIFFS.open(mkfilename(filename), m); + return (int) ofile; +#endif +#ifdef RP2040LITTLEFS + ofile=fopen(mkfilename(filename), m); + return (int) ofile; +#endif +#ifdef ARDUINOEFS + ofile=EFS.fopen(filename, m); + return (int) ofile; +#endif + return 0; +} + +void ofileclose(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + ofile.close(); +#endif +#ifdef RP2040LITTLEFS + if (ofile) fclose(ofile); +#endif +#ifdef ARDUINOEFS + if (ofile) EFS.fclose(ofile); +#endif +} + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +void rootopen() { +#if defined(ARDUINOSD) || defined(STM32SDIO) + root=SD.open("/"); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + root=SPIFFS.openDir("/"); +#endif +#ifdef ARDUINO_ARCH_ESP32 + root=SPIFFS.open("/"); +#endif +#endif +#ifdef RP2040LITTLEFS + root=opendir(rootfsprefix); +#endif +#ifdef ARDUINOEFS + EFS.dirp=0; +#endif +} + +int rootnextfile() { +#if defined(ARDUINOSD) || defined(STM32SDIO) + file=root.openNextFile(); + return (file != 0); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + if (root.next()) { + file=root.openFile("r"); + return 1; + } else { + return 0; + } +#endif +#ifdef ARDUINO_ARCH_ESP32 + file=root.openNextFile(); + return (file != 0); +#endif +#endif +#ifdef RP2040LITTLEFS + file = readdir(root); + return (file != 0); +#endif +#ifdef ARDUINOEFS + file = EFS.readdir(); + return (file != 0); +#endif + return 0; +} + +int rootisfile() { +#if defined(ARDUINOSD) || defined(STM32SDIO) + return (! file.isDirectory()); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + return 1; +#endif +#ifdef ARDUINO_ARCH_ESP32 + return (! file.isDirectory()); +#endif +#endif +#ifdef RP2040LITTLEFS + return (file->d_type == DT_REG); +#endif +#ifdef ARDUINOEFS + return 1; +#endif + return 0; +} + +const char* rootfilename() { +#if defined(ARDUINOSD) + //return (char*) file.name(); + return rmrootfsprefix(file.name()); +#endif +#if defined(STM32SDIO) + return (char*) file.name(); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + // c_str() and copy - real ugly + int i=0; + String s=root.fileName(); + for (i=0; id_name); +#endif +#ifdef ARDUINOEFS + return EFS.filename(file); +#endif + return 0; +} + +long rootfilesize() { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + return file.size(); +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS + return EFS.filesize(file); +#endif + return 0; +} + +void rootfileclose() { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(STM32SDIO) + file.close(); +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS +#endif +} + +void rootclose(){ +#if defined(ARDUINOSD) || defined(STM32SDIO) + root.close(); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + return; +#endif +#ifdef ARDUINO_ARCH_ESP32 + root.close(); +#endif +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef ARDUINOEFS +#endif +} + +/* + * remove method for files + */ +void removefile(char *filename) { +#if defined(ARDUINOSD) + SD.remove(mkfilename(filename)); + return; +#endif +#if defined(STM32SDIO) + SD.remove(filename); + return; +#endif +#ifdef ESPSPIFFS + SPIFFS.remove(mkfilename(filename)); + return; +#endif +#ifdef RP2040LITTLEFS + remove(mkfilename(filename)); + return; +#endif +#ifdef ARDUINOEFS + EFS.remove(filename); + return; +#endif +} + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(short i) { +#if defined(ARDUINOSD) || defined(STM32SDIO) + return; +#endif +#ifdef ESPSPIFFS + if (SPIFFS.format()) { SPIFFS.begin(); outsc("ok\n"); } else { outsc("fail\n"); } +#endif +#ifdef RP2040LITTLEFS + fs.reformat(&bd); + return; +#endif +#ifdef ARDUINOEFS + if (i>0 && i<256) { + if (EFS.format(i)) { EFS.begin(); outsc("ok\n"); } else { outsc("fail\n"); } + outcr(); + } else error(EORANGE); + return; +#endif +} + +/* + * Primary serial code uses the Serial object or Picoserial + * + * The picoseria an own interrupt function. This is used to fill + * the input buffer directly on read. Write is standard like in + * the serial code. + * + * As echoing is done in the interrupt routine, the code cannot be + * used to receive keystrokes from serial and then display the echo + * directly to a display. To do this the write command in picogetchar + * would have to be replaced with a outch() that then redirects to the + * display driver. This would be very tricky from the timing point of + * view if the display driver code is slow. + * + * The code for the UART control is mostly taken from PicoSerial + * https://github.com/gitcnd/PicoSerial, originally written by Chris Drake + * and published under GPL3.0 just like this code + * + */ +#ifdef USESPICOSERIAL +volatile static char picochar; +volatile static char picoa = 0; +volatile static char* picob = NULL; +static short picobsize = 0; +volatile static short picoi = 1; + +/* this is mostly taken from PicoSerial */ +const uint16_t MIN_2X_BAUD = F_CPU/(4*(2*0XFFF + 1)) + 1; + +/* the begin code */ +void picobegin(unsigned long baud) { + uint16_t baud_setting; + cli(); + if ((F_CPU != 16000000UL || baud != 57600) && baud > MIN_2X_BAUD) { + UCSR0A = 1 << U2X0; + baud_setting = (F_CPU / 4 / baud - 1) / 2; + } else { + UCSR0A = 0; + baud_setting = (F_CPU / 8 / baud - 1) / 2; + } +/* assign the baud_setting */ + UBRR0H = baud_setting >> 8; + UBRR0L = baud_setting; +/* enable transmit and receive */ + UCSR0B |= (1 << TXEN0) | (1 << RXEN0) | (1 << RXCIE0); + sei(); +} + +/* the write code, sending bytes directly to the UART */ +void picowrite(char b) { + while (((1 << UDRIE0) & UCSR0B) || !(UCSR0A & (1 << UDRE0))) {} + UDR0 = b; +} + +/* + * picogetchar: this is the interrupt service routine. It + * recieves a character and feeds it into a buffer and echos it + * back. The logic here is that the ins() code sets the buffer + * to the input buffer. Only then the routine starts writing to the + * buffer. Once a newline is received, the length information is set + * and picoa is also set to 1 indicating an available string, this stops + * recevieing bytes until the input is processed by the calling code. + */ +void picogetchar(char c){ + if (picob && (! picoa)) { + picochar=c; + if (picochar != '\n' && picochar != '\r' && picoi1) picoi--; else return; + } else + picob[picoi++]=picochar; + picowrite(picochar); + } else { + picoa = 1; + picob[picoi]=0; + picob[0]=picoi; + z.a=picoi; + picoi=1; + } + picochar=0; /* every buffered byte is deleted */ + } else { + if (c != 10) picochar=c; + } +} + +/* the ins code of picoserial, called like this in consins */ +void picoins(char *b, short nb) { + char c; + picob=b; + picobsize=nb; + picoa=0; +/* once picoa is set, the interrupt routine records characters + * until a cr and then resets picoa to 0 */ + while (!picoa) byield(); + outcr(); + return; + } + +/* on an UART interrupt, the getchar function is called */ +#ifdef USART_RX_vect +ISR(USART_RX_vect) { + char c=UDR0; + picogetchar(c); +} +#else +/* for MEGAs and other with many UARTs */ + ISR(USART0_RX_vect) { + char c=UDR0; + picogetchar(c); +} +#endif +#endif + +/* + * blocking serial single char read for Serial + * unblocking for Picoserial because it is not + * character oriented -> blocking is handled in + * consins instead. + */ +char serialread() { +#ifdef USESPICOSERIAL + char c; + c=picochar; + picochar=0; + return c; +#else + while (!SERIALPORT.available()) byield(); + return SERIALPORT.read(); +#endif +} + +/* + * serial begin code with a one second delay after start + * this is not needed any more + */ +void serialbegin() { +#ifdef USESPICOSERIAL + picobegin(serial_baudrate); +#else + SERIALPORT.begin(serial_baudrate); +#endif + bdelay(1000); +} + +/* state information on the serial port */ +int serialstat(char c) { + if (c == 0) return 1; + if (c == 1) return serial_baudrate; + return 0; +} + +/* write to a serial stream */ +void serialwrite(char c) { +#ifdef USESPICOSERIAL + picowrite(c); +#else +/* write never blocks. discard any bytes we can't get rid of */ + SERIALPORT.write(c); +/* if (Serial.availableForWrite()>0) Serial.write(c); */ +#endif +} + +/* check on a character, needed for breaking */ +short serialcheckch() { +#ifdef USESPICOSERIAL + return picochar; +#else + if (SERIALPORT.available()) return SERIALPORT.peek(); else return 0; // should really be -1 +#endif +} + +/* avail method, needed for AVAIL() */ +short serialavailable() { +#ifdef USESPICOSERIAL + return picoi; +#else + return SERIALPORT.available(); +#endif +} + +/* flush serial */ +void serialflush() { +#ifdef USESPICOSERIAL + return; +#else + while (SERIALPORT.available()) SERIALPORT.read(); +#endif +} + + +/* + * reading from the console with inch or the picoserial callback + * this mixes interpreter levels as inch/outch are used here + * this code needs to go to the main interpreter section after + * thorough rewrite + */ +void consins(char *b, short nb) { + char c; + + z.a = 1; +#ifdef USESPICOSERIAL + if (id == ISERIAL) { + picoins(b, nb); + return; + } +#endif + while(z.a < nb) { + c=inch(); + if (id == ISERIAL || id == IKEYBOARD) outch(c); /* this is local echo */ + if (c == '\r') c=inch(); /* skip carriage return */ + if (c == '\n' || c == -1 || c == 255) { /* terminal character is either newline or EOF */ + break; + } else if (c == 127 || c == 8) { + if (z.a>1) z.a--; + } else { + b[z.a++]=c; + } + } + b[z.a]=0; + z.a--; + b[0]=(unsigned char)z.a; +} + +/* + * Start a secondary serial port for printing and/or networking + * This is either Serial1 on a MEGA or DUE or Nano Every or a SoftwareSerial + * instance + */ +#ifdef ARDUINOPRT +#if !defined(ARDUINO_AVR_MEGA2560) && !defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_AVR_NANO_EVERY) && !defined(ARDUINO_NANO_RP2040_CONNECT) && !defined(ARDUINO_RASPBERRY_PI_PICO) && !defined(ARDUINO_SEEED_XIAO_M0) +#include +const int software_serial_rx = SOFTSERIALRX; +const int software_serial_tx = SOFTSERIALTX; +SoftwareSerial PRTSERIAL(software_serial_rx, software_serial_tx); +#endif + +/* second serial port */ +void prtbegin() { + PRTSERIAL.begin(serial1_baudrate); +} + +/* the open functions are not needed here */ +char prtopen(char* filename, int mode) {} +void prtclose() {} + +int prtstat(char c) { + if (c == 0) return 1; + if (c == 1) return serial1_baudrate; + return 0; +} + +void prtwrite(char c) { + PRTSERIAL.write(c); +} + +char prtread() { + while (!PRTSERIAL.available()) byield(); + return PRTSERIAL.read(); +} + +short prtcheckch() { + if (PRTSERIAL.available()) return PRTSERIAL.peek(); else return 0; +} + +short prtavailable() { + return PRTSERIAL.available(); +} + +void prtset(int s) { + serial1_baudrate=s; + prtbegin(); +} +#endif + + +/* + * The wire code, direct access to wire communication + * in master mode wire_slaveid is the I2C address bound + * to channel &7 and wire_myid is 0 + * in slave mode wire_myid is the devices slave address + * and wire_slaveid is 0 + * ARDUINOWIREBUFFER is the maximum length of meesages the + * underlying library can process. This is 32 for the Wire + * library + */ + +/* this is always here, if Wire is needed by a subsysem */ +#ifdef HASWIRE +/* default begin is as a master + * This doesn't work properly on the ESP32C3 platform + * See https://github.com/espressif/arduino-esp32/issues/6376 + * for more details + */ +void wirebegin() { +#ifndef SDA_PIN + Wire.begin(); +#else + Wire.begin(SDA_PIN, SCL_PIN); +#endif +} +#endif + +/* this is code needed for the OPEN/CLOSE and wireslave mechanisms */ +#if (defined(ARDUINOWIRE) && defined(HASFILEIO)) +uint8_t wire_slaveid = 0; +uint8_t wire_myid = 0; +#define ARDUINOWIREBUFFER 32 +#ifdef ARDUINOWIRESLAVE +char wirereceivebuffer[ARDUINOWIREBUFFER]; +short wirereceivechars = 0; +char wirerequestbuffer[ARDUINOWIREBUFFER]; +short wirerequestchars = 0; +#endif + +void wireslavebegin(char s) { +#ifndef SDA_PIN + Wire.begin(s); +#else + Wire.begin(SDA_PIN, SCL_PIN, s); +#endif +} + +/* wire status - just checks if wire is compiled */ +int wirestat(char c) { + switch (c) { + case 0: + return 1; +#ifdef ARDUINOWIRESLAVE + case 1: + return wirerequestchars; +#endif + default: + return 0; + } +} + +/* available characters - test code ecapsulation prep for slave*/ +short wireavailable() { +/* as a master we return 1, as a slave the received chars*/ + if (wire_myid == 0) return 1; +#ifdef ARDUINOWIRESLAVE + else return wirereceivechars; +#else + else return 0; +#endif +} + +#ifdef ARDUINOWIRESLAVE +/* event handler for receive */ +void wireonreceive(int h) { + wirereceivechars=h; + if (h>ARDUINOWIREBUFFER) h=ARDUINOWIREBUFFER; + for (int i=0; iARDUINOWIREBUFFER) l=ARDUINOWIREBUFFER; + if (!Wire.requestFrom(wire_slaveid, l)) ert=1; + while (Wire.available() && z.aARDUINOWIREBUFFER) l=ARDUINOWIREBUFFER; + if (wire_myid == 0) { + Wire.beginTransmission(wire_slaveid); +#ifdef ARDUINO_ARCH_ESP32 + for(z.a=0; z.a +#include +rf24_pa_dbm_e rf24_pa = RF24_PA_MAX; +RF24 radio(rf24_ce, rf24_csn); + +/* radio status */ +int radiostat(char c) { +#if defined(ARDUINORF24) + if (c == 0) return 1; + if (c == 1) return radio.isChipConnected(); +#endif + return 0; +} + +/* generate a uint64_t pipe address from the filename string for RF24 */ +uint64_t pipeaddr(char * f){ + uint64_t t = 0; + t=(uint8_t)f[0]; + for(short i=1; i<=4; i++) t=t*256+(uint8_t)f[i]; + return t; +} +#endif + +/* read an entire string */ +void radioins(char *b, short nb) { +#ifdef ARDUINORF24 + if (radio.available()) { + radio.read(b+1, nb); + if (!blockmode) { + for (z.a=0; z.a nb) z.a=nb; + } + b[0]=z.a; + } else { + b[0]=0; + b[1]=0; + z.a=0; + } +#else + b[0]=0; + b[1]=0; + z.a=0; +#endif +} + +/* write to radio, no character mode here */ +void radioouts(char *b, short l) { +#ifdef ARDUINORF24 + radio.stopListening(); + if (!radio.write(b, l)) ert=1; + radio.startListening(); +#endif +} + +/* radio available */ +short radioavailable() { +#ifdef ARDUINORF24 + return radio.available(); +#endif + return 0; +} + +/* + * we always read from pipe 1 and use pipe 0 for writing, + * the filename is the pipe address, by default the radio + * goes to reading mode after open and is only stopped for + * write + */ +void iradioopen(char *filename) { +#ifdef ARDUINORF24 + if (!radio.begin()) ert=1; + radio.openReadingPipe(1, pipeaddr(filename)); + radio.startListening(); +#endif +} + +void oradioopen(char *filename) { +#ifdef ARDUINORF24 + if (!radio.begin()) ert=1; + radio.openWritingPipe(pipeaddr(filename)); +#endif +} + +void radioset(int s) { +#ifdef ARDUINORF24 + if ((s<0) && (s>3)) {error(EORANGE); return; } + rf24_pa=(rf24_pa_dbm_e) s; + radio.setPALevel(rf24_pa); +#endif +} + + +/* + * Arduino Sensor library code + * The sensorread() is a generic function called by + * SENSOR basic function and command. The first argument + * is the sensor and the second argument the value. + * sensorread(n, 0) checks if the sensorstatus. + */ +#ifdef ARDUINOSENSORS +#ifdef ARDUINODHT +#include "DHT.h" +DHT dht(DHTPIN, DHTTYPE); +#endif +#ifdef ARDUINOSHT +#include +SHT3x SHT; +#endif +#ifdef ARDUINOMQ2 +#include +MQ2 mq2(MQ2PIN); +#endif +#ifdef ARDUINOLMS6 +#include +/* https://www.arduino.cc/en/Reference/Arduino_LSM6DSOX */ +#endif +#ifdef ARDUINOAHT +#include +Adafruit_AHTX0 aht; +#endif +#ifdef ARDUINOBMP280 +#include +Adafruit_BMP280 bmp; +#endif +#ifdef ARDUINOBME280 +#include +Adafruit_BME280 bme; +/* add your own code here */ +#endif + + +void sensorbegin(){ +#ifdef ARDUINODHT +dht.begin(); +#endif +#ifdef ARDUINOSHT + SHT.Begin(); +#endif +#ifdef ARDUINOMQ2 + mq2.begin(); +#endif +#ifdef ARDUINOAHT + aht.begin(); +#endif +#ifdef ARDUINOBMP280 + bmp.begin(); + bmp.setSampling(Adafruit_BMP280::MODE_NORMAL, /* Operating Mode. */ + Adafruit_BMP280::SAMPLING_X2, /* Temp. oversampling */ + Adafruit_BMP280::SAMPLING_X16, /* Pressure oversampling */ + Adafruit_BMP280::FILTER_X16, /* Filtering. */ + Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */ +#endif +#ifdef ARDUINOBME280 + bme.begin(); +#endif +} + +number_t sensorread(short s, short v) { + switch (s) { + case 0: + return analogRead(A0+v); + case 1: +#ifdef ARDUINODHT + switch (v) { + case 0: + return 1; + case 1: + return dht.readHumidity(); + case 2: + return dht.readTemperature(); + } +#endif + return 0; + case 2: +#ifdef ARDUINOSHT + switch (v) { + case 0: + return 1; + case 1: + SHT.UpdateData(); + return SHT.GetRelHumidity(); + case 2: + SHT.UpdateData(); + return SHT.GetTemperature(); + } +#endif + return 0; + case 3: +#ifdef ARDUINOMQ2 + switch (v) { + case 0: + return 1; + case 1: + (void) mq2.read(false); + return mq2.readLPG();; + case 2: + (void) mq2.read(false); + return mq2.readCO(); + case 3: + (void) mq2.read(false); + return mq2.readSmoke(); + } +#endif + return 0; + case 4: +#ifdef ARDUINOAHT + sensors_event_t humidity, temp; + switch (v) { + case 0: + return 1; + case 1: + aht.getEvent(&humidity, &temp); + return temp.temperature; + case 2: + aht.getEvent(&humidity, &temp); + return humidity.relative_humidity; + } +#endif + return 0; + case 5: +#ifdef ARDUINOBMP280 + switch (v) { + case 0: + return 1; + case 1: + return bmp.readTemperature(); + case 2: + return bmp.readPressure() / 100.0; + case 3: + return bmp.readAltitude(1013.25); + } +#endif + return 0; + case 6: +#ifdef ARDUINOBME280 + switch (v) { + case 0: + return 1; + case 1: + return bme.readTemperature(); + case 2: + return bme.readPressure() / 100.0; + case 3: + return bme.readAltitude(1013.25); + case 4: + return bme.readHumidity(); + } +#endif +/* add your own sensor code here */ + return 0; + default: + return 0; + } +} + +#else +void sensorbegin() {} +number_t sensorread(short s, short v) {return 0;}; +#endif + + +/* + * Experimental code to drive SPI SRAM + * + * Currently only the 23LCV512 is implemented, assuming a + * 64kB SRAM + * The code below is taken in part from the SRAMsimple library + * + * two buffers are implemented: + * - a ro buffer used by memread, this buffer is mainly reading the token + * stream at runtime. + * - a rw buffer used by memread2 and memwrite2, this buffer is mainly accessing + * the heap at runtime. In interactive mode this is also the interface to read + * and write program code to memory + * + */ + +#ifdef ARDUINOSPIRAM +#define USEMEMINTERFACE +#define SPIRAMINTERFACE + +/* + * we use the standard slave select pin as default + * RAMPIN + */ +#ifndef RAMPIN +#define RAMPIN SS +#endif + +#define SPIRAMWRMR 1 +#define SPIRAMRDMR 5 +#define SPIRAMREAD 3 +#define SPIRAMWRITE 2 +#define SPIRAMRSTIO 0xFF +#define SPIRAMSEQ 0x40 +#define SPIRAMBYTE 0x00 + +/* the RAM begin method sets the RAM to sequential mode */ +address_t spirambegin() { + pinMode(RAMPIN, OUTPUT); + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMRSTIO); + SPI.transfer(SPIRAMWRMR); + //SPI.transfer(SPIRAMBYTE); + SPI.transfer(SPIRAMSEQ); + digitalWrite(RAMPIN, HIGH); + /* only 32 kB addressable with 16 bit integers because address_t has to fit into number_t + the interpreter would work also with 64kB but PEEK, POKE and the DARKARTS are broken then*/ + if (maxnum>32767) return 65534; else return 32766; +} + +/* the simple unbuffered byte read, with a cast to signed char */ +mem_t spiramrawread(address_t a) { + mem_t c; + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMREAD); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + c = SPI.transfer(0x00); + digitalWrite(RAMPIN, HIGH); + return c; +} + +/* one read only buffer for access from the token stream + memread calls this */ +address_t spiram_robufferaddr = 0; +mem_t spiram_robuffervalid=0; +const address_t spiram_robuffersize = 32; +mem_t spiram_robuffer[spiram_robuffersize]; + +/* one rw buffer for access to the heap and all the program editing + memread2 and memwrite2 call this*/ +address_t spiram_rwbufferaddr = 0; +mem_t spiram_rwbuffervalid=0; +const address_t spiram_rwbuffersize = 32; /* also change the addressmask if you want to play here */ +mem_t spiram_rwbuffer[spiram_rwbuffersize]; +mem_t spiram_rwbufferclean = 1; + +const address_t spiram_addrmask=0xffe0; +/* const address_t spiram_addrmask=0xffd0; // 64 byte frame */ + +/* the elementary buffer access functions used almost everywhere */ + +void spiram_bufferread(address_t a, mem_t* b, address_t l) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMREAD); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer(b, l); + digitalWrite(RAMPIN, HIGH); +} + +void spiram_bufferwrite(address_t a, mem_t* b, address_t l) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMWRITE); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer(b, l); + digitalWrite(RAMPIN, HIGH); +} + +mem_t spiram_robufferread(address_t a) { +/* we address a byte known to the rw buffer, then get it from there */ + if (spiram_rwbuffervalid && ((a & spiram_addrmask) == spiram_rwbufferaddr)) { + return spiram_rwbuffer[a-spiram_rwbufferaddr]; + } + +/* page fault, we dont have the byte in the ro buffer, so read from the chip*/ + if (!spiram_robuffervalid || a >= spiram_robufferaddr + spiram_robuffersize || a < spiram_robufferaddr ) { + spiram_bufferread(a, spiram_robuffer, spiram_robuffersize); + spiram_robufferaddr=a; + spiram_robuffervalid=1; + } + return spiram_robuffer[a-spiram_robufferaddr]; +} + +/* flush the buffer */ +void spiram_rwbufferflush() { + if (!spiram_rwbufferclean) { + spiram_bufferwrite(spiram_rwbufferaddr, spiram_rwbuffer, spiram_rwbuffersize); + spiram_rwbufferclean=1; + } +} + +mem_t spiram_rwbufferread(address_t a) { +/* page fault, do read, ignore the ro buffer buffer */ + address_t p=a & spiram_addrmask; + if (!spiram_rwbuffervalid || (p != spiram_rwbufferaddr)) { +/* flush the buffer if needed */ + spiram_rwbufferflush(); +/* and reload it */ + spiram_bufferread(p, spiram_rwbuffer, spiram_rwbuffersize); + spiram_rwbufferaddr = p; /* we only handle full pages here */ + spiram_rwbuffervalid=1; + } + return spiram_rwbuffer[a-spiram_rwbufferaddr]; +} + +/* the buffered file write */ +void spiram_rwbufferwrite(address_t a, mem_t c) { + address_t p=a&spiram_addrmask; +/* correct the two buffers if needed */ + if (spiram_robuffervalid && a >= spiram_robufferaddr && a < spiram_robufferaddr + spiram_robuffersize) { + spiram_robuffer[a-spiram_robufferaddr]=c; + } +/* if we have the frame, write it, mark the buffer dirty and return */ + if (spiram_rwbuffervalid && p == spiram_rwbufferaddr) { + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; + spiram_rwbufferclean=0; + return; + } +/* if we end up here the write was impossible because we dont have the frame, so flush and then get it */ + spiram_rwbufferflush(); + (void) spiram_rwbufferread(a); + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; + spiram_rwbufferclean=0; +} + +/* the simple unbuffered byte write, with a cast to signed char */ +void spiramrawwrite(address_t a, mem_t c) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMWRITE); + SPI.transfer((byte)(a >> 8)); + SPI.transfer((byte)a); + SPI.transfer((byte) c); + digitalWrite(RAMPIN, HIGH); +/* also refresh the ro buffer if in the frame */ + if (a >= spiram_robufferaddr && a < spiram_robufferaddr + spiram_robuffersize && spiram_robufferaddr > 0) + spiram_robuffer[a-spiram_robufferaddr]=c; +/* and the rw buffer if needed) */ + if (a >= spiram_rwbufferaddr && a < spiram_rwbufferaddr + spiram_rwbuffersize && spiram_rwbufferaddr > 0) + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; +} +#endif + + +/* the code to address EEPROMs directly */ +#ifdef ARDUINOPGMEEPROM +#define USEMEMINTERFACE +#define EEPROMMEMINTERFACE +#else +#undef EEPROMMEMINTERFACE +#endif + + +#if defined(USEMEMINTERFACE) +/* + * to handle strings in situations with a memory interface two more buffers are + * needed they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set + * + * default is 128, on an MEGA 512 is possible + */ +#ifdef ARDUINO_AVR_MEGA2560 +#define SPIRAMSBSIZE 512 +#else +#define SPIRAMSBSIZE 128 +#endif + +/* the string buffers of the memory interface */ +char spistrbuf1[SPIRAMSBSIZE]; +char spistrbuf2[SPIRAMSBSIZE]; +#endif + +/* + * A tone emulation based on the byield loop. The maximum frequency depends + * on the byield call speed. 10-20 kHz is possible. Will be unreliable if + * the loop functions need a lot of CPU cycles. + */ +#ifdef ARDUINOTONEEMULATION +static mem_t tone_enabled; +static mem_t tone_pinstate = 0; +static unsigned long tone_intervall; +static unsigned long tone_micros; +static int tone_duration; +static unsigned long tone_start; +static mem_t tone_pin; + +void playtone(int pin, int frequency, int duration){ + +/* the pin we are using is reset every time this is called*/ + tone_pin=pin; + pinMode(tone_pin, OUTPUT); + digitalWrite(tone_pin, LOW); + tone_pinstate=0; + + /* duration 0 or frequency 0 stops playing */ + if (duration == 0 || frequency == 0) { + tone_enabled=0; + return; + } + +/* calculate the toggle intervall in micros and remember where we are */ + tone_intervall=1000000/frequency/2; + tone_micros=micros(); + +/* set the duration and remember where we are*/ + tone_duration=duration; + tone_start=millis(); + +/* start the play */ + tone_enabled=1; +} + +void tonetoggle() { + +/* is this active? */ + if (!tone_enabled) return; + +/* check if we are done playing */ + if (millis() > tone_duration+tone_start) { + tone_enabled=0; + digitalWrite(tone_pin, LOW); + tone_pinstate=0; + return; + } + +/* if not, check if the intervall is over */ + if (micros() > tone_intervall+tone_micros) { + tone_micros=micros(); + tone_pinstate=!tone_pinstate; + digitalWrite(tone_pin, tone_pinstate); + } +} +#endif + +/* + * the events API for Arduino with interrupt service routines + * analogous to the timer API + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + */ + +#ifdef HASEVENTS +/* interrupts in BASIC fire once and then disable themselves, BASIC reenables them */ +void bintroutine0() { + eventlist[0].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[0].pin)); +} +void bintroutine1() { + eventlist[1].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[1].pin)); +} +void bintroutine2() { + eventlist[2].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[2].pin)); +} +void bintroutine3() { + eventlist[3].active=1; + detachInterrupt(digitalPinToInterrupt(eventlist[3].pin)); +} + + +#if !(defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_MBED_NANO) || defined(ARDUINO_ARCH_RENESAS)) +typedef int PinStatus; +#endif + + +mem_t enableevent(int pin) { + mem_t interrupt; + int i; + +/* do we have the data */ + if ((i=eventindex(pin))<0) return 0; + +/* can we use this pin */ + interrupt=digitalPinToInterrupt(eventlist[i].pin); + if (interrupt < 0) return 0; + +/* attach the interrupt function to this pin */ + switch(i) { + case 0: + attachInterrupt(interrupt, bintroutine0, (PinStatus) eventlist[i].mode); + break; + case 1: + attachInterrupt(interrupt, bintroutine1, (PinStatus) eventlist[i].mode); + break; + case 2: + attachInterrupt(interrupt, bintroutine2, (PinStatus) eventlist[i].mode); + break; + case 3: + attachInterrupt(interrupt, bintroutine3, (PinStatus) eventlist[i].mode); + break; + default: + return 0; + } + +/* now set it enabled in BASIC */ + eventlist[i].enabled=1; + return 1; + +} + +void disableevent(mem_t pin) { + detachInterrupt(digitalPinToInterrupt(pin)); +} +#endif + + +/* + * This code measures the fast ticker frequency in microseconds + * It leaves the data in variable F. Activate this only for test + * purposes. + */ +#undef FASTTICKERPROFILE + +#ifdef FASTTICKERPROFILE +static unsigned long lastfasttick = 0; +static unsigned long fasttickcalls = 0; +static int avgfasttick = 0; +static long devfasttick = 0; + +void fasttickerprofile() { + if (lastfasttick == 0) { lastfasttick=micros(); return; } + int delta=micros()-lastfasttick; + lastfasttick=micros(); + avgfasttick=(avgfasttick*fasttickcalls+delta)/(fasttickcalls+1); + fasttickcalls++; + vars[5]=avgfasttick; +} +#endif + + + +// defined HARDWARE_H +#endif diff --git a/data/Basic1/hardware-posix.h b/data/Basic1/hardware-posix.h new file mode 100644 index 0000000000000000000000000000000000000000..b20d31f7d5466f7ab7ba73193cf78208bfb14596 --- /dev/null +++ b/data/Basic1/hardware-posix.h @@ -0,0 +1,1502 @@ +/* + * + * $Id: hardware-posix.h,v 1.7 2023/07/16 14:17:08 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * Playing around with frugal programming. See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Hardware definition file coming with basic.c aka TinybasicArduino.ino + * + * Link to some of the POSIX OS features to mimic a microcontroller platform + * See hardware-arduino for more details on the interface. + * + * Supported: filesystem, real time clock, (serial) I/O on the text console + * Not supported: radio, wire, SPI, MQTT + * + * Partially supported: Wiring library on Raspberry PI + * + */ + +#if ! defined(ARDUINO) && ! defined(__HARDWAREH__) +#define __HARDWAREH__ + +/* + * Hardware flags of the POSIX systems + * POSIXTERMINAL, POSIXVT52TOANSI: ensure compatibility of BASIC programs + * control characters of BASIC are translated to ANSI, bringing the Aruino + * VT52 commands to POSIX + * POSIXSIGNALS: enables signal handling of ^C interrupting programs + * POSIXNONBLOCKING: non blocking I/O to handle GET and the BREAKCHAR + * tricky on DOS, not very portable, experimental, use signals instead + * POSIXFRAMEBUFFER: directly draw to the frame buffer of Raspberry PI + * only tested on this platform + * POSIXWIRE: simple Raspberry PI wire code + * POSIXMQTT: analogous to ARDUINOMQTT, send and receive MQTT messages (unfinished) + * POSIXWIRING: use the (deprectated) wiring code for gpio on Raspberry Pi + * POSIXPIGPIO: use the pigpio library on a Raspberry PI + */ + +#define POSIXTERMINAL +#define POSIXVT52TOANSI +#define POSIXSIGNALS +#undef POSIXNONBLOCKING +#undef POSIXFRAMEBUFFER +#undef POSIXWIRE +#undef POSIXMQTT +#undef POSIXWIRING +#undef POSIXPIGPIO + +/* simulates SPI RAM, only test code, keep undefed if you don't want to do something special */ +#undef SPIRAMSIMULATOR + +/* use a serial port as printer interface - unfinished - similar to Arduino */ +#define ARDUINOPRT + +/* used pins and other parameters */ + +/* set this is you want pin 4 on low interrupting the interpreter */ +/* #define BREAKPIN 4 */ +#undef BREAKPIN + +/* the SIGNAL the interpreters listens to for interrupt */ +#define BREAKSIGNAL SIGINT + +/* in case of non blocking IO turn on background tasks */ +#ifdef POSIXNONBLOCKING +#define BASICBGTASK +#endif + +/* frame buffer health check - currently only supported on Raspberry */ +#ifndef RASPPI +#undef POSIXFRAMEBUFFER +#endif + +/* wire parameters for Raspberry*/ +#define POSIXI2CBUS 1 + +/* Wiring Code, which library to use */ +#ifdef POSIXWIRING +#include +#endif + +#ifdef POSIXPIGPIO +#include +#undef POSIXWIRING +static int pigpio_pi = 0; +#endif + +/* + * the system type and system capabilities + */ + +#if defined(MSDOS) +const char bsystype = SYSTYPE_MSDOS +#elif defined(RASPPI) +const char bsystype = SYSTYPE_PASPPI +#elif defined(MINGW) +const char bsystype = SYSTYPE_MINGW +#else +const char bsystype = SYSTYPE_POSIX; +#endif + +/* + * Arduino default serial baudrate and serial flags for the + * two supported serial interfaces. Set to 0 on POSIX OSes + */ +const int serial_baudrate = 0; +const int serial1_baudrate = 0; +char sendcr = 0; +short blockmode = 0; + +/* handling time, remember when we started, needed in millis() */ +struct timeb start_time; +void timeinit() { ftime(&start_time); } + +/* starting wiring for raspberry */ +void wiringbegin() { +#ifdef POSIXWIRING + wiringPiSetup(); +#endif +#ifdef POSIXPIGPIO + pigpio_pi=pigpio_start("localhost","8888"); + printf("** GPIO started with result %d\n", pigpio_pi); + printf("** pigpio version %d.\n", get_pigpio_version(pigpio_pi)); + printf("** Hardware revision %d.\n", get_hardware_revision(pigpio_pi)); +#endif +} + +/* + * signal handling + */ +#ifdef POSIXSIGNALS +#include +mem_t breaksignal = 0; + +/* simple signal handler */ +void signalhandler(int sig){ + breaksignal=1; + signal(BREAKSIGNAL, signalhandler); +} + +/* activate signal handling */ +void signalon() { + signal(BREAKSIGNAL, signalhandler); +} + +/* deactivate signal handling unused and not yet done*/ +void signaloff() {} + +#endif + +/* + * helper functions OS, heuristic on how much memory is + * available in BASIC + */ +long freememorysize() { +#ifdef MSDOS + return 48000; +#else + return 65536; +#endif +} + +long freeRam() { + return freememorysize(); +} + +/* + * the sleep and restart functions + */ +void restartsystem() { exit(0);} +void activatesleep(long t) {} + +/* + * start the SPI bus + */ +void spibegin() {} + + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + */ +const int dsp_rows=0; +const int dsp_columns=0; +void dspsetupdatemode(char c) {} +void dspwrite(char c){} +void dspbegin() {} +int dspstat(char c) {return 0; } +char dspwaitonscroll() { return 0; } +char dspactive() {return 0; } +void dspsetscrollmode(char c, short l) {} +void dspsetcursor(short c, short r) {} + +#ifndef POSIXFRAMEBUFFER +/* these are the graphics commands */ +void rgbcolor(int r, int g, int b) {} +void vgacolor(short c) {} +void plot(int x, int y) {} +void line(int x0, int y0, int x1, int y1) {} +void rect(int x0, int y0, int x1, int y1) {} +void frect(int x0, int y0, int x1, int y1) {} +void circle(int x0, int y0, int r) {} +void fcircle(int x0, int y0, int r) {} + +/* stubs for the vga code part analogous to ESP32 */ +void vgabegin(){} +void vgawrite(char c){} +#else +/* + * This is the first draft of the linux framebuffer code + * currently very raw, works only if the framebuffer is 24 bit + * very few checks, all kind of stuff can go wrong here. + * + * Main ideas and some part of the code came from this + * article https://www.mikrocontroller.net/topic/379335 + * by Andy W. + * + * Bresenham's algorithm came from the Wikipedia article + * and this very comprehensive discussion + * http://members.chello.at/~easyfilter/bresenham.html + * by Alois Zingl from the Vienna Technikum. I also recommend + * his thesis: http://members.chello.at/%7Eeasyfilter/Bresenham.pdf + * + */ +#include +#include +#include +#include +#include + +/* 'global' variables to store screen info */ +char *framemem = 0; +int framedesc = 0; + +/* info from the frame buffer itself */ +struct fb_var_screeninfo vinfo; +struct fb_fix_screeninfo finfo; +struct fb_var_screeninfo orig_vinfo; + +/* the color variable of the frame buffer */ +long framecolor = 0xffffff; +int framevgacolor = 0x0f; +long framescreensize = 0; +int framecolordepth = 0; + +/* prepare the framebuffer device */ +void vgabegin() { + +/* see if we can open the framebuffer device */ + framedesc = open("/dev/fb0", O_RDWR); + if (!framedesc) { + printf("** error opening frame buffer \n"); + return; + } + +/* now get the variable info of the screen */ + if (ioctl(framedesc, FBIOGET_VSCREENINFO, &vinfo)) { + printf("** error reading screen information \n"); + return; + } + printf("** detected screen %dx%d, %dbpp \n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel); + +/* BASIC currently does 24 bit color only */ + memcpy(&orig_vinfo, &vinfo, sizeof(struct fb_var_screeninfo)); +/* + vinfo.bits_per_pixel = 24; + if (ioctl(framedesc, FBIOPUT_VSCREENINFO, &vinfo)) { + printf("** error setting variable information \n"); + return; + } +*/ + +/* how much color have we got */ + framecolordepth = vinfo.bits_per_pixel; + +/* get the fixed information of the screen */ + if (ioctl(framedesc, FBIOGET_FSCREENINFO, &finfo)) { + printf("Error reading fixed information.\n"); + return; + } + +/* now ready to memory map the screen - evil, we assume 24 bit without checking */ + + framescreensize = (framecolordepth/8) * vinfo.xres * vinfo.yres; + framemem = (char*)mmap(0, framescreensize, PROT_READ | PROT_WRITE, MAP_SHARED, framedesc, 0); + if ((int)framemem == -1) { + printf("** error failed to mmap.\n"); + framemem=0; + return; + } + +/* if all went well we have valid non -1 framemem and can continue */ +} + +/* this function does not exist in the ESP32 world because we don't care there */ +void vgaend() { + if ((int)framemem) munmap(framemem, framescreensize); + if (ioctl(framedesc, FBIOPUT_VSCREENINFO, &orig_vinfo)) { + printf("** error re-setting variable information \n"); + } + close(framedesc); +} + +/* set the color variable depending on the color depth*/ +void rgbcolor(int r, int g, int b) { + switch (framecolordepth/8) { + case 4: + framecolor = (((long)r << 16) & 0x00ff0000) | (((long)g << 8) & 0x0000ff00) | ((long)b & 0x000000ff); /* untested */ + break; + case 3: + framecolor = (((long)r << 16) & 0x00ff0000) | (((long)g << 8) & 0x0000ff00) | ((long)b & 0x000000ff); + break; + case 2: + framecolor = ((long) (r & 0xff) >> 3) << 10 | ((long) (g & 0xff) >> 2) << 6 | ((long) (b & 0xff) >> 3); /* untested */ + break; + case 1: + framecolor = ((long) (r & 0xff) >> 5) << 5 | ((long) (g & 0xff) >> 5) << 2 | ((long) (b & 0xff) >> 6); /* untested */ + break; + } +} + +/* this is taken from the Arduino TFT code */ +void vgacolor(short c) { + short base=128; + framevgacolor=c; + if (c==8) { rgbcolor(64, 64, 64); return; } + if (c>8) base=255; + rgbcolor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} + +/* plot directly into the framebuffer */ +void plot(int x, int y) { + unsigned long pix_offset; + +/* is everything in range, no error here */ + if (x < 0 || y < 0 || x >= vinfo.xres || y >= vinfo.yres) return; + +/* find the memory location */ + pix_offset = (framecolordepth/8) * x + y * finfo.line_length; + + if (pix_offset < 0 || pix_offset+ (framecolordepth/8-1) > framescreensize) return; + +/* write to the buffer */ + switch (framecolordepth/8) { + case 4: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 8) & 0x000000ff); + *((char*)(framemem + pix_offset+3)) = (unsigned char)((framecolor >> 16) & 0x000000ff); + break; + case 3: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 8) & 0x000000ff); + *((char*)(framemem + pix_offset+2)) = (unsigned char)((framecolor >> 16) & 0x000000ff); + break; + case 2: + *((char*)(framemem + pix_offset )) = (unsigned char)((framecolor & 0x1f) + (((framecolor >> 5) & 0x03) << 6)); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 7) & 0xff); + break; + case 1: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + break; + } + +} + +/* Bresenham's algorith from Wikipedia */ +void line(int x0, int y0, int x1, int y1) { + int dx, dy, sx, sy; + int error, e2; + + dx=abs(x0-x1); + sx=x0 < x1 ? 1 : -1; + dy=-abs(y1-y0); + sy=y0 < y1 ? 1 : -1; + error=dx+dy; + + while(1) { + plot(x0, y0); + if (x0 == x1 && y0 == y1) break; + e2=2*error; + if (e2 > dy) { + if (x0 == x1) break; + error=error+dy; + x0=x0+sx; + } + if (e2 <= dx) { + if (y0 == y1) break; + error=error+dx; + y0=y0+sy; + } + } +} + +/* rects could also be drawn with hline and vline */ +void rect(int x0, int y0, int x1, int y1) { + line(x0, y0, x1, y0); + line(x1, y0, x1, y1); + line(x1, y1, x0, y1); + line(x0, y1, x0, y0); +} + +/* filled rect, also just using line right now */ +void frect(int x0, int y0, int x1, int y1) { + int dx, sx; + int x; + sx=x0 < x1 ? 1 : -1; + for(x=x0; x != x1; x=x+sx) line(x, y0, x, y1); +} + +/* Bresenham for circles, based on Alois Zingl's work */ +void circle(int x0, int y0, int r) { + int x, y, err; + x=-r; + y=0; + err=2-2*r; + do { + plot(x0-x, y0+y); + plot(x0-y, y0-x); + plot(x0+x, y0-y); + plot(x0+y, y0+x); + r=err; + if (r <= y) err+=++y*2+1; + if (r > x || err > y) err+=++x*2+1; + } while (x < 0); +} + +/* for filled circles draw lines instead of points */ +void fcircle(int x0, int y0, int r) { + int x, y, err; + x=-r; + y=0; + err=2-2*r; + do { + line(x0-x, y0+y, x0+x, y0+y); + line(x0+x, y0-y, x0-x, y0-y); + r=err; + if (r <= y) err+=++y*2+1; + if (r > x || err > y) err+=++x*2+1; + } while (x < 0); +} + +/* not needed really, now, later yes ;-) */ +void vgawrite(char c) {} +#endif + +/* + * Keyboard code stubs + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +void kbdbegin() {} +int kbdstat(char c) {return 0; } +char kbdavailable(){ return 0;} +char kbdread() { return 0;} +char kbdcheckch() { return 0;} + +/* vt52 code stubs - unused here - needed for basic.c */ +mem_t vt52avail() {return 0;} +char vt52read() { return 0; } + +/* Display driver would be here, together with vt52 */ + +/* + * Real Time clock code + */ +#define HASCLOCK + +void rtcbegin() {} + +short rtcget(short i) { + struct timeb thetime; + struct tm *ltime; + ftime(&thetime); + ltime=localtime(&thetime.time); + switch (i) { + case 0: + return ltime->tm_sec; + case 1: + return ltime->tm_min; + case 2: + return ltime->tm_hour; + case 3: + return ltime->tm_wday; + case 4: + return ltime->tm_mday; + case 5: + return ltime->tm_mon+1; + case 6: + return ltime->tm_year-100; + default: + return 0; + } +} + +void rtcset(uint8_t i, short v) {} + + +/* + * Wifi and MQTT code + */ +#ifndef POSIXMQTT +void netbegin() {} +char netconnected() { return 0; } +void mqttbegin() {} +int mqttstat(char c) {return 0; } +int mqttstate() {return -1;} +void mqttsubscribe(char *t) {} +void mqttsettopic(char *t) {} +void mqttouts(char *m, short l) {} +void mqttins(char *b, short nb) { z.a=0; }; +char mqttinch() {return 0;}; +#else +/* we use mosquitto */ +#include +/* we assume to be on the network */ +void netbegin() {} +char netconnected() { return 1; } +/* the mqtt code */ +void mqttbegin() {} +int mqttstat(char c) {return 0; } +int mqttstate() {return -1;} +void mqttsubscribe(char *t) {} +void mqttsettopic(char *t) {} +void mqttouts(char *m, short l) {} +void mqttins(char *b, short nb) { z.a=0; }; +char mqttinch() {return 0;}; +#endif + +/* + * EEPROM handling, these function enable the @E array and + * loading and saving to EEPROM with the "!" mechanism + * a filesystem based dummy + */ +signed char eeprom[EEPROMSIZE]; +void ebegin(){ + int i; + FILE* efile; + for (i=0; i=0 && a=0 && a= 0 && v<256) analogWrite(p, v); + else error(EORANGE); +} + +void dwrite(address_t p, address_t v){ + if (v == 0) digitalWrite(p, LOW); + else if (v == 1) digitalWrite(p, HIGH); + else error(EORANGE); +} + +/* pin Modes without range check, values in wiringPi are different from Arduino*/ +void pinm(address_t p, address_t m){ + if (m>=0) pinMode(p, m); + else error(EORANGE); +} +#endif + +/* the pigpio library */ +#ifdef POSIXPIGPIO + + +void aread(){ pop(); push(0); } + + +void dread(){ + push(gpio_read(pigpio_pi, pop())); +} + +void awrite(address_t p, address_t v){ + set_PWM_dutycycle(pigpio_pi, p, v); +} + + +void dwrite(address_t p, address_t v){ + gpio_write(pigpio_pi, p, v); +} + +void pinm(address_t p, address_t m){ + set_mode(pigpio_pi, p, m); +} +#endif + +/* we need to do millis by hand except for RASPPI with wiring */ +#if !defined(POSIXWIRING) +unsigned long millis() { + struct timeb thetime; + ftime(&thetime); + return (thetime.time-start_time.time)*1000+(thetime.millitm-start_time.millitm); +} +#endif + +void bpulsein() { pop(); pop(); pop(); push(0); } +void bpulseout(short a) { while (a--) pop(); } +void btone(short a) { pop(); pop(); if (a == 3) pop(); } + +/* the POSIX code has no yield as it runs on an OS */ +void yieldfunction() {} + +void longyieldfunction() { +#ifdef BASICBGTASK +/* polling for the BREAKCHAR */ +#ifdef POSIXNONBLOCKING + if (checkch() == BREAKCHAR) breakcondition=1; +#endif +#endif +} + +void yieldschedule() {} + +/* + * The file system driver - all methods needed to support BASIC fs access + * MSDOS to be done + * + * file system code is a wrapper around the POSIX API + */ +void fsbegin(char v) {} +#define FILESYSTEMDRIVER +FILE* ifile; +FILE* ofile; +#ifndef MSDOS +DIR* root; +struct dirent* file; +#else +void* root; +void* file; +#endif + +/* POSIX OSes always have filesystems */ +int fsstat(char c) {return 1; } + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char c) { + if (ofile) + fputc(c, ofile); + else + ert=1; +} + +char fileread(){ + char c; + if (ifile) c=fgetc(ifile); else { ert=1; return 0; } + if (cheof(c)) ert=-1; + return c; +} + +char ifileopen(const char* filename){ + ifile=fopen(filename, "r"); + // return (int) ifile; + return ifile!=0; +} + +void ifileclose(){ + if (ifile) fclose(ifile); + ifile=0; +} + +char ofileopen(char* filename, const char* m){ + ofile=fopen(filename, m); + // return (int) ofile; + return ofile!=0; +} + +void ofileclose(){ + if (ofile) fclose(ofile); + ofile=0; +} + +int fileavailable(){ return !feof(ifile); } + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +#ifdef MSDOS +#include +#include +struct ffblk *bffblk; +#endif + +void rootopen() { +#ifndef MSDOS + root=opendir ("./"); +#else + (void) findfirst("*.*", bffblk, 0); +#endif +} + +int rootnextfile() { +#ifndef MSDOS + file = readdir(root); + return (file != 0); +#else + return (findnext(bffblk) == 0); +#endif +} + +int rootisfile() { +#if !defined(MSDOS) && !defined(MINGW) + return (file->d_type == DT_REG); +#else + return 1; +#endif +} + +const char* rootfilename() { +#ifndef MSDOS + return (file->d_name); +#else + return (bffblk->ff_name); +#endif +} + +long rootfilesize() { +#ifndef MSDOS + return 0; +#else + return (bffblk->ff_fsize); +#endif +} + +void rootfileclose() {} +void rootclose(){ +#ifndef MSDOS + (void) closedir(root); +#endif +} + +/* + * remove method for files + */ +void removefile(char *filename) { + remove(filename); +} + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(short i) { + outsc("Format not implemented on this platform\n"); +} + +/* + * Primary serial code, if NONBLOCKING is set, + * platform dependent I/O is used. This means that + * UNIXes use fcntl() to implement a serialcheckch + * and MSDOS as well als WIndows use kbhit(). + * This serves only to interrupt programs with + * BREAKCHAR at the moment. + */ +#ifdef POSIXNONBLOCKING +#if !defined(MSDOS) && !defined(MINGW) +#include + +/* we need to poll the serial port in non blocking mode + this slows it down so that we don't block an entire core + read speed here is one character per millisecond which + is 8000 baud, no one can type that fast but tedious when + from stdin */ +/* +void freecpu() { + struct timespec intervall; + struct timespec rtmp; + intervall.tv_sec=0; + intervall.tv_nsec=1000000; + nanosleep(&intervall, &rtmp); +} +*/ + +/* for non blocking I/O try to modify the stdin file descriptor */ +void serialbegin() { +/* we keep I/O mostly blocking here */ +/* + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); +*/ +} + +/* get and unget the character in a non blocking way */ +short serialcheckch(){ + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); + int ch=getchar(); + ungetc(ch, stdin); + fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); + return ch; +} + +/* check EOF, don't use feof()) here */ +short serialavailable() { + if (cheof(serialcheckch())) return 0; else return 1; +} + +/* two versions of serialread */ +char serialread() { + char ch; +/* blocking to let the OS handle the wait - this means: no call to byield() in interaction */ + ch=getchar(); + return ch; +/* this is the code that waits - calls byield() often just like on the Arduino */ +/* + while (cheof(serialcheckch())) { byield(); freecpu(); } + return getchar(); +*/ +} + +/* flushes the serial code in non blocking mode */ +void serialflush() { + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); + while (!cheof(getchar())); + fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); +} +#else +/* the non blocking MSDOS and MINGW code */ +#include +/* we go way back in time here and do it like DOS did it */ +void serialbegin(){} + +/* we go through the terminal on read */ +char serialread() { + return getchar(); +} + +/* check if a key is hit, get it and return it */ +short serialcheckch(){ + if (kbhit()) return getch(); +} + +/* simple version */ +short serialavailable() { + return 1; +} + +/* simple version */ +void serialflush() { } +#endif +#else +/* the blocking code only uses puchar and getchar */ +void serialbegin(){} +char serialread() { return getchar(); } +short serialcheckch(){ return 1; } +short serialavailable() { return 1; } +void serialflush() {} +#endif + +int serialstat(char c) { + if (c == 0) return 1; + if (c == 1) return serial_baudrate; + return 0; +} + +/* send the CSI sequence to start with ANSI */ +void sendcsi() { + putchar(27); putchar('['); /* CSI */ +} + +/* the vt52 state engine */ +#ifdef POSIXVT52TOANSI +#include +mem_t dspesc = 0; +mem_t vt52s = 0; +int cursory = 0; +mem_t vt52active = 1; + +/* something little */ +uint8_t vt52number(char c) { + uint8_t b=c; + if (b>31) return b-32; else return 0; +} + +/* set the cursor */ +void dspsetcursory(int i) { + cursory=i; +} + +/* remember the position */ +void dspsetcursorx(int i) { + sendcsi(); + printf("%d;%dH", abs(cursory)+1, abs(i)+1); +} + +/* set colors, vga here */ +void dspsetfgcolor(int co) { + sendcsi(); + if (co < 8) { + putchar('3'); + } else { + putchar('9'); + co=co-8; + } + putchar('0'+co); + putchar('m'); +} + +void dspsetbgcolor(int co) { + sendcsi(); + if (co < 8) { + putchar('4'); + } else { + putchar('1'); putchar('0'); + co=co-8; + } + putchar('0'+co); + putchar('m'); +} + +/* vt52 state engine, a smaller version of the Arduino code*/ +void dspvt52(char* c){ + +/* reading and processing multi byte commands */ + switch (vt52s) { + case 'Y': + if (dspesc == 2) { + dspsetcursory(vt52number(*c)); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + dspsetcursorx(vt52number(*c)); + *c=0; + } + vt52s=0; + break; + case 'b': + dspsetfgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + case 'c': + dspsetbgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + } + +/* commands of the terminal in text mode */ + switch (*c) { + case 'v': /* GEMDOS / TOS extension enable wrap */ + break; + case 'w': /* GEMDOS / TOS extension disable wrap */ + break; + case '^': /* Printer extensions - print on */ + break; + case '_': /* Printer extensions - print off */ + break; + case 'W': /* Printer extensions - print without display on */ + break; + case 'X': /* Printer extensions - print without display off */ + break; + case 'V': /* Printer extensions - print cursor line */ + break; + case ']': /* Printer extension - print screen */ + break; + case 'F': /* enter graphics mode */ + break; + case 'G': /* exit graphics mode */ + break; + case 'Z': // Ident + break; + case '=': // alternate keypad on + case '>': // alternate keypad off + break; + case 'b': // GEMDOS / TOS extension text color + case 'c': // GEMDOS / TOS extension background color + vt52s=*c; + dspesc=1; + *c=0; + return; + case 'e': // GEMDOS / TOS extension enable cursor + break; + case 'f': // GEMDOS / TOS extension disable cursor + break; + case 'p': // GEMDOS / TOS extension reverse video + break; + case 'q': // GEMDOS / TOS extension normal video + break; + case 'A': // cursor up + sendcsi(); + putchar('A'); + break; + case 'B': // cursor down + sendcsi(); + putchar('B'); + break; + case 'C': // cursor right + sendcsi(); + putchar('C'); + break; + case 'D': // cursor left + sendcsi(); + putchar('D'); + break; + case 'E': // GEMDOS / TOS extension clear screen + *c=12; + dspesc=0; + return; + case 'H': // cursor home + *c=2; + dspesc=0; + return; + case 'Y': // Set cursor position + vt52s='Y'; + dspesc=2; + *c=0; + return; + case 'J': // clear to end of screen + sendcsi(); + putchar('J'); + break; + case 'd': // GEMDOS / TOS extension clear to start of screen + sendcsi(); + putchar('1'); putchar('J'); + break; + case 'K': // clear to the end of line + sendcsi(); + putchar('K'); + break; + case 'l': // GEMDOS / TOS extension clear line + sendcsi(); + putchar('2'); putchar('K'); + break; + case 'o': // GEMDOS / TOS extension clear to start of line + sendcsi(); + putchar('1'); putchar('K'); + break; + case 'k': // GEMDOS / TOS extension restore cursor + break; + case 'j': // GEMDOS / TOS extension save cursor + break; + case 'I': // reverse line feed + putchar(27); + putchar('M'); + break; + case 'L': // Insert line + break; + case 'M': // Delete line - questionable + sendcsi(); + putchar('2'); putchar('K'); + break; + } + dspesc=0; + *c=0; +} +#endif + +void serialwrite(char c) { + +/* the vt52 state engine */ +#ifdef POSIXVT52TOANSI + if (dspesc) { + dspvt52(&c); + if (c == 0) return; + } + +/* ESC is caught here and we only listen to VT52 not to ANSI */ + if (c == 27 && vt52active) { + dspesc=1; + return; + } +#endif + +/* this is the character translation routine to convert the Arduino + style characters 12 for CLS and 2 for HOME to ANSI, makes + BASIC programs more compatible */ +#ifdef POSIXTERMINAL + switch (c) { +/* form feed is clear screen - compatibility with Arduino code */ + case 12: + sendcsi(); + putchar('2'); putchar('J'); +/* home sequence in the arduino code */ + case 2: + sendcsi(); + putchar('H'); + return; + } +#endif + +/* finally send the plain character */ + putchar(c); +} + + +/* + * reading from the console with inch + * this mixes interpreter levels as inch is used here + * this code needs to go to the main interpreter section after + * thorough rewrite + */ +void consins(char *b, short nb) { + char c; + + z.a=1; + while(z.a < nb) { + c=inch(); + if (c == '\r') c=inch(); + if (c == '\n' || cheof(c)) { /* terminal character is either newline or EOF */ + break; + } else { + b[z.a++]=c; + } + } + b[z.a]=0x00; + z.a--; + b[0]=(unsigned char)z.a; +} + +/* + * handling the second serial interface - only done on Mac so far + * test code + * + * Tried to learn from https://www.pololu.com/docs/0J73/15.5 + * + */ +#ifdef ARDUINOPRT +#include +#if !defined(MSDOS) && !defined(MINGW) +#include +#endif + +/* the file name of the printer port */ +int prtfile; + +/* the buffer to read one character */ +char prtbuf = 0; + + +void prtbegin() {} + +char prtopen(char* filename, int mode) { +#if !defined(MSDOS) && !defined(MINGW) + +/* try to open the device file */ + prtfile=open(filename, O_RDWR | O_NOCTTY); + if (prtfile == -1) { + perror(filename); + return 0; + } + +/* get rid of garbage */ + tcflush(prtfile, TCIOFLUSH); + +/* configure the device */ + struct termios opt; + (void) tcgetattr(prtfile, &opt); + + +/* raw terminal settings + opt.c_iflag &= ~(INLCR | IGNCR | ICRNL | IXON | IXOFF); + opt.c_oflag &= ~(ONLCR | OCRNL); + opt.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); +*/ + +/* timeout settings on read 100ms, read every character */ + opt.c_cc[VTIME] = 1; + opt.c_cc[VMIN] = 0; + +/* set the baudrate */ + switch (mode) { + case 9600: + cfsetospeed(&opt, B9600); + break; + default: + cfsetospeed(&opt, B9600); + break; + } + cfsetispeed(&opt, cfgetospeed(&opt)); + +/* set the termin attributes */ + tcsetattr(prtfile, TCSANOW, &opt); +#endif + + return 1; +} + +void prtclose() { + if (prtfile) close(prtfile); +} + +int prtstat(char c) {return 1; } +void prtset(int s) {} + +/* write the characters byte by byte */ +void prtwrite(char c) { + int i=write(prtfile, &c, 1); + if (i != 1) ert=1; +} + +/* read just one byte, map no bytes to EOF = -1 */ +char prtread() { + char c; + +/* something in the buffer? return it! */ + if (prtbuf) { + c=prtbuf; + prtbuf=0; + } else { +/* try to read */ + int i=read(prtfile, &c, 1); + if (i < 0) { + ert=1; + return 0; + } + if (i == 0) return -1; + } + return c; +} + +/* not yet implemented */ +short prtcheckch(){ + if (!prtbuf) { /* try to read */ + int i=read(prtfile, &prtbuf, 1); + if (i <= 0) prtbuf=0; + } + return prtbuf; +} + +short prtavailable(){ + return prtcheckch()!=0; +} + +#else +void prtbegin() {} +int prtstat(char c) {return 0; } +void prtset(int s) {} +void prtwrite(char c) {} +char prtread() {return 0;} +short prtcheckch(){ return 0; } +short prtavailable(){ return 0; } +#endif + + +/* + * The wire code + */ +#if defined(POSIXWIRE) && defined(POSIXPIGPIO) +#define HASWIRE +uint8_t wire_slaveid = 0; + +/* open the wire connection in pigpio */ +void wirebegin() { +} + +/* we return the handle here, inconsistent with the Arduino code */ +int wirestat(char c) { + return 1; +} + +void wireopen(char s, char m) { + if (m == 0) { + wire_slaveid=s; + } else if ( m == 1 ) { + outsc("** wire slave mode not implemented"); outcr(); + } else + error(EORANGE); +} + + +/* read a number of bytes, depending on the string length */ +void wireins(char *b, uint8_t l) { + int handle; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, wire_slaveid, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ert=1; + } + + z.a=i2c_read_device(pigpio_pi, handle, b+1, l); + + if (z.a < 0) { + ert=-1; + z.a=0; + } + b[0]=z.a; + + i2c_close(pigpio_pi, handle); +} + + + +void wireouts(char *b, uint8_t l) { + int handle; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, wire_slaveid, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ert=1; + } + + if (i2c_write_device(pigpio_pi, handle, b, l) < 0) ert=-1; + + i2c_close(pigpio_pi, handle); +} + +short wireavailable() { return 1; } + +/* the register access functions */ +short wirereadbyte(short port) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ert=1; + return -1; + } + + res=i2c_read_byte(pigpio_pi, handle); + i2c_close(pigpio_pi, handle); + return res; +} + +/* use the simple wire byte function */ +void wirewritebyte(short port, short data) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ert=1; return; } + + ert=i2c_write_byte(pigpio_pi, handle, data); + + i2c_close(pigpio_pi, handle); +} + + +/* this code used the write byte function twice */ +/* +void wirewriteword(short port, short data1, short data2) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ert=1; return; } + + ert=i2c_write_byte(pigpio_pi, handle, data1); + ert+=i2c_write_byte(pigpio_pi, handle, data2); + + i2c_close(pigpio_pi, handle); +} +*/ + +/* use the raw access function in a buffer */ +void wirewriteword(short port, short data1, short data2) { + int res, handle; + mem_t buf[2]; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ert=1; return; } + + buf[0]=data1; + buf[1]=data2; + + if (i2c_write_device(pigpio_pi, handle, buf, 2) <0 ) ert=-1; + + i2c_close(pigpio_pi, handle); +} + +#else +void wirebegin() {} +int wirestat(char c) {return 0; } +void wireopen(char s, char m) {} +void wireins(char *b, uint8_t l) { b[0]=0; z.a=0; } +void wireouts(char *b, uint8_t l) {} +short wireavailable() { return 1; } +short wirereadbyte(short port) { return 0; } +void wirewritebyte(short port, short data) { return; } +void wirewriteword(short port, short data1, short data2) { return; } +#endif + +/* + * Read from the radio interface, radio is always block + * oriented. + */ +int radiostat(char c) {return 0; } +void radioset(int s) {} +void radioins(char *b, short nb) { b[0]=0; b[1]=0; z.a=0; } +void radioouts(char *b, short l) {} +void iradioopen(char *filename) {} +void oradioopen(char *filename) {} +short radioavailable() { return 0; } + +/* Arduino sensors */ +void sensorbegin() {} +number_t sensorread(short s, short v) {return 0;}; + +/* + * Experimental code to simulate 64kb SPI SRAM modules + * + * currently used to test the string code of the mem + * interface + * + */ + +#ifdef SPIRAMSIMULATOR +#define USEMEMINTERFACE + +static mem_t* spiram; + +/* the RAM begin method sets the RAM to byte mode */ +address_t spirambegin() { + spiram=(mem_t*)malloc(65536); + if (maxnum>32767) return 65534; else return 32766; +} + +/* the simple unbuffered byte write, with a cast to signed char */ +void spiramrawwrite(address_t a, mem_t c) {spiram[a]=c;} + +/* the simple unbuffered byte read, with a cast to signed char */ +mem_t spiramrawread(address_t a) {return spiram[a];} + +/* the buffers calls, also only simulated here */ + +void spiram_rwbufferwrite(address_t a, mem_t c) {spiram[a]=c;} + +mem_t spiram_rwbufferread(address_t a) {return spiram[a];} + +mem_t spiram_robufferread(address_t a) {return spiram[a];} + +/* to handle strings in SPIRAM situations two more buffers are needed + * they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set + */ +#define SPIRAMSBSIZE 128 +char spistrbuf1[SPIRAMSBSIZE]; +char spistrbuf2[SPIRAMSBSIZE]; +#endif + +/* stub for events */ +#ifdef HASEVENTS +mem_t enableevent(mem_t pin) { + int i; + if ((i=eventindex(pin))<0) return 0; + else { + eventlist[i].enabled=1; + return 1; + } +} +void disableevent(mem_t pin) {} +#endif + + +#endif + diff --git a/data/Basic2/IoTBasic/IoTBasic.ino b/data/Basic2/IoTBasic/IoTBasic.ino new file mode 100644 index 0000000000000000000000000000000000000000..2a4eab8cd2e0531ca4fd17e71f154a4dcd7f2a08 --- /dev/null +++ b/data/Basic2/IoTBasic/IoTBasic.ino @@ -0,0 +1,10935 @@ +/*---------------------------------------------------------------- + Please read this before compiling the code. + - Review hardware.h for settings specific hardware settings. + Super important on Arduino and Raspberry PI. + - language.h controls the language features. + A heuristic is used to compile the language features if + not defined explicitly in language.h. + ----------------------------------------------------------------- + + Stefan's IoT BASIC interpreter - BASIC for everywhere. + + See the licence file on + https://github.com/slviajero/tinybasic for copyright/left. + (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + + Author: Stefan Lenz, sl001@serverfabrik.de + + Currently there are two versions of the runtime environment. + One contains all platforms compiled in the Arduino IDE + (ESP8266, ESP32, AVR, MEGAAVR, SAM*, RP2040, STM*, + XMC*, NRENESA, Arduino GIGA). + + + Anothers contains all platforms compiled in gcc with a POSIX OS + (Mac, Raspberry, Windows/MINGW) plus rudimentary MSDOS with tc2.0. The + latter will be removed soon. + + The interface to BASIC is identical. +*/ + +/* the runtime environment */ +#include "hardware.h" +#include "runtime.h" + +/* + * the core basic language headers + */ +#include "language.h" +#include "basic.h" + +/* use long jump for error handling */ +#if USELONGJUMP == 1 +#include "setjmp.h" +#endif + +/* Global BASIC definitions */ + +/* + All BASIC keywords for the tokens, PROGMEM on Arduino + Normal memory elsewhere. +*/ +const char sge[] PROGMEM = "=>"; +const char sle[] PROGMEM = "<="; +const char sne[] PROGMEM = "<>"; +/* Palo Alto language set */ +const char sprint[] PROGMEM = "PRINT"; +const char slet[] PROGMEM = "LET"; +const char sinput[] PROGMEM = "INPUT"; +const char sgoto[] PROGMEM = "GOTO"; +const char sgosub[] PROGMEM = "GOSUB"; +const char sreturn[] PROGMEM = "RETURN"; +const char sif[] PROGMEM = "IF"; +const char sfor[] PROGMEM = "FOR"; +const char sto[] PROGMEM = "TO"; +const char sstep[] PROGMEM = "STEP"; +const char snext[] PROGMEM = "NEXT"; +const char sstop[] PROGMEM = "STOP"; +const char slist[] PROGMEM = "LIST"; +const char snew[] PROGMEM = "NEW"; +const char srun[] PROGMEM = "RUN"; +const char sabs[] PROGMEM = "ABS"; +const char srnd[] PROGMEM = "RND"; +const char ssize[] PROGMEM = "SIZE"; +const char srem[] PROGMEM = "REM"; +/* Apple 1 language set */ +#ifdef HASAPPLE1 +const char snot[] PROGMEM = "NOT"; +const char sand[] PROGMEM = "AND"; +const char sor[] PROGMEM = "OR"; +const char slen[] PROGMEM = "LEN"; +const char ssgn[] PROGMEM = "SGN"; +const char speek[] PROGMEM = "PEEK"; +const char sdim[] PROGMEM = "DIM"; +const char sclr[] PROGMEM = "CLR"; +const char shimem[] PROGMEM = "HIMEM"; +const char stab[] PROGMEM = "TAB"; +const char sthen[] PROGMEM = "THEN"; +const char sbend[] PROGMEM = "END"; +const char spoke[] PROGMEM = "POKE"; +#endif +/* Stefan's basic additions */ +#ifdef HASSTEFANSEXT +const char scont[] PROGMEM = "CONT"; +const char ssqr[] PROGMEM = "SQR"; +const char spow[] PROGMEM = "POW"; +const char smap[] PROGMEM = "MAP"; +const char sdump[] PROGMEM = "DUMP"; +const char sbreak[] PROGMEM = "BREAK"; +#endif +/* LOAD and SAVE is always there */ +const char ssave[] PROGMEM = "SAVE"; +const char sload[] PROGMEM = "LOAD"; +#ifdef HASSTEFANSEXT +const char sget[] PROGMEM = "GET"; +const char sput[] PROGMEM = "PUT"; +const char sset[] PROGMEM = "SET"; +const char scls[] PROGMEM = "CLS"; +const char slocate[] PROGMEM = "LOCATE"; +const char selse[] PROGMEM = "ELSE"; +#endif +/* Arduino functions */ +#ifdef HASARDUINOIO +const char spinm[] PROGMEM = "PINM"; +const char sdwrite[] PROGMEM = "DWRITE"; +const char sdread[] PROGMEM = "DREAD"; +const char sawrite[] PROGMEM = "AWRITE"; +const char saread[] PROGMEM = "AREAD"; +const char sdelay[] PROGMEM = "DELAY"; +const char smillis[] PROGMEM = "MILLIS"; +const char sazero[] PROGMEM = "AZERO"; +const char sled[] PROGMEM = "LED"; +#endif +#ifdef HASTONE +const char stone[] PROGMEM = "PLAY"; +#endif +#ifdef HASPULSE +const char spulse[] PROGMEM = "PULSE"; +#endif +/* DOS functions */ +#ifdef HASFILEIO +const char scatalog[] PROGMEM = "CATALOG"; +const char sdelete[] PROGMEM = "DELETE"; +const char sfopen[] PROGMEM = "OPEN"; +const char sfclose[] PROGMEM = "CLOSE"; +const char sfdisk[] PROGMEM = "FDISK"; +#endif +/* low level access functions */ +#ifdef HASUSRCALL +const char susr[] PROGMEM = "USR"; +const char scall[] PROGMEM = "CALL"; +#endif +/* mathematics */ +#ifdef HASFLOAT +const char ssin[] PROGMEM = "SIN"; +const char scos[] PROGMEM = "COS"; +const char stan[] PROGMEM = "TAN"; +const char satan[] PROGMEM = "ATAN"; +const char slog[] PROGMEM = "LOG"; +const char sexp[] PROGMEM = "EXP"; +#endif +/* INT is always needed to make float/int programs compatible */ +const char sint[] PROGMEM = "INT"; +/* elemetars graphics */ +#ifdef HASGRAPH +const char scolor[] PROGMEM = "COLOR"; +const char splot[] PROGMEM = "PLOT"; +const char sline[] PROGMEM = "LINE"; +const char scircle[] PROGMEM = "CIRCLE"; +const char srect[] PROGMEM = "RECT"; +const char sfcircle[] PROGMEM = "FCIRCLE"; +const char sfrect[] PROGMEM = "FRECT"; +#endif +/* Dartmouth BASIC extensions */ +#ifdef HASDARTMOUTH +const char sdata[] PROGMEM = "DATA"; +const char sread[] PROGMEM = "READ"; +const char srestore[] PROGMEM = "RESTORE"; +const char sdef[] PROGMEM = "DEF"; +const char sfn[] PROGMEM = "FN"; +const char son[] PROGMEM = "ON"; +#endif +/* The Darkarts commands */ +#ifdef HASDARKARTS +const char smalloc[] PROGMEM = "MALLOC"; +const char sfind[] PROGMEM = "FIND"; +const char seval[] PROGMEM = "EVAL"; +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING +const char serror[] PROGMEM = "ERROR"; +#endif +/* iot extensions */ +#ifdef HASIOT +const char savail[] PROGMEM = "AVAIL"; +const char sstr[] PROGMEM = "STR"; +const char sinstr[] PROGMEM = "INSTR"; +const char sval[] PROGMEM = "VAL"; +const char snetstat[] PROGMEM = "NETSTAT"; +const char ssensor[] PROGMEM = "SENSOR"; +const char swire[] PROGMEM = "WIRE"; +const char ssleep[] PROGMEM = "SLEEP"; +#endif +/* events and interrupts */ +#ifdef HASTIMER +const char safter[] PROGMEM = "AFTER"; +const char severy[] PROGMEM = "EVERY"; +#endif +#ifdef HASEVENTS +const char sevent[] PROGMEM = "EVENT"; +#endif +#ifdef HASSTRUCT +const char swhile[] PROGMEM = "WHILE"; +const char swend[] PROGMEM = "WEND"; +const char srepeat[] PROGMEM = "REPEAT"; +const char suntil[] PROGMEM = "UNTIL"; +const char sswitch[] PROGMEM = "SWITCH"; +const char scase[] PROGMEM = "CASE"; +const char sswend[] PROGMEM = "SWEND"; +const char sdo[] PROGMEM = "DO"; +const char sdend[] PROGMEM = "DEND"; +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS +const char sfend[] PROGMEM = "FEND"; +#endif +#endif +#ifdef HASMSSTRINGS +const char sasc[] PROGMEM = "ASC"; +const char schr[] PROGMEM = "CHR"; +const char sright[] PROGMEM = "RIGHT"; +const char sleft[] PROGMEM = "LEFT"; +const char smid[] PROGMEM = "MID"; +const char sspc[] PROGMEM = "SPC"; +#endif +#ifdef HASEDITOR +const char sedit[] PROGMEM = "EDIT"; +#endif +#ifdef HASHELP +const char shelp[] PROGMEM = "HELP"; +#endif +/* was BITWISE, now always there because really important */ +const char sshl[] PROGMEM = "<<"; +const char sshr[] PROGMEM = ">>"; +const char sbit[] PROGMEM = "BIT"; + + +/* zero terminated keyword storage */ +const char* const keyword[] PROGMEM = { + sge, sle, sne, sprint, slet, sinput, + sgoto, sgosub, sreturn, sif, sfor, sto, + sstep, snext, sstop, slist, snew, srun, + sabs, srnd, ssize, srem, +#ifdef HASAPPLE1 + snot, sand, sor, slen, ssgn, speek, sdim, + sclr, shimem, stab, sthen, + sbend, spoke, +#endif +#ifdef HASSTEFANSEXT + scont, ssqr, spow, smap, sdump, sbreak, +#endif + ssave, sload, +#ifdef HASSTEFANSEXT + sget, sput, sset, scls, slocate, selse, +#endif +#ifdef HASARDUINOIO + spinm, sdwrite, sdread, sawrite, saread, + sdelay, smillis, sazero, sled, +#endif +#ifdef HASTONE + stone, +#endif +#ifdef HASPULSE + spulse, +#endif +#ifdef HASFILEIO + scatalog, sdelete, sfopen, sfclose, sfdisk, +#endif +#ifdef HASUSRCALL + susr, scall, +#endif +#ifdef HASFLOAT + ssin, scos, stan, satan, slog, sexp, +#endif + sint, +#ifdef HASGRAPH + scolor, splot, sline, scircle, srect, + sfcircle, sfrect, +#endif +#ifdef HASDARTMOUTH + sdata, sread, srestore, sdef, sfn, son, +#endif +#ifdef HASDARKARTS + smalloc, sfind, seval, +#endif + /* complex error handling */ +#ifdef HASERRORHANDLING + serror, +#endif +#ifdef HASIOT + savail, sstr, sinstr, sval, + snetstat, ssensor, swire, ssleep, +#endif +#ifdef HASTIMER + safter, severy, +#endif +#ifdef HASEVENTS + sevent, +#endif +#ifdef HASSTRUCT + swhile, swend, srepeat, suntil, sswitch, scase, sswend, + sdo, sdend, +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS + sfend, +#endif +#endif +#ifdef HASMSSTRINGS + sasc, schr, sright, sleft, smid, sspc, +#endif +#ifdef HASEDITOR + sedit, +#endif +#ifdef HASHELP + shelp, +#endif + sshl, sshr, sbit, + 0 +}; + +/* the zero terminated token dictonary needed for scalability */ +const token_t tokens[] PROGMEM = { + GREATEREQUAL, LESSEREQUAL, NOTEQUAL, TPRINT, TLET, + TINPUT, TGOTO, TGOSUB, TRETURN, TIF, TFOR, TTO, TSTEP, + TNEXT, TSTOP, TLIST, TNEW, TRUN, TABS, TRND, TSIZE, TREM, +#ifdef HASAPPLE1 + TNOT, TAND, TOR, TLEN, TSGN, TPEEK, TDIM, TCLR, + THIMEM, TTAB, TTHEN, TEND, TPOKE, +#endif +#ifdef HASSTEFANSEXT + TCONT, TSQR, TPOW, TMAP, TDUMP, TBREAK, +#endif + TSAVE, TLOAD, +#ifdef HASSTEFANSEXT + TGET, TPUT, TSET, TCLS, TLOCATE, TELSE, +#endif +#ifdef HASARDUINOIO + TPINM, TDWRITE, TDREAD, TAWRITE, TAREAD, TDELAY, TMILLIS, + TAZERO, TLED, +#endif +#ifdef HASTONE + TTONE, +#endif +#ifdef HASPULSE + TPULSE, +#endif +#ifdef HASFILEIO + TCATALOG, TDELETE, TOPEN, TCLOSE, TFDISK, +#endif +#ifdef HASSTEFANSEXT + TUSR, TCALL, +#endif +#ifdef HASFLOAT + TSIN, TCOS, TTAN, TATAN, TLOG, TEXP, +#endif + TINT, +#ifdef HASGRAPH + TCOLOR, TPLOT, TLINE, TCIRCLE, TRECT, + TFCIRCLE, TFRECT, +#endif +#ifdef HASDARTMOUTH + TDATA, TREAD, TRESTORE, TDEF, TFN, TON, +#endif +#ifdef HASDARKARTS + TMALLOC, TFIND, TEVAL, +#endif +#ifdef HASERRORHANDLING + TERROR, +#endif +#ifdef HASIOT + TAVAIL, TSTR, TINSTR, TVAL, TNETSTAT, + TSENSOR, TWIRE, TSLEEP, +#endif +#ifdef HASTIMER + TAFTER, TEVERY, +#endif +#ifdef HASEVENTS + TEVENT, +#endif +#ifdef HASSTRUCT + TWHILE, TWEND, TREPEAT, TUNTIL, TSWITCH, TCASE, TSWEND, + TDO, TDEND, +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS + TFEND, +#endif +#endif +#ifdef HASMSSTRINGS + TASC, TCHR, TRIGHT, TLEFT, TMID, TSPC, +#endif +#ifdef HASEDITOR + TEDIT, +#endif +#ifdef HASHELP + THELP, +#endif + TSHL, TSHR, TBIT, + 0 +}; + +/* experimental, do not use right now */ +const bworkfunction_t workfunctions[] PROGMEM = { + 0, 0, 0, xprint, 0 +}; + +/* errors and messages */ +const char mfile[] PROGMEM = "file.bas"; +const char mprompt[] PROGMEM = "> "; +const char mgreet[] PROGMEM = "Stefan's Basic 2.0"; +const char mline[] PROGMEM = "LINE"; +const char mnumber[] PROGMEM = "NUMBER"; +const char mvariable[] PROGMEM = "VARIABLE"; +const char marray[] PROGMEM = "ARRAY"; +const char mstring[] PROGMEM = "STRING"; +const char mstringv[] PROGMEM = "STRINGVAR"; +const char egeneral[] PROGMEM = "Error"; +#ifdef HASERRORMSG +const char eunknown[] PROGMEM = "Syntax"; +const char enumber[] PROGMEM = "Number"; +const char edivide[] PROGMEM = "Div by 0"; +const char eline[] PROGMEM = "Unknown Line"; +const char emem[] PROGMEM = "Memory"; +const char estack[] PROGMEM = "Stack"; +const char erange[] PROGMEM = "Range"; +const char estring[] PROGMEM = "String"; +const char evariable[] PROGMEM = "Variable"; +const char eloop[] PROGMEM = "Loop"; +const char efile[] PROGMEM = "File"; +const char efun[] PROGMEM = "Function"; +const char eargs[] PROGMEM = "Args"; +const char eeeprom[] PROGMEM = "EEPROM"; +const char esdcard[] PROGMEM = "SD card"; +#endif +#ifdef HASHELP +#ifdef BASICFULL +const char mbasiclangset[] PROGMEM = "full"; +#elif defined(BASICSIMPLE) +const char mbasiclangset[] PROGMEM = "simple with integer"; +#elif defined(BASICINTEGER) +const char mbasiclangset[] PROGMEM = "integer"; +#elif defined(BASICMINIMAL) +const char mbasiclangset[] PROGMEM = "minimal"; +#elif defined(BASICSIMPLEWITHFLOAT) +const char mbasiclangset[] PROGMEM = "simple with float"; +#elif defined(BASICTINYWITHFLOAT) +const char mbasiclangset[] PROGMEM = "tiny with float"; +#else +const char mbasiclangset[] PROGMEM = "custom"; +#endif +const char mlangset[] PROGMEM = "Language set: "; +const char mkeywords[] PROGMEM = "Keywords: "; +#endif + +const char* const message[] PROGMEM = { + mfile, mprompt, mgreet, + mline, mnumber, mvariable, marray, + mstring, mstringv, + egeneral +#ifdef HASERRORMSG + , eunknown, enumber, edivide, eline, + emem, estack, erange, + estring, evariable, eloop, efile, efun, eargs, + eeeprom, esdcard +#endif +#ifdef HASHELP + , mbasiclangset, mlangset, mkeywords +#endif +}; + +/* + maxnum: the maximum accurate(!) integer of a + 32 bit float + strindexsize: in the new code this is simply the size of the + stringlength type. Currently only 1 byte and 2 bytes are tested. +*/ +#ifdef HASFLOAT +#ifdef HAS64BIT +const number_t maxnum = 9007199254740992; +#else +const number_t maxnum = 16777216; +#endif +#else +const number_t maxnum = (number_t)~((number_t)1 << (sizeof(number_t) * 8 - 1)); +#endif +const int numsize = sizeof(number_t); +const int addrsize = sizeof(address_t); +const int eheadersize = sizeof(address_t) + 1; +const int strindexsize = sizeof(stringlength_t); /* default in the meantime, strings up to unsigned 16 bit length */ +const address_t maxaddr = (address_t)(~0); + +/* + The basic interpreter is implemented as a stack machine + with global variable for the interpreter state, the memory + and the arithmetic during run time. +*/ + +/* the stack, all BASIC arithmetic is done here */ +accu_t stack[STACKSIZE]; +address_t sp = 0; + +/* a small buffer to process string arguments, mostly used for Arduino PROGMEM and string functions */ +/* use with care as it is used in some string functions */ +char sbuffer[SBUFSIZE]; + +/* the input buffer, the lexer can tokenize this and run from it, bi is an index to this. + bi must be global as it is the program cursor in interactive mode */ +char ibuffer[BUFSIZE] = "\0"; +char *bi; + +/* a static array of variables A-Z for the small systems that have no heap */ +#ifndef HASAPPLE1 +number_t vars[VARSIZE]; +#endif + +/* the BASIC working memory, either malloced or allocated as a global array */ +#if (defined(MEMSIZE) && MEMSIZE != 0) +mem_t mem[MEMSIZE]; +#else +mem_t* mem; +#endif +address_t himem, memsize; + +/* reimplementation of the loops, will replace the forstack */ +bloop_t loopstack[FORDEPTH]; +index_t loopsp = 0; + +/* the GOSUB stack remembers an address to jump to */ +address_t gosubstack[GOSUBDEPTH]; +index_t gosubsp = 0; + +/* arithmetic accumulators */ +number_t x, y; + +/* the name of on object, replaced xc and xy in BASIC 1 */ +name_t name; + +/* an address accumulator, used a lot in string operations */ +address_t ax; + +/* a string index registers, new style identifying a string either in C memory or BASIC memory */ +string_t sr; + +/* the active token */ +token_t token; + +/* the curent error, can be a token, hence token type */ +token_t er; +/* the jmp buffer for the error handling */ +#if USELONGJUMP == 1 +jmp_buf sthook; +#endif + +/* a trapable error */ +mem_t ert; + +/* the interpreter state, interactive, run or run from EEPROM */ +mem_t st; + +/* the current program location */ +address_t here; + +/* the topmost byte of a program in memory, beginning of free BASIC RAM */ +address_t top; + +/* used to format output with # */ +mem_t form = 0; + +/* do we use the Microsoft convention of an array starting at 0 or 1 like Apple 1 + two seperate variables because arraylimit can be changed at runtime for existing arrays + msarraylimit says if an array should be created with n or n+1 elements */ +#ifdef MSARRAYLIMITS +mem_t msarraylimits = 1; +address_t arraylimit = 0; +#else +mem_t msarraylimits = 0; +address_t arraylimit = 1; +#endif + +/* behaviour around boolean, needed to change the interpreters personality at runtime */ +/* -1 is microsoft true while 1 is Apple 1 and C style true. */ +mem_t booleanmode = BOOLEANMODE; + +/* setting the interpreter to integer at runtime */ +mem_t forceint = 0; + +/* the default size of a string now as a variable */ +stringlength_t defaultstrdim = STRSIZEDEF; + +/* the base of the random number generator + 0 is Apple 1 style RND from 0 to n-epsilon + 1 is Palo Alto style from 1 to n +*/ +mem_t randombase = 0; + +/* is substring logic used or not */ +#ifdef SUPPRESSSUBSTRINGS +mem_t substringmode = 0; +#else +mem_t substringmode = 1; +#endif + +/* the flag for true MS tabs */ +mem_t reltab = 0; +mem_t dummy; + +/* the flag for lower case names */ +mem_t lowercasenames = 0; + +/* the number of arguments parsed from a command */ +mem_t args; + +/* the random number seed, this is unsigned */ +#ifndef HASFLOAT +address_t rd; +#else +unsigned long rd; +#endif + +/* the RUN debuglevel */ +mem_t debuglevel = 0; + +/* DATA pointer, where is the current READ statement */ +#ifdef HASDARTMOUTH +address_t data = 0; +address_t datarc = 1; +#endif + +/* + process command line arguments in the POSIX world + bnointafterrun is a flag to remember if called as command + line argument, in this case we don't return to interactive +*/ +#ifdef HASARGS +int bargc; +char** bargv; +mem_t bnointafterrun = 0; +#endif + +/* formaters lastouttoken and spaceafterkeyword to make a nice LIST */ +mem_t lastouttoken; +mem_t spaceafterkeyword; +mem_t outliteral = 0; +mem_t lexliteral = 0; + +/* + The cache for the heap search - helps the string code. + The last found object on the heap is remembered. This is needed + because the string code sometime searches the heap twice during the + same operation. Also, bfind is used to remember the length of the + last found object. +*/ +#ifdef HASAPPLE1 +heap_t bfind_object; +#endif + +/* + a variable for string to numerical conversion, + telling you were the number ended. +*/ +address_t vlength; + +/* the timer code - very simple needs to be converted to to a struct */ +/* timer type */ +#ifdef HASTIMER +btimer_t after_timer = {0, 0, 0, 0, 0}; +btimer_t every_timer = {0, 0, 0, 0, 0}; +#endif + +/* the event code */ +#ifdef HASEVENTS + +/* should go to the headers eventually */ +#define EVENTLISTSIZE 4 + +/* the event list, nevents is the number of active events */ +mem_t nevents = 0; +int ievent = 0; +mem_t events_enabled = 1; +volatile bevent_t eventlist[EVENTLISTSIZE]; + +/* the extension of the GOSUB stack */ +mem_t gosubarg[GOSUBDEPTH]; +#endif + +#ifdef HASERRORHANDLING +/* the error handler type, very simple for now */ +typedef struct { + mem_t type; + address_t linenumber; +} berrorh_t; + +berrorh_t berrorh = {0 , 0}; +mem_t erh = 0; +#endif + +/* the string for real time clocks */ +char rtcstring[20] = { 0 }; + +/* the units pulse operates on, in microseconds*/ +address_t bpulseunit = 10; + +/* only needed if the break condition is handled in the background */ +char breakcondition = 0; + +/* the FN context, how deep are we in a nested function call, negative values reserved */ +int fncontext = 0; + +/* the accuracy of a equal or not equal statement on numbers */ +#ifdef HASFLOAT +number_t epsilon = 0; +#else +const number_t epsilon = 0; +#endif + +/* the number of digits displayed in the fraction of a float */ +#ifdef HASFLOAT +mem_t precision = 5; +#endif + +/* + * BASIC timer stuff, this is a core interpreter function now + */ + +/* the millis function for BASIC */ +void bmillis() { + number_t m; + /* millis is processed as integer and is cyclic mod maxnumber and not cast to float!! */ + m = (number_t) (millis() / (unsigned long)pop() % (unsigned long)maxnum); + push(m); +} + +/* + * Determine the possible basic memory size. + * using malloc causes some overhead which can be relevant on the smaller + * boards. + * + * Set MEMSIZE instead to a static value. In this case ballocmem + * just returns the static MEMSIZE. + * + * If SPIRAMINTERFACE is defined, we use the memory from a serial RAM and dont + * allocate it here at all. + */ + +#if (!defined(MEMSIZE) || MEMSIZE == 0) && !(defined(SPIRAMINTERFACE)) +address_t ballocmem() { + + /* on most platforms we know the free memory for BASIC, this comes from runtime */ + long m = freememorysize(); + + /* we subtract some language feature depended things, this is only needed on + small Arduino boards with memories below 16kb */ + if (m < 16000) { +#ifdef HASAPPLE1 + m -= 64; /* strings cost memory */ +#endif +#ifdef USELONGJUMP + m -= 160; /* odd but true on Ardunio UNO and the like */ +#endif +#ifdef HASFLOAT + m -= 96; +#endif +#ifdef HASGRAPH + m -= 256; +#endif + } + + /* and keep fingers crossed here */ + if (m < 0) m = 128; + + /* we allocate as much as address_t can handle */ + if (m > maxaddr) m = maxaddr; + + /* try to allocate the memory */ + mem = (mem_t*)malloc(m); + if (mem != 0) return m - 1; + + /* fallback if allocation failed, 128 bytes */ + mem = (mem_t*)malloc(128); + if (mem != 0) return 128; else return 0; + +} +#else +address_t ballocmem() { + return MEMSIZE - 1; +}; +#endif + +/* + Layer 0 function - variable handling. + + These function access variables and data +*/ + +/* + Eeprom load / save / autorun functions + needed for SAVE and LOAD to an EEPROM + autorun is generic. + + The eeprom is accessed through the runtime functions + elength(), eupdate(), ewrite() and eflush(); + +*/ + +/* save a file to EEPROM, disabled if we use the EEPROM directly */ +void esave() { +#ifndef EEPROMMEMINTERFACE + address_t a = 0; + + /* does the program fit into the eeprom */ + if (top + eheadersize < elength()) { + + /* EEPROM per default is 255, 0 indicates that there is a program */ + eupdate(a++, 0); + + /* store the size of the program in byte 1,2,... of the EEPROM*/ + setaddress(a, beupdate, top); + a += addrsize; + + /* store the program */ + while (a < top + eheadersize) { + eupdate(a, memread2(a - eheadersize)); + a++; + } + eupdate(a++, 0); + + /* needed on I2C EEPROM and other platforms where we buffer */ + eflush(); + + } else { + error(EOUTOFMEMORY); + er = 0; + } +#endif +} + +/* load a file from EEPROM, disabled if the use the EEPROM directly */ +void eload() { +#ifndef EEPROMMEMINTERFACE + address_t a = 0; + + /* have we stored a program? */ + if (elength() > 0 && (eread(a) == 0 || eread(a) == 1)) { + + /* how long is it? */ + a++; + top = getaddress(a, beread); + a += addrsize; + + /* load it to memory, memwrite2 is direct mem access */ + while (a < top + eheadersize) { + memwrite2(a - eheadersize, beread(a)); + a++; + } + } else { + /* no valid program data is stored */ + error(EEEPROM); + } +#endif +} + +/* autorun something from EEPROM or a filesystem */ +char autorun() { + + /* autorun from EEPROM if there is an EEPROM flagged for autorun */ + if (elength() > 0 && eread(0) == 1) { /* autorun from the EEPROM */ + top = getaddress(1, beread); + st = SERUN; + return 1; /* EEPROM autorun overrules filesystem autorun */ + } + + /* autorun from a given command line argument, if we have one */ +#ifdef HASARGS + if (bargc > 1 && ifileopen(bargv[1])) { + xload(bargv[1]); + st = SRUN; + ifileclose(); + bnointafterrun = TERMINATEAFTERRUN; + return 1; + } +#endif + + /* on a platform with a file system, autoexec from a file */ +#if defined(FILESYSTEMDRIVER) + if (ifileopen("autoexec.bas")) { + xload("autoexec.bas"); + st = SRUN; + ifileclose(); + return 1; + } +#endif + + /* nothing to autorun */ + return 0; +} + +#ifdef HASAPPLE1 +/* + The new malloc code. Heap structure is now + payload + (payload size) + name + type + + In the new heap implementation himem points to the first free byte on the heap. + The payload is stored first and then the header. + + The new heap code uses name_t for the name of the object. + +*/ + +address_t bmalloc(name_t* name, address_t l) { + address_t payloadsize; /* the payload size */ + address_t heapheadersize = sizeof(name_t) + addrsize; /* this is only used to estimate the free space, it is the maximum */ + address_t b = himem; /* the current position on the heap, we store it in case of errors */ + + /* Initial DEBUG message. */ + if (DEBUG) { + outsc("** bmalloc with token "); + outnumber(name->token); outspc(); + outname(name); outspc(); + outnumber(l); outcr(); + } + + /* + How much space does the payload of the object need? + */ + switch (name->token) { + case VARIABLE: /* a variable needs numsize bytes*/ + payloadsize = numsize; + + break; +#ifndef HASMULTIDIM + case ARRAYVAR: /* a one dimensional array needs numsize*l bytes */ + payloadsize = numsize * l; + break; +#else + case ARRAYVAR: /* a two dimensional array needs numsize*l bytes plus one word for the additional dimension*/ + payloadsize = numsize * l + addrsize; + break; +#endif +#ifdef HASDARTMOUTH + case TFN: /* the jump address, the type of function/type of return value, the number of vars + and all variables are stored*/ + payloadsize = addrsize + 2 + sizeof(name_t) * l; + break; +#endif + /* these are plain buffers allocated by the MALLOC call in BASIC */ + default: + payloadsize = l; + } + + /* enough memory ?, on an EEPROM system we limit the heap to the RAM */ +#ifndef EEPROMMEMINTERFACE + if ((himem - top) < payloadsize + heapheadersize) { + error(EOUTOFMEMORY); + return 0; + } +#else + if (himem - (elength() - eheadersize) < payloadsize + heapheadersize) { + error(EOUTOFMEMORY); + return 0; + } +#endif + + /* first we reserve space for the payload, address points to the first byte of the payload */ + /* b points to the first free byte after the payload*/ + b -= payloadsize; + bfind_object.address = b + 1; + + /* for ARRAYS, STRINGS and BUFFERS, store the object length now - these are variable size objects*/ + if (name->token != VARIABLE) { + b -= (addrsize - 1); + setaddress(b, memwrite2, payloadsize); + if (DEBUG) { + outsc("** bmalloc writes payloadsize "); outnumber(payloadsize); + outsc(" at "); outnumber(b); outcr(); + } + b--; + } + + /* store the name of the objects including the type as identifier */ + b = setname_heap(b, name); + + /* store the type of the object */ + memwrite2(b--, name->token); + + /* if anything went wrong we exit here without changing himem */ + if (b < top || er) { + error(EOUTOFMEMORY); + return 0; + } + + /* we fill the cache here as well, both right now for compatibility */ + bfind_object.name = *name; + bfind_object.size = payloadsize; + + /* himem is the next free byte now again */ + himem = b; + + if (DEBUG) { + outsc("** bmalloc returns "); outnumber(bfind_object.address); + outsc(" himem is "); outnumber(himem); outcr(); + } + + /* return the address of the payload */ + return bfind_object.address; +} + +address_t bfind(name_t* name) { + address_t b, b0; + address_t i = 0; + + /* Initial DEBUG message. */ + if (DEBUG) { + outsc("*** bfind called for "); outname(name); + outsc(" on heap with token "); outnumber(name->token); + outsc(" himem is "); outnumber(himem); outcr(); + } + + /* do we have anything on the heap? */ + if (himem == memsize) return 0; else b = himem + 1; + + /* we have the object already in cache and return */ + if (name->token == bfind_object.name.token && cmpname(name, &bfind_object.name)) { + if (DEBUG) { + outsc("*** bfind found in cache "); + outname(name); + outsc(" at "); + outnumber(bfind_object.address); + outcr(); + } + return bfind_object.address; + } + + /* walk through the heap from the last object added to the first */ + while (b <= memsize) { + + /* get the name and the type and advance */ + bfind_object.name.token = memread2(b++); + b = getname(b, &bfind_object.name, memread2); + + /* determine the size of the object and advance */ + if (bfind_object.name.token != VARIABLE) { + bfind_object.size = getaddress(b, memread2); + b += addrsize; + } else { + bfind_object.size = numsize; + } + + /* this is the location of the payload */ + bfind_object.address = b; + + /* have we found the object */ + if (name->token == bfind_object.name.token && cmpname(name, &bfind_object.name)) { + if (DEBUG) { + outsc("*** bfind found "); + outname(name); + outsc(" at "); + outnumber(bfind_object.address); + outcr(); + } + return bfind_object.address; + } + + /* advance on the heap */ + b0 = b; + b += bfind_object.size; + + /* safety net for wraparound situations - should never happen - means corrupt heap */ + if (b0 > b) { + error(EVARIABLE); + return 0; + } + + } + + /* nothing found return 0 and clear the cache */ + + if (DEBUG) { + outsc("bfind returns 0"); + outcr(); + } + zeroheap(&bfind_object); + return 0; +} + +/* reimplementation bfree with name interface */ +address_t bfree(name_t* name) { + address_t b; + address_t i; + + if (DEBUG) { + outsc("*** bfree called for "); + outname(name); + outsc(" on heap with token "); + outnumber(name->token); + outcr(); + } + + /* use bfind to find the place */ + b = bfind(name); + + /* nothing found, return 0 */ + if (b == 0) return 0; + + if (DEBUG) { + outsc("** bfree found "); + outnumber(b); + outcr(); + } + + /* clear the entire memory area */ + for (i = himem; i <= b + bfind_object.size - 1; i++) memwrite2(i, 0); + + /* set the number of variables to the new value */ + himem = b + bfind_object.size - 1; + + if (DEBUG) { + outsc("** bfree returns "); + outnumber(himem); + outcr(); + } + + /* forget the chache, because heap structure has changed !! */ + zeroheap(&bfind_object); + return himem; +} + +/* the length of an object, we directly return from the cache */ +address_t blength(name_t* name) { + if (bfind(name)) return bfind_object.size; else return 0; +} +#endif /* HASAPPLE1 */ + +/* reimplementation of getvar and setvar with name_t */ +number_t getvar(name_t *name) { + address_t a; + + if (DEBUG) { + outsc("* getvar "); + outname(name); + outspc(); + outcr(); + } + + /* the special variables */ + if (name->c[0] == '@') { +#ifdef HASLONGNAMES + if (name->l == 1) name->c[1] = 0; /* to make sure @ alone works */ +#endif + switch (name->c[1]) { + case 'A': + return availch(); + case 'S': + return ert | ioer; + case 'I': + return id; + case 'O': + return od; + case 'T': + return millis(); + case 'C': + if (availch()) return inch(); else return 0; + case 'E': + return elength() / numsize; + case 0: + return (himem - top) / numsize; + case 'R': + return rd; +#ifdef HASSTEFANSEXT + case 'U': + return getusrvar(); +#endif +#ifdef HASFLOAT + case 'P': + return epsilon; +#endif +#ifdef HASIOT + case 'V': + return vlength; +#endif +#if defined(DISPLAYDRIVER) || defined (GRAPHDISPLAYDRIVER) + case 'X': + return dspgetcursorx(); + case 'Y': + return dspgetcursory(); +#endif + } + } + +#ifdef HASAPPLE1 + /* search the heap first */ + a = bfind(name); + if (!USELONGJUMP && er) return 0; + + /* if we don't find on the heap and it is not a static variable, we autocreate */ + if (a == 0) { + a = bmalloc(name, 0); + if (!USELONGJUMP && er) return 0; + } + + /* something went wrong */ + if (a == 0) { + error(EVARIABLE); + return 0; + } + /* retrieve the value */ + return getnumber(a, memread2); + +#else + /* we only have the static variable array */ + if (name->c[0] >= 65 && name->c[0] <= 91 && name->c[1] == 0) return vars[name->c[0] - 65]; + + /* systems without Apple1 extension i.e. HEAP throw an error */ + error(EVARIABLE); + return 0; +#endif +} + +/* set and create a variable */ +void setvar(name_t *name, number_t v) { + address_t a; + + if (DEBUG) { + outsc("* setvar "); + outname(name); + outspc(); + outnumber(v); + outcr(); + } + + /* the special variables */ + if (name->c[0] == '@') + switch (name->c[1]) { + case 'S': + ert = v; + ioer = v; + return; + case 'I': + id = v; + return; + case 'O': + od = v; + return; + case 'T': + return; + case 'C': + outch(v); + return; + case 'R': + rd = v; + return; +#ifdef HASTEFANSEXT + case 'U': + setusrvar(v); + return; +#endif +#ifdef HASFLOAT + case 'P': + epsilon = v; + return; +#endif +#ifdef HASIOT + case 'V': + return; +#endif +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case 'X': + dspsetcursorx((int)v); + /* set the charcount, this is half broken but works */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od] = v; +#endif + return; + case 'Y': + dspsetcursory((int)v); + return; +#endif + } + +#ifdef HASAPPLE1 + /* dynamically allocated vars */ + a = bfind(name); + + /* autocreate if not found */ + if (a == 0) { + a = bmalloc(name, 0); + if (!USELONGJUMP && er) return; + } + + /* something went wrong */ + if (a == 0) { + error(EVARIABLE); + return; + } + + /* set the value */ + setnumber(a, memwrite2, v); +#else + /* the static variable array */ + if (name->c[1] == 0 && name->c[0] >= 65 && name->c[0] <= 91) { + vars[name->c[0] - 65] = v; + return; + } + error(EVARIABLE); +#endif +} + +/* clr all variables */ +void clrvars() { + + /* delete all static variables */ + address_t i; + + /* clear static variable (only on no heap systems) */ +#ifndef HASAPPLE1 + for (i = 0; i < VARSIZE; i++) vars[i] = 0; +#endif + + /* then set the entire mem area to zero */ + for (i = himem; i < memsize; i++) memwrite2(i, 0); + + /* reset the heap start*/ + himem = memsize; + + /* and clear the cache */ +#ifdef HASAPPLE1 + zeroheap(&bfind_object); +#endif +} + +/* + The BASIC memory access function. + + getnumber2, getaddress and getstrlength are purely local, they + can be used with any memory reader function unlike the old BASIC 1 + code. +*/ + +/* + To avoid nasty warnings we encapsulate the EEPROM access functions + from runtime.c + This is only needed for the get* and set* functions as we use the + memreader_t and memwriter_t function pointers here. + This way, types in runtime.c can be changed without changing the + BASIC interpreter code. +*/ +mem_t beread(address_t a) { + return eread(a); +} + +void beupdate(address_t a, mem_t v) { + eupdate(a, v); +} + + +/* a generic memory reader for numbers */ +number_t getnumber(address_t m, memreader_t f) { + mem_t i; + accu_t z; + + for (i = 0; i < numsize; i++) z.c[i] = f(m++); + return z.n; +} + +/* same for addresses */ +address_t getaddress(address_t m, memreader_t f) { + mem_t i; + accu_t z; + + for (i = 0; i < addrsize; i++) z.c[i] = f(m++); + return z.a; +} + +/* same for strings */ +stringlength_t getstrlength(address_t m, memreader_t f) { + mem_t i; + accu_t z; + + z.a = 0; + for (i = 0; i < strindexsize; i++) z.c[i] = f(m++); + return z.a; +} + +/* set a number at a memory location, new version */ +void setnumber(address_t m, memwriter_t f, number_t v) { + mem_t i; + accu_t z; + + z.n = v; + for (i = 0; i < numsize; i++) f(m++, z.c[i]); +} + +/* set an address at a memory location */ +void setaddress(address_t m, memwriter_t f, address_t a) { + mem_t i; + accu_t z; + + z.a = a; + for (i = 0; i < addrsize; i++) f(m++, z.c[i]); +} + +/* set a stringlength at a memory location */ +void setstrlength(address_t m, memwriter_t f, stringlength_t s) { + mem_t i; + accu_t z; + + z.s = s; + for (i = 0; i < strindexsize; i++) f(m++, z.c[i]); +} + +/* + Code to handle names. These function mostly deal with the true + name part of name_t and not the token. The token has to be + processed by the caller. Name byte order conventon is + to have the first character in the lower byte and the second + character in the higher byte. Optionally, for HASLONGNAMES + the length of the name is stored before the name. + + setname_* sets a name and advance the number of bytes the name uses. + Two versions are needed because the heap is counted down + while the pgm is counted up. + + getname needs to go through a memreader because names are + read from eeproms as well! + + Currently the old code with twobyte names is still in place + if HASLONGNAMES is not defined. Default is now to have long names. + +*/ +#ifndef HASLONGNAMES + +/* this one is for the heap were we count down writing*/ +address_t setname_heap(address_t m, name_t* name) { + memwrite2(m--, name->c[1]); + memwrite2(m--, name->c[0]); + return m; +} + +/* this one is for the pgm were we count up writing */ +address_t setname_pgm(address_t m, name_t* name) { + memwrite2(m++, name->c[0]); + memwrite2(m++, name->c[1]); + return m; +} + +/* get a name from a memory location */ +address_t getname(address_t m, name_t* name, memreader_t f) { + name->c[0] = f(m++); + name->c[1] = f(m++); + return m; +} + +/* compare two names */ +mem_t cmpname(name_t* a, name_t* b) { + if (a->c[0] == b->c[0] && a->c[1] == b->c[1]) return 1; else return 0; +} + +/* copy the entire name stucture */ +void copyname(name_t* a, name_t* b) { + a->c[0] = b->c[0]; + a->c[1] = b->c[1]; + a->token = b->token; +} + +/* zero a name and a heap object */ +void zeroname(name_t* name) { + name->c[0] = 0; + name->c[1] = 0; + name->token = 0; +} + +void zeroheap(heap_t* heap) { + heap->address = 0; + heap->size = 0; + zeroname(&heap->name); +} + +/* output a name */ +void outname(name_t* name) { + outch(name->c[0]); + if (name->c[1]) outch(name->c[1]); +} + +#else +/* this one is for the heap were we count down writing*/ +address_t setname_heap(address_t m, name_t* name) { + mem_t l; + for (l = name->l; l > 0; l--) memwrite2(m--, name->c[l - 1]); + memwrite2(m--, name->l); + return m; +} + +/* this one is for the pgm were we count up writing */ +address_t setname_pgm(address_t m, name_t* name) { + mem_t l; + memwrite2(m++, name->l); + for (l = 0; l < name->l; l++) memwrite2(m++, name->c[l]); + return m; +} + +/* get a name from a memory location */ +address_t getname(address_t m, name_t* name, memreader_t f) { + mem_t l; + name->l = f(m++); + + for (l = 0; l < name->l; l++) name->c[l] = f(m++); + // for(; lc[l]=0; /* should not be there, is needed for */ + /* not having this here causes the obscure function namehandling bug if xfn does not do a zeroname + have not yet found the root cause for this */ + return m; +} + +/* compare two names */ +mem_t cmpname(name_t* a, name_t* b) { + mem_t l; + if (a->l != b->l) return 0; + for (l = 0; l < a->l; l++) if (a->c[l] != b->c[l]) return 0; + return 1; +} + +/* copy the entire name stucture */ +void copyname(name_t* a, name_t* b) { + mem_t l; + a->l = b->l; + for (l = 0; l < b->l; l++) a->c[l] = b->c[l]; + a->token = b->token; + if (a->l == 1) a->c[1] = 0; /* this is needed for compatibility with the short name code when handling special vars */ +} + +/* zero a name and a heap object */ +void zeroname(name_t* name) { + mem_t l; + name->l = 0; + for (l = 0; l < MAXNAME; l++) name->c[l] = 0; + name->token = 0; +} + +void zeroheap(heap_t* heap) { + heap->address = 0; + heap->size = 0; + zeroname(&heap->name); +} + +/* output a name */ +void outname(name_t* name) { + mem_t l; + for (l = 0; l < name->l; l++) outch(name->c[l]); +} +#endif + + +/* + Create an array. + + Arrays are created on the heap. This code allows redimensioning of arrays + which leads to a new array with the same name on the heap. This new + array is found first in a heap search. This ways we can have arrays + as local variables. + + msarraylimits is a flag to indicate that arrays should be created with + 0-n elements like in Microsoft BASIC. + +*/ +address_t createarray(name_t* variable, address_t i, address_t j) { + address_t a; + + /* if we want to me MS compatible, the array ranges from 0-n */ + if (msarraylimits) { + i += 1; + j += 1; + } + + /* this code allows redimension now for local variables */ +#ifdef HASAPPLE1 + if (DEBUG) { + outsc("* create array "); outname(variable); outspc(); + outsc("* with name length "); outnumber(variable->l); outspc(); + outnumber(i); outspc(); outnumber(j); outcr(); + } + +#ifndef HASMULTIDIM + return bmalloc(variable, i); +#else + + /* allocate the array space */ + a = bmalloc(variable, i * j); + + /* store the dimension of the array at the beginning of the array area */ + setaddress(a + i * j * numsize, memwrite2, j); + + /* return value is the address of the payload area */ + return a; +#endif +#endif + return 0; +} + +/* + The array function. + + We use the lefthandside object here with the convention that i is the first index + and j the second index. This is inconsistent with the use in strings. Will be fixed + when a true indexing type is introduced. +*/ +void array(lhsobject_t* object, mem_t getset, number_t* value) { + address_t a; /* the address of the array element */ + address_t h; /* the number of elements in the array */ + address_t l = arraylimit; /* the lower limit, defaults to the arraylimit, here for further use */ + address_t dim = 1; /* the array dimension */ + + if (DEBUG) { + outsc("* array: accessing "); + outname(&name); outspc(); outspc(); + outnumber(object->i); outspc(); + outnumber(object->j); outspc(); + outsc(" getset "); outch(getset); outcr(); + } + + /* handling the special array, range check and access is done here */ + if (object->name.c[0] == '@') { + switch (object->name.c[1]) { + /* @E ranges from 1 to the end of the EEPROM minus the header */ + case 'E': + h = elength() / numsize; + a = elength() - numsize * object->i; + if (a < eheadersize || a > elength() - numsize) { + error(EORANGE); + return; + } + if (getset == 'g') *value = getnumber(a, beread); + else if (getset == 's') setnumber(a, beupdate, *value); + return; +#if defined(DISPLAYDRIVER) && defined(DISPLAYCANSCROLL) + case 'D': + if (getset == 'g') *value = dspget(object->i - 1); + else if (getset == 's') dspset(object->i - 1, *value); + return; +#endif +#if defined(HASCLOCK) + case 'T': + if (getset == 'g') *value = rtcget(object->i); + else if (getset == 's') rtcset(object->i, *value); + return; +#endif +#if defined(ARDUINO) && defined(ARDUINOSENSORS) + case 'S': + if (getset == 'g') *value = sensorread(object->i, 0); + return; +#endif +#ifdef HASSTEFANSEXT + case 'U': + if (getset == 'g') *value = getusrarray(object->i); + else if (getset == 's') setusrarray(object->i, *value); + return; +#endif + case 0: + h = (himem - top) / numsize; + a = himem - numsize * (object->i + 1) + 1; + if (object->i < 0 || a < top) { + error(EORANGE); + return; + } + if (getset == 'g') *value = getnumber(a, memread2); + else if (getset == 's') setnumber(a, memwrite2, *value); + return; +#ifdef HASSTEFANSEXT + case 'M': + h = himem - top; + a = himem - object->i; + if (object->i < 0 || a < top) { + error(EORANGE); + return; + } + if (getset == 'g') *value = memread2(a); + else if (getset == 's') memwrite2(a, *value); + return; +#endif + case 'P': + /* the io ports */ + if (object->i >= 0 && object->i < 16) { + if (getset == 'g') *value = portread(object->i); + else if (getset == 's') portwrite(object->i, *value); + return; + } + /* the data direction registers */ + if (object->i >= 16 && object->i < 32) { + if (getset == 'g') *value = ddrread(object->i - 16); + else if (getset == 's') ddrwrite(object->i - 16, *value); + return; + } + /* the pin registers (only input) */ + if (object->i >= 32 && object->i < 48) { + if (getset == 'g') *value = pinread(object->i - 32); + return; + } + default: + error(EVARIABLE); + return; + } + } else { + /* dynamically allocated arrays */ +#ifdef HASAPPLE1 + object->name.token = ARRAYVAR; + if (!(a = bfind(&object->name))) a = createarray(&object->name, ARRAYSIZEDEF, 1); + if (!USELONGJUMP && er) return; + + /* multidim reserves one address word for the dimension, hence we have less bytes */ +#ifndef HASMULTIDIM + h = bfind_object.size / numsize; +#else + h = (bfind_object.size - addrsize) / numsize; +#endif + + if (DEBUG) { + outsc("** in array dynamical base address "); outnumber(a); + outsc(" and array element number "); outnumber(h); + outcr(); + } + +#ifdef HASMULTIDIM + dim = getaddress(a + bfind_object.size - addrsize, memread2); + if (DEBUG) { + outsc("** in array, second dimension is "); outnumber(dim); + outspc(); outnumber(a + bfind_object.size); + outcr(); + } + a = a + ((object->i - l) * dim + (object->j - l)) * numsize; +#else + a = a + (object->i - l) * numsize; +#endif +#else /* no array code */ + error(EVARIABLE); + return; +#endif + } + + /* range check */ +#ifdef HASMULTIDIM + if ( (object->j < l) || (object->j >= dim + l) || (object->i < l) || (object->i >= h / dim + l)) { + error(EORANGE); + return; + } +#else + if ( (object->i < l) || (object->i >= h + l) ) { + error(EORANGE); + return; + } +#endif + + /* set or get the array */ + if (getset == 'g') *value = getnumber(a, memread2); + else if (getset == 's') setnumber(a, memwrite2, *value); +} + +/* + Create a string on the heap. + + i is the length of the string, j the dimension of the array. + + String objects are either plain strings or arrays. In case of arrays + the number of strings is stored at the end of the array. +*/ +address_t createstring(name_t* variable, address_t i, address_t j) { +#ifdef HASAPPLE1 + address_t a; + + if (DEBUG) { + outsc("Create string "); + outname(variable); + outcr(); + } + + /* correct create length if arraylimit is not 1 */ + j = (j - arraylimit) + 1; + + /* the MS string compatibility, DIM 10 creates 11 elements */ + if (msarraylimits) j += 1; + +#ifndef HASMULTIDIM + /* if no string arrays are in the code, we reserve the number of bytes i and space for the index */ + /* allow redimension without check right now, for local variables */ + a = bmalloc(variable, i + strindexsize); + if (er != 0) return 0; + return a; +#else + /* string arrays need the number of array elements which address_ hence addresize bytes and then + the space for j strings */ + /* allow redimension without check right now, for local variables */ + a = bmalloc(variable, addrsize + j * (i + strindexsize)); + if (er != 0) return 0; + + /* set the array length */ + setaddress(a + j * (i + strindexsize), memwrite2, j); + + /* return the address of the first string */ + return a; +#endif + if (er != 0) return 0; + return a; +#else + return 0; +#endif +} + + +/* + Get a string at position b. + + getstring returns a pointer to the first string element in question. + + There is a lo tof complexity in the code to support systems with serial + memory. + +*/ +#ifdef HASAPPLE1 + +/* helpers to handle strings */ +/* Stores a C string to a BASIC string variable */ +void storecstring(address_t ax, address_t s, char* b) { + address_t k; + + for (k = 0; k < s - strindexsize && b[k] != 0; k++) memwrite2(ax + k + strindexsize, b[k]); + setstrlength(ax, memwrite2, k); +} + +/* length of a c string up to a limit l */ +address_t cstringlength(char* c, address_t l) { + address_t a; + + while (a < l && c[a] != 0) a++; + return a; +} + +/* get a memory pointer to a string, new version */ +void getstring(string_t* strp, name_t* name, address_t b, address_t j) { + address_t k, zt; + address_t ax; + + /* we know nothing about the string */ + ax = 0; + strp->address = 0; + strp->ir = 0; + strp->length = 0; + strp->arraydim = 1; + strp->strdim = 0; + + if (DEBUG) { + outsc("* getstring from var "); outname(name); outspc(); + outnumber(b); outspc(); + outnumber(j); outcr(); + } + + /* special string variables */ + if (name->c[0] == '@') + switch (name->c[1]) { + case 0: + strp->ir = ibuffer + b; + strp->length = ibuffer[0]; + strp->strdim = BUFSIZ - 2; + return; + default: + error(EVARIABLE); + return; + case 'U': + makeusrstring(); /* a user definable special string in sbuffer */ + strp->ir = sbuffer + b; + strp->length = sbuffer[0]; + return; +#ifdef HASCLOCK + case 'T': + rtcmkstr(); /* the time string */ + strp->ir = rtcstring + b; + strp->length = rtcstring[0]; + return; +#endif + /* the arguments string on POSIX systems */ +#ifdef HASARGS + case 'A': + if (bargc > 2) { + strp->ir = bargv[2]; + strp->length = cstringlength(bargv[2], BUFSIZE); + return; + } + return; +#endif + } + + /* dynamically allocated strings, create on the fly */ + if (!(ax = bfind(name))) ax = createstring(name, defaultstrdim, arraylimit); + + if (DEBUG) { + outsc("** heap address "); outnumber(ax); outcr(); + if (ax) { + outsc("** byte length of string memory segment "); + outnumber(bfind_object.size); + outcr(); + } + } + + /* string creating has caused an error, typically no memoryy */ + if (!USELONGJUMP && er) return; + +#ifndef HASMULTIDIM + /* the maximum length of the string */ + strp->strdim = bfind_object.size - strindexsize; + + /* are we in range */ + if ((b < 1) || (b > strp->strdim )) { + error(EORANGE); + return; + } + + if (DEBUG) { + outsc("** maximum string length "); + outnumber(strp->strdim); + outcr(); + } + + /* get the actual full length, this is redundant to lenstring but lenstring does + not autocreate */ + strp->length = getstrlength(ax, memread2); + + /* now find the payload address */ + ax = ax + strindexsize + (b - 1); +#else + + /* the dimension of the string array */ + /* it is at the top of the string, this uses a side effect of bfind */ + strp->arraydim = getaddress(ax + bfind_object.size - addrsize, memread2); + + /* is the array index in range */ + if ((j < arraylimit) || (j >= strp->arraydim + arraylimit )) { + error(EORANGE); + return; + } + + if (DEBUG) { + outsc("** string dimension "); + outnumber(strp->arraydim); + outcr(); + } + + /* the max length of a string */ + strp->strdim = (bfind_object.size - addrsize) / strp->arraydim - strindexsize; + + /* are we in range */ + if ((b < 1) || (b > strp->strdim )) { + error(EORANGE); + return; + } + + if (DEBUG) { + outsc("** maximum string length "); + outnumber(strp->strdim); + outcr(); + } + + /* the base address of a string */ + ax = ax + (j - arraylimit) * (strp->strdim + strindexsize); + + if (DEBUG) { + outsc("** string base address "); + outnumber(ax); + outcr(); + } + + /* from this base address we can get the actual length of the string */ + strp->length = getstrlength(ax, memread2); + + /* the address of the payload */ + ax = ax + b - 1 + strindexsize; + +#endif + + if (DEBUG) { + outsc("** payload address "); + outnumber(ax); + outcr(); + } + + /* store the payload address to the string object, length to be done if needed!! */ + strp->address = ax; + + /* return value is 0 if we have no direct memory access, the caller needs to handle the string + through the mem address */ +#ifdef USEMEMINTERFACE + strp->ir = 0; +#else + strp->ir = (char *)&mem[ax]; +#endif +} + + +/* reimplementation with name_t */ +/* set the length of a string */ +void setstringlength(name_t* name, address_t l, address_t j) { + address_t a; + stringlength_t stringdim; + + if (DEBUG) { + outsc("** setstringlength "); + outname(name); + outspc(); outnumber(l); outspc(); outnumber(j); + outcr(); + } + + /* the special strings */ + if (name->c[0] == '@') + switch (name->c[1]) { + case 0: + *ibuffer = l; + return; + case 'U': + /* do nothing here for the moment */ + return; + } + + /* find the variable address */ + a = bfind(name); + if (!USELONGJUMP && er) return; + if (a == 0) { + error(EVARIABLE); + return; + } + + /* stringdim calculation moved here */ +#ifndef HASMULTIDIM + stringdim = bfind_object.size - strindexsize; +#else + /* getaddress seeks the dimension of the string array directly after the payload */ + stringdim = (bfind_object.size - addrsize) / (getaddress(a + bfind_object.size - addrsize, memread2)) - strindexsize; +#endif + + /* where do we write it to */ + a = a + (stringdim + strindexsize) * (j - arraylimit); + if (DEBUG) { + outsc("** setstringlength writing to "); + outnumber(a); + outsc(" value "); + outnumber(l); + outcr(); + } + setstrlength(a, memwrite2, l); +} + +/* the BASIC string mechanism for real time clocks, create a string with the clock data */ +#ifdef HASCLOCK +void rtcmkstr() { + int cc = 1; + int t; + + /* hours */ + t = rtcget(2); + rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc++] = ':'; + + /* minutes */ + t = rtcget(1); + rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc++] = ':'; + + /* seconds */ + t = rtcget(0); + rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc++] = '-'; + + /* days */ + t = rtcget(4); + if (t / 10 > 0) rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc++] = '/'; + + /* months */ + t = rtcget(5); + if (t / 10 > 0) rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc++] = '/'; + + /* years */ + t = rtcget(6) % 100; /* only 100 years no 19xx epochs */ + if (t / 10 > 0) rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc] = 0; + + /* needed for BASIC strings */ + rtcstring[0] = cc - 1; +} +#endif +#endif + +/* + Layer 0 Extension: the user defined extension functions, use this function for a + quick way to extend BASIC. + + @U is a single variable that can be set and get. Every access to this variable + calls getusrvar() or setusrvar(). + @U() is a 1d array every access calls get or setusrarray(). + @U$ is a read only string created by makeusrstring(). + USR(32, V) is a user defined function created by usrfunction(). + CALL 32 is a user defined call + +*/ + +/* read or write the variable @U, you can do anything you want here */ +number_t getusrvar() { + return 0; +} +void setusrvar(number_t v) { + return; +} + +/* read or write the array @U(), you can do anything you want here */ +number_t getusrarray(address_t i) { + return 0; +} +void setusrarray(address_t i, number_t v) { + return; +} + +/* make the usr string from @U$, this function can be called multiple times for one operation */ +void makeusrstring() { + /* + sample code could be: + + mem_t i; + const char text[] = "hello world"; + for(i=0; i 31 calls this */ +number_t usrfunction(address_t i, number_t v) { + return 0; +} + +/* CALL with arguments > 31 calls this */ +void usrcall(address_t i) { + return; +} + +/* + Layer 0 - keyword handling - PROGMEM logic goes here + getkeyword(), getmessage(), and getokenvalue() are + the only access to the keyword array in the code. + + Same for messages and errors. + + All keywords are stored in PROGMEM, the Arduino way to store + constant data in flash memory. sbuffer is used to recall the + keywords and messages from PROGMEM on Arduino. Other systems + use the keyword array directly. +*/ +char* getkeyword(address_t i) { + + if (DEBUG) { + outsc("** getkeyword from index "); + outnumber(i); + outcr(); + } + +#ifndef ARDUINOPROGMEM + return (char *) keyword[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(keyword[i]))); + return sbuffer; +#endif +} + +/* messages are read from the message array */ +char* getmessage(char i) { + if (i >= sizeof(message) || i < 0) return 0; +#ifndef ARDUINOPROGMEM + return (char *) message[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(message[i]))); + return sbuffer; +#endif +} + +/* tokens read here are token_t constructed from multi byte sequences */ +token_t gettokenvalue(address_t i) { + if (i >= sizeof(tokens)) return 0; +#ifndef ARDUINOPROGMEM + return tokens[i]; +#else +#ifndef HASLONGTOKENS + return (token_t) pgm_read_byte(&tokens[i]); +#else + return (token_t) pgm_read_word(&tokens[i]); +#endif +#endif +} + +/* print a message directly to the default outpur stream */ +void printmessage(char i) { +#ifndef HASERRORMSG + if (i > EGENERAL) return; +#endif + outsc((char *)getmessage(i)); +} + +/* + Layer 0 - error handling + + The general error handler. The static variable er + contains the error state. + + debugtoken() writes a token for debug + bdebug() is the general debug message function + + Strategy: the error() function writes the message and then + clears the stack. All calling functions must check er and + return after funtion calls with no further messages etc. + reseterror() sets the error state to normal and end the + run loop. +*/ +void error(token_t e) { + address_t i; + + /* store the error number */ + er = e; + + /* clear the stacks */ + clearst(); + clrforstack(); + clrgosubstack(); + + /* switch off all timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + + /* is the error handler active? then silently go if we do GOTO or CONT actions in it */ +#ifdef HASERRORHANDLING +#if !USELONGJUMP + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) return; +#else + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) longjmp(sthook, er); +#endif +#endif + + /* set input and output device back to default, and delete the form */ + iodefaults(); + form = 0; + + /* find the line number if in RUN modes */ + if (st != SINT) { + outnumber(myline(here)); + outch(':'); + outspc(); + } + + /* if we have error messages, display them */ +#ifdef HASERRORMSG + if (e > 0) + printmessage(e); + else { + for (i = 0; gettokenvalue(i) != 0 && gettokenvalue(i) != e; i++); + outsc(getkeyword(i)); + } + outspc(); + printmessage(EGENERAL); +#else + printmessage(EGENERAL); + outspc(); + outnumber(er); +#endif + if (DEBUG) { + outsc("** at "); + outnumber(here); + } + outcr(); + + /* reset fncontext - this is odd */ + fncontext = 0; + + /* we return to the statement loop, bringing the error with us */ +#if USELONGJUMP == 1 + longjmp(sthook, er); +#endif +} + +void reseterror() { + er = 0; + here = 0; + st = SINT; +} + +void debugtoken() { + outsc("* "); + if (debuglevel > 2) { + outnumber(here); + outsc(" * "); + } + + if (token == EOL) { + outsc("EOL"); + return; + } + + switch (token) { + case LINENUMBER: + printmessage(MLINE); + break; + case NUMBER: + printmessage(MNUMBER); + break; + case VARIABLE: + printmessage(MVARIABLE); + break; + case ARRAYVAR: + printmessage(MARRAY); + break; + case STRING: + printmessage(MSTRING); + break; + case STRINGVAR: + printmessage(MSTRINGVAR); + break; + } + + outspc(); + outputtoken(); +} + +void bdebug(const char *c) { + outch('*'); + outspc(); + outsc(c); + debugtoken(); + outcr(); +} + +/* + Arithmetic and runtime operations are mostly done + on a stack of number_t. + + push(), pop(), clearst() handle the stack +*/ +void push(number_t t) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(t); outcr(); + } + + /* in forced integer mode every operation is truncated */ +#ifdef HASFLOAT + if (forceint) t = trunc(t); +#endif + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].n = t; +} + +number_t pop() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp - 1].n); outcr(); + } + + if (sp == 0) { + error(ESTACK); + return 0; + } + + return stack[--sp].n; +} + +void pushaddress2(address_t a) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(a); outcr(); + } + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].a = a; +} + +address_t popaddress2() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp - 1].a); outcr(); + } + + if (sp == 0) { + error(ESTACK); + return 0; + } + + return stack[--sp].a; +} + +void pushinteger(index_t i) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(i); outcr(); + } + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].i = i; +} + +index_t popinteger() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp - 1].i); outcr(); + } + + if (sp == 0) { + error(ESTACK); + return 0; + } + + return stack[--sp].i; +} + + +/* this one gets a positive integer from the stack and traps the error*/ +address_t popaddress() { + number_t tmp = 0; + + tmp = pop(); + if (tmp < 0) { + error(EORANGE); + return 0; + } + return (address_t) tmp; +} + +void clearst() { + sp = 0; +} + +/* these are not really stack operations but a way to handle temp char data (not needed right now) */ +address_t charsp; + +void pushchar(char ch) {} + +char popchar() { + return 0; +} + +/* + clear the cursor for the READ/DATA mechanism +*/ +void clrdata() { +#ifdef HASDARTMOUTH + data = 0; +#endif +} + +/* + Stack handling for FOR + Reimplementation of the for stack with names and with all loops + cleaned up. +*/ + +/* the new stack type for loops */ +void pushloop(name_t* name, token_t t, address_t here, number_t to, number_t step) { + address_t i; + + if (DEBUG) { + outsc("** loopsp and here in pushloopstack "); + outnumber(loopsp); outspc(); outnumber(here); outcr(); + if (name != 0) { + outsc("** loop name "); + outname(name); + outcr(); + } + else { + outsc("** loop name is 0"); + outcr(); + } + outsc("** loop token "); outnumber(t); outcr(); + outsc("** loop to "); outnumber(to); outcr(); + outsc("** loop step "); outnumber(step); outcr(); + } + + /* + Before pushing into the loop stack we check is an + old loop exists. + + There are two situations to handle: + 1. A loop is reentered because a GOTO went back to or even before + the loop start. This is identified by the here location. + 2. A new FOR loop is created after the existing loop with the same + variable name. This happens if a jump or break went outside the + loop. This is identified by the variable name. + */ + + /* Situation 1, scan for here */ + for (i = 0; i < loopsp; i++) { + if (loopstack[i].here == here) { + loopsp = i; + break; + } + } + + /* Situation 2, scan for the name */ + if (name != 0) { + for (i = 0; i < loopsp; i++) { + if (cmpname(&loopstack[i].var, name)) { + loopsp = i; + break; + } + } + } + + /* Add the loop to the stack */ + if (loopsp < FORDEPTH) { + if (t == TWHILE || t == TREPEAT) { + loopstack[loopsp].var.token = t; + } else { + if (name != 0) { + loopstack[loopsp].var = *name; +#if defined(HASAPPLE1) && defined(HASLOOPOPT) + loopstack[loopsp].varaddress = bfind(name); +#else + loopstack[loopsp].varaddress = 0; +#endif + } else { + loopstack[loopsp].var.c[0] = 0; + loopstack[loopsp].var.l = 0; + loopstack[loopsp].var.token = 0; + loopstack[loopsp].varaddress = 0; + } + } + loopstack[loopsp].here = here; + loopstack[loopsp].to = to; + loopstack[loopsp].step = step; + loopsp++; + return; + } else + error(ELOOP); +} + +/* what is the active loop */ +bloop_t* activeloop() { + if (loopsp > 0) { + return &loopstack[loopsp - 1]; + } else { + error(ELOOP); + return 0; + } +} + +void droploop() { + if (loopsp > 0) { + loopsp--; + } else { + error(ELOOP); + return; + } +} + +void clrforstack() { + loopsp = 0; +} + +/* GOSUB stack handling */ +void pushgosubstack(mem_t a) { + if (gosubsp < GOSUBDEPTH) { + gosubstack[gosubsp] = here; +#ifdef HASEVENTS + gosubarg[gosubsp] = a; +#endif + gosubsp++; + } else + error(TGOSUB); +} + +void popgosubstack() { + if (gosubsp > 0) { + gosubsp--; + } else { + error(TRETURN); + return; + } + here = gosubstack[gosubsp]; +} + +void dropgosubstack() { + if (gosubsp > 0) { + gosubsp--; + } else { + error(TGOSUB); + } +} + +void clrgosubstack() { + gosubsp = 0; +} + +/* two helper commands for structured BASIC, without the GOSUB stack */ + +void pushlocation(blocation_t* l) { + if (st == SINT) l->location = bi - ibuffer; + else l->location = here; + l->token = token; +} + +void poplocation(blocation_t* l) { + if (st == SINT) bi = ibuffer + l->location; + else here = l->location; + token = l->token; +} + +/* little helpers of the io functions */ + +/* send a newline */ +void outcr() { +#ifdef HASSERIAL1 + if (sendcr) outch('\r'); +#endif + outch('\n'); +} + +/* send a space */ +void outspc() { + outch(' '); +} + +/* output a zero terminated string - c style */ +void outsc(const char *c) { + while (*c != 0) outch(*c++); +} + +/* output a zero terminated string in a formated box padding spaces + needed for catalog output */ +void outscf(const char *c, index_t f) { + int i = 0; + + while (*c != 0) { + outch(*c++); + i++; + } + if (f > i) { + f = f - i; + while (f--) outspc(); + } +} + +/* + two console logger functions, they are not needed in BASIC but in the runtime + environment, RTDEBUGSTREAM is the channel to log to +*/ + +#ifdef RTDEBUG +void consolelog(char* ch) { + mem_t ood = od; + od = RTDEBUGSTREAM; + outsc(ch); + od = ood; +} +void consolelognum(int i) { + mem_t ood = od; + od = RTDEBUGSTREAM; + outnumber(i); + od = ood; +} +#else +void consolelog(char* ch) {} +void consolelognum(int i) {} +#endif + +/* + Reading a positive number from a char buffer + maximum number of digits is adjusted to SBUFSIZE + as a fail safe. + This is only for integers. +*/ +address_t parsenumber(char *c, number_t *r) { + address_t nd = 0; + + *r = 0; + while (*c >= '0' && *c <= '9' && *c != 0) { + *r = *r * 10 + *c++ -'0'; + nd++; + if (nd == SBUFSIZE) break; + } + return nd; +} + +/* + Reimplementation of parsenumber with the capability + to scan hex, octal, and binary numbers as well. + This is only for integers. +*/ +address_t parsenumbern(char *c, number_t *r) { + address_t nd = 0; + mem_t base = 10; + + *r = 0; + + /* the base */ + if (*c == '0') { + c++; + nd++; + if (*c == 'x' || *c == 'X') { + c++; + nd++; + base = 16; + } else if (*c == 'b' || *c == 'B') { + c++; + nd++; + base = 2; + } else if (*c == 'o' || *c == 'O') { + c++; + nd++; + base = 8; + } + } + + /* the digits */ + while (*c != 0) { + if (base == 16) { + if (*c >= '0' && *c <= '9') *r = *r * 16 + *c - '0'; + else if (*c >= 'A' && *c <= 'F') *r = *r * 16 + *c - 'A' + 10; + else if (*c >= 'a' && *c <= 'f') *r = *r * 16 + *c - 'a' + 10; + else break; + } else if (base == 8) { + if (*c >= '0' && *c <= '7') *r = *r * 8 + *c - '0'; + else break; + } else if (base == 2) { + if (*c == '0' || *c == '1') *r = *r * 2 + *c - '0'; + else break; + } else { + if (*c >= '0' && *c <= '9') *r = *r * 10 + *c - '0'; + else break; + } + c++; + nd++; + if (nd == SBUFSIZE) break; + } + return nd; +} + + +#ifdef HASFLOAT +/* a poor man's atof implementation with character count */ +address_t parsenumber2(char *c, number_t *r) { + address_t nd = 0; + index_t i; + number_t fraction = 0; + number_t exponent = 0; + mem_t nexp = 0; + + *r = 0; + + /* integer part */ + i = parsenumber(c, r); + c += i; + nd += i; + + /* the fractional part */ + if (*c == '.') { + c++; + nd++; + + i = parsenumber(c, &fraction); + c += i; + nd += i; + + if (i > 0) { + while ((--i) >= 0) fraction = fraction / 10; + *r += fraction; + } + } + + /* the exponent */ + if (*c == 'E' || *c == 'e') { + c++; + nd++; + if (*c == '-') { + c++; + nd++; + nexp = 1; + }; + i = parsenumber(c, &exponent); + nd += i; + while ((--exponent) >= 0) if (nexp) *r = *r / 10; else *r = *r * 10; + } + + return nd; +} +#endif + +/* + Convert a number to a string. + + All writenumber funcions assume that the buffer is large enough. + The caller has to handle this. This normally no problem because + the decimal numbers converted are limited to the size of the + number_t type. For this reason the stringbuffer length in basic.h + is set to 16 time the size of the number_t type. + + The argument type controls the largest displayable integer. + wnumber_t is defined in basic.h as either int or long for float + systems. +*/ +address_t writenumber(char *c, wnumber_t v) { + address_t nd = 0; + index_t i, j; + mem_t s = 1; + char c1; + + /* the sign */ + if (v < 0) s = -1; + + /* the digits */ + do { + c[nd++] = (v % 10) * s + '0'; + v = v / 10; + } while (v != 0); + + /* print the minus */ + if (s < 0 ) c[nd] = '-'; else nd--; + + /* reverse the order of digits */ + i = 0; + j = nd; + while (j > i) { + c1 = c[i]; + c[i] = c[j]; + c[j] = c1; + i++; + j--; + } + + nd++; + c[nd] = 0; + return nd; +} + +/* writenumber with arbitrary base support */ +address_t writenumbern(char *c, wnumber_t v, mem_t n) { + address_t nd = 0; + index_t i, j; + mem_t s = 1; + char c1; + + /* the sign */ + if (v < 0) s = -1; + + /* the digits */ + do { + c[nd] = (v % n) * s + '0'; + v = v / n; + /* for base 16 we need more work */ + if (c[nd] > '9') c[nd] = c[nd] + 7; + nd++; + } while (v != 0); + + /* print the minus */ + if (s < 0 ) c[nd] = '-'; else nd--; + + /* reverse the order of digits */ + i = 0; + j = nd; + while (j > i) { + c1 = c[i]; + c[i] = c[j]; + c[j] = c1; + i++; + j--; + } + + nd++; + c[nd] = 0; + return nd; +} + +#ifdef HASFLOAT +/* + this is for floats, handling output without library + functions as well. +*/ +address_t tinydtostrf(number_t v, index_t p, char* c) { + index_t i; + address_t nd = 0; + number_t f; + + /* if we are in forced integer mode */ + if (forceint) { + v = trunc(v); + return writenumber(c, (int)v); + } + + /* we do the sign here */ + if (v < 0) { + v = fabs(v); + c[nd++] = '-'; + } + + /* write the integer part */ + nd += writenumber(c + nd, (int)v); + c[nd++] = '.'; + + /* only the fraction to precision p */ + f = fabs(v); + + /* get p digits of the fraction */ + for (i = p; i > 0; i--) { + f = f - floor(f); + f = f * 10; + c[nd++] = (int)floor(f) + '0'; + } + + /* and a terminating 0 */ + c[nd] = 0; + return nd; +} + +address_t writenumber2(char *c, number_t vi) { + index_t i; + index_t nd; + number_t f; + index_t exponent = 0; + mem_t eflag = 0; + const int p = 5; + + /* pseudo integers are displayed as integer + zero trapped here */ + f = floor(vi); + if (f == vi && fabs(vi) < maxnum) return writenumber(c, vi); + + /* earlier, floats where displayed in POSIx using the libraties + return sprintf(c, "%g", vi); + we dont do this any more + */ + + /* we check if we have anything to write */ + if (!isfinite(vi)) { + c[0] = '*'; + c[1] = 0; + return 1; + } + + /* normalize the number and see which exponent we have to deal with */ + f = vi; + while (fabs(f) < 1.0) { + f = f * 10; + exponent--; + } + while (fabs(f) >= 10.0 - 0.00001) { + f = f / 10; + exponent++; + } + + /* there are platforms where dtostrf is broken, we do things by hand in a simple way */ + + if (exponent > -2 && exponent < 7) { + tinydtostrf(vi, precision, c); + } else { + tinydtostrf(f, precision, c); + eflag = 1; + } + + /* remove trailing zeros */ + for (i = 0; (i < SBUFSIZE && c[i] != 0 ); i++); + i--; + + /* */ + while (c[i] == '0' && i > 1) { + i--; + } + i++; + + /* add the exponent */ + if (eflag && exponent != 0) { + c[i++] = 'E'; + i += writenumber(c + i, exponent); + } + + c[i] = 0; + return i; + +} +#endif + +/* + innumber is used as a helper only by xinput(). It reads a number from an input + buffer and returns it in the number_t r. It returns 0 if the number is invalid, 1 if + the number is valid, and -1 if the user has pressed the BREAKCHAR key. + + Unlike the old innumber() implementation it is meant to read comma separated numbers + through input. Handling of the buffer is done by the calling function. + + The TINYBASICINPUT is an alternative implementation following the Palo Alto BASIC + way of doing it. The expression parser is reused. This allows variables names and + expressions to be used as input as well. + Due to the reuse of sbuffer in the calling function, this will probably only work + in RUN mode. +*/ + +int innumber(number_t *r, char* buffer, address_t k) { + address_t i = k; + mem_t s = 1; + +#ifndef HASTINYBASICINPUT + /* result is zero*/ + *r = 0; + + /* remove all leading whitespaces first */ + while ((buffer[i] == ' ' || buffer[i] == '\t') && i <= (address_t) buffer[0]) i++; + + /* is there anything left */ + if (i > (address_t) buffer[0]) return 0; + + /* now the sign */ + if (buffer[i] == '-') { + s = -1; + i++; + } + + /* check for the break character */ +#if defined(BREAKCHAR) + if (buffer[i] == BREAKCHAR) return -1; +#endif + + /* the number */ +#ifndef HASFLOAT + if (buffer[i] < '0' || buffer[i] > '9') return 0; + i += parsenumber(&buffer[i], r); +#else + if ((buffer[i] < '0' || buffer[i] > '9') && buffer[i] != '.') return 0; + i += parsenumber2(&buffer[i], r); +#endif + + /* the sign */ + *r *= s; + return i; +#else + char *b; + token_t t; + + /* result is zero */ + *r = 0; + + /* save the interpreter state */ + b = bi; + s = st; + t = token; + + /* switch to fake interactive with the buffer as input */ + st = SINT; + bi = buffer + k; + + /* BREAK handling */ +#if defined(BREAKCHAR) + if (*bi == BREAKCHAR) { + return -1; + } +#endif + + /* start to interpret the buffer as an expression */ + nexttoken(); + expression(); + + /* restore the interpreter state */ + i = bi - buffer - 1; + bi = b; + st = s; + token = t; + + /* error handling, we trap the error and return zero */ + if (er) { + er = 0; + return 0; + } + + /* the result is on the stack */ + *r = pop(); + return i; +#endif +} + +/* prints a number */ +void outnumber(number_t n) { + address_t nd, i; + + /* number write to sbuffer, remember the number of digits in nd */ +#ifndef HASFLOAT + nd = writenumber(sbuffer, n); +#else + nd = writenumber2(sbuffer, n); +#endif + + /* negative number format aligns right */ + if (form < 0) { + i = nd; + while (i < -form) { + outspc(); + i++; + } + } + + /* the number */ + outs(sbuffer, nd); + + /* number formats in Palo Alto style, positive numbers align left */ + if (form > 0) { + while (nd < form) { + outspc(); + nd++; + } + } +} + +/* + Layer 1 functions - providing data into the global variable and + changing the interpreter state +*/ + +/* + Lexical analyser - tokenizes the input line. + + nexttoken() increments the input buffer index bi and delivers values in the global + variable token, with arguments in the accumulators ax, x and the index register ir + name is used in the routine. + + name, sr, ax and x change values in nexttoken and deliver the result to the calling + function. + + bi and ibuffer should not be changed or used for any other function in + interactive node as they contain the state of nexttoken(). In run mode + bi and ibuffer are not used as the program is fully tokenized in mem. + + all this is pretty much stateless. +*/ + +/* skip whitespaces */ +void whitespaces() { + while (*bi == ' ' || *bi == '\t') bi++; +} + +/* upper case, don't trust the buildins on microcontrollers */ +char btoupper(char c) { + if (c >= 'a' && c <= 'z') return c - 32; else return c; +} + +/* the token stream */ +void nexttoken() { + address_t k, l, i; + char* ir; + char quotechar; + + /* RUN mode vs. INT mode, in RUN mode we read from mem via gettoken() */ + if (st == SRUN || st == SERUN) { + /* in the token stream we call fastticker - all fast timing functions are in stream */ + fastticker(); + /* read the token from memory */ + gettoken(); + /* show what we are doing */ + if (debuglevel > 1) { + debugtoken(); + outcr(); + } + return; + } + + /* after change in buffer logic the first byte is reserved for the length */ + if (bi == ibuffer) bi++; + + /* literal mode only(!) EOL ends literal mode, used to have REM without quotes */ + if (lexliteral) { + token = *bi; + if (*bi != '\0') bi++; else lexliteral = 0; + return; + } + + /* remove whitespaces outside strings */ + whitespaces(); + + /* end of line token */ + if (*bi == '\0') { + token = EOL; + if (DEBUG) debugtoken(); + return; + } + + /* unsigned numbers, value returned in x */ +#ifndef HASFLOAT + if (*bi <= '9' && *bi >= '0') { + bi += parsenumber(bi, &x); +#else + if ((*bi <= '9' && *bi >= '0') || *bi == '.') { + bi += parsenumber2(bi, &x); +#endif + token = NUMBER; + if (DEBUG) debugtoken(); + return; + } + + /* strings between " " or " EOL, value returned in ir and in sr for now */ + if (*bi == '"' || *bi == '\'') { + quotechar = *bi; + k = 0; + bi++; + ir = bi; + sr.ir = bi; + while (*bi != quotechar && *bi != '\0') { + k++; + bi++; + } + bi++; + token = STRING; + sr.length = k; + sr.address = 0; /* we don't find the string in BASIC memory, as we lex from bi */ + if (DEBUG) debugtoken(); + return; + } + + /* + relations + single character relations are their own token + >=, =<, =<, =>, <> are tokenized + */ + if (*bi == '=') { + bi++; + whitespaces(); + if (*bi == '>') { + token = GREATEREQUAL; + bi++; + } else if (*bi == '<') { + token = LESSEREQUAL; + bi++; + } else { + token = '='; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '>') { + bi++; + whitespaces(); + if (*bi == '=') { + token = GREATEREQUAL; + bi++; + } else if (*bi == '>') { + token = TSHR; + bi++; + } else { + token = '>'; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '<') { + bi++; + whitespaces(); + if (*bi == '=') { + token = LESSEREQUAL; + bi++; + } else if (*bi == '>') { + token = NOTEQUAL; + bi++; + } else if (*bi == '<') { + token = TSHL; + bi++; + } else { + token = '<'; + } + if (DEBUG) debugtoken(); + return; + } + + /* + Keyworks and variables + + Isolate a word, bi points to the beginning, l is the length of the word. + ir points to the end of the word after isolating. + @ is a letter here to make the special @ arrays possible. + */ + + l = 0; + ir = bi; + while (-1) { + if (*ir >= 'a' && *ir <= 'z') { + if (!lowercasenames) *ir -= 32; /* toupper code, changing the input buffer directly */ + ir++; + l++; + } else if ((*ir >= '@' && *ir <= 'Z') || *ir == '_') { + ir++; + l++; + } else { + break; + } + } + + + /* + Ir is reused here to implement string compares + scanning the keyword array. + Once a keyword is detected the input buffer is advanced + by its length, and the token value is returned. + + Keywords are an array of null terminated strings. + They are always matched uppercase. + */ + k = 0; + while (gettokenvalue(k) != 0) { + ir = getkeyword(k); + i = 0; + while (*(ir + i) != 0) { + if (*(ir + i) != btoupper(*(bi + i))) { + k++; + i = 0; + break; + } else + i++; + } + if (i == 0) continue; + bi += i; + token = gettokenvalue(k); + if (token == TREM) lexliteral = 1; + if (DEBUG) debugtoken(); + return; + } + + /* + A variable has length 2 with either two letters or a letter + and a number. @ can be the first letter of a variable. + Here, no tokens can appear any more as they have been processed + further up. + + The longname code supports MAXNAME characters and _ as additional character. + */ +#ifdef HASLONGNAMES + if (l > 0 && l <= MAXNAME) { + token = VARIABLE; + zeroname(&name); + while (((*bi >= '0' && *bi <= '9') || + (*bi >= '@' && *bi <= 'Z') || + (*bi >= 'a' && *bi <= 'z') || + (*bi == '_') ) && name.l < MAXNAME && *bi != 0) { + name.c[name.l] = *bi; + bi++; + name.l++; + } + if (*bi == '$') { + token = STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token = ARRAYVAR; + } + /* the new code filling the name variable directly, will be used in the entire code soon */ + name.token = token; + if (DEBUG) debugtoken(); + return; + } +#else + if (l == 1 || l == 2) { + token = VARIABLE; + name.l = 0; + name.c[0] = *bi; + name.c[1] = 0; + bi++; + if ((*bi >= '0' && *bi <= '9') || (*bi >= 'A' && *bi <= 'Z') || *bi == '_' ) { + name.c[1] = *bi; + bi++; + } + if (*bi == '$') { + token = STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token = ARRAYVAR; + } + /* the new code filling the name variable directly, will be used in the entire code soon */ + name.token = token; + if (DEBUG) debugtoken(); + return; + } +#endif + + /* other single characters are parsed and stored */ + token = *bi; + bi++; + if (DEBUG) debugtoken(); + return; +} + +/* + Layer 1 - program editor + + Editing the program, the structure of a line is + LINENUMBER linenumber(2 or more bytes) token(n bytes) + + store* stores something to memory + get* retrieves information + + No matter how long number_t is in the C implementation + we pack into bytes, this is clumsy but portable + the store and get commands all operate on here + and advance it + + storetoken() operates on the variable top. + We always append at the end and then sort. + + gettoken() operate on the variable here + which will also be the key variable in run mode. + + tokens are stored including their payload. + + This group of functions changes global states and + cannot be called at program runtime with saving + the relevant global variable to the stack. +*/ + +/* + check if we still have memory left, on RAM only systems we make + sure that we don't hit himem. On systems with EEPROM program storage we make + sure that we stay within the EEPROM range. +*/ +char nomemory(number_t b) { +#ifndef EEPROMMEMINTERFACE + if (top >= himem - b) return 1; else return 0; +#else + if (top >= elength() - eheadersize - b) return 1; else return 0; +#endif +} + +/* store a token - check free memory before changing anything */ +void storetoken() { + int i; + + switch (token) { + case LINENUMBER: + if (nomemory(addrsize + 1)) break; + memwrite2(top++, token); + setaddress(top, memwrite2, ax); + top += addrsize; + return; + case NUMBER: + if (nomemory(numsize + 1)) break; + memwrite2(top++, token); + setnumber(top, memwrite2, x); + top += numsize; + return; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + if (nomemory(sizeof(name_t))) break; + memwrite2(top++, token); + top = setname_pgm(top, &name); + return; + case STRING: + i = sr.length; + if (nomemory(i + 2)) break; + memwrite2(top++, token); + memwrite2(top++, i); + while (i > 0) { + memwrite2(top++, *sr.ir++); + i--; + } + return; + default: + if (token >= -127) { /* the good old code with just one byte token */ + if (nomemory(1)) break; + memwrite2(top++, token); + } else { +#ifdef HASLONGTOKENS + if (nomemory(2)) break; /* this is the two byte token extension */ + memwrite2(top++, TEXT1); + memwrite2(top++, token + 255); +#endif + } + return; + } +} + + +/* + wrappers around mem access in genereal + + memread is used only in the token stream, it reads from a stream + read only. If run is done from eeprom then bytes are taken from this + stream, this would also be the place to implement direct run from + another device like a file system or embedded programs on flash. + Only the token stream uses memread. + + memread2 and memwrite2 always go to ram. They are read/write. Variables and + the program editor uses these functions. + + currently only the SPIRAM and the EEPROM direct edit interface is implemented. + This is handled in the runtime library. + + USEMEMINTERFACE is the macro to control this. + + The POSIX code has a test interface for SPIRAM as a dummy. + +*/ +#ifndef USEMEMINTERFACE +mem_t memread(address_t a) { + if (st != SERUN) { + return mem[a]; + } else { + return eread(a + eheadersize); + } +} + +mem_t memread2(address_t a) { + return mem[a]; +} + +void memwrite2(address_t a, mem_t c) { + mem[a] = c; +} +#else +#if defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR) +mem_t memread(address_t a) { + if (st != SERUN) { + return spiram_robufferread(a); + } else { + return eread(a + eheadersize); + } +} + +mem_t memread2(address_t a) { + return spiram_rwbufferread(a); +} + +void memwrite2(address_t a, mem_t c) { + spiram_rwbufferwrite(a, c); +} +#else +#ifdef EEPROMMEMINTERFACE +mem_t memread(address_t a) { + if (a < elength() - eheadersize) return eread(a + eheadersize); else return mem[a - (elength() - eheadersize)]; +} + +mem_t memread2(address_t a) { + return memread(a); +} + +void memwrite2(address_t a, mem_t c) { + if (a < elength() - eheadersize) eupdate(a + eheadersize, c); else mem[a - (elength() - eheadersize)] = c; +} +#endif +#endif +#endif + + +/* get a token from memory */ +void gettoken() { + stringlength_t i; + + /* if we have reached the end of the program, EOL is always returned + we don't rely on mem having a trailing EOL */ + if (here >= top) { + token = EOL; + return; + } + + /* if we have no data type we are done reading just one byte */ + token = memread(here++); + name.token = token; + + /* if there are multibyte tokens, get the next byte and construct a token value <-127 */ +#ifdef HASLONGTOKENS + if (token == TEXT1) { + token = memread(here++) - 255; + } +#endif + + /* otherwise we check for the argument */ + switch (token) { + case LINENUMBER: + ax = getaddress(here, memread); + here += addrsize; + break; + case NUMBER: + x = getnumber(here, memread); + here += numsize; + break; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + here = getname(here, &name, memread); + name.token = token; + break; + case STRING: + sr.length = (unsigned char)memread(here++); + + /* + if we run from EEPROM, the input buffer is used to get string constants. + if we run on a system with real memory, we produce a mem pointer + otherwise the caller has to handle strings through the address (SPIRAM systems) + */ + if (st == SERUN) { + for (i = 0; i < sr.length; i++) ibuffer[i] = memread(here + i); + sr.ir = ibuffer; + } else { +#ifndef USEMEMINTERFACE + sr.ir = (char*)&mem[here]; +#else + sr.ir = 0; +#endif + } + sr.address = here; + here += sr.length; + } +} + +/* goto the first line of a program */ +void firstline() { + if (top == 0) { + ax = 0; + return; + } + here = 0; + gettoken(); +} + +/* goto the next line, search forward */ +void nextline() { + while (here < top) { + gettoken(); + if (token == LINENUMBER) return; + if (here >= top) { + here = top; + ax = 0; + return; + } + } +} + +/* + the line cache mechanism, useful for large codes. + addlinecache does not test if the line already exist because it + assumes that findline calls it only if a new line is to be stored + the LINECACHE size depends on the architecture. +*/ +#if defined(LINECACHESIZE) && LINECACHESIZE>0 +const unsigned char linecachedepth = LINECACHESIZE; +typedef struct { + address_t l; + address_t h; +} linecacheentry; +linecacheentry linecache[LINECACHESIZE]; +unsigned char linecachehere = 0; + +void clrlinecache() { + unsigned char i; + + for (i = 0; i < linecachedepth; i++) linecache[i].l = linecache[i].h = 0; + linecachehere = 0; +} + +void addlinecache(address_t l, address_t h) { + linecache[linecachehere].l = l; + linecache[linecachehere].h = h; + linecachehere = (linecachehere + 1) % linecachedepth; +} + +address_t findinlinecache(address_t l) { + unsigned char i; + + for (i = 0; i < linecachedepth && linecache[i].l != 0; i++) { + if (linecache[i].l == l) return linecache[i].h; + } + return 0; +} +#else +void clrlinecache() {} +void addlinecache(address_t l, address_t h) {} +address_t findinlinecache(address_t l) { + return 0; +} +#endif + + +/* find a line, look in cache then search from the beginning + x is used as the valid line number once a line is found + hence x must be global + (this is the logic of the gettoken mechanism) +*/ +void findline(address_t l) { + address_t a; + + /* we know it already, here to advance */ + if ((a = findinlinecache(l))) { + here = a; + token = LINENUMBER; + ax = l; + return; + } + + /* we need to search */ + here = 0; + while (here < top) { + gettoken(); + if (token == LINENUMBER && ax == l ) { + /* now that we know we cache */ + addlinecache(l, here); + return; + } + } + error(ELINE); +} + +/* finds the line of a location */ +address_t myline(address_t h) { + address_t l = 0; + address_t l1 = 0; + address_t here2; + + here2 = here; + here = 0; + gettoken(); + while (here < top) { + if (token == LINENUMBER) { + l1 = l; + l = ax; + } + if (here >= h) break; + gettoken(); + } + here = here2; + if (token == LINENUMBER) + return l1; + else + return l; +} + +/* + Move a block of storage beginng at b ending at e + to destination d. No error handling here!! +*/ +void moveblock(address_t b, address_t l, address_t d) { + address_t i; + + if (d + l > himem) { + error(EOUTOFMEMORY); + return; + } + if (l < 1) return; + + if (b < d) for (i = l; i > 0; i--) memwrite2(d + i - 1, memread2(b + i - 1)); + else for (i = 0; i < l; i++) memwrite2(d + i, memread2(b + i)); +} + +/* zero a block of memory */ +void zeroblock(address_t b, address_t l) { + address_t i; + + if (b + l > himem) { + error(EOUTOFMEMORY); + return; + } + if (l < 1) return; + + for (i = 0; i < l + 1; i++) memwrite2(b + i, 0); +} + +/* + Line editor: + + stage 1: no matter what the line number is - store at the top + remember the location in here. + stage 2: see if it is only an empty line - try to delete this line + stage 3: calculate lengthes and free memory and make room at the + appropriate place + stage 4: copy to the right place + + Very fragile code, con't change if you don't have to + + zeroblock statements commented out after EOL code was fixed +*/ +#ifdef DEBUG +/* diagnosis function */ +void diag() { + outsc("top, here, y and x\n"); + outnumber(top); outspc(); + outnumber(here); outspc(); + outcr(); +} +#endif + +void storeline() { + const index_t lnlength = addrsize + 1; + index_t linelength; + number_t newline; + address_t here2, here3; + address_t t1, t2; + address_t y; + + /* the data pointers becomes invalid once the code has been changed */ + clrdata(); + + /* line cache is invalid on line storage */ + clrlinecache(); + + if (DEBUG) { + outsc("storeline "); + outnumber(ax); + outsc(" : "); + outsc(ibuffer); + outcr(); + } + + /* + stage 1: append the line at the end of the memory, + remember the line number on the stack and the old top in here + */ + t1 = ax; + here = top; + newline = here; + token = LINENUMBER; + do { + storetoken(); + if (er != 0 ) { + top = newline; + here = 0; + return; + } + nexttoken(); + } while (token != EOL); + + ax = t1; /* recall the line number */ + linelength = top - here; /* calculate the number of stored bytes */ + + /* + stage 2: check if only a linenumber stored - then delete this line + */ + if (linelength == (lnlength)) { + top -= (lnlength); + findline(ax); + if (er) return; + y = here - lnlength; + nextline(); + here -= lnlength; + if (ax != 0) { + moveblock(here, top - here, y); + top = top - (here - y); + } else { + top = y; + } + return; + } + + /* + stage 3, a nontrivial line with linenumber x is to be stored + try to find it first by walking through all lines + */ + else { + y = ax; + here2 = here; + here = lnlength; + nextline(); + /* there is no nextline after the first line, we are done */ + if (ax == 0) return; + /* go back to the beginning */ + here = 0; + here2 = 0; + while (here < top) { + here3 = here2; + here2 = here; + nextline(); + if (ax > y) break; + } + + /* + at this point y contains the number of the line to be inserted + x contains the number of the first line with a higher line number + or 0 if the line is to be inserted at the end + here points to the following line and here2 points to the previous line + */ + if (ax == 0) { + here = here3 - lnlength; + gettoken(); + if (token == LINENUMBER && ax == y) { // we have a double line at the end + here2 -= lnlength; + here -= lnlength; + moveblock(here2, linelength, here); + top = here + linelength; + } + return; + } + here -= lnlength; + t1 = here; + here = here2 - lnlength; + t2 = here; + gettoken(); + if (ax == y) { /* the line already exists and has to be replaced */ + here2 = t2; /* this is the line we are dealing with */ + here = t1; /* this is the next line */ + y = here - here2; /* the length of the line as it is */ + if (linelength == y) { /* no change in line length */ + moveblock(top - linelength, linelength, here2); + top = top - linelength; + } else if (linelength > y) { /* the new line is longer than the old one */ + moveblock(here, top - here, here + linelength - y); + here = here + linelength - y; + top = top + linelength - y; + moveblock(top - linelength, linelength, here2); + top = top - linelength; + } else { /* the new line is short than the old one */ + moveblock(top - linelength, linelength, here2); + top = top - linelength; + moveblock(here, top - here, here2 + linelength); + top = top - y + linelength; + } + } else { /* the line has to be inserted in between */ + here = t1; + moveblock(here, top - here, here + linelength); + moveblock(top, linelength, here); + } + } +} + +/* + Layer 1 - the code in this section calculates an expression + with a recursive descent algorithm + + all function use the stack to pass values back. We use the + Backus-Naur form of basic from here https://rosettacode.org/wiki/BNF_Grammar + implementing a C style logical expression model +*/ + +/* the terminal symbol it ends a statement list - ELSE is one too as it ends a statement list */ +char termsymbol() { + return (token == LINENUMBER || token == ':' || token == EOL || token == TELSE); +} + +/* a little helpers - one token expect */ +char expect(token_t t, mem_t e) { + nexttoken(); + if (token != t) { + error(e); + return 0; + } else return 1; +} + +/* a little helpers - expression expect */ +char expectexpr() { + nexttoken(); + expression(); + if (er != 0) return 0; else return 1; +} + +/* parses a list of expression, this may be recursive! */ +void parsearguments() { + short argsl; + + /* begin counting */ + argsl = 0; + + /* having 0 args at the end of a command is legal */ + if (!termsymbol()) { + + /* list of expressions separated by commas */ + do { + expression(); + if (er != 0) break; + argsl++; + if (token == ',') nexttoken(); else break; + } while (1); + } + + /* because of the recursion ... */ + args = argsl; +} + + +/* expect exactly n arguments */ +void parsenarguments(char n) { + parsearguments(); + if (args != n) error(EARGS); +} + +/* counts and parses the number of arguments given in brakets, this function + should not advance to the next token because it is called in factor */ +void parsesubscripts() { + blocation_t l; + + args = 0; + + if (DEBUG) { + outsc("** in parsesubscripts "); outcr(); + bdebug("token "); + } + + /* remember where we where */ + pushlocation(&l); + + /* parsesubscripts is called directly after the object in question, it does + nexttoken() itself now */ + nexttoken(); + + /* if we have no bracket here, we return with zero */ + if (token != '(') { + poplocation(&l); + return; + } + nexttoken(); + + /* if () we return also with -1 */ +#ifdef HASMULTIDIM + if (token == ')') { + args = -1; + return; + } +#endif + + /* now we are ready to parse a set of arguments */ + parsearguments(); + if (!USELONGJUMP && er) return; + + if (token != ')') { + error(EARGS); /* we return with ) as a last token on success */ + return; + } + + /* we end with the ) still as active token */ +} + +/* parse a function argument ae is the number of + expected expressions in the argument list, parsesubscripts + should not avance precisely because it is used in factor */ + +void parsefunction(void (*f)(), short ae) { + parsesubscripts(); + if (!USELONGJUMP && er) return; + if (args == ae) f(); else error(EARGS); +} + +/* helper function in the recursive decent parser */ +void parseoperator(void (*f)()) { + mem_t u = 1; + + nexttoken(); + /* unary minuses in front of an operator are consumed once! */ + if (token == '-') { + u = -1; + nexttoken(); + } + /* the operator */ + f(); + if (er != 0 ) return; + y = pop(); + if (u == -1) y = -y; + x = pop(); +} + +/* + ABS absolute value +*/ +void xabs() { + number_t x; + + if ((x = pop()) < 0) { + x = -x; + } + push(x); +} + +/* + SGN evaluates the sign +*/ +void xsgn() { + number_t x; + + x = pop(); + if (x > 0) x = 1; + if (x < 0) x = -1; + push(x); +} + +/* + PEEK on an arduino, negative values of peek address + the EEPROM range -1 .. -1024 on an UNO +*/ +void xpeek() { + number_t a; + + /* get the argument from the stack because this is a function only */ + a = pop(); + + /* the memory and EEPROM range */ + if (a >= 0 && a <= memsize) + push(memread2(a)); + else if (a < 0 && -a <= elength()) + push(eread(-a - 1)); + else { + error(EORANGE); + return; + } +} + +/* + MAP Arduino map function, we always cast to long, this + makes it potable for various integer sizes and the float. +*/ +void xmap() { + long v, in_min, in_max, out_min, out_max; + + out_max = pop(); + out_min = pop(); + in_max = pop(); + in_min = pop(); + v = pop(); + push((v - in_min) * (out_max - out_min) / (in_max - in_min) + out_min); +} + +/* + RND very basic random number generator with constant seed in 16 bit + for float systems, use glibc parameters https://en.wikipedia.org/wiki/Linear_congruential_generator +*/ + +void xrnd() { + number_t r; + mem_t base = randombase; + + /* the argument of the RND() function */ + r = pop(); + + /* this is the microsoft mode, argument <0 resets the sequence, 0 always the same number, > 1 a number between 0 and 1 */ + if (randombase < 0) { + base = 0; + if (r < 0) { + rd = -r; + r = 1; + } else if (r == 0) { + r = 1; + goto pushresult; + } else { + r = 1; + } + } + + /* this is the congruence */ +#ifndef HASFLOAT + /* the original 16 bit congruence, the & is needed to make it work for all kinds of ints */ + rd = (31421 * rd + 6927) & 0xffff; +#else + /* glibc parameters */ + rd = (110351245 * rd + 12345) & 0x7fffffff; +#endif + +pushresult: + + /* the result is calculated with the right modulus */ +#ifndef HASFLOAT + if (r >= 0) + push((unsigned long)rd * r / 0x10000 + base); + else + push((unsigned long)rd * r / 0x10000 + 1 - base); +#else + if (r >= 0) + push(rd * r / 0x80000000 + base); + else + push(rd * r / 0x80000000 + 1 - base); +#endif +} + + +#ifndef HASFLOAT +/* + SQR - a very simple approximate square root formula + for integers, for floats we use the library +*/ +void sqr() { + number_t t, r; + number_t l = 0; + + r = pop(); + t = r; + while (t > 0) { + t >>= 1; + l++; + } + l = l / 2; + t = 1; + t <<= l; + do { + l = t; + t = (t + r / t) / 2; + } while (abs(t - l) > 1); + push(t); +} +#else +void sqr() { + push(sqrt(pop())); +} +#endif + +/* + POW(X, N) evaluates powers +*/ + +/* this function is called by POW(a, c) in BASIC */ +void xpow() { + number_t n; + number_t a; + + n = pop(); + a = pop(); + push(bpow(a, n)); +} + +/* while this is needed by ^*/ +number_t bpow(number_t x, number_t y) { +#ifdef HASFLOAT + return pow(x, y); +#else + number_t r; + address_t i; + + r = 1; + if (y >= 0) for (i = 0; i < y; i++) r *= x; + else r = 0; + return r; +#endif +} + +/* + the reimplementation of parsestringvar, this code uses a lhsobject + to store the data in, which is somehow more natural with the new code. + + The need to handle substring and no substring situations makes thing + complex. + + A plain string has the format A$. + A substringed string has the format A$(i) or A$(i,j). + A string array has the format A$()(i2), A$(i)(i2), A$(i,j)(i2). + In the Microsoft world with substringmode==0 we only have + A$, A$(i2). + + All this is distiguished here. + +*/ + +void parsestringvar(string_t* strp, lhsobject_t* lhs) { +#ifdef HASAPPLE1 + blocation_t l; + address_t temp; + + /* remember the variable name and prep the indices */ + copyname(&lhs->name, &name); + lhs->i = 1; /* we start at 1 */ + lhs->j = arraylimit; /* we assume a string array of length 1, all simple strings are like this */ + lhs->i2 = 0; /* we want the full string length */ + lhs->ps = 1; /* we deal with a pure string */ + + /* remember the location */ + pushlocation(&l); + + /* and inspect the (first) brackets */ + parsesubscripts(); + if (!USELONGJUMP && er) return; + + if (DEBUG) { + outsc("** in parsestringvar "); + outnumber(args); + outsc(" arguments \n"); + } + + /* do we deal with a pure unindexed string or something more complicated */ + if (args == 0) { + /* pure string, we rewind and are done here */ + poplocation(&l); + } else if (!substringmode) { + /* we have no substring interpretation hence the brackets can only be one array index */ + if (args == 1) lhs->j = pop(); else { + error(EORANGE); + return; + } + } else { + /* not a pure string */ + lhs->ps = 0; + /* we are in the substring world here */ + if (args == 2) { + lhs->i2 = popaddress(); /* A$(i,j) */ + args--; + } + if (!USELONGJUMP && er) return; + if (args == 1) { + lhs->i = popaddress(); /* A$(i) */ + } + if (!USELONGJUMP && er) return; + if (args == -1) {} /* A$(), ignore */ + /* here we have parsed a full substring and remember where we are and look forward*/ + pushlocation(&l); + nexttoken(); + if (token == '(') { + /* a second pair of braces is coming, we parse an array index */ + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + if (token != ')') { + error(EUNKNOWN); + return; + } + lhs->j = popaddress(); + if (!USELONGJUMP && er) return; + } else + poplocation(&l); + } + + /* in pure parse mode we end here. This is used for the lefthandside code */ + if (!strp) return; + + /* try to get the string */ + getstring(strp, &lhs->name, lhs->i, lhs->j); + if (!USELONGJUMP && er) return; + + /* look what we do with the upper index */ + if (!lhs->i2) lhs->i2 = strp->length; + + if (DEBUG) { + outsc("** in parsestringvar lower is "); outnumber(lhs->i); outcr(); + outsc("** in parsestringvar upper is "); outnumber(lhs->i2); outcr(); + outsc("** in parsestringvar array_index is "); outnumber(lhs->j); outcr(); + } + + /* find the length */ + if (lhs->i2 - lhs->i + 1 > 0) strp->length = lhs->i2 - lhs->i + 1; else strp->length = 0; + + /* done */ + if (DEBUG) { + outsc("** in parsestringvar, length "); + outnumber(strp->length); + outsc(" from "); outnumber(lhs->i); outspc(); outnumber(lhs->i2); + outcr(); + } + + /* restore the name */ + name = lhs->name; +#else + return; +#endif +} + + +/* + stringvalue(string_t*) evaluates a string value, return 0 if there is no string, + 1 if there is a string. The pointer contains all the data needed to process the string. + + In STR all number bases are allowed now. + +*/ + +char stringvalue(string_t* strp) { + address_t k, l; + address_t i; + token_t t; + mem_t args = 1; + + lhsobject_t lhs; + +#ifdef HASNUMSYSTEM + mem_t base = 10; + number_t n; +#endif + + if (DEBUG) outsc("** entering stringvalue \n"); + + /* make sure everything is nice and clean */ + strp->address = 0; + strp->arraydim = 0; + strp->length = 0; + strp->strdim = 0; + strp->ir = 0; + + switch (token) { + case STRING: + /* sr has the string information from gettoken and nexttoken*/ + strp->ir = sr.ir; + strp->length = sr.length; + strp->address = sr.address; + break; +#ifdef HASAPPLE1 + case STRINGVAR: + parsestringvar(strp, &lhs); + break; + case TSTR: + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { + error(EARGS); + return 0; + } + nexttoken(); + expression(); + if (er != 0) return 0; +#ifdef HASNUMSYSTEM + if (token == ',') { + nexttoken(); + expression(); + if (er != 0) return 0; + base = pop(); + } + n = pop(); +#ifdef HASFLOAT + if (base == 10) { + strp->length = writenumber2(sbuffer, n); + } else { + n = floor(n); + strp->length = writenumbern(sbuffer, n, base); + } +#else + strp->length = writenumbern(sbuffer, n, base); +#endif +#else +#ifdef HASFLOAT + strp->length = writenumber2(sbuffer, pop()); +#else + strp->length = writenumber(sbuffer, pop()); +#endif +#endif + strp->ir = sbuffer; + if (er != 0) return 0; + if (token != ')') { + error(EARGS); + return 0; + } + break; +#ifdef HASMSSTRINGS + case TCHR: + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { + error(EARGS); + return 0; + } + nexttoken(); + expression(); + if (er != 0) return 0; + *sbuffer = pop(); + strp->ir = sbuffer; + strp->length = 1; + if (token != ')') { + error(EARGS); + return 0; + } + break; + case TRIGHT: + case TMID: + case TLEFT: + t = token; + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { + error(EARGS); + return 0; + } + nexttoken(); + if (token != STRINGVAR) { + error(EARGS); + return 0; + } + parsestringvar(strp, &lhs); + if (er != 0) return 0; + k = strp->length; /* the length of the original string variable */ + nexttoken(); + if (token != ',') { + error(EARGS); + return 0; + } + nexttoken(); + expression(); + if (er != 0) return 0; + /* all the rest depends on the function */ + switch (t) { + case TRIGHT: + l = popaddress(); + if (k < l) l = k; + if (strp->address) strp->address = strp->address + (k - l); + if (strp->ir) strp->ir = strp->ir + (k - l); + break; + case TLEFT: + l = popaddress(); + if (k < l) l = k; + break; + case TMID: + if (token == ',') { + nexttoken(); + expression(); + if (er != 0) return 0; + args++; + } + if (args == 1) { + i = popaddress(); + l = 0; + if (i <= k) l = k - i + 1; + } else { + l = popaddress(); + if (er != 0) return 0; + i = popaddress(); + } + if (i == 0) i = 1; + if (i > k) l = 0; + if (k < i + l) l = k - i + 1; + if (l < 0) l = 0; + if (strp->address != 0) strp->address = strp->address + i - 1; + if (strp->ir) strp->ir = strp->ir + i - 1;; + break; + } + strp->length = l; + + if (token != ')') { + error(EARGS); + return 0; + } + break; +#endif +#endif + default: + return 0; + } + return 1; +} + + +/* + (numerical) evaluation of a string expression, used for + comparison and for string rightvalues as numbers + the token rewind here is needed as streval is called in + factor - no factor function should nexttoken +*/ + +void streval() { + token_t t; + address_t k; + string_t s1, s2; + char* ir; + address_t a; + blocation_t l; + + /* is the right side of the expression a string */ + if (!stringvalue(&s1)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + + if (DEBUG) { + outsc("** in streval first string"); + outcr(); + } + + /* get ready for rewind to this location */ + pushlocation(&l); + t = token; + + /* is the next token a operator, hence we need to compare two strings? */ + nexttoken(); + if (token != '=' && token != NOTEQUAL) { + + /* if not, rewind one token and evaluate the string as a boolean */ + poplocation(&l); + token = t; + + /* a zero length string evaluates to zero else to the first character */ + if (s1.length == 0) push(0); else { + if (s1.ir) push(s1.ir[0]); + else if (s1.address) push(memread2(s1.address)); + else error(EGENERAL); + } + + return; + } + + /* remember which operator we use */ + t = token; + + /* questionable !! */ + nexttoken(); + + if (DEBUG) { + outsc("** in streval second string"); outcr(); + debugtoken(); outcr(); + } + + /* get the second string */ + if (!stringvalue(&s2)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + + if (DEBUG) { + outsc("** in streval result: "); + outnumber(x); + outcr(); + } + + /* different length means unequal */ + if (s2.length != s1.length) goto neq; + + /* and a different character somewhere is also unequal */ +#ifdef USEMEMINTERFACE + if (s1.ir && s2.ir) + for (k = 0; k < s1.length; k++) { + if (s1.ir[k] != s2.ir[k]) goto neq; + } + else if (s1.address && s2.address) + for (k = 0; k < s1.length; k++) { + if (memread2(s1.address + k) != memread2(s2.address + k)) goto neq; + } + else { + if (s1.address) { + a = s1.address; + ir = s2.ir; + } else { + a = s2.address; + ir = s1.ir; + } + for (k = 0; k < s1.length; k++) { + if (memread2(a + k) != ir[k] ) goto neq; + } + } +#else + for (k = 0; k < s1.length; k++) if (s1.ir[k] != s2.ir[k]) goto neq; +#endif + + /* which operator did we use */ + if (t == '=') push(booleanmode); else push(0); + return; +neq: + if (t == '=') push(0); else push(booleanmode); + return; +} + + +#ifdef HASFLOAT +/* + floating point arithmetic + SIN, COS, TAN, ATAN, LOG, EXP, INT + INT is always there and is nop in integer BASICs + no handling of floating point errors yet. +*/ +void xsin() { + push(sin(pop())); +} +void xcos() { + push(cos(pop())); +} +void xtan() { + push(tan(pop())); +} +void xatan() { + push(atan(pop())); +} +void xlog() { + push(log(pop())); +} +void xexp() { + push(exp(pop())); +} +void xint() { + push(floor(pop())); +} +#else +void xint() {} +#endif + +/* this function does a bitwise compare. It checks if one bit is 1 or 0 and returns + the right BASIC boolean value */ +void xbit() { + int a, b; + + /* this is slightly unclean as we do no error detection on the range */ + b = (int)pop(); + a = (int)pop(); + + /* pushing booleanmode makes sure we have the right kind of true (1 or -1) */ + if (a & (1 << b)) push(booleanmode); else push(0); +} + +/* + Recursive expression parser functions + + factor(); term(); addexpression(); compexpression(); + notexpression(); andexpression(); expression() + + doing + + functions, numbers; *, /, %; +, -; =, <>, =>, <=; + NOT; AND; OR + +*/ + +/* + factor() - contrary to all other function + nothing here should end with a new token - this is handled + in factors calling function + + evaluates constants, variables and all functions +*/ + +/* helpers of factor - array access */ +void factorarray() { + lhsobject_t object; + number_t v; + + /* remember the variable, because parsesubscript changes this */ + copyname(&object.name, &name); + + /* parse the arguments */ + parsesubscripts(); + if (er != 0 ) return; + + switch (args) { + case 1: + object.i = popaddress(); + if (!USELONGJUMP && er) return; + object.j = arraylimit; + break; +#ifdef HASMULTIDIM + case 2: + object.j = popaddress(); + object.i = popaddress(); + if (!USELONGJUMP && er) return; + break; +#endif + default: + error(EARGS); + return; + } + array(&object, 'g', &v); + push(v); +} + +/* helpers of factor - string length */ +void factorlen() { +#ifdef HASAPPLE1 + address_t a; + string_t s; + name_t n; + lhsobject_t lhs; + + nexttoken(); + if ( token != '(') { + error(EARGS); + return; + } + + nexttoken(); + switch (token) { + case STRING: + push(sr.length); + nexttoken(); + break; + case STRINGVAR: + parsestringvar(&s, &lhs); + push(s.length); + nexttoken(); + break; +#ifdef HASMSSTRINGS + case TRIGHT: + case TLEFT: + case TMID: + case TCHR: +#endif + case TSTR: + error(EARGS); + return; + default: + expression(); + if (!USELONGJUMP && er) return; + n.token = TBUFFER; + a = pop(); + n.c[0] = a % 256; + n.c[1] = a / 256; + push(blength(&n)); + } + + if (!USELONGJUMP && er) return; + + if (token != ')') { + error(EARGS); + return; + } +#else + push(0); +#endif +} + +/* helpers of factor - the VAL command */ +void factorval() { + index_t y; + number_t x; + string_t s; + address_t a; + char *ir; + +#define DEBUG 0 + + mem_t numsys = 0; + + + nexttoken(); + if (token != '(') { + error(EARGS); + return; + } + + nexttoken(); + if (!stringvalue(&s)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + + /* the length of the strings consumed */ + vlength = 0; + + /* get the string if it is in serial memory */ +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + + /* generate a 0 terminated string for use with parsenumber */ + stringtobuffer(sbuffer, &s); + ir = sbuffer; + + if (DEBUG) { + outsc("factorval: "); + outsc(ir); + outcr(); + } + + /* remove whitespaces */ + while (*ir == ' ' || *ir == '\t') { + ir++; + vlength++; + } + + /* find a sign */ + if (*ir == '-') { + y = -1; + ir++; + vlength++; + } else y = 1; + + /* see if we scan integer hex, octal or bin constants, the real scanning is done in parsenumbern */ +#ifdef HASNUMSYSTEM + if (*ir == '0' && ( *(ir + 1) == 'x' || *(ir + 1) == 'X' || *(ir + 1) == 'b' || *(ir + 1) == 'B' \ + || *(ir + 1) == 'o' || *(ir + 1) == 'O' )) { + numsys = 1; + } +#endif + + if (DEBUG) { + outsc("factorval: "); + outsc(ir); + outsc(" "); + outnumber(y); + outsc(" "); + outnumber(numsys); + outcr(); + } +#define DEBUG 0 + + x = 0; +#ifdef HASFLOAT +#ifdef HASNUMSYSTEM + if (numsys) { + if ((a = parsenumbern(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; + } else { + if ((a = parsenumber2(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; + } +#else + if ((a = parsenumber2(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; +#endif +#else +#ifdef HASNUMSYSTEM + if (numsys) { + if ((a = parsenumbern(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; + } else { + if ((a = parsenumber(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; + } +#else + if ((a = parsenumber(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; +#endif +#endif + push(x * y); + + nexttoken(); + if (token != ')') { + error(EARGS); + return; + } +} + +/* helpers of factor - the INSTR command */ +#ifndef HASFULLINSTR +/* this is instring in a single character version, usefull to split strings */ +void factorinstr() { + char ch; + address_t a; + string_t s; + + nexttoken(); + if (token != '(') { + error(EARGS); + return; + } + + nexttoken(); + if (!stringvalue(&s)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + nexttoken(); + + if (token != ',') { + error(EARGS); + return; + } + + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + ch = pop(); + if (s.address) { + for (a = 1; a <= s.length; a++) { + if (memread2(s.address + a - 1) == ch) break; + } + } else { + for (a = 1; a <= s.length; a++) { + if (s.ir[a - 1] == ch) break; + } + } + if (a > s.length) a = 0; + push(a); + //nexttoken(); + if (token != ')') { + error(EARGS); + return; + } +} +#else +/* the full instr command which can compare two strings */ +void factorinstr() { + char ch; + address_t a = 1; + address_t i = 1; + string_t search; + string_t s; + + nexttoken(); + if (token != '(') { + error(EARGS); + return; + } + nexttoken(); + + /* the search string */ + if (!stringvalue(&s)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + nexttoken(); + + if (token != ',') { + error(EARGS); + return; + } + nexttoken(); + + /* the string to be searched */ + if (!stringvalue(&search)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + nexttoken(); + + /* potentially the start value */ + if (token == ',') { + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + a = popaddress(); + if (!USELONGJUMP && er) return; + } + + if (token != ')') { + error(EUNKNOWN); + return; + } + + /* health check */ + if (search.length == 0 || search.length + a > s.length || a == 0) { + push(0); + return; + } + + /* go through the search string */ + while (i <= search.length) { + + /* get one character from the string */ + if (search.address) { + ch = memread2(search.address + i - 1); + } else { + ch = search.ir[i - 1]; + } + + /* search the character */ + if (s.address) { + for (; a <= s.length; a++) { + if (memread2(s.address + a - 1) == ch) break; + } + } else { + for (; a <= s.length; a++) { + if ( s.ir[a - 1] == ch ) break; + } + } + + /* we haven't found the character until the end of the string */ + if (a > s.length) { + a = 0; + break; + } + + /* next character */ + i += 1; + + } + + /* how did the search go? a rewind because we were at the end of the search part already */ + if (i <= search.length) { + a = 0; + } else { + a = a - search.length + 1; + } + + + push(a); +} +#endif + +/* helpers of factor - the NETSTAT command */ +void factornetstat() { + address_t x = 0; + + if (netconnected()) x = 1; + if (mqttstate() == 0) x += 2; + push(x); +} + +/* helpers of factor - the ASC command, really not needed but for completeness */ +void factorasc() { +#ifdef HASAPPLE1 + string_t s; + lhsobject_t lhs; + + nexttoken(); + if ( token != '(') { + error(EARGS); + return; + } + + nexttoken(); + switch (token) { + case STRING: + if (sr.ir) push(sr.ir[0]); else push(memread2(sr.address)); + nexttoken(); + break; + case STRINGVAR: + parsestringvar(&s, &lhs); + if (s.length > 0) { + if (s.ir) push(s.ir[0]); else push(memread2(s.address)); + } else + push(0); + nexttoken(); + break; + default: + error(EARGS); + return; + } + + if (!USELONGJUMP && er) return; + + if (token != ')') { + error(EARGS); + return; + } +#else + push(0); +#endif +} + +void factor() { + if (DEBUG) bdebug("factor\n"); + switch (token) { + case NUMBER: + push(x); + break; + case VARIABLE: + push(getvar(&name)); + break; + case ARRAYVAR: + factorarray(); + break; + case '(': + nexttoken(); + expression(); + if (er != 0 ) return; + if (token != ')') { + error(EARGS); + return; + } + break; + /* Palo Alto BASIC functions */ + case TABS: + parsefunction(xabs, 1); + break; + case TRND: + parsefunction(xrnd, 1); + break; + case TSIZE: + push(himem - top); + break; + /* Apple 1 BASIC functions */ +#ifdef HASAPPLE1 + case TSGN: + parsefunction(xsgn, 1); + break; + case TPEEK: + parsefunction(xpeek, 1); + break; + case TLEN: + factorlen(); + break; +#ifdef HASIOT + case TAVAIL: + parsefunction(xavail, 1); + break; + case TOPEN: + parsefunction(xfopen, 1); + break; + case TSENSOR: + parsefunction(xfsensor, 2); + break; + case TVAL: + factorval(); + break; + case TINSTR: + factorinstr(); + break; + case TWIRE: + parsefunction(xfwire, 1); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + push(erh); + break; +#endif + case THIMEM: + push(himem); + break; + /* Apple 1 string compare code */ + case STRING: + case STRINGVAR: +#ifdef HASIOT + case TSTR: +#endif +#ifdef HASMSSTRINGS + case TLEFT: + case TRIGHT: + case TMID: + case TCHR: +#endif + streval(); + if (er != 0 ) return; + break; +#endif + /* Stefan's tinybasic additions */ +#ifdef HASSTEFANSEXT + case TSQR: + parsefunction(sqr, 1); + break; + case TMAP: + parsefunction(xmap, 5); + break; + case TPOW: + parsefunction(xpow, 2); + break; +#endif +#ifdef HASUSRCALL + case TUSR: + parsefunction(xusr, 2); + break; +#endif + /* Arduino I/O */ +#ifdef HASARDUINOIO + case TAREAD: + parsefunction(xaread, 1); + break; + case TDREAD: + parsefunction(xdread, 1); + break; + case TMILLIS: + parsefunction(bmillis, 1); + break; +#ifdef HASPULSE + case TPULSE: + parsefunction(bpulsein, 3); + break; +#endif + case TAZERO: +#if defined(ARDUINO) && defined(A0) + push(A0); +#else + push(0); +#endif + break; + case TLED: +#ifdef LED_BUILTIN + push(LED_BUILTIN); +#else + push(0); +#endif + break; +#endif + /* mathematical functions in case we have float */ +#ifdef HASFLOAT + case TSIN: + parsefunction(xsin, 1); + break; + case TCOS: + parsefunction(xcos, 1); + break; + case TTAN: + parsefunction(xtan, 1); + break; + case TATAN: + parsefunction(xatan, 1); + break; + case TLOG: + parsefunction(xlog, 1); + break; + case TEXP: + parsefunction(xexp, 1); + break; +#endif + /* int is always present to make programs compatible */ + case TINT: + parsefunction(xint, 1); + break; +#ifdef HASDARTMOUTH + case TFN: + xfn(0); + break; + /* an arcane feature, DATA evaluates to the data record number */ + case TDATA: + push(datarc); + break; +#endif +#ifdef HASDARKARTS + case TMALLOC: + parsefunction(xmalloc, 2); + break; + case TFIND: + xfind(); + break; +#endif +#ifdef HASIOT + case TNETSTAT: + factornetstat(); + break; +#endif +#ifdef HASMSSTRINGS + case TASC: + factorasc(); + break; +#endif + case TBIT: + parsefunction(xbit, 2); + break; + /* unknown function */ + default: + error(EUNKNOWN); + return; + } +} + +/* this is how the power operator ^ is handled */ +#ifdef POWERRIGHTTOLEFT +/* the recursive version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (!USELONGJUMP && er) return; + + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^') { + parseoperator(power); + if (!USELONGJUMP && er) return; + push(bpow(x, y)); + } + if (DEBUG) bdebug("leaving power\n"); +} +#else +/* the left associative version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (!USELONGJUMP && er) return; + +nextpower: + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^') { + parseoperator(factor); + push(bpow(x, y)); + goto nextpower; + } + if (DEBUG) bdebug("leaving power\n"); +} +#endif + +/* + * term() evaluates powers, multiplication, division and mod. + * There are two versions, one with a power operator ^ and one without. + */ +#ifdef HASPOWER +void term() { + if (DEBUG) bdebug("term\n"); + power(); + if (!USELONGJUMP && er) return; + +nextfactor: + if (DEBUG) bdebug("in term\n"); + if (token == '*') { + parseoperator(power); + if (!USELONGJUMP && er) return; + push(x * y); + goto nextfactor; + } else if (token == '/') { + parseoperator(power); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x / y); +#else + if (forceint) push((int)x / (int)y); else push(x / y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == '%') { + parseoperator(power); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x % y); +#else + push((int)x % (int)y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == TSHL) { + parseoperator(power); + if (!USELONGJUMP && er) return; + push((int)x << (int)y); + goto nextfactor; + } else if (token == TSHR) { + parseoperator(power); + if (!USELONGJUMP && er) return; + push((int)x >> (int)y); + goto nextfactor; + } + if (DEBUG) bdebug("leaving term\n"); +} +#else +void term() { + if (DEBUG) bdebug("term\n"); + factor(); + if (!USELONGJUMP && er) return; + +nextfactor: + nexttoken(); + if (DEBUG) bdebug("in term\n"); + if (token == '*') { + parseoperator(factor); + if (!USELONGJUMP && er) return; + push(x * y); + goto nextfactor; + } else if (token == '/') { + parseoperator(factor); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x / y); +#else + if (forceint) push((int)x / (int)y); else push(x / y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == '%') { + parseoperator(factor); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x % y); +#else + push((int)x % (int)y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == TSHL) { + parseoperator(factor); + if (!USELONGJUMP && er) return; + push((int)x << (int)y); + goto nextfactor; + } else if (token == TSHR) { + parseoperator(factor); + if (!USELONGJUMP && er) return; + push((int)x >> (int)y); + goto nextfactor; + } + if (DEBUG) bdebug("leaving term\n"); +} + + + +#endif + +/* add and subtract */ +void addexpression() { + if (DEBUG) bdebug("addexp\n"); + if (token != '+' && token != '-') { + term(); + if (!USELONGJUMP && er) return; + } else { + push(0); + } + +nextterm: + if (token == '+' ) { + parseoperator(term); + if (!USELONGJUMP && er) return; + push(x + y); + goto nextterm; + } else if (token == '-') { + parseoperator(term); + if (!USELONGJUMP && er) return; + push(x - y); + goto nextterm; + } +} + +/* comparisions */ +void compexpression() { + if (DEBUG) bdebug("compexp\n"); + addexpression(); + if (!USELONGJUMP && er) return; + switch (token) { + case '=': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; +#ifndef HASFLOAT + push(x == y ? booleanmode : 0); +#else + if (fabs(x - y) <= epsilon) push(booleanmode); else push(0); +#endif + break; + case NOTEQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; +#ifndef HASFLOAT + push(x != y ? booleanmode : 0); +#else + if (fabs(x - y) > epsilon) push(booleanmode); else push(0); +#endif + break; + case '>': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x > y ? booleanmode : 0); + break; + case '<': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x < y ? booleanmode : 0); + break; + case LESSEREQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x <= y ? booleanmode : 0); + break; + case GREATEREQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x >= y ? booleanmode : 0); + break; + } +} + +#ifdef HASAPPLE1 +/* boolean NOT */ +void notexpression() { + if (DEBUG) bdebug("notexp\n"); + if (token == TNOT) { + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + if (booleanmode == -1) push(~(short)pop()); + else if (pop() == 0) push(1); else push(0); + } else + compexpression(); +} + +/* boolean AND and at the same time bitwise */ +void andexpression() { + if (DEBUG) bdebug("andexp\n"); + notexpression(); + if (!USELONGJUMP && er) return; + if (token == TAND) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x & (short)y); + } +} + +/* expression function and boolean OR at the same time bitwise !*/ +void expression() { + if (DEBUG) bdebug("exp\n"); + andexpression(); + if (!USELONGJUMP && er) return; + if (token == TOR) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x | (short)y); + } +} +#else + +/* expression function simplified */ +void expression() { + if (DEBUG) bdebug("exp\n"); + compexpression(); + if (!USELONGJUMP && er) return; + if (token == TOR) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x | (short)y); + } +} +#endif + +/* + Layer 2 - The commands and their helpers + + Palo Alto BASIC languge set - PRINT, LET, INPUT, GOTO, GOSUB, RETURN, + IF, FOR, TO, NEXT, STEP, BREAK, STOP, END, LIST, NEW, RUN, REM + BREAK is not Palo ALto but fits here, eEND is identical to STOP. +*/ + +/* + PRINT command, extended by many features like file, wire, mqtt and radio i/o. + TAB added as part of the PRINT statement with C64 compatibility. +*/ +void xprint() { + char semicolon = 0; + char oldod; + char modifier = 0; + string_t s; + stringlength_t i; + + form = 0; + oldod = od; + nexttoken(); + +processsymbol: + /* at the end of a print statement, do we need a newline, restore the defaults */ + if (termsymbol()) { + if (!semicolon) outcr(); + od = oldod; + form = 0; + return; + } + semicolon = 0; + + /* output a string if we found it */ + if (stringvalue(&s)) { + if (!USELONGJUMP && er) return; + + /* buffer must be used here for machine code to work */ +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(s.ir, s.length); + + nexttoken(); + goto separators; + } + + /* the tab command as part of print */ +#ifdef HASMSSTRINGS + if (token == TTAB || token == TSPC) { + xtab(); + goto separators; + } +#endif + + /* modifiers of the print statement */ + if (token == '#' || token == '&') { + modifier = token; + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + switch (modifier) { + case '#': + form = pop(); + break; + case '&': + od = pop(); + break; + } + goto separators; + } + + if (token != ',' && token != ';') { + expression(); + if (!USELONGJUMP && er) return; + outnumber(pop()); + } + + /* commas and semicolons, all other symbols are accepted and no error is thrown */ +separators: + if (termsymbol()) goto processsymbol; + + switch (token) { + case ',': + if (!modifier) outspc(); + case ';': + semicolon = 1; + nexttoken(); + break; + } + modifier = 0; + + goto processsymbol; +} + +/* + LET assigment code for various lefthand and righthand side. + + + lefthandside is a helper function for reuse in other + commands. It determines the address the value is to be + assigned to and whether the assignment target is a + "pure" i.e. subscriptless string expression + + assignnumber assigns a number to a given lefthandside + + In lefthandside the type of the object is determined and + possible subscripts are parsed. + + Variables have no subscripts. The arguments are unchanged. + Arrays may have two subscript which will go to i, j + Strings may have a string subscript, going to i and an array subscript + going to j + String arrays use i2 as the array index. + Note that the role of the variables differs for string array and normal + arrays. + Strings without a subscript i.e. pure strings, set the ps flag + +*/ + +/* the new lefthandsite code */ +void lefthandside(lhsobject_t* lhs) { + + /* just to provide it for parsestringvar to reuse the righthandside code */ + address_t temp; + + if (DEBUG) { + outsc("assigning to variable "); + outname(&lhs->name); outspc(); + outsc(" type "); outnumber(lhs->name.token); + outcr(); + } + + /* prep it */ + lhs->i = 1; + lhs->i2 = 0; + lhs->j = arraylimit; + lhs->ps = 1; + + /* look at the variables and continue parsing */ + switch (lhs->name.token) { + case VARIABLE: + nexttoken(); + break; + case ARRAYVAR: + parsesubscripts(); + if (!USELONGJUMP && er) return; + switch (args) { + case 1: + lhs->i = popaddress(); + if (!USELONGJUMP && er) return; + lhs->j = arraylimit; + break; + case 2: + lhs->j = popaddress(); + if (!USELONGJUMP && er) return; + lhs->i = popaddress(); + if (!USELONGJUMP && er) return; + break; + default: + error(EARGS); + return; + } + nexttoken(); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + parsestringvar(0, lhs); + nexttoken(); + break; +#else /* HASAPPLE1 */ + /* here we could implement a string thing for a true Tinybasic */ +#endif + default: + error(EUNKNOWN); + return; + } + + if (DEBUG) { + outsc("** in assignment lefthandside with (i,j,ps,i2) "); + outnumber(lhs->i); outspc(); + outnumber(lhs->j); outspc(); + outnumber(lhs->ps); outspc(); + outnumber(lhs->i2); outcr(); + outsc(" token is "); outputtoken(); + outsc(" at "); outnumber(here); outcr(); + } +} + +/* assign a number to a left hand side we have parsed */ +void assignnumber2(lhsobject_t* lhs, number_t x) { + string_t sr; + + /* depending on the variable type, assign the value */ + switch (lhs->name.token) { + case VARIABLE: + setvar(&lhs->name, x); + break; + case ARRAYVAR: + array(lhs, 's', &x); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + + /* find the string variable */ + getstring(&sr, &lhs->name, lhs->i, lhs->j); + if (!USELONGJUMP && er) return; + + /* the first character of the string is set to the number */ + if (sr.ir) sr.ir[0] = x; else if (sr.address) memwrite2(ax, x); else error(EUNKNOWN); + + /* set the length */ + if (lhs->ps) + setstringlength(&lhs->name, 1, lhs->j); + else if (sr.length < lhs->i && lhs->i <= sr.strdim) + setstringlength(&lhs->name, lhs->i, lhs->j); + break; +#endif + } +} + +/* + LET - the core assigment function, this is different from other BASICs +*/ +void assignment() { + address_t newlength, copybytes; + mem_t s; + index_t k; + char tmpchar; /* for number conversion only */ + string_t sr, sl; /* the right and left hand side strings */ + + /* the lefthandside identifier */ + lhsobject_t lhs; + + /* this code evaluates the left hand side, we remember the object information first */ + copyname(&lhs.name, &name); + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + + /* the assignment part */ + if (token != '=') { + error(EUNKNOWN); + return; + } + nexttoken(); + + /* here comes the code for the right hand side, the evaluation depends on the left hand side type */ + switch (lhs.name.token) { + /* the lefthandside is a scalar, evaluate the righthandside as a number, even if it is a string */ + case VARIABLE: + case ARRAYVAR: + expression(); + if (!USELONGJUMP && er) return; + assignnumber2(&lhs, pop()); + break; +#ifdef HASAPPLE1 + /* the lefthandside is a string variable, try evaluate the righthandside as a stringvalue */ + case STRINGVAR: +nextstring: + + /* do we deal with a string as righthand side */ + s = stringvalue(&sr); + if (!USELONGJUMP && er) return; + + /* and then as an expression if it is no string, any number appearing in a string expression terminates the addition loop */ + if (!s) { + expression(); + if (!USELONGJUMP && er) return; + tmpchar = pop(); + sr.length = 1; + sr.ir = &tmpchar; + } else + nexttoken(); /* we do this here because expression also advances, this way we avoid double advance */ + + if (DEBUG) { + outsc("* assigment stringcode at "); + outnumber(here); + outcr(); + } + + /* at this point we have a stringvalue with ir2 pointing to the payload and the stack the length + this is either coming from stringvalue or from the expression code */ + + /* we now process the source string */ + + /* getstring of the destination */ + getstring(&sl, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + + /* this debug messes up sbuffer hence all functions that use it in stringvalue produce wrong results */ + if (DEBUG) { + outsc("* assigment stringcode "); outname(&lhs.name); outcr(); + outsc("** assignment source string length "); outnumber(sr.length); outcr(); + outsc("** assignment dest string length "); outnumber(sl.length); outcr(); + outsc("** assignment dest string dimension "); outnumber(sl.strdim); outcr(); + } + + /* does the source string fit into the destination if we have no destination second index*/ + if ((lhs.i2 == 0) && ((lhs.i + sr.length - 1) > sl.strdim)) { + error(EORANGE); + return; + }; + + /* if we have a second index, is it in range */ + if ((lhs.i2 != 0) && lhs.i2 > sl.strdim) { + error(EORANGE); + return; + }; + + /* calculate the number of bytes we truely want to copy */ + if (lhs.i2 > 0) copybytes = ((lhs.i2 - lhs.i + 1) > sr.length) ? sr.length : (lhs.i2 - lhs.i + 1); + else copybytes = sr.length; + + if (DEBUG) { + outsc("** assignment copybytes "); + outnumber(copybytes); + outcr(); + } + + /* now do the heavy lifting in a seperate function to encasulate buffering */ + assignstring(&sl, &sr, copybytes); + + /* + classical Apple 1 behaviour is string truncation in substring logic, with + two index destination string we follow another route. We extend the string + for the number of copied bytes + */ + if (lhs.i2 == 0) { + newlength = lhs.i + sr.length - 1; + } else { + if (lhs.i + copybytes > sl.length) newlength = lhs.i + copybytes - 1; + else newlength = sl.length; + } + + setstringlength(&lhs.name, newlength, lhs.j); + /* + we have processed one string and copied it fully to the destination + see if there is more to come. For inplace strings this is odd because + one term can change during adding (A$ = B$ + A$). + */ +addstring: + if (token == '+') { + lhs.i = lhs.i + copybytes; + nexttoken(); + goto nextstring; + } + break; /* case STRINGVAR */ +#endif /* HASAPPLE1 */ + } /* switch */ +} + + +/* + Try to copy one string to the other, assumes that getstring did its work + and that copybyte is correct. + BASICs in place strings make this a non trivial exercise as we need to + avoid overwrites. + Another complication is the mixed situation of BASIC memory strings + and C memory strings. +*/ +void assignstring(string_t* sl, string_t* sr, stringlength_t copybytes) { + stringlength_t k; + + /* if we have a memory model that needs the mem interface, go through the addresses by default + else use just the pointers */ + +#ifdef USEMEMINTERFACE + /* for a regular string variable as left hand side we know the address */ + if (sl->address) { + + /* for a regular string variable as a source we need to take care of order */ + + if (sr->address) { + if (sr->address > sl->address) + for (k = 0; k < copybytes; k++) memwrite2(sl->address + k, memread2(sr->address + k)); + else + for (k = 1; k <= copybytes; k++) memwrite2(sl->address + copybytes - k, memread2(sr->address + copybytes - k)); + } else { + + /* if the right hand side is a special string or a constant things are much simpler */ + + for (k = 0; k < copybytes; k++) memwrite2(sl->address + k, sr->ir[k]); + + } + } else { + + /* non regular string variables like @U$ and @T$ are never assignable */ + error(EUNKNOWN); + } +#else + + /* we just go through the C memory here */ + + if (sr->ir && sl->ir) { + if (sr->ir > sl->ir) + for (k = 0; k < copybytes; k++) sl->ir[k] = sr->ir[k]; + else + for (k = 1; k <= copybytes; k++) sl->ir[copybytes - k] = sr->ir[copybytes - k]; + } else { + error(EUNKNOWN); + } + +#endif +} + +/* + INPUT ["string",] variable [,["string",] variable] + + The original version of input only processes simple variables one at a time + and does not support arrays. The code is redudant to assignment and read. + It also does not support comma separated lists of values to be input. +*/ +void showprompt() { + outsc("? "); +} + +/* + Reimplementation of input using the same pattern as read and print . +*/ +void xinput() { + + mem_t oldid = id; /* remember the stream on modify */ + mem_t prompt = 1; /* determine if we show the prompt */ + number_t xv; /* for number conversion with innumber */ + + /* the identifier of the lefthandside */ + lhsobject_t lhs; + + address_t maxlen, newlength; /* the maximum length of the string to be read */ + int k = 0; /* the result of the number conversion */ + string_t s; + char* buffer; /* the buffer we use for input */ + address_t bufsize; /* the size of the buffer */ + + /* depending on the RUN state we use either the input buffer or the string buffer */ + /* this ways we can process long inputs in RUN and don't need a lot of memory */ + if (st == SRUN || st == SERUN) { + buffer = ibuffer; + bufsize = BUFSIZE; + } else { + buffer = sbuffer; + bufsize = SBUFSIZE; + } + + /* get the next token and check what we are dealing with */ + nexttoken(); + + /* modifiers of the input statement (stream) */ + if (token == '&') { + if (!expectexpr()) return; + oldid = id; + id = pop(); + if (id != ISERIAL || id != IKEYBOARD) prompt = 0; + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + + /* unlike print, form can appear only once in input after the + stream, it controls character counts in wire */ + if (token == '#') { + if (!expectexpr()) return; + form = pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + + /* we have a string to be printed to prompt the user */ +nextstring: + if (token == STRING && id != IFILE) { + prompt = 0; +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(sr.ir, sr.length); + nexttoken(); + } + + /* now we check for a variable and parse it */ +nextvariable: + if (token == VARIABLE || token == ARRAYVAR || token == STRINGVAR) { + + /* check for a valid lefthandside expression */ + copyname(&lhs.name, &name); + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + + /* which data type do we input */ + switch (lhs.name.token) { + case VARIABLE: + case ARRAYVAR: +again: + /* if we have no buffer or are at the end, read it and set cursor k to the beginning */ + if (k == 0 || (address_t) buffer[0] < k) { + if (prompt) showprompt(); + (void) ins(buffer, bufsize); + k = 1; + } + + /* read a number from the buffer and return it, advance the cursor k */ + k = innumber(&xv, buffer, k); + + /* if we break, end it here */ + if (k == -1) { + st = SINT; + token = EOL; + goto resetinput; + } + + /* if we have no valid number, ask again */ + if (k == 0) { + if (id == ISERIAL || id == IKEYBOARD) { + printmessage(ENUMBER); + outspc(); + printmessage(EGENERAL); + outcr(); + xv = 0; + k = 0; + goto again; + } else { + ert = 1; + xv = 0; + goto resetinput; + } + } + + /* now assign the number */ + assignnumber2(&lhs, xv); + + /* look if there is a comma coming in the buffer and keep it */ + while (k < (address_t) buffer[0] && buffer[k] != 0) { + if (buffer[k] == ',') { + k++; + break; + } + k++; + } + break; +#ifdef HASAPPLE1 + case STRINGVAR: + /* the destination address of the lefthandside, on the fly create included */ + getstring(&s, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + + /* the length of the lefthandside string */ + if (lhs.i2 == 0) { + maxlen = s.strdim - lhs.i + 1; + } else { + maxlen = lhs.i2 - lhs.i + 1; + if (maxlen > s.strdim) maxlen = s.strdim - lhs.i + 1; + } + + /* the number of bytes we want to read the form parameter in WIRE can be used + to set the expected number of bytes */ + if (form != 0 && form < maxlen) maxlen = form; + + /* what is going on */ + if (DEBUG) { + outsc("** input stringcode at "); outnumber(here); outcr(); + outsc("** input stringcode "); outname(&lhs.name); outcr(); + outsc("** input stringcode maximum length "); outnumber(maxlen); outcr(); + } + + /* now read the string inplace */ + if (prompt) showprompt(); +#ifndef USEMEMINTERFACE + newlength = ins(s.ir - 1, maxlen); +#else + newlength = ins(spistrbuf1, maxlen); + + /* if we have a string variable, we need to copy the buffer to the string */ + if (newlength > 0) { + if (s.ir) { + for (k = 0; k < newlength; k++) s.ir[k] = spistrbuf1[k + 1]; + } else { + for (k = 0; k < newlength; k++) memwrite2(s.address + k, spistrbuf1[k + 1]); + } + } +#endif + + /* if we have a string variable, we need to copy the buffer to the string */ + + + /* set the right string length */ + /* classical Apple 1 behaviour is string truncation in substring logic */ + newlength = lhs.i + newlength - 1; + setstringlength(&lhs.name, newlength, lhs.j); + break; +#endif + } + } + + /* seperators and termsymbols */ + if (token == ',' || token == ';') { + nexttoken(); + goto nextstring; + } + + /* no further data */ + if (!termsymbol()) { + error(EUNKNOWN); + } + +resetinput: + id = oldid; + form = 0; +} + +/* + GOTO, GOSUB, RETURN and their helpers + + GOTO and GOSUB function for a simple one statement goto +*/ +void xgoto() { + token_t t = token; + number_t x; + + if (!expectexpr()) return; + if (t == TGOSUB) pushgosubstack(0); + if (!USELONGJUMP && er) return; + + x = pop(); + + if (DEBUG) { + outsc("** goto/gosub evaluated line number "); + outnumber(x); + outcr(); + } + findline((address_t) x); + if (!USELONGJUMP && er) return; + if (DEBUG) { + outsc("** goto/gosub branches to "); + outnumber(here); + outcr(); + } + + /* goto in interactive mode switched to RUN mode + no clearing of variables and stacks */ + if (st == SINT) st = SRUN; +} + +/* + RETURN retrieves here from the gosub stack +*/ +void xreturn() { + popgosubstack(); + if (DEBUG) { + outsc("** restored location "); + outnumber(here); + outcr(); + } + if (!USELONGJUMP && er) return; + nexttoken(); +#ifdef HASEVENTS + /* we return from an interrupt and reenable them */ + if (gosubarg[gosubsp] == TEVENT) events_enabled = 1; +#endif +} + +/* + IF statement together with THEN +*/ +void xif() { + mem_t nl = 0; + + if (!expectexpr()) return; + x = pop(); + if (DEBUG) { + outsc("** in if, condition "); + outnumber(x); + outcr(); + } + + /* if can have a new line after the expression in this BASIC */ + if (token == LINENUMBER) nexttoken(); + + /* we only check false which is 0 */ + if (x == 0) { +#ifndef HASSTRUCT + /* on condition false skip the entire line and all : until a potential ELSE */ + while (token != LINENUMBER && token != EOL && token != TELSE) nexttoken(); +#else + /* in the structured language set, we need to look for a DO close to the IF and skip it*/ + /* a THEN or not and then a line number expects a block */ + if (token == TTHEN) nexttoken(); + if (token == LINENUMBER) { + nexttoken(); + nl = 1; + } + + /* skip the block */ + if (token == TDO) { + nexttoken(); + findbraket(TDO, TDEND); + nexttoken(); + goto processelse; + } + + /* skip the line */ + if (!nl) while (token != LINENUMBER && token != EOL && token != TELSE) nexttoken(); + +processelse: +#endif + + /* if we have ELSE at this point we want to execute this part of the line as the condition + was false, isolated ELSE is GOTO, otherwise just execute the code */ + +#ifdef HASSTEFANSEXT + /* look if ELSE is at the next line */ + if (token == LINENUMBER) nexttoken(); + + /* now process ELSE */ + if (token == TELSE) { + nexttoken(); + if (token == NUMBER) { + findline((address_t) x); + return; + } + } +#endif + } + + /* a THEN is interpreted as simple one statement goto if it is followed by a line number*/ +#ifdef HASAPPLE1 + /* then can be on a new line */ + if (token == TTHEN) { + nexttoken(); + if (token == NUMBER) { + findline((address_t) x); + } + } +#endif +} + +/* if else is encountered in the statement line, the rest of the code is skipped + as else code execution is triggered in the xif function */ +#ifdef HASSTEFANSEXT +void xelse() { + mem_t nl = 0; + +#ifndef HASSTRUCT + /* skip the entire line */ + while (token != LINENUMBER && token != EOL) nexttoken(); +#else + nexttoken(); + /* else in a single line */ + if (token == LINENUMBER) { + nexttoken(); + nl = 1; + } + + /* the block after the else on a new line or the current line */ + if (token == TDO) { + nexttoken(); + findbraket(TDO, TDEND); + } + + /* single line else, skip the line */ + if (!nl) while (token != LINENUMBER && token != EOL) nexttoken(); + +#endif +} +#endif + +/* + FOR, NEXT and the apocryphal BREAK + + find the NEXT token or the end of the program +*/ + +/* + The generic block scanner, used for structured code and in FOR NEXT. + The closing symbol of a symbol is found. Symbol pairs are: + + FOR NEXT + WHILE WEND + REPEAT UNTIL + DO DEND + SWITCH SWEND + +*/ +void findbraket(token_t bra, token_t ket) { + address_t fnc = 0; + + while (1) { + + if (DEBUG) { + outsc("** skpping braket "); + outputtoken(); outspc(); + outnumber(here); outspc(); + outnumber(fnc); outcr(); + } + + if (token == ket) { + if (fnc == 0) return; else fnc--; + } + + if (token == bra) fnc++; + + /* no closing symbol found */ + if (token == EOL) { + error(bra); + return; + } + nexttoken(); + } +} + +/* + FOR variable [= expression [to expression]] [STEP expression] + for stores the variable, the increment and the boudary on the + for stack. Changing steps and boundaries during the execution + of a loop has no effect. + + This is different from many other BASICS as FOR can be used + as an open loop with no boundary +*/ +void xfor() { + name_t variable; + number_t begin = 1; + number_t to = maxnum; + number_t step = 1; + + /* we need at least a name */ + if (!expect(VARIABLE, EUNKNOWN)) return; + copyname(&variable, &name); + + /* + This is not standard BASIC. + All combinations of FOR TO STEP are allowed. + FOR X : NEXT is an infinite loop. + FOR X=1 : NEXT is a loop with X=1 and an infinite loop. + FOR X=1 TO 10 : NEXT is a loop with X=1 to 10. + FOR X=1 TO 10 STEP 2 : NEXT is a loop with X=1 to 10 in steps of 2. + A variable must always be supplyed to indentify the loop. + FOR : NEXT is illegal. + */ + nexttoken(); + if (token == '=') { + if (!expectexpr()) return; + begin = pop(); + setvar(&variable, begin); + } + + if (token == TTO) { + if (!expectexpr()) return; + to = pop(); + } + + if (token == TSTEP) { + if (!expectexpr()) return; + step = pop(); + } + + if (!termsymbol()) { + error(EUNKNOWN); + return; + } + + /* in interactive mode we reuse here to store the offset in the buffer */ + if (st == SINT) here = bi - ibuffer; + + /* here we know everything to set up the loop */ + + if (DEBUG) { + outsc("** for loop with parameters var begin end step: "); + outname(&variable); + outspc(); outnumber(begin); + outspc(); outnumber(to); + outspc(); outnumber(step); + outcr(); + outsc("** for loop target location "); outnumber(here); outcr(); + } + + pushloop(&variable, TFOR, here, to, step); + if (!USELONGJUMP && er) return; + + /* + This tests the condition and stops if it is fulfilled already from start. + There is another apocryphal feature here: STEP 0 is legal triggers an infinite loop. + */ + if ((step > 0 && getvar(&variable) > to) || (step < 0 && getvar(&variable) < to)) { + droploop(); + findbraket(TFOR, TNEXT); + nexttoken(); + if (token == VARIABLE) nexttoken(); /* This BASIC does not check. */ + } +} + +/* + BREAK - an apocryphal feature here is the BREAK command ending a loop +*/ +#ifdef HASSTRUCT +void xbreak() { + bloop_t* loop; + + loop = activeloop(); + if (!USELONGJUMP && er) return; + switch (loop->var.token) { + case TWHILE: + findbraket(TWHILE, TWEND); + nexttoken(); + break; + case TREPEAT: + findbraket(TREPEAT, TUNTIL); + while (!termsymbol()) nexttoken(); + break; + default: /* a FOR loop is the default */ + findbraket(TFOR, TNEXT); + nexttoken(); + if (token == VARIABLE) nexttoken(); /* we are at next and skip the variable check */ + break; + } + droploop(); +} +#else +void xbreak() { + droploop(); + if (!USELONGJUMP && er) return; + findbraket(TFOR, TNEXT); + nexttoken(); + if (token == VARIABLE) nexttoken(); /* we are at next and skip the variable check */ +} +#endif + +/* + CONT as a loop control statement, as apocryphal as BREAK, simply + advance to next and the continue to process +*/ +#ifdef HASSTRUCT +void xcont() { + bloop_t* loop; + + loop = activeloop(); + if (!USELONGJUMP && er) return; + switch (loop->var.token) { + case TWHILE: + findbraket(TWHILE, TWEND); + break; + case TREPEAT: + findbraket(TREPEAT, TUNTIL); + break; + default: /* a FOR loop is the default */ + findbraket(TFOR, TNEXT); + break; + } +} +#else +void xcont() { + findbraket(TFOR, TNEXT); +} +#endif + +/* + NEXT variable statement. + + This code uses the global name variable right now for processing of + the variable in FOR. The variable name in next is stored in a local variable. +*/ + +/* reimplementation of xnext without change of the stack in a running loop */ + +void xnext() { + name_t variable; /* this is a potential variable argument of next */ + number_t value; + bloop_t* loop; + + /* check is we have the variable argument */ + nexttoken(); + + /* one variable is accepted as an argument, no list */ + if (token == VARIABLE) { + if (DEBUG) { + outsc("** variable argument "); + outname(&name); + outcr(); + } + + copyname(&variable, &name); + nexttoken(); + if (!termsymbol()) { + error(EUNKNOWN); + return; + } + } else { + variable.c[0] = 0; + } + + /* see whats going on */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + + /* check if this is really a FOR loop */ +#ifdef HASSTRUCT + if (loop->var.token == TWHILE || loop->var.token == TREPEAT) { + error(ELOOP); + return; + } +#endif + + /* a variable argument in next clears the for stack + down as BASIC programs can and do jump out to an outer next */ + if (variable.c[0] != 0) { + while (!cmpname(&variable, &loop->var)) { + droploop(); + if (!USELONGJUMP && er) return; + loop = activeloop(); + if (!USELONGJUMP && er) return; + } + } + + /* step=0 an infinite loop */ + /* this goes through the variable name */ +#ifndef HASLOOPOPT + value = getvar(&loop->var) + loop->step; + setvar(&loop->var, value); +#else + /* this goes through the stored address and then tries the name (for looping special variables) */ + if (loop->varaddress) { + value = getnumber(loop->varaddress, memread2) + loop->step; + setnumber(loop->varaddress, memwrite2, value); + } else { + value = getvar(&loop->var) + loop->step; + setvar(&loop->var, value); + } +#endif + + if (DEBUG) { + outsc("** next loop variable "); outname(&loop->var); outspc(); + outsc(" value "); outnumber(value); outcr(); + } + + /* do we need another iteration, STEP 0 always triggers an infinite loop */ + if ((loop->step == 0) || (loop->step > 0 && value <= loop->to) || (loop->step < 0 && value >= loop->to)) { + /* iterate in the loop */ + here = loop->here; + /* in interactive mode, jump to the right buffer location */ + if (st == SINT) bi = ibuffer + here; + } else { + /* last iteration completed we stay here after the next, + no precaution for SINT needed as bi unchanged */ + droploop(); + } + nexttoken(); + if (DEBUG) { + outsc("** after next found token "); + debugtoken(); + } +} + +/* + TOKEN output - this is also used in save. + list does a minimal formatting with a simple heuristic. + +*/ +void outputtoken() { + address_t i; + + if (token == EOL) return; + + if (token == LINENUMBER) outliteral = 0; + + if (token == TREM) outliteral = 1; + + if (spaceafterkeyword) { + if (token != '(' && + token != LINENUMBER && + token != ':' && + token != '$') outspc(); + spaceafterkeyword = 0; + } + + switch (token) { + case NUMBER: + outnumber(x); + break; + case LINENUMBER: + outnumber(ax); + outspc(); + break; + case ARRAYVAR: + case STRINGVAR: + case VARIABLE: + if (lastouttoken == NUMBER) outspc(); + outname(&name); + if (token == STRINGVAR) outch('$'); + break; + case STRING: + outch('"'); +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(sr.ir, sr.length); + outch('"'); + break; + default: + if ( (token < 32 && token >= BASEKEYWORD) || token < -127) { + if ((token == TTHEN || + token == TELSE || + token == TTO || + token == TSTEP || + token == TGOTO || + token == TGOSUB || + token == TOR || + token == TAND) && lastouttoken != LINENUMBER) outspc(); + else if (lastouttoken == NUMBER || lastouttoken == VARIABLE) { + if (token != GREATEREQUAL && + token <= LESSEREQUAL + && token != TSHL && + token != TSHR + ) outspc(); + } + + for (i = 0; gettokenvalue(i) != 0 && gettokenvalue(i) != token; i++); + outsc(getkeyword(i)); + if (token != GREATEREQUAL && + token != NOTEQUAL && + token != LESSEREQUAL && + token != TSHL && + token != TSHR && + token != TREM && + token != TFN) spaceafterkeyword = 1; + break; + } + if (token >= 32) { + outch(token); + if (token == ':' && !outliteral) outspc(); + break; + } + outch(token); outspc(); outnumber(token); + } + + lastouttoken = token; +} + +/* + LIST programs to an output device. + + The output is formatted to fit the screen, the heuristic is simple. + +*/ + +void listlines(address_t b, address_t e) { + mem_t oflag = 0; + address_t here2 = here; + + /* global variables controlling outputtoken, reset to default */ + lastouttoken = 0; + spaceafterkeyword = 0; + + /* if there is a programm ... */ + if (top != 0) { + here = 0; + gettoken(); + while (here < top) { + if (token == LINENUMBER && ax >= b) oflag = 1; + if (token == LINENUMBER && ax > e) oflag = 0; + if (oflag) outputtoken(); + gettoken(); + if (token == LINENUMBER && oflag) { + outcr(); + /* wait after every line on small displays + removed if ( dspactive() && (dsp_rows < 10) ){ if ( inch() == 27 ) break;} */ + if (dspactive() && dspwaitonscroll() == 27) break; + } + } + if (here == top && oflag) outputtoken(); + if (e == maxaddr || b != e) outcr(); /* supress newlines in "list 50" - a little hack */ + } + + if (st != SINT) here = here2; +} + +void xlist() { + address_t b, e; + + /* get the argument */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + + /* parse the arguments */ + switch (args) { + case 0: + b = 0; + e = maxaddr; + break; + case 1: + b = pop(); + e = b; + break; + case 2: + e = pop(); + b = pop(); + break; + default: + error(EARGS); + return; + } + + /* list the line from b to e in the default output device */ + listlines(b, e); + + /* we are done */ + nexttoken(); +} + +/* + The progam line editor, first version. The code is + not save for BUFSIZE greater than 127. A cast to + unsigned char aka uint8_t is needed for the string + length as some platforms have a signed char and some + don't. +*/ +void xedit() { + mem_t ood = od; + address_t line; + address_t l; + int i, k, j; + char ch; + + /* we edit only in interactive mode */ + if (st != SINT) { + error(EUNKNOWN); + return; + } + + /* currently only one line number */ + if (!expectexpr()) { + error(EARGS); + return; + } + + /* this uses the input buffer now */ + line = pop(); +undo: /* this is the undo point */ + ibuffer[0] = 0; + ibuffer[1] = 0; + od = 0; + listlines(line, line); + if (ibuffer[0] == 0) { + outnumber(line); + outspc(); + } + od = ood; + + /* set the cursor to the first character */ + l = 1; + + /* editing loop for blocking and non blocking terminals */ + while (-1) { + + /* show the line and indicate the cursor */ + for (i = 1; i <= (unsigned char)ibuffer[0]; i++) outch(ibuffer[i]); + outcr(); + for (i = 0; i < l - 1; i++) outspc(); + outch('^'); + outcr(); + + /* get a bunch of editing commands and process them*/ + i = ins(sbuffer, SBUFSIZE); + for (k = 1; k <= i; k++) { + ch = sbuffer[k]; + switch (ch) { + case 'q': /* quit the editor*/ + goto done; + case 'Q': /* end the editor without saving */ + goto endnosave; + break; + case 'X': /* delete from cursor until the end of the line */ + ibuffer[0] = (char)l; + ibuffer[l] = 0; + break; + case 'j': /* vi style left */ + if (l > 1) l--; + break; + case 'k': /* vi style right */ + if (l < (unsigned char)ibuffer[0]) l++; + break; + case 'x': /* delete the cursor character */ + if ((unsigned char)ibuffer[0] > 0) { + for (j = l; j < (unsigned char)ibuffer[0]; j++) ibuffer[j] = ibuffer[j + 1]; + ibuffer[j] = 0; + ibuffer[0] = (unsigned char)ibuffer[0] - 1; + } + if ((unsigned char)ibuffer[0] < l) l = (unsigned char)ibuffer[0]; + break; + case 's': /* substitute one character at the cursor position */ + if (k < i) { + k++; + ibuffer[l] = sbuffer[k]; + } + break; + case 'a': /* append multiple characters at the end of the line */ + l = (unsigned char)ibuffer[0] + 1; + case 'i': /* insert multiple characters at the cursor position */ + if (i - k + (unsigned char)ibuffer[0] < BUFSIZ) { + for (j = i - k + (unsigned char)ibuffer[0]; j >= l; j--) { + ibuffer[j + i - k] = ibuffer[j]; + if (j <= l + i - k) ibuffer[j] = sbuffer[k + 1 + (j - l)]; + } + } + ibuffer[0] = (unsigned char)ibuffer[0] + i - k; + k = i; + break; + case '^': /* vi style start of line */ + l = 1; + break; + case '$': /* vi style end of line */ + l = (unsigned char)ibuffer[0] + 1; + break; + case 'h': /* vi style backspace */ + if (l > 1) { + for (j = l - 1; j < (unsigned char)ibuffer[0]; j++) ibuffer[j] = ibuffer[j + 1]; + ibuffer[j] = 0; + ibuffer[0] = (unsigned char)ibuffer[0] - 1; + l--; + } + break; + case 'u': /* vi style undo */ + goto undo; + break; + case ':': /* find the next colon : character*/ + if (l <= (unsigned char)ibuffer[0]) { + while (l <= (unsigned char)ibuffer[0] && ibuffer[l] != ':') l++; + if (l <= (unsigned char)ibuffer[0]) l++; + } + break; + default: /* do nothing if the character is not recogized */ + break; + } + } + } + + /* try to store the line, may heaven help us */ +done: + bi = ibuffer; + st = SINT; + nexttoken(); + if (token == NUMBER) { + ax = x; + storeline(); + } + + /* and we are done, restore the output device and clean the buffer */ +endnosave: + ibuffer[0] = 0; + ibuffer[1] = 0; + bi = ibuffer + 1; + nexttoken(); +} + +/* + RUN and CONTINUE are the same function +*/ +void xrun() { + if (token == TCONT) { + st = SRUN; + nexttoken(); + } else { + nexttoken(); + parsearguments(); + if (er != 0 ) return; + if (args > 1) { + error(EARGS); + return; + } + if (args == 0) { + here = 0; + } else { + findline(pop()); + } + if (!USELONGJUMP && er) return; + if (st == SINT) st = SRUN; + + /* all reset on run */ + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert = 0; + ioer = 0; + fncontext = 0; +#ifdef HASEVENTS + resettimer(&every_timer); + resettimer(&after_timer); + events_enabled = 1; +#endif + + nexttoken(); + } + + /* once statement is called it stays into a loop until the token stream + is exhausted. Then we return to interactive mode. */ + statement(); + st = SINT; + /* flush the EEPROM when changing to interactive mode */ + eflush(); + + /* if called from command line with file arg - exit after run */ +#ifdef HASARGS + if (bnointafterrun) restartsystem(); +#endif +} + +/* + a simple help function for the help command, will be extended to + a more sophisticated help system in the future +*/ +void xhelp() { + int i; + nexttoken(); + if (token == EOL) { + displaybanner(); + outsc(getmessage(MKEYWORDS)); + for (i = 0; gettokenvalue(i) != 0; i++) { + outsc(getkeyword(i)); + outch(' '); + if (i % 8 == 7) outcr(); + } + outcr(); + } else { + if (token < 31 && token >= BASEKEYWORD) { /* attention, doesn't work with long tokens */ + outputtoken(); + outsc(": "); + outcr(); + } + nexttoken(); + } +} + +/* + NEW the general cleanup function - new deletes everything + + restbasicstate() is a helper, it keeps the memory intact + this is needed for EEPROM direct memory +*/ +void resetbasicstate() { + + if (DEBUG) { + outsc("** BASIC state reset \n"); + } + + /* all stacks are purged */ + clearst(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrvars(); + clrlinecache(); + + /* error status reset */ + reseterror(); + + /* let here point to the beginning of the program */ + here = 0; + + /* function context back to zero */ + fncontext = 0; + + /* interactive mode */ + st = SINT; + + /* switch off timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +} + +void xnew() { + + /* reset the state of the interpreter */ + resetbasicstate(); + + + if (DEBUG) { + outsc("** clearing memory "); + outnumber(memsize); + outsc(" bytes \n"); + } + + /* program memory back to zero and variable heap cleared */ + himem = memsize; + zeroblock(0, memsize); + top = 0; + + if (DEBUG) outsc("** clearing EEPROM state \n "); + /* on EEPROM systems also clear the stored state and top */ +#ifdef EEPROMMEMINTERFACE + eupdate(0, 0); + setaddress(1, beupdate, top); +#endif +} + +/* + REM - skip everything +*/ +void xrem() { + if (debuglevel == -1) outsc("REM: "); + while (token != LINENUMBER && token != EOL && here <= top) + { + nexttoken(); + if (debuglevel == -1) { + if (token != LINENUMBER) outputtoken(); else outcr(); + } + } +} + +/* + The Apple 1 BASIC additions + CLR, DIM, POKE, TAB +*/ + +/* + CLR - clearing variable space +*/ +void xclr() { + +#ifdef HASDARKARTS + name_t variable; + + nexttoken(); + + if (termsymbol()) { + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert = 0; + ioer = 0; + } else { + copyname(&variable, &name); + switch (variable.token) { + case VARIABLE: + if (variable.c[0] == '@') { + return; + } + break; + case ARRAYVAR: + nexttoken(); + if (token != '(') { + error(EVARIABLE); + return; + } + nexttoken(); + if (token != ')') { + error(EVARIABLE); + return; + } + break; + case STRINGVAR: + if (variable.c[0] == '@') { + error(EVARIABLE); + return; + } + break; + case TGOSUB: + clrgosubstack(); + goto next; + case TFOR: + clrforstack(); + goto next; + case TEVERY: + resettimer(&every_timer); + goto next; + case TAFTER: + resettimer(&after_timer); + goto next; + default: + expression(); + if (!USELONGJUMP && er) return; + ax = pop(); + variable.c[0] = ax % 256; + variable.c[1] = ax / 256; + variable.token = TBUFFER; + } + + /* we have to clear an object, call free */ + ax = bfree(&variable); + if (ax == 0) { + if (variable.token != TBUFFER) { + error(EVARIABLE); + return; + } + else ert = 1; + } + } +#else + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert = 0; + ioer = 0; +#endif + +next: + nexttoken(); +} + +#ifdef HASAPPLE1 +/* + DIM - the dimensioning of arrays and strings from Apple 1 BASIC +*/ +void xdim() { + name_t variable; + address_t x; + address_t y = 1; + + /* which object should be dimensioned or created */ + nexttoken(); + +nextvariable: + if (token == ARRAYVAR || token == STRINGVAR ) { + + /* remember the object, direct assignment of struct for the moment */ + copyname(&variable, &name); + + if (DEBUG) { + outsc("** in xdim "); outname(&variable); outspc(); outnumber(variable.token); + outspc(); outname(&name); outspc(); outnumber(name.token); outcr(); + } + + /* parse the arguments */ + parsesubscripts(); + if (!USELONGJUMP && er) return; + +#ifndef HASMULTIDIM + if (args != 1) { + error(EARGS); + return; + } + x = popaddress(); +#else + if (args != 1 && args != 2) { + error(EARGS); + return; + } + if (args == 2) y = popaddress(); + x = popaddress(); +#endif + + /* we create at least one element */ + if (x < 1 || y < 1) { + error(EORANGE); + return; + } + + /* various checks - do we have enough space in buffers and string indices */ + if (variable.token == STRINGVAR) { + if ((x > 255) && (strindexsize == 1)) { + error(EORANGE); + return; + } +#ifdef SPIRAMSBSIZE + if (x > SPIRAMSBSIZE - 1) { + error(EORANGE); + return; + } +#endif + /* With the substringmode switched off, if only one argument is given + we interpret the argument as the string array dimension and not as + the length two arguments are allowed and work as always. This makes + things more compatible to the Microsoft BASIC world. */ + if (!substringmode) + if (args == 1) { + y = x; + x = defaultstrdim; + } + + (void) createstring(&variable, x, y); + } else { + (void) createarray(&variable, x, y); + } + if (!USELONGJUMP && er) return; + + } else if (token == VARIABLE) { + (void) bmalloc(&name, 0); /* this is a local variable, currently no safety net */ + } else { + error(EUNKNOWN); + return; + } + + nexttoken(); + if (token == ',') { + nexttoken(); + goto nextvariable; + } + + nexttoken(); +} + + +/* + POKE - low level poke to the basic memory. + on 16bit systems, the address is signed, so we can only go up to 32767. + If the address is negative, we poke into the EEPROM. +*/ +void xpoke() { + number_t a, v; + + /* get the address and the value */ + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + v = pop(); /* the value */ + a = pop(); /* the address */ + + /* catch memsize here because memwrite doesn't do it */ + if (a >= 0 && a <= memsize) + memwrite2(a, v); + else if (a < 0 && a >= -elength()) + eupdate(-a - 1, v); + else { + error(EORANGE); + } +} + +/* + TAB - spaces command of Apple 1 BASIC + charcount mechanism for relative tab if HASMSTAB is set +*/ +void xtab() { + address_t a; + number_t tmp; + token_t t = token; + + /* get the number of spaces, we allow brackets here to use xtab also in PRINT */ + nexttoken(); + if (token == '(') nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + if (token == ')') nexttoken(); + + /* we handle negative values here */ + tmp = pop(); + if (!USELONGJUMP && er) return; + + /* negative tabs mapped to 0 */ + if (tmp < 0) t = 0; + a = tmp; + + /* the runtime environment can do a true tab then ... */ +#ifdef HASMSTAB + if (t != TSPC && reltab && od <= OPRT && od >= 0) { + if (charcount[od] >= a) a = 0; else a = a - charcount[od] - 1; + } +#endif + + /* debug output */ + if (DEBUG) { + outsc("** tabbing "); + outnumber(a); + outsc(" spaces "); + outsc(" charcount"); + outnumber(charcount[od - 1]); + outcr(); + } + + /* output the spaces */ + while (a-- > 0) outspc(); +} +#endif + +/* + locate the curor on the screen +*/ + +void xlocate() { + address_t cx, cy; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + cy = popaddress(); + cx = popaddress(); + if (!USELONGJUMP && er) return; + + /* for locate we go through the VT52 interface for cursor positioning*/ + if (cx > 0 && cy > 0 && cx < 224 && cy < 224) { + outch(27); outch('Y'); + outch(31 + (unsigned int) cy); + outch(31 + (unsigned int) cx); + } + + /* set the charcount, this is half broken on escape sequences */ +#ifdef HASMSTAB + if (od >= 0 && od <= OPRT) charcount[od] = cx; +#endif + +} + +/* + Stefan's additions to Palo Alto BASIC + DUMP, SAVE, LOAD, GET, PUT, SET +*/ + +/* + DUMP - memory dump program +*/ +void xdump() { + address_t a, x; + char eflag = 0; + + nexttoken(); + if (token == '!') { + eflag = 1; + nexttoken(); + } + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 0: + x = 0; + a = memsize; + break; + case 1: + x = pop(); + a = memsize; + break; + case 2: + a = pop(); + x = pop(); + break; + default: + error(EARGS); + return; + } + + form = 6; + if (a > x) dumpmem((a - x) / 8 + 1, x, eflag); + form = 0; +} + +/* + helper of DUMP, wrote the memory out +*/ +void dumpmem(address_t r, address_t b, char eflag) { + address_t j, i; + address_t k; + mem_t c; + address_t end; + + k = b; + i = r; + if (eflag) end = elength(); else end = memsize; + while (i > 0) { + outnumber(k); outspc(); + for (j = 0; j < 8; j++) { + if (eflag) c = eread(k); else c = memread(k); + k++; + outnumber(c); outspc(); + if (k > end) break; + } + outcr(); + i--; + if (k > end) break; + } + if (eflag) { + outsc("elength: "); outnumber(elength()); outcr(); + } else { + outsc("top: "); outnumber(top); outcr(); + outsc("himem: "); outnumber(himem); outcr(); + } +} + +/* + Creates a C string from a BASIC string after reading a BASIC string. + This function handles strings up to SBUFFERSIZE - 1 characters long. + It is used in commands that convert strings like VAL and in handling + filenames. +*/ +void stringtobuffer(char *buffer, string_t* s) { + index_t i = s->length; + + if (i >= SBUFSIZE) { i = SBUFSIZE - 1; ert=1; } + buffer[i--] = 0; + while (i >= 0) { + buffer[i] = s->ir[i]; + i--; + } +} + +/* helper for the memintercase code */ +void getstringtobuffer(string_t* strp, char *buffer, stringlength_t maxlen) { + stringlength_t i; + + for (i = 0; i < strp->length && i < maxlen; i++) buffer[i] = memread2(strp->address + i); + strp->ir = buffer; +} + +/* get a file argument */ +void getfilename(char *buffer, char d) { + index_t s; + char *sbuffer; + string_t sr; + + /* do we have a string argument? */ + s = stringvalue(&sr); + if (!USELONGJUMP && er) return; + if (DEBUG) { + outsc("** in getfilename2 stringvalue delivered "); + outnumber(s); + outcr(); + } + + if (s) { + if (DEBUG) { + outsc("** in getfilename2 copying string of length "); + outnumber(x); + outcr(); + } +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + stringtobuffer(buffer, &sr); + if (DEBUG) { + outsc("** in getfilename2 stringvalue string "); + outsc(buffer); + outcr(); + } + nexttoken(); + } else if (termsymbol()) { + if (d) { + sbuffer = getmessage(MFILE); + s = 0; + while ((sbuffer[s] != 0) && (s < SBUFSIZE - 1)) { + buffer[s] = sbuffer[s]; + s++; + } + buffer[s] = 0; + x = s; + } else { + buffer[0] = 0; + x = 0; + } + nexttoken(); + } else { + expression(); + if (!USELONGJUMP && er) return; + buffer[0] = pop(); + buffer[1] = 0; + } +} + +/* + an alternative getfilename implementation that simply gives back a buffer + with the filename in it. We avoid a string buffer in the calling commands + like SAVE and LOAD. +*/ +char* getfilename2(char d) { + mem_t s; + string_t sr; + + /* we have no argument and use the default */ + if (termsymbol()) { + if (d) return getmessage(MFILE); + else return 0; + } + + /* we have a string argument or an expression */ + s = stringvalue(&sr); + if (!USELONGJUMP && er) return 0; + if (s) { +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, sbuffer, SBUFSIZE); +#endif + nexttoken(); /* undo the rewind of stringvalue, only then use the buffer */ + for (s = 0; s < sr.length && s < SBUFSIZE - 1; s++) sbuffer[s] = sr.ir[s]; + sbuffer[s] = 0; + return sbuffer; + } else { + expression(); + if (!USELONGJUMP && er) return 0; + sbuffer[0] = pop(); + sbuffer[1] = 0; + return sbuffer; + } +} + +#if defined(FILESYSTEMDRIVER) +/* + SAVE a file either to disk or to EEPROM +*/ +void xsave() { + char *filename; + address_t here2; + token_t t; + + nexttoken(); + filename = getfilename2(1); + if (!USELONGJUMP && er) return; + t = token; + + if (filename[0] == '!') { + esave(); + } else { + if (DEBUG) { + outsc("** Opening the file "); + outsc(filename); + outcr(); + }; + + if (!ofileopen(filename, "w")) { + error(EFILE); + return; + } + + /* save the output mode and then save */ + push(od); + od = OFILE; + + /* the core save - xlist() not used any more */ + ert = 0; /* reset error to trap file problems */ + here2 = here; + here = 0; + gettoken(); + while (here < top) { + outputtoken(); + if (ert) break; + gettoken(); + if (token == LINENUMBER) outcr(); + } + if (here == top) outputtoken(); + outcr(); + + /* back to where we were */ + here = here2; + + /* restore the output mode */ + od = pop(); + + /* clean up */ + ofileclose(); + + /* did an accident happen */ + if (ert) { + printmessage(EGENERAL); + outcr(); + ert = 0; + } + } + + /* and continue remembering, where we were */ + token = t; +} + +/* + LOAD a file, LOAD can either be invoked with a filename argument + or without, in the latter case the filename is read from the token stream + with getfilename. +*/ +void xload(const char* f) { + char* filename; + char ch; + address_t here2; + mem_t chain = 0; + + if (f == 0) { + nexttoken(); + filename = getfilename2(1); + if (!USELONGJUMP && er) return; + } else { + filename = (char*)f; + } + + if (filename[0] == '!') { + eload(); + } else { + + /* + If load is called during runtime it merges + the program as new but perserve the variables + gosub and for stacks are cleared. This is incomplete + as there is one side effect. Functions are not cleared + as they are stored in the heap. If lines are overwritten + by the merge, the function pointers in the heap become + invalid. There is no safety net for this in the current + */ + if (st == SRUN) { + chain = 1; + st = SINT; + top = 0; + clrgosubstack(); + clrforstack(); + clrdata(); + } + + if (!f) + if (!ifileopen(filename)) { + error(EFILE); + return; + } + + bi = ibuffer + 1; + while (fileavailable()) { + ch = fileread(); + + if (ch == '\n' || ch == '\r' || cheof(ch)) { + *bi = 0; + bi = ibuffer + 1; + if (*bi != '#') { /* lines starting with a # are skipped - Unix style shell startup */ + nexttoken(); + if (token == NUMBER) { + ax = x; + storeline(); + } + if (er != 0 ) break; + bi = ibuffer + 1; + } + } else { + *bi++ = ch; + } + + if ((bi - ibuffer) > BUFSIZE) { + error(EOUTOFMEMORY); + break; + } + } + ifileclose(); + /* after a successful load we save top to the EEPROM header */ +#ifdef EEPROMMEMINTERFACE + setaddress(1, beupdate, top); +#endif + + /* go back to run mode and start from the first line */ + if (chain) { + st = SRUN; + here = 0; + nexttoken(); + } + } +} +#else +/* + SAVE a file to EEPROM - minimal version for small Arduinos +*/ +void xsave() { + esave(); + nexttoken(); +} +/* + LOAD a file from EEPROM - minimal version for small Arduinos +*/ +void xload(const char* f) { + eload(); + nexttoken(); +} +#endif + +/* + GET just one character from input +*/ +void xget() { + + /* identifier of the lefthandside */ + lhsobject_t lhs; + + mem_t oid = id; /* remember the input stream */ + char ch; + + nexttoken(); + + /* modifiers of the get statement */ + if (token == '&') { + + if (!expectexpr()) return; + id = pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + /* this code evaluates the left hand side - remember type and name */ + copyname(&lhs.name, &name); + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + + /* get the data, non blocking on Arduino */ + if (availch()) ch = inch(); else ch = 0; + + /* store the data element as a number expect for */ + assignnumber2(&lhs, ch); + + /* but then, strings where we deliver a string with length 0 if there is no data */ +#ifdef HASAPPLE1 + if (lhs.name.token == STRINGVAR && ch == 0 && lhs.ps) setstringlength(&lhs.name, 0, arraylimit); +#endif + + /* restore the output device */ + id = oid; +} + +/* + PUT writes one character to an output stream +*/ +void xput() { + mem_t ood = od; + index_t i; + + nexttoken(); + + /* modifiers of the put statement */ + if (token == '&') { + + if (!expectexpr()) return; + od = pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + parsearguments(); + if (!USELONGJUMP && er) return; + + for (i = args - 1; i >= 0; i--) sbuffer[i] = pop(); + outs(sbuffer, args); + + od = ood; +} + +/* setpersonality is a helper of xset */ +void setpersonality(index_t p) { +#ifdef HASAPPLE1 + switch (p) { + /* a Microsoft like BASIC have arrays starting at 0 with n+1 elements and no substrings, MS type RND */ + case 'm': + case 'M': + msarraylimits = 1; + arraylimit = 0; + substringmode = 0; + booleanmode = -1; + randombase = -1; + reltab = 1; + break; + /* an Apple 1 like BASIC have arrays starting at 1 with n elements and substrings */ + case 'a': + case 'A': + msarraylimits = 0; + arraylimit = 1; + substringmode = 1; + booleanmode = 1; + randombase = 0; + reltab = 0; + break; + /* PaloAlto BASIC is an integer basic with slightly different behaviour */ + case 'p': + case 'P': + msarraylimits = 0; + arraylimit = 0; + substringmode = 1; + booleanmode = 1; + forceint = 1; + randombase = 1; + reltab = 0; + break; + } +#endif +} + +/* + SET - the command itself is also apocryphal it is a low level + control command setting certain properties + syntax, currently it is only SET expression, expression +*/ +void xset() { + address_t function; + index_t argument; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + argument = pop(); + function = pop(); + switch (function) { + /* runtime debug level */ + case 0: + debuglevel = argument; + break; + /* autorun/run flag of the EEPROM 255 for clear, 0 for prog, 1 for autorun */ + /* eflush() is needed to make sure the change is written immediately */ + /* the bdelay is only for protection of the eeprom against tight loops doing SET 1,x */ + case 1: + eupdate(0, argument); + eflush(); + bdelay(1000); + break; + /* change the output device */ + case 2: + switch (argument) { + case 0: + od = OSERIAL; + break; + case 1: + od = ODSP; + break; + } + break; + /* change the default output device */ + case 3: + switch (argument) { + case 0: + od = (odd = OSERIAL); + break; + case 1: + od = (odd = ODSP); + break; + } + break; + /* change the input device */ + case 4: + switch (argument) { + case 0: + id = ISERIAL; + break; + case 1: + id = IKEYBOARD; + break; + } + break; + /* change the default input device */ + case 5: + switch (argument) { + case 0: + idd = (id = ISERIAL); + break; + case 1: + idd = (id = IKEYBOARD); + break; + } + break; +#ifdef HASSERIAL1 + /* set the cr behaviour */ + case 6: + sendcr = (char)argument; + break; + /* set the blockmode behaviour */ + case 7: + blockmode = argument; + break; + /* set the second serial ports baudrate */ + case 8: + prtset(argument); + break; +#endif + /* set the power amplifier level of the radio module */ +#ifdef HASRF24 + case 9: + radioset(argument); + break; +#endif + /* display update control for paged displays */ +#ifdef DISPLAYDRIVER + case 10: + dspsetupdatemode(argument); + break; +#endif + /* change the output device to a true TAB */ +#ifdef HASMSTAB + case 11: + reltab = argument; + break; +#endif + /* change the lower array limit */ +#ifdef HASAPPLE1 + case 12: + if (argument >= 0) arraylimit = argument; else error(EORANGE); + break; +#endif + /* the keyboard repeat frequency */ +#ifdef HASKEYPAD + case 13: + kbdrepeat = argument; + break; +#endif + /* the units the pulse command is using */ +#ifdef HASPULSE + case 14: + bpulseunit = argument; + break; +#endif + /* switch on the vt52 emulation an a POSIX system with an ANSI terminal */ +#ifdef POSIXVT52TOANSI + case 15: + vt52active = argument; + break; +#endif + /* change the default size of a string at autocreate */ +#ifdef HASAPPLE1 + case 16: + if (argument > 0) defaultstrdim = argument; else error(EORANGE); + break; +#endif + /* set the boolean mode */ + case 17: + if (argument == -1 || argument == 1) booleanmode = argument; else error(EORANGE); + break; + /* set the integer mode */ + case 18: + forceint = (argument != 0); + break; + /* set the random number behaviour */ + case 19: + randombase = argument; + break; + /* the substring mode on and off */ +#ifdef HASAPPLE1 + case 20: + substringmode = (argument != 0); + break; +#endif + /* the MS array behaviour, creates n+1 elements when on */ +#ifdef HASAPPLE1 + case 21: + msarraylimits = (argument != 0); + break; +#endif + /* set many settings at once to change the entire personality of the interpreter */ + case 22: + setpersonality(argument); + break; +#ifdef HASAPPLE1 + case 23: + lowercasenames = (argument != 0); + break; +#endif +#ifdef HASFLOAT + case 24: + precision = argument; + break; +#endif + } +} + +/* + NETSTAT - network status command, rudimentary +*/ +void xnetstat() { +#if defined(HASMQTT) + + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 0: + if (netconnected()) outsc("Network connected \n"); else outsc("Network not connected \n"); + outsc("MQTT state "); outnumber(mqttstate()); outcr(); + outsc("MQTT out topic "); outsc(mqtt_otopic); outcr(); + outsc("MQTT inp topic "); outsc(mqtt_itopic); outcr(); + outsc("MQTT name "); outsc(mqttname); outcr(); + break; + case 1: + ax = pop(); + switch (ax) { + case 0: + netstop(); + break; + case 1: + netbegin(); + break; + case 2: + if (!mqttreconnect()) ert = 1; + break; + default: + error(EARGS); + return; + } + break; + default: + error(EARGS); + return; + } +#endif + nexttoken(); +} + +/* + The arduino io functions. + +*/ + +/* + rtaread and rtdread are wrappers coming from runtime + This is done for portability for raspberry pi and other systems +*/ + +void xaread() { + push(aread(popaddress())); +} + +void xdread() { + push(dread(popaddress())); +} + +/* + DWRITE - digital write +*/ +void xdwrite() { + address_t x, y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x = popaddress(); + y = popaddress(); + if (!USELONGJUMP && er) return; + dwrite(y, x); +} + +/* + AWRITE - analog write +*/ +void xawrite() { + address_t x, y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x = popaddress(); + if (x > 255) error(EORANGE); + y = popaddress(); + if (!USELONGJUMP && er) return; + awrite(y, x); +} + +/* + PINM - pin mode +*/ +void xpinm() { + address_t x, y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x = popaddress(); + if (x > 1) error(EORANGE); + y = popaddress(); + if (!USELONGJUMP && er) return; + pinm(y, x); +} + +/* + DELAY in milliseconds + + this must call bdelay() and not delay() as bdelay() + handles all the yielding and timing functions + +*/ +void xdelay() { + nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + bdelay(pop()); +} + +/* tone if the platform has it -> BASIC command PLAY */ +#ifdef HASTONE +/* play a tone */ +void xtone() { + address_t d = 0; + address_t v = 100; + address_t f, p; + + /* get minimum of 2 and maximum of 4 args */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 4 || args < 2) { + error(EARGS); + return; + } + + /* a switch would be more elegant but needs more progspace ;-) */ + if (args == 4) v = popaddress(); + if (args >= 3) d = popaddress(); + f = popaddress(); + p = popaddress(); + if (!USELONGJUMP && er) return; + + playtone(p, f, d, v); +} +#endif + +/* pulse output - pin, duration, [value], [repetitions, delay] */ +#ifdef HASPULSE +void xpulse() { + address_t pin, duration; + address_t val = 1; + address_t interval = 0; + address_t repetition = 1; + + /* do we have at least 2 and not more than 5 arguments */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 5 || args < 2) { + error(EARGS); + return; + } + + /* get the data from stack */ + if (args == 5) { + interval = popaddress(); + repetition = popaddress(); + } + if (args == 4) { + error(EARGS); + return; + } + if (args > 2) val = popaddress(); + duration = popaddress(); + pin = popaddress(); + if (!USELONGJUMP && er) return; + + /* low level run time function for the pulse */ + pulseout(bpulseunit, pin, duration, val, repetition, interval); +} + +/* read a pulse, units given by bpulseunit - default 10 microseconds */ +void bpulsein() { + address_t x, y; + unsigned long t, pt; + + t = ((unsigned long) popaddress()) * 1000; + y = popaddress(); + x = popaddress(); + if (!USELONGJUMP && er) return; + + push(pulsein(x, y, t) / bpulseunit); +} +#endif + + +#ifdef HASGRAPH +/* + COLOR setting, accepting one or 3 arguments +*/ +void xcolor() { + int r, g, b; + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + switch (args) { + case 1: + vgacolor(pop()); + break; + case 3: + b = pop(); + g = pop(); + r = pop(); + rgbcolor(r, g, b); + break; + default: + error(EARGS); + break; + } +} + +/* + PLOT a pixel on the screen +*/ +void xplot() { + int x0, y0; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + y0 = pop(); + x0 = pop(); + plot(x0, y0); +} + +/* + LINE draws a line +*/ +void xline() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1 = pop(); + x1 = pop(); + y0 = pop(); + x0 = pop(); + line(x0, y0, x1, y1); +} + +void xrect() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1 = pop(); + x1 = pop(); + y0 = pop(); + x0 = pop(); + rect(x0, y0, x1, y1); +} + +void xcircle() { + int x0, y0, r; + + nexttoken(); + parsenarguments(3); + if (!USELONGJUMP && er) return; + r = pop(); + y0 = pop(); + x0 = pop(); + circle(x0, y0, r); +} + +void xfrect() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1 = pop(); + x1 = pop(); + y0 = pop(); + x0 = pop(); + frect(x0, y0, x1, y1); +} + +void xfcircle() { + int x0, y0, r; + + nexttoken(); + parsenarguments(3); + if (!USELONGJUMP && er) return; + r = pop(); + y0 = pop(); + x0 = pop(); + fcircle(x0, y0, r); +} +#endif + +#ifdef HASDARKARTS +/* + MALLOC allocates a chunk of memory +*/ +void xmalloc() { + address_t s; + address_t a; + name_t name; + + /* size and identifier */ + s = popaddress(); + a = popaddress(); + if (!USELONGJUMP && er) return; + + /* create a name */ + name.token = TBUFFER; + name.l = 2; + name.c[0] = a % 256; + name.c[1] = a / 256; + + /* allocate the memory */ + push(bmalloc(&name, s)); +} + +/* + FIND an object on the heap + xfind can find things in the variable name space and the buffer space +*/ + +void xfind() { + address_t a; + address_t n; + + /* is there a ( */ + if (!expect('(', EUNKNOWN)) return; + + /* after that, try to find the object on the heap */ + nexttoken(); + if (token == TFN) { + nexttoken(); + name.token = TFN; + } + a = bfind(&name); + + /* depending on the object, interpret the result */ + switch (token) { + case ARRAYVAR: + case TFN: + if (!expect('(', EUNKNOWN)) return; + if (!expect(')', EUNKNOWN)) return; + case VARIABLE: + case STRINGVAR: + nexttoken(); + break; + default: + expression(); /* do not use expectexpr here because of the token sequence */ + if (!USELONGJUMP && er) return; + n = popaddress(); + if (!USELONGJUMP && er) return; + name.token = TBUFFER; + name.l = 2; + name.c[0] = n % 256; + name.c[1] = n / 256; + a = bfind(&name); + } + + /* closing braket, dont use expect here because of the token sequence */ + if (token != ')') { + error(EUNKNOWN); + return; + } + + push(a); +} + +/* + EVAL can modify a program, there are serious side effects + which are not caught (and cannot be). All FOR loops and RETURN + vectors break if EVAL inserts in their range +*/ +void xeval() { + address_t i, l; + address_t mline, line; + string_t s; + + /* get the line number to store */ + if (!expectexpr()) return; + line = popaddress(); + if (!USELONGJUMP && er) return; + + if (token != ',') { + error(EUNKNOWN); + return; + } + + /* the line to be stored */ + nexttoken(); + if (!stringvalue(&s)) { + error(EARGS); + return; + } + + /* here we have the string to evaluate it to the ibuffer + only one line allowed, BUFSIZE is the limit */ + l = s.length; + if (!USELONGJUMP && er) return; + + if (l > BUFSIZE - 1) { + error(EORANGE); + return; + } + +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + + for (i = 0; i < l; i++) ibuffer[i + 1] = s.ir[i]; + ibuffer[l + 1] = 0; + if (DEBUG) { + outsc("** Preparing to store line "); + outnumber(line); + outspc(); + outsc(ibuffer + 1); + outcr(); + } + + /* we find the line we are currently at */ + if (st != SINT) { + mline = myline(here); + if (DEBUG) { + outsc("** myline is "); + outnumber(mline); + outcr(); + } + } + + /* go to interactive mode and try to store the line */ + ax = line; // the linennumber + push(st); st = SINT; // go to (fake) interactive mode + bi = ibuffer; // go to the beginning of the line + storeline(); // try to store it + st = pop(); // go back to run mode + + /* find my line - side effects not checked here */ + if (st != SINT) { + findline(mline); + nextline(); + } +} +#endif + + +#ifdef HASIOT + +/* + AVAIL of a stream - are there characters in the stream +*/ +void xavail() { + mem_t oid = id; + + id = popaddress(); + if (!USELONGJUMP && er) return; + push(availch()); + id = oid; +} + +/* + IoT functions - sensor reader, experimentral +*/ +void xfsensor() { + address_t s, a; + + a = popaddress(); + if (!USELONGJUMP && er) return; + s = popaddress(); + if (!USELONGJUMP && er) return; + push(sensorread(s, a)); +} + + +/* + Going to sleep for battery saving - implemented for ESP8266 and ESP32 + in hardware-*.h +*/ + +void xsleep() { + nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + activatesleep(pop()); +} + +/* + single byte wire access - keep it simple +*/ + +void xwire() { + int i; + + nexttoken(); +#if defined(HASWIRE) || defined(HASSIMPLEWIRE) +/* a stop causes a release of the bus, can be used after multiple one byte writes + currently part of the cycle */ +/* + if (token == STOP) { + wirestop(); + return; + } +*/ + + parsearguments(); + if (!USELONGJUMP && er) return; + +/* this code is the only place where the stack is accessed directly */ + if (args > 1) { + wirestart((int)stack[sp-args].n, 0); + for(i=1; ienabled = 0; + t->interval = 0; + t->last = 0; + t->type = 0; + t->linenumber = 0; +} + +void xtimer() { + token_t t; + btimer_t* timer; + + /* do we deal with every or after */ + if (token == TEVERY) timer = &every_timer; else timer = &after_timer; + + /* one argument expected, the time intervall */ + if (!expectexpr()) return; + + /* after that, a command GOTO or GOSUB with a line number + more commands thinkable */ + switch (token) { + case TGOSUB: + case TGOTO: + t = token; + if (!expectexpr()) return; + timer->last = millis(); + timer->type = t; + timer->linenumber = pop(); + timer->interval = pop(); + timer->enabled = 1; + break; + default: + if (termsymbol()) { + x = pop(); + if (x == 0) + timer->enabled = 0; + else { + if (timer->linenumber) { + timer->enabled = 1; + timer->interval = x; + timer->last = millis(); + } else + error(EARGS); + } + } else + error(EUNKNOWN); + return; + } +} +#endif + +#ifdef HASEVENTS +/* + The events API for Arduino with interrupt service routines + analogous to the timer API. + + we use raw modes here + + #define CHANGE 1 + #define FALLING 2 + #define RISING 3 + + detach und attach are wrappers around the original Arduino functions. + Runtime needs to be compiled with #define ARDUINOINTERRUPTS for this to + work. + +*/ + +/* interrupts in BASIC fire once and then disable themselves, BASIC reenables them */ +void bintroutine0() { + eventlist[0].active = 1; + detachinterrupt(eventlist[0].pin); +} +void bintroutine1() { + eventlist[1].active = 1; + detachinterrupt(eventlist[1].pin); +} +void bintroutine2() { + eventlist[2].active = 1; + detachinterrupt(eventlist[2].pin); +} +void bintroutine3() { + eventlist[3].active = 1; + detachinterrupt(eventlist[3].pin); +} + +mem_t eventindex(mem_t pin) { + mem_t i; + + for (i = 0; i < EVENTLISTSIZE; i++ ) if (eventlist[i].pin == pin) return i; + return -1; +} + +mem_t enableevent(mem_t pin) { + mem_t inter; + mem_t i; + + /* do we have the data */ + if ((i = eventindex(pin)) < 0) return 0; + + /* can we use this pin? */ + inter = pintointerrupt(eventlist[i].pin); + if (inter < 0) return 0; + + /* attach the interrupt function to this pin */ + switch (i) { + case 0: + attachinterrupt(inter, bintroutine0, eventlist[i].mode); + break; + case 1: + attachinterrupt(inter, bintroutine1, eventlist[i].mode); + break; + case 2: + attachinterrupt(inter, bintroutine2, eventlist[i].mode); + break; + case 3: + attachinterrupt(inter, bintroutine3, eventlist[i].mode); + break; + default: + return 0; + } + + /* now set it enabled in BASIC */ + eventlist[i].enabled = 1; + return 1; +} + + +void disableevent(mem_t pin) { + detachinterrupt(pin); +} + +/* the event BASIC commands */ +void initevents() { + mem_t i; + + for (i = 0; i < EVENTLISTSIZE; i++) eventlist[i].pin = -1; + nevents = 0; +} + +void xevent() { + mem_t pin, mode; + mem_t type = 0; + address_t line = 0; + + /* in this version two arguments are neded, one is the pin, the second the mode */ + nexttoken(); + + /* debug code, display the event list */ + if (termsymbol()) { + for (ax = 0; ax < EVENTLISTSIZE; ax++) { + if (eventlist[ax].pin >= 0) { + outnumber(eventlist[ax].pin); outspc(); + outnumber(eventlist[ax].mode); outspc(); + // outnumber(eventlist[ax].type); outspc(); + if (eventlist[ax].type == TGOTO) outsc("GOTO"); else outsc("GOSUB"); + outspc(); + outnumber(eventlist[ax].linenumber); outspc(); + outcr(); + } + } + outnumber(nevents); outcr(); + nexttoken(); + return; + } + + /* control of events */ + + /* stop and continue */ + if (token == TSTOP) { + events_enabled = 0; + nexttoken(); + return; + } + + if (token == TCONT) { + events_enabled = 1; + nexttoken(); + return; + } + + /* clear the event list */ + if (token == TCLR) { + initevents(); + nexttoken(); + return; + } + + /* argument parsing */ + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 2: + mode = pop(); + if (mode > 3) { + error(EARGS); + return; + } + case 1: + pin = pop(); + break; + default: + error(EARGS); + } + + /* followed by termsymbol, GOTO or GOSUB */ + if (token == TGOTO || token == TGOSUB) { + type = token; + + /* which line to go to */ + if (!expectexpr()) return; + line = pop(); + } else { + if (!termsymbol()) { + error(EARGS); + return; + } + } + + /* all done either set the interrupt up or delete it*/ + if (type) { + if (!addevent(pin, mode, type, line)) { + error(EARGS); + return; + } + } else { + disableevent(pin); + deleteevent(pin); + return; + } + + /* enable the interrupt */ + if (!enableevent(pin)) { + deleteevent(pin); + error(EARGS); + return; + } +} + +/* handling the event list */ +mem_t addevent(mem_t pin, mem_t mode, mem_t type, address_t linenumber) { + int i; + + /* is the event already there */ + for (i = 0; i < EVENTLISTSIZE; i++) + if (pin == eventlist[i].pin) goto slotfound; + + /* if not, look for a free slot */ + /* there is none, return with an error */ + if (nevents >= EVENTLISTSIZE) return 0; + + /* we have a free slot, increase number of events in list */ + for (i = 0; i < EVENTLISTSIZE; i++) + if (eventlist[i].pin == -1) { + nevents++; + goto slotfound; + } + + /* no free event slot */ + return 0; + + /* we have a slot */ +slotfound: + eventlist[i].enabled = 0; + eventlist[i].pin = pin; + eventlist[i].mode = mode; + eventlist[i].type = type; + eventlist[i].linenumber = linenumber; + eventlist[i].active = 0; + return 1; +} + +void deleteevent(mem_t pin) { + int i; + + /* do we have the event? */ + i = eventindex(pin); + + if (i >= 0) { + eventlist[i].enabled = 0; + eventlist[i].pin = -1; + eventlist[i].mode = 0; + eventlist[i].type = 0; + eventlist[i].linenumber = 0; + eventlist[i].active = 0; + nevents--; + } +} +#endif + +/* + BASIC DOS - disk access programs, to control mass storage from BASIC +*/ + +/* string match helper in catalog */ +char streq(const char *s, char *m) { + short i = 0; + + while (m[i] != 0 && s[i] != 0 && i < SBUFSIZE) { + if (s[i] != m[i]) return 0; + i++; + } + return 1; +} + +/* + CATALOG - basic directory function +*/ +void xcatalog() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + const char *name; + + nexttoken(); + getfilename(filename, 0); + if (!USELONGJUMP && er) return; + + rootopen(); + while (rootnextfile()) { + if (rootisfile()) { + name = rootfilename(); + if (*name != '_' && *name != '.' && streq(name, filename)) { + outscf(name, 14); outspc(); + if (rootfilesize() > 0) outnumber(rootfilesize()); + outcr(); + if (dspwaitonscroll() == 27) break; + } + } + rootfileclose(); + } + rootclose(); +#else + nexttoken(); +#endif +} + +/* + DELETE a file +*/ +void xdelete() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + + nexttoken(); + getfilename(filename, 0); + if (!USELONGJUMP && er) return; + + removefile(filename); +#else + nexttoken(); +#endif +} + +/* + OPEN a file or I/O stream - very raw mix of different functions +*/ +void xopen() { +#if defined(FILESYSTEMDRIVER) || defined(HASRF24) || defined(HASMQTT) || defined(HASWIRE) || defined(HASSERIAL1) + char stream = IFILE; /* default is file operation */ + char* filename; + int mode; + + /* which stream do we open? default is FILE */ + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream = pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + /* the filename and its length */ + // getfilename(filename, 0); + filename = getfilename2(0); + if (!USELONGJUMP && er) return; + + /* and the arguments */ + args = 0; + if (token == ',') { + nexttoken(); + parsearguments(); + } + + /* getting an argument, no argument is read, i.e. mode 0 */ + if (args == 0 ) { + mode = 0; + } else if (args == 1) { + mode = pop(); + } else { + error(EARGS); + return; + } + + /* open the stream */ + switch (stream) { +#ifdef HASSERIAL1 + case ISERIAL1: + prtclose(); + if (mode == 0) mode = 9600; + if (prtopen(filename, mode)) ert = 0; else ert = 1; + break; +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + switch (mode) { + case 1: + ofileclose(); + if (ofileopen(filename, "w")) ert = 0; else ert = 1; + break; + case 2: + ofileclose(); + if (ofileopen(filename, "a")) ert = 0; else ert = 1; + break; + default: + case 0: + ifileclose(); + if (ifileopen(filename)) ert = 0; else ert = 1; + break; + } + break; +#endif +#ifdef HASRF24 + case IRADIO: + if (mode == 0) { + iradioopen(filename); + } else if (mode == 1) { + oradioopen(filename); + } + break; +#endif +#if defined(HASWIRE) + case IWIRE: + wireopen(filename[0], mode); + break; +#endif +#ifdef HASMQTT + case IMQTT: + if (mode == 0) { + mqttsubscribe(filename); + } else if (mode == 1) { + mqttsettopic(filename); + } + break; +#endif + default: + error(EORANGE); + return; + } +#endif + nexttoken(); +} + +/* + OPEN as a function, currently only implemented for MQTT +*/ +void xfopen() { + address_t stream = popaddress(); + if (stream == 9) push(mqttstate()); else push(0); +} + +/* + CLOSE a file or stream +*/ +void xclose() { +#if defined(FILESYSTEMDRIVER) || defined(HASRF24) || defined(HASMQTT) || defined(HASWIRE) + char stream = IFILE; + char mode; + + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream = pop(); + if (token != ',' && ! termsymbol()) { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + parsearguments(); + if (args == 0) { + mode = 0; + } else if (args == 1) { + mode = pop(); + } else { + error(EARGS); + return; + } + + /* currently only close of files is implemented, should be also implemented for Wire */ + switch (stream) { + case IFILE: + if (mode == 1 || mode == 2) ofileclose(); else if (mode == 0) ifileclose(); + break; + } +#endif + nexttoken(); +} + +/* + FDISK - format internal disk storages of RP2040, ESP and the like +*/ +void xfdisk() { +#if defined(FILESYSTEMDRIVER) + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 1) error(EORANGE); + if (args == 0) push(0); + outsc("Format disk (y/N)?"); + (void) consins(sbuffer, SBUFSIZE); + if (sbuffer[1] == 'y') formatdisk(pop()); + if (fsstat(1) > 0) outsc("ok\n"); else outsc("fail\n"); +#endif + nexttoken(); +} + +#ifdef HASUSRCALL +/* + USR low level function access of the interpreter + for each group of functions there is a call vector + and and argument. + + USR arguments from 0 to 31 are reserved for the + interpreter status and the input output stream + mechanisms. All other values are free and can be used + for individual functions - see case 32 for an example. +*/ +void xusr() { + address_t fn; + number_t v; + int arg; + address_t a; + + v = pop(); + arg = (int)v; /* a bit paranoid here */ + fn = pop(); + switch (fn) { + /* USR(0,y) delivers all the internal constants and variables or the interpreter */ + case 0: + switch (arg) { + case 0: + push(bsystype); + break; + case 1: /* language set identifier, odd because USR is part of STEFANSEXT*/ + a = 0; +#ifdef HASAPPLE1 + a |= 1; +#endif +#ifdef HASARDUINOIO + a |= 2; +#endif +#ifdef HASFILEIO + a |= 4; +#endif +#ifdef HASDARTMOUTH + a |= 8; +#endif +#ifdef HASGRAPH + a |= 16; +#endif +#ifdef HASDARKARTS + a |= 32; +#endif +#ifdef HASIOT + a |= 64; +#endif + push(a); break; + case 2: + push(0); break; /* reserved for system speed identifier */ + +#ifdef HASFLOAT + case 3: push(-1); break; +#else + case 3: push(0); break; +#endif + case 4: push(numsize); break; + case 5: push(maxnum); break; + case 6: push(addrsize); break; + case 7: push(maxaddr); break; + case 8: push(strindexsize); break; + case 9: push(memsize + 1); break; + case 10: push(elength()); break; + case 11: push(GOSUBDEPTH); break; + case 12: push(FORDEPTH); break; + case 13: push(STACKSIZE); break; + case 14: push(BUFSIZE); break; + case 15: push(SBUFSIZE); break; + case 16: push(ARRAYSIZEDEF); break; + case 17: push(defaultstrdim); break; + // - 24 reserved, don't use + case 24: push(top); break; + case 25: push(here); break; + case 26: push(himem); break; + case 27: push(0); break; + case 28: push(freeRam()); break; + case 29: push(gosubsp); break; + case 30: push(loopsp); break; + case 31: push(0); break; // fnc removed as interpreter variable + case 32: push(sp); break; +#ifdef HASDARTMOUTH + case 33: push(data); break; +#else + case 33: push(0); break; +#endif + case 34: push(0); break; +#ifdef FASTTICKERPROFILE + case 35: + push(avgfastticker()); + clearfasttickerprofile(); + break; +#endif + /* - 48 reserved, don't use */ + case 48: push(id); break; + case 49: push(idd); break; + case 50: push(od); break; + case 51: push(odd); break; + default: push(0); + } + break; + /* access to properties of stream 1 - serial */ + case 1: + push(serialstat(arg)); + break; + /* access to properties of stream 2 - display and keyboard */ + case 2: +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + push(dspstat(arg)); +#elif defined(ARDUINOVGA) + push(vgastat(arg)); +#else + push(0); +#endif + break; + /* access to properties of stream 4 - printer */ +#ifdef HASSERIAL1 + case 4: + push(prtstat(arg)); + break; +#endif + /* access to properties of stream 7 - wire */ +#if defined(HASWIRE) + case 7: + push(wirestat(arg)); + break; +#endif + /* access to properties of stream 8 - radio */ +#ifdef HASRF24 + case 8: + push(radiostat(arg)); + break; +#endif + /* access to properties of stream 9 - mqtt */ +#ifdef HASMQTT + case 9: + push(mqttstat(arg)); + break; +#endif + /* access to properties of stream 16 - file */ +#ifdef FILESYSTEMDRIVER + case 16: + push(fsstat(arg)); + break; +#endif + case 32: + /* user function 32 and beyond can be used freely */ + /* all USR values not assigned return 0 */ + default: + if (fn > 31) push(usrfunction(fn, v)); else push(0); + } +} + +/* + CALL currently only to exit the interpreter +*/ +void xcall() { + int r; + + if (!expectexpr()) return; + r = pop(); + switch (r) { + case 0: + /* flush the EEPROM dummy and the output file and then exit */ + eflush(); + ofileclose(); +#if defined(POSIXFRAMEBUFFER) + vgaend(); /* clean up if you have played with the framebuffer */ +#endif + restartsystem(); + break; + /* restart the filesystem - only test code */ + case 1: + fsbegin(); + break; + /* show the banner again */ + case 2: + displaybanner(); + break; + /* hard network start */ + case 3: +#ifdef ARDUINOMQTT + netbegin(); + mqttbegin(); +#endif + break; + /* call values to 31 reserved! */ + default: + /* your custom code into usrcall() */ + if (r > 31) usrcall(r); else { + error(EORANGE); + return; + } + nexttoken(); + return; + } +} +#endif + + +/* the dartmouth stuff */ +#ifdef HASDARTMOUTH +/* + DATA is simply skipped when encountered as a command +*/ +void xdata() { + while (!termsymbol()) nexttoken(); +} + +/* + for READ find the next data record, helper of READ +*/ +void nextdatarecord() { + address_t h; + mem_t s = 1; + + /* save the location of the interpreter and the token we are processing */ + h = here; + + /* data at zero means we need to init it, by searching the first data record */ + if (data == 0) { + here = 0; + while (here < top && token != TDATA) gettoken(); + data = here; + datarc = 1; + } + +processdata: + /* + data at top means we have exhausted all data, + nothing more to be done here, however we simulate + a number value of 0 here and don't throw an error + this is not Dartmouth style, more consistent with + iterables + */ + if (data == top) { + token = NUMBER; + x = 0; + ert = 1; + here = h; + return; + } + + /* we process the data record by setting the here pointer to data and search with gettoken */ + here = data; + gettoken(); + if (token == '-') { + s = -1; + gettoken(); + } + if (token == NUMBER || token == STRING) goto enddatarecord; + if (token == ',') { + gettoken(); + if (token == '-') { + s = -1; + gettoken(); + } + if (token != NUMBER && token != STRING) { + error(EUNKNOWN); + here = h; + return; + } + goto enddatarecord; + } + + if (termsymbol()) { + while (here < top && token != TDATA) gettoken(); + data = here; + goto processdata; + } + + if (DEBUG) { + outsc("** error in nextdata after termsymbol "); + outnumber(data); + outcr(); + } + error(EUNKNOWN); + +enddatarecord: + if (token == NUMBER && s == -1) { + x = -x; /* this is needed because we tokenize only positive numbers */ + s = 1; + } + data = here; + datarc++; + here = h; + + if (DEBUG) { + outsc("** leaving nextdata with data and here "); + outnumber(data); outspc(); + outnumber(here); outcr(); + } +} + +/* + READ - find data records and insert them to variables +*/ +void xread() { + token_t t0; /* remember the left hand side token until the end of the statement, type of the lhs */ + + lhsobject_t lhs; + + mem_t datat; /* the type of the data element */ + address_t lendest, lensource, newlength; + int k; + string_t s; + + +nextdata: + /* look for the variable */ + nexttoken(); + + /* this code evaluates the left hand side - remember type and name */ + copyname(&lhs.name, &name); + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + + + if (DEBUG) { + outsc("** read lefthandside "); + outname(&lhs.name); + outsc(" at here "); + outnumber(here); + outsc(" and data pointer "); + outnumber(data); + outcr(); + } + + + /* if the token after lhs is not a termsymbol or a comma, something is wrong */ + if (!termsymbol() && token != ',') { + error(EUNKNOWN); + return; + } + + /* remember the token we have draw from the stream */ + t0 = token; + + /* find the data and assign */ + nextdatarecord(); + if (!USELONGJUMP && er) return; + + /* assign the value to the lhs - somewhat redundant code to assignment */ + switch (token) { + case NUMBER: + /* a number is stored on the stack */ + assignnumber2(&lhs, x); + break; + case STRING: + if (lhs.name.token != STRINGVAR) { + /* we read a string into a numerical variable */ + if (sr.address) assignnumber2(&lhs, memread2(sr.address)); + else assignnumber2(&lhs, *sr.ir); + } else { + /* we have all we need in sr */ + /* the destination address of the lefthandside, on the fly create included */ + getstring(&s, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + + /* the length of the lefthandside string */ + lendest = s.length; + + if (DEBUG) { + outsc("* read stringcode "); outname(&lhs.name); outcr(); + outsc("** read source string length "); outnumber(sr.length); outcr(); + outsc("** read dest string length "); outnumber(s.length); outcr(); + outsc("** read dest string dimension "); outnumber(s.strdim); outcr(); + } + + /* does the source string fit into the destination */ + if ((lhs.i + sr.length - 1) > s.strdim) { + error(EORANGE); + return; + } + + /* now write the string */ + assignstring(&s, &sr, sr.length); + + /* classical Apple 1 behaviour is string truncation in substring logic */ + newlength = lhs.i + sr.length - 1; + setstringlength(&lhs.name, newlength, lhs.j); + + } + break; + default: + error(EUNKNOWN); + return; + } + + /* next list item */ + if (t0 == ',') goto nextdata; + + /* no nexttoken here as we have already a termsymbol */ + if (DEBUG) { + outsc("** leaving xread with "); outnumber(token); outcr(); + outsc("** at here "); outnumber(here); outcr(); + outsc("** and data pointer "); outnumber(data); outcr(); + } + + /* restore the token for further processing */ + token = t0; +} + +/* + RESTORE sets the data pointer to zero right now +*/ +void xrestore() { + short rec; + + nexttoken(); + + /* a plain restore */ + if (termsymbol()) { + data = 0; + datarc = 1; + return; + } + + /* something with an argument */ + expression(); + if (!USELONGJUMP && er) return; + + /* we search a record */ + rec = pop(); + + /* if we need to search backward, back to the beginning */ + if (rec < datarc) { + data = 0; + datarc = 1; + } + + /* advance to the record or top */ + while (datarc < rec && data < top) nextdatarecord(); + + /* token is poisoned after nextdatarecord, need to cure this here */ + nexttoken(); +} + +/* + DEF a function, functions are tokenized as FN ARRAYVAR to make + name processing easy. +*/ +void xdef() { + address_t a; + + name_t function; /* the name of the function */ + name_t variable; /* the name of the argument */ + + /* do we define a function */ + if (!expect(TFN, EUNKNOWN)) return; + + /* the name of the function, it is tokenized as an array */ + if (!expect(ARRAYVAR, EUNKNOWN)) return; + + copyname(&function, &name); + function.token = TFN; /* set the right type here */ + + /* the argument variable */ + if (!expect('(', EUNKNOWN)) return; + nexttoken(); + if (token == ')') { + zeroname(&variable); + } else if (token == VARIABLE) { + copyname(&variable, &name); + nexttoken(); + } else { + error(EUNKNOWN); + return; + } + if (token != ')') { + error(EUNKNOWN); + return; + } + + /* which type of function do we store is found in token */ + nexttoken(); + + /* ready to store the function */ + if (DEBUG) { + outsc("** DEF FN with function "); + outname(&function); + outsc(" and argument "); + outname(&variable); + outsc(" at here "); + outnumber(here); + outsc(" and token is "); + outnumber(token); + outcr(); + } + + /* find the function, we allow redefinition, currently only functions with 1 argument */ + if ((a = bfind(&function)) == 0) a = bmalloc(&function, 1); + if (DEBUG) { + outsc("** found function structure at "); + outnumber(a); + outcr(); + } + if (!USELONGJUMP && er) return; + + /* no more memory */ + if (a == 0) { + error(EVARIABLE); + return; + } + + /* store the payload */ + + /* first the jump address */ + setaddress(a, memwrite2, here); + a = a + addrsize; + + /* the type of the return value - at the moment only numbers */ + if (token == '=') + memwrite2(a++, VARIABLE); + else + memwrite2(a++, 0); + + /* store the number of variables */ + memwrite2(a++, 1); + + /* store the type and the entire name of the variables */ + memwrite2(a++, variable.token); + setname_pgm(a, &variable); + a = a + sizeof(name_t) - 1; /* reserves space for redefinition of functions with different variable */ + + /* skip the function body during defintion */ + if (token == '=') { + while (!termsymbol()) nexttoken(); + } else { +#if defined(HASMULTILINEFUNCTIONS) + while (token != TFEND) { + nexttoken(); + if (token == TDEF || token == EOL) { + error(EFUN); + return; + } + } + nexttoken(); +#else + error(EFUN); + return; +#endif + } +} + +/* + FN function evaluation, this is a call from factor or directly from + statement, the variable m tells xfn which one it is. 0 is from + factor and 1 is from statement. + + This mechanism is only needed in multiline functions. In this case, + a new interpreter instance is started with statement(). The variable + m decides whether the stack should contain a return value (call from factor) + or should be empty. + + The new function code has local variable capability of the new heap. +*/ +void xfn(mem_t m) { + address_t a; + address_t h1, h2; + name_t variable; + token_t type; + + /* the name of the function and its address */ + if (!expect(ARRAYVAR, EUNKNOWN)) return; + name.token = TFN; + a = bfind(&name); + if (a == 0) { + error(EUNKNOWN); + return; + } + + if (DEBUG) { + outsc("** in xfn found function "); + outname(&name); + outsc(" at "); + outnumber(a); + outcr(); + } + + /* and the argument */ + if (!expect('(', EUNKNOWN)) return; + nexttoken(); + + /* if there is no argument, set it to zero */ + if (token == ')') { + push(0); + } else { + expression(); + if (!USELONGJUMP && er) return; + } + if (token != ')') { + error(EUNKNOWN); + return; + } + + /* where is the function code */ + h1 = getaddress(a, memread2); + a = a + addrsize; + + if (DEBUG) { + outsc("** found function address "); + outnumber(h1); + outcr(); + } + + /* which type of function do we have*/ + type = memread2(a++); + + if (DEBUG) { + outsc("** found function type "); + outnumber(type); + outcr(); + } + + /* the number of variables is always one here */ + a++; + + /* what is the name of the variable, direct read as getname also gets a token */ + /* skip the type here as not needed*/ + // zeroname(&variable); /* fixes the obscure function namehandling bug not needed any more with copyname in place */ + variable.token = memread2(a++); + (void) getname(a, &variable, memread2); + a = a + sizeof(name_t) - 1; + + if (DEBUG) { + outsc("** found function variable "); + outname(&variable); + outcr(); + } + + /* create a local variable and store the value in it if there is a variable */ + if (variable.c[0]) { + if (!bmalloc(&variable, 0)) { + error(EVARIABLE); + return; + } + setvar(&variable, pop()); + } else { + /* create a dummy variable to make sure local variables are cleaned up */ + variable.token = VARIABLE; + variable.c[0] = '_'; + variable.c[1] = 0; + variable.l = 1; + if (!bmalloc(&variable, 0)) { + error(EVARIABLE); + return; + } + } + + /* store here and then evaluate the function */ + h2 = here; + here = h1; + + /* + * For simple singleline function, we directly do expression evaluation. + * This is inexpensive as no new interpreter instance is started. + */ + if (type == VARIABLE) { + if (DEBUG) { + outsc("** evaluating expression at "); + outnumber(here); + outcr(); + } + if (!expectexpr()) return; + } else { +#ifdef HASMULTILINEFUNCTIONS + /* + * Here comes the tricky part, we start a new interpreter instance. + * For multiline functions we generate a new interpreter instance by + * calling statement(). The variable m decides whether the stack should + * contain a return value (call from factor) or should be empty. + * fncontext counts and limits the depth of function calls. This is + * important to avoid stack overflow. For this reason statement() + * should not allocate a lot of memory on the C stack. + */ + + if (DEBUG) { + outsc("** starting a new interpreter instance "); + outcr(); + } + + nexttoken(); + fncontext++; + if (fncontext > FNLIMIT) { + error(EFUN); + return; + } + statement(); + if (!USELONGJUMP && er) return; + if (fncontext > 0) fncontext--; else error(EFUN); +#else + error(EFUN); + return; +#endif + } + + /* now that all the function stuff is done, return to here and set the variable right */ + here = h2; + (void) bfree(&variable); + + + /* now, depending on how this was called, make things right, we remove + the return value from the stack and call nexttoken */ + if (m == 1) { + pop(); + nexttoken(); + } +} + +/* + ON is a bit like IF +*/ + +void xon() { + number_t cr, tmp; + int ci; + token_t t; + int line = 0; + + /* ON can do the ON ERROR and ON EVENT commands as well, in this BASIC + ERROR and EVENT can also be used without the ON */ + + nexttoken(); + switch (token) { +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + return; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + return; +#endif + default: + expression(); + if (!USELONGJUMP && er) return; + } + + /* the result of the condition, can be any number even large */ + cr = pop(); + if (DEBUG) { + outsc("** in on condition found "); + outnumber(cr); + outcr(); + } + + /* is there a goto or gosub */ + if (token != TGOSUB && token != TGOTO) { + error(EUNKNOWN); + return; + } + + /* remember if we do gosub or goto */ + t = token; + + /* how many arguments have we got here */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args == 0) { + error(EARGS); + return; + } + + /* do we have more arguments then the condition? */ + if (cr > args && cr <= 0) ci = 0; else ci = (int)cr; + + /* now find the line to jump to and clean the stack, reuse cr + we need to clean the stack here completely, therefore complete the loop + ERROR handling is needed for the trapping mechanism. No using popaddress() + here, because of the needed stack cleanup. Unclear is this precaution is + really needed. + */ + while (args) { + tmp = pop(); + if (args == ci) { + if (tmp < 0) er = ELINE; + line = tmp; + } + args--; + } + if (!USELONGJUMP && er) return; + + if (DEBUG) { + outsc("** in on found line as target "); + outnumber(line); + outcr(); + } + + /* no line found to jump to */ + if (line == 0) { + nexttoken(); + return; + } + + /* prepare for the jump */ + if (t == TGOSUB) pushgosubstack(0); + if (!USELONGJUMP && er) return; + + findline(line); + if (!USELONGJUMP && er) return; + + /* goto in interactive mode switched to RUN mode + no clearing of variables and stacks */ + if (st == SINT) st = SRUN; + +} +#endif + +/* the structured BASIC extensions, WHILE, UNTIL, and SWITCH */ + +#ifdef HASSTRUCT +void xwhile() { + + /* what? */ + if (DEBUG) { + outsc("** in while "); + outnumber(here); + outspc(); + outnumber(token); + outcr(); + } + + /* interactively we need to save the buffer location */ + if (st == SINT) here = bi - ibuffer; + + /* save the current location and token type, here points to the condition, name is irrelevant */ + pushloop(0, TWHILE, here, 0, 0); + + /* is there a valid condition */ + if (!expectexpr()) return; + + /* if false, seek WEND and clear the stack*/ + if (!pop()) { + droploop(); + if (st == SINT) bi = ibuffer + here; + nexttoken(); + findbraket(TWHILE, TWEND); + nexttoken(); + } +} + +void xwend() { + blocation_t l; + bloop_t* loop; + + /* remember where we are */ + pushlocation(&l); + + /* back to the condition */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + + /* is this a while loop */ + if (loop->var.token != TWHILE ) { + error(TWEND); + return; + } + + /* interactive run or program run */ + if (st == SINT) bi = ibuffer + loop->here; else here = loop->here; + + /* is there a valid condition */ + if (!expectexpr()) return; + + /* if false, seek WEND */ + if (!pop()) { + droploop(); + poplocation(&l); + nexttoken(); + } +} + +void xrepeat() { + /* what? */ + if (DEBUG) { + outsc("** in repeat "); + outnumber(here); + outspc(); + outnumber(token); + outcr(); + } + + /* interactively we need to save the buffer location */ + if (st == SINT) here = bi - ibuffer; + + /* save the current location and token type, here points statement after repeat */ + pushloop(0, TREPEAT, here, 0, 0); + + /* we are done here */ + nexttoken(); +} + +void xuntil() { + blocation_t l; + bloop_t* loop; + + /* is there a valid condition */ + if (!expectexpr()) return; + + /* remember the location */ + pushlocation(&l); + + /* look on the stack */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + + /* if false, go back to the repeat */ + if (!pop()) { + + /* the right loop type ? */ + if (loop->var.token != TREPEAT) { + error(TUNTIL); + return; + } + + /* correct for interactive */ + if (st == SINT) bi = ibuffer + loop->here; else here = loop->here; + + } else { + + /* back to where we were */ + droploop(); + poplocation(&l); + } + + nexttoken(); /* a bit of evil here, hobling over termsymbols */ +} + +void xswitch() { + number_t r; + mem_t match = 0; + mem_t swcount = 0; + blocation_t l; + + /* lets look at the condition */ + if (!expectexpr()) return; + r = pop(); + + /* remember where we are */ + pushlocation(&l); + + /* seek the first case to match the condition */ + while (token != EOL) { + if (token == TSWEND) break; + /* nested SWITCH - skip them all*/ + if (token == TSWITCH) { + + if (DEBUG) { + outsc("** in SWITCH - nesting found "); + outcr(); + } + + nexttoken(); + findbraket(TSWITCH, TSWEND); + + if (DEBUG) { + outsc("** in SWITCH SWEND found at "); + outnumber(here); + outcr(); + } + + if (!USELONGJUMP && er) return; + } + /* a true case */ + if (token == TCASE) { + + /* more sophisticated, case can have an argument list */ + nexttoken(); + parsearguments(); + + if (DEBUG) { + outsc("** in CASE found "); + outnumber(args); + outsc(" arguments"); + outcr(); + } + + if (!USELONGJUMP && er) return; + if (args == 0) { + error(TCASE); + return; + } + while (args > 0) { + if (pop() == r) match = 1; + args--; + } + + if (match) { + return; + } + } + nexttoken(); + } + + /* return to the original location and continue if no case is found */ + poplocation(&l); +} + +/* a nacked case statement always seeks the end of the switch, + currently SWITCH statements cannot be nested. */ +void xcase() { + while (token != EOL) { + nexttoken(); + if (token == TSWEND) break; + } +} +#endif + + +/* + statement processes an entire basic statement until the end + of the line. + + The statement loop is a bit odd and requires some explanation. + A statement function called in the central switch here must either + call nexttoken as its last action to feed the loop with a new token + and then break or it must return which means that the rest of the + line is ignored. A function that doesn't call nexttoken and just + breaks causes an infinite loop. + + statement is called once in interactive mode and terminates + at end of a line. +*/ + +void statement() { + mem_t xc; + + if (DEBUG) bdebug("statement \n"); + + /* we can long jump out out any function now, making error handling easier */ + /* if we return here with a long jump, only the error handler is triggered */ + /* this mechanism always branches to the highest context */ +#if USELONGJUMP == 1 + if (fncontext == 0) if (setjmp(sthook)) goto errorhandler; +#endif + + /* the core loop processing commands */ + while (token != EOL) { +#ifdef HASSTEFANSEXT + /* debug level 1 happens only in the statement loop */ + if (debuglevel == 1) { + debugtoken(); + outcr(); + } +#endif + switch (token) { + case ':': + case LINENUMBER: + nexttoken(); + break; + /* Palo Alto BASIC language set + BREAK */ + case TPRINT: + xprint(); + break; + case TLET: + nexttoken(); + if ((token != ARRAYVAR) && (token != STRINGVAR) && (token != VARIABLE)) { + error(EUNKNOWN); + break; + } + case STRINGVAR: + case ARRAYVAR: + case VARIABLE: + assignment(); + break; + case TINPUT: + xinput(); + break; + case TRETURN: +#ifndef HASMULTILINEFUNCTIONS + xreturn(); +#else + if (fncontext > 0) { + nexttoken(); + if (termsymbol()) { + push(0); + } + else expression(); + return; /* this returns from statement and ends one interpreter instance */ + } else + xreturn(); /* while this happens inside the instance */ +#endif + break; +#ifndef HASMULTILINEFUNCTIONS + case TGOSUB: + case TGOTO: + xgoto(); + break; +#else + case TGOSUB: + if (fncontext > 0) { + error(EFUN); + return; + } + case TGOTO: + xgoto(); + break; +#endif + case TIF: + xif(); + break; + case TFOR: + xfor(); + break; + case TNEXT: + xnext(); + break; + case TBREAK: + xbreak(); + break; + case TSTOP: + case TEND: /* return here because new input is needed, end as a block end is handles elsewhere */ + *ibuffer = 0; /* clear ibuffer - this is a hack */ + st = SINT; /* switch to interactive mode */ + eflush(); /* if there is an EEPROM dummy, flush it here (protects flash storage!) */ + ofileclose(); + nexttoken(); + if (token == TSTOP) { + restartsystem(); + } + *ibuffer = 0; /* clear ibuffer - this is a hack */ + st = SINT; /* switch to interactive mode */ + return; /* leave the interpreter instance */ + case TLIST: + xlist(); + break; + case TNEW: /* return here because new input is needed */ + xnew(); + return; + case TCONT: /* cont behaves differently in interactive and in run mode */ + if (st == SRUN || st == SERUN) { + xcont(); + break; + } /* no break here, because interactively CONT=RUN minus CLR */ + case TRUN: + xrun(); + return; + case TREM: + xrem(); + break; + /* Apple 1 language set */ +#ifdef HASAPPLE1 + case TDIM: + xdim(); + break; + case TCLR: + xclr(); + break; + case TTAB: + case TSPC: + xtab(); + break; + case TPOKE: + xpoke(); + break; +#endif + /* Stefan's tinybasic additions */ + case TSAVE: + xsave(); + break; + case TLOAD: + xload(0); + if (st == SINT) return; /* interactive load doesn't like break as the ibuffer is messed up; */ + else break; +#ifdef HASSTEFANSEXT + case TDUMP: + xdump(); + break; + case TGET: + xget(); + break; + case TPUT: + xput(); + break; + case TSET: + xset(); + break; + case TNETSTAT: + xnetstat(); + break; + case TCLS: + ax = od; + /* if we have a display it is the default for CLS */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + od = ODSP; +#endif + outch(12); + od = ax; + nexttoken(); + break; + case TLOCATE: + xlocate(); + break; +#endif +#ifdef HASUSRCALL + /* low level functions */ + case TCALL: + xcall(); + break; +#endif + /* Arduino IO */ +#ifdef HASARDUINOIO + case TDWRITE: + xdwrite(); + break; + case TAWRITE: + xawrite(); + break; + case TPINM: + xpinm(); + break; + case TDELAY: + xdelay(); + break; +#ifdef HASTONE + case TTONE: + xtone(); + break; +#endif +#ifdef HASPULSE + case TPULSE: + xpulse(); + break; +#endif +#endif + /* BASIC DOS function */ +#ifdef HASFILEIO + case TCATALOG: + xcatalog(); + break; + case TDELETE: + xdelete(); + break; + case TOPEN: + xopen(); + break; + case TCLOSE: + xclose(); + break; + case TFDISK: + xfdisk(); + break; +#endif + /* graphics */ +#ifdef HASGRAPH + case TCOLOR: + xcolor(); + break; + case TPLOT: + xplot(); + break; + case TLINE: + xline(); + break; + case TRECT: + xrect(); + break; + case TCIRCLE: + xcircle(); + break; + case TFRECT: + xfrect(); + break; + case TFCIRCLE: + xfcircle(); + break; +#endif +#ifdef HASDARTMOUTH + case TDATA: + xdata(); + break; + case TREAD: + xread(); + break; + case TRESTORE: + xrestore(); + break; + case TDEF: + xdef(); + break; + case TON: + xon(); + break; +#ifdef HASMULTILINEFUNCTIONS + case TFN: + xfn(1); + break; + case TFEND: + /* we leave the statement loop and return to the calling expression() */ + /* if the function is ended with FEND we return 0 */ + if (fncontext == 0) { + error(EFUN); + return; + } + else { + push(0); + return; + } + break; +#endif +#endif +#ifdef HASSTEFANSEXT + case TELSE: + xelse(); + break; +#endif +#ifdef HASDARKARTS + case TEVAL: + xeval(); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + break; +#endif +#ifdef HASIOT + case TSLEEP: + xsleep(); + break; + case TWIRE: + xwire(); + break; +#endif +#ifdef HASTIMER + case TAFTER: + case TEVERY: + xtimer(); + break; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + break; +#endif +#ifdef HASSTRUCT + case TWHILE: + xwhile(); + break; + case TWEND: + xwend(); + break; + case TREPEAT: + xrepeat(); + break; + case TUNTIL: + xuntil(); + break; + case TSWITCH: + xswitch(); + break; + case TCASE: + xcase(); + break; + case TSWEND: + case TDO: + case TDEND: + nexttoken(); + break; +#endif +#ifdef HASEDITOR + case TEDIT: + xedit(); + break; +#endif +#ifdef HASHELP + case THELP: + xhelp(); + break; +#endif + default: + /* strict syntax checking */ + error(EUNKNOWN); + goto errorhandler; + } + + + /* + after each statement we check on a break character + on an Arduino entering "#" at runtime stops the program + for BREAKINBACKGROUND we do this in the background loop + to avoid slowing down. + */ +#if defined(BREAKCHAR) +#ifndef BREAKINBACKGROUND + if (checkch() == BREAKCHAR) { + st = SINT; + if (od == 1) serialflush(); else xc = inch(); + return; + } +#else + if (breakcondition) { + breakcondition = 0; + st = SINT; + if (od == 1) serialflush(); else xc = inch(); + return; + } +#endif +#endif + + /* and after each statement, check the break pin */ +#if defined(BREAKPIN) + if (getbreakpin() == 0) { + st = SINT; + return; + }; +#endif + + /* and then there is also signal handling on some platforms */ +#if defined(POSIXSIGNALS) + if (breaksignal) { + st = SINT; + breaksignal = 0; + serialflush(); + outcr(); + return; + } +#endif + + /* yield after each statement which is a 10-100 microsecond cycle + on Arduinos and the like, all background tasks are handled in byield */ + byield(); + + /* if error handling is compiled into the code, errors can be trapped here */ +errorhandler: +#ifdef HASERRORHANDLING + if (er) { + if (st != SINT) { + erh = er; + er = 0; + switch (berrorh.type) { + case TCONT: + while (!termsymbol()) nexttoken(); + break; + case TGOTO: + findline(berrorh.linenumber); + berrorh.type = 0; + berrorh.linenumber = 0; + if (er) return; + break; + case 0: + return; + default: + nexttoken(); + } + } else + return; + } +#else + /* when an error is encountered the statement loop is ended */ + if (er) return; +#endif + + /* + if we run error free, interrupts and times can be processed + + We can savely interrupt and return only if here points either to + a termsymbol : or LINENUMBER. NEXT is a special case. We need to + catch this here because empty FOR loops never even have a termsymbol + a ":"" is swallowed after FOR. This is probably also true for + WHILE and REPEAT loops but has not been tested yet. + + The interrupts are only triggered in fncontext 0, i.e. in the + main loop. While in functions, all interrupts are disabled. + + */ + + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { + +/* timer functions are processed before events */ +#ifdef HASTIMER + /* after is always processed before every */ + if (after_timer.enabled && fncontext == 0) { + if (millis() > after_timer.last + after_timer.interval) { + after_timer.enabled = 0; + if (after_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here -= (1 + sizeof(address_t)); + pushgosubstack(0); + } + findline(after_timer.linenumber); + if (er) return; + } + } + /* periodic events */ + if (every_timer.enabled && fncontext == 0) { + if (millis() > every_timer.last + every_timer.interval) { + every_timer.last = millis(); + if (every_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here -= (1 + sizeof(address_t)); + pushgosubstack(0); + if (er) return; + } + findline(every_timer.linenumber); + if (er) return; + } + } + #endif + /* the branch code for interrupts, we round robin through the event list */ +#ifdef HASEVENTS + /* interrupts */ + if (nevents > 0 && events_enabled && fncontext == 0) { + for (xc = 0; xc < EVENTLISTSIZE; xc++) { + if (eventlist[ievent].pin && eventlist[ievent].enabled && eventlist[ievent].active) { + if (eventlist[ievent].type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here -= (1 + sizeof(address_t)); + pushgosubstack(TEVENT); + if (er) return; + } + findline(eventlist[ievent].linenumber); /* here we jump to the new line */ + if (er) return; + eventlist[ievent].active = 0; + enableevent(eventlist[ievent].pin); /* events are disabled in the interrupt function, here they are activated again */ + events_enabled = 0; /* once we have jumped, we keep the events in BASIC off until reenabled by the program */ + break; + } + ievent = (ievent + 1) % EVENTLISTSIZE; + } + } +#endif + } + } +} + +/* + the banner message +*/ +void displaybanner() { + int i; + printmessage(MGREET); outspc(); + printmessage(EOUTOFMEMORY); outspc(); + if (memsize < maxnum) outnumber(memsize + 1); else { + outnumber(memsize / 1024 + 1); + outch('k'); + } + outspc(); +#ifdef HASERRORHANDLING + printmessage(EEEPROM); + outspc(); +#endif + outnumber(elength()); + outcr(); +#ifdef HASHELP + outsc(getmessage(MLANGSET)); + outsc(getmessage(MBASICLANGSET)); outcr(); + outsc("IO: "); + for (i = 0; i < 32; i++) { + if (iostat(i)) { + outnumber(i); outspc(); + } + } + outcr(); +#endif +} + +/* + the setup routine - Arduino style +*/ +void setup() { + + /* start measureing time */ + timeinit(); + + /* initialize the event system */ +#ifdef HASEVENTS + initevents(); +#endif + + /* init all io functions */ + ioinit(); +#ifdef FILESYSTEMDRIVER + // if (fsstat(1) == 1 && fsstat(2) > 0) outsc("Filesystem started\n"); +#endif + + /* setup for all non BASIC stuff */ + bsetup(); + + /* get the BASIC memory, either as memory array with + ballocmem() or as an SPI serical memory */ +#if (defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR)) && (!defined(MEMSIZE) || MEMSIZE == 0) + himem = memsize = spirambegin(); +#else +#if defined(EEPROMMEMINTERFACE) + /* + for an EEPROMMEM system, the memory consists of the + EEPROM from 0 to elength()-eheadersize and then the RAM. + */ + himem = memsize = ballocmem() + (elength() - eheadersize); +#else + himem = memsize = ballocmem(); +#endif +#endif + +#ifndef EEPROMMEMINTERFACE + if (DEBUG) { + outsc("** on startup, memsize is "); + outnumber(memsize); + outcr(); + } + + /* be ready for a new program if we run on RAM*/ + xnew(); + + if (DEBUG) { + outsc("** on startup, ran xnew "); + outcr(); + } +#else + /* if we run on an EEPROM system, more work is needed */ + if (eread(0) == 0 || eread(0) == 1) { /* have we stored a program and don't do new */ + top = getaddress(1, beread); + resetbasicstate(); /* the little brother of new, reset the state but let the program memory be */ + for (address_t a = elength(); a < memsize; a++) memwrite2(a, 0); /* clear the heap i.e. the basic RAM*/ + } else { + eupdate(0, 0); /* now we have stored a program of length 0 */ + setaddress(1, beupdate, 0); + xnew(); + } +#endif + + /* check if there is something to autorun and prepare + the interpreter to got into autorun once loop is reached */ + if (!autorun()) displaybanner(); + + /* activate the BREAKPIN */ + breakpinbegin(); +} + +/* + the loop routine for interactive input +*/ +void loop() { + + /* + autorun state was found in setup, autorun now but only once + autorun BASIC programs return to interactive after completion + autorun code always must loop in itself + */ + if (st == SERUN) { + xrun(); + /* on an EEPROM system we don't set top to 0 here */ +#ifndef EEPROMMEMINTERFACE + top = 0; +#endif + st = SINT; + } else if (st == SRUN) { + here = 0; + xrun(); + st = SINT; + } + + /* always return to default io channels once interactive mode is reached */ + iodefaults(); + form = 0; + + /* the prompt and the input request */ + printmessage(MPROMPT); + (void) ins(ibuffer, BUFSIZE - 2); + + /* tokenize first token from the input buffer */ + bi = ibuffer; + nexttoken(); + + /* a number triggers the line storage, anything else is executed */ + if (token == NUMBER) { + ax = x; + storeline(); + + /* on an EEPROM system we store top after each succesful line insert */ +#ifdef EEPROMMEMINTERFACE + setaddress(1, beupdate, top); +#endif + } else { + /* st=SINT; */ + statement(); + st = SINT; + } + + /* here, at last, all errors need to be catched and back to interactive input*/ + if (er) reseterror(); + +} + +/* if we are not on an Arduino, we need a main */ +#ifndef ARDUINO +int main(int argc, char* argv[]) { + + /* save the arguments if there are any */ +#ifdef HASARGS + bargc = argc; + bargv = argv; +#endif + + /* do what an Arduino would do, this loops for every interactive input */ + setup(); + while (1) + loop(); +} +#endif + +/* + Arduino style function for non BASIC code to run on the MCU. + All code that needs to run on the MCU independently can be put here. + It works more or less just like the normal loop() and setup(). + + This is meant for robotics and other device control type of stuff + on the Arduino platform. + + On POSIX systems I/O is blocking and therefore bloop() is not called + consistently. + + Rules of the game: + - bsetup() is called once during interpreter startup after all + IO subsystems are started and before the BASIC main memory is + allocated. Allocate memory here. Do not allocate a lot of memory + in bloop(). + - Never start or restart I/O functions of BASIC in bsetup(), + no Wire.begin(), Serial.begin() etc. If BASIC also uses this + BASIC handles the I/O startup. Things that BASIC does not use + can be started here. + - bloop() is called after every token, during I/O polling and in + DELAY functions. + - The typical call frequency of bloop() is 20 microseconds or faster. + This is fairly constant and reliable. + - The interpreter is robust against code in bloop() that needs a lot + of CPU time. It will simply slow down but it will not break, + unless(!) other I/O systems like network also need background CPU time + and you block bloop for a long time. As a rule of thumb, on network systems + bloop() should return after 1 ms. After bloop() has returned, the interpreter + tries to handle network and USB update stuff. + - Never use delay() in bloop(). Set a counter. Look at the tone + emulation code for examples. + - Never ever call BASIC functions from bloop(). BASIC function will + eventually call byield() which calls bloop() and so forth. + If you need to communicate data into BASIC, use the BASIC main + memory, variables or the USR function mechanism. + - Avoid allocating a lot of memory in bloop(). +*/ + +void bsetup() { + /* put your setup code here, to run once: */ + +} + +void bloop() { + /* put your main code here, to run repeatedly: */ + +} diff --git a/data/Basic2/IoTBasic/Makefile b/data/Basic2/IoTBasic/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..0dd4fa161c92afa6adf71d7033bda661b045cef0 --- /dev/null +++ b/data/Basic2/IoTBasic/Makefile @@ -0,0 +1,91 @@ +############################################################################### +# Makefile to compile code with arduino-cli for defined boards +# on the command line. +# +# Author: Dirk Selbach, luckynrslevin@users.noreply.github.com +# Inspired by: https://github.com/digiampietro/arduino-makefile/tree/master +# +# Build targets: +# 1) Build all defined boards +# make all +# 2) Build ELF for an individual board +# make build//IoTBasic.ino.elf +# e.g. make build/d1_mini/IoTBasic.ino.elf to build ELF for d1_mini board +# 3) Remove build dir for all boards +# make clean +# 4) Remove build dir for an individual board +# TODO +# +# Adding additional boards: +# 1) Get FQBN name of the board you want to add: arduino-cli board listall +# 2) Add the FQBN to the list in FQBN variable below +# 3) Add short name (last part of FQBN) to the list in SBN variable below +# +############################################################################### + +# Let's check if arduino-cli is installed +ifeq (, $(shell which arduino-cli)) +$(error "arduino-cli command not found. Please install and add to PATH. See: https://arduino.github.io/arduino-cli/1.2/") +endif + +OSFAMILY := $(shell ( uname | sed "s/-.*//" )) +MAKE_DIR := $(PWD) +GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) + +ifdef GIT_VERSION + CFLAGS = --build-property compiler.cpp.extra_flags=-DMYVERSION=\"$(GIT_VERSION)\" +else + CFLAGS = +endif + +# Fully qualified board name +# For a full list of FQBNs see: arduino-cli board listall +# To add a board add the FQBN to the list and the sort name to the SBN list below. +FQBN := esp32:esp32:d1_mini32 esp8266:esp8266:d1_mini esp8266:esp8266:nodemcuv2 + +# board short names (=last part of the FQBN) +SBN := d1_mini32 d1_mini nodemcuv2 + +# Rule to extract the FQBN based on the short name +get_full_name = $(filter %$(1),$(FQBN)) + +# Verbosity level, e.g., -v for verbose output +#VFLAG := -v +VFLAG := + +# Sources and headers +SRCINO := $(wildcard *.ino) +SRC := $(wildcard *.ino *.c *.cpp mylib/*/*.ino) +HDRS := $(wildcard *.h mylib/*/*.h) + +# Build directory (subdirs for the boards will be created within ELF build target) +BUILD_DIR := build + +# Define the .elf output file for each board +ELF_FILES := $(addprefix $(BUILD_DIR)/,$(addsuffix /$(SRCINO).elf,$(SBN))) + +$(info OSFAMILY is [${OSFAMILY}]) +$(info MAKE_DIR is [${MAKE_DIR}]) +$(info BUILD_DIR is [${BUILD_DIR}]) +$(info SRCINO is [${SRCINO}]) +$(info SRC is [${SRC}]) +$(info HDRS is [${HDRS}]) +$(info ELF_FILES is [${ELF_FILES}]) + +# Default target to build for all boards +all: $(ELF_FILES) +.PHONY: all + +# Build target for each board +$(ELF_FILES): $(SRC) $(HDRS) +# echo "target: $@ prereq: $<" + @echo "Building for board: $(call get_full_name,$(patsubst build/%/IoTBasic.ino.elf,%,$@))" + @mkdir -p $(dir $@) + arduino-cli compile -b $(call get_full_name,$(patsubst build/%/IoTBasic.ino.elf,%,$@)) --build-path $(dir $@) $(VFLAG) $(CFLAGS) + +# Cleanup build dir (all boards) +clean: + @echo "Cleaning the build directory completely" + rm -rf $(BUILD_DIR) +.PHONY: clean + diff --git a/data/Basic2/IoTBasic/basic.h b/data/Basic2/IoTBasic/basic.h new file mode 100644 index 0000000000000000000000000000000000000000..9233f96468882bf903f277bacee3dc13d630ee3f --- /dev/null +++ b/data/Basic2/IoTBasic/basic.h @@ -0,0 +1,831 @@ +/* + * + * $Id: basic.h,v 1.1 2023/09/27 15:23:20 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * basic.h are the core defintions and function protypes. + * + */ + +/* + * A few of the buffers and vars come from hardware.h. These are + * + * #define BUFSIZE + * #define STACKSIZE + * #define GOSUBDEPTH + * #define FORDEPTH + * #define LINECACHESIZE + * + * They depend on the hardware architecture and are configured there. + * + */ + +/* Additional buffers and vars, VARSIZE only needed for Tinybasics */ +#define SBUFSIZE 16*sizeof(number_t) +#define VARSIZE 26 + +/* Default sizes of arrays and strings if they are not DIMed */ +#define ARRAYSIZEDEF 10 +#define STRSIZEDEF 32 + +/* the maximum name length */ +#define MAXNAME 32 + +/* + * The tokens for the BASIC keywords + * + * All single character operators are their own tokens + * ASCII values above 0x7f are used for tokens of keywords. + * EOL is a token. + * + * The two byte tokens are possible to extend the language beyond + * 127 keywords. + */ +#define EOL 0 +#define NUMBER -127 +#define LINENUMBER -126 +#define STRING -125 +#define VARIABLE -124 +#define STRINGVAR -123 +#define ARRAYVAR -122 +/* multi character tokens - BASEKEYWORD (3) */ +#define GREATEREQUAL -121 +#define LESSEREQUAL -120 +#define NOTEQUAL -119 +/* this is the Palo Alto Language Set (19) */ +#define TPRINT -118 +#define TLET -117 +#define TINPUT -116 +#define TGOTO -115 +#define TGOSUB -114 +#define TRETURN -113 +#define TIF -112 +#define TFOR -111 +#define TTO -110 +#define TSTEP -109 +#define TNEXT -108 +#define TSTOP -107 +#define TLIST -106 +#define TNEW -105 +#define TRUN -104 +#define TABS -103 +#define TRND -102 +#define TSIZE -101 +#define TREM -100 +/* this is the Apple 1 language set in addition to Palo Alto (14) */ +#define TNOT -99 +#define TAND -98 +#define TOR -97 +#define TLEN -96 +#define TSGN -95 +#define TPEEK -94 +#define TDIM -93 +#define TCLR -92 +#define THIMEM -91 +#define TTAB -90 +#define TTHEN -89 +#define TEND -88 +#define TPOKE -87 +/* Stefan's tinybasic additions (14) */ +#define TCONT -86 +#define TSQR -85 +#define TPOW -84 +#define TMAP -83 +#define TDUMP -82 +#define TBREAK -81 +#define TSAVE -80 +#define TLOAD -79 +#define TGET -78 +#define TPUT -77 +#define TSET -76 +#define TCLS -75 +#define TLOCATE -74 +#define TELSE -73 +/* Arduino functions (10) */ +#define TPINM -72 +#define TDWRITE -71 +#define TDREAD -70 +#define TAWRITE -69 +#define TAREAD -68 +#define TDELAY -67 +#define TMILLIS -66 +#define TTONE -65 +#define TPULSE -64 +#define TAZERO -63 +#define TLED -62 +/* the DOS functions (5) */ +#define TCATALOG -61 +#define TDELETE -60 +#define TOPEN -59 +#define TCLOSE -58 +#define TFDISK -57 +/* low level access of internal routines (2) */ +#define TUSR -56 +#define TCALL -55 +/* mathematical functions (7) */ +#define TSIN -54 +#define TCOS -53 +#define TTAN -52 +#define TATAN -51 +#define TLOG -50 +#define TEXP -49 +#define TINT -48 +/* graphics - rudimentary (7) */ +#define TCOLOR -47 +#define TPLOT -46 +#define TLINE -45 +#define TCIRCLE -44 +#define TRECT -43 +#define TFCIRCLE -42 +#define TFRECT -41 +/* the Dartmouth extensions (6) */ +#define TDATA -40 +#define TREAD -39 +#define TRESTORE -38 +#define TDEF -37 +#define TFN -36 +#define TON -35 +/* darkarts (3) */ +#define TMALLOC -34 +#define TFIND -33 +#define TEVAL -32 +/* iot extensions (9) */ +#define TERROR -31 +#define TAVAIL -30 +#define TSTR -29 +#define TINSTR -28 +#define TVAL -27 +#define TNETSTAT -26 +#define TSENSOR -25 +#define TWIRE -24 +#define TSLEEP -23 +/* events and interrupts */ +#define TAFTER -22 +#define TEVERY -21 +#define TEVENT -20 +/* structured commands */ +#define TWHILE -19 +#define TWEND -18 +#define TREPEAT -17 +#define TUNTIL -16 +#define TSWITCH -15 +#define TCASE -14 +#define TSWEND -13 +#define TDO -12 +#define TDEND -11 +/* multiline function extension */ +#define TFEND -10 +/* these are multibyte token extension, currently unused */ +/* using them would allow over 1000 BASIC keywords */ +#define TEXT7 -9 +#define TEXT6 -8 +#define TEXT5 -7 +#define TEXT4 -6 +#define TEXT3 -5 +#define TEXT2 -4 +#define TEXT1 -3 +/* end of tokens */ +/* constants used for some purposes other than token */ +/* Indentifying a buffer on the heap */ +#define TBUFFER -2 +/* UNKNOWN is not used in the current code, the + * lexer tokenizes everything blindly. There is a UNKNOWN hook + * in statement for a grammar aware lexer */ +#define UNKNOWN -1 + +/* alternative implementation using positive token values */ +#define TASC 1 +#define TCHR 2 +#define TRIGHT 3 +#define TLEFT 4 +#define TMID 5 +#define TSPC 6 + +/* The editor and other helpers */ +#define TEDIT 7 +#define THELP 8 + +/* bitwise operations, avoid 10 as a token value */ +#define TSHL 9 +#define TSHR 11 +#define TBIT 12 +/* + * Extension tokens can be in the range from -128 upwards. + * one needs to set HASLONGTOKENS. Currently ony one set of + * extension tokens is implemented ranging from -128 to -255. + * + * **** right now unused and untested **** */ + + #define TCAM -128 + +/* BASEKEYWORD is used by the lexer. From this keyword on it tries to match. */ +#define BASEKEYWORD -121 + +/* + * Interpreter states + * SRUN means running from a programm + * SINT means interactive mode + * SERUN means running directly from EEPROM + * (enum would be the right way of doing this.) + */ +#define SINT 0 +#define SRUN 1 +#define SERUN 2 + +/* + * the message catalog + */ +#define MFILE 0 +#define MPROMPT 1 +#define MGREET 2 +#define MLINE 3 +#define MNUMBER 4 +#define MVARIABLE 5 +#define MARRAY 6 +#define MSTRING 7 +#define MSTRINGVAR 8 +#define EGENERAL 9 +#define EUNKNOWN 10 +#define ENUMBER 11 +#define EDIVIDE 12 +#define ELINE 13 +#define EOUTOFMEMORY 14 +#define ESTACK 15 +#define EORANGE 16 +#define ESTRING 17 +#define EVARIABLE 18 +#define ELOOP 19 +#define EFILE 20 +#define EFUN 21 +#define EARGS 22 +#define EEEPROM 23 +#define ESDCARD 24 +#define MBASICLANGSET 25 +#define MLANGSET 26 +#define MKEYWORDS 27 + + +/* + * code for variable numbers and addresses sizes + * the original code was 16 bit but can be extended here + * to arbitrary types + * + * number_t is the type for numerical work - either float or int + * wnumber_t is the type containing the largest printable integer, + * for float keep this int on 32 bit and long on 8 bit unless you + * want to use very long integers, like 64 or 128 bit types. + * address_t is an unsigned type adddressing memory, default 16bit + * mem_t is a SIGNED 8bit character type. + * index_t is a SIGNED minimum 16 bit integer type + * + * works with the tacit assumption that + * sizeof(number_t) >= sizeof(address_t) + * and that the entire memory is smaller than the positive + * part of number type (!!) + * + * we assume that float >= 4 bytes in the following + * + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: the index size of strings either + * 1 byte or 2 bytes - no other values supported + */ +#ifdef HASFLOAT +#ifdef HAS64BIT +typedef double number_t; +typedef long long wnumber_t; +#else +typedef float number_t; +typedef long long wnumber_t; +#endif +#else +#ifdef HAS64BIT +typedef int64_t number_t; +typedef int64_t wnumber_t; +#elif defined(HAS32BITINT) +typedef int32_t number_t; +typedef int32_t wnumber_t; +#else +typedef int number_t; +typedef int wnumber_t; +#endif +#endif +/* default is 16bit addresses and max 64k memory, setting MEMSIZE in hardware.h overrides this */ +#if !defined(MEMSIZE) || MEMSIZE < 65536 +typedef uint16_t address_t; /* this type addresses memory */ +#else +/* use this for large memory systems, tested occassionally */ +typedef uint32_t address_t; +#endif +typedef int8_t mem_t; /* a signed 8 bit type for the memory */ +typedef int index_t; /* this type counts at least 16 bit */ +#ifndef HASLONGTOKENS +typedef int8_t token_t; /* the type of tokens, normally mem_t with a maximum of 127 commands and data types */ +#else +typedef int16_t token_t; /* token type extension, allows more commands and symbols */ +#endif + +/* the memreader function type, a function accessing memory has to have this shape */ +typedef mem_t (*memreader_t)(address_t); +typedef void (*memwriter_t)(address_t, mem_t); + +/* the worker function type - experimental */ +typedef void (*bworkfunction_t)(); + +/* the location type, this is the cursor on the actual interpreter location */ +typedef struct { + address_t location; + token_t token; +} blocation_t; + + +/* the new string type used in the reimplementation of the string functions */ +/* + * stringlength_t is the maximum length of a string, currently only 2 bytes is really tested. + * one byte lengthes may work, will be fixed soon to arbitrary types + * + * string_t says where we can find a string. It is either in BASIC memory and has a valid BASIC memory + * address a, or it is in C memory outside mem[]. Then ir says where the string can be found. + * This is necessary because BASIC can handle different memory layouts, EEPROM models and serial + * memory chips. We cannot simply rely on data to be found in BASIC memory like in old 8 bit + * computers or all in C memory like on modern Linux/Windows/Mac systems. + * + * Components of the string_t: + * - the address of the string in BASIC memory + * - the C memory pointer ir to the string location, if this is 0, the string is somewhere outside C memory + * - the length of the entire string + * - the dimension of the string strdim, this is the length of the memory segment reserved for the string + * - the dimension of the string array, arraydim + */ + +typedef uint16_t stringlength_t; + +typedef struct { + address_t address; + char* ir; + stringlength_t length; + address_t strdim; + address_t arraydim; +} string_t; + +/* + * Two types for identifiying objects and lefthandsides. + * name_t is the type for variable names and types. + * lhsobject_t identifies an assignable object like variables, + * arrays and strings. + * + * Currently name_t only implements two letter objects and lhsobject_t + * only implements two dimensional arrays and one dimensional strings. + */ +typedef struct { + token_t token; + mem_t c[MAXNAME]; + mem_t l; +} name_t; + +/* used to identify mostly lefthandsides and some righthandsides with these conventions */ +typedef struct { + name_t name; /* the name of a variable */ + address_t i; /* the start value of a substring or the first index of a number array */ + address_t j; /* the second index of an array */ + address_t i2; /* the second value of a substring string */ + mem_t ps; /* flag to indicate a pure string */ +} lhsobject_t; + +/* heap objects have a name a size and a payload address */ +typedef struct { + name_t name; + address_t address; + address_t size; +} heap_t; + +/* + * a general loop time, needed for the reimplementation of all loops + * the loop time knows the variable of a for loop or alternatively + * the type of the for loop. For this the token field of the name is + * reused. At also knows the here address of the loops beginning and optinally + * the end and the step + */ +typedef struct { + name_t var; + address_t varaddress; /* experimental to speed up loops */ + address_t here; + number_t to; + number_t step; +} bloop_t; + +/* + * The accumulator type, used for the stack and the + * arithmetic operations. + */ +typedef union { + number_t n; + address_t a; + index_t i; + stringlength_t s; + mem_t c[sizeof(number_t)]; +} accu_t; + +/* the timer type, knows the linenumber and all the data of the timer */ +typedef struct { + mem_t enabled; + unsigned long last; + unsigned long interval; + mem_t type; + address_t linenumber; +} btimer_t; + +/* + * The events API for Arduino with interrupt service routines + * analogous to the timer API. + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + */ + +/* event type for external events */ +typedef struct { + mem_t enabled; + mem_t pin; + mem_t mode; + mem_t type; + address_t linenumber; + mem_t active; +} bevent_t; + +/* + * Function prototypes, ordered by layers + * HAL - hardware abstraction + * Layer 0 - memory and I/O + * Layer 1 - Program storage and control + * Layer 2 - Where stuff happens + */ + +/* + * Layer 0 functions - I/O and memory management + */ + +/* event types and functions */ +void bintroutine0(); +void bintroutine1(); +void bintroutine2(); +void bintroutine3(); +mem_t enableevent(mem_t); +void disableevent(mem_t); +mem_t eventindex(mem_t); +mem_t addevent(mem_t, mem_t, mem_t, address_t); +void deleteevent(mem_t); +volatile bevent_t* findevent(mem_t); + +/* make room for BASIC */ +address_t ballocmem(); + +/* handle files im EEPROM */ +void eload(); +void esave(); + +/* starts programs from the filesystem */ +char autorun(); + +/* display a startup banner */ +void displaybanner(); + +/* the variable heap from Apple 1 BASIC */ +address_t bmalloc(name_t*, address_t); +address_t bfind(name_t*); +address_t bfree(name_t*); +address_t blength (name_t*); + +/* normal variables of number_t */ +number_t getvar(name_t*); +void setvar(name_t*, number_t); +void clrvars(); + +/* the new set of functions for memory access */ +number_t getnumber(address_t, memreader_t); +address_t getaddress(address_t, memreader_t); +stringlength_t getstrlength(address_t, memreader_t); +void setnumber(address_t, memwriter_t, number_t); +void setaddress(address_t, memwriter_t, address_t); +void setstrlength(address_t, memwriter_t, stringlength_t); + +/* setting names */ +address_t setname_heap(address_t, name_t*); +address_t setname_pgm(address_t, name_t*); +address_t getname(address_t, name_t*, memreader_t); +mem_t cmpname(name_t*, name_t*); +void zeroname(name_t*); +void zeroheap(heap_t*); + +/* array and string handling */ +/* the multidim extension is experimental, here only 2 array dimensions implemented as test */ +address_t createarray(name_t*, address_t, address_t); +void array(lhsobject_t*, mem_t, number_t*); +address_t createstring(name_t*, address_t, address_t); +void getstring(string_t*, name_t*, address_t, address_t); +void setstringlength(name_t*, address_t, address_t); + +/* the user defined extension functions */ +number_t getusrvar(); +void setusrvar(number_t); +number_t getusrarray(address_t); +void setusrarray(address_t, number_t); +void makeusrstring(); +number_t usrfunction(address_t, number_t); +void usrcall(address_t); + +/* get keywords and tokens from PROGMEM */ +char* getkeyword(address_t); +char* getmessage(char); +token_t gettokenvalue(address_t); +void printmessage(char); + +/* error handling */ +void error(token_t); +void reseterror(); +void debugtoken(); +void bdebug(const char*); + +/* the arithemtic stack */ +void push(number_t); +number_t pop(); +address_t popaddress(); +void drop(); +void clearst(); + +/* READ DATA handling */ +void clrdata(); + +/* FOR NEXT GOSUB stacks */ +void pushforstack(name_t*, number_t, number_t); +void popforstack(name_t*, number_t*, number_t*); +void dropforstack(); +void clrforstack(); +void pushgosubstack(mem_t); +void popgosubstack(); +void dropgosubstack(); +void clrgosubstack(); + +/* handling location rewinds */ +void pushlocation(blocation_t*); +void poplocation(blocation_t*); + +/* signal handling */ +void signalon(); +void signaloff(); +void signalhandler(int); + +/* output */ +void outcr(); +void outspc(); +void outsc(const char*); +void outscf(const char *, index_t); + +/* console logger as external function for runtime */ +void consolelog(char*); +void consolelognum(int); + +/* output a name */ +void outname(name_t*); + +/* I/O of number_t - floats and integers */ +address_t parsenumber(char*, number_t*); +address_t parsenumbern(char*, number_t*); /* can do hex,oct,bin */ +address_t parsenumber2(char*, number_t*); +address_t writenumber(char*, wnumber_t); +address_t writenumbern(char*, wnumber_t, mem_t); /* can do hex,oct,bin */ +address_t writenumber2(char*, number_t); +address_t tinydtostrf(number_t, index_t, char*); +int innumber(number_t*, char*, address_t); +void outnumber(number_t); + +/* + * Layer 1 functions, provide data and do the heavy lifting + * for layer 2 including lexical analysis, storing programs + * and expression evaluation + */ + +/* lexical analysis */ +void whitespaces(); +void nexttoken(); + +/* storing and retrieving programs */ +char nomemory(number_t); +void storetoken(); +mem_t memread(address_t); +mem_t memread2(address_t); +void memwrite2(address_t, mem_t); +mem_t beread(address_t); +void beupdate(address_t, mem_t); +void gettoken(); +void firstline(); +void nextline(); + +void clrlinecache(); +void addlinecache(address_t, address_t); +address_t findinlinecache(address_t); +void findline(address_t); +address_t myline(address_t); +void moveblock(address_t, address_t, address_t); +void zeroblock(address_t, address_t); +void diag(); +void storeline(); + +/* read arguments from the token stream and process them */ +char termsymbol(); +char expect(token_t, mem_t); +char expectexpr(); +void parsearguments(); +void parsenarguments(char); +void parsesubscripts(); +void parsefunction(void (*)(), short); +void parseoperator(void (*)()); +void parsesubstring(); + +/* mathematics and other functions for int and float */ +void xabs(); +void xsgn(); +void xpeek(); +void xmap(); +number_t rnd(); +void xrnd(); +void sqr(); +void xpow(); +number_t bpow(number_t, number_t); + +/* string values and string evaluation */ +void parsestringvar(string_t*, lhsobject_t*); +char stringvalue(string_t*); +void streval(); + +/* floating point functions */ +void xsin(); +void xcos(); +void xtan(); +void xatan(); +void xlog(); +void xexp(); +void xint(); + +/* expression evaluation */ +void factor(); +void power(); +void term(); +void addexpression(); +void compexpression(); +void notexpression(); +void andexpression(); +void expression(); + +/* real time clock string stuff */ +void rtcmkstr(); + +/* + * Layer 2 - statements and functions + * use the global variables + */ + +/* basic commands of the core language set */ +void xprint(); +void getstringtobuffer(string_t*, char*, stringlength_t); +void lefthandside(lhsobject_t*); +void assignnumber(lhsobject_t, number_t); +void assignstring(string_t*, string_t*, stringlength_t); +void assignment(); +void showprompt(); +void xinput(); +void xgoto(); +void xreturn(); +void xif(); + +/* FOR NEXT loops */ +void findnextcmd(); +void findbraket(token_t, token_t); +void xfor(); +void xbreak(); +void xcont(); +void xnext(); + +/* WHILE WEND*/ +void xwhile(); +void xwend(); + +/* REPEAT UNTIL */ +void xrepeat(); +void xuntil(); + +/* control commands and misc */ +void outputtoken(); +void xlist(); +void xrun(); +void xnew(); +void xrem(); +void xclr(); +void xdim(); +void xpoke(); +void xtab(); +void xdump(); +void dumpmem(address_t, address_t, char); +void xlocate(); + +/* file access and other i/o */ +void stringtobuffer(char*, string_t*); +void getfilename(char*, char); +void xsave(); +void xload(const char*); +void xget(); +void xput(); +void xset(); +void xnetstat(); + +/* Arduino IO control interface */ +void xaread(); +void xdread(); +void xdwrite(); +void xawrite(); +void xpinm(); +void xdelay(); +void xtone(); +void btone(int); +void bpulsein(); + +/* graphics commands */ +void xcolor(); +void xplot(); +void xline(); +void xrect(); +void xcircle(); +void xfrect(); +void xfcircle(); + +/* the darkarts */ +void xmalloc(); +void xfind(); +void xeval(); + +/* IoT commands */ +void xavail(); +void xfsensor(); +void xsleep(); +void xwire(); +void xfwire(); + +/* timers */ +void xafter(); +void xevent(); + +/* File I/O functions */ +char streq(const char*, char*); +void xcatalog(); +void xdelete(); +void xopen(); +void xfopen(); +void xclose(); +void xfdisk(); + +/* low level access functions */ +void xcall(); +void xusr(); + +/* the dartmouth stuff */ +void xdata(); +void nextdatarecord(); +void xread(); +void xrestore(); +void xdef(); +void xfn(mem_t); +void xon(); + +/* timers and interrupts */ +void xtimer(); +void resettimer(btimer_t*); + +/* structured BASIC extensions */ +void xwhile(); +void xwend(); +void xrepeat(); +void xuntil(); +void xswitch(); +void xcase(); +void xendswitch(); + +/* the editor */ +void xedit(); + +/* the statement loop */ +void statement(); + +/* the extension functions */ +void bsetup(); +void bloop(); diff --git a/data/Basic2/IoTBasic/boards/aim65.h b/data/Basic2/IoTBasic/boards/aim65.h new file mode 100644 index 0000000000000000000000000000000000000000..cffe424c0bb928b9806e4a7a81fa92585211e5b5 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/aim65.h @@ -0,0 +1,6 @@ +/* the AIM 65 lookalike */ +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define STANDALONE diff --git a/data/Basic2/IoTBasic/boards/avrlcd.h b/data/Basic2/IoTBasic/boards/avrlcd.h new file mode 100644 index 0000000000000000000000000000000000000000..092d1024fdcaba7d39840bcf4de08b12b7a1fcb1 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/avrlcd.h @@ -0,0 +1,3 @@ +/* an AVR ARDUINO (UNO or MEGA) with the classical LCD shield */ +#define DISPLAYCANSCROLL +#define LCDSHIELD diff --git a/data/Basic2/IoTBasic/boards/avrmcufriend.h b/data/Basic2/IoTBasic/boards/avrmcufriend.h new file mode 100644 index 0000000000000000000000000000000000000000..6445217d0e1bc5b4a608c9abe3b9febb5b6bd592 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/avrmcufriend.h @@ -0,0 +1,3 @@ +/* an AVR ARDUINO (UNO or MEGA) with a parallel TFT */ +#define DISPLAYCANSCROLL +#define ARDUINOMCUFRIEND diff --git a/data/Basic2/IoTBasic/boards/duetft.h b/data/Basic2/IoTBasic/boards/duetft.h new file mode 100644 index 0000000000000000000000000000000000000000..862d34eb8ebda21c419a852be92fea274d647956 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/duetft.h @@ -0,0 +1,16 @@ +/* + * DUE with a TFT shield, standalone by default + */ +#undef ARDUINOEEPROM +#define ARDUINOPS2 +#undef ARDUINOUSBKBD +#define DISPLAYCANSCROLL +#define ARDUINOTFT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define ARDUINORTC +#define PS2DATAPIN 9 +#define PS2IRQPIN 8 +#define SDPIN 53 +#define STANDALONE diff --git a/data/Basic2/IoTBasic/boards/dummy.h b/data/Basic2/IoTBasic/boards/dummy.h new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/data/Basic2/IoTBasic/boards/esp01board.h b/data/Basic2/IoTBasic/boards/esp01board.h new file mode 100644 index 0000000000000000000000000000000000000000..92543b14feb91c3a34fe850716f28c85452a11ca --- /dev/null +++ b/data/Basic2/IoTBasic/boards/esp01board.h @@ -0,0 +1,25 @@ +i/* an ESP01 board, using the internal flash + * with the ESP01-8266 only pins 0 and 2 are usable freely + * on ESP01-ESP32C3 this is 9 and 2 while 2 is an analog pin + * 9 cannot be pulled on low by any peripheral on boot because this + * brings the board to flash mode + */ +#undef ARDUINOEEPROM +#define ESPSPIFFS +#define ARDUINOMQTT +#define ARDUINOWIRE +#if defined(ARDUINOWIRE) && defined(ARDUINO_ARCH_ESP8266) +#define SDA_PIN 0 +#define SCL_PIN 2 +#endif +/* see: https://github.com/espressif/arduino-esp32/issues/6376 + * nothing should block the port, e.g. DHT or anything + */ +#if defined(ARDUINOWIRE) && defined(ARDUINO_ARCH_ESP32) +#define SDA_PIN 9 +#define SCL_PIN 2 +#endif +/* + * + * Currently only 8=SDA and 9=SCL works / tested with AHT10 + */ diff --git a/data/Basic2/IoTBasic/boards/esp32board.h b/data/Basic2/IoTBasic/boards/esp32board.h new file mode 100644 index 0000000000000000000000000000000000000000..1af301737f3760dab85b4b994f2af8ff8228a9a9 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/esp32board.h @@ -0,0 +1,13 @@ +/* an ESP32 board with an ILI9488 display, + some SD problems here with some hardware */ +#define ILI_CS 12 +#define ILI_DC 27 +#define ILI_RST 14 +#define ILI_LED 26 +#undef ARDUINOPICOSERIAL +#define ESPSPIFFS +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#define ARDUINOEEPROM +#define ARDUINOMQTT +#define ARDUINOWIRE diff --git a/data/Basic2/IoTBasic/boards/esp32cam.h b/data/Basic2/IoTBasic/boards/esp32cam.h new file mode 100644 index 0000000000000000000000000000000000000000..7ac07d11f3a1826d169741a75ebcd6ee64796cc0 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/esp32cam.h @@ -0,0 +1,3 @@ +/* the ESP32 camera */ +/* needs an MMC SD card and has its own drivers */ +#define ESPSDCAM diff --git a/data/Basic2/IoTBasic/boards/megaboard.h b/data/Basic2/IoTBasic/boards/megaboard.h new file mode 100644 index 0000000000000000000000000000000000000000..b176060fff22330264a80fe2ae268f1497473035 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/megaboard.h @@ -0,0 +1,14 @@ +/* + * A board for the MEGA with 64 kB RAM, SD Card, and real time clock + */ +#undef ARDUINOPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define ARDUINOPRT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINORTC +#define ARDUINOSPIRAM +#define RAMPIN 53 +#define SDPIN 49 diff --git a/data/Basic2/IoTBasic/boards/megashield.h b/data/Basic2/IoTBasic/boards/megashield.h new file mode 100644 index 0000000000000000000000000000000000000000..88f206b6128390006e000cdc2e62e715e532a9a4 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/megashield.h @@ -0,0 +1,13 @@ +/* + * Mega with a Ethernet shield + * standalone capable, Ethernet is not enabled by default + */ +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define SDPIN 4 +//#define ARDUINOETH diff --git a/data/Basic2/IoTBasic/boards/megatft.h b/data/Basic2/IoTBasic/boards/megatft.h new file mode 100644 index 0000000000000000000000000000000000000000..918be5fb282d0efb75612b4feafa4be0a5739446 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/megatft.h @@ -0,0 +1,14 @@ +/* + * MEGA with a TFT shield, standalone by default + */ +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOTFT +#define ARDUINOSD +#define ARDUINOWIRE +#define ARDUINOPRT +#define PS2DATAPIN 18 +#define PS2IRQPIN 19 +#define SDPIN 53 +#define STANDALONE diff --git a/data/Basic2/IoTBasic/boards/mkr1010board.h b/data/Basic2/IoTBasic/boards/mkr1010board.h new file mode 100644 index 0000000000000000000000000000000000000000..973e59930ec1e572553b7fc6d89e28c78a8b4345 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/mkr1010board.h @@ -0,0 +1,18 @@ +/* a board based on the Arduino MKR 1010 Wifi + * made for low energy games + */ +#define ILI_CS 7 +#define ILI_DC 4 +#define ILI_RST 6 +#define ILI_LED A3 +#undef ARDUINOPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#define ARDUINOEFS +#define ARDUINOMQTT +#define ARDUINOWIRE +/* EEPROM emulation is possible, takes 2k of memory */ +#undef ARDUINOEEPROM +/* careful with the setting, lockout possible easily */ +#undef ARDUINOUSBKBD +#undef STANDALONE diff --git a/data/Basic2/IoTBasic/boards/nanoboard.h b/data/Basic2/IoTBasic/boards/nanoboard.h new file mode 100644 index 0000000000000000000000000000000000000000..a1bacae7424d979b9b1e31ecf98b0bcf976696ff --- /dev/null +++ b/data/Basic2/IoTBasic/boards/nanoboard.h @@ -0,0 +1,14 @@ +/* + *Arduino Nano Every board with PS2 keyboard and sensor + */ +#undef ARDUINOPICOSERIAL +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOEEPROM +#define ARDUINOPRT +#define ARDUINOEFS +#define ARDUINORTC +#define ARDUINOWIRE +#define EFSEEPROMADDR 0x050 /* use clock EEPROM 0x057, set to 0x050 for external EEPROM */ +#define STANDALONE diff --git a/data/Basic2/IoTBasic/boards/rp2040board.h b/data/Basic2/IoTBasic/boards/rp2040board.h new file mode 100644 index 0000000000000000000000000000000000000000..776e5922ee8f775b6bf0a34b5ea4882f66f451a7 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/rp2040board.h @@ -0,0 +1,14 @@ +/* an RP2040 based board with an ILI9488 display */ +#undef ARDUINOPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#undef ARDUINOEEPROM +#define ARDUINOI2CEEPROM +#define ARDUINOPRT +#define ARDUINOSD +#undef RP2040LITTLEFS +#define ARDUINOWIRE +#define ARDUINORTC +#define ARDUINOPS2 +#define ARDUINOMQTT +#define STANDALONE diff --git a/data/Basic2/IoTBasic/boards/rp2040board2.h b/data/Basic2/IoTBasic/boards/rp2040board2.h new file mode 100644 index 0000000000000000000000000000000000000000..ad6ac7dbabf5d33871670b829d56584b5110cc72 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/rp2040board2.h @@ -0,0 +1,17 @@ +/* an RP2040 Raspberry Pi Pico based board with an ILI9488 display */ +#undef ARDUINOPICOSERIAL +#define DISPLAYCANSCROLL +#define ARDUINOILI9488 +#undef ARDUINOEEPROM +#undef ARDUINOPRT +#undef ARDUINOSD +#define RP2040LITTLEFS +#undef ARDUINOWIRE +#undef ARDUINORTC +#undef ARDUINOPS2 +#undef ARDUINOMQTT +#undef STANDALONE +#define ILI_LED A2 +#define ILI_CS 15 +#define ILI_RST 14 +#define ILI_DC 13 diff --git a/data/Basic2/IoTBasic/boards/tdeck.h b/data/Basic2/IoTBasic/boards/tdeck.h new file mode 100644 index 0000000000000000000000000000000000000000..ce44afb4fa88856152ae38da658d80ad36b66cc2 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/tdeck.h @@ -0,0 +1,69 @@ +i/* + * The Liligo T-Deck configuration + * supports the internal FFAT right now, SD not yet done + */ +/* these are the PIN definition from Lilygos utilities.h file */ +#define BOARD_POWERON 10 +#define BOARD_I2S_WS 5 +#define BOARD_I2S_BCK 7 +#define BOARD_I2S_DOUT 6 +#define BOARD_I2C_SDA 18 +#define BOARD_I2C_SCL 8 +#define BOARD_BAT_ADC 4 +#define BOARD_TOUCH_INT 16 +#define BOARD_KEYBOARD_INT 46 +#define BOARD_SDCARD_CS 39 +#define BOARD_TFT_CS 12 +#define RADIO_CS_PIN 9 +#define BOARD_TFT_DC 11 +#define BOARD_TFT_BACKLIGHT 42 +#define BOARD_SPI_MOSI 41 +#define BOARD_SPI_MISO 38 +#define BOARD_SPI_SCK 40 +#define BOARD_TBOX_G02 2 +#define BOARD_TBOX_G01 3 +#define BOARD_TBOX_G04 1 +#define BOARD_TBOX_G03 15 +#define BOARD_ES7210_MCLK 48 +#define BOARD_ES7210_LRCK 21 +#define BOARD_ES7210_SCK 47 +#define BOARD_ES7210_DIN 14 +#define RADIO_BUSY_PIN 13 +#define RADIO_RST_PIN 17 +#define RADIO_DIO1_PIN 45 +#define BOARD_BOOT_PIN 0 +#define BOARD_BL_PIN 42 +#define BOARD_GPS_TX_PIN 43 +#define BOARD_GPS_RX_PIN 44 +#ifndef RADIO_FREQ +#define RADIO_FREQ 868.0 +#endif +#ifndef RADIO_BANDWIDTH +#define RADIO_BANDWIDTH 125.0 +#endif +#ifndef RADIO_SF +#define RADIO_SF 10 +#endif +#ifndef RADIO_CR +#define RADIO_CR 6 +#endif +#ifndef RADIO_TX_POWER +#define RADIO_TX_POWER 22 +#endif +#define DEFAULT_OPA 100 +/* and now the BASIC stuff begins */ +/* either use the buildin FAT as a file system */ +#undef ESP32FAT +/* or the SD card */ +#define ARDUINOSD +#define SDPIN BOARD_SDCARD_CS +/* the display */ +#define TFTESPI +#define DISPLAYCANSCROLL +/*the keyboard */ +#define ARDUINOI2CKBD +#define SDA_PIN BOARD_I2C_SDA +#define SCL_PIN BOARD_I2C_SCL +#define I2CKBDADDR 0x55 +/* can run standalone now */ +#define STANDALONE diff --git a/data/Basic2/IoTBasic/boards/ttgovga.h b/data/Basic2/IoTBasic/boards/ttgovga.h new file mode 100644 index 0000000000000000000000000000000000000000..b4ae2039ee3be242529048b210601725f813fe76 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/ttgovga.h @@ -0,0 +1,75 @@ +/* + * VGA system with SD card, based on the TTGO VGA 1.4 + * ESP32 + * standalone by default, with MQTT + */ +#define ARDUINOEEPROM +#define ARDUINOVGA +#define ARDUINOSD +#define SDPIN 13 +#define STANDALONE +/* + * This is a large screen with 48 kB memory, good fonts. + * with these settings a circle is round in my old 4:3 TFT. + * should work for most situations. Ideally the canvas + * matches the TFT screen resolution. + * + * Set COLUMNS and ROW for a smaller terminal. + * + * The font is set automatically. Can be changed here for + * smaller terminals. + */ +#define TTGOVGACONTROLLER VGA16Controller +#define TTGOVGARESOLUTION VGA_512x384_60Hz +#define TTGOVGAFONT FONT_8x16 +#define TTGOVGACOLUMNS -1 +#define TTGOVGAROWS -1 +#define MEMSIZE 48000 +#undef ARDUINOMQTT +// Runnings configs: +/* VGA4 and network - flickery screen 640*480 */ +/* +#define TTGOVGACONTROLLER VGA4Controller +#define TTGOVGACOLUMNS -1 +#define TTGOVGAROWS -1 +#define MEMSIZE 48000 +#define ARDUINOMQTT +*/ +/* VGA4 and network - flickery screen 640*480 */ +/* +#define TTGOVGACONTROLLER VGA4Controller +#define TTGOVGARESOLUTION VGA_512x384_60Hz +#define TTGOVGACOLUMNS -1 +#define TTGOVGAROWS -1 +#define MEMSIZE 64000 +#define ARDUINOMQTT +*/ +/* VGA16, no network, stable sreen 640*480 */ +/* +#define TTGOVGACONTROLLER VGA16Controller +#define TTGOVGACOLUMNS -1 +#define TTGOVGAROWS -1 +#define MEMSIZE 32000 +#undef ARDUINOMQTT +*/ +/* full VGA controller at 320*200 an 32 kB */ +/* +#define TTGOVGACONTROLLER VGAController +#define TTGOVGARESOLUTION VGA_320x200_75HzRetro +#define TTGOVGAFONT FONT_8x8 +#define TTGOVGACOLUMNS -1 +#define TTGOVGAROWS -1 +#define MEMSIZE 32000 +#undef ARDUINOMQTT +*/ +/* A 4:3 screen with full VGA */ +/* +#define TTGOVGACONTROLLER VGAController +#define TTGOVGARESOLUTION VGA_400x300_60Hz +#define TTGOVGAFONT FONT_8x8 +#define TTGOVGACOLUMNS -1 +#define TTGOVGAROWS -1 +#define MEMSIZE 32000 +#undef ARDUINOMQTT +*/ + diff --git a/data/Basic2/IoTBasic/boards/unoboard.h b/data/Basic2/IoTBasic/boards/unoboard.h new file mode 100644 index 0000000000000000000000000000000000000000..ad6230384b187ad6aff93cd96fd69468f7e22169 --- /dev/null +++ b/data/Basic2/IoTBasic/boards/unoboard.h @@ -0,0 +1,7 @@ +/* a UNO shield with memory and EFS EEPROM */ +#define ARDUINOEEPROM +#define ARDUINOSPIRAM +#define ARDUINOEFS +#define ARDUINOWIRE +#define EFSEEPROMADDR 0x050 +#define EFSEEPROMSIZE 65534 diff --git a/data/Basic2/IoTBasic/boards/wemosshield.h b/data/Basic2/IoTBasic/boards/wemosshield.h new file mode 100644 index 0000000000000000000000000000000000000000..39e18943d23bcdce2a6823d87146c97dd0e2b98d --- /dev/null +++ b/data/Basic2/IoTBasic/boards/wemosshield.h @@ -0,0 +1,15 @@ +/* + * a Wemos ESP8266 with a mdified datalogger shield + * standalone capable, with Wire and MQTT. + */ +#define ARDUINOEEPROM +#define ARDUINOPS2 +#define DISPLAYCANSCROLL +#define ARDUINOLCDI2C +#define ARDUINOSD +#define ARDUINORTC +#define ARDUINOWIRE +#define SDPIN D8 +#define PS2DATAPIN D2 +#define PS2IRQPIN D9 +#define ARDUINOMQTT diff --git a/data/Basic2/IoTBasic/buildin/buildin-arduinotest.h b/data/Basic2/IoTBasic/buildin/buildin-arduinotest.h new file mode 100644 index 0000000000000000000000000000000000000000..2dd89234b93bafb3ed7bcef415b7f88b6ee9734f --- /dev/null +++ b/data/Basic2/IoTBasic/buildin/buildin-arduinotest.h @@ -0,0 +1,84 @@ +const char buildin_pgm1[] PROGMEM = { +"10 REM Test program for integer BASICs\n" +"100 PRINT \"*** Core language features ***\"\n" +"110 A=5: B=19: C=A-B: D=A+B: E=A*B: F=INT(B/A)\n" +"120 PRINT \"Math:\"\n" +"130 PRINT A,B,C,D,E,F\n" +"140 PRINT A,B,A-B,A+B,A*B,INT(B/A)\n" +"150 PRINT \"5 19 -14 24 95 3\"\n" +"200 PRINT \"Loop and GOTO:\"\n" +"210 FOR I=1 TO 10\n" +"220 PRINT I,\n" +"230 NEXT: PRINT \n" +"240 FOR I=1\n" +"250 PRINT I,: IF I=10 BREAK\n" +"260 NEXT: PRINT\n" +"270 I=1\n" +"280 PRINT I,: I=I+1: IF I<=10: GOTO 280\n" +"290 PRINT\n" +"300 PRINT \"GOSUB and RETURN\"\n" +"310 GOSUB 340\n" +"320 PRINT \"Returned\"\n" +"330 GOTO 400\n" +"340 PRINT \"In GOSUB\"\n" +"350 RETURN\n" +"400 PRINT \"Functions\"\n" +"410 A=-1: B=1: @R=1\n" +"420 PRINT SGN(A), SGN(B), ABS(A), RND(10)\n" +"430 PRINT \"-1 1 1\"\n" +"500 PRINT \"*** Arduino features ***\"\n" +"510 PRINT \"Blink\"\n" +"520 PINM LED, 1\n" +"530 FOR I=1 TO 4: DWRITE LED, 1: DELAY 200: DWRITE LED, 0: NEXT\n" +"540 PRINT \"Time\"\n" +"550 PRINT MILLIS(1): DELAY 200: PRINT MILLIS(1)\n" +"560 PRINT \"EEPROM\"\n" +"570 PRINT \"Size:\", @E\n" +"580 FOR I=1 TO 4: PRINT I, @E(I): NEXT\n" +"590 @E(1)=10: PRINT \"10=\",@E(1)\n" +"600 PRINT \"*** Dartmouth features ***\"\n" +"610 DEF FNF(X)=X*X \n" +"620 X=5: PRINT \"X=\", X \n" +"630 PRINT \"FNF(7)=\", FNF(7)\n" +"640 PRINT \"X=\",X \n" +"650 FOR I=1 TO 3\n" +"660 ON I GOSUB 700, 710, 720\n" +"670 NEXT\n" +"680 GOTO 800\n" +"700 PRINT \"One\": RETURN\n" +"710 PRINT \"Two\": RETURN\n" +"720 PRINT \"Three\": RETURN\n" +"730 DATA \"Hello\", \"World\", 31414\n" +"800 READ A$, B$: PRINT A$,B$\n" +"810 READ A: PRINT \"PI is\",A\n" +"820 PRINT \"DATA pointer is\", DATA\n" +"900 PRINT \"*** Strings ***\"\n" +"910 A$=\"Hello World\"\n" +"920 PRINT A$, \":\", LEN(A$)\n" +"930 FOR I=1 TO LEN(A$)\n" +"940 PRINT TAB(I-1);A$(I)\n" +"950 NEXT\n" +"960 FOR I=1 TO LEN(A$)\n" +"970 PRINT A$(1,I)\n" +"980 NEXT\n" +"990 B$=\"Arduino says \"\n" +"1000 B$=B$+A$: PRINT B$\n" +"1010 B$=STR$(A): PRINT \"PI is\", B$\n" +"1020 B=VAL(B$): PRINT \"PI is\", B \n" +"1030 PRINT \"String length pointer is\", @V\n" +"1040 FOR I=1 TO 5\n" +"1050 PRINT TAB(I-1);MID$(A$,I,LEN(A$)-2*I+1)\n" +"1060 NEXT\n" +"1070 FOR I=1 TO 5: PRINT LEFT$(A$,I): NEXT\n" +"1080 FOR I=1 TO 5: PRINT TAB(5-I);RIGHT$(A$,I): NEXT\n" +"\f" +}; +const char buildin_pgm1_name[] PROGMEM = "*corep.bas"; +const char* const buildin_programs[] PROGMEM = { +buildin_pgm1, +0 +}; +const char* const buildin_program_names[] PROGMEM = { +buildin_pgm1_name, +0 +}; diff --git a/data/Basic2/IoTBasic/buildin/buildin-games.h b/data/Basic2/IoTBasic/buildin/buildin-games.h new file mode 100644 index 0000000000000000000000000000000000000000..f70ce0d4d10965f4c05dfc8bf9df90ed188eaefd --- /dev/null +++ b/data/Basic2/IoTBasic/buildin/buildin-games.h @@ -0,0 +1,324 @@ +const char buildin_pgm1[] PROGMEM = { +"10 REM \"TIC TAC TOE from 101 BASIC games\"\n" +"20 REM \"by David Ahl.\"\n" +"30 REM \"Ported to Stefan's BASIC in 2021\"\n" +"40 REM \"The machine goes first\"\n" +"100 PRINT \"Welcome to tictactoe\"\n" +"110 PRINT \"The game board is numbered:\"\n" +"120 PRINT\n" +"130 PRINT \"1 2 3\"\n" +"140 PRINT \"8 9 4\"\n" +"150 PRINT \"7 6 5\"\n" +"160 PRINT\n" +"200 REM \"Main Program\"\n" +"210 PRINT \"Staring a new game\"\n" +"230 A=9\n" +"240 M=A\n" +"250 GOSUB 800 \n" +"260 P=M\n" +"270 B=P%8+1\n" +"280 M=B\n" +"290 GOSUB 800 \n" +"300 Q=M\n" +"310 IF Q=(B+3)%8+1 GOTO 360\n" +"320 C=(B+3)%8+1\n" +"330 M=C\n" +"340 GOSUB 900 \n" +"350 GOTO 640 \n" +"360 C=(B+1)%8+1\n" +"370 M=C\n" +"380 GOSUB 800 \n" +"390 R=M\n" +"400 IF R=(C+3)%8+1 GOTO 450\n" +"410 D=(C+3)%8+1\n" +"420 M=D\n" +"430 GOSUB 900\n" +"440 GOTO 640 \n" +"450 IF P%2<>0 GOTO 500\n" +"460 D=(C+6)%8+1\n" +"470 M=D\n" +"480 GOSUB 900\n" +"490 GOTO 640 \n" +"500 D=(C+2)%8+1\n" +"510 M=D\n" +"520 GOSUB 800 \n" +"530 S=M\n" +"540 IF S=(D+3)%8+1 GOTO 590\n" +"550 E=(D+3)%8+1\n" +"560 M=E\n" +"570 GOSUB 900\n" +"580 REM \"Game is a draw\"\n" +"590 E=(D+5)%8+1\n" +"600 M=E\n" +"610 GOSUB 900\n" +"620 PRINT \"The game is a draw.\"\n" +"630 GOTO 200\n" +"640 PRINT \"and wins! ********\"\n" +"650 GOTO 200\n" +"800 REM \"Subroutine to ask user for the move\"\n" +"810 GOSUB 900\n" +"820 INPUT \"Your move? \", M\n" +"830 RETURN\n" +"900 REM \"Subroutine to display move\"\n" +"910 PRINT \"Computer moves:\",M\n" +"920 RETURN\n" +"\f" +}; +const char buildin_pgm1_name[] PROGMEM = "*tictac.bas"; +const char buildin_pgm2[] PROGMEM = { +"10 REM \"Rocket from 101 Basic Games\"\n" +"20 REM \"Ported to Stefan's BASIC in 2021\"\n" +"30 PRINT\n" +"100 PRINT \"LUNAR LANDING SIMULATION\"\n" +"110 PRINT \"----- ------- ----------\":PRINT \n" +"120 INPUT \"DO YOU WANT INSTRUCTIONS (YES OR NO)? \";A$\n" +"130 IF A$(1,1)=\"N\" OR A$(1,1)=\"n\" THEN 390\n" +"140 CLS \n" +"150 PRINT \n" +"200 PRINT \"YOU ARE LANDING ON THE MOON AND AND HAVE\"\n" +"210 PRINT \"TAKEN OVER MANUAL CONTROL 1000 FEET\"\n" +"215 PRINT \"ABOVE A GOOD LANDING SPOT.\": PRINT \n" +"220 PRINT \"YOU HAVE A DOWNWARD VELOCITY OF 50 FEET/SEC.\"\n" +"225 PRINT \"150 UNITS OF FUEL REMAIN.\": PRINT \n" +"230 PRINT \"HERE ARE THE RULES THAT GOVERN YOUR DESCENT\"\n" +"240 PRINT \"(1) AFTER EACH SECOND THE HEIGHT, VELOCITY, AND\"\n" +"250 PRINT \" REMAINING FUEL WILL BE REPORTED BY YOUR\"\n" +"255 PRINT \" ON-BOARD COMPUTER.\"\n" +"260 PRINT \"(2) AFTER THE REPORT A '?' WILL APPEAR. ENTER\"\n" +"270 PRINT \" THE NUMBER OF UNITS OF FUEL YOU WISH TO BURN\"\n" +"280 PRINT \" DURING THE NEXT SECOND. EACH UNIT OF FUEL\"\n" +"285 PRINT \" WILL SLOW YOUR DESCENT BY 1 FOOT/SEC.\"\n" +"310 PRINT \"(3) THE MAXIMUM THRUST OF YOUR ENGINE IS \"\n" +"315 PRINT \" 30 FEET/SEC/SEC OR 30 UNITS OF FUEL\"\n" +"320 PRINT \" PER SECOND.\"\n" +"330 PRINT \"(4) WHEN YOU CONTACT THE LUNAR SURFACE. YOUR \"\n" +"340 PRINT \" DESCENT ENGINE WILL AUTOMATICALLY SHUT DOWN\"\n" +"345 PRINT \" AND YOU WILL BE GIVEN A REPORT OF YOUR \"\n" +"350 PRINT \" LANDING SPEED AND REMAINING FUEL.\"\n" +"360 PRINT \"(5) IF YOU RUN OUT OF FUEL THE '?' WILL NO\"\n" +"370 PRINT \" LONGER APPEAR BUT YOUR SECOND BY SECOND\"\n" +"380 PRINT \" REPORT WILL CONTINUE UNTIL YOU CONTACT THE\"\n" +"385 PRINT \" LUNAR SURFACE.\":PRINT \n" +"390 PRINT \"BEGINNING LANDING PROCEDURE..........\":PRINT \n" +"400 PRINT \"G O O D L U C K ! ! !\"\n" +"420 PRINT\n" +"425 INPUT \"Read to go - press return \", A$\n" +"426 CLS \n" +"430 PRINT \"SEC FEET SPEED FUEL \"\n" +"450 PRINT\n" +"455 T=0: H=1000: V=50: F=150\n" +"490 PRINT #6,T,H,V,F;\" I\";\n" +"495 TAB(H/70): PRINT \"*\"\n" +"500 INPUT B\n" +"510 IF B<0 THEN 650\n" +"520 IF B>30 THEN B=30\n" +"530 IF B>F THEN B=F\n" +"540 V1=V-B+5\n" +"560 F=F-B\n" +"570 H=H-(V+V1)/2\n" +"580 IF H<=0 THEN 670\n" +"590 T=T+1\n" +"600 V=V1\n" +"610 IF F>0 THEN 490\n" +"615 IF B=0 THEN 640\n" +"620 PRINT \"**** OUT OF FUEL ****\"\n" +"640 PRINT #6,T,H,V,F;\" I\";\n" +"645 TAB(H/70): PRINT \"*\"\n" +"650 B=0\n" +"660 GOTO 540\n" +"670 PRINT \"***** CONTACT *****\"\n" +"680 H=H+(V1+V)/2\n" +"690 IF B=5 THEN 720\n" +"700 D=(-V+SQR(V*V+H*(10-2*B)))/(5-B)\n" +"710 GOTO 730\n" +"720 D=H/V\n" +"730 V1=V+(5-B)*D\n" +"760 PRINT \"TOUCHDOWN AT\"; T+D; \"SECONDS.\"\n" +"770 PRINT \"LANDING VELOCITY=\"; V1; \"FEET/SEC.\"\n" +"780 PRINT F; \"UNITS OF FUEL REMAINING.\"\n" +"790 IF V1<>0 THEN 810\n" +"800 PRINT \"CONGRATULATIONS! A PERFECT LANDING!!\"\n" +"805 PRINT \"YOUR LICENSE WILL BE RENEWED.......LATER.\"\n" +"810 IF ABS(V1)<2 THEN 840\n" +"820 PRINT \"***** SORRY, BUT YOU BLEW IT!!!!\"\n" +"830 PRINT \"APPROPRIATE CONDOLENCES WILL BE SENT TO YOUR NEXT OF KIN.\"\n" +"840 PRINT\n" +"850 INPUT \"ANOTHER MISSION? \"; A$\n" +"860 IF A$(1,1)=\"Y\" OR A$(1,1)=\"y\" THEN 390\n" +"870 PRINT: PRINT \"CONTROL OUT.\": PRINT \n" +"999 END \n" +"\f" +}; +const char buildin_pgm2_name[] PROGMEM = "*rocket.bas"; +const char buildin_pgm3[] PROGMEM = { +"100 REM \"NIM\"\n" +"110 REM \"Ported by Stefan in 2022\"\n" +"120 REM\n" +"210 DIM A(100),B(100,11),D(2)\n" +"220 PRINT \"THIS IS THE GAME OF NIM.\"\n" +"230 PRINT \"DO YOU WANT INSTRUCTIONS\";\n" +"240 INPUT Z$\n" +"250 IF Z$=\"NO\" THEN 440\n" +"260 IF Z$=\"no\" THEN 440\n" +"270 IF Z$=\"YES\" THEN 310\n" +"280 IF Z$=\"yes\" THEN 310\n" +"290 PRINT \"PLEASE ANSWER YES OR NO\"\n" +"300 GOTO 240\n" +"310 PRINT \"THE GAME IS PLAYED WITH A NUMBER OF PILES OF OBJECTS.\"\n" +"320 PRINT \"ANY NUMBER OF OBJECTS ARE REMOVED FROM ONE PILE BY YOU AND\"\n" +"330 PRINT \"THE MACHINE ALTERNATELY. ON YOUR TURN, YOU MAY TAKE\"\n" +"340 PRINT \"ALL THE OBJECTS THAT REMAIN IN ANY PILE, BUT YOU MUST\"\n" +"350 PRINT \"TAKE AT LEAST ONE OBJECT, AND YOU MAY TAKE OBJECTS FROM\"\n" +"360 PRINT \"ONLY ONE PILE ON A SINGLE TURN. YOU MUST SPECIFY WHETHER\"\n" +"370 PRINT \"WINNING IS DEFINED AS TAKING OR NOT TAKING THE LAST OBJECT,\"\n" +"380 PRINT \"THE NUMBER OF PILES IN THE GAME, AND HOW MANY OBJECTS ARE\"\n" +"390 PRINT \"ORIGINALLY IN EACH PILE. EACH PILE MAY CONTAIN A\"\n" +"400 PRINT \"DIFFERENT NUMBER OF OBJECTS.\"\n" +"410 PRINT \"THE MACHINE WILL SHOW ITS MOVE BY LISTING EACH PILE AND THE\"\n" +"420 PRINT \"NUMBER OF OBJECTS REMAINING IN THE PILES AFTER EACH OF ITS\"\n" +"430 PRINT \"MOVES.\"\n" +"440 PRINT\n" +"450 PRINT \"ENTER WIN OPTION - 1 TO TAKE LAST, 2 TO AVOID LAST\";\n" +"460 INPUT W\n" +"470 IF W=1 THEN 490\n" +"480 IF W<>2 THEN 450\n" +"490 PRINT \"ENTER NUMBER OF PILES\";\n" +"500 INPUT N\n" +"510 IF N>100 THEN 490\n" +"520 IF N<1 THEN 490\n" +"530 IF N<>INT(N) THEN 490\n" +"540 PRINT \"ENTER PILE SIZES\"\n" +"550 FOR I=1 TO N\n" +"560 PRINT I;\n" +"570 INPUT A(I)\n" +"580 IF A(I)>2000 THEN 560\n" +"590 IF A(I)<1 THEN 560\n" +"600 IF A(I)<>INT(A(I)) THEN 560\n" +"610 NEXT I\n" +"620 PRINT \"DO YOU WANT TO MOVE FIRST\";\n" +"630 INPUT Q9$\n" +"640 IF Q9$=\"YES\" THEN 1450\n" +"650 IF Q9$=\"yes\" THEN 1450\n" +"660 IF Q9$=\"NO\" THEN 700\n" +"670 IF Q9$=\"no\" THEN 700\n" +"680 PRINT \"PLEASE ANSWER YES OR NO.\"\n" +"690 GOTO 630\n" +"700 IF W=1 THEN 940\n" +"710 LET C=0\n" +"720 FOR I=1 TO N\n" +"730 IF A(I)=0 THEN 770\n" +"740 LET C=C+1\n" +"750 IF C=3 THEN 840\n" +"760 LET D(C)=I\n" +"770 NEXT I\n" +"780 IF C=2 THEN 920\n" +"790 IF A(D(1))>1 THEN 820\n" +"800 PRINT \"MACHINE LOSES\"\n" +"810 GOTO 1640\n" +"820 PRINT \"MACHINE WINS\"\n" +"830 GOTO 1640\n" +"840 LET C=0\n" +"850 FOR I=1 TO N\n" +"860 IF A(I)>1 THEN 940\n" +"870 IF A(I)=0 THEN 890\n" +"880 LET C=C+1\n" +"890 NEXT I\n" +"900 IF C/2<>INT(C/2) THEN 800\n" +"910 GOTO 940\n" +"920 IF A(D(1))=1 THEN 820\n" +"930 IF A(D(2))=1 THEN 820\n" +"940 FOR I=1 TO N\n" +"950 LET E=A(I)\n" +"960 FOR J=0 TO 10\n" +"970 LET F=E/2\n" +"980 LET B(I,J+1)=2*(F-INT(F))\n" +"990 LET E=INT(F)\n" +"1000 NEXT J\n" +"1010 NEXT I\n" +"1020 FOR J=10 TO 0 STEP -1\n" +"1030 LET C=0\n" +"1040 LET H=0\n" +"1050 FOR I=1 TO N\n" +"1060 IF B(I,J+1)=0 THEN 1110\n" +"1070 LET C=C+1\n" +"1080 IF A(I)<=H THEN 1110\n" +"1090 LET H=A(I)\n" +"1100 LET G=I\n" +"1110 NEXT I\n" +"1120 IF C/2<>INT(C/2) THEN 1190\n" +"1130 NEXT J\n" +"1140 LET E=INT(N*RND(1)+1)\n" +"1150 IF A(E)=0 THEN 1140\n" +"1160 LET F=INT(A(E)*RND(1)+1)\n" +"1170 LET A(E)=A(E)-F\n" +"1180 GOTO 1380\n" +"1190 LET A(G)=0\n" +"1200 FOR J=0 TO 10\n" +"1210 LET B(G,J+1)=0\n" +"1220 LET C=0\n" +"1230 FOR I=1 TO N\n" +"1240 IF B(I,J+1)=0 THEN 1260\n" +"1250 LET C=C+1\n" +"1260 NEXT I\n" +"1270 LET A(G)=A(G)+2*(C/2-INT(C/2))*POW(2,J)\n" +"1280 NEXT J\n" +"1290 IF W=1 THEN 1380\n" +"1300 LET C=0\n" +"1310 FOR I=1 TO N\n" +"1320 IF A(I)>1 THEN 1380\n" +"1330 IF A(I)=0 THEN 1350\n" +"1340 LET C=C+1\n" +"1350 NEXT I\n" +"1360 IF C/2<>INT(C/2) THEN 1380\n" +"1370 LET A(G)=1-A(G)\n" +"1380 PRINT \"PILE SIZE\"\n" +"1390 FOR I=1 TO N\n" +"1400 PRINT #8;I,A(I)\n" +"1410 NEXT I\n" +"1420 IF W=2 THEN 1450\n" +"1430 GOSUB 1570\n" +"1440 IF Z=1 THEN 820\n" +"1450 PRINT \"YOUR MOVE - PILE, NUMBER TO BE REMOVED\";\n" +"1460 INPUT X,Y\n" +"1470 IF X>N THEN 1450\n" +"1480 IF X<1 THEN 1450\n" +"1490 IF X<>INT(X) THEN 1450\n" +"1500 IF Y>A(X) THEN 1450\n" +"1510 IF Y<1 THEN 1450\n" +"1520 IF Y<>INT(Y) THEN 1450\n" +"1530 LET A(X)=A(X)-Y\n" +"1540 GOSUB 1570\n" +"1550 IF Z=1 THEN 800\n" +"1560 GOTO 700\n" +"1570 LET Z=0\n" +"1580 FOR I=1 TO N\n" +"1590 IF A(I)=0 THEN 1610\n" +"1600 RETURN\n" +"1610 NEXT I\n" +"1620 LET Z=1\n" +"1630 RETURN\n" +"1640 PRINT \"DO YOU WANT TO PLAY ANOTHER GAME\";\n" +"1650 INPUT Q9$\n" +"1660 IF Q9$=\"YES\" THEN 1720\n" +"1670 IF Q9$=\"yes\" THEN 1720\n" +"1680 IF Q9$=\"NO\" THEN 1730\n" +"1690 IF Q9$=\"no\" THEN 1730\n" +"1700 PRINT \"PLEASE. YES OR NO.\"\n" +"1710 GOTO 1650 \n" +"1720 GOTO 440\n" +"1730 END\n" +"\f" +}; +const char buildin_pgm3_name[] PROGMEM = "*nim.bas"; +const char* const buildin_programs[] PROGMEM = { +buildin_pgm1, +buildin_pgm2, +buildin_pgm3, +0 +}; +const char* const buildin_program_names[] PROGMEM = { +buildin_pgm1_name, +buildin_pgm2_name, +buildin_pgm3_name, +0 +}; diff --git a/data/Basic2/IoTBasic/buildin/buildin-tutorial.h b/data/Basic2/IoTBasic/buildin/buildin-tutorial.h new file mode 100644 index 0000000000000000000000000000000000000000..0e95eb131238a32f1e4732126e076b60ac71d303 --- /dev/null +++ b/data/Basic2/IoTBasic/buildin/buildin-tutorial.h @@ -0,0 +1,288 @@ +const char buildin_pgm1[] PROGMEM = { +"100 REM \"CALCULATING PI FOR HUNDREDS OF DIGITS\"\n" +"110 REM \"THX TO ROSETTACODE.ORG FOR THE BASE OF THE PROGRAM\"\n" +"120 REM \"SHOULD BE A BENCHMARK FOR THE BASIC INTERPRETER/COMPILER\"\n" +"130 REM \"WRITTEN IN 2023 FOR FORUM.CLASSIC-COMPUTING.DE BY PETER DASSOW\"\n" +"135 REM \"Ported to IoT BASIC by Guido Lehwalder\"\n" +"136 REM \"Added some IoT BASIC features - Stefan Lenz, 2023\"\n" +"137 CLS\n" +"140 PRINT \"Calculating Pi as a BASIC benchmark.\"\n" +"150 PRINT \"Enter number of digits: \";\n" +"160 INPUT S$\n" +"170 IF S$=\"\" THEN PRINT \"Nothing done.\": END\n" +"180 N=VAL(S$): IF N<1 THEN PRINT \"Not a valid number.\": GOTO 150\n" +"190 REM \"N DETERMINES ALSO THE ARRAY (ABOUT 3-4 TIMES BIGGER)\"\n" +"200 LN=INT(10*N/3)+16\n" +"204 REM \"@ is the space on the heap for numbers, reserve 64 bytes\"\n" +"205 IF LN>(@-64) THEN PRINT \"Not enough memory\": GOTO 150\n" +"210 ND=1\n" +"220 SM=MILLIS(1)\n" +"225 REM \"Delete the array if already there\"\n" +"230 IF FIND(A())<>0 THEN CLR A()\n" +"235 REM \"Then redim\"\n" +"240 DIM A(LN)\n" +"250 N9=0\n" +"260 PD=0\n" +"270 REM\n" +"280 FOR J=1 TO LN\n" +"290 A(J)=2\n" +"300 NEXT J\n" +"310 REM \"Use of the modulo operator % speeds things up\"\n" +"320 FOR J=1 TO N\n" +"330 Q=0\n" +"340 FOR I=LN TO 1 STEP -1\n" +"350 X=10*A(I)+Q*I\n" +"360 A(I)=X%(2*I-1)\n" +"370 Q=INT(X/(2*I-1))\n" +"380 NEXT I\n" +"390 A(1)=Q%10\n" +"400 Q=INT(Q/10)\n" +"410 IF Q=9 THEN N9=N9+1: GOTO 610\n" +"420 IF Q<>10 THEN GOTO 540\n" +"430 REM \"Q==10\"\n" +"440 D=PD+1: GOSUB 670\n" +"450 IF N9<=0 THEN GOTO 500\n" +"460 FOR K=1 TO N9\n" +"470 D=0: GOSUB 670\n" +"480 NEXT K\n" +"490 REM \"END IF\"\n" +"500 PD=0\n" +"510 N9=0\n" +"520 GOTO 610\n" +"530 REM \"Q<>10\"\n" +"540 D=PD: GOSUB 670\n" +"550 PD=Q\n" +"560 IF N9=0 THEN GOTO 610\n" +"570 FOR K=1 TO N9\n" +"580 D=9: GOSUB 670\n" +"590 NEXT K\n" +"600 N9=0\n" +"610 NEXT J\n" +"620 C$=(\"0\"+PD%10)\n" +"621 PRINT C$\n" +"630 EM=MILLIS(1)-SM\n" +"635 PRINT \"Calculation time \";EM/1000;\" seconds.\"\n" +"640 GOTO 140\n" +"650 REM\n" +"660 REM \"OUTPUT DIGITS\"\n" +"670 C$=(\"0\"+D%10)\n" +"671 IF ND=0 THEN PRINT C$;: RETURN\n" +"680 IF D=0 THEN RETURN\n" +"691 PRINT C$;\".\";\n" +"700 ND=0\n" +"710 RETURN\n" +"\f" +}; +const char buildin_pgm1_name[] PROGMEM = "*cpinew2.bas"; +const char buildin_pgm2[] PROGMEM = { +"10 REM \"Solves the Euler 9 problem \"\n" +"20 REM \"See https://projecteuler.net/problem=9 for details\"\n" +"30 REM \"with a number theoretical approach\"\n" +"100 PRINT \"Enter the circumference K of a triangle\"\n" +"110 PRINT \"The program finds a pythagorean triangle\"\n" +"120 PRINT \"a^2 + b^2 = c^2\"\n" +"130 INPUT \"K= (0 to end) \",K \n" +"140 IF K=0 THEN END \n" +"150 IF K%2=0 THEN U=K/2: GOTO 200 \n" +"160 PRINT \"K is odd, no solution\": GOTO 130 \n" +"200 REM \"Main Program\"\n" +"210 F=0 \n" +"220 X=SQR(U/2)\n" +"230 FOR I=1 TO X \n" +"240 IF U%I<>0 THEN CONT \n" +"250 FOR J=1 TO I \n" +"260 D=I+J \n" +"270 IF U%D<>0 THEN CONT \n" +"280 IF D%2=0 THEN CONT \n" +"290 R=I: Q=J \n" +"300 GOSUB 800 \n" +"310 IF R<>1 THEN CONT \n" +"320 A=I*I-J*J \n" +"330 B=2*I*J \n" +"340 C=I*I+J*J \n" +"350 PRINT \"Primitive triple\",A ,B, C \n" +"360 PRINT \"Circumference=\",A+B+C \n" +"370 S=K/(A+B+C)\n" +"380 PRINT \"Scale with\",S \n" +"390 PRINT \"Solution \",A*S, B*S, C*S \n" +"400 F=1 \n" +"420 NEXT \n" +"430 NEXT \n" +"440 REM \"All solutions found\"\n" +"450 IF F=0 THEN PRINT \"No solution\"\n" +"460 GOTO 130 \n" +"800 REM \"Find GCD\"\n" +"810 IF R=Q THEN RETURN \n" +"820 IF R>Q THEN R=R-Q \n" +"830 IF Q>R THEN Q=Q-R \n" +"840 GOTO 810 \n" +"\f" +}; +const char buildin_pgm2_name[] PROGMEM = "*euler9.bas"; +const char buildin_pgm3[] PROGMEM = { +"10 REM \"Calculates the Fibonacci numbers\"\n" +"20 REM \"And the Golden Ratio on an Integer BASIC\"\n" +"200 REM \"Main program\"\n" +"210 N=19\n" +"220 DIM A(N)\n" +"230 A(1)=1\n" +"240 A(2)=1\n" +"250 FOR I=3 TO N\n" +"260 IF A(I)>16000 THEN BREAK\n" +"270 A(I)=A(I-1)+A(I-2)\n" +"280 Q=A(I): D=A(I-1)\n" +"290 PRINT #4;I,Q,D;\n" +"300 GOSUB 500\n" +"310 NEXT\n" +"320 END\n" +"500 REM \"Print a decimal ratio of a fraction\"\n" +"520 Z=INT(Q/D)\n" +"530 PRINT \" \";Z;\".\";\n" +"540 FOR J=1 TO 10\n" +"550 Z=Q%D\n" +"560 Q=Z*10\n" +"570 Z=INT(Q/D)\n" +"580 PRINT Z;\n" +"590 NEXT\n" +"600 PRINT \" \"\n" +"610 RETURN\n" +"\f" +}; +const char buildin_pgm3_name[] PROGMEM = "*fibo.bas"; +const char buildin_pgm4[] PROGMEM = { +"100 REM \"Calculate the first N prime numbers\"\n" +"110 REM \"and output them!\"\n" +"200 CLR \n" +"210 INPUT \"How many primes (0=stop)? \", N \n" +"220 IF N=0 THEN 500\n" +"230 DIM P(N): P(1)=2: P(2)=3: I=2 \n" +"240 IF I=N THEN 360\n" +"250 K=P(I)\n" +"260 K=K+2 \n" +"270 L=SQR(K)\n" +"280 J=1 \n" +"290 D=P(J)\n" +"310 M=K%D \n" +"320 IF M=0 THEN 260\n" +"330 IF D0 GOTO 500\n" +"460 D=(C+6)%8+1\n" +"470 M=D\n" +"480 GOSUB 900\n" +"490 GOTO 640 \n" +"500 D=(C+2)%8+1\n" +"510 M=D\n" +"520 GOSUB 800 \n" +"530 S=M\n" +"540 IF S=(D+3)%8+1 GOTO 590\n" +"550 E=(D+3)%8+1\n" +"560 M=E\n" +"570 GOSUB 900\n" +"580 REM \"Game is a draw\"\n" +"590 E=(D+5)%8+1\n" +"600 M=E\n" +"610 GOSUB 900\n" +"620 PRINT \"The game is a draw.\"\n" +"630 GOTO 200\n" +"640 PRINT \"and wins! ********\"\n" +"650 GOTO 200\n" +"800 REM \"Subroutine to ask user for the move\"\n" +"810 GOSUB 900\n" +"820 INPUT \"Your move? \", M\n" +"830 RETURN\n" +"900 REM \"Subroutine to display move\"\n" +"910 PRINT \"Computer moves:\",M\n" +"920 RETURN\n" +"\f" +}; +const char buildin_pgm6_name[] PROGMEM = "*tictac.bas"; +const char* const buildin_programs[] PROGMEM = { +buildin_pgm1, +buildin_pgm2, +buildin_pgm3, +buildin_pgm4, +buildin_pgm5, +buildin_pgm6, +0 +}; +const char* const buildin_program_names[] PROGMEM = { +buildin_pgm1_name, +buildin_pgm2_name, +buildin_pgm3_name, +buildin_pgm4_name, +buildin_pgm5_name, +buildin_pgm6_name, +0 +}; diff --git a/data/Basic2/IoTBasic/buildin/buildin.h b/data/Basic2/IoTBasic/buildin/buildin.h new file mode 100644 index 0000000000000000000000000000000000000000..253df91dc931316e96daf5a8526aa1dc5c47ce1f --- /dev/null +++ b/data/Basic2/IoTBasic/buildin/buildin.h @@ -0,0 +1,41 @@ +/* + * This is the demo code for the buildin programs. + * + * Format of the buildin program store: + * + * programs are one long string terminated by FF \f. + * lines are terminated by newline. + * + * Programs can have any name, * as a prefix is used to + * distinguish them from other programs. This is not yet + * implemented. + */ + +const char buildin_pgm1[] PROGMEM = { + "10 print \"hello world\"\n" + "20 end\n" + "\f" +}; + +const char buildin_pgm1_name[] PROGMEM = "*hello.bas"; + +const char buildin_pgm2[] PROGMEM = { + "10 PI=22000/7\n" + "20 PRINT 'PI=',INT(PI)\n" + "30 END\n" + "\f" +}; + +const char buildin_pgm2_name[] PROGMEM = "*pi.bas"; + +const char* const buildin_programs[] PROGMEM = { + buildin_pgm1, + buildin_pgm2, + 0 +}; + +const char* const buildin_program_names[] PROGMEM = { + buildin_pgm1_name, + buildin_pgm2_name, + 0 +}; diff --git a/data/Basic2/IoTBasic/font/firasans.h b/data/Basic2/IoTBasic/font/firasans.h new file mode 100644 index 0000000000000000000000000000000000000000..81c6791a528ec08b7af3114a72f97204b783bf0a --- /dev/null +++ b/data/Basic2/IoTBasic/font/firasans.h @@ -0,0 +1,8199 @@ +#pragma once +#include "epd_driver.h" +const uint8_t FiraSansBitmaps[120056] = { + 0x78, 0x9C, 0x03, 0x00, 0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98, 0x05, 0x42, 0x37, 0x00, 0xBD, 0x00, 0x75, 0xE6, 0x7F, 0x88, 0xB6, 0x2F, 0xFF, 0xA1, + 0xCE, 0x83, 0x8B, 0xC0, 0xD5, 0x30, 0x94, 0x80, 0x75, 0x01, 0x00, 0xF7, 0x0D, 0x48, 0x41, 0x78, + 0x9C, 0x5D, 0x92, 0xBB, 0x4B, 0x03, 0x41, 0x10, 0xC6, 0x27, 0x46, 0x34, 0x26, 0x3E, 0xAE, 0xB7, + 0x30, 0xA0, 0x60, 0xA7, 0x87, 0x20, 0x08, 0x16, 0x11, 0x1B, 0x9B, 0x80, 0x27, 0xF6, 0x26, 0x85, + 0x20, 0x56, 0xBE, 0xC0, 0x36, 0xFE, 0x07, 0xA6, 0xB1, 0x14, 0x05, 0x4B, 0x91, 0x20, 0x76, 0x36, + 0xDA, 0x89, 0x8D, 0x97, 0xDE, 0xE2, 0xA2, 0x88, 0xED, 0xC5, 0xF8, 0x40, 0xBD, 0x64, 0x3F, 0x67, + 0x76, 0xB3, 0x9E, 0x66, 0x8A, 0xB9, 0x9D, 0xDF, 0xCD, 0xE3, 0xDB, 0xB9, 0x23, 0x32, 0xB6, 0xBC, + 0xBB, 0x36, 0x4D, 0x7F, 0x6D, 0xBB, 0x09, 0x36, 0x7F, 0x3C, 0x26, 0x27, 0x68, 0xDB, 0xAC, 0x25, + 0x65, 0x0E, 0x82, 0xD3, 0xCB, 0x16, 0x3F, 0x52, 0x86, 0x64, 0x5B, 0x08, 0x67, 0xE4, 0xB0, 0xA3, + 0x10, 0x24, 0x34, 0x7A, 0x45, 0xD8, 0x63, 0x5E, 0x16, 0x15, 0x26, 0xE4, 0xE9, 0x02, 0xC3, 0xB6, + 0xC5, 0xB9, 0x49, 0x7B, 0xC0, 0x51, 0x3C, 0x28, 0x42, 0xFA, 0xD7, 0x93, 0xA3, 0xBB, 0x54, 0xB1, + 0x48, 0xE4, 0x21, 0x90, 0xF3, 0x0D, 0x70, 0x98, 0x94, 0x2E,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 0x35, 0x40, 0xC6, 0xD7, 0xFF, 0x5C, + 0x0C, 0x60, 0xF0, 0x13, 0x24, 0x0F, 0x02, 0xBF, 0xFE, 0x33, 0xC3, 0x18, 0x4C, 0xD8, 0x19, 0x3F, + 0x41, 0xA6, 0xFC, 0xCF, 0x87, 0x31, 0xFC, 0x61, 0x0C, 0x7D, 0x06, 0x06, 0x45, 0xA5, 0xDF, 0xFF, + 0x55, 0x94, 0x98, 0xF0, 0x6A, 0x1F, 0x24, 0x0C, 0x00, 0x26, 0x55, 0x55, 0xAD, 0x78, 0x9C, 0x4D, + 0x90, 0xB1, 0x4E, 0x02, 0x41, 0x10, 0x86, 0xFF, 0x15, 0x95, 0xC6, 0x84, 0x6B, 0x28, 0xA8, 0x24, + 0x57, 0x51, 0x12, 0x0B, 0x5A, 0xCE, 0x07, 0x20, 0xE2, 0x0B, 0xF0, 0x02, 0x24, 0x42, 0x61, 0xAC, + 0x0C, 0x50, 0x5A, 0x62, 0x7F, 0x09, 0x16, 0x46, 0x0B, 0x0A, 0x68, 0xAD, 0xE0, 0x09, 0x8C, 0x95, + 0x25, 0x47, 0x6C, 0x0D, 0xB9, 0xC2, 0xCB, 0x45, 0x2E, 0x1C, 0xBF, 0x3B, 0xBB, 0x77, 0x86, 0x29, + 0x26, 0x5F, 0x66, 0x67, 0xFE, 0xFD, 0x67, 0x80, 0x2C, 0x2E, 0x73, 0xC0, 0x73, 0x20, 0xD9, 0xBB, + 0x7B, 0x78, 0x4B, 0xC9, 0x23, 0xE0, 0x91, 0x36, 0x8A, 0x68, 0xEF, 0x0D, 0xAC, 0xFC, 0x02, 0x22, + 0x72, 0xFA, 0xCD, 0x96, 0x74, 0xEE, 0x59, 0x01, 0x62, 0x9E, 0x02, 0x7D, 0x2E, 0x20, 0xF9, 0x0A, + 0x58, 0xB2, 0x29, 0x6F, 0x52, 0x58, 0xB3, 0x24, 0x98, 0xF2, 0x00, 0x15, 0x3E, 0x78, 0x6E, 0x87, + 0x81, 0x31, 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, 0xC4, 0xD9, 0x14, 0xA1, 0x9B, 0xC1, 0x98, 0xEC, 0x03, 0xBD, 0xC4, 0x08, 0xED, 0x24, 0xB7, + 0x0F, 0x9B, 0x9B, 0x0A, 0xAE, 0x48, 0x14, 0xB3, 0xAC, 0xC8, 0xDA, 0xF9, 0x85, 0x23, 0x3B, 0x43, + 0x9C, 0x79, 0x78, 0x9C, 0x25, 0x8B, 0x4B, 0x0D, 0x80, 0x40, 0x10, 0x43, 0xBB, 0x7C, 0x02, 0x26, + 0xB0, 0xB0, 0xC1, 0x01, 0x28, 0xC0, 0x01, 0x09, 0x4E, 0x16, 0x09, 0x38, 0x00, 0x09, 0x38, 0x00, + 0x27, 0x48, 0xD8, 0x03, 0x84, 0xEF, 0xA1, 0xCC, 0x40, 0x0F, 0x6D, 0x5E, 0xD3, 0x02, 0xBF, 0x1A, + 0x2B, 0x56, 0x56, 0xD8, 0xBD, 0x01, 0x36, 0x46, 0x17, 0x33, 0x94, 0x64, 0x32, 0x70, 0x31, 0x1B, + 0x1D, 0x70, 0xB3, 0x16, 0x04, 0x46, 0x52, 0x11, 0x78, 0x3E, 0xD4, 0x31, 0x43, 0x89, 0x5C, 0xFA, + 0x42, 0x72, 0xE5, 0x44, 0x1F, 0x2A, 0x26, 0x07, 0xAD, 0xA0, 0x43, 0x4B, 0x1F, 0x3C, 0x3A, 0x3E, + 0x99, 0xCE, 0xFA, 0xED, 0x7A, 0x20, 0xD6, 0x6F, 0x8C, 0x17, 0x0A, 0x15, 0x34, 0x81, 0x78, 0x9C, + 0x6D, 0x51, 0x3B, 0x52, 0x02, 0x41, 0x10, 0x6D, 0x94, 0x75, 0xC7, 0x0F, 0x68, 0x62, 0x8C, 0x37, + 0x60, 0x0F, 0xA0, 0x25, 0xE5, 0x01, 0x5C, 0x6F, 0x80, 0x99, 0x91, 0x05, 0x09, 0x65, 0x08, 0x37, + 0xC0, 0x1B, 0xC8, 0x0D, 0x20, 0x36, 0x50, 0x03, 0x43, 0xAB, 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0x82, 0x18, 0x2F, 0xFC, 0x18, 0x14, 0xB1, 0xDC, 0x5A, 0xD1, 0xA8, + 0x32, 0x27, 0x4E, 0x6B, 0xA4, 0xA4, 0xF5, 0xE4, 0xC8, 0x8D, 0xC9, 0x94, 0x9C, 0x9A, 0x8C, 0x69, + 0x00, 0x89, 0x43, 0x03, 0xB0, 0x16, 0x0C, 0x9C, 0xE1, 0xC7, 0x16, 0x35, 0x97, 0x55, 0xF3, 0x74, + 0x72, 0x61, 0x16, 0xD4, 0xF2, 0x4A, 0xBE, 0x5A, 0xFE, 0x52, 0x8F, 0x47, 0x23, 0x9F, 0x07, 0x8F, + 0xF3, 0xBD, 0x03, 0xEF, 0xD6, 0x76, 0x97, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, + 0xFE, 0x63, 0x01, 0xEB, 0x89, 0x17, 0x1C, 0x68, 0xE7, 0x8F, 0x82, 0x41, 0x04, 0x00, 0x95, 0x50, + 0x3D, 0xD2, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, 0x63, 0x01, 0xEB, 0x29, + 0x14, 0x1C, 0x68, 0x3F, 0x8D, 0x82, 0x41, 0x04, 0x00, 0xD2, 0x02, 0x52, 0x6D, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0x51, 0xD1, 0x51, 0xD1, + 0x51, 0x51, 0x7A, 0x88, 0x02, 0x00, 0xEA, 0xF7, 0x37, 0xC3, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, + 0x0B, 0x77, 0x79, 0x19, 0x30, 0xC0, 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0xA3, 0x82, 0xA3, 0x82, 0xA3, + 0x82, 0xA4, 0x0A, 0x02, 0x00, 0xD6, 0x8E, 0x69, 0x53, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, + 0x80, 0x20, 0xF8, 0xF7, 0x1F, 0x08, 0xF8, 0x19, 0x40, 0xE4, 0x7F, 0x5E, 0x08, 0xC5, 0x47, 0x9A, + 0xE8, 0x28, 0x18, 0x05, 0x04, 0x01, 0x00, 0x63, 0x07, 0x2D, 0x4F, 0x78, 0x9C, 0x63, 0x60, 0x18, + 0x05, 0xA3, 0x80, 0x20, 0xF8, 0xF7, 0x1F, 0x08, 0xF8, 0x19, 0x40, 0xE4, 0x7F, 0x5E, 0x08, 0xC5, + 0x47, 0x0D, 0xD1, 0x51, 0x30, 0x0A, 0x08, 0x02, 0x00, 0x70, 0x90, 0x3C, 0x69, 0x78, 0x9C, 0x63, + 0x60, 0x20, 0x07, 0xFC, 0xE7, 0x1F, 0x15, 0xC5, 0x2D, 0x7A, 0x86, 0x07, 0x9B, 0x28, 0xE5, 0x00, + 0xBB, 0xB9, 0x83, 0xC1, 0xC7, 0x83, 0x57, 0x94, 0x56, 0x60, 0x34, 0x2E, 0x48, 0x17, 0x25, 0x17, + 0x00, 0x00, 0xE6, 0x9C, 0x2B, 0xAB, 0x78, 0x9C, 0x63, 0x60, 0x20, 0x19, 0x7C, 0xF8, 0xCF, 0x3F, + 0x2A, 0x88, 0x0C, 0x0E, 0x9C, 0xE1, 0xC1, 0x14, 0xA4, 0x10, 0x60, 0x35, 0x73, 0x10, 0xFA, 0x7D, + 0x60, 0x05, 0x69, 0x01, 0x46, 0x43, 0x9E, 0x18, 0x41, 0xF2, 0x00, 0x00, 0x55, 0x82, 0x52, 0x7B, + 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0x12, 0xFE, 0xFF, 0xFF, 0xCF, 0xCF, 0x00, + 0x24, 0xF2, 0x19, 0xBE, 0x01, 0x49, 0x86, 0x4F, 0x40, 0x82, 0x85, 0x78, 0xC1, 0x81, 0x76, 0xFE, + 0x28, 0x18, 0x44, 0x00, 0x00, 0x3D, 0x68, 0x2C, 0x3B, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, + 0x00, 0x0A, 0x12, 0xFE, 0xFF, 0xFF, 0xCF, 0xCF, 0x00, 0x24, 0xF2, 0x19, 0xBE, 0x01, 0x49, 0x86, + 0x4F, 0x40, 0x82, 0x85, 0x42, 0xC1, 0x81, 0xF6, 0xD3, 0x28, 0x18, 0x44, 0x00, 0x00, 0xBB, 0xCC, + 0x3A, 0xF9, 0x78, 0x9C, 0x63, 0x60, 0xC0, 0x0F, 0x04, 0x19, 0xB1, 0x89, 0xFE, 0xE7, 0x1F, 0x0E, + 0xA2, 0xA1, 0xAC, 0xD8, 0x44, 0x29, 0x07, 0x83, 0xC1, 0x6F, 0x94, 0x8B, 0xA6, 0xB1, 0x61, 0x13, + 0xA5, 0x1C, 0x60, 0x37, 0x77, 0x30, 0xF8, 0x98, 0x72, 0x51, 0xCA, 0xC1, 0x68, 0xE8, 0x60, 0x02, + 0x00, 0xF7, 0x0B, 0x27, 0xA9, 0x78, 0x9C, 0x63, 0x60, 0xC0, 0x07, 0x04, 0x04, 0x19, 0x31, 0x05, + 0x3F, 0xFC, 0xE7, 0x1F, 0xBA, 0x82, 0x01, 0xA1, 0xAC, 0x98, 0x82, 0x14, 0x82, 0x41, 0xE8, 0x4D, + 0xE2, 0x05, 0x13, 0xD2, 0xD8, 0x30, 0x05, 0x29, 0x04, 0x58, 0xCD, 0x1C, 0x84, 0x7E, 0x27, 0x5E, + 0x90, 0x42, 0x30, 0x1A, 0x20, 0x10, 0x00, 0x00, 0x6B, 0x15, 0x4A, 0xE9, 0x78, 0x9C, 0x63, 0x60, + 0x18, 0x05, 0xA3, 0x80, 0x78, 0xF0, 0x1F, 0x01, 0x58, 0xC9, 0x14, 0xE5, 0xC7, 0x6A, 0xEE, 0xA8, + 0xE8, 0x08, 0x15, 0x7D, 0xC7, 0x87, 0x60, 0x03, 0x00, 0xEF, 0x82, 0x3B, 0x3B, 0x78, 0x9C, 0x63, + 0x60, 0x18, 0x05, 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, 0xE0, 0x88, 0x14, 0x7C, 0xF0, 0x8E, + 0x0F, 0xCE, 0x06, 0x00, 0xC8, 0xA4, 0x52, 0xB3, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, + 0x0A, 0xFE, 0xFE, 0x87, 0x03, 0x7E, 0x6A, 0x09, 0xC2, 0xC1, 0x87, 0x51, 0xC1, 0x11, 0x29, 0x98, + 0x90, 0xC6, 0x06, 0x67, 0x03, 0x00, 0xB6, 0x6B, 0x5C, 0xA5, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, + 0x77, 0x7C, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0x51, 0x51, 0x24, 0x51, 0x04, 0x60, 0x25, + 0x4F, 0x74, 0x14, 0x8C, 0x02, 0x5C, 0x00, 0x00, 0x15, 0x02, 0x3B, 0x3B, 0x78, 0x9C, 0x63, 0x60, + 0x80, 0x81, 0x34, 0x36, 0x06, 0x2C, 0xE0, 0x3F, 0xFF, 0xA8, 0xE8, 0xA8, 0x28, 0x92, 0x28, 0x02, + 0xB0, 0x52, 0x53, 0x74, 0x14, 0x8C, 0x02, 0x5C, 0x00, 0x00, 0x78, 0xD6, 0x45, 0xA5, 0x78, 0x9C, + 0x63, 0x60, 0x80, 0x82, 0x07, 0xEF, 0xF8, 0x18, 0x30, 0xC0, 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0x23, + 0x52, 0x10, 0x0E, 0xEE, 0x93, 0x21, 0x38, 0x0A, 0x46, 0x01, 0x00, 0x5A, 0xC6, 0x54, 0xFC, 0x78, + 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, 0x0C, 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, + 0x88, 0x14, 0x84, 0x83, 0xFB, 0xD4, 0x12, 0x1C, 0x05, 0xA3, 0x00, 0x00, 0x1A, 0x2E, 0x5F, 0xB1, + 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0x77, 0x7C, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0x51, + 0xD1, 0xAF, 0xFF, 0xE1, 0x80, 0x4C, 0xD1, 0x51, 0x30, 0x0A, 0x08, 0x03, 0x00, 0x5D, 0x13, 0x3B, + 0x3B, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0x34, 0x36, 0x06, 0x2C, 0xE0, 0x3F, 0xFF, 0xA8, 0xE8, + 0xA8, 0xE8, 0xD7, 0xFF, 0x70, 0x40, 0x55, 0xD1, 0x51, 0x30, 0x0A, 0x08, 0x03, 0x00, 0x2E, 0x4C, + 0x45, 0xA5, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x07, 0xEF, 0xF8, 0x18, 0x30, 0xC0, 0x87, 0xFF, + 0xFC, 0xA3, 0x82, 0x23, 0x47, 0xF0, 0xEF, 0x7F, 0x38, 0x20, 0x47, 0x70, 0x14, 0x8C, 0x02, 0x38, + 0x00, 0x00, 0xA3, 0x72, 0x52, 0xB3, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, + 0x0C, 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xC8, 0x11, 0xFC, 0xFB, 0x1F, 0x0E, 0xA8, 0x26, 0x38, + 0x0A, 0x46, 0x01, 0x1C, 0x00, 0x00, 0x05, 0xC5, 0x5C, 0xA5, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, + 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0x51, 0x51, 0x24, 0xD1, 0xF7, 0xEF, 0x60, + 0x80, 0x15, 0x49, 0x14, 0x01, 0x08, 0x8B, 0xCA, 0x0B, 0xC2, 0xC0, 0xC0, 0xF9, 0x62, 0x54, 0x74, + 0x50, 0x8A, 0x02, 0x00, 0x05, 0xAE, 0x55, 0x87, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81,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A8, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, + 0x0C, 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0x88, 0x14, 0x84, 0x83, 0xFB, 0x64, 0x09, 0xDE, 0xBB, + 0x0B, 0x05, 0x7B, 0xE1, 0x82, 0x0D, 0xFF, 0x39, 0x30, 0x2D, 0x1A, 0x15, 0x1C, 0xF6, 0x82, 0x06, + 0x69, 0xCC, 0x70, 0x36, 0x00, 0x99, 0x4B, 0x83, 0x9F, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x02, 0x87, + 0x99, 0x2C, 0x0C, 0x18, 0xA0, 0xE1, 0x3F, 0xC7, 0xA8, 0xE0, 0xF0, 0x16, 0x9C, 0xF0, 0xDF, 0xD2, + 0x18, 0x0A, 0x94, 0xE1, 0x82, 0x1F, 0xFE, 0xC3, 0xC1, 0x7D, 0xB2, 0x04, 0xEF, 0xDF, 0x85, 0x82, + 0xBD, 0x48, 0x82, 0xFC, 0x98, 0xB6, 0x8F, 0x0A, 0x0E, 0x7B, 0x41, 0x07, 0x17, 0x44, 0xC1, 0x02, + 0x00, 0x08, 0x3D, 0x85, 0x9C, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x0B, 0x77, 0x79, 0x19, 0x30, + 0xC0, 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0xC3, 0x5D, 0x30, 0x3F, 0x0D, 0x0A, 0xC2, 0x90, 0x04, 0xE1, + 0xE0, 0x3E, 0x59, 0x82, 0xF3, 0x67, 0x42, 0x41, 0xE7, 0x40, 0xF8, 0x68, 0x54, 0x70, 0xE0, 0x05, + 0x01, 0xCA, 0x50, 0x90, 0x6F, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, + 0x7F, 0xFE, 0x51, 0xD1, 0x51, 0xD1, 0x27, 0xEF, 0x60, 0x00, 0x59, 0xF4, 0xEB, 0x7F, 0x38, 0x20, + 0x28, 0x2A, 0x20, 0x08, 0x03, 0x83, 0xCD, 0x6F, 0xA3, 0xA2, 0x83, 0x47, 0x14, 0x00, 0x4B, 0x57, + 0x55, 0x86, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, + 0xD1, 0x91, 0x24, 0x9A, 0x94, 0x06, 0x03, 0xC8, 0xA2, 0x5F, 0xFF, 0xC3, 0x01, 0x99, 0xA2, 0x93, + 0x67, 0xC2, 0xC0, 0x60, 0xF3, 0xF1, 0xA8, 0xE8, 0xE0, 0x11, 0x05, 0x00, 0xFC, 0x10, 0x5F, 0x73, + 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x07, 0xEF, 0xF8, 0x18, 0x30, 0xC0, 0x87, 0xFF, 0xFC, 0xA3, + 0x82, 0x23, 0x47, 0xF0, 0xEF, 0x7F, 0x38, 0xE0, 0x20, 0x43, 0x10, 0x0E, 0x1A, 0x46, 0x05, 0x47, + 0x05, 0x61, 0x40, 0xC1, 0x85, 0x09, 0xCE, 0x06, 0x00, 0xAC, 0x07, 0x79, 0x33, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x82, 0x82, 0x77, 0xEC, 0x0C, 0x18, 0xA0, 0xE1, 0x3F, 0xC7, 0xA8, 0xE0, 0xC8, 0x11, + 0xFC, 0xFB, 0x1F, 0x0E, 0xC8, 0x11, 0x84, 0x83, 0x0F, 0xFF, 0xF9, 0x47, 0x05, 0x47, 0xA0, 0xE0, + 0x83, 0x77, 0x7C, 0x70, 0x36, 0x00, 0x09, 0xE1, 0x78, 0xAB, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, + 0x0B, 0x77, 0x79, 0x19, 0x30, 0xC0, 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0x23, 0x47, 0xF0, 0xCD, 0x3B, + 0x28, 0xF8, 0x87, 0x24, 0xF8, 0xF7, 0x3F, 0x1C, 0x10, 0x10, 0x14, 0x84, 0x81, 0x8F, 0x83, 0xC6, + 0x47, 0xA3, 0x82, 0x03, 0x25, 0x08, 0x00, 0x2E, 0x97, 0x84, 0x5F, 0x78, 0x9C, 0x63, 0x60, 0x80, + 0x82, 0x84, 0x34, 0x36, 0x06, 0x0C, 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xC8, 0x11, 0xFC, 0xFB, + 0x1F, 0x0E, 0xA8, 0x26, 0x08, 0x07, 0x0D, 0xFF, 0x39, 0x46, 0x05, 0x47, 0xA0, 0xA0, 0x41, 0x1A, + 0x33, 0x9C, 0x0D, 0x00, 0x43, 0x8A, 0x81, 0xE6, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x02, 0x83, 0x34, + 0x66, 0x06, 0x0C, 0xD0, 0xF0, 0x9F, 0x63, 0x54, 0x70, 0xE4, 0x08, 0xFE, 0xFD, 0x0F, 0x07, 0xFC, + 0xD4, 0x12, 0x84, 0x83, 0x0F, 0xA3, 0x82, 0x23, 0x52, 0x30, 0x21, 0x8D, 0x0D, 0xCE, 0x06, 0x00, + 0xC4, 0x5A, 0x81, 0xE6, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x0B, 0x77, 0x79, 0x19, 0x30, 0xC0, + 0x87, 0xFF, 0xFC, 0xA3, 0x82, 0xC3, 0x52, 0x30, 0x35, 0x0D, 0x0A, 0xBE, 0x21, 0x09, 0xFE, 0xFD, + 0x0F, 0x07, 0xE4, 0x08, 0xCE, 0x98, 0x09, 0x05, 0x3F, 0x07, 0x8D, 0x37, 0x47, 0x05, 0x07, 0x4A, + 0x10, 0x00, 0xDD, 0x47, 0x8D, 0x63, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, + 0x63, 0x01, 0xEB, 0x89, 0x17, 0x84, 0x9B, 0xB3, 0xE0, 0x3F, 0x2B, 0xA6, 0xE1, 0xA3, 0x82, 0xC3, + 0x5E, 0x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0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, + 0xFE, 0x87, 0x83, 0xFE, 0x0E, 0x28, 0xC8, 0x40, 0x12, 0x84, 0x83, 0xFB, 0x84, 0x04, 0xEB, 0xCB, + 0xA1, 0x20, 0x1D, 0x6E, 0xF8, 0x87, 0xFF, 0xFC, 0x98, 0x36, 0x8E, 0x0A, 0x0E, 0x7B, 0xC1, 0x84, + 0x34, 0x36, 0x38, 0x1B, 0x00, 0x0F, 0xB5, 0x79, 0xEA, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, + 0x00, 0x0A, 0xDA, 0x3A, 0xA0, 0xE0, 0xC7, 0x7F, 0x38, 0xB8, 0xFF, 0xF7, 0x3F, 0x26, 0xC0, 0x2E, + 0x58, 0x56, 0x0E, 0x05, 0xDF, 0x91, 0x04, 0xE1, 0x86, 0x7F, 0xF8, 0xCF, 0x8F, 0x69, 0xE3, 0xA8, + 0xE0, 0xB0, 0x17, 0x4C, 0x48, 0x63, 0x83, 0xB3, 0x01, 0x75, 0x62, 0x7A, 0xBC, 0x78, 0x9C, 0x63, + 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, 0x63, 0x01, 0xEB, 0x29, 0x14, 0x84, 0x1B, 0xFE, 0xE9, + 0x3F, 0x2F, 0xA6, 0x8D, 0xA3, 0x82, 0xC3, 0x5E, 0x30, 0x31, 0x8D, 0x15, 0xCE, 0x06, 0x00, 0x08, + 0x5E, 0x83, 0x09, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x09, 0xEF, 0x58, 0x18, 0x30, 0xC0, 0x82, + 0xFF, 0xAC, 0xA3, 0x82, 0x23, 0x47, 0xF0, 0x3F, 0x16, 0xB0, 0x9E, 0x78, 0x41, 0x4C, 0xC3, 0x47, + 0xC1, 0x88, 0x05, 0x00, 0x72, 0x2A, 0x66, 0xB4, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x02, 0x87, 0x34, + 0x26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70, 0x36, + 0x00, 0x92, 0x29, 0x9E, 0xF4, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, 0x0C, + 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xC8, 0x11, 0xEC, 0x80, 0x81, 0x1F, 0xFF, 0xE1, 0xE0, 0xFE, + 0x7F, 0x2C, 0x00, 0xBB, 0x60, 0x39, 0x0C, 0x1C, 0x47, 0x12, 0x84, 0x1B, 0xDE, 0xF0, 0x9F, 0x03, + 0xD3, 0xF6, 0x51, 0xC1, 0x61, 0x2F, 0x68, 0x90, 0xC6, 0x0C, 0x67, 0x03, 0x00, 0xAD, 0xAC, 0x9F, + 0xD4, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x02, 0x83, 0x34, 0x66, 0x06, 0x0C, 0xD0, 0xF0, 0x9F, 0x63, + 0x54, 0x70, 0xE4, 0x08, 0xFE, 0xFD, 0x0F, 0x07, 0x3D, 0x1D, 0x50, 0x90, 0x81, 0x24, 0x08, 0x07, + 0xF7, 0x09, 0x09, 0xD6, 0x97, 0x43, 0x41, 0x3A, 0xDC, 0xF0, 0x0F, 0xFF, 0xF9, 0x31, 0x6D, 0x1F, + 0x15, 0x1C, 0xF6, 0x82, 0x09, 0x69, 0x6C, 0x70, 0x36, 0x00, 0x16, 0xA2, 0x9F, 0x28, 0x78, 0x9C, + 0x63, 0x60, 0x80, 0x02, 0x83, 0x34, 0x66, 0x06, 0x0C, 0xD0, 0xF0, 0x9F, 0x63, 0x54, 0x70, 0xE4, + 0x08, 0xB6, 0x75, 0x40, 0xC1, 0x89, 0xFF, 0x70, 0x70, 0xFF, 0xEF, 0x7F, 0x4C, 0x80, 0x5D, 0xB0, + 0xAC, 0x1C, 0x0A, 0xBE, 0x23, 0x09, 0xC2, 0x0D, 0xFF, 0xF0, 0x9F, 0x1F, 0xD3, 0xF6, 0x51, 0xC1, + 0x61, 0x2F, 0x98, 0x90, 0xC6, 0x06, 0x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, 0xB0, 0x9B, 0x3B, 0x18, 0x7C, 0x3C, 0x2A, 0x4A, 0x5B, 0x51, + 0x72, 0x01, 0x00, 0xE1, 0xB6, 0x2F, 0xAD, 0x78, 0x9C, 0x63, 0x60, 0x20, 0x19, 0x7C, 0xF8, 0xCF, + 0x3F, 0x2A, 0x38, 0x6C, 0x04, 0x27, 0xCC, 0xE4, 0xC4, 0x14, 0xA4, 0x10, 0x60, 0x35, 0x73, 0x10, + 0xFA, 0x7D, 0x54, 0x90, 0x6C, 0x41, 0xF2, 0x00, 0x00, 0x87, 0x25, 0x5A, 0x0D, 0x78, 0x9C, 0x63, + 0x60, 0x18, 0x05, 0xC3, 0x07, 0xFC, 0xC7, 0x02, 0xD6, 0x13, 0x2F, 0x38, 0xA4, 0x6D, 0x1F, 0x05, + 0x83, 0x0A, 0x00, 0x00, 0x26, 0x56, 0x7B, 0xA3, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x0B, 0x77, + 0x41, 0x08, 0x1D, 0x7C, 0xF8, 0x0F, 0x42, 0xA3, 0xA2, 0xA3, 0xA2, 0xA3, 0xA2, 0xA3, 0xA2, 0xB4, + 0x17, 0x05, 0x00, 0x59, 0xD4, 0xCC, 0x73, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xC3, 0x10, 0x7C, + 0xF8, 0x0F, 0x07, 0xF7, 0xC9, 0x12, 0xC4, 0x6A, 0x26, 0xF1, 0x82, 0x03, 0x6B, 0xFB, 0xA8, 0xE0, + 0xC0, 0x08, 0x3E, 0x78, 0x87, 0x60, 0x03, 0x00, 0xA7, 0x37, 0x76, 0xD5, 0x78, 0x9C, 0x63, 0x60, + 0x18, 0x05, 0xA3, 0x80, 0x58, 0xF0, 0xE1, 0x3F, 0x12, 0x60, 0x25, 0x4F, 0x14, 0x84, 0x30, 0xCD, + 0x1D, 0x15, 0x1D, 0x99, 0xA2, 0x0F, 0xDE, 0x81, 0x10, 0x0C, 0x00, 0x00, 0x05, 0x0D, 0x87, 0x28, + 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0x23, 0x05, 0x7C, 0xF8, 0x8F, 0x04, 0x58, 0xC9, 0x13, 0xC5, + 0x6E, 0x2E, 0x49, 0xA2, 0x1F, 0xB0, 0x9A, 0x4B, 0x9A, 0x28, 0x76, 0x73, 0x47, 0x45, 0x87, 0x9C, + 0xE8, 0x83, 0x77, 0x20, 0x04, 0x03, 0x00, 0x2B, 0x72, 0xA4, 0xEC, 0x78, 0x9C, 0x63, 0x60, 0x18, + 0x05, 0xC3, 0x1D, 0x7C, 0xFD, 0x0F, 0x07, 0xFC, 0xE4, 0x89, 0x22, 0x00, 0xB9, 0xA2, 0x83, 0xC1, + 0x0D, 0xA3, 0xA2, 0x83, 0x51, 0xF4, 0x1D, 0x1F, 0x82, 0x0D, 0x00, 0xCE, 0xDC, 0x5C, 0x29, 0x78, + 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x80, 0x10, 0xF8, 0xFA, 0x1F, 0x09, 0x90, 0x25, 0x0A, 0x03, + 0x1F, 0xFE, 0x83, 0xD0, 0xA8, 0xE8, 0xA8, 0x28, 0x04, 0x3C, 0x78, 0x07, 0x42, 0x30, 0x00, 0x00, + 0x3B, 0xB7, 0x87, 0x28, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xC3, 0x1D, 0x7C, 0xFD, 0x8F, 0x04, + 0xC8, 0x12, 0x45, 0x02, 0x1F, 0xC8, 0x13, 0x45, 0x98, 0x4B, 0xAE, 0x28, 0x92, 0xA1, 0xA3, 0xA2, + 0xC3, 0x46, 0xF4, 0xC1, 0x3B, 0x10, 0x82, 0x01, 0x00, 0x87, 0x5F, 0xA4, 0xEC, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x80, 0x07, 0xEF, 0x18, 0xB0, 0x80, 0x0F, 0xFF, 0x47, 0x45, 0x87, 0x93, 0x28, 0x12, + 0x60, 0x25, 0x4F, 0x74, 0xE0, 0xDD, 0x30, 0x0A, 0x86, 0x2F, 0x00, 0x00, 0x37, 0xDE, 0x7D, 0xAD, + 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x07, 0xEF, 0x40, 0x08, 0x1D, 0x7C, 0xF8, 0x0F, 0x42, 0xA3, + 0xA2, 0xA3, 0xA2, 0x30, 0x51, 0x24, 0xC0, 0x4A, 0x8E, 0xE8, 0x28, 0x18, 0x05, 0xB8, 0x01, 0x00, + 0x8E, 0x56, 0x87, 0x28, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x07, 0xEF, 0x40, 0x08, 0x1D, 0x7C, + 0xF8, 0x0F, 0x42, 0xA3, 0xA2, 0xC3, 0x48, 0x14, 0x06, 0x58, 0xC9, 0x14, 0xC5, 0x02, 0x48, 0x13, + 0x45, 0x02, 0xAC, 0xE4, 0x88, 0x8E, 0x82, 0xE1, 0x0B, 0x00, 0x17, 0x42, 0xA4, 0xEC, 0x78, 0x9C, + 0x63, 0x60, 0x80, 0x81, 0x77, 0x7C, 0x0C, 0x58, 0xC0, 0x7F, 0xFE, 0x51, 0xD1, 0xA1, 0x2E, 0xFA, + 0xF5, 0x3F, 0x1C, 0x90, 0x29, 0x3A, 0xB8, 0xDC, 0x30, 0x0A, 0x86, 0x2B, 0x00, 0x00, 0x52, 0x96, + 0x5C, 0x29, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x07, 0xEF, 0x40, 0x08, 0x1D, 0x7C, 0xF8, 0x0F, + 0x42, 0xA3, 0xA2, 0x23, 0x5D, 0xF4, 0xEB, 0x7F, 0x24, 0x40, 0x96, 0xE8, 0x28, 0x18, 0x05, 0x84, + 0x01, 0x00, 0xC5, 0x00, 0x87, 0x28, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x07, 0xEF, 0x40, 0x08, + 0x1D, 0x7C, 0xF8, 0x0F, 0x42, 0xA3, 0xA2, 0x43, 0x5B, 0xF4, 0xEB, 0x7F, 0x18, 0x20, 0x57, 0x14, + 0xD5, 0x68, 0x72, 0x44, 0x11, 0xE6, 0x82, 0x8C, 0x26, 0x47, 0x74, 0x14, 0x0C, 0x7F, 0x00, 0x00, + 0x73, 0x2F, 0xA4, 0xEC, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F, + 0xFE, 0x51, 0xD1, 0x61, 0x24, 0x8A, 0x00, 0xAC, 0x64, 0x8A, 0xCA, 0x0B, 0xC2, 0x00, 0xB9, 0x6E, + 0x78, 0xFF, 0x0E, 0x06, 0x58, 0x06, 0xCC, 0x0D, 0xA3, 0xA2, 0x83, 0x52, 0x14, 0x00, 0xD6, 0x4E, + 0x73, 0xF3, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x0B, 0x77, 0x41, 0x08, 0x1D, 0x7C, 0xF8, 0x0F, + 0x42, 0xA3, 0xA2, 0xA3, 0xA2, 0x48, 0xA2, 0xEF, 0xA0, 0x80, 0x05, 0x45, 0x14, 0x06, 0x58, 0x89, + 0x10, 0x15, 0x84, 0x82, 0xC1, 0xE7, 0xB7, 0x51, 0xD1, 0x01, 0x15, 0x05, 0x00, 0x47, 0x0A, 0xE4, + 0x69, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x0B, 0x77, 0x41, 0x08, 0x1D, 0x7C, 0xF8, 0x0F, 0x42, + 0xA3, 0xA2, 0xC3, 0x48, 0x14, 0x06, 0x58, 0xB0, 0x8A, 0xB2, 0x12, 0x14, 0x15, 0x10, 0x84, 0x01, + 0x64, 0x73, 0xB1, 0x00, 0x9C, 0xA2, 0x0F, 0xDE, 0xC1, 0x00, 0xB9, 0x6E, 0xF8, 0xF0, 0x1F, 0x9B, + 0x1B, 0x06, 0x47, 0xF8, 0x8E, 0x8A, 0x52, 0x20, 0x0A, 0x00, 0x6A, 0xBC, 0xF7, 0x1A, 0x78, 0x9C, + 0x63, 0x60, 0x80, 0x81, 0xBB, 0xBC, 0x0C, 0x58, 0xC0, 0x7F,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 0x99, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, 0x63, 0x01, 0xEB, 0x89, + 0x17, 0x84, 0x19, 0xF3, 0x3B, 0x9E, 0xE1, 0x57, 0x3C, 0xBA, 0xD9, 0xA3, 0x82, 0xC3, 0x5E, 0xF0, + 0x95, 0x1F, 0xC3, 0xCB, 0x38, 0x18, 0x07, 0x00, 0xF9, 0xB1, 0x81, 0x19, 0x78, 0x9C, 0x63, 0x60, + 0x18, 0x05, 0xC3, 0x07, 0xFC, 0xC7, 0x02, 0xD6, 0x13, 0x2F, 0x48, 0x2D, 0xDB, 0xE3, 0x19, 0x7E, + 0x61, 0x5A, 0x44, 0x50, 0x10, 0x66, 0xCC, 0x6F, 0xA0, 0x60, 0x3C, 0xBA, 0xD9, 0xA3, 0x82, 0x83, + 0x5F, 0xF0, 0xA5, 0x1F, 0xC3, 0xCB, 0x38, 0x18, 0x07, 0x00, 0x65, 0xE5, 0xB1, 0xE4, 0x78, 0x9C, + 0x63, 0x60, 0x80, 0x82, 0x09, 0xEF, 0x58, 0x18, 0x30, 0xC0, 0x82, 0xFF, 0xAC, 0xA3, 0x82, 0x43, + 0x48, 0xF0, 0x3F, 0x16, 0xB0, 0x9E, 0x78, 0x41, 0x4C, 0xC3, 0x49, 0x02, 0x03, 0x6B, 0xFB, 0x28, + 0x18, 0x54, 0x00, 0x00, 0x15, 0x1B, 0x9F, 0x99, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x97, 0x7E, + 0x0C, 0x2F, 0xE3, 0x18, 0xD0, 0xC0, 0xEF, 0x78, 0x86, 0x5F, 0xF1, 0xA3, 0x82, 0x23, 0x46, 0xF0, + 0x3F, 0x16, 0xB0, 0x9E, 0x78, 0x41, 0x74, 0xB3, 0x47, 0xC1, 0x08, 0x06, 0x00, 0x1F, 0x29, 0x81, + 0x18, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x97, 0x7E, 0x0C, 0x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 0x00, 0x06, 0x27, 0x1E, 0x0A, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x81, 0x34, 0x36, 0x06, 0x2C, 0xE0, 0x3F, 0xFF, 0xA8, 0xE8, 0xA8, 0x28, 0x79, 0xA2, + 0xA3, 0x60, 0x14, 0x50, 0x03, 0x00, 0x00, 0x58, 0x5C, 0x1B, 0xD9, 0x78, 0x9C, 0x63, 0x60, 0x18, + 0x05, 0xA3, 0x00, 0x03, 0x7C, 0xF8, 0x0F, 0x03, 0xF7, 0xC9, 0x11, 0x1C, 0x05, 0x23, 0x1E, 0x00, + 0x00, 0xBA, 0x33, 0x20, 0x53, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x80, 0x52, 0x60, 0xCC, + 0x8C, 0x4D, 0xF4, 0x3F, 0xFF, 0xA8, 0xE8, 0xA8, 0x28, 0x79, 0xA2, 0xC8, 0x29, 0x0A, 0x00, 0xA0, + 0xBF, 0x1B, 0xD9, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, 0xC3, 0x01, 0x2F, + 0xD5, 0x04, 0x47, 0xC1, 0x28, 0x80, 0x03, 0x00, 0xAB, 0x63, 0x28, 0x0D, 0x78, 0x9C, 0x63, 0x60, + 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, 0x0C, 0xF0, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xA8, 0x20, 0x1E, + 0xC1, 0x51, 0x30, 0x0A, 0x88, 0x07, 0x00, 0xB4, 0xBB, 0x34, 0x99, 0x78, 0x9C, 0x63, 0x60, 0x18, + 0x05, 0xA3, 0x00, 0x03, 0x7C, 0xF8, 0x0F, 0x03, 0xF7, 0xA9, 0x26, 0x38, 0x0A, 0x46, 0x3C, 0x00, + 0x00, 0xBB, 0x80, 0x2B, 0x19, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x80, 0x28, 0x60, 0x60, + 0xCC, 0x8C, 0x29, 0xF8, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xA8, 0x20, 0x1E, 0x41, 0xE4, 0x64, 0x03, + 0x00, 0xA0, 0x02, 0x34, 0x99, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xDA, 0x3A, + 0x60, 0xE0, 0xC7, 0x7F, 0x18, 0xB8, 0xFF, 0xF7, 0x3F, 0x26, 0xC0, 0x2E, 0x58, 0x56, 0x0E, 0x03, + 0xDF, 0x11, 0x82, 0x03, 0xED, 0xA7, 0x51, 0x30, 0x88, 0x00, 0x00, 0x0B, 0x38, 0x49, 0x21, 0x78, + 0x9C, 0x63, 0x60, 0x80, 0x02, 0x87, 0x99, 0x2C, 0x0C, 0x18, 0xA0, 0xE1, 0x3F, 0xC7, 0xA8, 0xE0, + 0xA8, 0x20, 0x04, 0x4C, 0xF8, 0xCF, 0x89, 0x29, 0xF8, 0xE1, 0x3F, 0xFF, 0xA8, 0xE0, 0xA8, 0x20, + 0x1E, 0x41, 0x03, 0x63, 0x66, 0x38, 0x1B, 0x00, 0x1F, 0x9F, 0x5C, 0xD7, 0x78, 0x9C, 0x63, 0x60, + 0x18, 0x05, 0xA3, 0x00, 0x0A, 0xFE, 0xC3, 0x41, 0x5F, 0x07, 0x0C, 0x44, 0xFC, 0xC7, 0x02, 0xD6, + 0x13, 0x10, 0xAC, 0x2B, 0x87, 0x81, 0xF0, 0x81, 0xF6, 0xD3, 0x28, 0x18, 0x44, 0x00, 0x00, 0x9D, + 0x49, 0x47, 0xD5, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x84, 0x34, 0x36, 0x06, 0x0C, 0xF0, 0xE1, + 0x3F, 0xFF, 0xA8, 0xE0, 0xA8, 0x20, 0x1E, 0xC1, 0x86, 0xFF, 0x1C, 0xA3, 0x82, 0xA3, 0x82, 0x78, + 0x04, 0x0D, 0xD2, 0x98, 0xE1, 0x6C, 0x00, 0x79, 0x3C, 0x5C, 0xE8, 0x78, 0x9C, 0x4B, 0x4B, 0xC3, + 0x04, 0x6E, 0xFF, 0xB1, 0x80, 0xF5, 0xA3, 0x82, 0xA3, 0x82, 0x70, 0x41, 0x86, 0x51, 0x30, 0x0A, + 0x48, 0x07, 0x00, 0xE3, 0xA2, 0x20, 0x1B, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x60, 0x14, + 0x0C, 0x6D, 0xB0, 0x0A, 0x0B, 0xC8, 0xFA, 0x8F, 0x05, 0xAC, 0xA7, 0x9B, 0x20, 0x00, 0x1A, 0xC4, + 0x89, 0x55, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x60, 0x14, 0x50, 0x0A, 0xFE, 0x63, 0x01, + 0xEB, 0x47, 0xB2, 0xA0, 0x31, 0x16, 0xA0, 0x0C, 0x00, 0xB8, 0x50, 0x10, 0x0E, 0x78, 0x9C, 0x63, + 0x60, 0x18, 0x05, 0xA3, 0x60, 0x88, 0x81, 0xBB, 0x58, 0x40, 0xEF, 0x7F, 0x2C, 0x60, 0xFD, 0xA8, + 0xE0, 0x40, 0x09, 0x02, 0x00, 0xBB, 0xED, 0x99, 0x62, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, + 0x00, 0x1F, 0x30, 0xC6, 0x02, 0x94, 0xFF, 0x63, 0x01, 0xEB, 0x47, 0x05, 0x47, 0x05, 0xE1, 0x82, + 0x58, 0x93, 0x0D, 0x00, 0x47, 0x02, 0x20, 0x1B, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0x83, 0x1D, + 0xFC, 0xC7, 0x02, 0xD6, 0x8F, 0x0A, 0x8E, 0x0A, 0x0E, 0x66, 0x41, 0xAC, 0x29, 0x19, 0x00, 0x1D, + 0xAC, 0xA8, 0x1A, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0x28, 0x60, 0x26, 0x16, 0x90, 0xF9, 0x1F, + 0x0B, 0x58, 0x3F, 0x2A, 0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 0x9F, 0xE1, 0x27, 0x3F, 0x90, 0xF8, 0x30, + 0x9F, 0x01, 0xCA, 0x61, 0x20, 0x41, 0x90, 0x78, 0x8B, 0xD6, 0xDE, 0xFA, 0xBF, 0xEA, 0xEF, 0x7A, + 0x20, 0xF1, 0xEB, 0xFE, 0x2A, 0x28, 0x27, 0x6B, 0x30, 0x5A, 0x74, 0xFF, 0xEF, 0xFF, 0xBB, 0xFF, + 0x40, 0xC4, 0xDF, 0xF7, 0x77, 0xA1, 0x9C, 0xB9, 0x34, 0x09, 0x4F, 0xAC, 0xEE, 0xA4, 0x85, 0x45, + 0x14, 0x86, 0x27, 0xD6, 0x00, 0x19, 0x84, 0x11, 0x47, 0xB7, 0xF0, 0x1C, 0x2A, 0x11, 0x47, 0x59, + 0x78, 0x1A, 0x33, 0x0A, 0x18, 0x33, 0x18, 0x32, 0x03, 0x09, 0x03, 0x61, 0x18, 0x87, 0x01, 0x00, + 0x23, 0xC1, 0x38, 0xF4, 0x78, 0x9C, 0x33, 0x36, 0xC6, 0x04, 0xCA, 0xFF, 0xB1, 0x80, 0xF5, 0x23, + 0x59, 0x90, 0x61, 0x14, 0x8C, 0x82, 0x51, 0x40, 0x31, 0x00, 0x00, 0xD0, 0xC9, 0x10, 0x0E, 0x78, + 0x9C, 0x63, 0x60, 0x40, 0x07, 0x97, 0xEE, 0xDE, 0xC5, 0x10, 0x63, 0xF8, 0xFC, 0xFF, 0xFF, 0xA8, + 0xE0, 0xA8, 0xE0, 0xA8, 0xE0, 0xA8, 0x20, 0x91, 0x82, 0x00, 0x1B, 0xE8, 0x9B, 0x81, 0x78, 0x9C, + 0x63, 0x60, 0x18, 0x05, 0xA3, 0x00, 0x1F, 0x30, 0x86, 0x03, 0x26, 0x84, 0xE0, 0x7F, 0x38, 0xE0, + 0x1D, 0x15, 0x1C, 0x15, 0xC4, 0x22, 0x88, 0x48, 0x36, 0xCC, 0x08, 0x41, 0x00, 0xCA, 0xA3, 0x08, + 0x5F, 0x78, 0x9C, 0x63, 0x60, 0x18, 0x05, 0xA3, 0x80, 0x38, 0x60, 0x60, 0x0C, 0x03, 0xCA, 0x08, + 0xC1, 0x0F, 0xFF, 0x61, 0xE0, 0xFE, 0xA8, 0xE0, 0xA8, 0x20, 0x16, 0x41, 0x44, 0xB2, 0x31, 0x06, + 0x00, 0xAD, 0xF5, 0x1C, 0x78, 0x78, 0x9C, 0x4B, 0x4B, 0x83, 0x01, 0x56, 0x06, 0x38, 0xF8, 0x0F, + 0x07, 0xBC, 0xA3, 0x82, 0xA3, 0x82, 0x58, 0x04, 0x47, 0xC1, 0x28, 0x20, 0x03, 0x00, 0x00, 0x14, + 0xAF, 0x08, 0x5F, 0x78, 0x9C, 0x9B, 0x39, 0x13, 0x06, 0x38, 0x18, 0xE0, 0xE0, 0x3F, 0x1C, 0xF0, + 0x8E, 0x0A, 0x8E, 0x0A, 0xC2, 0x80, 0xAD, 0x31, 0x0C, 0x28, 0xFF, 0xC7, 0x02, 0xD6, 0x8F, 0x0A, + 0x8E, 0x0A, 0xC2, 0x05, 0x8D, 0xB1, 0x00, 0x65, 0x00, 0x9D, 0xA1, 0x28, 0x79, 0x78, 0x9C, 0x9B, + 0x39, 0x13, 0x06, 0x38, 0x18, 0xE0, 0xE0, 0x3F, 0x1C, 0xF0, 0x8E, 0x0A, 0x8E, 0x74, 0xC1, 0xBB, + 0x70, 0x60, 0x6D, 0x0C, 0x03, 0xCA, 0x08, 0xE9, 0x4F, 0x70, 0x3D, 0xEB, 0x47, 0x05, 0x47, 0x05, + 0xB1, 0x08, 0x1A, 0x20, 0x92, 0x0D, 0x00, 0x5A, 0xF6, 0x20, 0xC5, 0x78, 0x9C, 0x4B, 0x4B, 0xC3, + 0x04, 0x6E, 0xFF, 0xB1, 0x80, 0xF5, 0xA3, 0x82, 0xA3, 0x82, 0x58, 0x04, 0x79, 0x19, 0xE0, 0x60, + 0x54, 0x70, 0x54, 0x10, 0x0E, 0x10, 0xC5, 0x09, 0x2B, 0x42, 0x10, 0x00, 0x3B, 0xAA, 0x28, 0x79, + 0x78, 0x9C, 0x4B, 0x4D, 0xC3, 0x04, 0x61, 0x7F, 0xFF, 0x63, 0x82, 0xFB, 0xA3, 0x82, 0xA3, 0x82, + 0x70, 0x41, 0x06, 0x38, 0xF8, 0x30, 0x2A, 0x38, 0x2A, 0x88, 0x57, 0x30, 0x01, 0x51, 0xB0, 0x00, + 0x00, 0x42, 0x8B, 0x41, 0x4D, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0x84, 0x34, 0x18, 0x08, 0x83, + 0x8B, 0x31, 0x7C, 0xF8, 0x0F, 0x03, 0xF7, 0x47, 0x05, 0x47, 0x05, 0xB1, 0x08, 0x8E, 0x82, 0x51, + 0x40, 0x34, 0x00, 0x00, 0x3B, 0x83, 0x1C, 0x78, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x81, 0x89, 0x33, + 0x61, 0x20, 0x13, 0x2E, 0xC6, 0xF0, 0xE9, 0x3F, 0x0C, 0xAC, 0x1F, 0x15, 0x1C, 0x99, 0x82, 0xC6, + 0x70, 0x70, 0xE5, 0x2E, 0x0C, 0xF4, 0xC2, 0xA5, 0xFF, 0xF3, 0x22, 0x34, 0x8D, 0x0A, 0x8E, 0x0A, + 0xC2, 0x01, 0x22, 0xD9, 0x30, 0x23, 0x04, 0x01, 0x9A, 0xC8, 0x20, 0xC5, 0x78, 0x9C, 0x63, 0x60, + 0x80, 0x81, 0x09, 0x33, 0x61, 0xA0, 0x12, 0x2E, 0xC6, 0xF0, 0xE1, 0x3F, 0x0C, 0xDC, 0x1F, 0x15, + 0x1C, 0x99, 0x82, 0x46, 0xC6, 0x30, 0xF0, 0x19, 0x21, 0xF8, 0xF7, 0x3F, 0x26, 0x18, 0x15, 0x1C, + 0x15, 0x44, 0x08, 0x1A, 0x63, 0x03, 0x00, 0x2D, 0x83, 0x41, 0x4D, 0x78, 0x9C, 0x5D, 0x91, 0x3B, + 0x4B, 0x03, 0x51, 0x10, 0x85, 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 0x83, 0xE4, + 0x04, 0x80, 0x96, 0x3D, 0xE0, 0x06, 0xC9, 0xFD, 0x06, 0xCA, 0xDD, 0x02, 0x79, 0x15, 0x68, 0xD9, + 0x07, 0x7F, 0x90, 0x88, 0xC3, 0x3E, 0x26, 0x06, 0x87, 0xB5, 0x20, 0xE5, 0x0D, 0x71, 0x1F, 0xAE, + 0x83, 0xCD, 0x6E, 0xA8, 0x07, 0xE2, 0x3C, 0x10, 0xEB, 0xD0, 0xDB, 0x0B, 0x10, 0x97, 0x1F, 0xF2, + 0x65, 0x60, 0xD8, 0x64, 0x03, 0x62, 0xED, 0x74, 0xE0, 0x83, 0xB8, 0xE9, 0xA9, 0x14, 0x10, 0x73, + 0x32, 0x80, 0x9C, 0xD1, 0x0D, 0x11, 0x11, 0x78, 0x09, 0x34, 0xFD, 0x25, 0x2B, 0x83, 0x01, 0x1F, + 0xC3, 0x27, 0x68, 0xD8, 0x19, 0x9C, 0x01, 0x06, 0xDB, 0x1E, 0xA6, 0x03, 0xEC, 0x0C, 0x0D, 0x5C, + 0xB0, 0xA0, 0x9D, 0xC7, 0xC0, 0x90, 0x50, 0x77, 0x0A, 0xA8, 0xDC, 0x1E, 0x16, 0x28, 0x0B, 0x81, + 0xDE, 0x7C, 0x28, 0x0B, 0x64, 0x9C, 0x81, 0x87, 0xDC, 0x15, 0x6D, 0x86, 0x93, 0x40, 0x33, 0x14, + 0xFE, 0xB3, 0xC2, 0x85, 0x5E, 0x9C, 0xF0, 0x51, 0x16, 0x12, 0xBC, 0xFC, 0x9F, 0x07, 0x2E, 0xA2, + 0xF0, 0xF2, 0x3F, 0x18, 0x70, 0x31, 0xA0, 0x02, 0x41, 0x46, 0x06, 0x00, 0x81, 0x09, 0x58, 0x49, + 0x78, 0x9C, 0x63, 0x50, 0xF8, 0x0F, 0x07, 0x36, 0x0C, 0x60, 0x70, 0xF1, 0x1A, 0x17, 0x84, 0xC1, + 0x20, 0xF0, 0x9F, 0x03, 0x4C, 0xD7, 0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CB, 0xFF, 0x60, + 0xC0, 0x05, 0x17, 0xF9, 0x71, 0xC2, 0x46, 0x49, 0x90, 0xF1, 0xF2, 0x7F, 0x1E, 0x98, 0xC0, 0x15, + 0x6D, 0x86, 0x93, 0x40, 0x1D, 0x0A, 0xFF, 0x59, 0xA1, 0x02, 0x0B, 0xE3, 0x18, 0x18, 0x1E, 0xCA, + 0x02, 0x19, 0x67, 0xA0, 0x02, 0x09, 0xF3, 0x19, 0x19, 0x12, 0xFA, 0x76, 0x01, 0x8D, 0xB6, 0x87, + 0x08, 0x18, 0xDC, 0x61, 0x66, 0x50, 0x38, 0xC3, 0x74, 0x81, 0x8D, 0xA1, 0x01, 0x6A, 0xF0, 0x4F, + 0x76, 0x06, 0x86, 0x17, 0x6C, 0x0C, 0x06, 0x7C, 0x0C, 0x1F, 0x99, 0xC0, 0x02, 0x4F, 0xA5, 0x81, + 0x26, 0x4B, 0x01, 0x19, 0x39, 0x0C, 0x5D, 0x60, 0x81, 0x4D, 0x40, 0x53, 0x17, 0xFA, 0x82, 0x58, + 0x3B, 0x0D, 0xE4, 0x40, 0x54, 0xC1, 0x7C, 0x20, 0xEE, 0x03, 0x4B, 0xBD, 0x3B, 0xC0, 0x06, 0xA4, + 0x1C, 0xCE, 0x32, 0x33, 0x18, 0xEC, 0x05, 0x69, 0x2F, 0xA8, 0xFB, 0x70, 0x1D, 0x24, 0xF1, 0x8B, + 0x8D, 0x41, 0xE0, 0x25, 0xC8, 0x59, 0x06, 0x6B, 0x19, 0x3F, 0xF8, 0x83, 0x94, 0xDC, 0x3B, 0x9F, + 0xF9, 0x4C, 0x12, 0xE4, 0xC9, 0x9B, 0x2C, 0x0C, 0x0F, 0xB8, 0x81, 0x8C, 0x06, 0x0E, 0x83, 0xED, + 0x60, 0x57, 0x3D, 0xE5, 0x60, 0x60, 0xB8, 0x0E, 0xD2, 0x7C, 0x81, 0x85, 0x81, 0x21, 0x06, 0x48, + 0x1F, 0xD2, 0x06, 0xBA, 0x80, 0x13, 0x24, 0xF5, 0x11, 0x88, 0x1F, 0x03, 0x95, 0x82, 0x5C, 0x60, + 0x03, 0x76, 0xCC, 0x51, 0x86, 0x37, 0xAC, 0x13, 0x38, 0x1C, 0xE6, 0x02, 0xFD, 0x96, 0x07, 0xF1, + 0x40, 0xA7, 0xC0, 0x7F, 0x7B, 0x01, 0xBB, 0x53, 0x40, 0x17, 0xAC, 0x81, 0x06, 0xDF, 0x4C, 0x86, + 0x7F, 0xFB, 0x19, 0xBE, 0x01, 0x1D, 0x06, 0xB4, 0x0A, 0x02, 0x1E, 0x32, 0x7F, 0x7F, 0xCF, 0xB0, + 0x15, 0x62, 0x15, 0x34, 0x64, 0x78, 0x36, 0xBC, 0x67, 0xA8, 0x64, 0xD8, 0xA4, 0x8D, 0x08, 0xF1, + 0x5C, 0x06, 0x15, 0x06, 0x3D, 0x90, 0x55, 0x70, 0xF0, 0x98, 0x91, 0x41, 0xC1, 0x6F, 0x2E, 0x52, + 0xA4, 0x30, 0x4C, 0xB8, 0xDF, 0xD5, 0x7A, 0x9E, 0x19, 0x25, 0xD6, 0x14, 0x5A, 0x6F, 0xB1, 0x23, + 0xF3, 0x01, 0x21, 0xC6, 0x58, 0xE3, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x82, 0x86, 0x7F, 0x39, 0x8C, + 0x0C, 0xA8, 0xE0, 0x57, 0xF7, 0xAF, 0x7E, 0x98, 0x98, 0x73, 0x68, 0xA8, 0x2B, 0x03, 0x43, 0x40, + 0x3E, 0x03, 0xC3, 0xB5, 0x7A, 0x88, 0xC8, 0xB3, 0xFF, 0x40, 0xC0, 0xCC, 0xF0, 0x90, 0x13, 0xC4, + 0x8E, 0x03, 0x1B, 0xD1, 0xCF, 0xC4, 0xC0, 0x70, 0xC1, 0xD7, 0xE0, 0x0E, 0x58, 0xFE, 0x87, 0x36, + 0x90, 0xF8, 0xC2, 0x02, 0x24, 0x14, 0xFE, 0xFD, 0xB7, 0x63, 0x58, 0x38, 0x17, 0x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 0x7F, 0xA7, 0xE1, 0xBF, + 0xFE, 0x01, 0x99, 0x6C, 0xB1, 0x61, 0x78, 0x9C, 0x63, 0x60, 0x60, 0x60, 0x50, 0xF8, 0x0F, 0x04, + 0xFA, 0x0C, 0x30, 0xA0, 0xA0, 0xAF, 0xA4, 0xA4, 0x84, 0xC4, 0xE5, 0x07, 0x12, 0xC8, 0xDC, 0xBB, + 0x77, 0x19, 0x91, 0xB9, 0xFF, 0xFF, 0x53, 0x81, 0x0B, 0xB4, 0x51, 0xC9, 0x09, 0xC4, 0xF5, 0x07, + 0xB1, 0x98, 0x40, 0x0E, 0xFA, 0x0F, 0xE2, 0x42, 0x18, 0x10, 0x35, 0x40, 0x2E, 0x44, 0x17, 0x3A, + 0xF7, 0xC3, 0x7F, 0x04, 0x20, 0x95, 0x8B, 0x6A, 0x14, 0x9A, 0xBD, 0x68, 0xAE, 0xA2, 0xA2, 0x7F, + 0x21, 0xDC, 0x77, 0xEF, 0x18, 0x71, 0x87, 0x33, 0x5A, 0x2C, 0x20, 0xE2, 0x08, 0x00, 0xEF, 0xB0, + 0x7E, 0xBC, 0x78, 0x9C, 0x63, 0x60, 0x60, 0x60, 0x48, 0xB8, 0x0B, 0x04, 0xBA, 0x0C, 0x30, 0xD0, + 0xF0, 0x1F, 0x08, 0xF4, 0xE9, 0xCB, 0x75, 0x01, 0x82, 0x25, 0x20, 0x6E, 0x3E, 0x88, 0xC5, 0xFC, + 0x1F, 0x05, 0xF0, 0x0C, 0x14, 0x37, 0x14, 0x08, 0x96, 0x82, 0x58, 0xF5, 0x20, 0x16, 0xCB, 0x40, + 0x05, 0x0E, 0x1A, 0x17, 0x00, 0xCD, 0x2E, 0xE0, 0x49, 0x78, 0x9C, 0x63, 0x60, 0x00, 0x02, 0x81, + 0xFF, 0xFF, 0xF9, 0x19, 0x10, 0x60, 0xD0, 0x71, 0x05, 0x41, 0x40, 0xF1, 0xFF, 0x7F, 0x79, 0x30, + 0x83, 0xF1, 0x3F, 0x18,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F, + 0xD6, 0x3F, 0xE2, 0x11, 0x9A, 0xDC, 0xD5, 0xB1, 0x6C, 0xF2, 0x82, 0x1E, 0xC7, 0x1B, 0xC6, 0x1C, + 0x73, 0x2C, 0xFF, 0x1F, 0xA7, 0x72, 0x3A, 0xBF, 0x72, 0x49, 0x40, 0x71, 0xCC, 0x10, 0x70, 0x8C, + 0xD2, 0x56, 0x51, 0xBC, 0x01, 0x72, 0x2C, 0x74, 0x2F, 0x78, 0x9C, 0x65, 0x90, 0x3F, 0x0E, 0x81, + 0x41, 0x10, 0xC5, 0x47, 0xFC, 0xFF, 0xFF, 0x1D, 0xC1, 0x09, 0xC4, 0x05, 0x14, 0x12, 0xB4, 0x74, + 0x12, 0x05, 0x3A, 0xBA, 0x4F, 0xAF, 0xE0, 0x08, 0x5A, 0x89, 0x84, 0x56, 0x1C, 0x40, 0x89, 0x13, + 0x70, 0x01, 0xF9, 0x44, 0xF4, 0x28, 0x84, 0x44, 0x78, 0xDE, 0x06, 0xD9, 0xDD, 0x98, 0x64, 0x27, + 0xEF, 0x97, 0xD9, 0x9D, 0x37, 0x3B, 0x22, 0x2A, 0x9C, 0xA2, 0x98, 0x71, 0x43, 0xC3, 0xA0, 0x2E, + 0x80, 0x80, 0xC6, 0x3D, 0x31, 0xAE, 0xF1, 0x42, 0x4C, 0x69, 0x3C, 0x13, 0x93, 0x1A, 0x87, 0xC4, + 0x88, 0x46, 0xE7, 0x89, 0x8D, 0x69, 0xB4, 0x36, 0x3B, 0x31, 0x76, 0x16, 0x49, 0xFB, 0x27, 0x72, + 0x7E, 0x95, 0x4B, 0x2A, 0x15, 0x02, 0xD2, 0xC2, 0x29, 0x44, 0x55, 0xFE, 0xCC, 0x16, 0xBC, 0x02, + 0x7D, 0x91, 0xA9, 0xF2, 0xB9, 0x03, 0x95, 0x27, 0x2D, 0xC3, 0xFC, 0x42, 0x53, 0x06, 0x54, 0x4B, + 0x1E, 0x78, 0xF3, 0x17, 0xBC, 0x99, 0x2A, 0x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, + 0x46, 0xBD, 0x47, 0xB2, 0x47, 0x7D, 0xE2, 0x3B, 0x2D, 0x45, 0x38, 0xEF, 0x10, 0x0F, 0x90, 0xB8, + 0xC8, 0x01, 0xE5, 0x15, 0x00, 0xED, 0x4C, 0x63, 0x70, 0xB8, 0xCF, 0xC2, 0x80, 0xEC, 0xA3, 0x5F, + 0xEB, 0x19, 0x41, 0xDC, 0x6F, 0x50, 0xFF, 0x3E, 0xFC, 0x1F, 0x07, 0x0E, 0x1C, 0xA0, 0xFF, 0x90, + 0x42, 0xE3, 0x1F, 0x50, 0xAD, 0xC1, 0x7F, 0x56, 0x06, 0x86, 0x9F, 0x60, 0xEE, 0x64, 0x76, 0x06, + 0x86, 0x04, 0x50, 0x48, 0x36, 0x78, 0x23, 0x62, 0x81, 0x07, 0x39, 0xD8, 0x0F, 0xFC, 0xE7, 0x47, + 0xE6, 0x4E, 0x40, 0xC4, 0x02, 0x18, 0x94, 0x33, 0x42, 0x68, 0x00, 0xA1, 0x7C, 0x71, 0x47, 0x78, + 0x9C, 0x4D, 0x90, 0x3D, 0x4E, 0xC3, 0x40, 0x10, 0x85, 0xC7, 0x71, 0x7E, 0x00, 0xF1, 0x93, 0x9A, + 0x20, 0x48, 0x41, 0x89, 0x94, 0x70, 0x01, 0x30, 0x34, 0x74, 0xC4, 0xB7, 0x80, 0x2E, 0x74, 0x94, + 0x71, 0xC1, 0x1D, 0x68, 0xC3, 0x01, 0x50, 0x72, 0x01, 0x94, 0x23, 0x98, 0x1B, 0x98, 0x20, 0xA8, + 0x22, 0xB1, 0x42, 0x82, 0xFC, 0xA1, 0xF8, 0x63, 0x76, 0x1D, 0x82, 0x9F, 0xB4, 0xD2, 0xBC, 0xDD, + 0x99, 0x7D, 0xF3, 0x9E, 0x88, 0x45, 0x37, 0xF1, 0x25, 0x87, 0x31, 0xDB, 0x79, 0x3A, 0xA3, 0x91, + 0xA7, 0x13, 0x0E, 0x44, 0x42, 0x37, 0x30, 0x6D, 0x8B, 0x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D, 0x8E, 0xFF, 0x40, 0xC0, 0x35, 0x48, + 0x08, 0x00, 0x32, 0x4A, 0x74, 0x25, 0x78, 0x9C, 0xBB, 0x7B, 0x17, 0x0C, 0x58, 0xFF, 0x43, 0x00, + 0xDB, 0x70, 0xA5, 0x01, 0xE7, 0x7D, 0xC9, 0xF5, 0x78, 0x9C, 0x63, 0x60, 0x60, 0x48, 0xBA, 0xF5, + 0x8F, 0x93, 0x81, 0x61, 0xCB, 0x7D, 0x4F, 0x21, 0x06, 0x86, 0x86, 0xFB, 0x2C, 0x0C, 0x40, 0xF0, + 0x83, 0x07, 0x44, 0x06, 0xFC, 0x67, 0x04, 0x51, 0x17, 0xCE, 0x83, 0x48, 0x86, 0x2F, 0xFF, 0x57, + 0xFE, 0x5B, 0xC7, 0xC4, 0xF0, 0xF3, 0x3F, 0x10, 0xE4, 0x33, 0xFC, 0x01, 0x51, 0xFF, 0x59, 0xFF, + 0x81, 0x29, 0x3E, 0x30, 0xF9, 0xDF, 0x1F, 0x42, 0xE5, 0xFF, 0x85, 0x50, 0x60, 0x95, 0xFF, 0xED, + 0x3F, 0x81, 0x29, 0xDE, 0x09, 0x60, 0x8A, 0x85, 0xE1, 0x17, 0x90, 0x8C, 0x67, 0x60, 0x70, 0xF8, + 0xFD, 0xBF, 0x17, 0x6C, 0x3A, 0x08, 0x00, 0x00, 0x81, 0xDD, 0x4B, 0x2C, 0x78, 0x9C, 0x63, 0x60, + 0x80, 0x00, 0x85, 0x9B, 0xFF, 0xE7, 0x31, 0x31, 0x30, 0xFC, 0xF8, 0xFF, 0xFF, 0x7F, 0x3E, 0x43, + 0xC1, 0x7F, 0x10, 0x60, 0xFD, 0x04, 0xA6, 0xF8, 0xBE, 0x83, 0xA9, 0xF8, 0x5F, 0x60, 0x6A, 0x3E, + 0x84, 0xDA, 0xFF, 0x03, 0x42, 0x41, 0x94, 0xAC, 0x6F, 0x80, 0xC8, 0x31, 0xFC, 0x04, 0xAB, 0x64, + 0x70, 0x78, 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xF2, 0x60, + 0xFB, 0xB8, 0x41, 0xAC, 0xEF, 0x20, 0x56, 0x3C, 0x88, 0xF5, 0x07, 0x6A, 0x2D, 0x03, 0x03, 0xD8, + 0x01, 0xE7, 0x41, 0xAC, 0x7F, 0x70, 0x16, 0x58, 0x76, 0x3E, 0x88, 0x05, 0x76, 0xB5, 0x3D, 0x88, + 0xB5, 0x01, 0xC4, 0xE2, 0x04, 0xB1, 0x04, 0x7E, 0x43, 0x25, 0x19, 0x18, 0x02, 0x4E, 0xCD, 0x61, + 0x06, 0x52, 0x00, 0x53, 0xCA, 0xA2, 0x83, 0x78, 0x9C, 0x65, 0x90, 0x41, 0x0E, 0x82, 0x30, 0x10, + 0x45, 0x3F, 0x35, 0x9A, 0x26, 0x82, 0xBA, 0xF2, 0x7A, 0x7A, 0x04, 0x4F, 0xA0, 0x9E, 0x40, 0x08, + 0x7B, 0xA3, 0xC6, 0xBD, 0x5C, 0x41, 0x57, 0x2E, 0xBD, 0x0B, 0x31, 0x86, 0x44, 0xE4, 0xDB, 0xC2, + 0x18, 0x60, 0xFC, 0x9B, 0x79, 0x79, 0x9D, 0x34, 0xED, 0x07, 0x80, 0x00, 0x12, 0x81, 0x73, 0xC5, + 0xBD, 0xF1, 0x90, 0x56, 0xBC, 0x0C, 0xDC, 0x3C, 0xD2, 0x25, 0x76, 0xB0, 0xF5, 0x70, 0x70, 0xF0, + 0xF6, 0xC0, 0x71, 0x0B, 0xF5, 0x09, 0x99, 0x21, 0x69, 0x20, 0x46, 0xDE, 0x00, 0x87, 0x4F, 0x01, + 0x53, 0x08, 0x44, 0x1F, 0x01, 0x5B, 0x0A, 0x6C, 0x64, 0x32, 0xAC, 0xA8, 0x32, 0xD1, 0x82, 0xD3, + 0xFF, 0x9D, 0x52, 0x9B, 0xB0, 0xD0, 0xC6, 0xE6, 0xDA, 0x98, 0x44, 0x09, 0xF7, 0x31, 0x75, 0x51, + 0x04, 0xDC, 0x7A, 0xE2, 0xE1, 0x2B, 0xEA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0x44, 0x3A, 0xA6, 0x30, 0x92, 0xC2, 0x1D, 0x3C, 0xAB, 0x21, 0x6C, 0xA4, + 0x70, 0x80, 0xBE, 0xC0, 0x0B, 0x6A, 0x56, 0x3B, 0x80, 0x78, 0x96, 0xB0, 0x95, 0x97, 0x1D, 0x2C, + 0x04, 0xAE, 0x30, 0xD6, 0x94, 0xB6, 0x9A, 0x9A, 0x02, 0x29, 0xD4, 0x05, 0xB2, 0x22, 0xC6, 0xE4, + 0x31, 0x55, 0x05, 0xFF, 0x0F, 0x7C, 0xB5, 0x27, 0x55, 0xD7, 0x5B, 0x03, 0x1F, 0xD0, 0x12, 0xB8, + 0xE9, 0x80, 0x17, 0x98, 0x0B, 0xAC, 0x75, 0xF6, 0x20, 0x0F, 0x72, 0xFF, 0xFF, 0x40, 0x45, 0x47, + 0x74, 0xB6, 0x48, 0x87, 0xB6, 0x91, 0x25, 0x81, 0x95, 0x66, 0xE7, 0xEB, 0x71, 0x01, 0x26, 0xC8, + 0x68, 0x38, 0x8A, 0xB2, 0xC4, 0x73, 0x14, 0x9E, 0xF7, 0xDD, 0x62, 0xBB, 0x33, 0xFF, 0x07, 0x46, + 0x72, 0x6D, 0x58, 0x78, 0x9C, 0x65, 0xD0, 0x49, 0x0E, 0x41, 0x41, 0x14, 0x85, 0x61, 0x5D, 0x24, + 0x44, 0x3B, 0x32, 0x63, 0x05, 0x9A, 0x05, 0x48, 0xD8, 0x81, 0x05, 0x18, 0x30, 0x30, 0x94, 0x58, + 0x0A, 0x4B, 0x20, 0x31, 0x7F, 0x56, 0xC0, 0x16, 0xEC, 0xC0, 0xCC, 0xF4, 0x69, 0xA2, 0x17, 0x3F, + 0x39, 0x75, 0x4B, 0x22, 0x6A, 0xF4, 0xA5, 0x6E, 0xDD, 0x53, 0xB7, 0xAA, 0x18, 0xB1, 0x75, 0x59, + 0x96, 0x4C, 0x5B, 0xBA, 0x0E, 0x85, 0x3B, 0x4D, 0xA7, 0x09, 0xA4, 0x9C, 0xE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82, 0xDF, 0x81, 0x4C, 0x4E, 0x30, 0xCB, 0x01, 0xC8, 0x3A, 0x0F, 0x11, 0xFC, + 0x04, 0x64, 0xCA, 0x81, 0x59, 0x02, 0x7F, 0x81, 0x4C, 0x66, 0x30, 0x73, 0x03, 0x90, 0x15, 0x0F, + 0x91, 0xFF, 0x01, 0x64, 0x72, 0x80, 0x59, 0x01, 0x40, 0xD6, 0x7E, 0x88, 0xE0, 0x67, 0x20, 0x93, + 0x17, 0xA2, 0xE9, 0xDF, 0xFF, 0xFF, 0xEF, 0x99, 0xC0, 0xCC, 0x03, 0x40, 0x41, 0x7F, 0x88, 0xFC, + 0x2F, 0x20, 0x93, 0x0D, 0xCC, 0x2A, 0x00, 0xB2, 0xE6, 0x43, 0x04, 0x3F, 0x02, 0x99, 0xFC, 0x10, + 0x66, 0x02, 0x42, 0x94, 0xE1, 0x27, 0x90, 0xCD, 0xCE, 0x80, 0x6E, 0x02, 0x92, 0xB9, 0x48, 0xB6, + 0x21, 0xBB, 0x01, 0xC9, 0x65, 0xC8, 0xEE, 0x65, 0x40, 0xF8, 0x02, 0xC9, 0x6F, 0xC8, 0x3E, 0x46, + 0x0A, 0x07, 0x70, 0xE8, 0xD4, 0x23, 0x87, 0x19, 0x00, 0x06, 0xA2, 0x74, 0x8E, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x83, 0x03, 0xFF, 0xFF, 0xFF, 0xF7, 0x87, 0x30, 0x05, 0xFE, 0xFD, 0xFF, 0xFF, 0x9E, + 0x09, 0xC2, 0xFE, 0x0C, 0x14, 0xE6, 0x85, 0x30, 0x03, 0x80, 0xCC, 0xFD, 0x50, 0xD5, 0x3F, 0x80, + 0x6C, 0x0E, 0x08, 0x73, 0x03, 0x90, 0x19, 0x0F, 0x15, 0xFE, 0x0B, 0x64, 0x33, 0x43, 0x98, 0x8F, + 0x80, 0x4C, 0x39, 0x08, 0xD3, 0x01, 0xC8, 0x3C, 0x0F, 0x55, 0xF1, 0x1D, 0xC8, 0xE6, 0x84, 0x30, + 0x17, 0x00, 0x99, 0xF9, 0x50, 0xE1, 0x3F, 0x40, 0x36, 0x0B, 0x84, 0xF9, 0x10, 0xC8, 0xD4, 0x83, + 0x30, 0x0D, 0x80, 0xCC, 0xFB, 0x50, 0x15, 0x3F, 0x81, 0x6C, 0x76, 0xB8, 0xE8, 0x79, 0x84, 0x5A, + 0x39, 0x84, 0x09, 0xCC, 0xE8, 0xE6, 0x22, 0x6C, 0x73, 0x40, 0x38, 0xFE, 0x13, 0x90, 0x29, 0x0B, + 0xF1, 0x28, 0xC8, 0xBD, 0x4C, 0xE8, 0xBE, 0xF8, 0x09, 0xF7, 0x5B, 0x02, 0x42, 0x13, 0x22, 0x1C, + 0x90, 0x42, 0x07, 0x29, 0xCC, 0x00, 0xEF, 0x3A, 0x74, 0x7A, 0x78, 0x9C, 0x65, 0xCF, 0xCD, 0x0D, + 0x01, 0x51, 0x14, 0x86, 0xE1, 0x17, 0xF1, 0x2F, 0xE8, 0x80, 0x12, 0x74, 0xA0, 0x04, 0x3A, 0xA0, + 0x03, 0x3A, 0xA0, 0x03, 0x7B, 0x1B, 0x36, 0x36, 0x36, 0x94, 0xA0, 0x03, 0x3A, 0xA0, 0x03, 0x04, + 0x09, 0x82, 0x71, 0xE7, 0x7E, 0xC9, 0x31, 0x63, 0xCE, 0xEA, 0x49, 0x4E, 0xEE, 0x9B, 0x73, 0x81, + 0x47, 0x10, 0xCE, 0x1E, 0xF8, 0x78, 0x4D, 0xA0, 0xE9, 0x11, 0x74, 0x60, 0x28, 0xD5, 0x60, 0x23, + 0x95, 0xE1, 0x2C, 0xE5, 0xE0, 0x26, 0xA5, 0xE0, 0x99, 0x8C, 0xB4, 0xB4, 0x6C, 0x5B, 0xA4, 0x6A, + 0x91, 0x92, 0x45, 0xB2, 0xC9, 0xC8, 0xD6, 0x22, 0xA3, 0x68, 0x64, 0x6C, 0x91, 0x9D, 0x54, 0x84, + 0x93, 0x94, 0x87, 0xB5, 0x5D, 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4, 0x18, 0x22, 0x17, + 0xA9, 0x90, 0x8F, 0x2C, 0xA1, 0xA7, 0xCB, 0x61, 0x88, 0xB4, 0x43, 0xA4, 0x6E, 0xAB, 0x5A, 0xFB, + 0xD8, 0xFA, 0xBE, 0xE9, 0x2D, 0x02, 0x47, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0xA7, 0xDC, 0x0C, + 0x0C, 0x9B, 0xD6, 0x33, 0x32, 0x34, 0xFC, 0x67, 0x63, 0x08, 0xF8, 0xA7, 0xCB, 0xC0, 0xF0, 0x6B, + 0x3E, 0x50, 0xF4, 0x2F, 0xFF, 0x20, 0x22, 0xFC, 0x81, 0xC4, 0xC2, 0xFF, 0x1C, 0x40, 0xF2, 0xCA, + 0x79, 0x26, 0x20, 0xF9, 0x3D, 0x1E, 0x48, 0x08, 0xFC, 0xE2, 0x04, 0x92, 0x0E, 0xCC, 0x00, 0x30, + 0xFC, 0x2B, 0x81, 0x78, 0x9C, 0x63, 0x60, 0x00, 0x82, 0x0D, 0x71, 0x40, 0x42, 0xE0, 0x97, 0x36, + 0x90, 0x4C, 0xF8, 0xCF, 0x01, 0x24, 0x2F, 0xBD, 0x67, 0x05, 0x92, 0x3F, 0xD7, 0x03, 0x89, 0x0F, + 0xF7, 0x07, 0x0F, 0xF1, 0x05, 0x48, 0x34, 0xFC, 0x97, 0x62, 0x50, 0xF8, 0xE3, 0xCB, 0xC0, 0xF0, + 0xB5, 0x9E, 0x81, 0x61, 0xC2, 0x7A, 0x46, 0x06, 0x06, 0x03, 0x16, 0xA0, 0x14, 0x00, 0x2F, 0x93, + 0x41, 0x7A, 0x78, 0x9C, 0x63, 0x60, 0x00, 0x02, 0x45, 0x25, 0x20, 0x60, 0x02, 0x32, 0x04, 0x5E, + 0xFE, 0x07, 0x01, 0x5E, 0x20, 0xF3, 0x02, 0x88, 0xB1, 0x5F, 0x04, 0x24, 0xFD, 0x0D, 0xC4, 0xE4, + 0x01, 0xB1, 0x18, 0x7E, 0x81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x07, 0x33, 0x13, 0x40, + 0xCC, 0xF3, 0x10, 0x57, 0xFE, 0x01, 0xB1, 0xD9, 0xC1, 0xCC, 0x09, 0x20, 0xE6, 0x7E, 0x16, 0x30, + 0x7B, 0x33, 0x88, 0x7D, 0x9F, 0x09, 0xC8, 0x3A, 0x04, 0x62, 0xF5, 0x83, 0xBC, 0x2A, 0xF0, 0x0F, + 0xC4, 0x04, 0xCB, 0x17, 0x80, 0x95, 0x22, 0xCC, 0xCD, 0x47, 0xB7, 0x0D, 0xC9, 0x0D, 0x94, 0x7B, + 0xE8, 0x13, 0x1A, 0x93, 0x0F, 0x11, 0x92, 0x3C, 0x60, 0xE6, 0x77, 0x44, 0xF8, 0x82, 0x63, 0x83, + 0x15, 0xC8, 0x30, 0xBC, 0x0E, 0xF7, 0x25, 0xD8, 0xDD, 0xE7, 0xC0, 0x9E, 0x04, 0x00, 0xDD, 0x91, + 0xC8, 0xBF, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x00, 0xC3, 0x10, 0x57, 0x26, 0x06, 0x14, 0x90, 0xF8, + 0xFA, 0x3F, 0x10, 0xF4, 0x30, 0x23, 0x09, 0x2D, 0xFA, 0x0F, 0x01, 0xF7, 0x59, 0xE1, 0x42, 0x13, + 0xFE, 0xC3, 0xC0, 0x79, 0x98, 0x4A, 0x83, 0xBF, 0x70, 0xB1, 0xFF, 0xF5, 0x50, 0xB1, 0xAF, 0xFF, + 0x91, 0x00, 0x17, 0x58, 0x28, 0x00, 0x59, 0xE8, 0xFF, 0x7E, 0xB0, 0xD8, 0x17, 0x14, 0x31, 0xB0, + 0x42, 0x05, 0x54, 0x21, 0xB0, 0x89, 0x07, 0xA0, 0xEC, 0xF5, 0x4C, 0x50, 0x06, 0xD0, 0xEA, 0xEF, + 0x10, 0x97, 0x65, 0x31, 0x32, 0x40, 0xC5, 0x78, 0x19, 0x18, 0xFE, 0x81, 0x68, 0x7D, 0x90, 0xC1, + 0x50, 0xB1, 0x7C, 0x86, 0x02, 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x56, 0xDF, 0xEF, 0x51, 0xBB, 0x00, 0x38, 0x40, 0x61, 0xED, 0x16, 0xA0, 0x1A, 0xB1, 0x1E, 0x0F, + 0xBF, 0x6D, 0x81, 0x47, 0x65, 0x05, 0xFA, 0xB5, 0x42, 0xEA, 0x62, 0xC8, 0xED, 0xD4, 0x35, 0xEB, + 0xC9, 0x9C, 0xE1, 0x66, 0xB9, 0x91, 0x89, 0x9A, 0xB4, 0x57, 0x2F, 0x06, 0x12, 0x36, 0x2F, 0xDB, + 0x2C, 0x63, 0x1B, 0xC9, 0x9E, 0x7A, 0x61, 0x82, 0xCE, 0xB2, 0x7D, 0x6E, 0xF0, 0x93, 0x9D, 0x9A, + 0x7B, 0xEF, 0x5E, 0x7F, 0x4A, 0x71, 0xBF, 0xCD, 0x5F, 0xFF, 0x41, 0xA4, 0x12, 0x56, 0x78, 0x9C, + 0x55, 0x92, 0xBD, 0x4E, 0x42, 0x41, 0x10, 0x85, 0xCF, 0x45, 0xB9, 0xA2, 0x04, 0xA4, 0xB1, 0xD1, + 0x44, 0x79, 0x03, 0x78, 0x01, 0x13, 0xE9, 0x34, 0x26, 0x46, 0xE3, 0x03, 0xE8, 0x03, 0x68, 0x30, + 0x96, 0x16, 0x42, 0x61, 0x65, 0x23, 0x4F, 0x20, 0x96, 0x76, 0x60, 0x67, 0xA1, 0xB9, 0x74, 0x16, + 0x36, 0x14, 0x74, 0x16, 0x62, 0x62, 0x6B, 0xC0, 0xBF, 0x00, 0x22, 0xAE, 0x3B, 0x3F, 0x5C, 0xF6, + 0x9E, 0xE4, 0x66, 0x67, 0xBF, 0xB0, 0x33, 0x73, 0x86, 0x01, 0x58, 0x3B, 0xD7, 0x8F, 0x77, 0xE7, + 0x0B, 0x70, 0xF5, 0x60, 0x58, 0x07, 0x0E, 0xEA, 0x1B, 0xD5, 0x69, 0x88, 0x5E, 0x4D, 0xA8, 0x55, + 0x45, 0x65, 0xE3, 0xC8, 0x17, 0xF6, 0xE3, 0xB2, 0x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 0x8F, + 0x24, 0x63, 0x59, 0x61, 0xE0, 0xA2, 0xA6, 0xEC, 0xD5, 0x95, 0xCB, 0xD2, 0xBA, 0x80, 0xDD, 0x31, + 0xAA, 0x8E, 0xF6, 0xB4, 0x18, 0x0F, 0xE7, 0xD2, 0x8B, 0x97, 0x37, 0xD0, 0xB5, 0x3C, 0x9B, 0x72, + 0x17, 0xFF, 0xE8, 0x99, 0xA2, 0xDB, 0x75, 0x35, 0xFE, 0x01, 0x7B, 0x27, 0x09, 0x1B, 0x78, 0x9C, + 0x85, 0x92, 0xBD, 0x4E, 0x02, 0x41, 0x14, 0x85, 0xEF, 0xEE, 0x92, 0xAC, 0x82, 0x01, 0x1A, 0x5B, + 0xA5, 0x33, 0x56, 0x6E, 0x63, 0xAD, 0xA5, 0x8D, 0x41, 0x0A, 0x0B, 0x13, 0x13, 0x7C, 0x00, 0x13, + 0x7C, 0x02, 0x97, 0xC2, 0xCA, 0x06, 0x9E, 0x40, 0x28, 0xED, 0xF0, 0x01, 0x34, 0x50, 0x69, 0x61, + 0x21, 0x85, 0x9D, 0x89, 0x60, 0x45, 0x09, 0x1A, 0x04, 0x64, 0x81, 0xE3, 0xBD, 0xB3, 0xEB, 0x30, + 0x68, 0xE1, 0x49, 0x76, 0xB2, 0xF3, 0x25, 0xF7, 0x77, 0x0E, 0x91, 0x52, 0xEE, 0xFA, 0xF1, 0xF6, + 0x72, 0x95, 0x4C, 0xDD, 0x43, 0xE9, 0xD4, 0x40, 0x1D, 0x44, 0x3A, 0xD7, 0xE8, 0x19, 0x5A, 0xFB, + 0x11, 0x3A, 0x83, 0x21, 0x37, 0x64, 0x5F, 0x26, 0xAB, 0x28, 0x54, 0xC5, 0x82, 0x96, 0x85, 0x8D, + 0x16, 0x59, 0x89, 0xD1, 0x81, 0x8A, 0x08, 0xE4, 0x3C, 0xB6, 0x72, 0x53, 0x20, 0x46, 0xF4, 0xC6, + 0x97, 0xBA, 0x3D, 0xE0, 0xD3, 0x0F, 0x13,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 0xA8, 0xA6, 0x28, 0x01, 0x28, 0x62, 0xC7, + 0xC0, 0xF0, 0x1F, 0x15, 0xBC, 0x67, 0x46, 0x17, 0xF9, 0xAF, 0x87, 0x21, 0xF2, 0x9E, 0x09, 0x5D, + 0x64, 0x3F, 0x86, 0x1A, 0x6E, 0x86, 0x55, 0x08, 0xB0, 0x0B, 0xAC, 0x04, 0x19, 0x2C, 0x00, 0x8A, + 0xF0, 0xA0, 0x88, 0xFC, 0xFA, 0xFF, 0xFF, 0x3C, 0xA9, 0x4A, 0x26, 0x60, 0x28, 0xF9, 0x09, 0x54, + 0xC2, 0x88, 0xAE, 0x44, 0x06, 0x5D, 0xC9, 0x7D, 0x14, 0x25, 0x09, 0x77, 0xEF, 0xDE, 0x95, 0x86, + 0x30, 0x01, 0xE8, 0x8C, 0xA0, 0x39, 0x78, 0x9C, 0x63, 0x60, 0x00, 0x02, 0x81, 0xBB, 0x77, 0xB9, + 0x18, 0x10, 0x40, 0xE0, 0xFF, 0x7F, 0x9E, 0xC1, 0xCC, 0x7D, 0x07, 0x06, 0xFF, 0xFF, 0xBF, 0x07, + 0xD3, 0x5C, 0xFF, 0x51, 0x00, 0x0F, 0x49, 0x5C, 0x41, 0x10, 0x50, 0xFC, 0xFF, 0x5F, 0x06, 0xCC, + 0x18, 0x2C, 0x1E, 0xC4, 0xCF, 0x05, 0x00, 0x17, 0x07, 0x78, 0x1F, 0x78, 0x9C, 0xFB, 0xFF, 0x1F, + 0x19, 0x70, 0xA3, 0xF0, 0xFE, 0xF3, 0x90, 0xC4, 0x05, 0x00, 0x84, 0x61, 0x45, 0xF6, 0x78, 0x9C, + 0x63, 0x60, 0x00, 0x02, 0x81, 0xFF, 0xFF, 0x79, 0x18, 0x10, 0x80, 0x12, 0x2E, 0x3D, 0xC0, 0x7F, + 0x14, 0xC0, 0x8D, 0xCA, 0xE5, 0x21, 0x89, 0x4B, 0x5F, 0x87, 0x53, 0x27, 0x9C, 0x01, 0xAA, 0x20, + 0x5A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x47, 0x36, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x01, 0x01, 0x61, 0x06, 0x34, 0xF0, 0xF3, + 0x3F, 0x27, 0xAA, 0xC0, 0x84, 0xFF, 0xFF, 0xF7, 0xA3, 0x8A, 0x7C, 0xF8, 0xFF, 0xFF, 0x3F, 0x17, + 0x8A, 0xC8, 0x27, 0xA0, 0x48, 0x3F, 0x8A, 0xC8, 0x47, 0xA0, 0xC8, 0x7F, 0x36, 0x34, 0x73, 0xFE, + 0xFF, 0xF7, 0x47, 0x51, 0xF4, 0x1B, 0x24, 0xC4, 0x8C, 0x2C, 0xB2, 0x01, 0x24, 0xA2, 0x87, 0xA2, + 0xE8, 0x17, 0x50, 0xE4, 0x3E, 0x23, 0x83, 0xC1, 0xEB, 0xFF, 0x28, 0x80, 0x87, 0xE1, 0x33, 0xAA, + 0xC0, 0xFF, 0xF5, 0x10, 0xF3, 0x90, 0x01, 0xE7, 0x3F, 0x74, 0x91, 0x7C, 0x0C, 0x11, 0xFB, 0x9F, + 0xE8, 0x22, 0x2C, 0x07, 0xD1, 0x35, 0x31, 0x30, 0x4C, 0x5D, 0x05, 0x03, 0x7F, 0x40, 0x22, 0x1C, + 0x48, 0x0E, 0x34, 0x00, 0x19, 0x39, 0x1F, 0xD9, 0xC9, 0xDF, 0x40, 0x4A, 0xB8, 0x91, 0x04, 0x1C, + 0x40, 0x02, 0xE7, 0x91, 0x95, 0x5C, 0x00, 0x89, 0xC8, 0xA1, 0x87, 0xE1, 0x7B, 0x26, 0x74, 0x11, + 0x7B, 0x94, 0xB0, 0x78, 0x00, 0x14, 0x61, 0x45, 0x11, 0x49, 0x00, 0xBB, 0x0E, 0x05, 0x6C, 0xD9, + 0x07, 0x09, 0x52, 0x00, 0x9D, 0x63, 0xCB, 0x15, 0x78, 0x9C, 0x63, 0x60, 0xC0, 0x0B, 0x5A, 0x31, + 0x44, 0xBE, 0x72, 0x60, 0x88, 0xF4, 0x63, 0x88, 0xFC, 0x47, 0x57,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, 0x0D, 0xB3, 0x80, 0xF7, + 0x91, 0x0C, 0xA8, 0xA0, 0x84, 0x19, 0x4D, 0x80, 0x01, 0x00, 0xCE, 0x5B, 0x58, 0x37, 0x78, 0x9C, + 0x33, 0x63, 0x40, 0x07, 0x9F, 0x73, 0xD1, 0x45, 0x26, 0xFC, 0x9F, 0xCF, 0x8C, 0x2A, 0x22, 0xF0, + 0xFF, 0xFF, 0x79, 0x56, 0x54, 0xA1, 0xEF, 0xFF, 0xFF, 0xBF, 0xD7, 0x40, 0x11, 0xB9, 0xF0, 0x1F, + 0x08, 0xA2, 0x91, 0x45, 0x1C, 0x40, 0x22, 0xFF, 0xFB, 0x18, 0x91, 0x84, 0x7E, 0x83, 0x85, 0xF6, + 0xB3, 0x20, 0x44, 0x3E, 0x81, 0x45, 0xFE, 0xDF, 0x17, 0x87, 0x8B, 0x34, 0xFC, 0x87, 0x02, 0x2F, + 0xB8, 0xD0, 0x3F, 0x98, 0x50, 0x2E, 0xCC, 0xB0, 0xAF, 0x30, 0x11, 0xB8, 0x63, 0x0F, 0xC0, 0x45, + 0xFE, 0x9F, 0x67, 0x03, 0x8B, 0x18, 0xFC, 0x47, 0x02, 0x9A, 0x48, 0xF6, 0x43, 0x01, 0x17, 0x50, + 0x40, 0x01, 0x59, 0x00, 0xEC, 0xFA, 0x0D, 0x08, 0x3E, 0xD4, 0x87, 0x5F, 0xD0, 0x0D, 0x66, 0xF8, + 0x8B, 0x6E, 0x79, 0x01, 0xDC, 0x81, 0x30, 0x27, 0x7F, 0x84, 0x0A, 0x58, 0xC1, 0x3D, 0xF1, 0x13, + 0xDD, 0xA3, 0x10, 0xF7, 0xAD, 0x47, 0x0A, 0x8C, 0x03, 0x18, 0x01, 0xF6, 0x15, 0x3D, 0x50, 0x81, + 0x61, 0x81, 0x16, 0xF0, 0x0D, 0x18, 0x91, 0xF3, 0x69, 0x3E, 0x13, 0xAA, 0x00, 0x43, 0x3A, 0x03, + 0x3A, 0x00, 0x00, 0x5B,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x04, 0x32, 0xEE, 0x2F, 0x9A, + 0xD0, 0x7F, 0x1D, 0x06, 0x74, 0x91, 0xFF, 0xF3, 0x31, 0x84, 0xDE, 0xB3, 0x60, 0x08, 0x71, 0x32, + 0xA0, 0x0B, 0xF9, 0x32, 0xA0, 0x0B, 0xCD, 0x67, 0x40, 0x17, 0xBA, 0xCF, 0x0C, 0x11, 0x5A, 0x5B, + 0x51, 0x0E, 0x06, 0xC7, 0xC1, 0x06, 0x81, 0x84, 0xE2, 0x11, 0x21, 0x61, 0x0B, 0x61, 0xFC, 0xE7, + 0x80, 0x0B, 0xF5, 0x43, 0x19, 0xFF, 0x99, 0x60, 0x42, 0x09, 0xCC, 0x50, 0xC6, 0x7B, 0xCC, 0x10, + 0xBF, 0x8F, 0x29, 0x14, 0x86, 0x29, 0x04, 0x00, 0x09, 0x3E, 0xCC, 0x02, 0x78, 0x9C, 0x65, 0xD0, + 0x5F, 0x0D, 0x80, 0x20, 0x10, 0xC0, 0x61, 0x50, 0x36, 0x37, 0x1C, 0x0F, 0x24, 0x30, 0x82, 0x11, + 0xB0, 0x81, 0x36, 0x31, 0x82, 0x11, 0xAC, 0xA0, 0x09, 0x8C, 0x60, 0x14, 0xA2, 0x9C, 0x3A, 0xF9, + 0xF1, 0x00, 0xF7, 0x72, 0xDF, 0xD8, 0xB8, 0x7F, 0x4A, 0xE5, 0x58, 0xC0, 0x61, 0x80, 0x03, 0x3B, + 0x90, 0xE6, 0x4B, 0xDE, 0x9F, 0xD2, 0x7F, 0x90, 0x37, 0x66, 0x10, 0x81, 0x74, 0x60, 0x04, 0x37, + 0x10, 0x03, 0x1C, 0xD8, 0x80, 0x68, 0x60, 0xC1, 0x0C, 0x22, 0x10, 0x53, 0xBE, 0x84, 0xEA, 0x17, + 0x75, 0xD6, 0xAA, 0x57, 0x9B, 0x70, 0x31, 0xCF, 0x50, 0xCE, 0x9C, 0xB7, 0x08, 0xAC, 0x6C, 0x81, + 0x4E, 0xD8, 0xAA, 0xFB, 0x70, 0xB1, 0xE9, 0x4F, 0x0F, 0xDF, 0x4C, 0xA5, 0x31, 0x78, 0x9C, 0x63, + 0x60, 0x80, 0x00, 0x77, 0x06, 0x34, 0xF0, 0x82, 0x11, 0x4D, 0xE0, 0x07, 0x37, 0x94, 0x21, 0x08, + 0x05, 0x3F, 0xE6, 0x43, 0x05, 0xFE, 0xC3, 0x01, 0x3B, 0xBA, 0x40, 0x3F, 0xBA, 0xC0, 0x7F, 0x2E, + 0x74, 0x81, 0xFB, 0xCC, 0x68, 0x02, 0xFF, 0xE7, 0x33, 0xA2, 0x09, 0xFC, 0xEF, 0x67, 0x42, 0x13, + 0xF8, 0xBF, 0x5F, 0x0D, 0x4D, 0xE0, 0xFF, 0xFF, 0x3E, 0x54, 0xEE, 0x79, 0x75, 0x54, 0x15, 0xF3, + 0x99, 0xF0, 0xDB, 0x82, 0xE1, 0x0E, 0x19, 0x34, 0x97, 0xEE, 0x47, 0xF7, 0x0B, 0x34, 0x40, 0x14, + 0x95, 0x20, 0xE0, 0xE7, 0x79, 0xF4, 0x10, 0x93, 0x45, 0x17, 0x60, 0x42, 0x13, 0x08, 0x47, 0x0F, + 0x75, 0x38, 0x00, 0x00, 0x3C, 0x92, 0xC3, 0x03, 0x78, 0x9C, 0x63, 0x60, 0x80, 0x80, 0x99, 0x33, + 0x3B, 0x19, 0x90, 0x81, 0xC0, 0xF9, 0xFF, 0xFF, 0x39, 0x51, 0x04, 0xE4, 0xFF, 0xFE, 0xAF, 0x47, + 0x11, 0xE0, 0x7F, 0xF4, 0xFF, 0x3F, 0x0B, 0x8A, 0x80, 0xC1, 0xFF, 0xFF, 0xF6, 0x28, 0x02, 0x0C, + 0x5F, 0xFE, 0xBF, 0x67, 0x04, 0xB2, 0x04, 0x21, 0x40, 0x91, 0x9F, 0x21, 0xE0, 0xFF, 0x7F, 0x1E, + 0xA0, 0xC0, 0x7F, 0x28, 0xE0, 0x67, 0x60, 0xF8, 0xFE, 0x7F, 0x3F, 0x50, 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CD, 0x8D, 0xE4, 0x51, 0x86, 0xF3, 0x33, + 0x89, 0x32, 0x69, 0xC8, 0x91, 0x40, 0x45, 0x07, 0x3B, 0x32, 0xFF, 0x97, 0x0B, 0xA0, 0x26, 0xC7, + 0xC0, 0x66, 0x2A, 0x32, 0x90, 0x54, 0x01, 0xAC, 0xBA, 0x86, 0x6F, 0x72, 0xE2, 0x21, 0x25, 0x4B, + 0x0F, 0x78, 0x49, 0xCA, 0xC3, 0x5A, 0x1A, 0x7A, 0xC0, 0x9D, 0x91, 0xC2, 0xA1, 0xD0, 0x3D, 0x68, + 0xAC, 0xC2, 0x29, 0xD3, 0x73, 0xF0, 0x18, 0x28, 0x9C, 0x97, 0xF0, 0x10, 0x5F, 0x8D, 0xCC, 0xDB, + 0xB9, 0xA8, 0x87, 0x2A, 0x72, 0x21, 0xB6, 0xB7, 0x4E, 0x0B, 0x7D, 0x76, 0x52, 0x5B, 0x85, 0x3C, + 0x0B, 0x7E, 0xEA, 0xD9, 0x0F, 0x60, 0x11, 0x78, 0x98, 0x6E, 0xFD, 0x01, 0xAA, 0x4E, 0x47, 0xB2, + 0x78, 0x9C, 0x63, 0x60, 0x80, 0x83, 0x00, 0x06, 0x74, 0xF0, 0x81, 0x15, 0x43, 0x24, 0x0E, 0x43, + 0xE4, 0x11, 0x58, 0xD1, 0x85, 0xFF, 0x08, 0x60, 0x00, 0x56, 0x94, 0x20, 0x2B, 0x08, 0x07, 0x0C, + 0x8F, 0xC1, 0x8A, 0xEC, 0x90, 0xF4, 0x41, 0x14, 0xAD, 0x40, 0x36, 0xEA, 0x33, 0x48, 0xD1, 0x27, + 0x46, 0x24, 0x11, 0x87, 0x78, 0x20, 0xB1, 0x81, 0x1D, 0x59, 0xD1, 0x17, 0xA0, 0xA2, 0x00, 0x1E, + 0x64, 0x91, 0x02, 0xA0, 0xA2, 0x0D, 0x6C, 0x28, 0x06, 0xFD, 0x67, 0x66, 0xB8, 0x82, 0x2C, 0x60, + 0xF0, 0xBF,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xEF, 0x20, 0xC7, 0x22, 0xB8, 0xB3, 0xCA, 0x57, 0xFE, 0x95, 0x47, 0xD6, 0xCC, 0x20, 0x20, + 0x0A, 0x00, 0x0F, 0xBA, 0x5B, 0xFE, 0x78, 0x9C, 0x9B, 0xF0, 0x1F, 0x0C, 0xEA, 0x19, 0x40, 0xC0, + 0x0C, 0x44, 0xFC, 0x80, 0x88, 0xB0, 0x81, 0xD8, 0x6F, 0x98, 0x80, 0x44, 0x01, 0x44, 0x20, 0x1E, + 0x24, 0xF0, 0xC7, 0x0E, 0x44, 0x7E, 0x83, 0x88, 0xB0, 0x03, 0x99, 0x3F, 0xFF, 0x73, 0x00, 0xC9, + 0x84, 0x33, 0x60, 0x90, 0x63, 0x64, 0x6C, 0xFC, 0xED, 0xFF, 0x7B, 0x76, 0x06, 0x38, 0xF8, 0x03, + 0x56, 0x78, 0x9E, 0x81, 0xA1, 0x01, 0xA2, 0xA5, 0x1F, 0x28, 0xF6, 0xE5, 0xFF, 0x79, 0x16, 0x90, + 0x46, 0x30, 0x00, 0xE9, 0xFE, 0xF5, 0x1E, 0x68, 0xD9, 0x04, 0x84, 0x02, 0x86, 0x3F, 0xBA, 0x0C, + 0x28, 0x0A, 0x18, 0x6E, 0x31, 0xA2, 0x2A, 0x60, 0x50, 0x01, 0x62, 0x00, 0x7E, 0xF6, 0x5A, 0x0B, + 0x78, 0x9C, 0x63, 0x60, 0x40, 0x06, 0x4C, 0x08, 0x66, 0x46, 0x68, 0xDB, 0x2B, 0x79, 0x04, 0xF7, + 0xE7, 0xFF, 0xFF, 0xFF, 0x39, 0x11, 0xDC, 0x03, 0x40, 0x2E, 0x33, 0x92, 0xC6, 0x6F, 0xFF, 0xEF, + 0x23, 0x9B, 0xF3, 0xEB, 0x7F, 0x3F, 0x12, 0xEF, 0x60, 0xFF, 0xAF, 0x78, 0x04, 0xCF, 0xE0, 0x1F, + 0xDB, 0x17, 0x7B, 0x08, 0x33, 0x48, 0x99, 0x91, 0xE1, 0x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x04, 0x09, 0x42, 0x00, 0x74, + 0x8E, 0x82, 0x9A, 0x78, 0x9C, 0x33, 0x08, 0x05, 0x01, 0x15, 0x06, 0x04, 0xF8, 0xF5, 0x1F, 0x0C, + 0xD8, 0x41, 0xEC, 0x84, 0xBF, 0xBE, 0x40, 0xF2, 0x27, 0x44, 0x24, 0x1F, 0x24, 0xF2, 0xE1, 0xFF, + 0x7F, 0x56, 0x06, 0x86, 0x8F, 0x10, 0x91, 0xFF, 0x2C, 0x40, 0x91, 0x0D, 0x60, 0x99, 0x02, 0xA8, + 0x88, 0x3D, 0x50, 0x24, 0x00, 0x48, 0xB3, 0x31, 0x30, 0xFC, 0x81, 0x88, 0xBC, 0x67, 0x66, 0x60, + 0x30, 0x00, 0xD2, 0xF5, 0x0C, 0x0C, 0x9F, 0xA1, 0x8A, 0xEE, 0xAF, 0x5E, 0xF5, 0x1A, 0x62, 0xC7, + 0x84, 0xFF, 0xA8, 0x20, 0x9E, 0x41, 0x00, 0x4D, 0xE4, 0x3C, 0x58, 0x33, 0x32, 0xE8, 0x67, 0x38, + 0x00, 0x63, 0x9E, 0x3D, 0xF3, 0x17, 0x44, 0xF1, 0x30, 0x7C, 0x83, 0x0A, 0x00, 0xAD, 0x75, 0x00, + 0x52, 0xFB, 0x19, 0x04, 0xFE, 0x21, 0x1C, 0x0D, 0x12, 0xE1, 0x66, 0x58, 0x00, 0x55, 0xC2, 0x09, + 0x14, 0x01, 0xB2, 0xD7, 0x33, 0x30, 0x7C, 0x81, 0xD9, 0x00, 0xF1, 0x17, 0x27, 0xDC, 0xC9, 0x72, + 0x20, 0x91, 0x02, 0xB0, 0xDE, 0x67, 0x10, 0x25, 0x4C, 0xE0, 0xA0, 0x31, 0x64, 0x04, 0x12, 0x00, + 0x43, 0x89, 0xC0, 0x7F, 0x78, 0x9C, 0x63, 0x48, 0xEE, 0x00, 0x82, 0x8A, 0x74, 0x66, 0x06, 0x04, + 0x68, 0xF8, 0x0F, 0x01, 0xFB, 0x19,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0x22, 0x14, 0x23, 0x48, 0x40, 0xA2, 0x44, 0x72, 0x85, 0x44, 0x81, 0xF0, + 0x1F, 0x24, 0x4A, 0x95, 0xCE, 0xEE, 0x10, 0x0D, 0xFC, 0x42, 0x24, 0x6A, 0x44, 0xFE, 0xC0, 0x11, + 0x1F, 0x80, 0x79, 0x7C, 0x40, 0xA8, 0x28, 0x49, 0xCA, 0xD0, 0x60, 0x23, 0x5C, 0xD0, 0x20, 0x43, + 0x43, 0x6B, 0x14, 0x22, 0x05, 0xC7, 0x38, 0xC3, 0xDE, 0x9D, 0x43, 0x42, 0x60, 0x0B, 0x7B, 0x35, + 0x77, 0x37, 0x33, 0x3B, 0x4B, 0xF4, 0x7F, 0x39, 0x77, 0x63, 0xDC, 0xEF, 0xCF, 0x00, 0x97, 0x90, + 0xE5, 0xE9, 0x13, 0xA0, 0x05, 0xBF, 0xAE, 0x53, 0xAD, 0x07, 0x37, 0x07, 0xAC, 0xAC, 0xAD, 0xE7, + 0x57, 0x77, 0x14, 0x32, 0x88, 0x16, 0xF2, 0xB3, 0x47, 0x2C, 0x8A, 0x5F, 0x15, 0xC6, 0x0F, 0xE1, + 0xC8, 0x16, 0xDF, 0x0F, 0x8F, 0x68, 0x4F, 0xD2, 0xE9, 0xCC, 0x28, 0xDE, 0x67, 0x06, 0x85, 0xB1, + 0x40, 0x3E, 0x99, 0x38, 0x5D, 0xE1, 0x93, 0x88, 0x2E, 0x94, 0x48, 0x88, 0x03, 0x0A, 0xB8, 0xEB, + 0x57, 0x2C, 0xE4, 0x5A, 0x6F, 0x30, 0x2C, 0x7E, 0x96, 0x18, 0xF4, 0x7C, 0x13, 0x15, 0x88, 0xCC, + 0xF4, 0x38, 0x29, 0xD0, 0xA8, 0x48, 0x0C, 0xAE, 0x8D, 0x71, 0x48, 0xF4, 0x0A, 0x6C, 0xB1, 0x4E, + 0xC9, 0xF1, 0x89, 0x1A, 0x40, 0x44, 0x34, 0x04, 0x98, 0x36, 0xB0, 0x5B, 0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x6C, 0x6F, 0xA2, 0x1B, 0x7F, 0x00, 0xF4, 0x07, 0x20, 0x92, 0x58, 0x0A, 0xA5, 0x36, 0xAE, 0x85, + 0x05, 0xDD, 0x62, 0x62, 0x63, 0x85, 0x01, 0x54, 0x5E, 0xBB, 0xE3, 0xCC, 0xDD, 0x45, 0x88, 0x89, + 0x93, 0xEC, 0xEC, 0xEC, 0xD9, 0x33, 0x33, 0xE7, 0xDE, 0x19, 0xE0, 0x1F, 0x2B, 0x3E, 0x3A, 0xF4, + 0x74, 0xEC, 0x5B, 0x43, 0x6E, 0x48, 0x59, 0x33, 0xF0, 0x8B, 0x18, 0x64, 0x1E, 0xFA, 0xB5, 0x52, + 0x8F, 0x9A, 0x4B, 0x5E, 0xC6, 0xAE, 0xFB, 0x55, 0xD0, 0xA6, 0x7D, 0x0F, 0x1A, 0x5B, 0x01, 0x48, + 0x4A, 0x00, 0x2F, 0x14, 0x3A, 0x13, 0x24, 0x47, 0x71, 0xE8, 0x55, 0xA0, 0x51, 0x00, 0x66, 0xE5, + 0x45, 0x90, 0xA1, 0x51, 0x1D, 0x98, 0xF0, 0xD3, 0xA2, 0x20, 0x57, 0xA5, 0x1D, 0x86, 0x6C, 0x26, + 0x51, 0x94, 0x83, 0x79, 0x99, 0x69, 0x64, 0x72, 0x3B, 0x8B, 0x49, 0x97, 0x52, 0xA1, 0x45, 0x21, + 0x7C, 0xA5, 0x9D, 0x08, 0x86, 0x59, 0x60, 0x11, 0x55, 0x7D, 0x66, 0x11, 0xD8, 0xD1, 0x71, 0x12, + 0xD3, 0x18, 0x70, 0xBA, 0x27, 0x48, 0xE9, 0x88, 0x5B, 0xF9, 0xBA, 0x55, 0x10, 0x6B, 0x9A, 0xD0, + 0x36, 0xE3, 0x64, 0xFA, 0x1A, 0x75, 0x54, 0x3A, 0x45, 0x53, 0x64, 0x50, 0x93, 0xE5, 0x11, 0xC5, + 0xFB, 0x59, 0xA4, 0x06, 0x46, 0x0D, 0xDC, 0x90, 0x06,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 0x1D, 0xD2, 0x58, 0x10, 0x72, 0x8D, 0xFF, 0x98, 0x19, 0x26, 0x02, + 0x43, 0x43, 0x92, 0x81, 0xE1, 0x9F, 0x16, 0x48, 0x20, 0xE1, 0xFE, 0x71, 0x2E, 0x87, 0x7F, 0x96, + 0x0C, 0xCD, 0xEF, 0x59, 0x12, 0xF2, 0xFF, 0x70, 0x00, 0x45, 0xBE, 0xB3, 0x39, 0xD8, 0x1B, 0xE8, + 0x08, 0xA4, 0x33, 0x6E, 0x64, 0x79, 0xC0, 0xE1, 0xB0, 0x0E, 0x68, 0x80, 0x3F, 0x03, 0xC3, 0x6D, + 0x60, 0x10, 0xFD, 0xB7, 0x63, 0x60, 0x78, 0xC9, 0xC8, 0xF0, 0x88, 0x9D, 0xE1, 0x01, 0x3B, 0x03, + 0xC3, 0x43, 0x6E, 0x86, 0x09, 0x4A, 0x9C, 0xE0, 0x10, 0x73, 0xD0, 0x07, 0x5B, 0x64, 0xB0, 0x1E, + 0x6C, 0xC5, 0x77, 0xA0, 0x24, 0x43, 0x37, 0x10, 0x02, 0xC1, 0x63, 0x90, 0xB3, 0x37, 0xE7, 0x43, + 0x9C, 0x04, 0x09, 0xA4, 0x9F, 0xEB, 0x3A, 0x6E, 0xED, 0x07, 0x7B, 0xEA, 0x23, 0x83, 0x3E, 0x24, + 0xA8, 0xA7, 0xEE, 0xAE, 0x82, 0xF8, 0xF2, 0x03, 0x93, 0x3E, 0x83, 0x02, 0x2C, 0x74, 0x19, 0x18, + 0x16, 0xB0, 0x41, 0x44, 0xF8, 0xE1, 0x22, 0x07, 0xD8, 0x69, 0x2A, 0x02, 0x00, 0x72, 0x6E, 0x6A, + 0x09, 0x78, 0x9C, 0x45, 0xD1, 0xBD, 0x4A, 0x03, 0x41, 0x10, 0x07, 0xF0, 0x7F, 0xE2, 0x45, 0x43, + 0xE2, 0xC7, 0x45, 0xB0, 0x14, 0x63, 0x63, 0xA3, 0xC8, 0x81, 0x01, 0xCB, 0x08, 0x36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, + 0x12, 0x18, 0x02, 0xBC, 0x50, 0x46, 0x80, 0x3C, 0x94, 0xB1, 0xA1, 0x1E, 0xCA, 0xF8, 0xB0, 0x07, + 0xCA, 0xF8, 0xBC, 0x06, 0xCA, 0xF8, 0x5E, 0x0B, 0xB5, 0xE3, 0x67, 0x34, 0x2B, 0x84, 0xF1, 0xEB, + 0x1E, 0x1B, 0x84, 0xB1, 0x6B, 0x35, 0x3B, 0x84, 0xF1, 0x63, 0x3F, 0x8C, 0xB1, 0x07, 0x43, 0x84, + 0x14, 0xC6, 0xCE, 0xD9, 0x50, 0xC6, 0xEF, 0xFF, 0x50, 0xC6, 0xD2, 0x59, 0x50, 0xDB, 0xBF, 0xBF, + 0x87, 0xB8, 0x5E, 0xC0, 0x3C, 0x12, 0x22, 0x15, 0xE0, 0x92, 0xE8, 0x02, 0x66, 0x14, 0x38, 0x3B, + 0x96, 0x80, 0x19, 0x0D, 0x4E, 0x46, 0x2D, 0x10, 0x86, 0xB1, 0x32, 0x8C, 0x21, 0x02, 0x61, 0x04, + 0xA8, 0xA9, 0x85, 0x00, 0x29, 0x85, 0x72, 0x41, 0x49, 0x77, 0x31, 0x05, 0x66, 0x86, 0x54, 0x47, + 0x4D, 0x75, 0x77, 0x35, 0xF7, 0x29, 0x4C, 0x1C, 0xD9, 0x6D, 0x4E, 0xE9, 0x49, 0x33, 0xD8, 0x39, + 0x38, 0x99, 0x1B, 0x44, 0x54, 0x36, 0x33, 0xB1, 0x71, 0x4E, 0xE1, 0x10, 0x60, 0x67, 0xD0, 0x60, + 0x98, 0x05, 0xF2, 0x2C, 0x13, 0x03, 0x23, 0x90, 0x04, 0x00, 0x1B, 0x8D, 0x31, 0x30, 0x78, 0x9C, + 0x53, 0xE8, 0x62, 0x67, 0xC0, 0x00, 0x0D, 0x0C, 0x01, 0x98, 0x82, 0x01, 0x96, 0x1E, 0x98, 0x82, + 0x0C, 0x0C, 0xD8, 0x04, 0x1B, 0x4C, 0xB0, 0x08, 0x56, 0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0x4B, 0xC2, 0x81, 0xCA, 0x05, 0x34, 0xCD, 0x55, 0xC1, 0xFA, 0x02, 0xD4, 0xC4, 0x52, 0xC0, 0x8C, + 0x06, 0x63, 0x91, 0x16, 0x08, 0xC3, 0x59, 0x19, 0xC2, 0x98, 0x10, 0x64, 0x04, 0x61, 0x14, 0x04, + 0x3B, 0x96, 0x40, 0x14, 0x87, 0x24, 0xBA, 0x80, 0x19, 0x02, 0xE6, 0x91, 0xEC, 0x10, 0x7B, 0xBF, + 0xBF, 0x67, 0x81, 0x30, 0x96, 0xCC, 0x62, 0x84, 0x30, 0x7E, 0xFF, 0x87, 0x4A, 0xED, 0x9C, 0x0D, + 0x65, 0xFC, 0xD8, 0x4F, 0x16, 0x63, 0x37, 0xBA, 0xC8, 0xAE, 0xD5, 0x50, 0xC6, 0xAF, 0xBD, 0x6C, + 0x10, 0xC6, 0xCF, 0x18, 0x56, 0x08, 0xE3, 0x5B, 0x2D, 0x13, 0x84, 0xF1, 0x79, 0x0F, 0x34, 0x40, + 0x3E, 0xC0, 0x18, 0x0B, 0xEA, 0xA1, 0x8C, 0x00, 0x79, 0x58, 0x60, 0xF1, 0xC2, 0x18, 0x2C, 0xA4, + 0x30, 0xC0, 0x36, 0x00, 0x00, 0xBA, 0x07, 0x30, 0x75, 0x78, 0x9C, 0x6D, 0x91, 0xB1, 0x4E, 0xC3, + 0x30, 0x10, 0x86, 0x2F, 0x4D, 0x40, 0x8A, 0x40, 0x6A, 0x36, 0x26, 0xA0, 0x33, 0x62, 0xC8, 0x84, + 0x58, 0x10, 0x7D, 0x02, 0x0A, 0xBC, 0x00, 0x30, 0x82, 0x22, 0xB5, 0x6F, 0x50, 0x56, 0x16, 0x9A, + 0x81, 0x01, 0x16, 0x18, 0x19, 0x90, 0x00, 0xB1, 0xA3, 0x64, 0x65, 0x21, 0x1D, 0x58, 0xAB, 0x48, + 0x0C, 0x0C, 0xA8, 0x92, 0x5B, 0xA8, 0x0A, 0xA1, 0x49, 0x7E,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 0xDE, 0xD1, 0xE3, 0xA8, 0x5C, + 0xC0, 0x5D, 0xC9, 0xB9, 0x93, 0x8C, 0x41, 0xC9, 0x46, 0x2F, 0x09, 0xBE, 0x00, 0xC4, 0xE0, 0x31, + 0x3A, 0xAA, 0x5A, 0x09, 0xCC, 0xD2, 0x04, 0xFF, 0xF8, 0xB3, 0x4E, 0xC3, 0xE8, 0xAA, 0x36, 0xCF, + 0x35, 0x0C, 0x7B, 0x5C, 0x0A, 0xAA, 0xF5, 0x88, 0x71, 0xA3, 0x86, 0x77, 0x2D, 0x3D, 0xFA, 0xCA, + 0x60, 0x8C, 0x5A, 0x44, 0x21, 0xE3, 0x72, 0x3A, 0x9D, 0xA0, 0xDA, 0xAF, 0x72, 0x1C, 0xDF, 0xF1, + 0x0C, 0x57, 0x94, 0x79, 0x25, 0xFF, 0xE6, 0xC2, 0xB9, 0xE4, 0x72, 0x06, 0x4D, 0x81, 0x51, 0xB7, + 0x97, 0xBD, 0xFF, 0x82, 0xDF, 0xB9, 0x15, 0xD5, 0x3E, 0x4A, 0xB8, 0xBD, 0xAA, 0xA2, 0xE8, 0x19, + 0x92, 0xB0, 0xD2, 0xBA, 0x4F, 0xCF, 0x67, 0x55, 0x74, 0xE0, 0x0B, 0x1F, 0xD4, 0x6B, 0x64, 0x8A, + 0xA7, 0x57, 0xF6, 0x64, 0x5F, 0x38, 0x29, 0xE1, 0x22, 0x07, 0xFD, 0xF7, 0xC9, 0x7F, 0xC2, 0x7C, + 0x58, 0x13, 0x47, 0x8E, 0xCB, 0xF0, 0x85, 0x99, 0xB3, 0x2E, 0xFA, 0xE2, 0x73, 0x6A, 0xAC, 0xE0, + 0x22, 0x4D, 0x3E, 0x04, 0x57, 0xE0, 0x9E, 0x39, +}; +const GFXglyph FiraSansGlyphs[] = { + { 0, 0, 11, 0, 0, 8, 0 }, // + { 6, 30, 10, 2, 29, 61, 8 }, // ! + { 13, 11, 17, 2, 29, 72, 69 }, // " + { 21, 29, 22, 0, 29, 185, 141 }, // # + { 20, 42, 22, 1, 35, 197, 326 }, // $ + { 32, 33, 34, 1, 31, 313, 523 }, // % + { 26, 31, 30, 3, 30, 266, 836 }, // & + { 5, 11, 9, 2, 29, 42, 1102 }, // ' + { 11, 43, 14, 1, 36, 156, 1144 }, // ( + { 11, 43, 14, 1, 36, 155, 1300 }, // ) + { 18, 17, 18, 0, 32, 124, 1455 }, // * + { 17, 16, 21, 2, 22, 37, 1579 }, // + + { 7, 12, 10, 1, 5, 54, 1616 }, // , + { 13, 4, 17, 2, 16, 19, 1670 }, // - + { 6, 7, 10, 2, 6, 29, 1689 }, // . + { 14, 39, 22, 4, 34, 159, 1718 }, // / + { 19, 30, 23, 2, 29, 202, 1877 }, // 0 + { 13, 29, 18, 1, 29, 61, 2079 }, // 1 + { 18, 29, 21, 1, 29, 160, 2140 }, // 2 + { 19, 30, 21, 0, 29, 188, 2300 }, // 3 + { 20, 30, 22, 1, 30, 133, 2488 }, // 4 + { 18, 30, 21, 1, 29, 139, 2621 }, // 5 + { 19, 30, 22, 2, 29, 217, 2760 }, // 6 + { 17, 30, 19, 1, 29, 90, 2977 }, // 7 + { 21, 30, 23, 1, 29, 234, 3067 }, // 8 + { 19, 31, 22, 1, 29, 209, 3301 }, // 9 + { 6, 22, 10, 2, 21, 35, 3510 }, // : + { 7, 28, 10, 1, 21, 79, 3545 }, // ; + { 17, 19, 21, 2, 23, 117, 3624 }, // < + { 17, 12, 21, 2, 21, 25, 3741 }, // = + { 17, 19, 21, 2, 23, 105, 3766 }, // > + { 17, 31, 19, 1, 30, 160, 3871 }, // ? + { 38, 39, 43, 2, 30, 393, 4031 }, // @ + { 24, 29, 24, 0, 29, 197, 4424 }, // A + { 20, 29, 25, 4, 29, 163, 4621 }, // B + { 21, 31, 23, 2, 30, 172, 4784 }, // C + { 21, 29, 27, 4, 29, 153, 4956 }, // D + { 17, 29, 22, 4, 29, 55, 5109 }, // E + { 16, 29, 20, 4, 29, 47, 5164 }, // F + { 22, 31, 26, 2, 30, 199, 5211 }, // G + { 21, 29, 28, 4, 29, 33, 5410 }, // H + { 5, 29, 12, 4, 29, 14, 5443 }, // I + { 9, 36, 13, 0, 29, 64, 5457 }, // J + { 21, 29, 25, 4, 29, 159, 5521 }, // K + { 16, 29, 21, 4, 29, 31, 5680 }, // L + { 28, 29, 32, 2, 29, 283, 5711 }, // M + { 21, 29, 28, 4, 29, 143, 5994 }, // N + { 25, 31, 29, 2, 30, 206, 6137 }, // O + { 19, 29, 24, 4, 29, 109, 6343 }, // P + { 26, 35, 29, 2, 30, 245, 6452 }, // Q + { 21, 29, 25, 4, 29, 161, 6697 }, // R + { 21, 31, 23, 1, 30, 211, 6858 }, // S + { 22, 29, 22, 0, 29, 41, 7069 }, // T + { 21, 30, 28, 3, 29, 106, 7110 }, // U + { 23, 29, 23, 0, 29, 199, 7216 }, // V + { 33, 29, 34, 1, 29, 303, 7415 }, // W + { 23, 29, 23, 0, 29, 203, 7718 }, // X + { 23, 29, 23, 0, 29, 149, 7921 }, // Y + { 19, 29, 22, 1, 29, 137, 8070 }, // Z + { 10, 40, 13, 2, 35, 31, 8207 }, // [ + { 14, 39, 22, 4, 34, 153, 8238 }, // + { 9, 40, 13, 2, 35, 32, 8391 }, // ] + { 20, 14, 23, 1, 36, 112, 8423 }, // ^ + { 21, 4, 22, 0, -2, 19, 8535 }, // _ + { 11, 8, 13, 1, 34, 48, 8554 }, // ` + { 20, 24, 22, 1, 23, 167, 8602 }, // a + { 20, 33, 24, 3, 32, 164, 8769 }, // b + { 17, 24, 20, 2, 23, 146, 8933 }, // c + { 19, 33, 25, 2, 32, 169, 9079 }, // d + { 19, 24, 23, 2, 23, 171, 9248 }, // e + { 17, 32, 14, 0, 32, 82, 9419 }, // f + { 21, 34, 22, 1, 25, 246, 9501 }, // g + { 18, 32, 24, 3, 32, 86, 9747 }, // h + { 6, 33, 12, 3, 33, 30, 9833 }, // i + { 10, 43, 12, -1, 33, 79, 9863 }, // j + { 19, 32, 21, 3, 32, 131, 9942 }, // k + { 9, 33, 12, 3, 32, 45, 10073 }, // l + { 29, 23, 35, 3, 23, 118, 10118 }, // m + { 18, 23, 24, 3, 23, 87, 10236 }, // n + { 20, 24, 24, 2, 23, 161, 10323 }, // o + { 20, 33, 24, 3, 23, 168, 10484 }, // p + { 19, 33, 25, 2, 23, 167, 10652 }, // q + { 13, 23, 16, 3, 23, 71, 10819 }, // r + { 17, 24, 19, 1, 23, 163, 10890 }, // s + { 16, 29, 15, 0, 28, 82, 11053 }, // t + { 18, 23, 24, 3, 22, 83, 11135 }, // u + { 21, 22, 21, 0, 22, 155, 11218 }, // v + { 30, 22, 30, 0, 22, 240, 11373 }, // w + { 20, 22, 20, 0, 22, 153, 11613 }, // x + { 21, 32, 21, 0, 22, 198, 11766 }, // y + { 16, 22, 18, 1, 22, 108, 11964 }, // z + { 11, 42, 13, 1, 36, 115, 12072 }, // { + { 5, 39, 17, 6, 35, 16, 12187 }, // | + { 12, 42, 13, 1, 36, 103, 12203 }, // } + { 18, 6, 20, 1, 17, 56, 12306 }, // ~ + { 0, 0, 11, 0, 0, 8, 12362 }, //   + { 6, 30, 10, 2, 21, 57, 12370 }, // ¡ + { 17, 35, 20, 2, 29, 147, 12427 }, // ¢ + { 20, 29, 22, 1, 29, 129, 12574 }, // £ + { 22, 23, 23, 1, 25, 186, 12703 }, // ¤ + { 23, 29, 22, 0, 29, 167, 12889 }, // ¥ + { 5, 39, 17, 6, 35, 21, 13056 }, // ¦ + { 18, 32, 22, 2, 29, 210, 13077 }, // § + { 14, 5, 16, 1, 33, 35, 13287 }, // ¨ + { 27, 27, 34, 3, 32, 248, 13322 }, // © + { 17, 29, 21, 2, 29, 141, 13570 }, // ª + { 20, 22, 24, 2, 23, 158, 13711 }, // « + { 17, 10, 21, 2, 16, 26, 13869 }, // ¬ + { 13, 4, 17, 2, 16, 19, 13895 }, // ­ + { 22, 22, 27, 2, 32, 202, 13914 }, // ® + { 12, 4, 14, 1, 32, 19, 14116 }, // ¯ + { 14, 14, 22, 2, 30, 77, 14135 }, // ° + { 17, 22, 21, 2, 23, 46, 14212 }, // ± + { 13, 19, 17, 2, 32, 105, 14258 }, // ² + { 13, 20, 17, 2, 32, 125, 14363 }, // ³ + { 11, 8, 13, 1, 34, 51, 14488 }, // ´ + { 19, 31, 24, 3, 22, 102, 14539 }, // µ + { 22, 39, 31, 3, 29, 97, 14641 }, // ¶ + { 6, 7, 10, 2, 17, 29, 14738 }, // · + { 10, 11, 11, 1, 1, 61, 14767 }, // ¸ + { 10, 18, 17, 2, 31, 43, 14828 }, // ¹ + { 17, 29, 21, 2, 29, 129, 14871 }, // º + { 20, 22, 24, 2, 23, 162, 15000 }, // » + { 36, 36, 39, 2, 32, 249, 15162 }, // ¼ + { 35, 36, 39, 2, 32, 254, 15411 }, // ½ + { 36, 36, 39, 2, 32, 305, 15665 }, // ¾ + { 17, 30, 19, 1, 21, 146, 15970 }, // ¿ + { 24, 38, 24, 0, 38, 234, 16116 }, // À + { 24, 38, 24, 0, 38, 234, 16350 }, // Á + { 24, 39, 24, 0, 39, 247, 16584 }, // Â + { 24, 39, 24, 0, 39, 244, 16831 }, // Ã + { 24, 38, 24, 0, 38, 233, 17075 }, // Ä + { 24, 41, 24, 0, 41, 247, 17308 }, // Å + { 33, 29, 34, -1, 29, 208, 17555 }, // Æ + { 21, 42, 23, 2, 30, 237, 17763 }, // Ç + { 17, 38, 22, 4, 38, 92, 18000 }, // È + { 17, 38, 22, 4, 38, 93, 18092 }, // É + { 17, 39, 22, 4, 39, 106, 18185 }, // Ê + { 17, 38, 22, 4, 38, 91, 18291 }, // Ë + { 11, 38, 12, 0, 38, 52, 18382 }, // Ì + { 11, 38, 12, 1, 38, 53, 18434 }, // Í + { 14, 39, 12, -1, 39, 65, 18487 }, // Î + { 14, 38, 12, -1, 38, 43, 18552 }, // Ï + { 26, 29, 27, 0, 29, 170, 18595 }, // Ð + { 21, 39, 28, 4, 39, 190, 18765 }, // Ñ + { 25, 39, 29, 2, 38, 242, 18955 }, // Ò + { 25, 39, 29, 2, 38, 245, 19197 }, // Ó + { 25, 40, 29, 2, 39, 253, 19442 }, // Ô + { 25, 40, 29, 2, 39, 242, 19695 }, // Õ + { 25, 39, 29, 2, 38, 241, 19937 }, // Ö + { 15, 16, 21, 3, 21, 108, 20178 }, // × + { 25, 41, 29, 2, 35, 311, 20286 }, // Ø + { 21, 39, 28, 3, 38, 142, 20597 }, // Ù + { 21, 39, 28, 3, 38, 144, 20739 }, // Ú + { 21, 40, 28, 3, 39, 159, 20883 }, // Û + { 21, 39, 28, 3, 38, 139, 21042 }, // Ü + { 23, 38, 23, 0, 38, 190, 21181 }, // Ý + { 19, 29, 24, 4, 29, 107, 21371 }, // Þ + { 20, 33, 25, 3, 32, 193, 21478 }, // ß + { 20, 35, 22, 1, 34, 197, 21671 }, // à + { 20, 35, 22, 1, 34, 206, 21868 }, // á + { 20, 35, 22, 1, 34, 212, 22074 }, // â + { 20, 35, 22, 1, 34, 209, 22286 }, // ã + { 20, 34, 22, 1, 33, 194, 22495 }, // ä + { 20, 37, 22, 1, 36, 205, 22689 }, // å + { 32, 24, 35, 1, 23, 251, 22894 }, // æ + { 17, 34, 20, 2, 23, 182, 23145 }, // ç + { 19, 35, 23, 2, 34, 201, 23327 }, // è + { 19, 35, 23, 2, 34, 211, 23528 }, // é + { 19, 35, 23, 2, 34, 212, 23739 }, // ê + { 19, 34, 23, 2, 33, 201, 23951 }, // ë + { 11, 34, 12, 1, 34, 55, 24152 }, // ì + { 11, 34, 12, 0, 34, 58, 24207 }, // í + { 15, 34, 12, -2, 34, 68, 24265 }, // î + { 15, 33, 12, -2, 33, 45, 24333 }, // ï + { 20, 34, 24, 2, 33, 232, 24378 }, // ð + { 18, 34, 24, 3, 34, 130, 24610 }, // ñ + { 20, 35, 24, 2, 34, 191, 24740 }, // ò + { 20, 35, 24, 2, 34, 190, 24931 }, // ó + { 20, 35, 24, 2, 34, 198, 25121 }, // ô + { 20, 35, 24, 2, 34, 199, 25319 }, // õ + { 20, 34, 24, 2, 33, 183, 25518 }, // ö + { 17, 26, 21, 2, 27, 57, 25701 }, // ÷ + { 20, 34, 24, 2, 28, 235, 25758 }, // ø + { 18, 35, 24, 3, 34, 123, 25993 }, // ù + { 18, 35, 24, 3, 34, 121, 26116 }, // ú + { 18, 35, 24, 3, 34, 131, 26237 }, // û + { 18, 34, 24, 3, 33, 111, 26368 }, // ü + { 21, 44, 21, 0, 34, 235, 26479 }, // ý + { 20, 42, 24, 3, 32, 166, 26714 }, // þ + { 21, 43, 21, 0, 33, 231, 26880 }, // ÿ + { 42, 53, 42, 0, 39, 27, 27111 }, // ─ + { 42, 54, 42, 0, 39, 27, 27138 }, // ━ + { 43, 53, 42, -1, 39, 29, 27165 }, // │ + { 42, 53, 42, 0, 39, 31, 27194 }, // ┃ + { 43, 53, 42, -1, 39, 34, 27225 }, // ┄ + { 43, 54, 42, -1, 39, 34, 27259 }, // ┅ + { 43, 54, 42, -1, 39, 41, 27293 }, // ┆ + { 42, 54, 42, 0, 39, 42, 27334 }, // ┇ + { 42, 53, 42, 0, 39, 41, 27376 }, // ┈ + { 42, 54, 42, 0, 39, 41, 27417 }, // ┉ + { 43, 54, 42, -1, 39, 51, 27458 }, // ┊ + { 42, 54, 42, 0, 39, 55, 27509 }, // ┋ + { 43, 53, 42, -1, 39, 33, 27564 }, // ┌ + { 43, 54, 42, -1, 39, 33, 27597 }, // ┍ + { 42, 53, 42, 0, 39, 35, 27630 }, // ┎ + { 42, 54, 42, 0, 39, 35, 27665 }, // ┏ + { 43, 53, 42, -1, 39, 33, 27700 }, // ┐ + { 43, 54, 42, -1, 39, 33, 27733 }, // ┑ + { 42, 53, 42, 0, 39, 34, 27766 }, // ┒ + { 42, 54, 42, 0, 39, 34, 27800 }, // ┓ + { 43, 53, 42, -1, 39, 34, 27834 }, // └ + { 43, 54, 42, -1, 39, 34, 27868 }, // ┕ + { 42, 53, 42, 0, 39, 33, 27902 }, // ┖ + { 42, 54, 42, 0, 39, 33, 27935 }, // ┗ + { 43, 53, 42, -1, 39, 33, 27968 }, // ┘ + { 43, 54, 42, -1, 39, 33, 28001 }, // ┙ + { 42, 53, 42, 0, 39, 36, 28034 }, // ┚ + { 42, 54, 42, 0, 39, 36, 28070 }, // ┛ + { 43, 53, 42, -1, 39, 46, 28106 }, // ├ + { 43, 53, 42, -1, 39, 46, 28152 }, // ┝ + { 42, 54, 42, 0, 39, 45, 28198 }, // ┞ + { 42, 53, 42, 0, 39, 52, 28243 }, // ┟ + { 42, 53, 42, 0, 39, 47, 28295 }, // ┠ + { 42, 54, 42, 0, 39, 51, 28342 }, // ┡ + { 42, 54, 42, 0, 39, 60, 28393 }, // ┢ + { 42, 53, 42, 0, 39, 48, 28453 }, // ┣ + { 43, 53, 42, -1, 39, 45, 28501 }, // ┤ + { 43, 53, 42, -1, 39, 46, 28546 }, // ┥ + { 42, 54, 42, 0, 39, 45, 28592 }, // ┦ + { 42, 53, 42, 0, 39, 45, 28637 }, // ┧ + { 42, 53, 42, 0, 39, 49, 28682 }, // ┨ + { 42, 54, 42, 0, 39, 45, 28731 }, // ┩ + { 42, 54, 42, 0, 39, 44, 28776 }, // ┪ + { 42, 53, 42, 0, 39, 50, 28820 }, // ┫ + { 42, 53, 42, 0, 39, 37, 28870 }, // ┬ + { 42, 54, 42, 0, 39, 49, 28907 }, // ┭ + { 42, 54, 42, 0, 39, 46, 28956 }, // ┮ + { 42, 54, 42, 0, 39, 38, 29002 }, // ┯ + { 42, 53, 42, 0, 39, 38, 29040 }, // ┰ + { 42, 54, 42, 0, 39, 51, 29078 }, // ┱ + { 42, 54, 42, 0, 39, 52, 29129 }, // ┲ + { 42, 54, 42, 0, 39, 38, 29181 }, // ┳ + { 42, 53, 42, 0, 39, 37, 29219 }, // ┴ + { 42, 54, 42, 0, 39, 49, 29256 }, // ┵ + { 42, 54, 42, 0, 39, 46, 29305 }, // ┶ + { 42, 54, 42, 0, 39, 37, 29351 }, // ┷ + { 42, 53, 42, 0, 39, 37, 29388 }, // ┸ + { 42, 54, 42, 0, 39, 49, 29425 }, // ┹ + { 42, 54, 42, 0, 39, 52, 29474 }, // ┺ + { 42, 54, 42, 0, 39, 40, 29526 }, // ┻ + { 42, 53, 42, 0, 39, 55, 29566 }, // ┼ + { 43, 53, 42, -1, 39, 58, 29621 }, // ┽ + { 43, 53, 42, -1, 39, 58, 29679 }, // ┾ + { 42, 53, 42, 0, 39, 56, 29737 }, // ┿ + { 42, 53, 42, 0, 39, 48, 29793 }, // ╀ + { 42, 53, 42, 0, 39, 48, 29841 }, // ╁ + { 42, 53, 42, 0, 39, 55, 29889 }, // ╂ + { 42, 54, 42, 0, 39, 61, 29944 }, // ╃ + { 42, 54, 42, 0, 39, 60, 30005 }, // ╄ + { 42, 54, 42, 0, 39, 61, 30065 }, // ╅ + { 42, 54, 42, 0, 39, 63, 30126 }, // ╆ + { 42, 54, 42, 0, 39, 51, 30189 }, // ╇ + { 42, 54, 42, 0, 39, 48, 30240 }, // ╈ + { 42, 53, 42, 0, 39, 64, 30288 }, // ╉ + { 42, 53, 42, 0, 39, 61, 30352 }, // ╊ + { 42, 53, 42, 0, 39, 56, 30413 }, // ╋ + { 43, 53, 42, -1, 39, 31, 30469 }, // ╌ + { 43, 54, 42, -1, 39, 31, 30500 }, // ╍ + { 43, 54, 42, -1, 39, 36, 30531 }, // ╎ + { 42, 54, 42, 0, 39, 38, 30567 }, // ╏ + { 42, 53, 42, 0, 39, 27, 30605 }, // ═ + { 43, 53, 42, -1, 39, 31, 30632 }, // ║ + { 42, 53, 42, 0, 39, 37, 30663 }, // ╒ + { 43, 53, 42, -1, 39, 36, 30700 }, // ╓ + { 43, 53, 42, -1, 39, 43, 30736 }, // ╔ + { 43, 53, 42, -1, 39, 36, 30779 }, // ╕ + { 43, 53, 42, -1, 39, 37, 30815 }, // ╖ + { 43, 53, 42, -1, 39, 41, 30852 }, // ╗ + { 43, 53, 42, -1, 39, 35, 30893 }, // ╘ + { 43, 53, 42, -1, 39, 36, 30928 }, // ╙ + { 43, 53, 42, -1, 39, 42, 30964 }, // ╚ + { 43, 53, 42, -1, 39, 36, 31006 }, // ╛ + { 43, 53, 42, -1, 39, 36, 31042 }, // ╜ + { 43, 53, 42, -1, 39, 46, 31078 }, // ╝ + { 43, 53, 42, -1, 39, 46, 31124 }, // ╞ + { 43, 53, 42, -1, 39, 47, 31170 }, // ╟ + { 43, 53, 42, -1, 39, 61, 31217 }, // ╠ + { 43, 53, 42, -1, 39, 49, 31278 }, // ╡ + { 43, 53, 42, -1, 39, 50, 31327 }, // ╢ + { 43, 53, 42, -1, 39, 59, 31377 }, // ╣ + { 42, 53, 42, 0, 39, 38, 31436 }, // ╤ + { 42, 53, 42, 0, 39, 42, 31474 }, // ╥ + { 42, 53, 42, 0, 39, 50, 31516 }, // ╦ + { 42, 53, 42, 0, 39, 42, 31566 }, // ╧ + { 42, 53, 42, 0, 39, 41, 31608 }, // ╨ + { 42, 53, 42, 0, 39, 55, 31649 }, // ╩ + { 42, 53, 42, 0, 39, 62, 31704 }, // ╪ + { 42, 53, 42, 0, 39, 59, 31766 }, // ╫ + { 43, 53, 42, -1, 39, 52, 31825 }, // ╬ + { 42, 53, 42, 0, 39, 161, 31877 }, // ╭ + { 42, 53, 42, 0, 39, 164, 32038 }, // ╮ + { 42, 53, 42, 0, 39, 154, 32202 }, // ╯ + { 42, 53, 42, 0, 39, 157, 32356 }, // ╰ + { 47, 54, 42, -3, 39, 200, 32513 }, // ╱ + { 47, 54, 42, -3, 39, 195, 32713 }, // ╲ + { 47, 53, 42, -3, 39, 360, 32908 }, // ╳ + { 42, 53, 42, 0, 39, 25, 33268 }, // ╴ + { 43, 54, 42, -1, 39, 30, 33293 }, // ╵ + { 42, 53, 42, 0, 39, 26, 33323 }, // ╶ + { 43, 54, 42, -1, 39, 30, 33349 }, // ╷ + { 42, 54, 42, 0, 39, 25, 33379 }, // ╸ + { 42, 54, 42, 0, 39, 31, 33404 }, // ╹ + { 42, 54, 42, 0, 39, 26, 33435 }, // ╺ + { 42, 54, 42, 0, 39, 32, 33461 }, // ╻ + { 42, 54, 42, 0, 39, 42, 33493 }, // ╼ + { 42, 54, 42, 0, 39, 45, 33535 }, // ╽ + { 42, 54, 42, 0, 39, 39, 33580 }, // ╾ + { 42, 54, 42, 0, 39, 40, 33619 }, // ╿ + { 42, 54, 42, 0, 39, 28, 33659 }, // ▀ + { 42, 53, 42, 0, 39, 27, 33687 }, // ▁ + { 42, 54, 42, 0, 39, 27, 33714 }, // ▂ + { 42, 53, 42, 0, 39, 28, 33741 }, // ▃ + { 42, 54, 42, 0, 39, 31, 33769 }, // ▄ + { 42, 54, 42, 0, 39, 27, 33800 }, // ▅ + { 42, 53, 42, 0, 39, 29, 33827 }, // ▆ + { 42, 54, 42, 0, 39, 28, 33856 }, // ▇ + { 42, 53, 42, 0, 39, 27, 33884 }, // █ + { 42, 53, 42, 0, 39, 29, 33911 }, // ▉ + { 42, 53, 42, 0, 39, 29, 33940 }, // ▊ + { 42, 53, 42, 0, 39, 27, 33969 }, // ▋ + { 42, 53, 42, 0, 39, 29, 33996 }, // ▌ + { 42, 53, 42, 0, 39, 29, 34025 }, // ▍ + { 42, 53, 42, 0, 39, 29, 34054 }, // ▎ + { 42, 53, 42, 0, 39, 27, 34083 }, // ▏ + { 42, 53, 42, 0, 39, 34, 34110 }, // ▐ + { 42, 54, 42, 0, 39, 99, 34144 }, // ░ + { 42, 53, 42, 0, 39, 134, 34243 }, // ▒ + { 42, 54, 42, 0, 39, 107, 34377 }, // ▓ + { 42, 54, 42, 0, 39, 27, 34484 }, // ▔ + { 42, 53, 42, 0, 39, 31, 34511 }, // ▕ + { 42, 54, 42, 0, 39, 35, 34542 }, // ▖ + { 42, 54, 42, 0, 39, 36, 34577 }, // ▗ + { 42, 54, 42, 0, 39, 30, 34613 }, // ▘ + { 42, 54, 42, 0, 39, 42, 34643 }, // ▙ + { 42, 54, 42, 0, 39, 46, 34685 }, // ▚ + { 42, 54, 42, 0, 39, 37, 34731 }, // ▛ + { 42, 54, 42, 0, 39, 37, 34768 }, // ▜ + { 42, 54, 42, 0, 39, 35, 34805 }, // ▝ + { 42, 54, 42, 0, 39, 52, 34840 }, // ▞ + { 42, 54, 42, 0, 39, 47, 34892 }, // ▟ + { 42, 31, 48, 3, 30, 304, 34939 }, // ✀ + { 38, 23, 42, 2, 26, 191, 35243 }, // ✁ + { 38, 23, 41, 1, 26, 220, 35434 }, // ✂ + { 38, 24, 42, 2, 26, 202, 35654 }, // ✃ + { 42, 31, 48, 3, 30, 407, 35856 }, // ✄ + { 34, 31, 36, 1, 30, 274, 36263 }, // ✅ + { 40, 40, 42, 1, 32, 409, 36537 }, // ✆ + { 40, 40, 42, 1, 32, 425, 36946 }, // ✇ + { 37, 37, 39, 1, 32, 262, 37371 }, // ✈ + { 26, 17, 30, 2, 23, 110, 37633 }, // ✉ + { 30, 33, 33, 2, 29, 365, 37743 }, // ✊ + { 29, 37, 32, 1, 31, 339, 38108 }, // ✋ + { 19, 34, 24, 3, 32, 278, 38447 }, // ✌ + { 35, 23, 38, 1, 22, 248, 38725 }, // ✍ + { 35, 26, 39, 2, 27, 307, 38973 }, // ✎ + { 36, 18, 40, 2, 23, 193, 39280 }, // ✏ + { 35, 26, 39, 2, 28, 309, 39473 }, // ✐ + { 37, 17, 40, 2, 23, 200, 39782 }, // ✑ + { 38, 21, 42, 2, 25, 201, 39982 }, // ✒ + { 29, 31, 33, 2, 30, 171, 40183 }, // ✓ + { 33, 31, 36, 2, 30, 211, 40354 }, // ✔ + { 29, 29, 33, 2, 29, 156, 40565 }, // ✕ + { 29, 29, 33, 2, 29, 180, 40721 }, // ✖ + { 24, 31, 28, 2, 28, 207, 40901 }, // ✗ + { 26, 31, 29, 2, 30, 210, 41108 }, // ✘ + { 29, 29, 33, 2, 29, 92, 41318 }, // ✙ + { 29, 29, 33, 2, 29, 55, 41410 }, // ✚ + { 29, 29, 33, 2, 29, 55, 41465 }, // ✛ + { 29, 29, 33, 2, 29, 56, 41520 }, // ✜ + { 18, 29, 22, 2, 29, 51, 41576 }, // ✝ + { 21, 29, 24, 2, 29, 97, 41627 }, // ✞ + { 20, 29, 24, 2, 29, 102, 41724 }, // ✟ + { 31, 31, 35, 2, 30, 211, 41826 }, // ✠ + { 26, 31, 30, 2, 30, 207, 42037 }, // ✡ + { 30, 30, 34, 2, 29, 197, 42244 }, // ✢ + { 30, 31, 34, 2, 30, 219, 42441 }, // ✣ + { 30, 31, 34, 2, 30, 223, 42660 }, // ✤ + { 31, 31, 34, 2, 30, 228, 42883 }, // ✥ + { 31, 31, 34, 2, 30, 175, 43111 }, // ✦ + { 31, 30, 34, 2, 29, 242, 43286 }, // ✧ + { 38, 37, 42, 2, 30, 279, 43528 }, // ✨ + { 32, 31, 35, 2, 30, 249, 43807 }, // ✩ + { 30, 31, 34, 2, 30, 280, 44056 }, // ✪ + { 33, 31, 36, 2, 30, 231, 44336 }, // ✫ + { 33, 31, 35, 1, 30, 290, 44567 }, // ✬ + { 32, 31, 36, 2, 30, 260, 44857 }, // ✭ + { 32, 31, 35, 2, 30, 296, 45117 }, // ✮ + { 30, 28, 33, 1, 28, 231, 45413 }, // ✯ + { 36, 31, 40, 2, 30, 279, 45644 }, // ✰ + { 29, 29, 32, 2, 29, 206, 45923 }, // ✱ + { 28, 29, 31, 2, 29, 181, 46129 }, // ✲ + { 29, 29, 32, 2, 29, 245, 46310 }, // ✳ + { 31, 30, 34, 2, 29, 239, 46555 }, // ✴ + { 32, 31, 34, 1, 27, 294, 46794 }, // ✵ + { 28, 31, 30, 1, 27, 207, 47088 }, // ✶ + { 30, 31, 33, 2, 30, 241, 47295 }, // ✷ + { 30, 31, 33, 2, 30, 218, 47536 }, // ✸ + { 32, 31, 34, 1, 27, 254, 47754 }, // ✹ + { 29, 29, 33, 2, 29, 338, 48008 }, // ✺ + { 27, 31, 31, 2, 30, 246, 48346 }, // ✻ + { 28, 30, 31, 1, 29, 248, 48592 }, // ✼ + { 27, 30, 30, 1, 29, 261, 48840 }, // ✽ + { 28, 31, 30, 1, 30, 301, 49101 }, // ✾ + { 32, 30, 36, 2, 29, 254, 49402 }, // ✿ + { 32, 31, 35, 2, 30, 346, 49656 }, // ❀ + { 30, 31, 34, 2, 30, 396, 50002 }, // ❁ + { 30, 31, 34, 2, 30, 336, 50398 }, // ❂ + { 27, 31, 31, 2, 30, 327, 50734 }, // ❃ + { 27, 29, 30, 1, 29, 282, 51061 }, // ❄ + { 27, 30, 30, 2, 30, 282, 51343 }, // ❅ + { 27, 29, 30, 1, 29, 306, 51625 }, // ❆ + { 31, 31, 34, 1, 30, 292, 51931 }, // ❇ + { 31, 31, 34, 1, 30, 283, 52223 }, // ❈ + { 27, 30, 31, 2, 29, 221, 52506 }, // ❉ + { 30, 31, 34, 2, 30, 264, 52727 }, // ❊ + { 30, 30, 34, 2, 29, 285, 52991 }, // ❋ + { 25, 25, 28, 1, 27, 137, 53276 }, // ❌ + { 34, 31, 38, 2, 30, 244, 53413 }, // ❍ + { 29, 29, 33, 2, 29, 171, 53657 }, // ❎ + { 29, 30, 33, 2, 29, 56, 53828 }, // ❏ + { 29, 29, 33, 2, 29, 61, 53884 }, // ❐ + { 29, 29, 33, 2, 29, 64, 53945 }, // ❑ + { 29, 29, 33, 2, 29, 66, 54009 }, // ❒ + { 26, 35, 29, 2, 30, 202, 54075 }, // ❓ + { 26, 35, 29, 2, 30, 258, 54277 }, // ❔ + { 13, 35, 17, 2, 30, 166, 54535 }, // ❕ + { 30, 31, 34, 2, 30, 204, 54701 }, // ❖ + { 11, 39, 17, 3, 32, 156, 54905 }, // ❗ + { 3, 29, 7, 2, 29, 14, 55061 }, // ❘ + { 9, 29, 13, 2, 29, 19, 55075 }, // ❙ + { 15, 29, 18, 2, 29, 18, 55094 }, // ❚ + { 14, 19, 18, 2, 29, 100, 55112 }, // ❛ + { 14, 19, 18, 2, 30, 96, 55212 }, // ❜ + { 25, 19, 29, 2, 30, 150, 55308 }, // ❝ + { 25, 20, 29, 2, 30, 157, 55458 }, // ❞ + { 14, 19, 18, 2, 10, 98, 55615 }, // ❟ + { 25, 19, 29, 2, 10, 154, 55713 }, // ❠ + { 28, 40, 32, 2, 32, 223, 55867 }, // ❡ + { 19, 31, 22, 2, 30, 159, 56090 }, // ❢ + { 20, 31, 24, 2, 30, 174, 56249 }, // ❣ + { 35, 27, 39, 2, 28, 174, 56423 }, // ❤ + { 25, 30, 29, 2, 29, 173, 56597 }, // ❥ + { 35, 36, 37, 1, 30, 338, 56770 }, // ❦ + { 42, 25, 42, 0, 25, 277, 57108 }, // ❧ + { 18, 40, 19, 1, 32, 186, 57385 }, // ❨ + { 18, 40, 18, 0, 32, 178, 57571 }, // ❩ + { 14, 38, 17, 1, 31, 160, 57749 }, // ❪ + { 14, 38, 16, 1, 31, 163, 57909 }, // ❫ + { 12, 39, 14, 1, 31, 141, 58072 }, // ❬ + { 12, 39, 14, 1, 31, 140, 58213 }, // ❭ + { 21, 30, 21, 0, 27, 140, 58353 }, // ❮ + { 21, 30, 21, 0, 27, 141, 58493 }, // ❯ + { 20, 39, 23, 1, 31, 161, 58634 }, // ❰ + { 20, 39, 23, 1, 31, 156, 58795 }, // ❱ + { 10, 40, 13, 2, 32, 60, 58951 }, // ❲ + { 10, 40, 10, 0, 32, 63, 59011 }, // ❳ + { 21, 40, 21, 0, 32, 151, 59074 }, // ❴ + { 21, 40, 21, 0, 32, 153, 59225 }, // ❵ + { 40, 40, 42, 1, 32, 260, 59378 }, // ❶ + { 40, 40, 42, 1, 32, 351, 59638 }, // ❷ + { 40, 40, 42, 1, 32, 362, 59989 }, // ❸ + { 40, 40, 42, 1, 32, 301, 60351 }, // ❹ + { 40, 40, 42, 1, 32, 354, 60652 }, // ❺ + { 40, 40, 42, 1, 32, 364, 61006 }, // ❻ + { 40, 40, 42, 1, 32, 326, 61370 }, // ❼ + { 40, 40, 42, 1, 32, 369, 61696 }, // ❽ + { 40, 40, 42, 1, 32, 365, 62065 }, // ❾ + { 40, 40, 42, 1, 32, 374, 62430 }, // ❿ + { 40, 40, 42, 1, 32, 282, 62804 }, // ➀ + { 40, 40, 42, 1, 32, 359, 63086 }, // ➁ + { 40, 40, 42, 1, 32, 370, 63445 }, // ➂ + { 40, 40, 42, 1, 32, 337, 63815 }, // ➃ + { 40, 40, 42, 1, 32, 350, 64152 }, // ➄ + { 40, 40, 42, 1, 32, 379, 64502 }, // ➅ + { 40, 40, 42, 1, 32, 333, 64881 }, // ➆ + { 40, 40, 42, 1, 32, 394, 65214 }, // ➇ + { 40, 40, 42, 1, 32, 376, 65608 }, // ➈ + { 40, 40, 42, 1, 32, 360, 65984 }, // ➉ + { 40, 40, 42, 1, 32, 231, 66344 }, // ➊ + { 40, 40, 42, 1, 32, 327, 66575 }, // ➋ + { 40, 40, 42, 1, 32, 344, 66902 }, // ➌ + { 40, 40, 42, 1, 32, 303, 67246 }, // ➍ + { 40, 40, 42, 1, 32, 310, 67549 }, // ➎ + { 40, 40, 42, 1, 32, 351, 67859 }, // ➏ + { 40, 40, 42, 1, 32, 304, 68210 }, // ➐ + { 40, 40, 42, 1, 32, 370, 68514 }, // ➑ + { 40, 40, 42, 1, 32, 351, 68884 }, // ➒ + { 40, 40, 42, 1, 32, 368, 69235 }, // ➓ + { 35, 25, 38, 2, 27, 115, 69603 }, // ➔ + { 29, 29, 33, 2, 29, 53, 69718 }, // ➕ + { 29, 5, 33, 2, 17, 19, 69771 }, // ➖ + { 29, 29, 33, 2, 29, 36, 69790 }, // ➗ + { 28, 22, 32, 2, 25, 145, 69826 }, // ➘ + { 36, 18, 40, 2, 23, 137, 69971 }, // ➙ + { 28, 22, 32, 2, 25, 138, 70108 }, // ➚ + { 36, 16, 39, 2, 22, 126, 70246 }, // ➛ + { 36, 27, 40, 2, 28, 164, 70372 }, // ➜ + { 36, 19, 40, 2, 24, 79, 70536 }, // ➝ + { 38, 21, 41, 2, 22, 149, 70615 }, // ➞ + { 38, 20, 42, 2, 22, 197, 70764 }, // ➟ + { 40, 25, 43, 2, 24, 275, 70961 }, // ➠ + { 37, 26, 42, 3, 26, 103, 71236 }, // ➡ + { 36, 21, 40, 2, 25, 159, 71339 }, // ➢ + { 36, 21, 40, 2, 25, 164, 71498 }, // ➣ + { 36, 29, 39, 2, 29, 169, 71662 }, // ➤ + { 37, 23, 40, 2, 26, 126, 71831 }, // ➥ + { 37, 23, 40, 2, 26, 135, 71957 }, // ➦ + { 17, 38, 20, 2, 32, 113, 72092 }, // ➧ + { 34, 24, 38, 2, 26, 107, 72205 }, // ➨ + { 33, 26, 36, 2, 27, 158, 72312 }, // ➩ + { 33, 26, 36, 2, 27, 127, 72470 }, // ➪ + { 34, 21, 37, 2, 25, 141, 72597 }, // ➫ + { 34, 21, 37, 2, 25, 141, 72738 }, // ➬ + { 26, 27, 30, 2, 28, 164, 72879 }, // ➭ + { 26, 27, 30, 2, 28, 173, 73043 }, // ➮ + { 35, 23, 38, 1, 26, 146, 73216 }, // ➯ + { 31, 19, 35, 2, 19, 169, 73362 }, // ➰ + { 35, 23, 38, 1, 26, 150, 73531 }, // ➱ + { 30, 29, 33, 1, 29, 175, 73681 }, // ➲ + { 37, 17, 41, 2, 23, 185, 73856 }, // ➳ + { 30, 27, 33, 2, 28, 189, 74041 }, // ➴ + { 34, 11, 37, 1, 20, 106, 74230 }, // ➵ + { 30, 27, 33, 2, 28, 191, 74336 }, // ➶ + { 35, 31, 38, 2, 30, 221, 74527 }, // ➷ + { 38, 19, 41, 2, 24, 182, 74748 }, // ➸ + { 35, 31, 38, 2, 30, 237, 74930 }, // ➹ + { 32, 21, 36, 2, 25, 168, 75167 }, // ➺ + { 34, 20, 37, 2, 25, 156, 75335 }, // ➻ + { 36, 17, 40, 2, 23, 161, 75491 }, // ➼ + { 39, 23, 41, 1, 26, 211, 75652 }, // ➽ + { 36, 21, 40, 2, 25, 154, 75863 }, // ➾ + { 49, 19, 53, 2, 19, 196, 76017 }, // ➿ + { 36, 36, 38, 1, 30, 365, 76213 }, // 😀 + { 36, 36, 38, 1, 30, 376, 76578 }, // 😁 + { 38, 36, 41, 2, 30, 428, 76954 }, // 😂 + { 36, 36, 38, 1, 30, 358, 77382 }, // 😃 + { 36, 36, 38, 1, 30, 369, 77740 }, // 😄 + { 36, 36, 38, 1, 30, 388, 78109 }, // 😅 + { 36, 36, 38, 1, 30, 369, 78497 }, // 😆 + { 36, 42, 38, 1, 33, 461, 78866 }, // 😇 + { 36, 40, 38, 1, 32, 390, 79327 }, // 😈 + { 36, 36, 38, 1, 30, 345, 79717 }, // 😉 + { 36, 36, 38, 1, 30, 361, 80062 }, // 😊 + { 36, 36, 38, 1, 30, 384, 80423 }, // 😋 + { 36, 36, 38, 1, 30, 328, 80807 }, // 😌 + { 36, 36, 38, 1, 30, 363, 81135 }, // 😍 + { 36, 36, 38, 1, 30, 353, 81498 }, // 😎 + { 36, 36, 38, 1, 30, 291, 81851 }, // 😏 + { 36, 36, 38, 1, 30, 304, 82142 }, // 😐 + { 36, 36, 38, 1, 30, 277, 82446 }, // 😑 + { 36, 36, 38, 1, 30, 324, 82723 }, // 😒 + { 38, 36, 40, 1, 30, 379, 83047 }, // 😓 + { 36, 36, 38, 1, 30, 324, 83426 }, // 😔 + { 36, 36, 38, 1, 30, 350, 83750 }, // 😕 + { 36, 36, 38, 1, 30, 338, 84100 }, // 😖 + { 36, 36, 38, 1, 30, 339, 84438 }, // 😗 + { 36, 36, 38, 1, 30, 365, 84777 }, // 😘 + { 36, 36, 38, 1, 30, 354, 85142 }, // 😙 + { 36, 36, 38, 1, 30, 348, 85496 }, // 😚 + { 36, 36, 38, 1, 30, 343, 85844 }, // 😛 + { 36, 36, 38, 1, 30, 342, 86187 }, // 😜 + { 36, 36, 38, 1, 30, 351, 86529 }, // 😝 + { 36, 36, 38, 1, 30, 375, 86880 }, // 😞 + { 36, 36, 38, 1, 30, 386, 87255 }, // 😟 + { 36, 36, 38, 1, 30, 361, 87641 }, // 😠 + { 36, 36, 38, 1, 30, 382, 88002 }, // 😡 + { 36, 36, 38, 1, 30, 375, 88384 }, // 😢 + { 36, 36, 38, 1, 30, 354, 88759 }, // 😣 + { 36, 41, 38, 1, 32, 507, 89113 }, // 😤 + { 36, 36, 38, 1, 30, 341, 89620 }, // 😥 + { 36, 36, 38, 1, 30, 366, 89961 }, // 😦 + { 36, 36, 38, 1, 30, 394, 90327 }, // 😧 + { 36, 36, 38, 1, 30, 429, 90721 }, // 😨 + { 36, 36, 38, 1, 30, 381, 91150 }, // 😩 + { 36, 36, 38, 1, 30, 398, 91531 }, // 😪 + { 36, 36, 38, 1, 30, 381, 91929 }, // 😫 + { 36, 36, 38, 1, 30, 315, 92310 }, // 😬 + { 36, 41, 38, 1, 32, 419, 92625 }, // 😭 + { 36, 36, 38, 1, 30, 343, 93044 }, // 😮 + { 36, 36, 38, 1, 30, 356, 93387 }, // 😯 + { 38, 36, 40, 1, 30, 404, 93743 }, // 😰 + { 36, 36, 40, 2, 30, 434, 94147 }, // 😱 + { 36, 36, 38, 1, 30, 373, 94581 }, // 😲 + { 36, 36, 38, 1, 30, 406, 94954 }, // 😳 + { 55, 39, 38, 1, 33, 434, 95360 }, // 😴 + { 36, 36, 38, 1, 30, 420, 95794 }, // 😵 + { 36, 36, 38, 1, 30, 311, 96214 }, // 😶 + { 36, 36, 38, 1, 30, 338, 96525 }, // 😷 + { 36, 40, 38, 1, 32, 404, 96863 }, // 😸 + { 42, 40, 44, 1, 32, 433, 97267 }, // 😹 + { 36, 40, 38, 1, 32, 393, 97700 }, // 😺 + { 36, 40, 38, 1, 32, 400, 98093 }, // 😻 + { 36, 40, 38, 1, 32, 378, 98493 }, // 😼 + { 36, 40, 38, 1, 32, 374, 98871 }, // 😽 + { 36, 40, 38, 1, 32, 420, 99245 }, // 😾 + { 36, 40, 38, 1, 32, 411, 99665 }, // 😿 + { 36, 40, 38, 1, 32, 405, 100076 }, // 🙀 + { 36, 36, 38, 1, 30, 342, 100481 }, // 🙁 + { 36, 36, 38, 1, 30, 343, 100823 }, // 🙂 + { 36, 36, 38, 1, 30, 347, 101166 }, // 🙃 + { 36, 36, 38, 1, 30, 372, 101513 }, // 🙄 + { 35, 34, 38, 2, 30, 431, 101885 }, // 🙅 + { 36, 35, 38, 1, 30, 423, 102316 }, // 🙆 + { 34, 33, 36, 1, 31, 368, 102739 }, // 🙇 + { 36, 30, 38, 2, 27, 403, 103107 }, // 🙈 + { 35, 31, 37, 1, 28, 428, 103510 }, // 🙉 + { 36, 33, 38, 1, 28, 443, 103938 }, // 🙊 + { 31, 37, 33, 1, 31, 369, 104381 }, // 🙋 + { 34, 27, 38, 2, 27, 342, 104750 }, // 🙌 + { 35, 27, 37, 1, 27, 328, 105092 }, // 🙍 + { 35, 32, 38, 2, 30, 309, 105420 }, // 🙎 + { 34, 32, 38, 2, 27, 368, 105729 }, // 🙏 + { 40, 40, 42, 1, 32, 379, 106097 }, // 🙐 + { 41, 40, 42, 0, 32, 378, 106476 }, // 🙑 + { 40, 41, 42, 1, 32, 383, 106854 }, // 🙒 + { 41, 41, 42, 0, 32, 388, 107237 }, // 🙓 + { 41, 41, 42, 0, 32, 396, 107625 }, // 🙔 + { 40, 41, 42, 1, 32, 386, 108021 }, // 🙕 + { 41, 40, 42, 0, 32, 383, 108407 }, // 🙖 + { 40, 40, 42, 1, 32, 381, 108790 }, // 🙗 + { 40, 23, 42, 1, 22, 275, 109171 }, // 🙘 + { 40, 22, 42, 1, 22, 268, 109446 }, // 🙙 + { 40, 23, 42, 1, 22, 276, 109714 }, // 🙚 + { 40, 22, 42, 1, 22, 273, 109990 }, // 🙛 + { 40, 23, 42, 1, 22, 280, 110263 }, // 🙜 + { 40, 23, 42, 1, 22, 275, 110543 }, // 🙝 + { 39, 23, 42, 1, 22, 268, 110818 }, // 🙞 + { 39, 23, 42, 1, 22, 275, 111086 }, // 🙟 + { 40, 23, 42, 1, 22, 302, 111361 }, // 🙠 + { 40, 23, 42, 1, 22, 303, 111663 }, // 🙡 + { 40, 23, 42, 1, 22, 301, 111966 }, // 🙢 + { 40, 23, 42, 1, 22, 302, 112267 }, // 🙣 + { 41, 22, 42, 0, 22, 306, 112569 }, // 🙤 + { 41, 24, 42, 0, 23, 312, 112875 }, // 🙥 + { 41, 22, 42, 0, 22, 305, 113187 }, // 🙦 + { 41, 24, 42, 0, 23, 310, 113492 }, // 🙧 + { 42, 43, 42, 0, 34, 647, 113802 }, // 🙨 + { 43, 42, 42, 0, 33, 658, 114449 }, // 🙩 + { 40, 42, 42, 1, 33, 491, 115107 }, // 🙪 + { 42, 42, 42, 0, 33, 484, 115598 }, // 🙫 + { 41, 17, 42, 0, 21, 163, 116082 }, // 🙬 + { 17, 40, 21, 2, 32, 169, 116245 }, // 🙭 + { 41, 17, 42, 0, 21, 162, 116414 }, // 🙮 + { 17, 41, 21, 2, 33, 169, 116576 }, // 🙯 + { 42, 29, 44, 3, 24, 332, 116745 }, // 🙰 + { 43, 30, 45, 3, 25, 343, 117077 }, // 🙱 + { 31, 32, 32, 1, 31, 229, 117420 }, // 🙲 + { 31, 32, 32, 1, 31, 242, 117649 }, // 🙳 + { 34, 32, 35, 0, 31, 294, 117891 }, // 🙴 + { 50, 38, 53, 2, 31, 447, 118185 }, // 🙵 + { 21, 16, 22, 1, 33, 95, 118632 }, // 🙶 + { 21, 15, 22, 1, 32, 93, 118727 }, // 🙷 + { 21, 16, 22, 1, 9, 95, 118820 }, // 🙸 + { 19, 33, 21, 1, 33, 172, 118915 }, // 🙹 + { 17, 33, 18, 0, 33, 152, 119087 }, // 🙺 + { 19, 33, 21, 1, 33, 161, 119239 }, // 🙻 + { 42, 42, 42, 0, 33, 58, 119400 }, // 🙼 + { 42, 42, 42, 0, 33, 47, 119458 }, // 🙽 + { 42, 42, 42, 0, 33, 46, 119505 }, // 🙾 + { 42, 42, 42, 0, 33, 41, 119551 }, // 🙿 + { 39, 38, 41, 1, 31, 464, 119592 }, // 🚀 +}; +const UnicodeInterval FiraSansIntervals[] = { + { 0x20, 0x7E, 0x0 }, + { 0xA0, 0xFF, 0x5F }, + { 0x2500, 0x259F, 0xBF }, + { 0x2700, 0x27BF, 0x15F }, + { 0x1F600, 0x1F680, 0x21F }, +}; +const GFXfont FiraSans = { + (uint8_t*)FiraSansBitmaps, + (GFXglyph*)FiraSansGlyphs, + (UnicodeInterval*)FiraSansIntervals, + 5, + 1, + 50, + 39, + -12, +}; diff --git a/data/Basic2/IoTBasic/hardware.h b/data/Basic2/IoTBasic/hardware.h new file mode 100644 index 0000000000000000000000000000000000000000..50926e2262ca0b765723c03f2c29da366e7355fb --- /dev/null +++ b/data/Basic2/IoTBasic/hardware.h @@ -0,0 +1,1091 @@ +/* + * Stefan's basic interpreter. + * + * Playing around with frugal programming. See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Architectures and the definitions from the Arduino IDE. + * + * Arduino hardware settings , set here what you need or + * use one of the predefined configurations below. + * + * If HARDWAREHEURISTICS is set, some of the settings below + * are activated automatically for some platforms. If you want + * to control ALL settings below manually, undef HARDWAREHEURISTICS + * + * Input/output methods ARUINOPICOSERIAL, ARDUINOPS2 + * ARDUINOUSBKBD, ARDUINOZX81KBD, ARDUINOI2CKBD, GIGAUSBKBD + * ARDUINOPRT, DISPLAYCANSCROLL, ARDUINOLCDI2C, + * ARDUINOTFT, ARDUINONOKIA51, ARDUINOILI9488, + * ARDUINOSSD1306, ARDUINOMCUFRIEND + * Storage ARDUINOEEPROM, ARDUINOSD, ESPSPIFFS, RP2040LITTLEFS + * storage ARDUINOEFS, SM32SDIO, ESP32FAT, ESPSDMMC + * sensors ARDUINOWIRE, ARDUINOSIMPLEWIRE, ARDUINOSENSORS + * network ARDUINORF24, ARDUNIOMQTT + * memory ARDUINOSPIRAM + * real time clocks ARDUINORTC, ARDUINORTCEMULATION + * + * Secial features + * ARDUINOPGMEEPROM: makes the EEPROM primary program store + * HASMSTAB: counts characters, prerequisite for MSTAB in languages + * BUILDIN: include buildin programs + * + * Instead of setting all this manually, you can use one of the + * predefined hardware models. They are stored in board and are sources + * here later in the code to override some of the defaults. Custom configurations + * coming with BASIC are: + * + * dummy.h: + * do nothing. + * avrlcd.h: + * a AVR system with a LCD shield + * avrmcufriend.h: + * a AVR system with a parallel TFT + * wemosshield.h: + * a ESP8266 UNO lookalike with a modified datalogger shield + * great hardware for small BASIC based IoT projects. + * megashield.h: + * an Arduino Mega with Ethernet Shield optional keyboard + * and i2c display + * megatft.h: + * duetft.h: + * TFT 7inch screen systems, standalone + * nanoboard.h: + * Arduino Nano Every board with PS2 keyboard and sensor + * kit. + * megaboard.h: + * A board for the MEGA with 64 kB RAM, SD Card, and real time + * clock. + * unoboard.h: + * A board for an UNO with 64kB memory and EEPROM disk + * fits into an UNO flash only with integer + * esp01board.h: + * ESP01 based board as a sensor / MQTT interface + * rp2040board.h: + * A ILI9488 hardware design based on an Arduino connect RP2040. + * rp2040board2.h: + * like the one above but based on the Pi Pico core + * esp32board.h: + * same like above with an ESP32 core + * mkboard.h: + * a digital signage and low energy board + * tdeck.h: + * the LILYGO T-Deck - not yet finished + * ttgovga.h: + * the TTGO VGA 1.4 board with VGA output + */ +#define PREDEFINEDBOARD "boards/dummy.h" + +/* undef this if you want to overide all defaults, then use the settings below */ +#define HARDWAREHEURISTICS + +/* + * These are the individual settings. Logic: + * PREDEFINEDBOARD is set, and some of the settings below are + * activated automatically. + * HARDWAREHEURISTICS is set, some of the settings below are + * activated automatically depending on the hardware. + * HARDWAREHEURISTICS is not set, all settings below are + * have to be set manually. + * + * Important: HARDWAREHEURISTICS is processed last in the code + * so it can override all settings below. + * + * In one sentence: + * First PREDEFINEDBOARD, then manual settings, then HARDWAREHEURISTICS. + */ +/* +#undef ARDUINOPICOSERIAL +#undef ARDUINOPS2 +#undef ARDUINOUSBKBD +#undef ARDUINOZX81KBD +#undef ARDUINOI2CKBD +#undef GIGAUSBKBD +#undef ARDUINOPRT +#undef DISPLAYCANSCROLL +#undef ARDUINOLCDI2C +#undef ARDUINONOKIA51 +#undef ARDUINOILI9488 +#undef ARDUINOSSD1306 +#undef ARDUINOMCUFRIEND +#undef ARDUINOEDP47 +#undef ARDUINOGRAPHDUMMY +#undef LCDSHIELD +#undef ARDUINOTFT +#undef ARDUINOVGA +#undef TFTESPI +#undef ARDUINOEEPROM +#undef ARDUINOI2CEEPROM +#undef ARDUINOEFS +#undef ARDUINOSD +#undef ESPSDMMC +#undef ESPSPIFFS +#undef ESP32FAT +#undef RP2040LITTLEFS +#undef STM32SDIO +#undef GIGAUSBFS +#undef ARDUINORTC +#undef ARDUINORTCEMULATION +#undef ARDUINOTONEEMULATION +#undef ARDUINOWIRE +#undef ARDUINOSIMPLEWIRE +#undef ARDUINOWIRESLAVE +#undef ARDUINORF24 +#undef ARDUINOETH +#undef ARDUINOMQTT +#undef ARDUINOSENSORS +#undef ARDUINOSPIRAM +#undef STANDALONE +#undef STANDALONESECONDSERIAL +*/ +// #define ALTSERIAL Serial + +/* we debug the runtime library and where the logging goes */ +#define RTDEBUG 1 +#define RTDEBUGSTREAM 1 + +/* the memory size, set to 0 means determine automatically + leaving it undefined means zero. setting it larger than 16 bit + make the address_t 32bit */ + +#define MEMSIZE 0 + +/* experimental features, don't use unless you know the code */ +/* + * this setting uses the EEPROM as program storage + * The idea is to create a virtual memory layout starting from 0 with the EEPROM + * from elength() and then adding the BASIC RAM to it. himem and top need to be + * handled carefully. + */ +#undef ARDUINOPGMEEPROM + +/* IO control, emulate real tab by counting characters, on by default + but overriden for very small boards - see hardware heuristics */ +#define HASMSTAB + +/* VT52 settings, on by default but override further down for very + small boards, check the hardware heuristics section if you need VT52 + on small AVR boards */ +#define HASVT52 +#undef VT52WIRING + +/* + * Experimental BUILDIN feature, implemented as a filesystem. + * Buildin BASIC programs are stored in the flash memory of the Arduino. + * They appear as files in the filesystem. + */ +#undef HASBUILDIN +/* this is the demo module */ +#define BUILDINMODULE "buildin/buildin-games.h" +/* a small tutorial */ +// #define BUILDINMODULE "buildin/buildin-tutorial.h" +/* test program for Arduinos */ +// #define BUILDINMODULE "buildin/buildin-arduinotest.h" +/* a games module */ +// #define BUILDINMODULE "buildin/buildin-games.h" + +/* interrupts for the EVENT command, this is needed to use Arduino interrupts */ +#define ARDUINOINTERRUPTS + +/* + * handle the break condition in the background. + * Off by default but needed for some keyboards. + * On an UNO 170 bytes overhead if on and 5% + * performance loss. If any system runs background + * tasks anyway, better to switch it on. + */ +#undef BREAKINBACKGROUND + +/* + * This code measures the fast ticker frequency in microseconds + * It counts the number of tokens drawn plus statements executed. + */ +#undef FASTTICKERPROFILE + +/* the default EEPROM dummy size */ +#define EEPROMSIZE 1024 + +/* + * PIN settings and I2C addresses for various hardware configurations + * used a few heuristics and then the hardware definitions above + * + * #define SDPIN sets the SD CS pin - can be left as a default for most HW configs + * TTGO needs it as default definitions in the board file are broken + * #define PS2DATAPIN, PS2IRQPIN sets PS2 pin + */ + +/* PS2 Keyboard pins for AVR - use one interrupt pin 2 and one date pin + 5 not 4 because 4 conflicts with SDPIN of the standard SD shield */ + +#define PS2DATAPIN 3 +#define PS2IRQPIN 2 + +/* + * Pin settings for the ZX81 Keyboard + * first the 8 rows, then the 5 columns or the keyboard + * + * MEGAs have many pins and default is to use the odd pins on the side + * UNOs, NANOs, and others use the lower pins by default avoiding the + * pin 13 which is LED and doesn't work with standard schematics + */ +#ifdef ARDUINO_AVR_MEGA2560 +#define ZX81PINS 37, 35, 33, 31, 29, 27, 25, 23, 47, 45, 43, 41, 39 +#else +#define ZX81PINS 7, 8, 9, 10, 11, 12, A0, A1, 2, 3, 4, 5, 6 +#endif + +/* Ethernet - 10 is the default */ +/* #define ETHPIN 10 */ + +/* The Pretzelboard definitions for Software Serial, conflicts with SPI */ +#define SOFTSERIALRX 11 +#define SOFTSERIALTX 12 + +/* near field pin settings for CE and CSN*/ +#define RF24CEPIN 8 +#define RF24CSNPIN 9 + +/* use standard I2C pins almost always */ +#undef SDA_PIN +#undef SCL_PIN + +/* + * BREAKCHAR is the character stopping the program on Ardunios + * BREAKPIN can be set, it is a pin that needs to go to low to stop a BASIC program + * This should be done in hardware*.h + * BREAKSIGNAL can also be set, should be done in hardware*.h + */ +#define BREAKCHAR '#' + +/* set this is you want pin 4 on low interrupting the interpreter */ +/* #define BREAKPIN 4 */ +#undef BREAKPIN + +/* the primary serial stream aka serial aka sream 1 */ +#ifndef ALTSERIAL +#define SERIALPORT Serial +#else +#define SERIALPORT ALTSERIAL +#endif + +/* the secondary serial port aka prt aka stream 4 */ +#ifndef PRTSERIAL +#define PRTSERIAL Serial1 +#endif + +/* + * this is soft SPI for SD cards on MEGAs using + * pins 10-13, a patched SD library is needed + * for this: https://github.com/slviajero/SoftSD + * only needed for MEGA boards with an UNO shield + */ +#define SOFTWARE_SPI_FOR_SD + +/* + * list of default i2c addresses + * + * some clock modules do have their EEPROM at 0x57. + * 0x050 this is the default lowest adress of standard EEPROMs + * Configurable range is between 0x50 and 0x57 for modules with jumpers. + * Some clock modules do have their EEPROM at 0x57. + * + * Clock default for the size is 4096. Define your EFS EEPROM and I2C EEPROM + * size here. One parameter set is for EFS and one parameter set is for + * plain serial EEPROMs. + * + * RTCs are often at 0x68 + */ +#define EFSEEPROMADDR 0x050 +/* #define EFSEEPROMSIZE 32768 */ + +#define RTCI2CADDR 0x068 + +/* the size of the plain I2C EEPROM, typically a clock */ +/* #define I2CEEPROMADDR 0x057 */ +/* #define I2CEEPROMSIZE 4096 */ +/* definition for an external EEPROM */ +#define I2CEEPROMADDR 0x050 + +/* is the I2C EEPROM buffered, left open here for the board file to decided - defaults to unbuffered */ +/* #define ARDUINOI2CEEPROM_BUFFERED */ + +/* use the direct i2c code and bypass the Wire library on AVR + * default off here, board file and heuristics to decide, this + * is currently only implemented on ARDUINO_ARCH_AVR and tested on UNO + */ +#undef ARDUINODIRECTI2C + +/* + * Sensor library code - configure your sensors here, will go to a +* separate file in the future + */ +#ifdef ARDUINOSENSORS +#undef ARDUINODHT +#define DHTTYPE DHT22 +#define DHTPIN 2 +#define ARDUINOSHT +#define ARDUINOMQ2 +#define MQ2PIN A0 +#undef ARDUINOLMS6 +#undef ARDUINOAHT +#undef ARDUINOBMP280 +#undef ARDUINOBME280 +#endif + + +#if defined(ARDUINOSHT) || defined(ARDUINOLMS6) || defined(ARDUINOAHT) || defined(ARDUINOBMP280) || defined(ARDUINOBME280) +#define ARDUINOSIMPLEWIRE +#endif + +/* + * Keyboard configuation code, currently only GERMAN and US are supported + * This is used for PS2, FABGL and USB. USB very raw. + * ZX81 is not supported with different languages, I only have a UK one. + */ + +#define ARDUINOKBDLANG_GERMAN +//#define ARDUINOKBDLANG_US + +/* + * The heuristics. These are things that normally would make sense on a + * board. + */ + +/* + * Buffer sizes depending on what we are doing. + */ + + #if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_LGT8F) + /* the small memory model with shallow stacks and small buffers */ + #define BUFSIZE 80 + #define STACKSIZE 15 + #define GOSUBDEPTH 4 + #define FORDEPTH 4 + #define LINECACHESIZE 4 + #else + /* the for larger microcontrollers */ + #define BUFSIZE 128 + #define STACKSIZE 64 + #define GOSUBDEPTH 8 + #define FORDEPTH 8 + #define LINECACHESIZE 16 + #endif + +#ifdef HARDWAREHEURISTICS +/* UNOS are very common. Small memory, we put the program into EEPROM and make everything small */ +#if defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_NANO) +#define ARDUINOEEPROM +#define ARDUINOPICOSERIAL +#define ARDUINOPGMEEPROM +#define ARDUINODIRECTI2C +#undef ARDUINOI2CEEPROM_BUFFERED +#undef LINECACHESIZE +#undef HASMSTAB +#define MEMSIZE 512 +#endif +/* der Pro */ +#if defined(ARDUINO_AVR_PRO) +#define ARDUINOEEPROM +#define ARDUINOPGMEEPROM +#undef LINECACHESIZE +#undef HASMSTAB +#undef HASVT52 +#define MEMSIZE 768 +#endif +/* on a DUEMILA we allocate just as little main memory as possible, currenly not working because sketch too big + * needs to be checked */ +#if defined(ARDUINO_AVR_DUEMILANOVE) +#define ARDUINOEEPROM +#define ARDUINOPICOSERIAL +#define ARDUINOPGMEEPROM +#undef LINECACHESIZE +#undef HASMSTAB +#define MEMSIZE 128 +#undef HASVT52 +#endif +/* tested for LTQF32 Mini EVB - very low memory as core needs a lot */ +#if defined(ARDUINO_ARCH_LGT8F) +#define ARDUINOEEPROM +#define ARDUINOPICOSERIAL +#undef LINECACHESIZE +#undef HASMSTAB +#define MEMSIZE 256 +#define ARDUINOPGMEEPROM +#undef HASVT52 +#endif +/* all AVR 8 bit boards have an EEPROM (most probably) */ +#if defined(ARDUINO_ARCH_AVR) +#define ARDUINOEEPROM +#endif +/* megaAVR boards have an EEPROM */ +#if defined(ARDUINO_ARCH_MEGAAVR) +#define ARDUINOEEPROM +#endif +/* LEONARDO boards */ +#if defined(ARDUINO_AVR_LEONARDO) +/* to be done */ +#endif +/* all ESPs best are compiled with ESPSPIFFS predefined */ +#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) +#define ESPSPIFFS +#endif +/* all ESPs best have EEPROM emulation */ +#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) +#define ARDUINOEEPROM +#define ESPSPIFFS +#endif +/* all RP2040 boards best are compiled with RP2040LITTLEFS predefined */ +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +#define RP2040LITTLEFS +#endif +/* use the EEPROM dummy of the NRESESA boards */ +#if defined(ARDUINO_ARCH_RENESAS) +#define ARDUINOEEPROM +#endif +/* for XMC there is an EEPROM emulation, which needs: https://github.com/slviajero/XMCEEPROMLib */ +#if defined(ARDUINO_ARCH_XMC) +#define ARDUINOEEPROM +#endif +/* the China Nano clones. Super fast but with very small flash. */ +#if defined(ARDUINO_ARCH_LGT8F) +#undef HASMSTAB +#endif +#endif + +/* + * Now source the the hardware models if this is set. + */ +#ifdef PREDEFINEDBOARD +#include PREDEFINEDBOARD +#endif + +/* + * Here, dependencies are handled. Some settings require others to be set + * first. + * + * Examples: + * Many filesystems and displays need SPI. + * Some components need Wire. + * Some platforms do not have tone, so we need to emulate it. + */ + +/* + * DUE has no tone, we switch to emulation mode automatically. + */ +#ifdef ARDUINO_SAM_DUE +#define ARDUINOTONEEMULATION +#endif + +/* + * Some settings, defaults, and dependencies + * + * HASWIRE is set to start wire. Some libraries do this again. + * + * Handling Wire and SPI is tricky as some of the libraries + * also include and start SPI and Wire code. + * + * HASIMPLEWIRE avoids the overhead of importing the entire + * filesystem code. It only activates plain Wire and provides + * the WIRE command in basic. + */ + +/* + * Safety net for ARDUINODIRECTI2C, architectures that are + * not AVR 8 bit and do not have TWDR are not supported. + */ +#if !defined(ARDUINO_ARCH_AVR) || !defined(TWDR) +#undef ARDUINODIRECTI2C +#endif + +/* a clock needs wire */ +#ifdef ARDUINORTC +#define HASSIMPLEWIRE +#endif + +/* a display needs wire */ +#if defined(ARDUINOLCDI2C) || defined(ARDUINOSSD1306) +#define HASSIMPLEWIRE +#endif + +/* EEPROM storage needs wire */ +#if defined(ARDUINOEFS) +#define HASSIMPLEWIRE +#endif + +/* external EEPROMs also need wire */ +#if defined(ARDUINOI2CEEPROM) +#define HASSIMPLEWIRE +#endif + +/* external EEPROM buffered needs full wire support, because EFS not ported */ +#if defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED) +#define HASWIRE +#endif + +/* plain Wire support also needs wire ;-) */ +#if defined(ARDUINOWIRE) || defined(ARDUINOWIRESLAVE) +#define HASWIRE +#endif + +/* and I2C Keyboard needs wire */ +#if defined(ARDUINOI2CKBD) +#define HASSIMPLEWIRE +#endif + +/* the BASIC command/function WIRE */ +#if defined (ARDUINOSIMPLEWIRE) +#define HASSIMPLEWIRE +#endif + +/* radio needs SPI */ +#if defined(ARDUINORF24) +#define ARDUINOSPI +#endif + +/* a filesystem needs SPI */ +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(ESP32FAT) +#define ARDUINOSPI +#endif + +/* networking may need SPI */ +#if defined(ARDUINOMQTT) +#define ARDUINOSPI +#endif + +/* the NOKIA and ILI9488 display needs SPI */ +#if defined(ARDUINONOKIA51) || defined(ARDUINOILI9488) || defined(TFTESPI) +#define ARDUINOSPI +#endif + +/* the RAM chips */ +#if defined(ARDUINOSPIRAM) +#define ARDUINOSPI +#endif + +/* Networking and keyboards need the background task capability */ +#if defined(ARDUINOMQTT) || defined(ARDUINOETH) || defined(ARDUINOUSBKBD) || defined(ARDUINOZX81KBD) || defined(ARDUINOI2CKBD) || defined(GIGAUSBKBD) +#define BASICBGTASK +#endif + +/* the ESP8266 needs to run the background task calls for the scheduler */ +#if defined(ARDUINO_ARCH_ESP8266) +#define BASICBGTASK +#endif + +/* Break in background needs background tasks as well */ +#if defined(BREAKINBACKGROUND) +#define BASICBGTASK +#endif + +/* picoserial is not a available on many platforms */ +#ifdef ARDUINOPICOSERIAL +#ifndef UCSR0A +#undef ARDUINOPICOSERIAL +#endif +#endif + +/* + * incompatibilities and library stuff + */ +/* these platforms have no EEPROM and no emulation built-in */ +#if defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_GIGA) +#undef ARDUINOEEPROM +#endif + +/* + * SD filesystems with the standard SD driver + * for MEGA 256 a soft SPI solution is needed + * if standard shields are used, this is a patched + * SD library https://github.com/slviajero/SoftSD + */ +#ifdef ARDUINOSD +#define FILESYSTEMDRIVER +#endif + +/* + * ESPSPIFFS tested on ESP8266 and ESP32 + * supports formating in BASIC + */ +#ifdef ESPSPIFFS +#define FILESYSTEMDRIVER +#endif + +/* + * ESP32FAT tested on ESP32 + * supports formating in BASIC + */ +#ifdef ESP32FAT +#define FILESYSTEMDRIVER +#endif + +/* + * RP2040 internal filesystem + * This is test code from https://github.com/slviajero/littlefs + * and the main branch is actively developed + */ +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +#endif + +/* + * STM32 SDIO driver for he SD card slot of the STM32F4 boards (and others) + */ +#ifdef STM32SDIO +#define FILESYSTEMDRIVER +#endif + +/* + * The USB filesystem of the GIGA board + */ +#ifdef GIGAUSBFS +#define FILESYSTEMDRIVER +#define NEEDSUSB +#endif + +/* + * external flash file systems override internal filesystems + * currently BASIC can only have one filesystem + */ +#ifdef ARDUINOSD +#undef ESPSPIFFS +#undef ESP32FAT +#undef RP2040LITTLEFS +#undef GIAGUSBFS +#endif + +/* + * support for external EEPROMs as filesystem + * overriding all other filessystems. This is a minimalistic + * filesystem meant for very small systems with not enough + * memory for real filesystems + * https://github.com/slviajero/EepromFS + */ +#ifdef ARDUINOEFS +#undef ESPSPIFFS +#undef ESP32FAT +#undef RP2040LITTLEFS +#undef ARDUINOSD +#undef STM32SDIO +#undef GIGAUSBFS +#define FILESYSTEMDRIVER +#endif + +/* + * The build in file system for read only programs, only + * if there is no other file system present + */ +#if defined(HASBUILDIN) +#define FILESYSTEMDRIVER +#include BUILDINMODULE +#endif + +/* + * Software SPI only on Mega2560 + */ +#ifndef ARDUINO_AVR_MEGA2560 +#undef SOFTWARE_SPI_FOR_SD +#endif + +/* + * I used these two articles + * https://randomnerdtutorials.com/esp8266-deep-sleep-with-arduino-ide/ + * https://randomnerdtutorials.com/esp32-deep-sleep-arduino-ide-wake-up-sources/ + * for this very simple implementation - needs to be improved (pass data from sleep + * state to sleep state via EEPROM) + */ +/* this is done only here now to make sure HASCLOCK is set properly */ + +#if defined(ARDUINO_ARCH_SAMD) +#define HASBUILTINRTC +#endif + +/* STM32duino have the same structure */ +#if defined(ARDUINO_ARCH_STM32) +#define HASBUILTINRTC +#endif + +/* the NRENESA board have a buildin RTC as well */ +#if defined(ARDUINO_ARCH_RENESAS) +#define HASBUILTINRTC +#endif + +/* + * global variables for a standard LCD shield. + * Includes the standard Arduino LiquidCrystal library + */ +#ifdef LCDSHIELD +#define DISPLAYDRIVER +#define HASKEYPAD +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +#endif + +/* + * A LCD display connnected via I2C, uses the standard + * Arduino I2C display library. + */ +#ifdef ARDUINOLCDI2C +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +#endif + +/* + * A Nokia 5110 with ug8lib2 - can scroll quite well + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + * + * default PIN settings here are for ESP8266, using the standard + * SPI SS for 15 for CS/CE, and 0 for DC, 2 for reset + * + */ +#ifdef ARDUINONOKIA51 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#endif + +/* + * 4.7 inch epaper displays are derived from the NOKIA51 code, no grayscales + * at the moment. Forcing the font into rectangles and hoping this works. + * + * Epapers bypass the display driver here and use a graphics based display + * mode instead + */ +#ifdef ARDUINOEDP47 +#define GRAPHDISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#endif + + +/* + * Small SSD1306 OLED displays with I2C interface + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + */ +#ifdef ARDUINOSSD1306 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#endif + +/* + * A ILI9488 with Jarett Burkets version of Adafruit GFX and patches + * by Stefan Lenz + * currently only slow software scrolling implemented in BASIC + * + * https://github.com/slviajero/ILI9488 + * + * we use 9, 8, 7 as CS, CE, RST by default and A7 for the led brightness control + */ + +#ifdef ARDUINOILI9488 +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#endif + +/* + * A MCUFRIEND parallel port display for the various tft shields + * This implementation is mainly for Arduino MEGA + * + * currently only slow software scrolling implemented in BASIC + * + */ + +#ifdef ARDUINOMCUFRIEND +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#endif + +/* + * The driver for the TFT_eSPI graphics of the T-Deck from Lilygo + * currently not finished + */ + +#ifdef TFTESPI +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#endif + +/* + * A no operations graphics dummy + * Tests the BASIC side of the graphics code without triggering + * any output + */ +#ifdef ARDUINOGRAPHDUMMY +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#endif + +/* + * SD1963 TFT display code with UTFT. + * Tested witth SD1963 800*480 board. + * it is mainly intended for a MEGA or DUE as a all in one system + * this is for a MEGA shield and the CTE DUE shield, for the due + * you need to read the comment in Arduino/libraries/UTFT/hardware/arm + * HW_ARM_defines.h -> uncomment the DUE shield + * See also + * https://github.com/slviajero/tinybasic/wiki/Projects:-4.-A-standalone-computer-with-a-TFT-screen-based-on-a-DUE + */ +#ifdef ARDUINOTFT +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#endif + +/* + * Keyboard code for either the Fablib Terminal class or + * PS2Keyboard - please note that you need the ESP patched + * version here as mentioned above + * + * sets HASKEYBOARD to inform basic about this capability + * + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +#if defined(ARDUINO_TTGO_T7_V14_Mini32) && defined(ARDUINOVGA) +#define PS2FABLIB +#define HASKEYBOARD +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#endif + +#if defined(ARDUINO) && defined(ARDUINOPS2) +#define PS2KEYBOARD +#define HASKEYBOARD +#endif + +#if defined(ARDUINO) && defined(ARDUINOUSBKBD) +#define HASKEYBOARD +#define USBKEYBOARD +#endif + +#if defined(ARDUINOZX81KBD) +#define HASKEYBOARD +#define ZX81KEYBOARD +#endif + +/* BREAKINBACKGROUND is needed here to avoid slowdown, probably also for the other keyboards */ +#if defined(ARDUINOI2CKBD) +#define HASKEYBOARD +#define I2CKEYBOARD +#define BREAKINBACKGROUND +#endif + +/* set the HASKEYBOARD feature to tell BASIC about it */ +#if defined(GIGAUSBKBD) +#define HASKEYBOARD +#define GIGAUSBKEYBOARD +#endif + +/* + * Arduino Real Time clock. The interface here offers the values as number_t + * combining all values. + * + * The code does not use an RTC library any more all the rtc support is + * builtin now. + * + * A clock must activate the macro #define HASCLOCK to make the clock + * available in BASIC. + * + * The following software models are supported + * - Built-in clocks of STM32 and MKR and NRESAS and XIAO are supported by default + * as RTCZero type code + * - Built-in clocks of ESP32 are supported by default with a time structure type code + * - Built-in clocks of GIGA the same as ESP32 + * - I2C clocks can be activated: DS1307, DS3231, and DS3232 + * - A Real Time Clock emulation is possible using millis() + * + * rtcget accesses the internal registers of the clock. + * Registers 0-6 are bcd transformed to return + * seconds, minutes, hours, day of week, day, month, year + * + * On I2C clocks registers 7-255 are returned as memory cells + */ + + #if defined(ARDUINORTC) || defined(HASBUILTINRTC) || defined(ARDUINO_ARCH_ESP32) || defined(ARDUINORTCEMULATION) || defined(ARDUINO_ARCH_MBED_GIGA) + #define HASCLOCK + #endif + +/* + * External EEPROM is handled through an EFS filesystem object + * see https://github.com/slviajero/EepromFS + * for details. Here the most common parameters are set as a default. +*/ +#ifdef ARDUINOEFS +#undef ARDUINOI2CEEPROM +#endif + +/* + * Tell BASIC we have a second serial port + */ +#ifdef ARDUINOPRT +#define HASSERIAL1 +#endif + +/* + * Tell BASIC we have a radio adapter + */ +#ifdef ARDUINORF24 +#define HASRF24 +#endif + +/* + * Tell BASIC we have MQTT and make sure one low level + * interface is available + */ +#ifdef ARDUINOMQTT +#define HASMQTT +#ifndef ARDUINOETH +#define ARDUINOWIFI +#endif +#endif + +/* + * handling the PROGMEM macros + */ + + /* + * if the PROGMEM macro is define we compile on the Arduino IDE + * we undef all hardware settings otherwise a little odd + */ +#ifdef ARDUINO_ARCH_MBED +#define PROGMEM +#endif + +#ifdef PROGMEM +#define ARDUINOPROGMEM +#else +#undef ARDUINOPROGMEM +#define PROGMEM +#endif + +/* on XMC we circumvent progmem */ +#ifdef ARDUINO_ARCH_XMC +#undef ARDUINOPROGMEM +#define PROGMEM +#endif + + +/* the code to address EEPROMs directly */ +/* only AVR controllers are tested with this, don't use elsewhere, there are multiple bugs */ +#if defined(ARDUINOPGMEEPROM) & ! ( defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_LGT8F) ) +#undef ARDUINOPGMEEPROM +#endif + +#ifdef ARDUINOPGMEEPROM +#define USEMEMINTERFACE +#define EEPROMMEMINTERFACE +#else +#undef EEPROMMEMINTERFACE +#endif + +/* the SPI RAM interface */ +#ifdef ARDUINOSPIRAM +#define USEMEMINTERFACE +#define SPIRAMINTERFACE +#endif + +/* + * to handle strings in situations with a memory interface two more buffers are + * needed they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set. + * + * default is 128, on an MEGA 512 is possible + */ +#ifdef ARDUINO_AVR_MEGA2560 +#define SPIRAMSBSIZE 512 +#else +#define SPIRAMSBSIZE 128 +#endif + + +/* + * Does the platform has command line args and do we want to use them + * Arduinos don't have them + */ +#undef HASARGS + +/* + * How restrictive are we on function recursive calls to protect the stack + * On 8 bit Arduinos this needs to be limited strictly + */ +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_LGT8F) || defined(ARDUINO_AVR_PRO) +#define FNLIMIT 4 +#elif defined(ARDUINO_ARCH_ESP8266) +#define FNLIMIT 64 +#elif defined(ARDUINO_ARCH_ESP32) +#define FNLIMIT 128 +#elif defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +#define FNLIMIT 128 +#elif defined(ARDUINO_ARCH_SAM) && defined(ARDUINO_ARCH_SAMD) +#define FNLIMIT 64 +#elif defined(ARDUINO_ARCH_XMC) +#define FNLIMIT 64 +#elif defined(ARDUINO_ARCH_SMT32) +#define FNLIMIT 128 +#elif defined(ARDUINO_ARCH_RENESAS) +#define FNLIMIT 32 +#else +#define FNLIMIT 128 +#endif + +/* + * here the runtime environment makes a good guess which + * language can be supported by the boards. This is tricky + * it may not always work. + * + * MEGAAVR does BASICFULL but this leaves little room for hardware drivers + * LEONARDO currently broken, to much flash allocated. + */ +#if defined(ARDUINO_ARCH_AVR) +#if defined(ARDUINO_AVR_DUEMILANOVE) +#define BASICPALOALTO +#endif +#if defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_NANO) || defined(ARDUINO_AVR_PRO) +#define BASICSIMPLE +#endif +#if defined(ARDUINO_AVR_LEONARDO) +#define BASICSMALL +#endif +#if defined(ARDUINO_AVR_MEGA2560) +#define BASICFULL +#endif +#elif defined(ARDUINO_ARCH_LGT8F) +#define BASICSIMPLE +#elif defined(ARDUINO_ARCH_MEGAAVR) +#define BASICFULL +#elif defined(ARDUINO_ARCH_ESP8266) +#define BASICFULL +#elif defined(ARDUINO_ARCH_ESP32) +#define BASICFULL +#elif defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +#define BASICFULL +#elif defined(ARDUINO_ARCH_SAM) && defined(ARDUINO_ARCH_SAMD) +#define BASICFULL +#elif defined(ARDUINO_ARCH_XMC) +#define BASICFULL +#elif defined(ARDUINO_ARCH_SMT32) +#define BASICFULL +#elif defined(ARDUINO_ARCH_RENESAS) +#define BASICFULL +#else +#define BASICFULL +#endif diff --git a/data/Basic2/IoTBasic/language.h b/data/Basic2/IoTBasic/language.h new file mode 100644 index 0000000000000000000000000000000000000000..3aa7b54e8b157abfe2225e765e8358f2d01fc0bb --- /dev/null +++ b/data/Basic2/IoTBasic/language.h @@ -0,0 +1,464 @@ +/* + * + * $Id: language.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * This is the language definition file. Edit this to set the language + * capabilities. + * + * MEMSIZE was moved to hardware.h now as it is a hardware setting. + * + */ + +/* + * DEBUG switches on compiled debug mode. Consider using runtime + * debug with SET 0,x before using this. + */ +#define DEBUG 0 + +/* + * Interpreter feature sets, choose one of the predefines or undefine all predefines and set the + * features in custom settings + * + * BASICFULL: full language set, use this with flash >32kB - ESPs, MKRs, Mega2560, RP2040, UNO R4 + * BASICINTEGER: integer BASIC with full language, use this with flash >32kB + * BASICSIMPLE: integer BASIC with reduced language set, 32kB capable - for UNOs with a lot of device drivers + * BASICSIMPLEWITHFLOAT: a small floating point BASIC, 32kB capable, for UNOs - good for UNOs with the need of float + * BASICTINYWITHFLOAT: a floating point tinybasic, if you have 32kB and need complex device drivers + * BASICMINIMAL: minimal language, just Palo Alto plus Arduino I/O, works on 168 with 1kB RAM and 16kB flash + * + * The board will try to find the best language model for it's size and capabilities. Relies on the + * information hardware.h produces. It set one of the language models: + * + * BASICFULL, BASICSIMPLE, BASICMINIMAL. + * + * Setting NOLANGUAGEHEURISTICS and then one of the models below will override this + * selection. + */ +#define LANGUAGEHEURISTICS + +#ifndef LANGUAGEHEURISTICS +#undef BASICFULL +#undef BASICINTEGER +#undef BASICSIMPLE +#undef BASICMINIMAL +#undef BASICPALOALTO +#undef BASICSIMPLEWITHFLOAT +#undef BASICTINYWITHFLOAT +#endif + +/* + * Custom settings undef all the the language sets above when you are using this. Not all language + * features work in all combinations. + * + * HASAPPLE1: Apple 1 BASIC compatibility. This is the base for all other features. + * In this version the interpreter has a heap, a string pool and one dimensional arrays. + * HASARDUINOIO: Arduino I/O functions, including millis() timer. + * HASFILEIO: file I/O functions, including open, close, read, write, remove, rename. + * HASTONE: tone() and noTone() functions for sound output mapped to the PLAY command. + * HASPULSE: pulseIn() function for measuring pulse lengths. Pulse output. Both mapped to the PULSE command. + * HASSTEFANSEXT: Stefan's BASIC extensions, including ELSE, PUT, GET, advanced FOR loops, SQR and POW. + * HASERRORMSG: error messages for syntax and runtime errors. + * HASVT52: VT52 terminal emulation for text output -> moved to hardware.h + * HASFLOAT: floating point support. + * HASGRAPH: graphics support, including line, circle, rectangle, fill, color. + * HASDARTMOUTH: Dartmouth BASIC compatibility: single line DEF FN, ON, READ, DATA. + * HASDARKARTS: Dark Arts BASIC is MALLOC, FIND, CLR for individual variables and EVAL for self modifying code. + * HASIOT: IoT functions, Wire access, Sensor functions, MQTT. Needs strings and heap. STR, VAL, INSTR are + * part of this. MQTT support only on Arduino- + * HASMULTIDIM: two dimensional arrays and one dimensional string arrays. + * HASTIMER: timer functions, AFTER and EVERY for periodic execution of programs. + * HASEVENTS: event handling, EVENT command. + * HASERRORHANDLING: error handling with ERROR GOTO. + * HASSTRUCT: structured language elements, WHILE WEND, REPEAT UNTIL, SWITCH CASE. Multi line IF THEN ELSE + * with the DO DEND construct. + * HASMSSTRINGS: MS Basic compatible strings, RIGHT$, LEFT$, MID$, ASC, CHR$, and string addition with +. + * Compatibility to MS BASICs is limited as this BASIC has only inplace string operations- + * HASMULTILINEFUNCTIONS: multi line functions, DEF FN, FEND. + * HASEDITOR: line editor for the console. + * HASTINYBASICINPUT: Tiny BASIC compatible input using the expression parser. Expressions and variables + * are valid number input with it. Default now but can have odd side effects. + * HASLONGNAMES: long variable names, up to 16 characters. Name length is set by MAXNAME in basic.h and + * can be any value <128 bytes. Names are still only uppercase and all names will be uppercased by lexer. + * HASHELP: show the commands of the interpreter. Will be extended to a help system. + * HASFULLINSTR: the full C64 style INSTR command. Without this flag INSTR only accepts + * a single character as argument. This is much faster and leaner on an Arduino. + * This macro is activated when HASMSSTRINGS is set. + * HASLOOPOPT: optimizes the FOR loops for speed. This is a trade off between speed and + * memory. It is activated by default. Speeup is about 10% on a Mac. On platforms + * with low memory bandwidth it is much more. + * HASNUMSYSTEM: constants can be hex, octal, binary or decimal. This is not activated by + * default. Currently only implemented in VAL() and STR(). + * HASBITWISE: has bitwise operations >>, << and the function BIT -> removed and default now. + * + * If you want to set everything manually, set NOLANGUAGEHEURISTICS above + */ + +#ifndef LANGUAGEHEURISTICS +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#define HASHELP +#define HASFULLINSTR +#define HASLOOPOPT +#define HASNUMSYSTEM +#endif + + +/* + * + * Odd stuff - these things change the behaviour of BASIC in some aspects. + * They can be used to make the interpreter compatible with other dialects. + * + * POWERRIGHTTOLEFT: normally the ^ operator works from left to right + * which means 2^3^2 = (2^3)^2 = 8^2 = 64. Setting this flag would + * change the behaviour to 2^3^2 = 2^(3^2) = 512 + * MSARRAYLIMITS: in BASIC arrays start at 1 and DIM A(10) creates 10 + * elements. With MSARRAYLIMITS defined, arrays start at 0 and have + * n+1 elements. This can be changed at any time with SET 21,0 or 1. + * SUPPRESSSUBSTRINGS: switch off substring logic by default, makes only sense with + * HASMSSTRINGS activated. With this, the syntax of strings and string + * arrays is comaptible to MS strings (only used to preset the variable now). + * SET 20 can change this at runtime. + * USELONGJUMP: use the longjmp feature of C. This greatly simplifies + * error handling at the cost of portability to some MCU platforms + * currently only experimental. It costs memory for the jump buffer. + * Don't use it on very small systems. LONGJUMP must be set to 0 or 1 as + * it is used in boolean expression in the code + * BOOLEANMODE: switch the behaviour of BASICs boolean operators. Default (-1) + * is to cast all numbers to signed 16bit and then do bitwise arithemtic. + * In this mode false is 0 and -1 is true. (1) is C style boolean arithemtic. + * In this mode true is 1 and false is 0. AND and OR still do bitwise operations + * but NOT is C not. SET 19,1 or -1 can change this at runtime. + * HAS64BIT: 64 bit floating point support on platforms that have a 64 bit double. + * Counterexample: AVR 8bit does not have 64 bit floating point. + * HAS32BITINT: 32 bit integer support on 8 bit platforms. + * HASPOWER: the POWER operator ^ is available in addition to the POW function. + * HASUSRCALL: the USR and CALL functions. On small systems they need a lot + * of flash and can be disabled. + */ + +#undef POWERRIGHTTOLEFT +#undef MSARRAYLIMITS +#undef SUPPRESSSUBSTRINGS +#define USELONGJUMP 0 +#define BOOLEANMODE -1 +#undef HAS64BIT +#undef HAS32BITINT +#define HASPOWER +#define HASUSRCALL + +/* Palo Alto plus Arduino functions */ +#ifdef BASICMINIMAL +#undef HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#undef HASSTEFANSEXT +#undef HASERRORMSG +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + +/* the original Palo Alto Tinybasic, this is the real minimum */ +#ifdef BASICPALOALTO +#undef HASAPPLE1 +#undef HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#undef HASSTEFANSEXT +#undef HASERRORMSG +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASBITWISE +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + +/* all features minus float and tone */ +#ifdef BASICINTEGER +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#define HASHELP +#define HASFULLINSTR +#define HASLOOPOPT +#define HASNUMSYSTEM +#endif + +/* a simple integer basic for small systems mainly the UNO */ +#ifdef BASICSIMPLE +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#define HASIOT +#undef HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + +/* a small integer BASIC for 32kB systems with big cores */ +#ifdef BASICSMALL +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#define HASIOT +#undef HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + + +/* all features activated */ +#ifdef BASICFULL +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#define HASHELP +#define HASFULLINSTR +#define HASLOOPOPT +#define HASNUMSYSTEM +#endif + +/* a simple BASIC with float support */ +#ifdef BASICSIMPLEWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + +/* a Tinybasic with float support */ +#ifdef BASICTINYWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + +/* + * Language feature dependencies + * + * Dartmouth and darkarts needs the heap which is in Apple 1 + * IoT needs strings and the heap, also Apple 1 + * + * String arrays need multi dimensional capabilities + * + * The structured language set needs ELSE from STEFANSEXT + * + */ +#if defined(HASMULTILINEFUNCTIONS) +#define HASDARTMOUTH +#endif + +#if defined(HASDARTMOUTH) || defined(HASDARKARTS) || defined(HASIOT) || defined(HASMSSTRINGS) +#define HASAPPLE1 +#endif + +#if defined(HASSTRUCT) +#define HASSTEFANSEXT +#endif + +/* MS strings also bring the full INSTR */ +#if defined(HASMSSTRINGS) +#define HASFULLINSTR +#endif + +/* dependencies on the hardware */ +#if !defined(DISPLAYHASGRAPH) +#undef HASGRAPH +#endif diff --git a/data/Basic2/IoTBasic/runtime.cpp b/data/Basic2/IoTBasic/runtime.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d4712af386ef797a9a58ec2ad864b2bff334da89 --- /dev/null +++ b/data/Basic2/IoTBasic/runtime.cpp @@ -0,0 +1,6239 @@ +/* + * Stefan's basic interpreter - Arduino runtime environment runtime.cpp. + * + * This is the Arduino runtime environment for BASIC. It maps the functions + * needed for the various subsystems to the MCU specific implementations. + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Configure the hardware settings and parameters in hardware.h. + */ + +#include "Arduino.h" +#include "hardware.h" +#include "runtime.h" + +/* If the BASIC interpreter provides a loop function it will superseed this one */ +void __attribute__((weak)) bloop() {}; + +/* + * Defining the bssystype variable which informs BASIC about the platform at runtime. + * bssystype is not used by the interpreter, but can be used by BASIC programs to + * determine the platform they are running on. + */ + +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) +uint8_t bsystype = SYSTYPE_AVR; +#elif defined(ARDUINO_ARCH_ESP8266) +uint8_t bsystype = SYSTYPE_ESP8266; +#elif defined(ARDUINO_ARCH_ESP32) +uint8_t bsystype = SYSTYPE_ESP32; +#elif defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_MBED_RP2040) +uint8_t bsystype = SYSTYPE_RP2040; +#elif defined(ARDUINO_ARCH_SAM) && defined(ARDUINO_ARCH_SAMD) +uint8_t bsystype = SYSTYPE_SAM; +#elif defined(ARDUINO_ARCH_XMC) +uint8_t bsystype = SYSTYPE_XMC; +#elif defined(ARDUINO_ARCH_SMT32) +uint8_t bsystype = SYSTYPE_SMT32; +#elif defined(ARDUINO_ARCH_RENESAS) +uint8_t bsystype = SYSTYPE_NRENESA; +#elif defined(ARDUINO_ARCH_MBED_GIGA) +uint8_t bsystype = SYSTYPE_GIGA; +#else +uint8_t bsystype = SYSTYPE_UNKNOWN; +#endif + +/* + * Global variables of the runtime env. + * + * id: the active input stream + * od: the active output stream + * idd: the default input stream in interactive mode + * odd: the default output stream in interactive mode + * ioer: the io error variable, always or-ed with ert in BASIC + */ + +int8_t id; +int8_t od; +int8_t idd = ISERIAL; +int8_t odd = OSERIAL; +int8_t ioer = 0; + +/* + * MS Basic and many terminals have a real TAB function advanceing to + * the next tab stop. This is emulated by counting the characters on + * the output streams 0-4. The feature is activated with the HASMSTAB. + * The code cannot processes composed characters like Germin Umlauts + * correctly. + */ + +#ifdef HASMSTAB +uint8_t charcount[5]; +#endif + +/* + * The pointer to the buffer used for the &0 device. + * The BASIC input buffer is used. With this feature, a line can be printed + * to the buffer and then accessed as a string @$ in BASIC. In systems where + * CHR() is not available, this can be used to convert a number to a string. + */ + +char* nullbuffer = ibuffer; +uint16_t nullbufsize = BUFSIZE; +uint8_t bufferstat(uint8_t ch) { return 1; } + +/* + * External libraries of the runtime environment for the peripherals. + * When the runtime environment is brocken down to modules this will + * got into the modules. Summerized here for the sake of clarity. + */ + +/* + * OS specific headers. + */ + +/* + * ESPy stuff, pgmspace has changed location in some ESP32 cores. + */ + + #ifdef ARDUINOPROGMEM + #ifdef ARDUINO_ARCH_ESP32 + #include + #else + #include + #endif + #endif + +/* + * MBED OS type includes summarized here - tested for GIGA boards. +*/ + +#ifdef ARDUINO_ARCH_MBED_GIGA +#include "mbed.h" +#include +#endif + +/* + * EEPROM code. Some of the boards bring their own EEPROM classes. + * + * These are: + * - AVR boards of all kinds + * - ESP8266 and ESP32 + * - the LGT8F boards with the newer cores + * + * For XMC my homebrew is now part of the interpreter. + * See https://github.com/slviajero/XMCEEPROMLib + * For more information on this or if you want to use it on other platforms. + * + * For SAMD the FlashStorage library is used. It was orginally written by + * Cristian Maglie. I use the version of Khoi Huang from + * https://github.com/khoih-prog/FlashStorage_SAMD + * This is now bundled with the interpreter. The emulation buffers the + * entire EEPROM in RAM, so 2k should be ok but not more. If the + * dual buffer strategy of EepromFS or XMC would be used, larger + * EEPROMs could be emulated - this is work to be done. + * + * RP2040 standard cores and the DUE do not have an EEPROM emulation. + * This is trapped in hardware.h (EEPROM is disabled). + */ + +#ifdef ARDUINOEEPROM +#if defined(ARDUINO_ARCH_XMC) +#include "src/XMCEEPROMLib/XMCEEPROMLib.h" +#elif defined(ARDUINO_ARCH_SAMD) +#define EEPROM_EMULATION_SIZE 2048 +#include "src/FlashStorage_SAMD/FlashStorage_SAMD.h" +#else +#include +#endif +#endif + +/* Standard SPI coming with the board is used */ + +#ifdef ARDUINOSPI +#include +#endif + +/* + * Standard wire - triggered by the HASWIRE or HASSIMPLEWIR macro. + * These macros are set in the hardware.h file depending on the subsystems. + * + * If ARDUINODIRECTI2C is set the the Wire library is bypassed. This saves + * 200 bytes of RAM and 1kB of program space on an AVR 8bit. It + * also removed the blocking of Wire if the slave does not respond. + * + * In this case Wire.h should not be included in the sketch because + * it allocates the buffers and the Wire object. + */ + +#if defined(HASWIRE) +#include +#endif + +#if defined(HASSIMPLEWIRE) && !defined(ARDUINODIRECTI2C) +#include +#endif + +/* + * IO channel 2 - Keyboards + * + * This is Paul Stoffregen's PS2Keyboard library for PS2 keyboards + * patched for use with non AVR boards. Please download the patched + * version from github: https://github.com/slviajero/PS2Keyboard + */ + + #ifdef ARDUINOPS2 + #include + #endif + + /* + * The USB keyboard code of the Arduino DUE. Keymapping and timing + * need improvement. Currently not a priority. + */ + + #ifdef ARDUINOUSBKBD + #include + #endif + + /* + * The ZX81 keyboard code - tested on AVR MEGA256. Please download + * the library from github: https://github.com/slviajero/ZX81Keyboard + */ + + #ifdef ARDUINOZX81KBD + #include + #endif + + /* + * This is for the USB keyboard code on a GIGA board + * https://docs.arduino.cc/tutorials/giga-r1-wifi/giga-usb/#usb-host-keyboard + * like the DUE keyboard, this code is not recommended. + */ + + #ifdef GIGAUSBKBD + #include "USBHostGiga.h" + #endif + +/* + * IO channel 2 - Displays + * + * The display library for the parallel LCD, this is a standard + * Arduino library. + */ + +#ifdef LCDSHIELD +#include +#endif + +/* + * I2C LCD displays, this library works almost universally despite + * a nasty warning message it sometimes gives. + */ + +#ifdef ARDUINOLCDI2C +#include +#endif + +/* + * This is the monochrome library of Oli Kraus used for Nokia and + * SSD1306 displays. + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * + * It can harware scroll, but this is not yet implemented. + */ + +#if defined(ARDUINONOKIA51) || defined(ARDUINOSSD1306) +#include +#endif + +/* + * This is the (old) ILI9488 library originally created by Jarett Burket + * for SPI control if the very common ILI9488 displays. + * I created a fork as the original is no longer maintained (last commits + * from 2017). Patches in my version allow use from RP2040. + * https://github.com/slviajero/ILI9488 + * + * It can hardware scroll (not yet used). + */ + +#ifdef ARDUINOILI9488 +#include +#include +#endif + +/* + * This is the MCUFRIED library originally for parallel TFTs + * https://github.com/prenticedavid/MCUFRIEND_kbv + * + * For R4 boards, use my patched version + * https://github.com/slviajero/MCUFRIEND_kbv + * + * The original library is board hardware depended as it tries + * to make use of the port macros. This makes it fast but + * it cannot used on non supported boards. + * + * This library can drive the TFT from any board as it has a + * generic section using the Arduino GPIOs. This is slower but + * works. For R4 it uses the port macros. + */ + +#ifdef ARDUINOMCUFRIEND +#include +#include +#endif + +/* + * For TFT we use the UTFT library + * http://www.rinkydinkelectronics.com/library.php?id=51 + * Please note the License, it is not GPL but NON COMMERCIAL + * Creative Commons. + */ + +#ifdef ARDUINOTFT +#include +#include +#endif + +/* + * Lilygo EDP47 displays, 4.7 inch epapers using the respective library + * from Lilygo https://github.com/Xinyuan-LilyGO/LilyGo-EPD47 + */ + +#ifdef ARDUINOEDP47 +#include "epd_driver.h" +#include "font/firasans.h" +#endif + +/* + * VGA is only implemented on one platform - TTGO VGA 1.4 + * Needs https://github.com/slviajero/FabGL + * + * There is a side effect to the network code. The Wifi library + * has to be sourced before FabGL. Reason is unknown. + */ + + #if defined(ARDUINOVGA) && defined(ARDUINO_TTGO_T7_V14_Mini32) + #include + #include + #endif + +/* + * IO channel 9 - Networking. + * + * Currently the standard Ethernet shield, ESP Wifi + * MKW Wifi, RP2040 Wifi, R4 Wifi and GIGA is supported. + * All of them with the standard library. + * + * In addition to this Pubsub is used + * https://github.com/slviajero/pubsubclient + * for MQTT. This is the standard library for MQTT on Arduino. + * + * The ARDUINOMQTT macro is set in hardware.h while + * the ARDUINOWIFI is just generated by hardware.h if + * Ethernet is not set but MQTT is set. We assume that + * mostly it is Wifi we are dealing with. + */ + + /* the network transport layer, either Ethernet or Wifi */ +#ifdef ARDUINOETH +#include +#else +#ifdef ARDUINOWIFI +#if defined(ARDUINO_ARCH_ESP8266) +#include +#elif defined(ARDUINO_ARCH_ESP32) +#include +#elif defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) +#include +#elif defined(ARDUINO_UNOR4_WIFI) +#include +#elif defined(ARDUINO_ARCH_MBED_GIGA) +#include +#endif +#endif +#endif + +/* the protocall */ +#if defined(ARDUINOMQTT) +#include +#endif + +/* + * IO channel 16 - the various filesystems. + * + * SD filesystems with the standard SD driver. + * + * For MEGA 256 a soft SPI solution is needed + * if standard shields are used, this done in is a + * patched SD library https://github.com/slviajero/SoftSD + */ + +#ifdef ARDUINOSD +#define FILESYSTEMDRIVER +#if defined(SOFTWARE_SPI_FOR_SD) +#include +#else +#include +#endif +#endif + +/* + * ESPSPIFFS tested on ESP8266 and ESP32 supports formating in BASIC. + * This is standard on all ESP boards and autoconfigured. + */ + +#ifdef ESPSPIFFS +#define FILESYSTEMDRIVER +#ifdef ARDUINO_ARCH_ESP8266 +#include +#endif +#ifdef ARDUINO_ARCH_ESP32 +#include +#include +#endif +#endif + + +/* + * ESP32FAT tested on ESP32 supports formating in BASIC. Only tested + * on the T-Deck. Partition at upload must be ffat. This is available + * on ESP32S3 but not on older boards. + */ + +#ifdef ESP32FAT +#define FILESYSTEMDRIVER +#ifdef ARDUINO_ARCH_ESP32 +#include +#include +#endif +#endif + +/* + * ESPSDMMC code + */ + +#ifdef ESPSDMMC +#include "FS.h" +#include "SD_MMC.h" +#endif + +/* + * ESPSDMMC code, this is an SD card solution with direct access + * only available on ES32 and ESP32-S3 + * + * https://github.com/espressif/arduino-esp32/tree/master/libraries/SD_MMC + * + * Needed for the ESP32 CAM + * + */ + +/* + * The USB filesystem for the GIGA board. + * USB device has to be connected at boot time. No remount is possible. + */ + +#ifdef GIGAUSBFS +#include +#include +#include +#endif + +/* + * RP2040 internal filesystem. + * This is test code from https://github.com/slviajero/littlefs + * and the main branch is actively developed. + */ + +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +#define LFS_MBED_RP2040_VERSION_MIN_TARGET "LittleFS_Mbed_RP2040 v1.1.0" +#define LFS_MBED_RP2040_VERSION_MIN 1001000 +#define _LFS_LOGLEVEL_ 1 +#define RP2040_FS_SIZE_KB 1024 +#define FORCE_REFORMAT false +#include +#endif + +/* + * STM32 SDIO driver for he SD card slot of the STM32F4 boards (and others). + */ + +#ifdef STM32SDIO +#define FILESYSTEMDRIVER +#include +#ifndef SD_DETECT_PIN +#define SD_DETECT_PIN SD_DETECT_NONE +#endif +#endif + +/* + * External flash file systems on an SD override internal filesystems + * (currently BASIC can only have one filesystem). + */ + +#if defined(ARDUINOSD) ||defined(ESPSDMMC) +#undef ESPSPIFFS +#undef RP2040LITTLEFS +#undef ESP32FAT +#undef GIGAUSBFS +#define FILESYSTEMDRIVER +#endif + +/* + * Support for external EEPROMs as filesystem overriding all + * other filessystems. This is a minimalistic filesystem meant + * for very small systems with not enough memory for real + * filesystems + * https://github.com/slviajero/EepromFS + */ +#ifdef ARDUINOEFS +#undef ESPSPIFFS +#undef ESP32FAT +#undef RP2040LITTLEFS +#undef ARDUINOSD +#undef STM32SDIO +#undef GIGAUSBFS +#define FILESYSTEMDRIVER +#endif + +/* The EFS object is used for filesystems and raw EEPROM access. */ + +#if (defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED)) || defined(ARDUINOEFS) +#include + #endif + +/* + * Global variables of the runtime environment. + */ + +/* If there is an unbuffered I2C EEPROM, use an autodetect mechanism. */ +#if defined(ARDUINOI2CEEPROM) +unsigned int i2ceepromsize = 0; +#endif + +/* + * Arduino default serial baudrate and serial flags for the + * two supported serial interfaces. Serial is always active and + * connected to channel &1 with 9600 baud. + * + * Channel 4 (ARDUINOPRT) can be either in character or block + * mode. Blockmode is set as default here. This means that all + * available characters are always loaded to a string -> inb(). + * This is typically needed if you want to receive AT commands from + * a modem or a GPS device. + * + * Serial baudrate of the second channel is changeable in the BASIC + * program. + */ + +const uint16_t serial_baudrate = 9600; +uint8_t sendcr = 0; + +#ifdef ARDUINOPRT +uint32_t serial1_baudrate = 9600; +uint8_t blockmode = 1; +#else +const int serial1_baudrate = 0; +uint8_t blockmode = 0; +#endif + +/* + * Implementation of the global IO function. These are the + * functions that are called from the BASIC interpreter. To access + * a device. + * + * ioinit(): called at setup to initialize what ever io is needed. + * outch(): prints one ascii character to the output channel od. + * inch(): gets one character (and waits for it) from the input channel id. + * checkch(): checks for one character (non blocking) on the input channel id. + * ins(): reads an entire line (uses inch except for pioserial) from the input channel id. + * availch(): checks for available characters on the input channel id. + * inb(): reads a block of characters from the input channel id. + * outs(): prints a string of characters to the output channel od. + * + */ +void ioinit() { + +/* a standalone system runs from keyboard and display, i.e channel 2 */ +#ifdef STANDALONE + idd = IKEYBOARD; + odd = ODSP; +#endif + +/* run standalone on second serial, set the right parameters, this is + needed for a few boars where the first serial port is not usable + for BASIC */ +#ifdef STANDALONESECONDSERIAL + idd = ISERIAL1; + odd = OPRT; + blockmode = 0; + sendcr = 0; +#endif + +/* + * Signal handling - by default SIGINT which is ^C is always caught and + * leads to program stop. Side effect: the interpreter cannot be stopped + * with ^C, it has to be left with CALL 0, works on Linux, Mac and MINGW + * but not on DOSBOX MSDOS as DOSBOS does not handle CTRL BREAK correctly + * DOS can be interrupted with the CONIO mechanism using BREAKCHAR. + * Here on Arduino signalon() is currentl unused. + */ + + signalon(); + +/* This is only for RASPBERRY - wiring has to be started explicitly. */ + wiringbegin(); + +/* Start all serial protocolls, ttl channels, SPI and Wire. */ + serialbegin(); + +/* start the second serial port */ +#ifdef ARDUINOPRT + prtbegin(); +#endif + +/* start SPI (before displays and filesystems)*/ +#ifdef ARDUINOSPI + spibegin(); +#endif + +/* start wire */ +#if defined(HASWIRE) || defined(HASSIMPLEWIRE) + wirebegin(); +#endif + +/* Filesystems */ + fsbegin(); + +/* networks */ +#ifdef ARDUINOMQTT + netbegin(); + mqttbegin(); +#endif + +/* the keyboards */ +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + kbdbegin(); +#endif + +/* the displays */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + dspbegin(); +#endif + +/* fablib code (and framebuffer on POSIX) do not use the graphics driver startup + they use vgabegin(), we also do not use the display driver */ +#if defined(ARDUINOVGA) + vgabegin(); +#endif + +/* sensor startup */ +#ifdef ARDUINOSENSORS + sensorbegin(); +#endif + +/* clocks and time */ +#if defined(HASCLOCK) + rtcbegin(); +#endif + +/* the eeprom dummy needs a begin method */ + ebegin(); + +/* activate the iodefaults */ + iodefaults(); + +} + + +/* The status of the io streams just on/off on that why (0) for all the stat function */ +int iostat(int channel) { + switch(channel) { +/* channel 0, the buffer */ + case ONULL: + return bufferstat(0); + break; +/* channel 1, the serial port */ + case ISERIAL: + return serialstat(0); + break; +/* channel 2, the display */ + case ODSP: + return dspstat(0); + break; +/* channel 4, the second serial device */ +#ifdef ARDUINOPRT + case ISERIAL1: + return prtstat(0); + break; +#endif +/* channel 7 wire */ +#if defined(HASWIRE) + case IWIRE: + return wirestat(0); + break; +#endif +/* channel 8 radio adaptors */ +#ifdef HASRF24 + case IRADIO: + return radiostat(0); + break; +#endif +/* channel 9 mqtt */ +#ifdef ARDUINOMQTT + case IMQTT: + return mqttstat(0); + break; +#endif +/* channel 16 file system */ +#ifdef FILESYSTEMDRIVER + case IFILE: + return fsstat(0); + break; +#endif + } + return 0; +} + +/* set the iodefaults at startup and in runtime status change to interactive */ +void iodefaults() { + od=odd; + id=idd; +} + + +/* char is sometimes signed and sometimes not */ +int cheof(int c) { if ((c == -1) || (c == 255)) return 1; else return 0; } + +/* the generic inch code reading one character from a stream, blocking! */ +char inch() { + switch(id) { + case ONULL: + return bufferread(); + case ISERIAL: + return serialread(); +#ifdef ARDUINOPRT + case ISERIAL1: + return prtread(); +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) + case IKEYBOARD: +#if defined(HASVT52) /* if the display has a message, read it, it acts as a keyboard */ + if (vt52avail()) return vt52read(); +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdread(); +#endif +#endif +#if defined(HASWIRE) + case IWIRE: + return wireread(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioread(); +#endif +#ifdef ARDUINOMQTT + case IMQTT: + return mqttread(); +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileread(); +#endif + } + return 0; +} + +/* + * checking on a character in the stream, this is normally only used + * for interrupting a program, for many streams this is just mapped + * to avail. This is currently inconsistent. + */ +char checkch(){ + switch (id) { + case ONULL: + return buffercheckch(); + case ISERIAL: + return serialcheckch(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef ARDUINOMQTT + case IMQTT: + return mqttcheckch(); +#endif +#ifdef HASWIRE + case IWIRE: + return 0; +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtcheckch(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdcheckch(); /* here no display read as this is only for break and scroll control */ +#endif + break; + } + return 0; +} + +/* character availability */ +uint16_t availch(){ + switch (id) { + case ONULL: + return bufferavailable(); + case ISERIAL: + return serialavailable(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef ARDUINOMQTT + case IMQTT: + return mqttavailable(); +#endif +#if defined(HASWIRE) + case IWIRE: + return wireavailable(); +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtavailable(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) +#if defined(HASVT52) /* if the display has a message, read it */ + if (vt52avail()) return vt52avail(); +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdavailable(); +#endif +#endif + break; + } + return 0; +} + +/* + * The block mode reader for esp and sensor modules + * on a serial interface, it tries to read as many + * characters as possible into a buffer. + * + * blockmode = 1 reads once availch() bytes + * blockmode > 1 implements a timeout mechanism and tries + * to read until blockmode milliseconds have expired + * this is needed for esps and other sensors without + * flow control and volatile timing to receive more + * then 64 bytes. + * + * The function only exists if ARDUINOPRT is defined to + * activate the second serial port. + */ + +uint16_t inb(char *b, uint16_t nb) { + long m; + uint16_t z; + int16_t i = 0; // check this + + if (blockmode == 1) { + i=availch(); + if (i>nb-1) i=nb-1; + b[0]=(unsigned char)i; + z=i; + b[i+1]=0; + b++; + while (i--) {*b++=inch();} + } else if (blockmode > 1) { + m=millis(); + while (i < nb-1) { + if (availch()) b[++i]=inch(); + if (millis() > m+blockmode) break; + } + b[0]=(unsigned char)i; + z=i; + b[i+1]=0; + } else { + b[0]=0; + z=0; + b[1]=0; + } + return z; +} + +/* + * Reading one line from the console with inch(). + * consins() is used for all channels where individual + * characters are read. Others which provide entire strings + * are handled by their respective string methods. + * (Example: picoserial, radio, wire) + */ +uint16_t consins(char *b, uint16_t nb) { + char c; + uint16_t z; + + z=1; + while(z < nb) { + c=inch(); + if (id == ISERIAL || id == IKEYBOARD) { + outch(c); /* this is local echo */ + } + if (c == '\r') c=inch(); /* skip carriage return */ + if (c == '\n' || c == -1 || c == 255) { /* terminal character is either newline or EOF */ + break; + } else if (c == 127 || c == 8) { /* backspace or delete */ + if (z>1) z--; + } else { + b[z++]=c; + } + } + b[z]=0; + z--; + b[0]=z; /* cast to signed char is not good */ + return z; +} + +/* + * ins() is the generic reader into a string, by default + * it works in line mode and ends reading after newline. + * + * The first element of the buffer is the lower byte of the length. + * + * For streams providing entire strings as an input the + * respective string method is called. + * + * All other streams are read using consins() for character by character + * input until a terminal character is reached. For almost all channel + * this is done in a *ins() method. The advantage is that one can plug in + * line oriented input here. + */ +uint16_t ins(char *b, uint16_t nb) { + switch(id) { + case ONULL: + return bufferins(b, nb); + case ISERIAL: + return serialins(b, nb); +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + case IKEYBOARD: + return kbdins(b, nb); +#endif +#ifdef ARDUINOPRT + case ISERIAL1: + return prtins(b, nb); + #endif +#if defined(HASWIRE) + case IWIRE: + return wireins(b, nb); +#endif +#ifdef HASRF24 + case IRADIO: + return radioins(b, nb); +#endif +#ifdef ARDUINOMQTT + case IMQTT: + return mqttins(b, nb); +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + return consins(b, nb); +#endif + default: + b[0]=0; b[1]=0; + return 0; + } +} + +/* + * outch() outputs one character to a stream. + * some block oriented i/o like in radio not implemented here. + * Exception is mqtt where we buffer in the code for the PRINT command. + * + * If BASIC needs a MS style tab command, then count characters on stream + * 0-4 this does not work for control characters. + */ +void outch(char c) { + +#ifdef HASMSTAB + if (od <= OPRT) { + if (c > 31) charcount[od]+=1; + if (c == 10) charcount[od]=0; + } +#endif + + switch(od) { + case ONULL: + bufferwrite(c); + break; + case OSERIAL: + serialwrite(c); + break; +#ifdef ARDUINOPRT + case OPRT: + prtwrite(c); + break; +#endif +#ifdef FILESYSTEMDRIVER + case OFILE: + filewrite(c); + break; +#endif +#ifdef ARDUINOVGA + case ODSP: + vgawrite(c); + break; +#elif defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case ODSP: + dspwrite(c); + break; +#endif +#ifdef ARDUINOMQTT + case OMQTT: + mqttwrite(c); /* buffering for the PRINT command */ + break; +#endif + default: + break; + } + byield(); /* yield after every character for ESP8266 */ +} + +/* + * outs() outputs a string of length x at index ir - basic style + * default is a character by character operation, block + * oriented write needs special functions + */ +void outs(char *b, uint16_t l){ + uint16_t i; + + switch (od) { +#ifdef HASRF24 + case ORADIO: + radioouts(b, l); + break; +#endif +#if (defined(HASWIRE)) + case OWIRE: + wireouts(b, l); + break; +#endif +#ifdef ARDUINOMQTT + case OMQTT: + mqttouts(b, l); + break; +#endif +#ifdef GRAPHDISPLAYDRIVER + case ODSP: + dspouts(b, l); + break; +#endif + default: + for(i=0; i(sbrk(0)); +} +#elif defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_LGT8F) +long freeRam() { + extern int __heap_start,*__brkval; + int v; + return (int)&v - (__brkval == 0 + ? (int)&__heap_start : (int) __brkval); +} +#elif defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) +long freeRam() { + return ESP.getFreeHeap(); +} +#else +long freeRam() { + return 0; +} +#endif + +/* + * Heuristic Wifi systems reserve 4k by default, small 8 bit AVR try to guess sizes conservatively + * RP2040 cannot measure, we set to 16 bit full address space + */ +long freememorysize() { +#if defined(ARDUINO_ARCH_RENESAS) + return freeRam() - 2000; +#endif +#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32) + return freeRam() - 4000; +#endif +#if defined(ARDUINO_ARCH_ESP32) +#if defined(ARDUINO_TTGO_T7_V14_Mini32) + return freeRam() - 4000; +#else + return freeRam() - 4000; +#endif +#endif +#if defined(ARDUINO_ARCH_XMC) + return freeRam() - 2000; +#endif +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) || defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_LGT8F) + int overhead=256; +#ifdef ARDUINO_ARCH_LGT8F + overhead+=0; +#endif +#ifdef ARDUINO_AVR_MEGA2560 + overhead+=96; +#endif +#if (defined(ARDUINOWIRE) || defined(ARDUINOSIMPLEWIRE)) && !defined(ARDUINODIRECTI2C) + overhead+=200; +#endif +#ifdef ARDUINORF24 + overhead+=128; +#endif +#if defined(ARDUINOSD) + overhead+=512; +#endif +#ifdef ARDUINOZX81KBD + overhead+=64; +#endif +#ifdef ARDUINOETH + overhead+=256; +#endif + return freeRam() - overhead; +#endif +#if defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ARCH_MBED_GIGA) + return 65536; +#endif + return 0; +} + +/* + * the sleep and restart functions - only implemented for some controllers + */ +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) +void(* callzero)() = 0; +#endif + +void restartsystem() { + eflush(); /* if there is a I2C eeprom dummy, flush the buffer */ +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + ESP.restart(); +#endif +#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) + callzero(); +#endif +#if defined(ARDUINO_ARCH_LGT8F) +#endif +} + +/* + * I used these two articles + * https://randomnerdtutorials.com/esp8266-deep-sleep-with-arduino-ide/ + * https://randomnerdtutorials.com/esp32-deep-sleep-arduino-ide-wake-up-sources/ + * for this very simple implementation - needs to be improved (pass data from sleep + * state to sleep state via EEPROM) + */ +#if defined(ARDUINO_ARCH_SAMD) +#include "RTCZero.h" +#include "ArduinoLowPower.h" +RTCZero rtc; +#endif + +/* STM32duino have the same structure */ +#if defined(ARDUINO_ARCH_STM32) +#include "STM32RTC.h" +#include "STM32LowPower.h" +STM32RTC& rtc = STM32RTC::getInstance(); +#endif + +/* the NRENESA board have a buildin RTC as well */ +#if defined(ARDUINO_ARCH_RENESAS) +#include "RTC.h" +RTCTime rtc; +#endif + +/* for ESP32 we also include the time stuctures and offer a POSIX style clock*/ +#if defined(ARDUINO_ARCH_ESP32) +#include "time.h" +#include +#endif + + +/* this is unfinished, don't use */ +void rtcsqw(); + +#define LOWPOWERINTPIN 2 +void aftersleepinterrupt(void) { } + +void activatesleep(long t) { + eflush(); /* if there is a I2C eeprom dummy, flush the buffer */ +#if defined(ARDUINO_ARCH_ESP8266) + ESP.deepSleep(t*1000); +#endif +#if defined(ARDUINO_ARCH_ESP32) + esp_sleep_enable_timer_wakeup(t*1000); + esp_deep_sleep_start(); +#endif +#if defined(ARDUINO_ARCH_SAMD) + LowPower.sleep((int) t); +#endif +#if defined(ARDUINO_AVR_ATmega644) +/* unfinished, don't use, just test code + rtcsqw(); + pinMode(LOWPOWERINTPIN, INPUT_PULLUP); + attachInterrupt(digitalPinToInterrupt(LOWPOWERINTPIN), aftersleepinterrupt, CHANGE); + sleepMode(SLEEP_POWER_SAVE); + sleep(); + detachInterrupt(digitalPinToInterrupt(LOWPOWERINTPIN)); + noSleep(); +*/ +#endif +} + +/* + * Start the SPI bus - this is a little mean as some libraries also + * try to start the SPI which may lead to on override of the PIN settings + * if the library code is not clean - currenty no conflict known. + * + * The startup on the T-Deck seems to be tricky and require precautions. + * The startup sequence used here is from the HelloWorld example of the + * TFT_eSPI library. + */ +void spibegin() { +#ifdef ARDUINOSPI +#ifdef ARDUINO_TTGO_T7_V14_Mini32 +/* this fixes the wrong board definition in the ESP32 core for this board */ + SPI.begin(14, 2, 12, 13); +#else +#ifdef TFTESPI + //! The board peripheral power control pin needs to be set to HIGH when using the peripheral + pinMode(BOARD_POWERON, OUTPUT); + digitalWrite(BOARD_POWERON, HIGH); + + //! Set CS on all SPI buses to high level during initialization + pinMode(BOARD_SDCARD_CS, OUTPUT); + pinMode(RADIO_CS_PIN, OUTPUT); + pinMode(BOARD_TFT_CS, OUTPUT); + + digitalWrite(BOARD_SDCARD_CS, HIGH); + digitalWrite(RADIO_CS_PIN, HIGH); + digitalWrite(BOARD_TFT_CS, HIGH); + + pinMode(BOARD_SPI_MISO, INPUT_PULLUP); + SPI.begin(BOARD_SPI_SCK, BOARD_SPI_MISO, BOARD_SPI_MOSI); +#else + SPI.begin(); +#endif +#endif +#endif +} + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. + * + * See runtime.h for the definitions of the display driver functions. + */ + + /* generate a 4 bit vga color from a given rgb color */ +uint8_t rgbtovga(uint8_t r, uint8_t g, uint8_t b) { + short vga; + if (r>191 || g>191 || b>191) vga=8; else vga=0; + vga=vga+r/128+g/128*2+b/128*4; + return vga; +} + +/* + * global variables for a standard LCD shield. + * Includes the standard Arduino LiquidCrystal library + */ +#ifdef LCDSHIELD +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +/* LCD shield pins to Arduino + * RS, EN, d4, d5, d6, d7; + * backlight on pin 10; + */ + + +#ifndef LCDSHIELDPINS +#ifdef ARDUINO_ESP8266_WEMOS_D1R1 +#define LCDSHIELDPINS 0,2,4,14,12,13 +#define LCD3VOLTS +#else +#define LCDSHIELDPINS 8,9,4,5,6,7 +#endif +#endif +const int dsp_rows=2; +const int dsp_columns=16; +LiquidCrystal lcd(LCDSHIELDPINS); +void dspbegin() { lcd.begin(dsp_columns, dsp_rows); dspsetscrollmode(1, 1); } +void dspprintchar(char c, uint8_t col, uint8_t row) { lcd.setCursor(col, row); if (c) lcd.write(c);} +void dspclear() { lcd.clear(); } +void dspupdate() {} +void dspsetcursor(uint8_t c) { if (c) lcd.blink(); else lcd.noBlink(); } +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(uint8_t c) {} +uint8_t dspident() {return 0; } +#define HASKEYPAD +/* elementary keypad reader left=1, right=2, up=3, down=4, select= */ +char keypadread(){ + int a=analogRead(A0); +#ifndef LCD3VOLTS + if (a >= 850) return 0; + else if (a>=600 && a<850) return 10; + else if (a>=400 && a<600) return '1'; + else if (a>=200 && a<400) return '3'; + else if (a>=60 && a<200) return '4'; + else return '2'; +#else + if (a >= 1000) return 0; + else if (a>=900 && a<1000) return 10; + else if (a>=700 && a<900) return '1'; + else if (a>=400 && a<700) return '3'; + else if (a>=100 && a<400) return '4'; + else return '2'; +#endif +} +/* repeat mode of the keypad - off means block, on means return immediately */ +uint8_t kbdrepeat=0; +#endif + +/* + * A LCD display connnected via I2C, uses the standard + * Arduino I2C display library. + */ +#ifdef ARDUINOLCDI2C +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#undef DISPLAYHASGRAPH +const int dsp_rows=4; +const int dsp_columns=20; +LiquidCrystal_I2C lcd(0x27, dsp_columns, dsp_rows); +void dspbegin() { lcd.init(); lcd.backlight(); dspsetscrollmode(1, 1); } +void dspprintchar(char c, uint8_t col, uint8_t row) { lcd.setCursor(col, row); if (c) lcd.write(c); } +void dspclear() { lcd.clear(); } +void dspupdate() {} +void dspsetcursor(uint8_t c) { if (c) lcd.blink(); else lcd.noBlink(); } +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(uint8_t c) {} +uint8_t dspident() {return 0; } +#endif + +/* + * A Nokia 5110 with ug8lib2 - can scroll quite well + * https://github.com/olikraus/u8g2/wiki/u8g2reference + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + * + * default PIN settings here are for ESP8266, using the standard + * SPI SS for 15 for CS/CE, and 0 for DC, 2 for reset + * + */ +#ifdef ARDUINONOKIA51 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#ifndef NOKIA_CS +#define NOKIA_CS 15 +#endif +#ifndef NOKIA_DC +#define NOKIA_DC 0 +#endif +#ifndef NOKIA_RST +#define NOKIA_RST 2 +#endif +U8G2_PCD8544_84X48_F_4W_HW_SPI u8g2(U8G2_R0, NOKIA_CS, NOKIA_DC, NOKIA_RST); +const int dsp_rows=6; +const int dsp_columns=10; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +char dspfontsize = 8; +void dspbegin() { u8g2.begin(); u8g2.setFont(u8g2_font_amstrad_cpc_extended_8r); } +void dspprintchar(char c, uint8_t col, uint8_t row) { char b[] = { 0, 0 }; b[0]=c; if (c) u8g2.drawStr(col*dspfontsize+2, (row+1)*dspfontsize, b); } +void dspclear() { u8g2.clearBuffer(); u8g2.sendBuffer(); dspfgcolor=1; } +void dspupdate() { u8g2.sendBuffer(); } +void dspsetcursor(uint8_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(uint8_t c) {} +uint8_t dspident() {return 0;} +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) {} +void vgacolor(uint8_t c) { dspfgcolor=c%3; u8g2.setDrawColor(dspfgcolor); } +void plot(int x, int y) { u8g2.setDrawColor(dspfgcolor); u8g2.drawPixel(x, y); dspgraphupdate(); } +void line(int x0, int y0, int x1, int y1) { u8g2.drawLine(x0, y0, x1, y1); dspgraphupdate(); } +void rect(int x0, int y0, int x1, int y1) { u8g2.drawFrame(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void frect(int x0, int y0, int x1, int y1) { u8g2.drawBox(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void circle(int x0, int y0, int r) { u8g2.drawCircle(x0, y0, r); dspgraphupdate(); } +void fcircle(int x0, int y0, int r) { u8g2.drawDisc(x0, y0, r); dspgraphupdate(); } +#endif + +/* + * 4.7 inch epaper displays are derived from the NOKIA51 code, no grayscales + * at the moment. Forcing the font into rectangles and hoping this works. + * + * Epapers bypass the display driver here and use a graphics based display + * mode instead + */ +#ifdef ARDUINOEDP47 +#define GRAPHDISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISPLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +const int dsp_width=960; +const int dsp_height=540; +const int dsp_rows=0; +const int dsp_columns=0; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +char dspfontsize = 24; +int dspgraphcursor_x = 0; +int dspgraphcursor_y = dspfontsize; +void dspbegin() { epd_init(); dspclear(); } +void dspprintstring(char* s) { + epd_poweron(); + writeln((GFXfont *)&FiraSans, s, &dspgraphcursor_x, &dspgraphcursor_y, NULL); + epd_poweroff(); +} +void dspclear() { epd_poweron(); epd_clear(); epd_poweroff(); dspfgcolor=1; } +void dspupdate() { } +void dspsetcursor(uint8_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(uint8_t c) {} +uint8_t dspident() {return 0;} +void rgbcolor(uint8_t r, uint_8 g, uint8_t b) {} +void vgacolor(uint8_t c) { dspfgcolor=c%3; } +void plot(int x, int y) { } +void line(int x0, int y0, int x1, int y1) { } +void rect(int x0, int y0, int x1, int y1) { } +void frect(int x0, int y0, int x1, int y1) { } +void circle(int x0, int y0, int r) { } +void fcircle(int x0, int y0, int r) { } +#endif + + +/* + * Small SSD1306 OLED displays with I2C interface + * This is a buffered display it has a dspupdate() function + * it also needs to call dspgraphupdate() after each graphic + * operation + */ +#ifdef ARDUINOSSD1306 +#define DISPLAYDRIVER +#define DISPLAYPAGEMODE +#undef DISLAYHASCOLOR /* display driver not color aware for this display */ +#define DISPLAYHASGRAPH +#define SSD1306WIDTH 32 +#define SSD1306HEIGHT 128 +/* constructors may look like this, last argument is the reset pin + * //U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); + * //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); + */ +#if SSD1306WIDTH == 32 +/* U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE); + * use hardware I2C instead of software. Tested (only) on ESP32C3 and ESP8266 so far. + */ +U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0); +#endif +#if SSD1306WIDTH == 64 +/* the Heltec board has an internal software I2C on pins 4=SDA and 15=SCL */ +#ifdef ARDUINO_heltec_wifi_lora_32_V2 +U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, 15, 4, 16); +#else +/* use hardware I2C instead of software. Tested (only) on ESP32C3 and ESP8266 so far. + */ +U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0); +#endif +#endif +const char dspfontsize = 8; +const int dsp_rows=SSD1306WIDTH/dspfontsize; +const int dsp_columns=SSD1306HEIGHT/dspfontsize; +typedef uint8_t dspcolor_t; +dspcolor_t dspfgcolor = 1; +dspcolor_t dspbgcolor = 0; +void dspbegin() { u8g2.begin(); u8g2.setFont(u8g2_font_amstrad_cpc_extended_8r); } +void dspprintchar(char c, uint8_t col, uint8_t row) { char b[] = { 0, 0 }; b[0]=c; if (c) u8g2.drawStr(col*dspfontsize+2, (row+1)*dspfontsize, b); } +void dspclear() { u8g2.clearBuffer(); u8g2.sendBuffer(); dspfgcolor=1; } +void dspupdate() { u8g2.sendBuffer(); } +void dspsetcursor(uint8_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(uint8_t c) {} +uint8_t dspident() {return 0;} +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) {} +void vgacolor(uint8_t c) { dspfgcolor=c%3; u8g2.setDrawColor(dspfgcolor); } +void plot(int x, int y) { u8g2.setDrawColor(dspfgcolor); u8g2.drawPixel(x, y); dspgraphupdate(); } +void line(int x0, int y0, int x1, int y1) { u8g2.drawLine(x0, y0, x1, y1); dspgraphupdate(); } +void rect(int x0, int y0, int x1, int y1) { u8g2.drawFrame(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void frect(int x0, int y0, int x1, int y1) { u8g2.drawBox(x0, y0, x1-x0, y1-y0); dspgraphupdate(); } +void circle(int x0, int y0, int r) { u8g2.drawCircle(x0, y0, r); dspgraphupdate(); } +void fcircle(int x0, int y0, int r) { u8g2.drawDisc(x0, y0, r); dspgraphupdate(); } +#endif + +/* + * A ILI9488 with Jarett Burkets version of Adafruit GFX and patches + * by Stefan Lenz + * currently only slow software scrolling implemented in BASIC + * + * https://github.com/slviajero/ILI9488 + * + * we use 9, 8, 7 as CS, CE, RST by default and A7 for the led brightness control + */ + +#ifdef ARDUINOILI9488 +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#ifndef ILI_CS +#define ILI_CS 9 +#endif +#ifndef ILI_DC +#define ILI_DC 8 +#endif +#ifndef ILI_RST +#define ILI_RST 7 +#endif +#ifndef ILI_LED +#define ILI_LED A3 +#endif +ILI9488 tft = ILI9488(ILI_CS, ILI_DC, ILI_RST); +/* ILI in landscape */ +const int dsp_rows=20; +const int dsp_columns=30; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { + tft.begin(); + tft.setRotation(3); /* ILI in landscape, SD slot up */ + tft.setTextColor(dspfgcolor); + tft.setTextSize(2); + tft.fillScreen(dspbgcolor); + pinMode(ILI_LED, OUTPUT); + analogWrite(ILI_LED, 255); + dspsetscrollmode(1, 4); +} +void dspprintchar(char c, uint8_t col, uint8_t row) { if (c) tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, 2); } +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(uint8_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(uint8_t c) {} +uint8_t dspident() {return 0; } +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(uint8_t c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +/* + * A MCUFRIEND parallel port display for the various tft shields + * This implementation is mainly for Arduino MEGA + * + * currently only slow software scrolling implemented in BASIC + * + */ + +#ifdef ARDUINOMCUFRIEND +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +#ifndef LCD_CS +#define LCD_CS A3 +#endif +#ifndef LCD_CD +#define LCD_CD A2 +#endif +#ifndef LCD_WR +#define LCD_WR A1 +#endif +#ifndef LCD_RD +#define LCD_RD A0 +#endif +#ifndef LCD_RESET +#define LCD_RESET A4 +#endif +MCUFRIEND_kbv tft; +/* ILI in landscape */ +const int dsp_rows=20; +const int dsp_columns=30; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { + uint16_t ID = tft.readID(); + if (ID == 0xD3D3) ID = 0x9481; /* write-only shield - taken from the MCDFRIEND demo */ + tft.begin(ID); + tft.setRotation(1); /* ILI in landscape, 3: SD slot on right the side */ + tft.setTextColor(dspfgcolor); + tft.setTextSize(2); + tft.fillScreen(dspbgcolor); + dspsetscrollmode(1, 4); /* scrolling is on, scroll 4 lines at once */ + } +void dspprintchar(char c, uint8_t col, uint8_t row) { if (c) tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, 2); } +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(uint8_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(uint8_t c) {} +uint8_t dspident() {return 0; } +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(uint8_t c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +#ifdef TFTESPI +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +/* + * first draft od the code taken from the hello world demo + * of Lilygo. This code only works on the 2.0.14 version of the ESP32 core. + * Physical display dimensions is 320x240. We use the 12pf font for a first + * test. With this font we can display 26 columns and 20 rows. This is set + * statically in the code at the moment. + */ +/* constants for 16 bit fonts */ +const int dsp_rows=15; +const int dsp_columns=20; +char dspfontsize = 16; +const char dspfontsizeindex = 2; +/* constants for 8 bit fonts */ +/* +const int dsp_rows=30; +const int dsp_columns=40; +char dspfontsize = 8; +const char dspfontsizeindex = 1; +*/ +/* unchanged from the ILI code */ +typedef uint16_t dspcolor_t; +const uint16_t dspdefaultfgcolor = 0xFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +/* this is new for TFT_eSPI*/ +TFT_eSPI tft; +/* change the brightness, taken from HelloWorld as well */ +void tftespisetBrightness(uint8_t value) +{ + static uint8_t level = 0; + static uint8_t steps = 16; + if (value == 0) { + digitalWrite(BOARD_BL_PIN, 0); + delay(3); + level = 0; + return; + } + if (level == 0) { + digitalWrite(BOARD_BL_PIN, 1); + level = steps; + delayMicroseconds(30); + } + int from = steps - level; + int to = steps - value; + int num = (steps + to - from) % steps; + for (int i = 0; i < num; i++) { + digitalWrite(BOARD_BL_PIN, 0); + digitalWrite(BOARD_BL_PIN, 1); + } + level = value; +} +void dspbegin() { + tft.begin(); + tft.setRotation(1); + tft.setTextDatum(6); /* upper left*/ + tft.setTextColor(dspfgcolor); + tft.fillScreen(dspbgcolor); + dspsetscrollmode(1, 4); /* scrolling is on, scroll 4 lines at once */ + pinMode(BOARD_BL_PIN, OUTPUT); + tftespisetBrightness(16); /* maximum brightness */ +} +void dspprintchar(char c, uint8_t col, uint8_t row) { + if (c) tft.drawChar(col*dspfontsize, row*dspfontsize, c, dspfgcolor, dspbgcolor, dspfontsizeindex); +} +void dspclear() { + tft.fillScreen(dspbgcolor); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; +} +void dspupdate() {} +void dspsetcursor(uint8_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(uint8_t c) {} +uint8_t dspident() {return 0; } +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) { dspfgvgacolor=rgbtovga(r, g, b); dspfgcolor=tft.color565(r, g, b);} +void vgacolor(uint8_t c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { dspfgcolor=tft.color565(64, 64, 64); return; } + if (c>8) base=255; + dspfgcolor=tft.color565(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) { tft.drawPixel(x, y, dspfgcolor); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1, dspfgcolor); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1, dspfgcolor);} +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1, dspfgcolor); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r, dspfgcolor); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r, dspfgcolor); } +#endif + +/* + * A no operations graphics dummy + * Tests the BASIC side of the graphics code without triggering + * any output + */ +#ifdef ARDUINOGRAPHDUMMY +#define DISPLAYDRIVER +#undef DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +const int dsp_rows=20; +const int dsp_columns=30; +const uint16_t dspdefaultfgcolor = 1; +char dspfontsize = 16; +typedef uint16_t dspcolor_t; +dspcolor_t dspfgcolor = 0xFFFF; +dspcolor_t dspbgcolor = 0x0000; +void dspbegin() { dspsetscrollmode(1, 4); } +void dspprintchar(char c, uint8_t col, uint8_t row) {} +void dspclear() {} +void dspupdate() {} +void dspsetcursor(uint8_t c) {} +void dspsetfgcolor(uint8_t c) {} +void dspsetbgcolor(uint8_t c) {} +void dspsetreverse(uint8_t c) {} +uint8_t dspident() {return 0; } +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) { dspfgcolor=0; } +void vgacolor(uint8_t c) { + short base=128; + if (c==8) { rgbcolor(64, 64, 64); return; } + if (c>8) base=255; + rgbcolor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void plot(int x, int y) {} +void line(int x0, int y0, int x1, int y1) {} +void rect(int x0, int y0, int x1, int y1) {} +void frect(int x0, int y0, int x1, int y1) {} +void circle(int x0, int y0, int r) {} +void fcircle(int x0, int y0, int r) {} +#endif + +/* + * SD1963 TFT display code with UTFT. + * Tested witth SD1963 800*480 board. + * it is mainly intended for a MEGA or DUE as a all in one system + * this is for a MEGA shield and the CTE DUE shield, for the due + * you need to read the comment in Arduino/libraries/UTFT/hardware/arm + * HW_ARM_defines.h -> uncomment the DUE shield + * See also + * https://github.com/slviajero/tinybasic/wiki/Projects:-4.-A-standalone-computer-with-a-TFT-screen-based-on-a-DUE + */ +#ifdef ARDUINOTFT +#define DISPLAYDRIVER +#define DISPLAYHASCOLOR +#define DISPLAYHASGRAPH +extern uint8_t SmallFont[]; +extern uint8_t BigFont[]; +#ifdef ARDUINO_SAM_DUE +UTFT tft(CTE70,25,26,27,28); +#else +UTFT tft(CTE70,38,39,40,41); +#endif +const int dsp_rows=30; +const int dsp_columns=50; +char dspfontsize = 16; +const uint32_t dspdefaultfgcolor = 0x00FFFFFF; +const uint8_t dspdefaultfgvgacolor = 0x0F; +typedef uint32_t dspcolor_t; +dspcolor_t dspfgcolor = dspdefaultfgcolor; +dspcolor_t dspbgcolor = 0; +dspcolor_t dsptmpcolor = 0; +uint8_t dspfgvgacolor = dspdefaultfgvgacolor; +uint8_t dsptmpvgacolor = 0; +void dspbegin() { tft.InitLCD(); tft.setFont(BigFont); tft.clrScr(); dspsetscrollmode(1, 4); } +void dspprintchar(char c, uint8_t col, uint8_t row) { if (c) tft.printChar(c, col*dspfontsize, row*dspfontsize); } +void dspclear() { + tft.clrScr(); + dspfgcolor = dspdefaultfgcolor; + dspfgvgacolor = dspdefaultfgvgacolor; + vgacolor(dspfgvgacolor); +} +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) { + tft.setColor(r,g,b); + dspfgcolor=(r << 16) + (g << 8) + b; + dspfgvgacolor=rgbtovga(r, g, b); +} +void vgacolor(uint8_t c) { + short base=128; + dspfgvgacolor=c; + if (c==8) { tft.setColor(64, 64, 64); return; } + if (c>8) base=255; + tft.setColor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} +void dspupdate() {} +void dspsetcursor(uint8_t c) {} +void dspsavepen() { dsptmpcolor=dspfgcolor; dsptmpvgacolor=dspfgvgacolor; } +void dsprestorepen() { dspfgcolor=dsptmpcolor; dspfgvgacolor=dsptmpvgacolor; } +void dspsetfgcolor(uint8_t c) { vgacolor(c); } +void dspsetbgcolor(uint8_t c) { } +void dspsetreverse(uint8_t c) {} +uint8_t dspident() {return 0;} +void plot(int x, int y) { tft.drawPixel(x, y); } +void line(int x0, int y0, int x1, int y1) { tft.drawLine(x0, y0, x1, y1); } +void rect(int x0, int y0, int x1, int y1) { tft.drawRect(x0, y0, x1, y1); } +void frect(int x0, int y0, int x1, int y1) { tft.fillRect(x0, y0, x1, y1); } +void circle(int x0, int y0, int r) { tft.drawCircle(x0, y0, r); } +void fcircle(int x0, int y0, int r) { tft.fillCircle(x0, y0, r); } +#endif + +/* + * This is the VGA code for fablib. + * + * Not all modes and possibilities explored. It leaves enough memory for the + * interpreter. Networking is not possible an a TTGO T7 V1.4. + * + * This code overrides the display driver logic as fabgl brings an own + * terminal emulation. + * + * Default settings is a 640*480 VGA screen with 16 colors + * and default fonts for the Terminal + */ +#if defined(ARDUINOVGA) && defined(ARDUINO_TTGO_T7_V14_Mini32) +#ifndef TTGOVGACONTROLLER +#define TTGOVGACONTROLLER VGA16Controller +#endif +#ifndef TTGOVGACOLUMNS +#define TTGOVGACOLUMNS -1 +#endif +#ifndef TTGOVGAROWS +#define TTGOVGAROWS -1 +#endif +#ifndef TTGOVGARESOLUTION +#define TTGOVGARESOLUTION VGA_640x480_60Hz +#endif +fabgl::TTGOVGACONTROLLER VGAController; /* 16 color object with less memory */ +static fabgl::Terminal Terminal; +static Canvas cv(&VGAController); +TerminalController tc(&Terminal); +Color vga_graph_pen = Color::BrightWhite; +Color vga_graph_brush = Color::Black; +Color vga_txt_pen = Color::BrightGreen; +Color vga_txt_background = Color::Black; +fabgl::SoundGenerator soundGenerator; + +/* this starts the vga controller and the terminal right now */ +void vgabegin() { + VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5, GPIO_NUM_4, GPIO_NUM_23, GPIO_NUM_15); + VGAController.setResolution(TTGOVGARESOLUTION); + Terminal.begin(&VGAController, TTGOVGACOLUMNS, TTGOVGAROWS); + Terminal.setBackgroundColor(vga_txt_background); + Terminal.setForegroundColor(vga_txt_pen); + #ifdef TTGOVGAFONT + Terminal.loadFont(&fabgl::TTGOVGAFONT); + #endif + Terminal.connectLocally(); + Terminal.clear(); + Terminal.enableCursor(1); + Terminal.setTerminalType(TermType::VT52); +} + +/* for Arduino just a dummy, needed in the POSIX branch of the code */ +void vgaend() {} + +/* this is a dummy function, we do not have a status line */ +int vgastat(uint8_t c) {return 0; } + +/* scale the screen size to make a circle round, unneeded if the right resulution is set */ +void vgascale(int* x, int* y) { + /* *y=*y*10/16; */ +} + +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) { + short vga; + if (r>191 || g>191 || b>191) vga=8; else vga=0; + vga=vga+r/128+g/128*2+b/128*4; + vga_graph_pen=fabgl::Color(vga); +} + +void vgacolor(uint8_t c) { vga_graph_pen = fabgl::Color(c%16); } +void plot(int x, int y) { + vgascale(&x, &y); + cv.setPenColor(vga_graph_pen); + cv.setPixel(x,y); + cv.setPenColor(vga_txt_pen); +} + +void line(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawLine(x0, y0, x1, y1); + cv.setPenColor(vga_txt_pen); +} + +void rect(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawRectangle(x0, y0, x1, y1); + cv.setPenColor(vga_txt_pen); +} + +void frect(int x0, int y0, int x1, int y1) { + vgascale(&x0, &y0); + vgascale(&x1, &y1); + cv.setBrushColor(vga_graph_pen); + cv.fillRectangle(x0, y0, x1, y1); + cv.setBrushColor(vga_txt_background); +} + +void circle(int x0, int y0, int r) { + int rx = r; + int ry = r; + vgascale(&x0, &y0); + vgascale(&rx, &ry); + cv.setPenColor(vga_graph_pen); + cv.setPenWidth(1); + cv.drawEllipse(x0, y0, rx, ry); + cv.setPenColor(vga_txt_pen); +} + +void fcircle(int x0, int y0, int r) { + int rx = r; + int ry = r; + vgascale(&x0, &y0); + vgascale(&rx, &ry); + cv.setBrushColor(vga_graph_pen); + cv.fillEllipse(x0, y0, rx, ry); + cv.setBrushColor(vga_txt_background); +} + +void vgawrite(char c){ + switch(c) { + case 12: /* form feed is clear screen */ + Terminal.write(27); Terminal.write('H'); + Terminal.write(27); Terminal.write('J'); + return; + case 10: /* this is LF Unix style doing also a CR */ + Terminal.write(10); Terminal.write(13); + return; + } + Terminal.write(c); +} +#else +void vgabegin(){} +int vgastat(uint8_t c) {return 0; } +void vgawrite(char c){} +void vgaend() {} +#endif + +/* + * Keyboard code for either the Fablib Terminal class or + * PS2Keyboard - please note that you need the ESP patched + * version here as mentioned above + * + * sets HASKEYBOARD to inform basic about this capability + * + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +#if defined(ARDUINO_TTGO_T7_V14_Mini32) && defined(ARDUINOVGA) +fabgl::PS2Controller PS2Controller; +char fabgllastchar = 0; +#else +#if defined(ARDUINO) && defined(ARDUINOPS2) +PS2Keyboard keyboard; +#else +#if defined(ARDUINO) && defined(ARDUINOUSBKBD) +USBHost usb; +KeyboardController keyboard(usb); +char usbkey=0; +#else +#if defined(ARDUINOZX81KBD) +ZX81Keyboard keyboard; +#else +#if defined(ARDUINOI2CKBD) +/* with an I2C keyboard we remeber the last key, this is similar to the USB keyboard */ +char i2ckey=0; +#else +#if defined(GIGAUSBKBD) +Keyboard keyb; +#endif +#endif +#endif +#endif +#endif +#endif + +/* + * Experimental, unfinished, rudimentary + */ +#if defined(ARDUINOUSBKBD) +/* not really needed, only here for reference */ +char usbkeymapUS[] = +{' ', '"', '!', '#', '$', '%', '&', '\'', '(', ')', '*', '+', + ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', + 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', + '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', 0, 0}; +/* map the ASCII codes of the essential keys for BASIC of a + * German keyboard, most notable is < and > which is ö/a + */ +char usbkeymapGerman[] = +{' ', '!', '!', '#', '$', '%', '/', '>', ')', '=', '(', '+', + ',', '-', '.', '-', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', '<', ';', '=', ':', '_', '"', 'A', 'B', 'C', + 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Z', 'Y', '[', + '#', '+', '&', '?', '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', + 't', 'u', 'v', 'w', 'x', 'z', 'y', '{', '\'', '*', 0, 0}; + +/* + * he weak functions from the keyboard controller class implemented + */ +void keyPressed() {} +void keyReleased() { + switch (keyboard.getOemKey()) { + case 40: + usbkey=10; + break; + case 42: + case 76: + usbkey=127; + break; + case 41: + usbkey=27; + break; + default: + usbkey=keyboard.getKey(); +#if ARDUINOKBDLANG_GERMAN + if (usbkey>31 && usbkey<128) usbkey=usbkeymapGerman[usbkey-32]; +#else + if (usbkey>31 && usbkey<128) usbkey=usbkeymapUS[usbkey-32]; +#endif + } +} +#endif + +/* + * keyboard controller code + */ + +#ifdef ZX81KEYBOARD +const byte zx81pins[] = {ZX81PINS}; +#endif + +/* + * A helper function for the I2C keyboard code. We get one character + * from the board. A -1 is an I2C error condition for a non reply of + * the keyboard. + */ +#ifdef ARDUINOI2CKBD +char i2ckbdgetkey() { + char c=0; + Wire.requestFrom(I2CKBDADDR, 1); + if (Wire.available()) { + c=Wire.read(); + if (c == -1) { ioer=1; c=0; } + } + return c; +} +#endif + +/* start the keyboard */ +void kbdbegin() { +#ifdef PS2KEYBOARD +#ifdef ARDUINOKBDLANG_GERMAN + keyboard.begin(PS2DATAPIN, PS2IRQPIN, PS2Keymap_German); +#else + keyboard.begin(PS2DATAPIN, PS2IRQPIN, PS2Keymap_US); +#endif +#else +#ifdef PS2FABLIB + PS2Controller.begin(PS2Preset::KeyboardPort0); +#ifdef ARDUINOKBDLANG_GERMAN + PS2Controller.keyboard()->setLayout(&fabgl::GermanLayout); +#else + PS2Controller.keyboard()->setLayout(&fabgl::USLayout); +#endif +#else +#ifdef USBKEYBOARD +/* nothing to be done here */ +#else +#ifdef ZX81KEYBOARD + keyboard.begin(zx81pins); +#else +#ifdef ARDUINOI2CKBD +/* this is from the T-Deck examples, time needed for the keyboard to start */ + delay(500); +#else +#ifdef GIGAUSBKBD + pinMode(PA_15, OUTPUT); /* no digitalWrite in original example file */ + keyb.begin(); +#endif +#endif +#endif +#endif +#endif +#endif +} + +uint8_t kbdstat(uint8_t c) {return 0; } + +uint16_t kbdins(char* b, uint16_t nb) { return consins(b, nb); } + +uint8_t kbdavailable(){ +#ifdef PS2KEYBOARD + return keyboard.available(); +#else +#ifdef PS2FABLIB + if (fabgllastchar) return Terminal.available()+1; else return Terminal.available(); +#else +#ifdef USBKEYBOARD +/* if we already have a key, tell the caller we have one */ + if (usbkey) return 1; +/* if not, look it up */ + if (usbkey) return 1; else return 0; +#else +#ifdef ZX81KEYBOARD + return keyboard.available(); +#else +#ifdef ARDUINOI2CKBD +/* do we have a key stored, then return it */ + if (i2ckey) { + return 1; + } else { + i2ckey=i2ckbdgetkey(); + if (i2ckey != 0) return 1; + } +#else +#if defined(GIGAUSBKBD) + return keyb.available(); +#endif +#endif +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD +/* a poor man's debouncer, unstable state returns 0 */ + char c=keypadread(); + if (c != 0) { + bdelay(2); + if (c == keypadread()) return 1; + } +#endif + return 0; +} + +char kbdread() { + char c = 0; +/* wait for the keystrike in a tight loop, yielding a lot */ + while(!kbdavailable()) byield(); +#ifdef PS2KEYBOARD + c=keyboard.read(); +#endif +#ifdef PS2FABLIB + if (fabgllastchar) { c=fabgllastchar; fabgllastchar=0; } + else c=Terminal.read(); +#else +#ifdef USBKEYBOARD +/* if we have read a key before, return it else look it up */ + c=usbkey; + usbkey=0; +#else +#ifdef ZX81KEYBOARD + c=keyboard.read(); +#else +#ifdef ARDUINOI2CKBD +/* a key is stored from a previous kbdavailable() */ + if (i2ckey) { + c=i2ckey; + i2ckey=0; + } else { +/* if not look for a key, no need to store it */ + c=i2ckbdgetkey(); + } +#else +#if defined(GIGAUSBKBD) +/* sometimes 0s are returned even with avail > 0 */ + auto _key = keyb.read(); + c=keyb.getAscii(_key); +#endif +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD + if (c == 0) { /* we have no character from a real keyboard, ask the keypad */ + c=keypadread(); +/* if the keypad is in non repeat mode, block */ + if (!kbdrepeat) while(kbdavailable()) byield(); + } +#endif + if (c == 13) c=10; + return c; +} + +char kbdcheckch() { +#ifdef PS2KEYBOARD +/* + * only works with the patched library https://github.com/slviajero/PS2Keyboard + */ +#ifdef PS2KEYBOARD_HASPEEK + return keyboard.peek(); +#else +/* + * for the original library https://github.com/PaulStoffregen/PS2Keyboard + * GET does not work properly with it as there is no peek functionality which is needed + * for non blocking IO and the ability to stop programs + */ + if (kbdavailable()) return kbdread(); else return 0; +#endif +#else +#ifdef PS2FABLIB + if (fabgllastchar) return fabgllastchar; + if (kbdavailable()) { fabgllastchar=Terminal.read(); return fabgllastchar; } +#else +#ifdef USBKEYBOARD + return usbkey; +#else +#ifdef ZX81KEYBOARD + return keyboard.lastKey; /* dont peek here as checkch called in a fast loop in statement(), peek done in byield*/ +#else +#ifdef ARDUINOI2CKBD + if (!i2ckey) { + i2ckey=i2ckbdgetkey(); + } + return i2ckey; +#else +#if defined(GIGAUSBKBD) + auto _key = keyb.peek(); + return keyb.getAscii(_key); +#endif +#endif +#endif +#endif +#endif +#endif +#ifdef HASKEYPAD + return keypadread(); +#endif + return 0; +} + +/* + * Display driver code - documentation is in the header file + */ + +#ifdef DISPLAYDRIVER + +/* the cursor position */ +uint8_t dspmycol = 0; +uint8_t dspmyrow = 0; + +/* the escape state of the vt52 terminal */ +uint8_t dspesc = 0; + +/* which update mode do we have */ +uint8_t dspupdatemode = 0; + +/* how do we handle wrap 0 is wrap, 1 is no wrap */ +uint8_t dspwrap = 0; + +/* the print mode */ +uint8_t dspprintmode = 0; + +/* the scroll control variables */ +uint8_t dspscrollmode = 0; +uint8_t dsp_scroll_rows = 1; + +uint8_t dspstat(uint8_t c) { return 1; } + +void dspsetcursorx(uint8_t c) { + if (c>=0 && c=0 && r=0 && i<=dsp_columns*dsp_rows-1) return dspbuffer[i/dsp_columns][i%dsp_columns]; else return 0; +} + +/* print line and screen helpers */ +dspbuffer_t dspgetrc(uint8_t r, uint8_t c) { return dspbuffer[r][c]; } +dspbuffer_t dspgetc(uint8_t c) { return dspbuffer[dspmyrow][c]; } + +/* this functions prints a character and updates the display buffer */ +void dspsetxy(dspbuffer_t ch, uint8_t c, uint8_t r) { + if (r>=0 && c>=0 && r> 8) & 15); + dspprintchar(b & charmask, c, r); + dsprestorepen(); +#else + dspprintchar(b, c, r); +#endif + } else { + dspprintchar(' ', c, r); + } + } + dspbuffer[r][c]=b; + } + } + +/* delete the characters in the remaining lines */ + for (r=dsp_rows-scroll_rows; rline; r--) { + for (c=0; c> 8) & 15); + dspprintchar(b & charmask, c, r); + dsprestorepen(); +#else + dspprintchar(b, c, r); +#endif + } else { + dspprintchar(' ', c, r); + } + } + dspbuffer[r][c]=b; + } + } + +/* delete the characters in the remaining line */ + for (c=0; c= dsp_rows) dspscroll(dsp_scroll_rows); + dspmycol=0; + if (dspupdatemode == 1) dspupdate(); + return; + case 11: // vertical tab - converted to line feed without carriage return + if (dspmyrow < dsp_rows-1) dspmyrow++; + return; + case 12: // form feed is clear screen plus home + dspbufferclear(); + dspclear(); + return; + case 13: // classical carriage return, no form feed + dspmycol=0; + return; + case 27: // escape - initiate vtxxx mode + dspesc=1; + return; + case 28: // cursor back - this is what terminal applications send for cursor back + if (dspmycol > 0) dspmycol--; + return; + case 29: // cursor forward - this is what terminal applications send for cursor back + if (dspmycol < dsp_columns-1) dspmycol++; + return; + case 8: // back space is delete the moment + case 127: // delete + if (dspmycol > 0) { + dspmycol--; + dspsetxy(0, dspmycol, dspmyrow); + } + return; + case 2: // we abuse start of text as a home sequence, may also be needed for Epaper later + dspmycol=dspmyrow=0; + return; + case 3: // ETX = Update display for buffered display like Epaper + dspupdate(); + return; + default: // eliminate all non printables - problematic for LCD special character + if (c<32) return; + break; + } + + dspsetxy(c, dspmycol, dspmyrow); + dspmycol++; + if (dspmycol == dsp_columns) { + if (!dspwrap) { /* we simply ignore the cursor */ + dspmycol=0; + dspmyrow=(dspmyrow + 1); + } + if (dspmyrow >= dsp_rows) dspscroll(dsp_scroll_rows); + } + if (dspupdatemode == 0) dspupdate(); +} + +/* + * This is the minimalistic VT52 state engine. It is an interface to + * process single byte control sequences of the form char + */ + +#ifdef HASVT52 +/* the state variable */ +char vt52s = 0; + +/* the graphics mode mode - unused so far */ +uint8_t vt52graph = 0; + +/* the secondary cursor */ +uint8_t vt52mycol = 0; +uint8_t vt52myrow = 0; + +/* temp variables for column and row , do them here and not in the case: guess why */ +uint8_t vt52tmpr; +uint8_t vt52tmpc; + +/* an output buffer for the vt52 terminal */ +const uint8_t vt52buffersize = 4; +char vt52outbuffer[vt52buffersize] = { 0, 0, 0, 0 }; +uint8_t vt52bi = 0; +uint8_t vt52bj = 0; + +/* the reader from the buffer */ +char vt52read() { + if (vt52bi<=vt52bj) { vt52bi = 0; vt52bj = 0; } /* empty, reset */ + if (vt52bi>vt52bj) return vt52outbuffer[vt52bj++]; + return 0; +} + +/* the avail from the buffer */ +uint8_t vt52avail() { if (vt52bi > vt52bj) return vt52bi-vt52bj; else return 0; } + +/* putting something into the buffer */ +void vt52push(char c) { + if (vt52bi < vt52buffersize) vt52outbuffer[vt52bi++]=c; +} + +/* clear the buffer */ +void vt52clear() { + vt52bi=0; +} + +/* something little */ +uint8_t vt52number(char c) { + uint8_t b=c; + if (b>31) return b-32; else return 0; +} + +/* + * The VT52 data registers for the graphics and wiring extension. + * x,y are 14 bit and z is 7bit. Data is transferred in VT52 style + * -> numerical value plus 32 to map the data to printable characters + * Access is done through the the ESC x, ESC y and ESC z sequences: + * ESC x #1 #2 + * sets the xregister to (#1-32)+(#2-32)*128 + */ + +#if defined(DISPLAYHASGRAPH) || defined(VT52WIRING) +#define VT52HASREGISTERS +/* the three register variables */ +uint16_t vt52regx = 0; +uint16_t vt52regy = 0; +uint8_t vt52regz = 0; + +/* one argument cache for two byte arguments */ +uint8_t vt52arg = 0; +#endif + +/* + * graphics code in VT52, if you want to control graphics from the character stream + * The ESC g sequence sends a graphics command as the second byte after the g + * + * Valid values for g are + * s: set the graphics cursor + * p: plot a point + * l: draw a line + * L: draw a line and move the cursor to the endpoint + * r: draw a rectangle + * R: draw a filled rectangle + * c: draw a circle + * C: draw a filled circle + * + */ +#ifdef DISPLAYHASGRAPH +/* the grahics cursor of VT52 */ +uint16_t vt52graphx = 0; +uint16_t vt52graphy = 0; + +/* execute one graphics command */ +void vt52graphcommand(uint8_t c) { + switch(c) { + case 's': /* set the cursor */ + vt52graphx=vt52regx; + vt52graphy=vt52regy; + break; + case 'p': /* plot a point at the cursor */ + plot(vt52graphx, vt52graphy); + break; + case 'l': /* plot a line */ + line(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'L': /* plot a line and update the cursor, needed for drawing shapes */ + line(vt52graphx, vt52graphy, vt52regx, vt52regy); + vt52graphx=vt52regx; + vt52graphy=vt52regy; + break; + case 'r': /* plot a rectangle */ + rect(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'c': /* plot a circle */ + circle(vt52graphx, vt52graphy, vt52regx); + break; + case 'R': /* plot a filled rectangle */ + frect(vt52graphx, vt52graphy, vt52regx, vt52regy); + break; + case 'C': /* plot a filled circle */ + fcircle(vt52graphx, vt52graphy, vt52regx); + break; + } +} +#endif + +/* + * This is an odd part of the vt52 code with this, the terminal + * can control the digital and analog pins. + */ + +#ifdef VT52WIRING +#define VT52HASREGISTERS + void vt52wiringcommand(uint8_t c) { + switch(c) { + case 'p': /* pinMode z */ + pinMode(vt52regz, vt52regx); + break; + case 'l': /* digital write low pin z*/ + digitalWrite(vt52regz, LOW); + break; + case 'h': /* digital write high pin z*/ + digitalWrite(vt52regz, HIGH); + break; + case 'r': /* digital read from pin z */ + vt52push(digitalRead(vt52regz)+32); + break; + case 'a': /* analog write pin z to value x */ + analogWrite(vt52regz, vt52regx); + break; + case 'A': /* analog read from pin z */ + break; + case 't': /* tone at pin z, frequency x, duration y */ + tone(vt52regz, vt52regx, vt52regy); + break; + } + } +#endif + + +/* the actual vt52 state engine */ +void dspvt52(char* c){ + +/* reading and processing multi byte commands */ + switch (vt52s) { + case 'Y': + if (dspesc == 2) { + dspsetcursory(vt52number(*c)); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + dspsetcursorx(vt52number(*c)); + *c=0; + } + vt52s=0; + break; + case 'b': + dspsetfgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + case 'c': + dspsetbgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; +#ifdef VT52HASREGISTERS + case 'x': + if (dspesc == 2) { + vt52arg=vt52number(*c); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + vt52regx=vt52arg+vt52number(*c)*128; + *c=0; + } + vt52s=0; + break; + case 'y': + if (dspesc == 2) { + vt52arg=vt52number(*c); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + vt52regy=vt52arg+vt52number(*c)*127; + *c=0; + } + vt52s=0; + break; + case 'z': + vt52regz=vt52number(*c); + *c=0; + vt52s=0; + break; +#endif +#ifdef DISPLAYHASGRAPH + case 'g': + vt52graphcommand(*c); + *c=0; + vt52s=0; + break; +#endif +#ifdef VT52WIRING + case 'a': + vt52wiringcommand(*c); + *c=0; + vt52s=0; + break; +#endif + } + +/* commands of the terminal in text mode */ + + switch (*c) { + case 'v': /* GEMDOS / TOS extension enable wrap */ + dspwrap=0; + break; + case 'w': /* GEMDOS / TOS extension disable wrap */ + dspwrap=1; + break; + case '^': /* Printer extensions - print on */ + dspprintmode=1; + break; + case '_': /* Printer extensions - print off */ + dspprintmode=0; + break; + case 'W': /* Printer extensions - print without display on */ + dspprintmode=2; + break; + case 'X': /* Printer extensions - print without display off */ + dspprintmode=0; + break; + case 'V': /* Printer extensions - print cursor line */ +#if defined(ARDUINOPRT) && defined(DISPLAYCANSCROLL) + for (uint8_t i=0; i': // alternate keypad off + break; + case 'b': // GEMDOS / TOS extension text color + case 'c': // GEMDOS / TOS extension background color + vt52s=*c; + dspesc=1; + *c=0; + return; + case 'e': // GEMDOS / TOS extension enable cursor + dspsetcursor(1); + break; + case 'f': // GEMDOS / TOS extension disable cursor + dspsetcursor(0); + break; + case 'p': // GEMDOS / TOS extension reverse video + dspsetreverse(1); + break; + case 'q': // GEMDOS / TOS extension normal video + dspsetreverse(0); + break; + case 'A': // cursor up + if (dspmyrow>0) dspmyrow--; + break; + case 'B': // cursor down + if (dspmyrow < dsp_rows-1) dspmyrow++; + break; + case 'C': // cursor right + if (dspmycol < dsp_columns-1) dspmycol++; + break; + case 'D': // cursor left + if (dspmycol>0) dspmycol--; + break; + case 'E': // GEMDOS / TOS extension clear screen + dspbufferclear(); + dspclear(); + break; + case 'H': // cursor home + dspmyrow=dspmycol=0; + break; + case 'Y': // Set cursor position + vt52s='Y'; + dspesc=2; + *c=0; + return; + case 'J': // clear to end of screen + for (int i=dspmycol+dsp_columns*dspmyrow; i0) dspmyrow--; else dspreversescroll(0); + break; + case 'L': // Insert line + dspreversescroll(dspmyrow); + break; + case 'M': + vt52tmpr = dspmyrow; + vt52tmpc = dspmycol; + dspscroll(1, dspmyrow); + dspmyrow=vt52tmpr; + dspmycol=vt52tmpc; + break; +#ifdef VT52HASREGISTERS + case 'x': // set the x register + case 'y': // set the y register + vt52s=*c; + dspesc=2; + *c=0; + return; + case 'z': // set the z register + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif +#ifdef DISPLAYHASGRAPH + case 'g': // execute a graphics command + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif +#ifdef VT52WIRING + case 'a': // execute a wiring command + vt52s=*c; + dspesc=1; + *c=0; + return; + break; +#endif + } + dspesc=0; + *c=0; +} +#endif + +#else +#ifdef GRAPHDISPLAYDRIVER +/* a super simple display driver for graphics only systems, only handles drawing + and graphics cursor stuff, experimental for epapers */ +#undef HASVT52 +#define GBUFFERSIZE 80 +static char gbuffer[GBUFFERSIZE]; +void dspouts(char* s, uint16_t l) { + int i; + for (i=0; i> 4) & 0b00000111) * 10; + case 2: + return (v & 0b00001111)+((v >> 4) & 0b00000011) * 10 ; /* only 24 hour support */ + case 3: + return (v & 0b00001111); + case 4: + return (v & 0b00001111) + ((v >> 4) & 0b00000011) * 10; + case 5: + return (v & 0b00001111) + ((v >> 4) & 0b00000001) * 10; + case 6: + return (v & 0b00001111) + (v >> 4) * 10; + default: + return v; + } +} + +/* set the registers */ +void rtcset(uint8_t i, uint16_t v) { + uint8_t b; + + /* to bcd if we deal with a clock byte (0-6) */ + if (i<7) b=(v%10 + ((v/10) << 4)); else b=v; + + switch (i) { + case 0: + case 1: + b = b & 0b01111111; + break; + case 2: + case 4: + b = b & 0b00111111; /* only 24 hour support */ + break; + case 3: + b = b & 0b00000111; + break; + case 5: + b = b & 0b00011111; + } + +/* send the address and then the byte */ + wirestart(RTCI2CADDR, 0); + wirewritebyte(i); + wirewritebyte(b); + wirestop(); + +} +#elif defined(HASBUILTINRTC) +/* + * Built-in clocks of STM32 and MKR are based on the RTCZero interface + * an rtc object is created after loading the libraries + * for NRENESAs the interface is slightly different + */ +#ifndef ARDUINO_ARCH_RENESAS +/* begin method */ +void rtcbegin() { + rtc.begin(); /* 24 hours mode */ +} + +/* get the time */ +uint16_t rtcget(uint8_t i) { + switch (i) { + case 0: + return rtc.getSeconds(); + case 1: + return rtc.getMinutes(); + case 2: + return rtc.getHours(); + case 3: + // return rtc.getWeekDay(); + return 0; + case 4: + return rtc.getDay(); + case 5: + return rtc.getMonth(); + case 6: + return rtc.getYear(); + default: + return 0; + } +} + +/* set the time */ +void rtcset(uint8_t i, uint16_t v) { + switch (i) { + case 0: + rtc.setSeconds(v); + break; + case 1: + rtc.setMinutes(v); + break; + case 2: + rtc.setHours(v); + break; + case 3: + // rtc.setWeekDay(v); + break; + case 4: + rtc.setDay(v); + break; + case 5: + rtc.setMonth(v); + break; + case 6: + rtc.setYear(v); + break; + default: + return; + } +} +#else +/* NRENESA code, interface different to my great ennui! */ +/* begin method */ +void rtcbegin() { + RTC.begin(); /* 24 hours mode */ +} + +/* get the time */ +uint16_t rtcget(uint8_t i) { + RTC.getTime(rtc); + switch (i) { + case 0: + return rtc.getSeconds(); + case 1: + return rtc.getMinutes(); + case 2: + return rtc.getHour(); + case 3: + return static_cast(rtc.getDayOfWeek()); + case 4: + return rtc.getDayOfMonth(); + case 5: + return Month2int(rtc.getMonth()); + case 6: + return rtc.getYear(); + default: + return 0; + } +} + +/* set the time */ +void rtcset(uint8_t i, uint16_t v) { + RTC.getTime(rtc); + switch (i) { + case 0: + rtc.setSecond(v); + break; + case 1: + rtc.setMinute(v); + break; + case 2: + rtc.setHour(v); + break; + case 3: + rtc.setDayOfWeek(static_cast(v)); + break; + case 4: + rtc.setDayOfMonth(v); + break; + case 5: + rtc.setMonthOfYear(static_cast(v-1)); + break; + case 6: + rtc.setYear(v); + break; + default: + return; + } + RTC.setTime(rtc); +} +#endif +#elif defined(ARDUINORTCEMULATION) +/* + * A millis() based real time clock emulation. It creates a 32bit Unix time + * variable and adds millis()/1000 + */ + +/* the begin method - standard interface to BASIC*/ +void rtcbegin() {} + +/* the current unix time - initialized to the begin of the epoch */ +long rtcutime = 0; + +/* the offset of millis()/1000 when we last set the clock */ +long rtcutimeoffset = 0; + +/* the current unix date - initialized to the begin of the epoch */ +struct { uint8_t second; uint8_t minute; uint8_t hour; uint8_t weekday; uint8_t day; uint8_t month; uint16_t year; } + rtctime = { 0, 0, 0, 4, 1, 1, 1970 }; + +/* the number of days per month */ +const int rtcmonthdays[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; + + +/* convert the time to a unix time number from https://de.wikipedia.org/wiki/Unixzeit */ +void rtctimetoutime() { + int leapyear = ((rtctime.year-1)-1968)/4 - ((rtctime.year-1)-1900)/100 + ((rtctime.year-1)-1600)/400; + long epochdays = (rtctime.year-1970)*365 + leapyear + rtcmonthdays[rtctime.month-1] + rtctime.day - 1; + if ((rtctime.month > 2) && (rtctime.year%4 == 0 && (rtctime.year%100 != 0 || rtctime.year%400 == 0))) epochdays+=1; + rtcutime = rtctime.second + 60*(rtctime.minute + 60*(rtctime.hour + 24*epochdays)); +} + +/* convert the unix time to time and date from https://de.wikipedia.org/wiki/Unixzeit */ +void rtcutimetotime() { + const unsigned long int secondsperday = 86400ul; /* 24* 60 * 60 */ + const unsigned long int daysperyear = 365ul; /* no leap year */ + const unsigned long int daysinfoury = 1461ul; /* 4*365 + 1 */ + const unsigned long int daysinhundredy = 36524ul; /* 100*365 + 25 - 1 */ + const unsigned long int daysinfourhundredy = 146097ul; /* 400*365 + 100 - 4 + 1 */ + const unsigned long int daynumberzero = 719468ul; /* day number of March, 1 1970 */ + + unsigned long int daynumber = daynumberzero + rtcutime/secondsperday; + unsigned long int secondssincemidnight = rtcutime%secondsperday; + unsigned long int temp; + + /* the weekday is based in the daynumber since March, 1, 1970 a SUNDAY */ + rtctime.weekday = daynumber % 7; + + /* leap years of the Gregorian calendar */ + temp = 4 * (daynumber + daysinhundredy + 1) / daysinfourhundredy - 1; + rtctime.year = 100 * temp; + daynumber -= daysinhundredy * temp + temp / 4; + + /* leap years of the Julian calendar */ + temp = 4 * (daynumber + daysperyear + 1) / daysinfoury - 1; + rtctime.year += temp; + daynumber -= daysperyear * temp + temp / 4; + + /* calculate day and month, reference March 1 */ + rtctime.month = (5 * daynumber + 2) / 153; + rtctime.day = daynumber - (rtctime.month * 153 + 2) / 5 + 1; + + /* recalulate to a normal year */ + rtctime.month += 3; + if (rtctime.month > 12) { + rtctime.month -= 12; + rtctime.year++; + } + + /* calculate hours, months, seconds */ + rtctime.hour = secondssincemidnight / 3600; + rtctime.minute = secondssincemidnight % 3600 / 60; + rtctime.second = secondssincemidnight % 60; +} + +/* get the time elements -> standard interface to BASIC */ +uint16_t rtcget(uint8_t i) { +/* add to the last time we set the clock and subtract the offset*/ + rtcutime = millis()/1000 + rtcutimeoffset; +/* calulate the time data */ + rtcutimetotime(); + + switch (i) { + case 0: + return rtctime.second; + case 1: + return rtctime.minute; + case 2: + return rtctime.hour; + case 3: + return rtctime.weekday; + case 4: + return rtctime.day; + case 5: + return rtctime.month; + case 6: + return rtctime.year; + default: + return 0; + } +} + +/* set the time elements -> standard interface to BASIC */ +void rtcset(uint8_t i, uint16_t v) { +/* how much time has elapsed since we last set the clock */ + rtcutime = millis()/1000 + rtcutimeoffset; + +/* generate the time structure */ + rtcutimetotime(); + +/* set the clock */ + switch (i) { + case 0: + if (v>=0 && v<60) rtctime.second=v; + break; + case 1: + if (v>=0 && v<60) rtctime.minute=v; + break; + case 2: + if (v>=0 && v<24) rtctime.hour=v; + break; + case 3: + if (v>=0 && v<7) rtctime.weekday=v; + break; + case 4: + if (v>0 && v<32) rtctime.day=v; + break; + case 5: + if (v>0 && v<13) rtctime.month=v; + break; + case 6: + if (v>=1970 && v<2100) rtctime.year=v; + break; + default: + return; + } + + /* recalulate the right offset by first finding the second value of the new date*/ + rtctimetoutime(); + +/* remember when we set the clock */ + rtcutimeoffset = rtcutime - millis()/1000; +} +#elif defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_MBED_GIGA) +/* + * On ESP32 we use the builtin clock, this is a generic Unix time mechanism equivalent + * to the code in hardware-posix.h. The code works also for the GIGA which is surprising! + */ + +/* no begin needed */ +void rtcbegin() {} + +/* get the time */ +uint16_t rtcget(uint8_t i) { + struct tm rtctime; + time_t now; + time(&now); + localtime_r(&now, &rtctime); + + switch (i) { + case 0: + return rtctime.tm_sec; + case 1: + return rtctime.tm_min; + case 2: + return rtctime.tm_hour; + case 3: + return rtctime.tm_wday; + case 4: + return rtctime.tm_mday; + case 5: + return rtctime.tm_mon+1; + case 6: + if (rtctime.tm_year > 100) return rtctime.tm_year-100; else return rtctime.tm_year; + default: + return 0; + } + + return 0; +} + +/* set the time */ +void rtcset(uint8_t i, uint16_t v) { + struct tm rtctime; + struct timeval tv; + + /* get the time stucture from the system */ + time_t now; + time(&now); + localtime_r(&now, &rtctime); + + /* change what needs to be changed */ + switch (i) { + case 0: + rtctime.tm_sec = v%60; + break; + case 1: + rtctime.tm_min = v%60; + break; + case 2: + rtctime.tm_hour = v%24; + break; + case 3: + rtctime.tm_wday = v%7; + break; + case 4: + rtctime.tm_mday = v; + break; + case 5: + rtctime.tm_mon = v-1; + break; + case 6: + if (v > 1900) v=v-1900; /* get years to the right value */ + if (v < 50) v=v+100; + rtctime.tm_year = v; + break; + } + + /* calculate the seconds and put it back*/ + time_t epocht = mktime(&rtctime); + if (epocht > 2082758399){ + tv.tv_sec = epocht - 2082758399; + } else { + tv.tv_sec = epocht; + } + tv.tv_usec = 0; + settimeofday(&tv, NULL); +} +#else +/* no clock at all, no operations */ +void rtcbegin() {} +uint16_t rtcget(uint8_t i) { return 0; } +void rtcset(uint8_t i, uint16_t v) { } +#endif + +/* + * External EEPROM as a filesystem is handled through an EFS filesystem + * object, see https://github.com/slviajero/EepromFS for details. + * Here the most common parameters are set as a default. + * The EFS library is now part of the interpreter runtime. + */ + +#ifdef ARDUINOEFS +#undef ARDUINOI2CEEPROM +#ifndef EFSEEPROMADDR +#define EFSEEPROMADDR 0x50 +#endif +#ifdef EFSEEPROMSIZE +EepromFS EFS(EFSEEPROMADDR, EFSEEPROMSIZE); +#else +EepromFS EFS(EFSEEPROMADDR); +#endif +#endif + +/* + * External EEPROM is also handled through an EFS filesystem object + * in raw mode. This handles buffering with a minium of ram. +*/ + +#if defined(ARDUINOI2CEEPROM) && defined(ARDUINOI2CEEPROM_BUFFERED) +#ifndef I2CEEPROMADDR +#define I2CEEPROMADDR 0x50 +#endif +#ifdef I2CEEPROMSIZE +EepromFS EFSRAW(I2CEEPROMADDR, I2CEEPROMSIZE); +#else +EepromFS EFSRAW(I2CEEPROMADDR); +#endif +#endif + +/* + * definitions for ESP Wifi and MQTT, super experimental. + * As networking is only used for MQTT at the moment, + * mqtt, Wifi and Ethernet comes all in one. + * + * No encryption/authetication is implemented in MQTT. + * Only public, open servers can be used. + * + * MQTT topics can only be 32 bytes long. + * Buffered incoming and outgoing messages can be 128 bytes + * per default. + * + * wifisettings.h is the generic network definition file + * all network settings are compiled into the code + * BASIC cannot change them at runtime. + */ +#ifdef ARDUINOMQTT +#include "wifisettings.h" +#ifdef ARDUINOETH +EthernetClient bethclient; +PubSubClient bmqtt(bethclient); +#else +WiFiClient bwifi; +PubSubClient bmqtt(bwifi); +#endif + +/* the buffers of the outgoing and incoming MQTT topic, they are char!! */ +char mqtt_otopic[MQTTLENGTH]; +char mqtt_itopic[MQTTLENGTH]; + +/* + * the buffers for MQTT messages, input and output goes + * through these static buffers. + */ + +volatile char mqtt_buffer[MQTTBLENGTH]; +volatile uint16_t mqtt_messagelength; +volatile char mqtt_obuffer[MQTTBLENGTH]; +volatile uint16_t mqtt_charsforsend; + +/* the name of the client, generated pseudo randomly to avoind + naming conflicts */ +char mqttname[MQTTNAMELENGTH] = "iotbasicxxx"; +void mqttsetname() { + uint32_t m = millis(); + mqttname[8]=(char)(65+m%26); + m=m/26; + mqttname[9]=(char)(65+m%26); + m=m/26; + mqttname[10]=(char)(65+m%26); +} + +/* + * network begin method + * needs the settings from wifisettings.h + * + * Default is right now that Wifi is started at boot + * This may change in the future. + * + * Ethernet begin has to be reviewed to avoid DHCP + * start timeout if network is not connected + */ +void netbegin() { +#ifdef ARDUINOETH +#ifdef ETHPIN + Ethernet.init(ETHPIN); +#endif + Ethernet.begin(mac); +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.mode(WIFI_STA); + WiFi.begin(ssid, password); + WiFi.setAutoReconnect(1); +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) + WiFi.begin(ssid, password); +#endif +#if defined(ARDUINO_ARCH_MBED_GIGA) + int counter=0; + int status=WL_IDLE_STATUS; + while (status != WL_CONNECTED && counter++ < 10) { + status=WiFi.begin(ssid, password); + bdelay(500); + } +#endif +#endif +} + +/* + * network stop methode, needed sometime to reinit networking + * completely or to save power + * + */ +void netstop() { +#ifdef ARDUINOETH +/* to be done */ +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.mode(WIFI_OFF); +#endif +#if defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) || defined(ARDUINO_ARCH_MBED_GIGA) + WiFi.end(); +#endif +#endif +} + +/* + * network reconnect methode + * + */ +void netreconnect() { +#ifdef ARDUINOETH +/* */ +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + WiFi.reconnect(); + bdelay(1000); +#elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_UNOR4_WIFI) || defined(ARDUINO_ARCH_MBED_GIGA) +/* on these platforms there is no reconnect method, we simply stop and start again */ + netstop(); + netbegin(); +#endif +#endif +} + +/* + * network connected method + * on ESP Wifi try to reconnect, the delay is odd + * This is a partial reconnect, BASIC needs to handle + * repeated reconnects + */ +uint8_t netconnected() { +#ifdef ARDUINOETH + return bethclient.connected(); +#else + return WiFi.status() == WL_CONNECTED; +#endif +} + +/* + * mqtt callback function, using the byte type here + * because payload can be binary - interface to BASIC + * strings need to be done + * + * mqtt event handling in BASIC can be triggered here + * we leave the types Arduino style + */ +void mqttcallback(char* t, byte* p, unsigned int l) { + short i; + mqtt_messagelength=l; + for(i=0; i MQTTBLENGTH) { + if (!mqttreconnect()) {ioer=1; return;}; + if (!bmqtt.publish(mqtt_otopic, (uint8_t*) mqtt_obuffer, (unsigned int) mqtt_charsforsend-1, false)) ioer=1; + mqtt_charsforsend=0; + } +} + +/* the write command is simple */ +void mqttwrite(const char c) { mqttouts(&c, 1); } + +/* return the messagelength as avail */ +uint16_t mqttavailable() { + return mqtt_messagelength; +} + +/* checkch is just a dummy */ +char mqttcheckch() { + if (mqtt_messagelength>0) return mqtt_buffer[0]; else return 0; +} + +/* + * ins copies the buffer into a basic string + * - behold the jabberwock - length gynmastics + */ +uint16_t mqttins(char *b, uint16_t nb) { + uint16_t z; + + for (z=0; z0) { + ch=mqtt_buffer[0]; + for (i=0; i tone_duration+tone_start) { + tone_enabled=0; + digitalWrite(tone_pin, LOW); + tone_pinstate=0; + return; + } + +/* if not, check if the intervall is over */ + if (micros() > tone_intervall+tone_micros) { + tone_micros=micros(); + tone_pinstate=!tone_pinstate; + digitalWrite(tone_pin, tone_pinstate); + } +} +#elif defined(ARDUINO_TTGO_T7_V14_Mini32) && defined(PS2FABLIB) +/* fabGL soundgenerator code of suggestes by testerrossa + * pin numbers below 128 are real arduino pins while + * pin numvers from 128 onwards are sound generator capabilities + * this is different from the original code + * + * Sound generator capabilities are numbered as follows + * 128: Sine wave + * 129: Symmetric square wave + * 130: Sawtooth + * 131: Triangle + * 132: VIC noise + * 133: noise + * + * 256-511: square wave with variable duty cycle + * + */ +void playtone(uint8_t pin, uint16_t frequency, uint16_t duration, uint8_t volume) { + +/* frequency 0 is off */ + if (frequency == 0) { + soundGenerator.play(false); + soundGenerator.clear(); + return; + } + +/* duration 0 is a long tone */ + if (duration == 0) duration=60000; + + if (pin == 128) soundGenerator.playSound(SineWaveformGenerator(), frequency, duration, volume); + if (pin == 129) soundGenerator.playSound(SquareWaveformGenerator(), frequency, duration, volume); + if (pin == 130) soundGenerator.playSound(SawtoothWaveformGenerator(), frequency, duration, volume); + if (pin == 131) soundGenerator.playSound(TriangleWaveformGenerator(), frequency, duration, volume); + if (pin == 132) soundGenerator.playSound(VICNoiseGenerator(), frequency, duration, volume); + if (pin == 133) soundGenerator.playSound(NoiseWaveformGenerator(), frequency, duration, volume); + if (pin >= 255 && pin < 512 ) { + pin=pin-255; + SquareWaveformGenerator sqw; + sqw.setDutyCycle(pin); + soundGenerator.playSound(sqw, frequency, duration, volume); + } +} +#else +/* playtone is just a wrapper around tone and noTone */ +void playtone(uint8_t pin, uint16_t frequency, uint16_t duration, uint8_t volume) { + if (frequency == 0) { + noTone(pin); + } else if (duration == 0) { + tone(pin, frequency); + } else { + tone(pin, frequency, duration); + } +} +#endif + +/* + * The byield function is called after every statement + * it allows two levels of background tasks. + * + * BASICBGTASK controls if time for background tasks is + * needed, usually set by hardware features + * + * YIELDINTERVAL by default is 32, generating a 32 ms call + * to the network loop function. + * + * LONGYIELDINTERVAL by default is 1000, generating a one second + * call to maintenance functions. + */ + +uint32_t lastyield=0; +uint32_t lastlongyield=0; +int countfasttick = 0; + +void byield() { + +/* the fast ticker for all fast timing functions */ + fastticker(); + +/* the loop function for non BASIC stuff */ + bloop(); + +#if defined(BASICBGTASK) +/* what time is it, call millis only once */ + long m=millis(); + +/* yield all 32 milliseconds */ + + if (m-lastyield > YIELDINTERVAL-1) { + yieldfunction(); + lastyield=m; + } + +/* yield every second */ + if (m-lastlongyield > LONGYIELDINTERVAL-1) { + longyieldfunction(); + lastlongyield=m; + } + #endif + + /* call the background task scheduler on some platforms implemented in hardware-* */ + +} + +/* delay must be implemented to use byield() while waiting */ +void bdelay(uint32_t t) { + unsigned long i; + if (t>0) { + i=millis(); + while (millis() < i+t) byield(); + } +} + +/* + * This code measures the fast ticker frequency in microseconds + * It leaves the data in variable F. Activate this only for test + * purposes. + */ + +#ifdef FASTTICKERPROFILE +int avgfastticker() { + return countfasttick; +} + +void clearfasttickerprofile() { + countfasttick=0; +} +#endif + + +/* fastticker is the hook for all fast timing functions */ +void fastticker() { +/* fastticker profiling test code */ +#if defined(FASTTICKERPROFILE) + countfasttick++; +#endif +/* toggle the tone pin */ +#ifdef ARDUINOTONEEMULATION + tonetoggle(); +#endif +} + +/* everything that needs to be done often - 32 ms */ +void yieldfunction() { +#ifdef ARDUINOMQTT + bmqtt.loop(); +#endif +#ifdef ARDUINOUSBKBD + usb.Task(); +#endif +#ifdef ARDUINOZX81KBD + (void) keyboard.peek(); /* scan once and set lastkey properly every 32 ms */ +#endif +/* delay(0) is only needed on ESP8266! it calls the scheduler - no bdelay here!! */ +#if defined(ARDUINO_ARCH_ESP8266) + delay(0); +#endif +} + +/* everything that needs to be done not so often - 1 second */ +void longyieldfunction() { +#ifdef ARDUINOETH + Ethernet.maintain(); +#endif +#ifdef BREAKINBACKGROUND + if (checkch() == BREAKCHAR) breakcondition=1; +#endif +} + +/* + * The file system driver - all methods needed to support BASIC fs access + * Different filesystems need different prefixes and fs objects, these + * filesystems use the stream API + */ + +/* typical file name length */ +#define FBUFSIZE 32 + +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(ESP32FAT) || defined(STM32SDIO) ||defined(ESPSDMMC) +File ifile; +File ofile; +char tempname[FBUFSIZE]; /* this is needed for the catalog code as these platforms do not give static C strings back */ +#if defined(ARDUINOSD) || defined(STM32SDIO) ||defined(ESPSDMMC) +File root; +File file; +#ifdef ARDUINO_ARCH_ESP32 +const char rootfsprefix[2] = "/"; +#else +const char rootfsprefix[1] = ""; +#endif +#endif +#if defined(ESPSPIFFS) || defined(ESP32FAT) +const char rootfsprefix[2] = "/"; +#ifdef ARDUINO_ARCH_ESP8266 +Dir root; +File file; +#endif +#ifdef ARDUINO_ARCH_ESP32 +File root; +File file; +#endif +#endif +#ifdef ARDUINO_ARCH_ESP8266 +/* #define FILE_OWRITE (O_READ | O_WRITE | O_CREAT | O_TRUNC) */ +/* this is the ESP8266 definition for kernel 3.0, 3.1 has fixed this */ +#define FILE_OWRITE (sdfat::O_READ | sdfat::O_WRITE | sdfat::O_CREAT | sdfat::O_TRUNC) +#else +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_STM32) +#define FILE_OWRITE FILE_WRITE +#else +#define FILE_OWRITE (O_READ | O_WRITE | O_CREAT | O_TRUNC) +#endif +#endif +#endif + +/* using the POSIX API in LittleFS */ +#ifdef RP2040LITTLEFS +#define FILESYSTEMDRIVER +FILE* ifile; +FILE* ofile; +DIR* root; +struct dirent* file; +LittleFS_MBED *myFS; +const char rootfsprefix[10] = MBED_LITTLEFS_FILE_PREFIX; +#endif + +/* + * the API of the USB filesystem on GIGA and Portenta. + * Looks like LITTLEFS. Pointers to the objects msd and usb are used and + * allocation is postponed to fsbegin(). This was done to try to get the code + * restartable, but it doesn't really work. Still, using the pointers + * is cleaner and more C++ish. + */ +#ifdef GIGAUSBFS +#define FILESYSTEMDRIVER +USBHostMSD* msdp; +mbed::FATFileSystem* usbp; +FILE* ifile; +FILE* ofile; +DIR* root; +struct dirent *file; +const char rootfsprefix[10] = "/usb/"; +#endif + +/* use EEPROM as filesystem */ +#ifdef ARDUINOEFS +byte ifile; +byte ofile; +byte file; +#endif + +/* the buildin file system for ro access */ +#ifdef HASBUILDIN +char* buildin_ifile = 0; +uint16_t buildin_ifilepointer = 0; +char* buildin_file = 0; +char* buildin_pgm = 0; +uint8_t buildin_rootactive = 0; +uint16_t buildin_rootpointer = 0; +char buildin_tempname[FBUFSIZE]; /* this is needed for the catalog code as strings need to be copied from progmem */ +#endif + + +/* these filesystems may have a path prefixes, we treat STM32SDIO like an SD here */ +#if defined(RP2040LITTLEFS) || defined(ESPSPIFFS) || defined(ESP32FAT) || defined(ARDUINOSD) || defined(GIGAUSBFS) || defined(ESPSDMMC) +char tmpfilename[10+FBUFSIZE]; + +/* add the prefix to the filename */ +char* mkfilename(const char* filename) { + uint8_t i,j; + for(i=0; i<10 && rootfsprefix[i]!=0; i++) tmpfilename[i]=rootfsprefix[i]; + tmpfilename[i++]='/'; + for(j=0; jinit()) fsstart=1; else fsstart=0; +#endif +#ifdef GIGAUSBFS + static int fsbegins = 0; + int usbfsstat; + if (RTDEBUG) consolelog("Starting USB file system.\n"); +/* power up the USB A port */ + pinMode(PA_15, OUTPUT); + if (RTDEBUG) consolelog("Power down USB port.\n"); + digitalWrite(PA_15, LOW); + bdelay(100); + if (RTDEBUG) consolelog("Power up USB port.\n"); + digitalWrite(PA_15, HIGH); + bdelay(100); + +/* delete old objects */ + if (msdp) delete msdp; + if (usbp) delete usbp; + + /* create the msdp and the filesystem object */ + msdp=new USBHostMSD(); + usbp=new mbed::FATFileSystem("usb"); + +/* connect and mount */ + while(!msdp->connect() && fsbegins++ < 10) { bdelay(500); } + if (msdp->connected()) { + if (RTDEBUG) { consolelog("msd connected\n"); } + usbfsstat=usbp->mount(msdp); + if (RTDEBUG) { + consolelog("USB mount status is "); + consolelognum(usbfsstat); + consolelog("\n"); + } + fsstart=!usbfsstat; + } else { + if (RTDEBUG) { consolelog("msd not connected\n"); } + fsstart=0; + } + + if (RTDEBUG) { consolelog("fsstart is: "); consolelognum(fsstart); + consolelog("\n"); } +#endif +#ifdef ARDUINOEFS + uint8_t s=EFS.begin(); + if (s>0) { + fsstart=s; + } else { + if (EFS.format(32)) fsstart=32; else fsstart=0;; + } +#endif +#ifdef HASBUILDIN +/* hopefully nothing to be done */ +#endif +} + +/* + * Maps information of the start of the filesystem to + * the USR(16,x) call. USR(16,0) checks if a filesystem is + * present and USR(16,1) checks if the filesystem has been mounted. + */ +uint8_t fsstat(uint8_t c) { +#if defined(FILESYSTEMDRIVER) + if (c == 0) return 1; + if (c == 1) return fsstart; +#endif + return 0; +} + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char c) { +#if defined(ARDUINOSD) || defined(ESPSPIFFS)||defined(ESP32FAT)||defined(STM32SDIO)|| defined(ESPSDMMC) + if (ofile) { ofile.write(c); return; } +#endif +#if defined(RP2040LITTLEFS) || defined(GIGAUSBFS) + if (ofile) { fputc(c, ofile); return; } +#endif +#if defined(ARDUINOEFS) + if (ofile) { + if (!EFS.fputc(c, ofile)) ioer=-1; + return; + } +#endif +/* if there is no open ofile, set the ioerror flag to notify BASIC about it */ + ioer=1; +} + +char fileread() { + char c; + +/* the buildin file is active, we handle this first, else we allow for another FS */ +#if defined(HASBUILDIN) + if (buildin_ifile != 0) { + c=pgm_read_byte(buildin_ifile+buildin_ifilepointer); + if (c != '\f') buildin_ifilepointer++; else { ioer=-1; c=255; } + return c; + } +#endif +#if defined(ARDUINOSD) || defined(ESPSPIFFS)||defined(ESP32FAT)||defined(STM32SDIO) || defined(ESPSDMMC) + if (ifile) c=ifile.read(); else { ioer=1; return 0; } + if (c == -1 || c == 255) ioer=-1; + return c; +#endif +#if defined(RP2040LITTLEFS)||defined(GIGAUSBFS) + if (ifile) c=fgetc(ifile); else { ioer=1; return 0; } + if (c == -1 || c == 255) ioer=-1; + return c; +#endif +#ifdef ARDUINOEFS + if (ifile) c=EFS.fgetc(ifile); else { ioer=1; return 0; } + if (c == -1|| c == 255) ioer=-1; + return c; +#endif + return 0; +} + +int fileavailable(){ +/* for the buildin file \f is the end of file, return true is it has not been reached */ +#if defined(HASBUILDIN) + char c; + if (buildin_ifile != 0) { + c=pgm_read_byte(buildin_ifile+buildin_ifilepointer); + if (c != '\f') return 1; else return 0; + } +#endif +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(ESP32FAT) || defined(STM32SDIO) || defined(ESPSDMMC) + return ifile.available(); +#endif +#if defined(RP2040LITTLEFS) || defined(GIGAUSBFS) + return !feof(ifile); +#endif +#ifdef ARDUINOEFS + return EFS.available(ifile); +#endif + return 0; +} + +uint8_t ifileopen(const char* filename){ +/* we first try to open a file on the builin file system, then of the other ones */ +#if defined(HASBUILDIN) + byte i, file; + char* name; + +/* opening a new file */ + buildin_ifilepointer=0; + buildin_ifile=0; + + file=0; + while(1) { + +/* find a name in progmem, 0 if no more name */ + name=(char*)pgm_read_ptr(&buildin_program_names[file]); + if (name == 0) break; + +/* compare the name with the filename */ + for(i=0;i<32;i++) { + char c=pgm_read_byte(&name[i]); + +/* we are at the end of the name, if filename is also ending, we got it */ + if (c == 0 && filename[i] == 0) { + buildin_ifile=(char*)pgm_read_ptr(&buildin_programs[file]); + return (buildin_ifile != 0); + } + +/* a character mismatch means we need to go to the next name */ + if (c != filename[i]) { + file++; + break; + } + } + } +#endif +/* + * All filesystems that are not buildin are checked for correct open + * This is needed for GIGA as the USB host tends to block. + */ + if (!fsstart) return 0; + +#if defined(ARDUINOSD) + ifile=SD.open(mkfilename(filename), FILE_READ); + return ifile != 0; +#endif +#ifdef ESPSDMMC + ifile=SD_MMC.open(mkfilename(filename), FILE_READ); + return ifile != 0; +#endif +#if defined(STM32SDIO) + ifile=SD.open(filename); + return ifile != 0; +#endif +#ifdef ESPSPIFFS + ifile=SPIFFS.open(mkfilename(filename), "r"); + return ifile != 0; +#endif +#ifdef ESP32FAT + ifile=FFat.open(mkfilename(filename), "r"); + return ifile != 0; +#endif +#if defined(RP2040LITTLEFS) || defined(GIGAUSBFS) + ifile=fopen(mkfilename(filename), "r"); + return ifile != 0; +#endif +#ifdef ARDUINOEFS + ifile=EFS.fopen(filename, "r"); + return ifile != 0; +#endif + return 0; +} +void ifileclose(){ +#if defined(HASBUILDIN) + if (buildin_ifile) { + buildin_ifile=0; + buildin_ifilepointer=0; + } +#endif +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(ESP32FAT) || defined(STM32SDIO) || defined(ESPSDMMC) + if (ifile) ifile.close(); +#endif +#if defined(RP2040LITTLEFS) || defined(GIGAUSBFS) + if (ifile) fclose(ifile); +#endif +#ifdef ARDUINOEFS + if (ifile) EFS.fclose(ifile); +#endif + +} + +uint8_t ofileopen(const char* filename, const char* m){ + +/* + * All filesystems that are not buildin are checked for correct open + * This is needed for GIGA as the USB host tends to block. + */ + if (!fsstart) return 0; + +#if defined(ARDUINOSD) + if (*m == 'w') ofile=SD.open(mkfilename(filename), FILE_OWRITE); +/* ESP32 has FILE_APPEND defined */ +#ifdef FILE_APPEND + if (*m == 'a') ofile=SD.open(mkfilename(filename), FILE_APPEND); +#else + if (*m == 'a') ofile=SD.open(mkfilename(filename), FILE_WRITE); +#endif + return ofile != 0; +#endif +#if defined(ESPSDMMC) + if (*m == 'w') ofile=SD_MMC.open(mkfilename(filename), FILE_OWRITE); +/* ESP32 has FILE_APPEND defined */ +#ifdef FILE_APPEND + if (*m == 'a') ofile=SD_MMC.open(mkfilename(filename), FILE_APPEND); +#else + if (*m == 'a') ofile=SD_MMC.open(mkfilename(filename), FILE_WRITE); +#endif + return ofile != 0; +#endif +#if defined(STM32SDIO) + if (*m == 'w') ofile=SD.open(filename, FILE_OWRITE); +/* ESP32 has FILE_APPEND defined */ +#ifdef FILE_APPEND + if (*m == 'a') ofile=SD.open(filename, FILE_APPEND); +#else + if (*m == 'a') ofile=SD.open(filename, FILE_WRITE); +#endif + return ofile != 0; +#endif +#ifdef ESPSPIFFS + ofile=SPIFFS.open(mkfilename(filename), m); + return ofile != 0; +#endif +#ifdef ESP32FAT + ofile=FFat.open(mkfilename(filename), m); + return ofile != 0; +#endif +#if defined(RP2040LITTLEFS) || defined(GIGAUSBFS) + ofile=fopen(mkfilename(filename), m); + return ofile != 0; +#endif +#ifdef ARDUINOEFS + ofile=EFS.fopen(filename, m); + return ofile != 0; +#endif +/* if no other filesystem has satisfied the write open BUILDIN reports the error */ +#if defined(HASBUILDIN) + ioer=-1; + return 0; +#endif + return 0; +} + +void ofileclose(){ +#if defined(ARDUINOSD) || defined(ESPSPIFFS)||defined(ESP32FAT)|| defined(STM32SDIO) || defined(ESPSDMMC) + if (ofile) ofile.close(); +#endif +#if defined(RP2040LITTLEFS) || defined(GIGAUSBFS) + if (ofile) fclose(ofile); +#endif +#ifdef ARDUINOEFS + if (ofile) EFS.fclose(ofile); +#endif +} + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +void rootopen() { +/* we first open the buildin and remember we are processing it, if there is another root, we also open it */ +#ifdef HASBUILDIN + buildin_rootpointer=0; + buildin_rootactive=1; +#endif +/* + * All filesystems that are not buildin are checked for correct open + * This is needed for GIGA as the USB host tends to block. + */ + if (!fsstart) return; + +#if defined(ARDUINOSD) || defined(STM32SDIO) + root=SD.open("/"); +#endif +#if defined(ESPSDMMC) + root=SD_MMC.open("/"); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + root=SPIFFS.openDir("/"); +#endif +#ifdef ARDUINO_ARCH_ESP32 + root=SPIFFS.open("/"); +#endif +#endif +#ifdef ESP32FAT + root=FFat.open("/"); +#endif +#if defined(RP2040LITTLEFS) || defined(GIGAUSBFS) + root=opendir(rootfsprefix); +#endif +#ifdef ARDUINOEFS + EFS.dirp=0; +#endif +} + +uint8_t rootnextfile() { +/* we first iterate through the buildins, then fall through to the other filesystems */ +#ifdef HASBUILDIN + if (buildin_rootactive) { + buildin_file=(char*)pgm_read_ptr(&buildin_program_names[buildin_rootpointer]); + if (buildin_file != 0) { + buildin_pgm=(char*)pgm_read_ptr(&buildin_programs[buildin_rootpointer]); + buildin_rootpointer++; + return 1; + } else { + buildin_rootactive=0; + } + } +#endif +/* + * All filesystems that are not buildin are checked for correct open + * This is needed for GIGA as the USB host tends to block. + */ + if (!fsstart) return 0; + +#if defined(ARDUINOSD) || defined(STM32SDIO)||defined(ESPSDMMC) + file=root.openNextFile(); + return (file != 0); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + if (root.next()) { + file=root.openFile("r"); + return 1; + } else { + return 0; + } +#endif +#ifdef ARDUINO_ARCH_ESP32 + file=root.openNextFile(); + return (file != 0); +#endif +#endif +#ifdef ESP32FAT +#ifdef ARDUINO_ARCH_ESP32 + file=root.openNextFile(); + return (file != 0); +#endif +#endif +#if defined(RP2040LITTLEFS) || defined(GIGAUSBFS) + file = readdir(root); + return (file != 0); +#endif +#ifdef ARDUINOEFS + file = EFS.readdir(); + return (file != 0); +#endif + return 0; +} + +uint8_t rootisfile() { +#ifdef HASBUILDIN + if (buildin_rootactive) return 1; +#endif +#if defined(ARDUINOSD) || defined(STM32SDIO) || defined(ESPSDMMC) + return (!file.isDirectory()); +#endif + +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + return 1; +#endif +#ifdef ARDUINO_ARCH_ESP32 + return (!file.isDirectory()); +#endif +#endif +#ifdef ESP32FAT +#ifdef ARDUINO_ARCH_ESP32 + return (!file.isDirectory()); +#endif +#endif +#if defined(RP2040LITTLEFS)||defined(GIGAUSBFS) + return (file->d_type == DT_REG); +#endif +#ifdef ARDUINOEFS + return 1; +#endif + return 0; +} + +const char* rootfilename() { +#ifdef HASBUILDIN + if (buildin_rootactive) { + for(int i=0; id_name); +#endif +#ifdef ARDUINOEFS + return EFS.filename(file); +#endif + return 0; +} + +uint32_t rootfilesize() { +#ifdef HASBUILDIN + int i=0; + if (buildin_rootactive && buildin_pgm) { + for (;;i++) { + char ch=pgm_read_byte(&buildin_pgm[i]); + if (ch == 0) return i; + } + } +#endif +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(ESP32FAT) || defined(STM32SDIO) || defined(ESPSDMMC) + return file.size(); +#endif +#if defined(RP2040LITTLEFS)||defined(GIGAUSBFS) +/* to be done */ +#endif +#ifdef ARDUINOEFS + return EFS.filesize(file); +#endif + return 0; +} + +void rootfileclose() { +#if defined(ARDUINOSD) || defined(ESPSPIFFS) || defined(ESP32FAT) || defined(STM32SDIO) || defined(ESPSDMMC) + file.close(); +#endif +#if defined(RP2040LITTLEFS) || defined(GIGAUSBFS) +/* nothing to be done here as we work on dirents */ +#endif +#ifdef ARDUINOEFS +#endif +} + +void rootclose(){ +#ifdef HASBUILDIN + buildin_rootactive=0; +#endif +#if defined(ARDUINOSD) || defined(STM32SDIO) || defined(ESPSDMMC) + root.close(); +#endif +#ifdef ESPSPIFFS +#ifdef ARDUINO_ARCH_ESP8266 + return; +#endif +#ifdef ARDUINO_ARCH_ESP32 + root.close(); +#endif +#endif +#ifdef ESP32FAT +#ifdef ARDUINO_ARCH_ESP32 + root.close(); +#endif +#endif +#ifdef RP2040LITTLEFS +#endif +#ifdef GIGAUSBFS + if (root) (void) closedir(root); +#endif +#ifdef ARDUINOEFS +#endif +} + +/* + * remove method for files + */ +void removefile(const char *filename) { +#if defined(ARDUINOSD) + SD.remove(mkfilename(filename)); + return; +#endif +#if defined(ESPSDMMC) + SD_MMC.remove(mkfilename(filename)); + return; +#endif +#if defined(STM32SDIO) + SD.remove(filename); + return; +#endif +#ifdef ESPSPIFFS + SPIFFS.remove(mkfilename(filename)); + return; +#endif +#ifdef ESP32FAT + FFat.remove(mkfilename(filename)); + return; +#endif +#if defined(RP2040LITTLEFS) || defined(GIGAUSBFS) + remove(mkfilename(filename)); + return; +#endif +#ifdef ARDUINOEFS + EFS.remove(filename); + return; +#endif +} + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(uint8_t i) { +#if defined(ARDUINOSD) || defined(STM32SDIO)||defined(GIGAUSBFS) || defined(ESPSDMMC) + return; + return; +#endif +#ifdef ESPSPIFFS + if (SPIFFS.format()) { SPIFFS.begin(); fsstart=1; } else { fsstart=0; } +#endif +#ifdef ESP32FAT + FFat.end(); + if (FFat.format()) { FFat.begin(); fsstart=1; } else { fsstart=0; } +#endif +#ifdef RP2040LITTLEFS + fs.reformat(&bd); /* bd: this comes from the header */ + return; +#endif +#ifdef ARDUINOEFS + if (i>0) { + if (EFS.format(i)) { EFS.begin(); fsstart=1; } else { fsstart=0; } + } else ioer=1; + return; +#endif +} + +/* + * The buffer code, a simple buffer to store output and + * input data. It can be used as a device in BASIC using the + * modifier &0. + */ + +/* use the input buffer variable from BASIC here, it is extern to runtime */ +void bufferbegin() {} + +/* write to the buffer, works only until 127 + uses vt52 style commands to handle the buffer content*/ +void bufferwrite(char c) { + if (!nullbuffer) return; + switch (c) { + case 12: /* clear screen */ + //nullbuffer[nullbuffer[0]+1]=0; + nullbuffer[0]=0; + nullbuffer[1]=0; + break; + case 10: + case 13: /* cr and lf ignored */ + break; + case 8: /* backspace */ + if (nullbuffer[0]>0) nullbuffer[0]--; + break; + default: + if (nullbuffer[0] < nullbufsize-1 && nullbuffer[0] < 127) { + nullbuffer[++nullbuffer[0]]=c; + nullbuffer[nullbuffer[0]+1]=0; /* null terminate */ + } + break; + } +} + +/* read not needed right now */ +char bufferread() { return 0; } +uint16_t bufferavailable() { return 0; } +char buffercheckch() { return 0; } +void bufferflush() { } +uint16_t bufferins(char *b, uint16_t nb) { return 0; } + +/* + * Primary serial code uses the Serial object or Picoserial + * + * The picoseria an own interrupt function. This is used to fill + * the input buffer directly on read. Write is standard like in + * the serial code. + * + * As echoing is done in the interrupt routine, the code cannot be + * used to receive keystrokes from serial and then display the echo + * directly to a display. To do this the write command in picogetchar + * would have to be replaced with a outch() that then redirects to the + * display driver. This would be very tricky from the timing point of + * view if the display driver code is slow. + * + * The code for the UART control is mostly taken from PicoSerial + * https://github.com/gitcnd/PicoSerial, originally written by Chris Drake + * and published under GPL3.0 just like this code + * + */ +#ifdef ARDUINOPICOSERIAL +volatile char picochar; +volatile uint8_t picoa = 0; +volatile char* picob = NULL; +int16_t picobsize = 0; +volatile int16_t picoi = 1; +volatile uint16_t picoz; /* ugly */ + +/* this is mostly taken from PicoSerial */ +const uint16_t MIN_2X_BAUD = F_CPU/(4*(2*0XFFF + 1)) + 1; + +/* the begin code */ +void picobegin(uint32_t baud) { + uint16_t baud_setting; + cli(); + if ((F_CPU != 16000000UL || baud != 57600) && baud > MIN_2X_BAUD) { + UCSR0A = 1 << U2X0; + baud_setting = (F_CPU / 4 / baud - 1) / 2; + } else { + UCSR0A = 0; + baud_setting = (F_CPU / 8 / baud - 1) / 2; + } +/* assign the baud_setting */ + UBRR0H = baud_setting >> 8; + UBRR0L = baud_setting; +/* enable transmit and receive */ + UCSR0B |= (1 << TXEN0) | (1 << RXEN0) | (1 << RXCIE0); + sei(); +} + +/* the write code, sending bytes directly to the UART */ +void picowrite(char b) { + while (((1 << UDRIE0) & UCSR0B) || !(UCSR0A & (1 << UDRE0))) {} + UDR0 = b; +} + +/* + * picogetchar: this is the interrupt service routine. It + * recieves a character and feeds it into a buffer and echos it + * back. The logic here is that the ins() code sets the buffer + * to the input buffer. Only then the routine starts writing to the + * buffer. Once a newline is received, the length information is set + * and picoa is also set to 1 indicating an available string, this stops + * recevieing bytes until the input is processed by the calling code. + */ +void picogetchar(char c){ + if (picob && (!picoa)) { + picochar=c; + if (picochar != '\n' && picochar != '\r' && picoi1) picoi--; else return; + } else + picob[picoi++]=picochar; + picowrite(picochar); + } else { + picoa = 1; + picob[picoi]=0; + picob[0]=picoi; + picoz=picoi; + picoi=1; + } + picochar=0; /* every buffered byte is deleted */ + } else { + if (c != 10) picochar=c; + } +} + +/* the ins code of picoserial, called like this in consins */ +uint16_t picoins(char *b, uint16_t nb) { + picob=b; + picobsize=nb; + picoa=0; +/* once picoa is set, the interrupt routine records characters + * until a cr and then resets picoa to 0 */ + while (!picoa) byield(); + outch(10); + return picoz; + } + +/* on an UART interrupt, the getchar function is called */ +#ifdef USART_RX_vect +ISR(USART_RX_vect) { + char c=UDR0; + picogetchar(c); +} +#else +/* for MEGAs and other with many UARTs */ + ISR(USART0_RX_vect) { + char c=UDR0; + picogetchar(c); +} +#endif +#endif + +/* + * blocking serial single char read for Serial + * unblocking for Picoserial because it is not + * character oriented -> blocking is handled in + * consins instead. + */ +char serialread() { +#ifdef ARDUINOPICOSERIAL + char c; + c=picochar; + picochar=0; + return c; +#else + while (!SERIALPORT.available()) byield(); + return SERIALPORT.read(); +#endif +} + +/* + * serial begin code with a one second delay after start + * this is not needed any more + */ +void serialbegin() { +#ifdef ARDUINOPICOSERIAL + picobegin(serial_baudrate); +#else + SERIALPORT.begin(serial_baudrate); +#endif + bdelay(1000); +} + +/* state information on the serial port */ +uint8_t serialstat(uint8_t c) { + if (c == 0) return 1; + if (c == 1) return serial_baudrate/100; + return 0; +} + +/* write to a serial stream */ +void serialwrite(char c) { +#ifdef ARDUINOPICOSERIAL + picowrite(c); +#else +/* write never blocks. discard any bytes we can't get rid of */ + SERIALPORT.write(c); +/* if (Serial.availableForWrite()>0) Serial.write(c); */ +#endif +} + +/* check on a character, needed for breaking */ +char serialcheckch() { +#ifdef ARDUINOPICOSERIAL + return picochar; +#else + if (SERIALPORT.available()) return SERIALPORT.peek(); else return 0; // should really be -1 +#endif +} + +/* avail method, needed for AVAIL() */ +uint16_t serialavailable() { +#ifdef ARDUINOPICOSERIAL + return picoi; +#else + return SERIALPORT.available(); +#endif +} + +/* flush serial */ +void serialflush() { +#ifdef ARDUINOPICOSERIAL + return; +#else + while (SERIALPORT.available()) SERIALPORT.read(); +#endif +} + +/* the serial ins */ +uint16_t serialins(char *b, uint16_t nb) { +#ifdef ARDUINOPICOSERIAL + return picoins(b, nb); +#else + return consins(b, nb); +#endif +} + +/* + * Start a secondary serial port for printing and/or networking + * This is either Serial1 on a MEGA or DUE or Nano Every or a SoftwareSerial + * instance + */ +#ifdef ARDUINOPRT +#if !defined(ARDUINO_AVR_MEGA2560) && !defined(ARDUINO_SAM_DUE) && !defined(ARDUINO_AVR_NANO_EVERY) \ + && !defined(ARDUINO_NANO_RP2040_CONNECT) && !defined(ARDUINO_RASPBERRY_PI_PICO) \ + && !defined(ARDUINO_SEEED_XIAO_M0) && !defined(ARDUINO_ARCH_RENESAS) &&! defined(ARDUINO_ARCH_MBED) +#include +SoftwareSerial PRTSERIAL(SOFTSERIALRX, SOFTSERIALTX); +#endif + +/* second serial port */ +void prtbegin() { + PRTSERIAL.begin(serial1_baudrate); +} + +/* the open functions are not needed here */ +char prtopen(char* filename, uint16_t mode) {} +void prtclose() {} + +uint8_t prtstat(uint8_t c) { + if (c == 0) return 1; + if (c == 1) return serial1_baudrate; + return 0; +} + +void prtwrite(char c) { + PRTSERIAL.write(c); +} + +char prtread() { + while (!PRTSERIAL.available()) byield(); + return PRTSERIAL.read(); +} + +char prtcheckch() { + if (PRTSERIAL.available()) return PRTSERIAL.peek(); else return 0; +} + +uint16_t prtavailable() { + return PRTSERIAL.available(); +} + +void prtset(uint32_t s) { + serial1_baudrate=s; + prtbegin(); +} + +uint16_t prtins(char* b, uint16_t nb) { + if (blockmode > 0) return inb(b, nb); else return consins(b, nb); +} +#endif + + +/* + * The wire code, direct access to wire communication + * in master mode wire_slaveid is the I2C address bound + * to channel &7 and wire_myid is 0 + * in slave mode wire_myid is the devices slave address + * and wire_slaveid is 0 + * ARDUINOWIREBUFFER is the maximum length of meesages the + * underlying library can process. This is 32 for the Wire + * library + */ + +/* this is always here, if Wire is needed by a subsysem, full wire always loads the Arduino wire library */ +#if defined(HASWIRE) +/* default begin is as a master + * This doesn't work properly on the ESP32C3 platform + * See https://github.com/espressif/arduino-esp32/issues/6376 + * for more details + */ +void wirebegin() { +#ifndef SDA_PIN + Wire.begin(); +#else + Wire.begin(SDA_PIN, SCL_PIN); +#endif +} +#endif + +/* this is code needed for the OPEN/CLOSE and wireslave mechanisms */ +#if defined(HASWIRE) +uint8_t wire_slaveid = 0; +uint8_t wire_myid = 0; +#define ARDUINOWIREBUFFER 32 +#ifdef ARDUINOWIRESLAVE +char wirereceivebuffer[ARDUINOWIREBUFFER]; +short wirereceivechars = 0; +char wirerequestbuffer[ARDUINOWIREBUFFER]; +short wirerequestchars = 0; +#endif + +void wireslavebegin(uint8_t s) { +#ifndef SDA_PIN + Wire.begin(s); +#else + Wire.begin(SDA_PIN, SCL_PIN, s); +#endif +} + +/* wire status - just checks if wire is compiled */ +uint8_t wirestat(uint8_t c) { + switch (c) { + case 0: + return 1; +#ifdef ARDUINOWIRESLAVE + case 1: + return wirerequestchars; +#endif + default: + return 0; + } +} + +/* available characters - test code ecapsulation prep for slave*/ +uint16_t wireavailable() { +/* as a master we return 1, as a slave the received chars*/ + if (wire_myid == 0) return 1; +#ifdef ARDUINOWIRESLAVE + else return wirereceivechars; +#else + else return 0; +#endif +} + +#ifdef ARDUINOWIRESLAVE +/* event handler for receive */ +void wireonreceive(int h) { + wirereceivechars=h; + if (h>ARDUINOWIREBUFFER) h=ARDUINOWIREBUFFER; + for (int i=0; iARDUINOWIREBUFFER) l=ARDUINOWIREBUFFER; + if (!Wire.requestFrom(wire_slaveid, l)) ioer=1; + while (Wire.available() && zARDUINOWIREBUFFER) l=ARDUINOWIREBUFFER; + if (wire_myid == 0) { + Wire.beginTransmission(wire_slaveid); +#ifdef ARDUINO_ARCH_ESP32 + for(z=0; z +#include +rf24_pa_dbm_e rf24_pa = RF24_PA_MAX; +RF24 radio(rf24_ce, rf24_csn); + +/* radio status */ +uint8_t radiostat(uint8_t c) { + if (c == 0) return 1; + if (c == 1) return radio.isChipConnected(); + return 0; +} + +/* generate a uint64_t pipe address from the filename string for RF24 */ +uint64_t pipeaddr(const char *f){ + uint64_t t = 0; + t=(uint8_t)f[0]; + for(short i=1; i<=4; i++) t=t*256+(uint8_t)f[i]; + return t; +} + + +/* read an entire string */ +uint16_t radioins(char *b, uint8_t nb) { + uint16_t z; + + if (radio.available()) { + radio.read(b+1, nb); + if (!blockmode) { + for (z=0; z nb) z=nb; + } + b[0]=z; + } else { + b[0]=0; + b[1]=0; + z=0; + } + return z; +} + + + /* radio is not character oriented, this is only added to make GET work + or single byte payloads, radio, like file is treated nonblocking here */ +char radioread() { + char rbuffer[2]; + if (radioins(rbuffer, 1)) return rbuffer[1]; else return 0; +} + +/* write to radio, no character mode here */ +void radioouts(char *b, uint8_t l) { + radio.stopListening(); + if (!radio.write(b, l)) ioer=1; + radio.startListening(); +} + +/* radio available */ +uint16_t radioavailable() { + return radio.available(); +} + +/* + * we always read from pipe 1 and use pipe 0 for writing, + * the filename is the pipe address, by default the radio + * goes to reading mode after open and is only stopped for + * write + */ +void iradioopen(const char *filename) { + if (!radio.begin()) ioer=1; + radio.openReadingPipe(1, pipeaddr(filename)); + radio.startListening(); +} + +void oradioopen(const char *filename) { + if (!radio.begin()) ioer=1; + radio.openWritingPipe(pipeaddr(filename)); +} + +void radioset(uint8_t s) { + if ((s<0) && (s>3)) {ioer=1; return; } + rf24_pa=(rf24_pa_dbm_e) s; + radio.setPALevel(rf24_pa); +} + +#else +uint8_t radiostat(uint8_t c) { return 0; } +uint64_t pipeaddr(const char *f){ return 0; } +uint16_t radioins(char *b, uint8_t nb) { b[0]=0; b[1]=0; return 0; } +void radioouts(char *b, uint8_t l) {} +uint16_t radioavailable() { return 0; } +void iradioopen(const char *filename) {} +void oradioopen(const char *filename) {} +void radioset(uint8_t s) {} +#endif + + +/* + * Arduino Sensor library code + * The sensorread() is a generic function called by + * SENSOR basic function and command. The first argument + * is the sensor and the second argument the value. + * sensorread(n, 0) checks if the sensorstatus. + */ +#ifdef ARDUINOSENSORS +#ifdef ARDUINODHT +#include "DHT.h" +DHT dht(DHTPIN, DHTTYPE); +#endif +#ifdef ARDUINOSHT +#include +SHT3x SHT; +#endif +#ifdef ARDUINOMQ2 +#include +MQ2 mq2(MQ2PIN); +#endif +#ifdef ARDUINOLMS6 +#include +/* https://www.arduino.cc/en/Reference/Arduino_LSM6DSOX */ +#endif +#ifdef ARDUINOAHT +#include +Adafruit_AHTX0 aht; +#endif +#ifdef ARDUINOBMP280 +#include +Adafruit_BMP280 bmp; +#endif +#ifdef ARDUINOBME280 +#include +Adafruit_BME280 bme; +/* add your own code here */ +#endif + + +void sensorbegin(){ +#ifdef ARDUINODHT +dht.begin(); +#endif +#ifdef ARDUINOSHT + SHT.Begin(); +#endif +#ifdef ARDUINOMQ2 + mq2.begin(); +#endif +#ifdef ARDUINOAHT + aht.begin(); +#endif +#ifdef ARDUINOBMP280 + bmp.begin(); + bmp.setSampling(Adafruit_BMP280::MODE_NORMAL, /* Operating Mode. */ + Adafruit_BMP280::SAMPLING_X2, /* Temp. oversampling */ + Adafruit_BMP280::SAMPLING_X16, /* Pressure oversampling */ + Adafruit_BMP280::FILTER_X16, /* Filtering. */ + Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */ +#endif +#ifdef ARDUINOBME280 + bme.begin(); +#endif +} + +float sensorread(uint8_t s, uint8_t v) { + switch (s) { + case 0: + return analogRead(A0+v); + case 1: +#ifdef ARDUINODHT + switch (v) { + case 0: + return 1; + case 1: + return dht.readHumidity(); + case 2: + return dht.readTemperature(); + } +#endif + return 0; + case 2: +#ifdef ARDUINOSHT + switch (v) { + case 0: + return 1; + case 1: + SHT.UpdateData(); + return SHT.GetRelHumidity(); + case 2: + SHT.UpdateData(); + return SHT.GetTemperature(); + } +#endif + return 0; + case 3: +#ifdef ARDUINOMQ2 + switch (v) { + case 0: + return 1; + case 1: + (void) mq2.read(false); + return mq2.readLPG();; + case 2: + (void) mq2.read(false); + return mq2.readCO(); + case 3: + (void) mq2.read(false); + return mq2.readSmoke(); + } +#endif + return 0; + case 4: +#ifdef ARDUINOAHT + sensors_event_t humidity, temp; + switch (v) { + case 0: + return 1; + case 1: + aht.getEvent(&humidity, &temp); + return temp.temperature; + case 2: + aht.getEvent(&humidity, &temp); + return humidity.relative_humidity; + } +#endif + return 0; + case 5: +#ifdef ARDUINOBMP280 + switch (v) { + case 0: + return 1; + case 1: + return bmp.readTemperature(); + case 2: + return bmp.readPressure() / 100.0; + case 3: + return bmp.readAltitude(1013.25); + } +#endif + return 0; + case 6: +#ifdef ARDUINOBME280 + switch (v) { + case 0: + return 1; + case 1: + return bme.readTemperature(); + case 2: + return bme.readPressure() / 100.0; + case 3: + return bme.readAltitude(1013.25); + case 4: + return bme.readHumidity(); + } +#endif +/* add your own sensor code here */ + return 0; + default: + return 0; + } +} + +#else +void sensorbegin() {} +float sensorread(uint8_t s, uint8_t v) {return 0;}; +#endif + +/* + * event handling wrappers, to keep Arduino specifics out of BASIC + */ + +#ifdef ARDUINOINTERRUPTS +uint8_t pintointerrupt(uint8_t pin) { return digitalPinToInterrupt(pin); } +void attachinterrupt(uint8_t interrupt, void (*f)(), uint8_t mode) { attachInterrupt(interrupt, f, (PinStatus) mode); }; +void detachinterrupt(uint8_t pin) { detachInterrupt(digitalPinToInterrupt(pin)); }; +#else +uint8_t pintointerrupt(uint8_t pin) { return 0; } +void attachinterrupt(uint8_t interrupt, void (*f)(), uint8_t mode) { }; +void detachinterrupt(uint8_t pin) { }; +#endif + +/* + * Experimental code to drive SPI SRAM + * + * Currently only the 23LCV512 is implemented, assuming a + * 64kB SRAM + * The code below is taken in part from the SRAMsimple library + * + * two buffers are implemented: + * - a ro buffer used by memread, this buffer is mainly reading the token + * stream at runtime. + * - a rw buffer used by memread2 and memwrite2, this buffer is mainly accessing + * the heap at runtime. In interactive mode this is also the interface to read + * and write program code to memory + * + */ + +#ifdef ARDUINOSPIRAM + +/* + * we use the standard slave select pin as default + * RAMPIN + */ +#ifndef RAMPIN +#define RAMPIN SS +#endif + +#define SPIRAMWRMR 1 +#define SPIRAMRDMR 5 +#define SPIRAMREAD 3 +#define SPIRAMWRITE 2 +#define SPIRAMRSTIO 0xFF +#define SPIRAMSEQ 0x40 +#define SPIRAMBYTE 0x00 + +/* the RAM begin method sets the RAM to sequential mode */ +uint16_t spirambegin() { + pinMode(RAMPIN, OUTPUT); + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMRSTIO); + SPI.transfer(SPIRAMWRMR); + //SPI.transfer(SPIRAMBYTE); + SPI.transfer(SPIRAMSEQ); + digitalWrite(RAMPIN, HIGH); + return 65535; +} + +/* the simple unbuffered byte read, with a cast to signed 8 bit integer */ +int8_t spiramrawread(uint16_t a) { + uint8_t c; + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMREAD); + SPI.transfer((uint8_t)(a >> 8)); + SPI.transfer((uint8_t)a); + c = SPI.transfer(0x00); + digitalWrite(RAMPIN, HIGH); + return c; +} + +/* one read only buffer for access from the token stream + memread calls this */ +uint16_t spiram_robufferaddr = 0; +uint8_t spiram_robuffervalid=0; +const uint8_t spiram_robuffersize = 32; +int8_t spiram_robuffer[spiram_robuffersize]; + +/* one rw buffer for access to the heap and all the program editing + memread2 and memwrite2 call this*/ +uint16_t spiram_rwbufferaddr = 0; +uint8_t spiram_rwbuffervalid=0; +const uint8_t spiram_rwbuffersize = 32; /* also change the addressmask if you want to play here */ +int8_t spiram_rwbuffer[spiram_rwbuffersize]; +uint8_t spiram_rwbufferclean = 1; + +const uint16_t spiram_addrmask=0xffe0; +/* const address_t spiram_addrmask=0xffd0; // 64 byte frame */ + +/* the elementary buffer access functions used almost everywhere */ + +void spiram_bufferread(uint16_t a, int8_t* b, uint16_t l) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMREAD); + SPI.transfer((uint8_t)(a >> 8)); + SPI.transfer((uint8_t)a); + SPI.transfer(b, l); + digitalWrite(RAMPIN, HIGH); +} + +void spiram_bufferwrite(uint16_t a, int8_t* b, uint16_t l) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMWRITE); + SPI.transfer((uint8_t)(a >> 8)); + SPI.transfer((uint8_t)a); + SPI.transfer(b, l); + digitalWrite(RAMPIN, HIGH); +} + +int8_t spiram_robufferread(uint16_t a) { +/* we address a byte known to the rw buffer, then get it from there */ + if (spiram_rwbuffervalid && ((a & spiram_addrmask) == spiram_rwbufferaddr)) { + return spiram_rwbuffer[a-spiram_rwbufferaddr]; + } + +/* page fault, we dont have the byte in the ro buffer, so read from the chip*/ + if (!spiram_robuffervalid || a >= spiram_robufferaddr + spiram_robuffersize || a < spiram_robufferaddr ) { + spiram_bufferread(a, spiram_robuffer, spiram_robuffersize); + spiram_robufferaddr=a; + spiram_robuffervalid=1; + } + return spiram_robuffer[a-spiram_robufferaddr]; +} + +/* flush the buffer */ +void spiram_rwbufferflush() { + if (!spiram_rwbufferclean) { + spiram_bufferwrite(spiram_rwbufferaddr, spiram_rwbuffer, spiram_rwbuffersize); + spiram_rwbufferclean=1; + } +} + +int8_t spiram_rwbufferread(uint16_t a) { +/* page fault, do read, ignore the ro buffer buffer */ + uint16_t p=a & spiram_addrmask; + if (!spiram_rwbuffervalid || (p != spiram_rwbufferaddr)) { +/* flush the buffer if needed */ + spiram_rwbufferflush(); +/* and reload it */ + spiram_bufferread(p, spiram_rwbuffer, spiram_rwbuffersize); + spiram_rwbufferaddr=p; /* we only handle full pages here */ + spiram_rwbuffervalid=1; + } + return spiram_rwbuffer[a-spiram_rwbufferaddr]; +} + +/* the buffered file write */ +void spiram_rwbufferwrite(uint16_t a, int8_t c) { + uint16_t p=a&spiram_addrmask; +/* correct the two buffers if needed */ + if (spiram_robuffervalid && a >= spiram_robufferaddr && a < spiram_robufferaddr + spiram_robuffersize) { + spiram_robuffer[a-spiram_robufferaddr]=c; + } +/* if we have the frame, write it, mark the buffer dirty and return */ + if (spiram_rwbuffervalid && p == spiram_rwbufferaddr) { + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; + spiram_rwbufferclean=0; + return; + } +/* if we end up here the write was impossible because we dont have the frame, so flush and then get it */ + spiram_rwbufferflush(); + (void) spiram_rwbufferread(a); + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; + spiram_rwbufferclean=0; +} + +/* the simple unbuffered byte write, with a cast to signed char */ +void spiramrawwrite(uint16_t a, int8_t c) { + digitalWrite(RAMPIN, LOW); + SPI.transfer(SPIRAMWRITE); + SPI.transfer((uint8_t)(a >> 8)); + SPI.transfer((uint8_t)a); + SPI.transfer((uint8_t) c); + digitalWrite(RAMPIN, HIGH); +/* also refresh the ro buffer if in the frame */ + if (a >= spiram_robufferaddr && a < spiram_robufferaddr + spiram_robuffersize && spiram_robufferaddr > 0) + spiram_robuffer[a-spiram_robufferaddr]=c; +/* and the rw buffer if needed) */ + if (a >= spiram_rwbufferaddr && a < spiram_rwbufferaddr + spiram_rwbuffersize && spiram_rwbufferaddr > 0) + spiram_rwbuffer[a-spiram_rwbufferaddr]=c; +} +#endif + +#if defined(USEMEMINTERFACE) +/* + * to handle strings in situations with a memory interface two more buffers are + * needed they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set + * + * default is 128, on an MEGA 512 is possible + */ +#ifdef ARDUINO_AVR_MEGA2560 +#define SPIRAMSBSIZE 512 +#else +#define SPIRAMSBSIZE 128 +#endif + +/* the string buffers of the memory interface */ +char spistrbuf1[SPIRAMSBSIZE]; +char spistrbuf2[SPIRAMSBSIZE]; +#endif diff --git a/data/Basic2/IoTBasic/runtime.h b/data/Basic2/IoTBasic/runtime.h new file mode 100644 index 0000000000000000000000000000000000000000..87419c844db8f88793fca0b8bf329553b5380d6f --- /dev/null +++ b/data/Basic2/IoTBasic/runtime.h @@ -0,0 +1,1205 @@ +/* + * Stefan's basic interpreter. + * + * Prototypes for the runtime environment of the BASIC interpreter. + * + * Needs to be included by runtime.c or runtime.cpp and basic.c as + * it describes the interface between the BASIC interpreter and the + * runtime environment. + * + * Most configurable parameters are in hardware.h. + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + */ + +#if !defined(__RUNTIMEH__) +#define __RUNTIMEH__ + +/* + * The system type identifiers + * + * SYSTYPE_UNKNOWN: unknown system, typically an unknown Arduino + * SYSTYPE_AVR: an AVR based Arduino, like the UNO, NANO, MEGA, PRO + * SYSTYPE_ESP8266: an ESP8266 based Arduino, like the Wemos D1, very common and generic + * SYSTYPE_ESP32: an ESP32 based Arduino, like the Wemos Lolin32, very common and generic + * SYSTYPE_RP2040: a Raspberry PI Pico, the first RP2040 based Arduino + * SYSTYPE_SAM: a SAM based Arduino, like the DUE + * SYSTYPE_XMC: an XMC based Arduino, like the Infineon XMC1100 + * SYSTYPE_SMT32: an STM32 based Arduino, like the Blue Pill + * SYSTYPE_NRENESA: a Renesas based Arduino, like the R4 Wifi and Minimal + * SYSTYPE_GIGA: Arduino GIGA board + * SYSTYPE_POSIX: a POSIX system, like Linux, MacOS + * SYSTYPE_MSDOS: a DOS system, like FreeDOS + * SYSTYPE_MINGW: a Windows system with MinGW + * SYSTYPE_RASPPI: a Raspberry PI system + * + * Number ranges from 0-31 are reserved for Arduino systems + * Number ranges from 32-63 are reserved for POSIX systems + */ + +#define SYSTYPE_UNKNOWN 0 +#define SYSTYPE_AVR 1 +#define SYSTYPE_ESP8266 2 +#define SYSTYPE_ESP32 3 +#define SYSTYPE_RP2040 4 +#define SYSTYPE_SAM 5 +#define SYSTYPE_XMC 6 +#define SYSTYPE_SMT32 7 +#define SYSTYPE_NRENESA 8 +#define SYSTYPE_GIGA 9 +#define SYSTYPE_POSIX 32 +#define SYSTYPE_MSDOS 33 +#define SYSTYPE_MINGW 34 +#define SYSTYPE_RASPPI 35 + +/* + * Input and output channels. + * + * The channels are used to identify the I/O devices in the + * runtime environment. + * + * NULL is the memory channel outputting to a buffer. + * SERIAL is the standard serial channel and the default device. + * DSP is the display channel. + * GRAPH is the additional graphics display channel. + * PRT is the second serial channel used for printing and communication + * with external devices. + * WIRE is the I2C channel. + * RADIO is the RF24 channel. + * MQTT is the MQTT channel. + * FILE is the file system channel. + */ + +#define ONULL 0 +#define OSERIAL 1 +#define ODSP 2 +#define OGRAPH 3 +#define OPRT 4 +#define OWIRE 7 +#define ORADIO 8 +#define OMQTT 9 +#define OFILE 16 + +#define INULL 0 +#define ISERIAL 1 +#define IKEYBOARD 2 +#define IGRAPH 3 +#define ISERIAL1 4 +#define IWIRE 7 +#define IRADIO 8 +#define IMQTT 9 +#define IFILE 16 + +/* + * Global variables of the runtime env, visible to BASIC. + * These are the variables that BASIC provides to the runtime + * environment. They are used all over the BASIC code. Some + * could be encapsulated as function calls calls. + * + * Variables to control the io device channels. + * + * id: the current input device + * od: the current output device + * idd: the default input device in interactive mode + * odd: the default output device in interactive mode + * ioer: the io error + */ +extern int8_t id; +extern int8_t od; +extern int8_t idd; +extern int8_t odd; +extern int8_t ioer; + +/* + * Io control flags. + * + * These flags are used to control the I/O devices. + * kbdrepeat: the keyboard repeat flag for the keypad of a shield + * only used by SET and defined in the keypad code + * blockmode: the blockmode flag, switch a channel to blockmode + * sendcr: the sendcr flag, send a carriage return after a newline if true + */ + +extern uint8_t kbdrepeat; +extern uint8_t blockmode; +extern uint8_t sendcr; + +/* breaks, signaly back that the breakcondition has been detected */ +extern char breakcondition; + +/* counts the outputed characters on streams 0-4, used to emulate a real tab */ +extern uint8_t charcount[5]; /* devices 0-4 support tabing */ + +/* the memory buffer comes from BASIC in this version, it is the input buffer for lines */ +extern char ibuffer[BUFSIZE]; + +/* only needed in POSIX worlds */ +extern uint8_t breaksignal; +extern uint8_t vt52active; + +/* the string buffer the interpreter needs, here to be known by BASIC */ +extern char spistrbuf1[SPIRAMSBSIZE], spistrbuf2[SPIRAMSBSIZE]; + +/* + * the mqtt variable the interpreter needs. + * The following parameters are configured here: + * + * MQTTLENGTH: the length of the mqtt topic, restricted to 32 by default. + * MQTTBLENGTH: the length of the mqtt buffer, 128 by default. + * MQTTNAMELENGTH: the length of the autogenerated mqtt name, 12 by default. + * The mqtt name is used to identify the device in the mqtt network. + * + * mqtt_otopic: the outgoing topic + * mqtt_itopic: the incoming topic + * mqttname: the name of the device in the mqtt network +*/ + +#define MQTTLENGTH 32 +#define MQTTBLENGTH 128 +#define MQTTNAMELENGTH 12 + +extern char mqtt_otopic[MQTTLENGTH]; +extern char mqtt_itopic[MQTTLENGTH]; +extern char mqttname[]; + +/* a byte in the runtime memory containing the system type */ +extern uint8_t bsystype; + +/* + * Console logger functions for the runtime code. Runtime does not know + * anything about output deviced. BASIC is to provide this. This + * is used for debugging and logging. + */ + + extern void consolelog(char*); + extern void consolelognum(int); + +/* + * Statup function. They start the runtime environment. + * + * The functions timeinit(), wiringbegin(), signalon() + * are always empty on Arduino, they are only used in + * the POSIX branch of the code. + * + * timeinit() initializes the time functions. + * wiringbegin() initializes the wiring functions, this is needed on + * Raspberry PI. + * signalon() initializes the signal handling, this is needed on + * Unix like systems and Windows. + * + * BASIC calls these functions once to start the timing, wiring, and + * signal handling. + */ + + void timeinit(); + void wiringbegin(); + void signalon(); + +/* + * Start the SPI bus. Called once on start. Needed on Arduino. + * Empty in the POSIX branch of the code. + * + * Some libraries also try to start the SPI which may lead to on override of + * the PIN settings if the library code is not clean - currenty no conflict known. + * for the libraries used here. Old SD card libraries have problems as they always + * start the SPI bus with default settings and cannot get the settings from the + * SPI.begin() call. In these cases patching of the SD library is needed. + */ + + void spibegin(); + +/* + * Memory allocation functions. + * + * BASIC calls freememorysize() to detemine how much memory can be allocated + * savely on the heap. + * BASIC calls restartsystem() for a complete reboot. + * freeRam() is the actual free heap. Used by freememorysize() and in USR() + * + * Arduino data from https://docs.arduino.cc/learn/programming/memory-guide + */ + + long freememorysize(); /* determine how much actually to allocate */ + void restartsystem(); /* cold start of the MCU */ + long freeRam(); /* try to find the free heap after alocating all globals */ + + /* Test function for real time clock interrupt, currently not useable. + Kept for the future. */ + void rtcsqw(); + void aftersleepinterrupt(void); + void activatesleep(long); + +/* + * The main IO interface. This is how BASIC uses I/O functions. + * + * ioinit(): called at setup to initialize what ever io is needed + * iostat(): check which io devices are available + * iodefaults(): called at setup and while changing to interactive mode + * to set the default io devices + * cheof(): checks for end of file condition on the current input stream + * inch(): gets one character from the current input stream and waits for it + * checkch(): checks for one character on the current input stream, non blocking + * availch(): checks for available characters on the current input stream + * inb(): reads a block of characters from the current input stream + * ins(): reads an entire line from the current input stream, usually by consins() + * outch(): prints one ascii character to the current output stream + * outs(): prints a string of characters to the current output stream + */ + + void ioinit(); + int iostat(int); + void iodefaults(); + int cheof(int); + char inch(); + char checkch(); + uint16_t availch(); + uint16_t inb(char*, int16_t); + uint16_t ins(char*, uint16_t); + void outch(char); + void outs(char*, uint16_t); + +/* + * Timeing functions and background tasks. + * + * byield() must be called after every statement and in all + * waiting loops for I/O. BASIC gives back the unneeded + * CPU cycles by calling byield(). + * + * byield() allows three levels of background tasks. + * + * BASICBGTASK controls if time for background tasks is + * needed, usually set by hardware features + * + * YIELDINTERVAL by default is 32, generating a 32 ms call + * to the network loop function. This is the frequency + * yieldfunction() is called. + * + * LONGYIELDINTERVAL by default is 1000, generating a one second + * call to maintenance functions. This is the frequency + * longyieldfunction() is called. + * + * fastticker() is called in every byield for fast I/O control. + * It is currently only used for the tone emulation. + * + * byield() calls back bloop() in the BASIC interpreter for user + * defined background tasks in an Arduino style loop() function. + * + * bdelay() is a delay function using byield() to allow for + * background tasks to run even when the main code does a delay. + * + * The yield mechanism is needed for ESP8266 yields, network client + * loops and other timing related functions. + * + * yieldschedule() is a function that calls the buildin scheduler + * of some platforms. Currently it is only used in ESP8266. The + * core on this boards does not tolerate that the loop() function + * does not return and crashes the system. This can be prevented + * by calling yieldschedule() often enough. + */ + +#define LONGYIELDINTERVAL 1000 +#define YIELDINTERVAL 32 + +void byield(); +void bdelay(uint32_t); +void fastticker(); +void yieldfunction(); +void longyieldfunction(); +void yieldschedule(); + +/* + * This function measures the fast ticker frequency in microseconds. + * This can be accessed with USR(0, 35) in BASIC. + * Activate this only for test purposes as it slows down the interpreter. + * The value is the shortest timeframe the interpreter can handle. Activated + * if the code is compiled with FASTTICKERPROFILE in hardware.h. + */ + +void fasttickerprofile(); +void clearfasttickerprofile(); +int avgfastticker(); + +/* + * EEPROM handling, these function enable the @E array and + * loading and saving to EEPROM with the "!" mechanism + * + * The EEPROM code can address EEPROMS up to 64 kB. It returns + * signed byte values which corresponds to the definition of + * mem_t in BASIC. This is needed because running from EEPROM + * requires negative token values to be recongized. + * + * ebegin() starts the EEPROM code. Needed for the emulations. + * eflush() writes the EEPROM buffer to the EEPROM. Also this is + * mainly needed in the emulations. + * elength() returns the length of the EEPROM. + * eupdate() updates one EEPROM cell with a value. Does not flush. + * eread() reads one EEPROM cell. + */ + +void ebegin(); +void eflush(); +uint16_t elength(); +void eupdate(uint16_t, int8_t); +int8_t eread(uint16_t); + +/* + * The wrappers of the arduino io functions. + * + * The normalize the differences of some of the Arduino cores + * and raspberyy PI wiring implementations. + * + * Pin numbers are the raw numerical pin values in BASIC. + * The functions are called with this raw pin number and the value. + * + * The functions are: + * aread(pin): read an analog value from a pin + * dread(pin): read a digital value from a pin + * awrite(pin, value): write an analog value to a pin + * dwrite(pin, value): write a digital value to a pin + * pinm(pin, mode): set the mode of a pin, mode is also the raw value from the core + * pulsein(pin, value, timeout): read a pulse from a pin, timeout in microseconds + * void pulseout(unit, pin, duration, val, repetition, interval): generate a pulse on a pin + * unit is the timeunit in microsecind and the duration is the pulse length in this unit. + * This is needed for system were the number_t is only 16 bit. This way longer pulses can + * be generated. + * void playtone(pin, frequency, duration, volume): generate a tone on a pin. + * frequency is the frequency in Hz, duration the duration in ms, volume the volume in percent. + * The tone is generated in the background, the function returns immediately. + * tonetoggle(): toggle the tone generation, needed for the tone emulation, this is called + * by byield() to generate the tone. + */ + +uint16_t aread(uint8_t); +uint8_t dread(uint8_t); +void awrite(uint8_t, uint16_t); +void dwrite(uint8_t, uint8_t); +void pinm(uint8_t, uint8_t); +uint32_t pulsein(uint8_t, uint8_t, uint32_t); +void pulseout(uint16_t, uint8_t, uint16_t, uint16_t, uint16_t, uint16_t); +void playtone(uint8_t, uint16_t, uint16_t, uint8_t); +void tonetoggle(); /* internal function of the tone emulation, called by byield */ + +/* + * The break pin code. This is a pin that can be used to break the execution of the + * BASIC code. This is used as an alternative to the BREAK key in the terminal. + * + * brakepinbegin() initializes the break pin, usually a button connected to a pin. + * getbreakpin() returns the state of the break pin. This is called in statement() to + * check if the break condition is met and then change the interpreter state at the end + * of the statement. + */ + +void breakpinbegin(); +uint8_t getbreakpin(); + +/* + * The hardware port register access functions. + * They can be used to directly access hardware ports. Typically they + * call port macros like PORTB on the Arduino AVR platform. They are very + * fast and can be used to implement fast I/O functions but they are hardware + * dependent and not portable. Currently only AVR UNO and MEGA are implemented. + * + * The calling mechanism in BASIC is the special array @P()for read and write. + */ + +void portwrite(uint8_t, int); +int portread(uint8_t); +void ddrwrite(uint8_t, int); +int ddrread(uint8_t); +int pinread(uint8_t); + +/* + * Prototypes for the interrupt interface. This uses the standard Arduino + * interrupt functions. + */ + +uint8_t pintointerrupt(uint8_t); +void attachinterrupt(uint8_t, void (*f)(), uint8_t); +void detachinterrupt(uint8_t); + +/* some have PinStatus and some don't */ +#if !(defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_MBED_NANO) || \ + defined(ARDUINO_ARCH_RENESAS) || defined(ARDUINO_ARCH_MBED_GIGA) || \ + defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_MEGAAVR)) || defined(ARDUINO_SEEED_XIAO_M0) +typedef int PinStatus; +#endif + +/* + * IO channel 0 - the buffer I/O device. + * + * This is a stream to write to the input buffer from BASIC. + */ + + void bufferbegin(); + uint8_t bufferstat(uint8_t); + void bufferwrite(char); + char bufferread(); + char buffercheckch(); + uint16_t bufferavailable(); + uint16_t bufferins(char*, uint16_t); + void bufferouts(char*, uint16_t); + + +/* + * IO channel 1 - the serial I/O device. + * + * Primary serial code uses the Serial object or Picoserial on + * Arduino. On POSIX systems it uses the standard input/output. + * + * Functions are: + * + * serialbegin(): start the serial port + * serialread(): read a character from the serial port, this is blocking + * for the standard Serial object and non blocking for Picoserial. + * Picoserial is not character oriented. It read one entire line. + * serialstat(s): check the status of the serial port + * serialwrite(c): write a character to the serial port + * serialcheckch(): check if a character is available without blocking + * serialavailable(): check if characters are available + * serialflush(): flush the serial port + * serialins(s, l): read a line from the serial port + */ + + void serialbegin(); + char serialread(); + uint8_t serialstat(uint8_t); /* state information on the serial port */ + void serialwrite(char); /* write to a serial stream */ + char serialcheckch(); /* check on a character, needed for breaking */ + uint16_t serialavailable(); /* avail method, needed for AVAIL() */ + void serialflush(); /* flush serial */ + uint16_t serialins(char*, uint16_t); /* read a line from serial */ + + /* + * reading from the console with inch or the picoserial callback. + * consins() is used for all devices that have a character oriented + * input and creates entire lines from it. + */ + + uint16_t consins(char *, uint16_t); + +/* + * On Arduino Serial is a big object that needs a lot of memory + * on the smaller boards. Picoserial is smaller. It is mainly + * for the small 8bit AVR boards. It uses the UART macros directly. + * + * The picoseria has an own interrupt function. This is used to fill + * the input buffer directly on read. Write is standard like in + * the serial code. Currently picoserial is only implemented for + * AVR UNO, NANO and MEGA. + * + * As echoing is done in the interrupt routine, the code cannot be + * used to receive keystrokes from serial and then display the echo + * directly to a display. To do this the write command in picogetchar + * would have to be replaced with a outch() that then redirects to the + * display driver. This would be very tricky from the timing point of + * view if the display driver code is slow. + * + * The code for the UART control is mostly taken from PicoSerial + * https://github.com/gitcnd/PicoSerial, originally written by Chris Drake + * and published under GPL3.0 just like this code. + * + * Functions for the picoserial code are: + * + * picobegin(baud): start the picoserial port with the baud rate baud + * picowrite(c): write a character to the picoserial port + * picoins(s, l): read a line from the picoserial port + * + */ + + void picobegin(uint32_t); + void picowrite(char); + uint16_t picoins(char *, uint16_t); + + /* + * picogetchar: this is the interrupt service routine. It + * recieves a character and feeds it into a buffer and echos it + * back. The logic here is that the ins() code sets the buffer + * to the input buffer. Only then the routine starts writing to the + * buffer. Once a newline is received, the length information is set + * and picoa is also set to 1 indicating an available string, this stops + * recevieing bytes until the input is processed by the calling code. + */ + void picogetchar(char); + +/* + * IO channel 2 - the display I/O device. + * + * DISPLAY driver code section. The display driver is a generic text and graphics + * output device. Characters are buffered in a display buffer if DISPLAYCANSCROLL + * is defined. These displays can scroll. Scrolling is handled by the display driver. + * It is soft scroll, meaning that the display buffer is scrolled and the display is + * updated. This is slow for large displays. Hardware scrolling is not yet implemented. + * + * The display driver is used by the terminal code to output text and + * graphics. It is needed because there is no standard terminal emulation on Arduino + * systems. It tries to be so generic that everything from small 16*2 LCDs to large + * TFT displays can be used. It contains a VT52 state engine to process control + * sequences. + * + * The hardware dependent part of the display driver has to implement the following + * functions: + * + * Text display functions: + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(): start the display - can be empty + * dspprintchar(c, col, row): print a character at a given position + * logic here that col is the x coordinate and row the y coordinate + * for text and graphics the display coordinate system has its origin + * in the upper left corner + * dspclear(): clear the display + * dspupdate(): update the display, this function is needed for displays that + * have a buffer and can update the display after a series of prints. + * Examples are epaper displays and LCD displays like the Nokia. Writing + * directly to them is slow. + * dspsetcursor(c): switch the cursor on or off, typically used for text + * displays with blinking cursors. + * dspsetfgcolor(c): set the foreground color of the display. + * dspsetbgcolor(c): set the background color of the display. + * c is a VGA color. 4bit VGA colors are used for text displays. + * Graphics is 24 bit color rgb and 8 bit VGA color. + * dspsetreverse(c): set the reverse mode of the display, currently unused. + * dspident(): return the display type, currently unused. + * + * For displays with color, the macro DISPLAYHASCOLOR has to be defined. + * The text display buffer then contains one byte for the character and + * one byte for color and font. + * + * All displays which have these functions can be used with the + * generic display driver below. For minimal functionality only + * dspprintchar() and dspclear() are needed. The screen dimensions + * have to be set in dsp_rows and dsp_columns. + * + * Graphics displays need to implement the functions + * + * rgbcolor(r, g, b): set the color for graphics. The color + * is 24 bit rgb. This function needs to convert the byte + * values to the native color of the display. + * vgacolor(c): set the color for text. The color is a 256 VGA + * color for most displays. This function needs to convert this + * one byte value to the native color of the display. + * These two functions are called by the BASIC COLOR command. + * + * plot(x, y): plot a pixel at x, y + * line(x1, y1, x2, y2): draw a line from x1, y1 to x2, y2 + * rect(x1, y1, x2, y2): draw a rectangle from x1, y1 to x2, y2 + * frect(x1, y1, x2, y2): draw a filled rectangle from x1, y1 to x2, y2 + * circle(x, y, r): draw a circle with center x, y and radius r + * fcircle(x, y, r): draw a filled circle with center x, y and radius r + * + * + * Color is currently either 24 bit or 8 bit 16 VGA color. BW and displays + * only have 0 and 1 as colors. Text is buffered in 4 bit VGA color (see below). + */ + + /* Generate a 4 bit vga color from a given rgb color, to be checked */ +uint8_t rgbtovga(uint8_t, uint8_t, uint8_t); + + +/* Text functions */ +void dspbegin(); +void dspprintchar(char, uint8_t, uint8_t); +void dspclear(); +void dspupdate(); +void dspsetcursor(uint8_t); +void dspsavepen(); +void dsprestorepen(); +void dspsetfgcolor(uint8_t); +void dspsetbgcolor(uint8_t); +void dspsetreverse(uint8_t); +uint8_t dspident(); + +/* Graphics functions */ +void rgbcolor(uint8_t, uint8_t, uint8_t); +void vgacolor(uint8_t); +void plot(int, int); +void line(int, int, int, int); +void rect(int, int, int, int); +void frect(int, int, int, int); +void circle(int, int, int); +void fcircle(int, int, int); + +/* to whom the bell tolls - implement this to you own liking, reacts to ASCII 7 */ +void dspbell(); + +/* + * The public functions of the display driver are the following: + * + * dspouts(s, l): print a string of length l to the display. This + * function is only used for output on certain graphics displays + * These displays expect an entire string to be printed at once. + * Currently this is only implemented for epaper displays. + * dspwrite(c): print a character to the display. This function is + * the main output method for text displays. It prints a character + * at the current cursor position and updates the cursor position. + * For vt52 capable displays, the character goes through the vt52 + * state engine and it processed there. + * dspstat(s): check the status of the display. It returns 1 if the + * display is present and 0 if it is not. + * dspactive(): check if the display is the current output device. + * This function is used to control scrolling in the LIST command. + * dspwaitonscroll(): this function waits for character input if the + * display wants to scroll. This is used in the LIST command to + * wait for a keypress before scrolling the display. It returns the + * character that was pressed. This can also be used to end the output + * of the LIST command. + * dspsetupdatemode(m): set the update mode of the display. Valid update + * modes are 0, 1, 2. 0 is character mode, 1 is line mode, 2 is page mode. + * In character mode, the display is updated after every character. In line + * mode, the display is updated after every line. In page mode, the display + * is updated after an ETX character. This function is only used for displays + * that implement the dspupdate() function. + * dspgetupdatemode(): get the current update mode of the display. + * dspgraphupdate(): update the display after a series of graphics commands. While + * dspsetupdatemode() and dspgetupdatemode() control the update from the text buffer, + * dspgraphupdate() controls the update from the graphics buffer. See for example + * the Nokia display as an example. This function must be called after graphics + * operations to update the display. Typically this is done in the graphics functions + * like line(), rect(), circle(), etc. + * dspsetcursorx(x): set the x coordinate of the cursor + * dspsetcursory(y): set the y coordinate of the cursor + * dspgetcursorx(): get the x coordinate of the cursor + * dspgetcursory(): get the y coordinate of the cursor + */ + +void dspouts(char*, uint16_t); +void dspwrite(char); +uint8_t dspstat(uint8_t); +uint8_t dspactive(); +char dspwaitonscroll(); +void dspsetupdatemode(uint8_t); +uint8_t dspgetupdatemode(); +void dspgraphupdate(); +void dspsetcursorx(uint8_t); +void dspsetcursory(uint8_t); +uint8_t dspgetcursorx(); +uint8_t dspgetcursory(); + +/* + * These are the buffer control functions for the display driver. + * + * Color handling: + * + * Non scrolling displays simply use the pen color of the display + * stored in dspfgcolor() to paint the information on the screen. + * + * For scrolling displays we store the color information of every + * character in the display buffer to enable scrolling with color. + * To limit the storage requirements, this code translates the color + * to a 4 bit VGA color. This means that if BASIC uses 24 bit colors, + * the color may change at scroll + * + * For color displays the buffer is a 16 bit object. The lower 8 bits + * plus the sign are the character, higher 7 the color and font. + * For monochrome just the character is stored in an 8 bit object. + * + * The type dspbuffer_t is defined according to the display type. + * + * The following functions are used to control the display buffer: + * + * dspget(): get a character from the display buffer in form of a linear + * address. This is only used for the special array @D() in BASIC. + * It allows direct access to the display buffer. + * dspgetrc(r, c): get a character from the display buffer at row r and column c. + * This is used for the print function of the vt52 terminal. An entire display + * can be sent to the printer device OPRT + * dspgetc(c): get a character from the current line at column c. Also this is + * used for the print function of the VT52 terminal. This only sents the + * current line to the printer device OPRT. + * For both functions the actual print code is in the VT52 object. + * These three functions are somewhat redundant. + * + * dspsetxy(c, x, y): set a character at x, y in the display buffer and on the + * display. This function is needed for various control sequences of the VT52 + * terminal. + * dspset(c, v): set a character at a linear address in the display buffer. Also u + * used for the @D() array in BASIC. + * + * dspsetscrollmode(m, l): set the scroll mode. m is the mode and l is the number + * of lines to be scrolled. Mode 0 means that dspwaitonscroll() does not + * wait for keyboard input. Mode 1 is wait for input. + * dspbufferclear(): clears the input buffer. + * dspscroll(l, t): do the actual scrolling. l is the number of lines to be scrolled. + * t is the topmost line included in the scroll. O by default. + * dspreversescroll(l): reverse scroll from line l downward. + */ + +#ifdef DISPLAYHASCOLOR +typedef short dspbuffer_t; +#else +typedef char dspbuffer_t; +#endif + +dspbuffer_t dspget(uint16_t); +dspbuffer_t dspgetrc(uint8_t, uint8_t); +dspbuffer_t dspgetc(uint8_t); + +void dspsetxy(dspbuffer_t, uint8_t, uint8_t); +void dspset(uint16_t, dspbuffer_t); +void dspsetscrollmode(uint8_t, uint8_t); + +void dspbufferclear(); +void dspscroll(uint8_t, uint8_t); +void dspreversescroll(uint8_t); + +/* + * A VT52 state engine is implemented and works for buffered and + * unbuffered displays. Only buffered displays have the full VT52 + * feature set including most of the GEMDOS extensions described here: + * https://en.wikipedia.org/wiki/VT52 + * + * The VT52 state engine processes sequences of the form char. + * + * In addition to this, it also gives back certain return values. + * The can be read by vt52read() and vt52avail(). + * vt52push() is used to push characters into the VT52 buffer. + * vt52number() is used to convert a character into the VT52 number format. + * vt52graphcommand() is a VT52 extension to display graphics on the screen. + */ + +char vt52read(); +uint8_t vt52avail(); +void vt52push(char); +uint8_t vt52number(char); +void vt52graphcommand(uint8_t); + +/* + * this is a special part of the vt52 code with this, the terminal + * can control the digital and analog pins. + * + * It is meant for situations where the terminal is controlled by a (powerful) + * device with no or very few I/O pins. It can use the pins of the Arduino through + * the terminal. + * + * This works as long as everything stays within the terminals timescale. + * On a 9600 baud interface, the character processing time is 1ms, everything + * slower than approximately 10ms can be done through the serial line. + */ + +void vt52wiringcommand(uint8_t); + +/* the vt52 state engine */ +void dspvt52(char*); + +/* + * Code for the VGA system of Fabgl. This is a full VT52 terminal. The + * display driver is not used for this. + */ + +void vgabegin(); +int vgastat(uint8_t); +void vgascale(int*, int*); +void vgawrite(char); +void vgaend(); + +/* + * IO channel 2 (input) - the keyboard I/O device. + * + * Keyboard code for either the Fablib Terminal class, + * PS2Keyboard or other keyboards. + * + * PS2Keyboard: please note that you need the patched + * version here as mentioned above. + * + * Keyboards implement kbdbegin() which is called at startup + * and kbdstat() which is called to check if the keyboard is + * available. + * + * Keyboards need to provide the following functions: + * + * kbdavailable(): check if a character is available + * kbdread(): read a character from the keyboard + * kbdcheckch(): check if a character is available without blocking + * kbdins(): read a line from the keyboard + * + * kbdcheckch() is for interrupting running BASIC code with a + * BREAKCHAR character from the keyboard. If this functions is + * not implemented, the BREAKCHAR character is ignored. + * + * kbdins() is usually using consins() to read a line from the + * keyboard repeatedly calling kbdread() until a newline is + * received. A keyboard can also bring its on kbdins() function. + */ + +void kbdbegin(); +uint8_t kbdstat(uint8_t); +uint8_t kbdavailable(); +char kbdread(); +char kbdcheckch(); +uint16_t kbdins(char*, uint16_t); + +/* IO channel 3 - reserved for future use */ + + /* + * IO channel 4 - the second serial I/O device. + * + * This is the (mostly) the Serial1 object + * on Arduino. On POSIX systems this opens a serial port like /dev/ttyUSB1. + * This &4 in BASIC. + * + * Functions are: + * + * prtbegin(): start the serial port + * prtopen(name, baud): open the serial port with the baud rate baud. Only + * neded in POSIX to open the port. + * prtclose(): close the serial port + * prtstat(s): check the status of the serial port + * prtwrite(c): write a character to the serial port + * prtread(): read a character from the serial port + * prtcheckch(): check if a character is available without blocking + * prtavailable(): check if characters are available + * prtset(baud): set the baud rate of the serial port + * prtins(s, l): read a line from the serial port + */ + + void prtbegin(); + char prtopen(char*, uint16_t); + void prtclose(); + uint8_t prtstat(uint8_t); + void prtwrite(char); + char prtread(); + char prtcheckch(); + uint16_t prtavailable(); + void prtset(uint32_t); + uint16_t prtins(char*, uint16_t); + +/* + * IO channel 7 - I2C through the Wire library. + * + * The wire code, direct access to wire communication. + * + * In master mode wire_slaveid is the I2C address bound + * to channel &7 and wire_myid is 0. + * + * In slave mode wire_myid is the devices slave address + * and wire_slaveid is 0. + * + * The maximum number of bytes the Wire library can handle + * is 32. This is given by the Wire library. + * + * Wire is handled through the following functions: + * + * wirebegin(): start the wire system. + * wireslavebegin(id): start the wire system as a slave with the id. + * wirestat(s): check if the wire system is available. + * wireavailable(): check if characters are available in slave mode. + * wireonreceive(h): set the event handler for received data on a slave. + * wireonrequest(): set the event handler for request on a slave. + * wireopen(id, slaveid): open the wire system as a master with id to + * the slave id. + * wireread(): read a character from the wire system. + * wirewrite(c): write a character to the wire system. + * wireins(l, s): read a line l from the wire system max length is s. + * wireouts(l, s): write a line l to the wire system max length is s. + * They are available in BASIC as the WIRE + * command. + */ + + void wirebegin(); + void wireslavebegin(uint8_t); + uint8_t wirestat(uint8_t); + uint16_t wireavailable(); + void wireonreceive(int); + void wireonrequest(); + void wireopen(uint8_t, uint8_t); + char wireread(); + void wirewrite(char c); + uint16_t wireins(char*, uint8_t); + void wireouts(char*, uint8_t); + +/* new byte wire interface for direct access */ +void wirestart(uint8_t, uint8_t); +void wirewritebyte(uint8_t); +uint8_t wirestop(); +int16_t wirereadbyte(); + +/* + * IO channel 8 - the RF24 radio I/O device. + * + * Read from the radio interface, radio is always block + * oriented. This function is called from ins for an entire + * line. + * + * In blockmode the entire message is returned in the + * receiving string while in line mode the length of the + * string is adapted. Blockmode can be used to transfer + * binary data. + * + * The radio code is rather obsolet and not used a lot. + * + * On RF24 we always read from pipe 1 and use pipe 0 for writing, + * the filename is the pipe address, by default the radio + * goes to reading mode after open and is only stopped for + * write. + */ + + uint8_t radiostat(uint8_t); + uint64_t pipeaddr(const char*); + uint16_t radioins(char*, uint8_t); + void radioouts(char *, uint8_t); + uint16_t radioavailable(); + char radioread(); + void iradioopen(const char *); + void oradioopen(const char *); + void radioset(uint8_t); + +/* + * IO channel 9 - the network I/O device. + * + * Only MQTT is implemented at the moment. Other protocols + * will be channel 10-15. + * + * Underlying networks can be the Wifi classes of the ESP, MKR, and + * STM32 cores. The network code is based on the PubSubClient library. + * Ethernet is supported with the standard Ethernet library on Arduino. + * + * On POSIX systems networking is currently not supported. + * + * No encryptionis implemented in MQTT. Only unencrypted servers can be used. + * + * Buffers are defined above in the mqtt section. + * + * MQTTLENGTH: the length of the mqtt topic, restricted to 32 by default. + * MQTTBLENGTH: the length of the mqtt buffer, 128 by default. + * MQTTNAMELENGTH: the length of the autogenerated mqtt name, 12 by default. + * + * wifisettings.h is the generic network definition file all network settings + * are compiled into the code. BASIC cannot change them at runtime. + * + * Low level network functions are: + * + * netbegin(): start the network + * netstop(): stop the network + * netreconnect(): reconnect the network + * netconnected(): check if the network is connected + * + * BASIC uses these function to control the network and reconnect if + * the connection is lost. + */ + + void netbegin(); + void netstop(); + void netreconnect(); + uint8_t netconnected(); + + /* + * The mqtt prototypes used by BASIC are: + * + * mqttbegin(): start the mqtt client + * mqttsetname(): set the name of the mqtt client. The name is autogenerated. + * mqttstat(s): check the status of the mqtt client + * mqttreconnect(): reconnect the mqtt client + * mqttstate(): get the state of the mqtt client (redunant to mqttstat()) + * mqttsubscribe(t): subscribe to a topic + * mqttunsubscribe(): unsubscribe from a topic + * mqttsettopic(t): set the topic of the mqtt client + * mqttouts(s, l): send a string of length l to the mqtt server + * mqttwrite(c): send a character to the mqtt server. + * These two functions work buffered. The write to the MQTT output buffer. Only + * when the buffer is full or a newline is received, the buffer is sent to the + * server. + * mqttread(): read a character from the mqtt input buffer. + * mqttins(s, l): read a line from the mqtt input buffer. + * mqttavailable(): check if characters are available in the mqtt input buffer. + * mqttcheckch(): get the next character from the mqtt input buffer without advancing. + */ + + void mqttbegin(); + void mqttsetname(); + uint8_t mqttstat(uint8_t); + uint8_t mqttreconnect(); + uint8_t mqttstate(); + void mqttsubscribe(const char*); + void mqttunsubscribe(); + void mqttsettopic(const char*); + void mqttouts(const char*, uint16_t); + void mqttwrite(const char); + char mqttread(); + uint16_t mqttins(char*, uint16_t); + uint16_t mqttavailable(); + char mqttcheckch(); + + /* + * The callback function of the pubsub client. This is called when a + * message is received from the mqtt server. + * + * The Arduino type byte is used here because it is used this way in Pubsub. + */ + void mqttcallback(char*, byte*, unsigned int); + +/* + * IO channel 16 - the file system I/O device. + * + * The file system driver - all methods needed to support BASIC fs access. + * + * Different filesystems need different prefixes and fs objects, these + * filesystems use the stream API in the Arduino world. + * + * The functions to access the filesystem are: + * + * fsbegin(): start the filesystem + * fsstat(s): check the status of the filesystem + * mkfilename(s): make a filename from a string + * rmrootfsprefix(s): remove the prefix from a filename + * + * Different filesystems have different prefixes. In BASIC we + * only show a flat file system with no path names and prefixes. + * + * Supported filesystems are: + * + * SPIFF - the internal flash file system of the ESP32 and ESP8266 + * SD - the SD card file system (no formatting) + * EFS - the file system EFS for I2C EEPROMs + * LittleFS - the LittleFS file system on RP2040 + * USB devices on Arduino GIGA boards + * Posix and Windows file systems on POSIX systems + */ + + void fsbegin(); + uint8_t fsstat(uint8_t); + char* mkfilename(const char*); + const char* rmrootfsprefix(const char*); + + /* + * File I/O function on an Arduino: + * + * filewrite(c): write a character to a file + * fileread(): read a character from a file + * fileavailable(): check if a character is available in the file + * ifileopen(s): open a file for input + * ifileclose(): close a file for input + * ofileopen(s, m): open a file for output with mode m + * ofileclose(): close a file for output + * + * The wrapper and BASIC currently only support one file for read + * and one file for write. + */ + + void filewrite(char); + char fileread(); + int fileavailable(); /* is int because some of the fs do this */ + uint8_t ifileopen(const char*); + void ifileclose(); + uint8_t ofileopen(const char*, const char*); + void ofileclose(); + + /* + * Directory handling for the catalog function these methods are + * needed for a walkthtrough of one directory. + * + * The logic is: + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + * + * rootopen(): opens the root directory + * rootnextfile(): gets the next file in the directory + * rootisfile(): checks if the file is a file or something else + * rootfilename(): gets the name of the file + * rootfilesize(): gets the size of the file + * rootfileclose(): closes the root file + */ + + void rootopen(); + uint8_t rootnextfile(); + uint8_t rootisfile(); + const char* rootfilename(); + uint32_t rootfilesize(); + void rootfileclose(); + void rootclose(); + + /* delete a file, needed in the DELETE command of BASIC */ + void removefile(const char*); + + /* + * Formatting for fdisk of the internal filesystems. This + * is not implemented for all filesystems. + */ + void formatdisk(uint8_t); + +/* + * The Real Time clock. The interface here offers the values as number_t + * combining all values. + * + * On Arduino, he code does not use an RTC library any more all the + * RTC support is builtin now for standard I2C clocks. + * + * A clock must activate the macro #define HASCLOCK to make the clock + * available in BASIC. + * + * Four software models are supported in runtime.cpp for Arduino: + * - Built-in clocks of STM32, MKR, and ESP32 are supported by default. + * - I2C clocks can be activated: DS1307, DS3231, and DS3232 + * - A Real Time Clock emulation using millis() + * + * On POSIX the standard time functions are used and mapped to this API. + * + * rtcget(r) accesses the internal registers of the clock. + * r==0 is the seconds, r==1 the minutes, r==2 the hours, r==3 the + * day of week, r==4 the day, r==5 the month, r==6 the year. + * The day of the week feature is not supported by all clocks. + * rtcset(r, v) sets the internal registers of the clock. + * + * On I2C clocks with NVRAM the registers 7-255 are accessed as + * memory cells through these functions. + * + * rtcbegin() is called at startup to initialize the clock, normally + * a dummy function. + * + * rtctimetoutime() converts the clock time to a unix time number. + * rtcutimetotime() converts the unix time number to a clock time. + * Both are private functions of the clock emulation. + * + * Code in these two functions is taken from the German Wikipedia + * article on Unix time. https://de.wikipedia.org/wiki/Unixzeit + */ + +void rtcbegin(); +uint16_t rtcget(uint8_t); +void rtcset(uint8_t, uint16_t); +void rtctimetoutime(); +void rtcutimetotime(); + +/* + * Arduino Sensor library code + * The sensorread() is a generic function called by + * SENSOR basic function and command. The first argument + * is the sensor and the second argument the value. + * sensorread(n, 0) checks if the sensorstatus. + */ +void sensorbegin(); +float sensorread(uint8_t, uint8_t); + +/* + * Experimental code to drive SPI SRAM + * + * Currently only the 23LCV512 is implemented, assuming a 64kB SRAM. + * Part of code is taken in part from the SRAMsimple library. + * + * Two buffers are implemented: + * + * - a ro buffer used by memread, this buffer is mainly reading the token + * stream at runtime. + * - a rw buffer used by memread2 and memwrite2, this buffer is mainly accessing + * the heap at runtime. In interactive mode this is also the interface to read + * and write program code to memory. + * + */ + +/* the RAM begin method sets the RAM to sequential mode */ +uint16_t spirambegin(); +int8_t spiramrawread(uint16_t); +void spiram_bufferread(uint16_t, int8_t*, uint16_t); +void spiram_bufferwrite(uint16_t, int8_t*, uint16_t); +int8_t spiram_robufferread(uint16_t); +void spiram_rwbufferflush(); /* flush the buffer */ +int8_t spiram_rwbufferread(uint16_t); +void spiram_rwbufferwrite(uint16_t, int8_t); /* the buffered file write */ +void spiramrawwrite(uint16_t, int8_t); /* the simple unbuffered byte write, with a cast to signed char */ + +// defined RUNTIMEH +#endif diff --git a/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashAsEEPROM_SAMD.h b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashAsEEPROM_SAMD.h new file mode 100644 index 0000000000000000000000000000000000000000..7980a117241d64f31c71c12415212c3b9253a710 --- /dev/null +++ b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashAsEEPROM_SAMD.h @@ -0,0 +1,49 @@ +/****************************************************************************************************************************************** + FlashAsEEPROM_SAMD.h + For SAMD21/SAMD51 using Flash emulated-EEPROM + + The FlashStorage_SAMD library aims to provide a convenient way to store and retrieve user's data using the non-volatile flash memory + of SAMD21/SAMD51. It now supports writing and reading the whole object, not just byte-and-byte. + + Based on and modified from Cristian Maglie's FlashStorage (https://github.com/cmaglie/FlashStorage) + + Built by Khoi Hoang https://github.com/khoih-prog/FlashStorage_SAMD + Licensed under LGPLv3 license + + Orginally written by Cristian Maglie + + Copyright (c) 2015 Arduino LLC. All right reserved. + Copyright (c) 2020 Khoi Hoang. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License + as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with this library. + If not, see (https://www.gnu.org/licenses/) + + Version: 1.3.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 28/03/2020 Initial coding to add support to SAMD51 besides SAMD21 + 1.1.0 K Hoang 26/01/2021 Add supports to put() and get() for writing and reading the whole object. Fix bug. + 1.2.0 K Hoang 18/08/2021 Optimize code. Add debug option + 1.2.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.3.0 K Hoang 25/01/2022 Fix `multiple-definitions` linker error. Add support to many more boards. + 1.3.1 K Hoang 25/01/2022 Reduce number of library files + 1.3.2 K Hoang 26/01/2022 Make compatible with old libraries and codes + ******************************************************************************************************************************************/ + +// The .hpp contains only definitions, and can be included as many times as necessary, without `Multiple Definitions` Linker Error +// The .h contains implementations, and can be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error + +#pragma once + +#ifndef FlashAsEEPROM_SAMD_h +#define FlashAsEEPROM_SAMD_h + +#include +#include + +#endif //#ifndef FlashAsEEPROM_SAMD_h diff --git a/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashAsEEPROM_SAMD.hpp b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashAsEEPROM_SAMD.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4f1b5402d71f5551729e90b188eabcae9c35d6f7 --- /dev/null +++ b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashAsEEPROM_SAMD.hpp @@ -0,0 +1,48 @@ +/****************************************************************************************************************************************** + FlashAsEEPROM_SAMD.hpp + For SAMD21/SAMD51 using Flash emulated-EEPROM + + The FlashStorage_SAMD library aims to provide a convenient way to store and retrieve user's data using the non-volatile flash memory + of SAMD21/SAMD51. It now supports writing and reading the whole object, not just byte-and-byte. + + Based on and modified from Cristian Maglie's FlashStorage (https://github.com/cmaglie/FlashStorage) + + Built by Khoi Hoang https://github.com/khoih-prog/FlashStorage_SAMD + Licensed under LGPLv3 license + + Orginally written by Cristian Maglie + + Copyright (c) 2015 Arduino LLC. All right reserved. + Copyright (c) 2020 Khoi Hoang. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License + as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with this library. + If not, see (https://www.gnu.org/licenses/) + + Version: 1.3.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 28/03/2020 Initial coding to add support to SAMD51 besides SAMD21 + 1.1.0 K Hoang 26/01/2021 Add supports to put() and get() for writing and reading the whole object. Fix bug. + 1.2.0 K Hoang 18/08/2021 Optimize code. Add debug option + 1.2.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.3.0 K Hoang 25/01/2022 Fix `multiple-definitions` linker error. Add support to many more boards. + 1.3.1 K Hoang 25/01/2022 Reduce number of library files + 1.3.2 K Hoang 26/01/2022 Make compatible with old libraries and codes + ******************************************************************************************************************************************/ + +// The .hpp contains only definitions, and can be included as many times as necessary, without `Multiple Definitions` Linker Error +// The .h contains implementations, and can be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error + +#pragma once + +#ifndef FlashAsEEPROM_SAMD_hpp +#define FlashAsEEPROM_SAMD_hpp + +#include + +#endif //#ifndef FlashAsEEPROM_SAMD_hpp diff --git a/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD.h b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD.h new file mode 100644 index 0000000000000000000000000000000000000000..4f0915388dd686095570992bfb291b9f0b3579de --- /dev/null +++ b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD.h @@ -0,0 +1,49 @@ +/****************************************************************************************************************************************** + FlashStorage_SAMD.h + For SAMD21/SAMD51 using Flash emulated-EEPROM + + The FlashStorage_SAMD library aims to provide a convenient way to store and retrieve user's data using the non-volatile flash memory + of SAMD21/SAMD51. It now supports writing and reading the whole object, not just byte-and-byte. + + Based on and modified from Cristian Maglie's FlashStorage (https://github.com/cmaglie/FlashStorage) + + Built by Khoi Hoang https://github.com/khoih-prog/FlashStorage_SAMD + Licensed under LGPLv3 license + + Orginally written by Cristian Maglie + + Copyright (c) 2015 Arduino LLC. All right reserved. + Copyright (c) 2020 Khoi Hoang. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License + as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with this library. + If not, see (https://www.gnu.org/licenses/) + + Version: 1.3.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 28/03/2020 Initial coding to add support to SAMD51 besides SAMD21 + 1.1.0 K Hoang 26/01/2021 Add supports to put() and get() for writing and reading the whole object. Fix bug. + 1.2.0 K Hoang 18/08/2021 Optimize code. Add debug option + 1.2.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.3.0 K Hoang 25/01/2022 Fix `multiple-definitions` linker error. Add support to many more boards. + 1.3.1 K Hoang 25/01/2022 Reduce number of library files + 1.3.2 K Hoang 26/01/2022 Make compatible with old libraries and codes + ******************************************************************************************************************************************/ + +// The .hpp contains only definitions, and can be included as many times as necessary, without `Multiple Definitions` Linker Error +// The .h contains implementations, and can be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error + +#pragma once + +#ifndef FlashStorage_SAMD_h +#define FlashStorage_SAMD_h + +#include +#include + +#endif //#ifndef FlashStorage_SAMD_h diff --git a/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD.hpp b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD.hpp new file mode 100644 index 0000000000000000000000000000000000000000..fec9095975691040d70273dda2690b1588ac47d2 --- /dev/null +++ b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD.hpp @@ -0,0 +1,435 @@ +/****************************************************************************************************************************************** + FlashStorage_SAMD.hpp + For SAMD21/SAMD51 using Flash emulated-EEPROM + + The FlashStorage_SAMD library aims to provide a convenient way to store and retrieve user's data using the non-volatile flash memory + of SAMD21/SAMD51. It now supports writing and reading the whole object, not just byte-and-byte. + + Based on and modified from Cristian Maglie's FlashStorage (https://github.com/cmaglie/FlashStorage) + + Built by Khoi Hoang https://github.com/khoih-prog/FlashStorage_SAMD + Licensed under LGPLv3 license + + Orginally written by Cristian Maglie + + Copyright (c) 2015 Arduino LLC. All right reserved. + Copyright (c) 2020 Khoi Hoang. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License + as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with this library. + If not, see (https://www.gnu.org/licenses/) + + Version: 1.3.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 28/03/2020 Initial coding to add support to SAMD51 besides SAMD21 + 1.1.0 K Hoang 26/01/2021 Add supports to put() and get() for writing and reading the whole object. Fix bug. + 1.2.0 K Hoang 18/08/2021 Optimize code. Add debug option + 1.2.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.3.0 K Hoang 25/01/2022 Fix `multiple-definitions` linker error. Add support to many more boards. + 1.3.1 K Hoang 25/01/2022 Reduce number of library files + 1.3.2 K Hoang 26/01/2022 Make compatible with old libraries and codes + ******************************************************************************************************************************************/ + +// The .hpp contains only definitions, and can be included as many times as necessary, without `Multiple Definitions` Linker Error +// The .h contains implementations, and can be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error + +#pragma once + +#ifndef FlashStorage_SAMD_hpp +#define FlashStorage_SAMD_hpp + +#if !( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \ + || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) \ + || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD51__) || defined(__SAMD51J20A__) \ + || defined(__SAMD51J19A__) || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) \ + || defined(__SAMD21E15A__) || defined(__SAMD21E16A__) || defined(__SAMD21E17A__) || defined(__SAMD21E18A__) \ + || defined(__SAMD21G15A__) || defined(__SAMD21G16A__) || defined(__SAMD21G17A__) || defined(__SAMD21G18A__) \ + || defined(__SAMD21J15A__) || defined(__SAMD21J16A__) || defined(__SAMD21J17A__) || defined(__SAMD21J18A__) ) + #error This code is designed to run on SAMD21/SAMD51 platform! Please check your Tools->Board setting. +#endif + +#ifndef FLASH_STORAGE_SAMD_VERSION + #define FLASH_STORAGE_SAMD_VERSION "FlashStorage_SAMD v1.3.2" + + #define FLASH_STORAGE_SAMD_VERSION_MAJOR 1 + #define FLASH_STORAGE_SAMD_VERSION_MINOR 3 + #define FLASH_STORAGE_SAMD_VERSION_PATCH 2 + +#define FLASH_STORAGE_SAMD_VERSION_INT 1003002 + +#endif + +#include + +#if defined(SAMD_INDUSTRUINO_D21G) + #define BOARD_NAME "SAMD21 INDUSTRUINO_D21G" +#elif defined(ARDUINO_SAML_INDUSTRUINO_420MAKER) + #define BOARD_NAME "SAML21 INDUSTRUINO_420MAKER" +#endif + +#if !defined(Serial) + #define Serial SERIAL_PORT_MONITOR +#endif + +///////////////////////////////////////////////////// + +#ifndef FLASH_DEBUG + #define FLASH_DEBUG 0 +#endif + +#if !defined(FLASH_DEBUG_OUTPUT) + #define FLASH_DEBUG_OUTPUT Serial +#endif + +const char FLASH_MARK[] = "[FLASH] "; +const char FLASH_SP[] = " "; + +#define FLASH_PRINT FLASH_DEBUG_OUTPUT.print +#define FLASH_PRINTLN FLASH_DEBUG_OUTPUT.println +#define FLASH_FLUSH FLASH_DEBUG_OUTPUT.flush + +#define FLASH_PRINT_MARK FLASH_PRINT(FLASH_MARK) +#define FLASH_PRINT_SP FLASH_PRINT(FLASH_SP) + +///////////////////////////////////////////////////// + +#define FLASH_LOGERROR(x) if(FLASH_DEBUG>0) { FLASH_PRINT("[FLASH] "); FLASH_PRINTLN(x); } +#define FLASH_LOGERROR0(x) if(FLASH_DEBUG>0) { FLASH_PRINT(x); } +#define FLASH_HEXLOGERROR0(x) if(FLASH_DEBUG>0) { FLASH_PRINTLN(x, HEX); } +#define FLASH_LOGERROR1(x,y) if(FLASH_DEBUG>0) { FLASH_PRINT("[FLASH] "); FLASH_PRINT(x); FLASH_PRINT_SP; FLASH_PRINTLN(y); } +#define FLASH_LOGERROR2(x,y,z) if(FLASH_DEBUG>0) { FLASH_PRINT("[FLASH] "); FLASH_PRINT(x); FLASH_PRINT_SP; FLASH_PRINT(y); FLASH_PRINT_SP; FLASH_PRINTLN(z); } +#define FLASH_LOGERROR3(x,y,z,w) if(FLASH_DEBUG>0) { FLASH_PRINT("[FLASH] "); FLASH_PRINT(x); FLASH_PRINT_SP; FLASH_PRINT(y); FLASH_PRINT_SP; FLASH_PRINT(z); FLASH_PRINT_SP; FLASH_PRINTLN(w); } + +///////////////////////////////////////////////////// + +#define FLASH_LOGDEBUG(x) if(FLASH_DEBUG>1) { FLASH_PRINT("[FLASH] "); FLASH_PRINTLN(x); } +#define FLASH_LOGDEBUG0(x) if(FLASH_DEBUG>1) { FLASH_PRINT(x); } +#define FLASH_HEXLOGDEBUG0(x) if(FLASH_DEBUG>1) { FLASH_PRINTLN(x, HEX); } +#define FLASH_LOGDEBUG1(x,y) if(FLASH_DEBUG>1) { FLASH_PRINT("[FLASH] "); FLASH_PRINT(x); FLASH_PRINT_SP; FLASH_PRINTLN(y); } +#define FLASH_LOGDEBUG2(x,y,z) if(FLASH_DEBUG>1) { FLASH_PRINT("[FLASH] "); FLASH_PRINT(x); FLASH_PRINT_SP; FLASH_PRINT(y); FLASH_PRINT_SP; FLASH_PRINTLN(z); } +#define FLASH_LOGDEBUG3(x,y,z,w) if(FLASH_DEBUG>1) { FLASH_PRINT("[FLASH] "); FLASH_PRINT(x); FLASH_PRINT_SP; FLASH_PRINT(y); FLASH_PRINT_SP; FLASH_PRINT(z); FLASH_PRINT_SP; FLASH_PRINTLN(w); } + + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Concatenate after macro expansion +#define PPCAT_NX(A, B) A ## B +#define PPCAT(A, B) PPCAT_NX(A, B) + +#if defined(__SAMD51__) + + #define Flash(name, size) \ + __attribute__((__aligned__(8192))) \ + static const uint8_t PPCAT(_data,name)[(size+8191)/8192*8192] = { }; \ + FlashClass name(PPCAT(_data,name), size); + + #define staticFlash(name, size) \ + __attribute__((__aligned__(8192))) \ + static const uint8_t PPCAT(_data,name)[(size+8191)/8192*8192] = { }; \ + static FlashClass name(PPCAT(_data,name), size); + + #define FlashStorage(name, T) \ + __attribute__((__aligned__(8192))) \ + static const uint8_t PPCAT(_data,name)[(sizeof(T)+8191)/8192*8192] = { }; \ + FlashStorageClass name(PPCAT(_data,name)); + + #define staticFlashStorage(name, T) \ + __attribute__((__aligned__(8192))) \ + static const uint8_t PPCAT(_data,name)[(sizeof(T)+8191)/8192*8192] = { }; \ + static FlashStorageClass name(PPCAT(_data,name)); + +#else + + #define Flash(name, size) \ + __attribute__((__aligned__(256))) \ + static const uint8_t PPCAT(_data,name)[(size+255)/256*256] = { }; \ + FlashClass name(PPCAT(_data,name), size); + + #define staticFlash(name, size) \ + __attribute__((__aligned__(256))) \ + static const uint8_t PPCAT(_data,name)[(size+255)/256*256] = { }; \ + static FlashClass name(PPCAT(_data,name), size); + + #define FlashStorage(name, T) \ + __attribute__((__aligned__(256))) \ + static const uint8_t PPCAT(_data,name)[(sizeof(T)+255)/256*256] = { }; \ + FlashStorageClass name(PPCAT(_data,name)); + + #define staticFlashStorage(name, T) \ + __attribute__((__aligned__(256))) \ + static const uint8_t PPCAT(_data,name)[(sizeof(T)+255)/256*256] = { }; \ + static FlashStorageClass name(PPCAT(_data,name)); + +#endif + +////////////////////////////////////////////////////////////////////////////////////////////////////////// + +class FlashClass +{ + public: + FlashClass(const void *flash_addr = NULL, uint32_t size = 0); + + void write(const void *data) { write(flash_address, data); } + void erase() { erase(flash_address, flash_size); } + void read(void *data) { read(flash_address, data); } + + void write(const volatile void *flash_ptr, const void *data); + void erase(const volatile void *flash_ptr, uint32_t size); + void read(const volatile void *flash_ptr, void *data); + + private: + void erase(const volatile void *flash_ptr); + + const uint32_t PAGE_SIZE, PAGES, MAX_FLASH, ROW_SIZE; + const volatile void *flash_address; + const uint32_t flash_size; +}; + +///////////////////////////////////////////////////// + +template +class FlashStorageClass +{ + public: + FlashStorageClass(const void *flash_addr) : flash(flash_addr, sizeof(T)) { }; + + // Write data into flash memory. + // Compiler is able to optimize parameter copy. + inline void write(T &data) { flash.erase(); flash.write(&data); } + + // Overloaded version of read. + // Compiler is able to optimize copy-on-return. + inline void read(T &data) { flash.read(&data); } + + private: + FlashClass flash; +}; + +////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +#ifndef EEPROM_EMULATION_SIZE + #define EEPROM_EMULATION_SIZE 1024 +#endif + +const uint32_t SAMD_EEPROM_EMULATION_SIGNATURE = 0xFEEDDEED; + +typedef struct +{ + byte data[EEPROM_EMULATION_SIZE]; + bool valid; + uint32_t signature; +} EEPROM_EMULATION; + +///////////////////////////////////////////////////// + + +#if defined(__SAMD51__) + staticFlashStorage(eeprom_storage, EEPROM_EMULATION); +#else + staticFlashStorage(eeprom_storage, EEPROM_EMULATION); +#endif + + +class EEPROMClass +{ + public: + + EEPROMClass() : _initialized(false), _dirty(false), _commitASAP(true) + { + // Empty + } + +///////////////////////////////////////////////////// + /** + * Read an eeprom cell + * @param index + * @return value + */ + //uint8_t read(int address); + + uint8_t read(int address) + { + if (!_initialized) + init(); + + return _eeprom.data[address]; + } + +///////////////////////////////////////////////////// + + /** + * Update a eeprom cell + * @param index + * @param value + */ + + void update(int address, uint8_t value) + { + if (!_initialized) + init(); + + if (_eeprom.data[address] != value) + { + _dirty = true; + _eeprom.data[address] = value; + } + } + +///////////////////////////////////////////////////// + + /** + * Write value to an eeprom cell + * @param index + * @param value + */ + void write(int address, uint8_t value) + { + update(address, value); + } + +///////////////////////////////////////////////////// + + + /** + * Read from eeprom cells to an object + * @param index + * @param value + */ + //Functionality to 'get' data to objects to from EEPROM. + template< typename T > T& get( int idx, T &t ) + { + // Copy the data from the flash to the buffer if not yet + if (!_initialized) + init(); + + uint16_t offset = idx; + uint8_t* _pointer = (uint8_t *) &t; + + for ( uint16_t count = sizeof(T) ; count ; --count, ++offset ) + { + *_pointer++ = _eeprom.data[offset]; + } + + return t; + } + +///////////////////////////////////////////////////// + + /** + * Read from eeprom cells to an object + * @param index + * @param value + */ + //Functionality to 'get' data to objects to from EEPROM. + template< typename T > const T& put( int idx, const T &t ) + { + // Copy the data from the flash to the buffer if not yet + if (!_initialized) + init(); + + uint16_t offset = idx; + + const uint8_t* _pointer = (const uint8_t *) &t; + + for ( uint16_t count = sizeof(T) ; count ; --count, ++offset ) + { + _eeprom.data[offset] = *_pointer++; + } + + if (_commitASAP) + { + _dirty = false; + _eeprom.valid = true; + // Save the data from the buffer + eeprom_storage.write(_eeprom); + } + else + { + // Delay saving the data from the buffer to the flash. Just flag and wait for commit() later + _dirty = true; + } + + return t; + } + +///////////////////////////////////////////////////// + + /** + * Check whether the eeprom data is valid + * @return true, if eeprom data is valid (has been written at least once), false if not + */ + bool isValid() + { + if (!_initialized) + init(); + + return _eeprom.valid; + } + +///////////////////////////////////////////////////// + + /** + * Write previously made eeprom changes to the underlying flash storage + * Use this with care: Each and every commit will harm the flash and reduce it's lifetime (like with every flash memory) + */ + void commit() + { + if (!_initialized) + init(); + + if (_dirty) + { + _dirty = false; + _eeprom.valid = true; + // Save the data from the buffer + eeprom_storage.write(_eeprom); + } + } + +///////////////////////////////////////////////////// + + uint16_t length() { return EEPROM_EMULATION_SIZE; } + + void setCommitASAP(bool value = true) { _commitASAP = value; } + bool getCommitASAP() { return _commitASAP; } + +///////////////////////////////////////////////////// + + private: + + void init() + { + // Use reference + eeprom_storage.read(_eeprom); + + if (_eeprom.signature != SAMD_EEPROM_EMULATION_SIGNATURE) + { + memset(_eeprom.data, 0xFF, EEPROM_EMULATION_SIZE); + _eeprom.signature = SAMD_EEPROM_EMULATION_SIGNATURE; + } + + _eeprom.valid = true; + + _initialized = true; + } + + bool _initialized; + EEPROM_EMULATION _eeprom; + bool _dirty; + bool _commitASAP; +}; + +///////////////////////////////////////////////////// + +static EEPROMClass EEPROM; + +///////////////////////////////////////////////////// + +#endif //#ifndef FlashStorage_SAMD_hpp diff --git a/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD21.h b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD21.h new file mode 100644 index 0000000000000000000000000000000000000000..001394eb8a98d65b4193af4797eab64ced6863be --- /dev/null +++ b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD21.h @@ -0,0 +1,160 @@ +/****************************************************************************************************************************************** + FlashStorage_SAMD21.h + For SAMD21/SAMD51 using Flash emulated-EEPROM + + The FlashStorage_SAMD library aims to provide a convenient way to store and retrieve user's data using the non-volatile flash memory + of SAMD21/SAMD51. It now supports writing and reading the whole object, not just byte-and-byte. + + Based on and modified from Cristian Maglie's FlashStorage (https://github.com/cmaglie/FlashStorage) + + Built by Khoi Hoang https://github.com/khoih-prog/FlashStorage_SAMD + Licensed under LGPLv3 license + + Orginally written by Cristian Maglie + + Copyright (c) 2015 Arduino LLC. All right reserved. + Copyright (c) 2020 Khoi Hoang. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License + as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with this library. + If not, see (https://www.gnu.org/licenses/) + + Version: 1.3.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 28/03/2020 Initial coding to add support to SAMD51 besides SAMD21 + 1.1.0 K Hoang 26/01/2021 Add supports to put() and get() for writing and reading the whole object. Fix bug. + 1.2.0 K Hoang 18/08/2021 Optimize code. Add debug option + 1.2.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.3.0 K Hoang 25/01/2022 Fix `multiple-definitions` linker error. Add support to many more boards. + 1.3.1 K Hoang 25/01/2022 Reduce number of library files + 1.3.2 K Hoang 26/01/2022 Make compatible with old libraries and codes + ******************************************************************************************************************************************/ + +// The .hpp contains only definitions, and can be included as many times as necessary, without `Multiple Definitions` Linker Error +// The .h contains implementations, and can be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error + +#pragma once + +#ifndef FlashStorage_SAMD21_h +#define FlashStorage_SAMD21_h + +#ifndef BOARD_NAME + #define BOARD_NAME "Unknown SAMD21 board" +#endif + +static const uint32_t pageSizes[] = { 8, 16, 32, 64, 128, 256, 512, 1024 }; + +///////////////////////////////////////////////////// + +FlashClass::FlashClass(const void *flash_addr, uint32_t size) : + PAGE_SIZE(pageSizes[NVMCTRL->PARAM.bit.PSZ]), + PAGES(NVMCTRL->PARAM.bit.NVMP), + MAX_FLASH(PAGE_SIZE * PAGES), + ROW_SIZE(PAGE_SIZE * 4), + flash_address((volatile void *)flash_addr), + flash_size(size) +{ +} + +///////////////////////////////////////////////////// + +static inline uint32_t read_unaligned_uint32(const void *data) +{ + union + { + uint32_t u32; + uint8_t u8[4]; + } res; + + const uint8_t *d = (const uint8_t *)data; + + res.u8[0] = d[0]; + res.u8[1] = d[1]; + res.u8[2] = d[2]; + res.u8[3] = d[3]; + return res.u32; +} + +///////////////////////////////////////////////////// + +void FlashClass::write(const volatile void *flash_ptr, const void *data) +{ + // Calculate data boundaries + uint32_t size = (flash_size + 3) / 4; + + volatile uint32_t *dst_addr = (volatile uint32_t *)flash_ptr; + const uint8_t *src_addr = (uint8_t *)data; + + // Disable automatic page write + NVMCTRL->CTRLB.bit.MANW = 1; + + // Do writes in pages + while (size) + { + // Execute "PBC" Page Buffer Clear + NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC; + while (NVMCTRL->INTFLAG.bit.READY == 0) { } + + // Fill page buffer + uint32_t i; + + for (i=0; i<(PAGE_SIZE/4) && size; i++) + { + *dst_addr = read_unaligned_uint32(src_addr); + src_addr += 4; + dst_addr++; + size--; + } + + // Execute "WP" Write Page + NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP; + while (NVMCTRL->INTFLAG.bit.READY == 0) { } + } +} + +///////////////////////////////////////////////////// + +void FlashClass::read(const volatile void *flash_ptr, void *data) +{ + FLASH_LOGERROR3(F("MAX_FLASH (KB) = "), MAX_FLASH / 1024, F(", ROW_SIZE ="), ROW_SIZE); + FLASH_LOGERROR1(F("FlashStorage size = "), flash_size); + FLASH_LOGERROR0(F("FlashStorage Start Address: 0x")); FLASH_HEXLOGERROR0((uint32_t ) flash_address); + + FLASH_LOGDEBUG0(F("Read: flash_ptr = 0x")); FLASH_HEXLOGDEBUG0((uint32_t ) flash_ptr); + FLASH_LOGDEBUG0(F("data = 0x")); FLASH_HEXLOGDEBUG0(* (uint32_t *) data); + + memcpy(data, (const void *)flash_ptr, flash_size); +} + +///////////////////////////////////////////////////// + +void FlashClass::erase(const volatile void *flash_ptr, uint32_t size) +{ + const uint8_t *ptr = (const uint8_t *)flash_ptr; + + while (size > ROW_SIZE) + { + erase(ptr); + ptr += ROW_SIZE; + size -= ROW_SIZE; + } + + erase(ptr); +} + +///////////////////////////////////////////////////// + +void FlashClass::erase(const volatile void *flash_ptr) +{ + NVMCTRL->ADDR.reg = ((uint32_t)flash_ptr) / 2; + NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER; + while (!NVMCTRL->INTFLAG.bit.READY) { } +} + +#endif //#ifndef FlashStorage_SAMD21_h + diff --git a/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD51.h b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD51.h new file mode 100644 index 0000000000000000000000000000000000000000..6bc32ba1c1b8713145882e454a0b43b3de4ddbfc --- /dev/null +++ b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD51.h @@ -0,0 +1,193 @@ +/****************************************************************************************************************************************** + FlashStorage_SAMD51.h + For SAMD21/SAMD51 using Flash emulated-EEPROM + + The FlashStorage_SAMD library aims to provide a convenient way to store and retrieve user's data using the non-volatile flash memory + of SAMD21/SAMD51. It now supports writing and reading the whole object, not just byte-and-byte. + + Based on and modified from Cristian Maglie's FlashStorage (https://github.com/cmaglie/FlashStorage) + + Built by Khoi Hoang https://github.com/khoih-prog/FlashStorage_SAMD + Licensed under LGPLv3 license + + Orginally written by Cristian Maglie + + Copyright (c) 2015 Arduino LLC. All right reserved. + Copyright (c) 2020 Khoi Hoang. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License + as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with this library. + If not, see (https://www.gnu.org/licenses/) + + Version: 1.3.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 28/03/2020 Initial coding to add support to SAMD51 besides SAMD21 + 1.1.0 K Hoang 26/01/2021 Add supports to put() and get() for writing and reading the whole object. Fix bug. + 1.2.0 K Hoang 18/08/2021 Optimize code. Add debug option + 1.2.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.3.0 K Hoang 25/01/2022 Fix `multiple-definitions` linker error. Add support to many more boards. + 1.3.1 K Hoang 25/01/2022 Reduce number of library files + 1.3.2 K Hoang 26/01/2022 Make compatible with old libraries and codes + ******************************************************************************************************************************************/ + +// The .hpp contains only definitions, and can be included as many times as necessary, without `Multiple Definitions` Linker Error +// The .h contains implementations, and can be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error + +#pragma once + + +#ifndef FlashStorage_SAMD51_h +#define FlashStorage_SAMD51_h + +#ifndef BOARD_NAME + #define BOARD_NAME "Unknown SAMD51 board" +#endif + +static const uint32_t pageSizes[] = { 8, 16, 32, 64, 128, 256, 512, 1024 }; + +///////////////////////////////////////////////////// + +FlashClass::FlashClass(const void *flash_addr, uint32_t size) : + PAGE_SIZE(pageSizes[NVMCTRL->PARAM.bit.PSZ]), + PAGES(NVMCTRL->PARAM.bit.NVMP), + MAX_FLASH(PAGE_SIZE * PAGES), + ROW_SIZE(MAX_FLASH / 64), + flash_address((volatile void *)flash_addr), + flash_size(size) +{ +} + +///////////////////////////////////////////////////// + +static inline uint32_t read_unaligned_uint32(const void *data) +{ + union { + uint32_t u32; + uint8_t u8[4]; + } res; + const uint8_t *d = (const uint8_t *)data; + res.u8[0] = d[0]; + res.u8[1] = d[1]; + res.u8[2] = d[2]; + res.u8[3] = d[3]; + return res.u32; +} + +///////////////////////////////////////////////////// + +void FlashClass::write(const volatile void *flash_ptr, const void *data) +{ + // Calculate data boundaries + uint32_t size = (flash_size + 3) / 4; + + volatile uint32_t *dst_addr = (volatile uint32_t *)flash_ptr; + const uint8_t *src_addr = (uint8_t *)data; + + // Disable automatic page write + NVMCTRL->CTRLA.bit.WMODE = 0; + + ////KH + /* + 1. Configure manual write for the NVM using WMODE (NVMCTRL.CTRLA). + 2. Make sure the NVM is ready to accept a new command (NVMCTRL.STATUS). + 3. Clear page buffer ( NVMCTRL.CTRLB). + 4. Make sure NVM is ready to accept a new command (NVMCTRL.STATUS). + 5. Clear the DONE Flag (NVMCTRL.INTFLAG). + 6. Write data to page buffer with 32-bit accesses at the needed address. + 7. Perform page write (NVMCTRL.CTRLB). + 8. Make sure NVM is ready to accept a new command (NVMCTRL.STATUS). + 9. Clear the DONE Flag (NVMCTRL.INTFLAG). + */ + //KH + + // 2. Make sure the NVM is ready to accept a new command (NVMCTRL.STATUS). + while (NVMCTRL->STATUS.bit.READY != NVMCTRL_STATUS_READY ) { } + + // Do writes in pages + while (size) + { + // Execute "PBC" Page Buffer Clear + // 3. Clear page buffer ( NVMCTRL.CTRLB). + NVMCTRL->CTRLB.reg = NVMCTRL_CTRLB_CMDEX_KEY | NVMCTRL_CTRLB_CMD_PBC; + + // 4. Make sure the NVM is ready to accept a new command (NVMCTRL.STATUS). + //while (NVMCTRL->STATUS.bit.READY != NVMCTRL_STATUS_READY ) { } + + // 5. Clear the DONE Flag (NVMCTRL.INTFLAG) + while (NVMCTRL->INTFLAG.bit.DONE == 0) { } + + // 6. Write data to page buffer with 32-bit accesses at the needed address. + // Fill page buffer + uint32_t i; + + for (i=0; i<(PAGE_SIZE/4) && size; i++) + { + *dst_addr = read_unaligned_uint32(src_addr); + src_addr += 4; + dst_addr++; + size--; + } + + //7. Perform page write (NVMCTRL.CTRLB). + // Execute "WP" Write Page + NVMCTRL->CTRLB.reg = NVMCTRL_CTRLB_CMDEX_KEY | NVMCTRL_CTRLB_CMD_WP; + + // 8. Make sure NVM is ready to accept a new command (NVMCTRL.STATUS). + //while (NVMCTRL->STATUS.bit.READY != NVMCTRL_STATUS_READY ) { } + + // 9. Clear the DONE Flag (NVMCTRL.INTFLAG) + while (NVMCTRL->INTFLAG.bit.DONE == 0) { } + } +} + +///////////////////////////////////////////////////// + +void FlashClass::read(const volatile void *flash_ptr, void *data) +{ + FLASH_LOGERROR3(F("MAX_FLASH (KB) = "), MAX_FLASH / 1024, F(", ROW_SIZE ="), ROW_SIZE); + FLASH_LOGERROR1(F("FlashStorage size = "), flash_size); + FLASH_LOGERROR0(F("FlashStorage Start Address: 0x")); FLASH_HEXLOGERROR0((uint32_t ) flash_address); + + FLASH_LOGDEBUG0(F("Read: flash_ptr = 0x")); FLASH_HEXLOGDEBUG0((uint32_t ) flash_ptr); + FLASH_LOGDEBUG0(F("data = 0x")); FLASH_HEXLOGDEBUG0(* (uint32_t *) data); + + memcpy(data, (const void *)flash_ptr, flash_size); +} + +///////////////////////////////////////////////////// + +void FlashClass::erase(const volatile void *flash_ptr, uint32_t size) +{ + const uint8_t *ptr = (const uint8_t *)flash_ptr; + + while (size > ROW_SIZE) + { + erase(ptr); + ptr += ROW_SIZE; + size -= ROW_SIZE; + } + + erase(ptr); +} + +///////////////////////////////////////////////////// + +void FlashClass::erase(const volatile void *flash_ptr) +{ + NVMCTRL->ADDR.reg = ((uint32_t)flash_ptr); + + // Check, now erase PAGE, instead of ROW !!! + NVMCTRL->CTRLB.reg = NVMCTRL_CTRLB_CMDEX_KEY | NVMCTRL_CTRLB_CMD_EB; + + while (NVMCTRL->INTFLAG.bit.DONE == 0) { } +} + +///////////////////////////////////////////////////// + +#endif //#ifndef FlashStorage_SAMD51_h + diff --git a/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD_Impl.h b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD_Impl.h new file mode 100644 index 0000000000000000000000000000000000000000..14d0aee0d990947943fdc1e4599c4b0b516de24b --- /dev/null +++ b/data/Basic2/IoTBasic/src/FlashStorage_SAMD/FlashStorage_SAMD_Impl.h @@ -0,0 +1,60 @@ +/****************************************************************************************************************************************** + FlashStorage_SAMD_Impl.h + For SAMD21/SAMD51 using Flash emulated-EEPROM + + The FlashStorage_SAMD library aims to provide a convenient way to store and retrieve user's data using the non-volatile flash memory + of SAMD21/SAMD51. It now supports writing and reading the whole object, not just byte-and-byte. + + Based on and modified from Cristian Maglie's FlashStorage (https://github.com/cmaglie/FlashStorage) + + Built by Khoi Hoang https://github.com/khoih-prog/FlashStorage_SAMD + Licensed under LGPLv3 license + + Orginally written by Cristian Maglie + + Copyright (c) 2015 Arduino LLC. All right reserved. + Copyright (c) 2020 Khoi Hoang. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License + as published bythe Free Software Foundation, either version 3 of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with this library. + If not, see (https://www.gnu.org/licenses/) + + Version: 1.3.2 + + Version Modified By Date Comments + ------- ----------- ---------- ----------- + 1.0.0 K Hoang 28/03/2020 Initial coding to add support to SAMD51 besides SAMD21 + 1.1.0 K Hoang 26/01/2021 Add supports to put() and get() for writing and reading the whole object. Fix bug. + 1.2.0 K Hoang 18/08/2021 Optimize code. Add debug option + 1.2.1 K Hoang 10/10/2021 Update `platform.ini` and `library.json` + 1.3.0 K Hoang 25/01/2022 Fix `multiple-definitions` linker error. Add support to many more boards. + 1.3.1 K Hoang 25/01/2022 Reduce number of library files + 1.3.2 K Hoang 26/01/2022 Make compatible with old libraries and codes + ******************************************************************************************************************************************/ + +// The .hpp contains only definitions, and can be included as many times as necessary, without `Multiple Definitions` Linker Error +// The .h contains implementations, and can be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error + +#pragma once + +#ifndef FlashStorage_SAMD_Impl_h +#define FlashStorage_SAMD_Impl_h + +#if ( defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) || defined(__SAMD51G19A__) || defined(__SAMD51P19A__) ) + #include "FlashStorage_SAMD51.h" +#elif ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \ + || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) \ + || defined(ARDUINO_SAMD_MKRWAN1310) || defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) \ + || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(ARDUINO_SAML_INDUSTRUINO_420MAKER) \ + || defined(__SAMD21E15A__) || defined(__SAMD21E16A__) || defined(__SAMD21E17A__) || defined(__SAMD21E18A__) \ + || defined(__SAMD21G15A__) || defined(__SAMD21G16A__) || defined(__SAMD21G17A__) || defined(__SAMD21G18A__) \ + || defined(__SAMD21J15A__) || defined(__SAMD21J16A__) || defined(__SAMD21J17A__) || defined(__SAMD21J18A__) ) + #include "FlashStorage_SAMD21.h" +#else + #error This code is intended to run only on the SAMD21 or SAMD51 boards ! Please check your Tools->Board setting. +#endif + +#endif //#ifndef FlashStorage_SAMD_Impl_h diff --git a/data/Basic2/IoTBasic/src/XMCEEPROMLib/XMCEEPROMLib.h b/data/Basic2/IoTBasic/src/XMCEEPROMLib/XMCEEPROMLib.h new file mode 100644 index 0000000000000000000000000000000000000000..658f23bc6fde12e062854b298f046cd57ba40e6f --- /dev/null +++ b/data/Basic2/IoTBasic/src/XMCEEPROMLib/XMCEEPROMLib.h @@ -0,0 +1,166 @@ +/* + * Stefan's XMC EEPROM Library + * + * See the licence file on for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * A poor man's EEPROM emulation in the XMC flash. + * We buffer entire pages in RAM and only program the flash is we hve a page fault. + * + * Flash geometry: 16 bytes per block, 16 blocks per page. Organized in 4096 byte sectors. + * We use one sector i.e. 16 pages as a flat EEPROM data. + * + * The whole code is meant primarily to be used with the IoT BASIC interpreter and implements + * only a reduced API and a reduced buffering and flash protection algorithm: + * + * Buffering strategy: + * - One pagebuffer for an entire page. Takes all the writes to the page and keeps it + * until a pagefault occurs, i.e. writes go beyond the page, then flush and reload + * monitor if the page has changed. Always read the page and then write into the pagebuffer. + * - One blockbuffer for read. If the read is outside the page loaded for write, read the + * blockbuffer and hand back bytes from it. If the read is inside the page loaded for + * write, satisfy read request from there. + * + * The library does not do additional reduction of erase cycles like the more + * sophisticated solutions to. It works well if + * 1. you mostly write entire chunks of memory like the BASIC interpreter does on program save + * 2. when you do frequent read/write you mostly stay in one page like the BASIC interpreter does + * on EEPROM variable access + * + */ + +#include "xmc_flash.h" + +#ifndef XMCEEPROMLIB_H +#define XMCEEPROMLIB_H + + +// we keep this static and outside the class, needed for the memory managenent of one specifiy application +// change this if you find it annoying -> into the class. +static uint8_t xmceeprom_pagebuffer[256]; +static uint8_t xmceeprom_blockbuffer[16]; + +class XMCEEPROM { +public: + // no constructor needed + XMCEEPROM(void) {}; + ~XMCEEPROM(void) {}; + + // begin is optional, as all the constants are already set for 64 kB flash and a 4kB EEPROM + void begin(uint16_t eepromsize=4096, uint32_t flashsize=65536) { + xmcdatasize=(eepromsize & 0xff00); // data size is reduced to full pages + xmcflashsize=flashsize; // anything goes here + xmcdatasector = xmcflashbase + xmcflashsize - xmcdatasize; + }; + + // read - done through the blockbuffer + uint8_t read(int address) { + // address in rage ? + if (address >=0 && address < xmcdatasize) { + // do we have a page in memory for write and try to read from it + if (page != -1 && address/256 == page) return pagebuffer[address%256]; + // if not, read the block we are dealing with into the blockbuffer, if not already there + if (block == -1 || block != address/16) readblock(address/16); + // if that worked, satisfy read from the block buffer + if (error == 0) return blockbuffer[address%16]; else return 255; + } else { + error = -1; + return 255; + } + }; + + // write a byte, this is really update() of course */ + void write(int address, uint8_t val) { + // address in rage ? + if (address >=0 && address < xmcdatasize) { + // do we have a page fault and valid data to flush + if (page != -1 && page != address/256) { writepage(); readpage(address/256); } + // get the requested page if we need to + if (page == -1) readpage(address/256); + if (error != 0) return; + // we have the requested page in the pagebuffer, set the value and mark the page changed + if (pagebuffer[address%256] != val) { + // here, one would additionally check, if the change can be done without erase + // this would mean to check if only bytes that were high go to low. In this case one could + // write straight through here and keep the page_changed to 0 + pagebuffer[address%256]=val; + page_changed=1; + // if the block buffer overlaps with the page buffer, keep it up to date as well */ + if (block != -1 && address/16 == block) blockbuffer[address%16]=val; + } + } else { + error = -1; + } + }; + + // this is trivial but helps with compatibility + void update(int address, uint8_t val) { write(address, val); } + + // length is defined in the constants + uint16_t length() { return xmcdatasize; }; + // commit like in the ESP world - flush the write page + void commit() { writepage(); }; + void end() { commit(); }; + int status() { return error; }; + private: + // the real internal data type of flash would be words but we do byte + // the pagebuffer has the page we are writing + uint8_t* pagebuffer = xmceeprom_pagebuffer; + // the page we have in the buffer, -1 means no valid data + int page=-1; + // the page changed status + int page_changed = 0; + // the blockbuffer has the block we are reading + uint8_t* blockbuffer = xmceeprom_blockbuffer; + // the block we have loaded for read + int block=-1; + // the error status + int error = 0; + + // the geometry of the flash + const unsigned long xmcflashbase = 0x10001000; // where does the flash start + unsigned long xmcflashsize = 0x00010000; // a 64kB flash + // static unsigned long xmcflashsize = 0x00008000; // a 32kB flash by default + unsigned int xmcdatasize = 0x00001000; // a 4kB data sector - this is the EEPROM size + unsigned long xmcdatasector = xmcflashbase + xmcflashsize - xmcdatasize; // we use the last sector + + // read a page into the pagebuffer and set the page variable + void readpage(uint8_t p) { + if (p >= 0 && p < 16) { + XMC_FLASH_ReadBlocks( (uint32_t*) (xmcdatasector+p*256), (uint32_t*) pagebuffer, 16); + if ((error = XMC_FLASH_GetStatus()) == 0 ) { + page=p; + page_changed=0; + } else + page=-1; + } else { + error = -1; + } + } + + // write out the current page in programming mode + void writepage() { + if (page != -1 && page_changed) { + XMC_FLASH_ProgramPage( (uint32_t*) (xmcdatasector+page*256), (uint32_t*) pagebuffer); + error = XMC_FLASH_GetStatus(); + page_changed=0; + } + } + + // read a block to the blockbuffer + void readblock(int b) { + if (b>=0 && b<256) { + XMC_FLASH_ReadBlocks( (uint32_t*) (xmcdatasector+b*16), (uint32_t*) blockbuffer, 1); + if ((error = XMC_FLASH_GetStatus()) == 0 ) block=b; else block=-1; + } else { + error = -1; + } + } +}; + + +XMCEEPROM EEPROM; + +#endif diff --git a/data/Basic2/IoTBasic/wifisettings.h b/data/Basic2/IoTBasic/wifisettings.h new file mode 100644 index 0000000000000000000000000000000000000000..7a632fbb7b89a63d0ebdff936b7b242c5566dd2a --- /dev/null +++ b/data/Basic2/IoTBasic/wifisettings.h @@ -0,0 +1,7 @@ +const char* ssid = ""; +const char* password = ""; +const char* mqtt_server = "test.mosquitto.org"; +const char* mqtt_user = ""; +const char* mqtt_passwd = ""; +const short mqtt_port = 1883; +byte mac[] = {0xDE, 0xAD, 0xBE, 0xE9, 0xE9, 0xE9}; diff --git a/data/Basic2/MSDOS/basic.c b/data/Basic2/MSDOS/basic.c new file mode 100644 index 0000000000000000000000000000000000000000..9cb387fc824aedfd36a6b6aebf3f3e332d2ab868 --- /dev/null +++ b/data/Basic2/MSDOS/basic.c @@ -0,0 +1,9636 @@ +/*---------------------------------------------------------------- + * Please read this before compiling: + * - Review hardware.h for settings specific hardware settings. + * Super important on Arduino and Raspberry PI. + * - language.h controls the language features. + * For Arduino Integer BASIC is default and a limited language + * set. For the larger boards this can be extended a lot. + *----------------------------------------------------------------- + * + * $Id: basic.c,v 1.5 2024/03/02 15:38:20 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter - BASIC for everywhere. + * + * See the licence file on + * https: + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Currently there are two versions of the runtime environment. + * One contains all platforms compiled in the Arduino IDE + * (ESP8266, ESP32, AVR, MEGAAVR, SAM*, RP2040) + * + * Anothers contains all platforms compiled in gcc with a POSIX OS + * (Mac, Raspberry, Windows/MINGW) plus rudimentary MSDOS with tc2.0. The + * latter will be removed soon. + * + * The interface to BASIC is identical. + */ + +/* the runtime environment */ +#include "hardware.h" +#include "runtime.h" + +/* + * the core basic language headers + */ +#include "language.h" +#include "basic.h" + +/* use long jump for error handling */ +#if USELONGJUMP == 1 +#include "setjmp.h" +#endif + +/* Global BASIC definitions */ + +/* + * All BASIC keywords for the tokens, PROGMEM on Arduino + * Normal memory elsewhere. + */ +const char sge[] PROGMEM = "=>"; +const char sle[] PROGMEM = "<="; +const char sne[] PROGMEM = "<>"; +/* Palo Alto language set */ +const char sprint[] PROGMEM = "PRINT"; +const char slet[] PROGMEM = "LET"; +const char sinput[] PROGMEM = "INPUT"; +const char sgoto[] PROGMEM = "GOTO"; +const char sgosub[] PROGMEM = "GOSUB"; +const char sreturn[] PROGMEM = "RETURN"; +const char sif[] PROGMEM = "IF"; +const char sfor[] PROGMEM = "FOR"; +const char sto[] PROGMEM = "TO"; +const char sstep[] PROGMEM = "STEP"; +const char snext[] PROGMEM = "NEXT"; +const char sstop[] PROGMEM = "STOP"; +const char slist[] PROGMEM = "LIST"; +const char snew[] PROGMEM = "NEW"; +const char srun[] PROGMEM = "RUN"; +const char sabs[] PROGMEM = "ABS"; +const char srnd[] PROGMEM = "RND"; +const char ssize[] PROGMEM = "SIZE"; +const char srem[] PROGMEM = "REM"; +/* Apple 1 language set */ +#ifdef HASAPPLE1 +const char snot[] PROGMEM = "NOT"; +const char sand[] PROGMEM = "AND"; +const char sor[] PROGMEM = "OR"; +const char slen[] PROGMEM = "LEN"; +const char ssgn[] PROGMEM = "SGN"; +const char speek[] PROGMEM = "PEEK"; +const char sdim[] PROGMEM = "DIM"; +const char sclr[] PROGMEM = "CLR"; +const char shimem[] PROGMEM = "HIMEM"; +const char stab[] PROGMEM = "TAB"; +const char sthen[] PROGMEM = "THEN"; +const char sbend[] PROGMEM = "END"; +const char spoke[] PROGMEM = "POKE"; +#endif +/* Stefan's basic additions */ +#ifdef HASSTEFANSEXT +const char scont[] PROGMEM = "CONT"; +const char ssqr[] PROGMEM = "SQR"; +const char spow[] PROGMEM = "POW"; +const char smap[] PROGMEM = "MAP"; +const char sdump[] PROGMEM = "DUMP"; +const char sbreak[] PROGMEM = "BREAK"; +#endif +/* LOAD and SAVE is always there */ +const char ssave[] PROGMEM = "SAVE"; +const char sload[] PROGMEM = "LOAD"; +#ifdef HASSTEFANSEXT +const char sget[] PROGMEM = "GET"; +const char sput[] PROGMEM = "PUT"; +const char sset[] PROGMEM = "SET"; +const char scls[] PROGMEM = "CLS"; +const char slocate[] PROGMEM = "LOCATE"; +const char selse[] PROGMEM = "ELSE"; +#endif +/* Arduino functions */ +#ifdef HASARDUINOIO +const char spinm[] PROGMEM = "PINM"; +const char sdwrite[] PROGMEM = "DWRITE"; +const char sdread[] PROGMEM = "DREAD"; +const char sawrite[] PROGMEM = "AWRITE"; +const char saread[] PROGMEM = "AREAD"; +const char sdelay[] PROGMEM = "DELAY"; +const char smillis[] PROGMEM = "MILLIS"; +const char sazero[] PROGMEM = "AZERO"; +const char sled[] PROGMEM = "LED"; +#endif +#ifdef HASTONE +const char stone[] PROGMEM = "PLAY"; +#endif +#ifdef HASPULSE +const char spulse[] PROGMEM = "PULSE"; +#endif +/* DOS functions */ +#ifdef HASFILEIO +const char scatalog[] PROGMEM = "CATALOG"; +const char sdelete[] PROGMEM = "DELETE"; +const char sfopen[] PROGMEM = "OPEN"; +const char sfclose[] PROGMEM = "CLOSE"; +const char sfdisk[] PROGMEM = "FDISK"; +#endif +/* low level access functions */ +#ifdef HASSTEFANSEXT +const char susr[] PROGMEM = "USR"; +const char scall[] PROGMEM = "CALL"; +#endif +/* mathematics */ +#ifdef HASFLOAT +const char ssin[] PROGMEM = "SIN"; +const char scos[] PROGMEM = "COS"; +const char stan[] PROGMEM = "TAN"; +const char satan[] PROGMEM = "ATAN"; +const char slog[] PROGMEM = "LOG"; +const char sexp[] PROGMEM = "EXP"; +#endif +/* INT is always needed to make float/int programs compatible */ +const char sint[] PROGMEM = "INT"; +/* elemetars graphics */ +#ifdef HASGRAPH +const char scolor[] PROGMEM = "COLOR"; +const char splot[] PROGMEM = "PLOT"; +const char sline[] PROGMEM = "LINE"; +const char scircle[] PROGMEM = "CIRCLE"; +const char srect[] PROGMEM = "RECT"; +const char sfcircle[] PROGMEM = "FCIRCLE"; +const char sfrect[] PROGMEM = "FRECT"; +#endif +/* Dartmouth BASIC extensions */ +#ifdef HASDARTMOUTH +const char sdata[] PROGMEM = "DATA"; +const char sread[] PROGMEM = "READ"; +const char srestore[] PROGMEM = "RESTORE"; +const char sdef[] PROGMEM = "DEF"; +const char sfn[] PROGMEM = "FN"; +const char son[] PROGMEM = "ON"; +#endif +/* The Darkarts commands unthinkable in Dartmouth */ +#ifdef HASDARKARTS +const char smalloc[] PROGMEM = "MALLOC"; +const char sfind[] PROGMEM = "FIND"; +const char seval[] PROGMEM = "EVAL"; +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING +const char serror[] PROGMEM = "ERROR"; +#endif +/* iot extensions */ +#ifdef HASIOT +const char savail[] PROGMEM = "AVAIL"; +const char sstr[] PROGMEM = "STR"; +const char sinstr[] PROGMEM = "INSTR"; +const char sval[] PROGMEM = "VAL"; +const char snetstat[] PROGMEM = "NETSTAT"; +const char ssensor[] PROGMEM = "SENSOR"; +const char swire[] PROGMEM = "WIRE"; +const char ssleep[] PROGMEM = "SLEEP"; +#endif +/* events and interrupts */ +#ifdef HASTIMER +const char safter[] PROGMEM = "AFTER"; +const char severy[] PROGMEM = "EVERY"; +#endif +#ifdef HASEVENTS +const char sevent[] PROGMEM = "EVENT"; +#endif +#ifdef HASSTRUCT +const char swhile[] PROGMEM = "WHILE"; +const char swend[] PROGMEM = "WEND"; +const char srepeat[] PROGMEM = "REPEAT"; +const char suntil[] PROGMEM = "UNTIL"; +const char sswitch[] PROGMEM = "SWITCH"; +const char scase[] PROGMEM = "CASE"; +const char sswend[] PROGMEM = "SWEND"; +const char sdo[] PROGMEM = "DO"; +const char sdend[] PROGMEM = "DEND"; +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS +const char sfend[] PROGMEM = "FEND"; +#endif +#endif +#ifdef HASMSSTRINGS +const char sasc[] PROGMEM = "ASC"; +const char schr[] PROGMEM = "CHR"; +const char sright[] PROGMEM = "RIGHT"; +const char sleft[] PROGMEM = "LEFT"; +const char smid[] PROGMEM = "MID"; +const char sspc[] PROGMEM = "SPC"; +#endif +#ifdef HASEDITOR +const char sedit[] PROGMEM = "EDIT"; +#endif + + +/* zero terminated keyword storage */ +const char* const keyword[] PROGMEM = { + sge, sle, sne, sprint, slet, sinput, + sgoto, sgosub, sreturn, sif, sfor, sto, + sstep, snext, sstop, slist, snew, srun, + sabs, srnd, ssize, srem, +#ifdef HASAPPLE1 + snot, sand, sor, slen, ssgn, speek, sdim, + sclr, shimem, stab, sthen, + sbend, spoke, +#endif +#ifdef HASSTEFANSEXT + scont, ssqr, spow, smap, sdump, sbreak, +#endif + ssave, sload, +#ifdef HASSTEFANSEXT + sget, sput, sset, scls, slocate, selse, +#endif +#ifdef HASARDUINOIO + spinm, sdwrite, sdread, sawrite, saread, + sdelay, smillis, sazero, sled, +#endif +#ifdef HASTONE + stone, +#endif +#ifdef HASPULSE + spulse, +#endif +#ifdef HASFILEIO + scatalog, sdelete, sfopen, sfclose, sfdisk, +#endif +#ifdef HASSTEFANSEXT + susr, scall, +#endif +#ifdef HASFLOAT + ssin, scos, stan, satan, slog, sexp, +#endif + sint, +#ifdef HASGRAPH + scolor, splot, sline, scircle, srect, + sfcircle, sfrect, +#endif +#ifdef HASDARTMOUTH + sdata, sread, srestore, sdef, sfn, son, +#endif +#ifdef HASDARKARTS + smalloc, sfind, seval, +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING + serror, +#endif +#ifdef HASIOT + savail, sstr, sinstr, sval, + snetstat, ssensor, swire, ssleep, +#endif +#ifdef HASTIMER + safter, severy, +#endif +#ifdef HASEVENTS + sevent, +#endif +#ifdef HASSTRUCT + swhile, swend, srepeat, suntil, sswitch, scase, sswend, + sdo, sdend, +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS + sfend, +#endif +#endif +#ifdef HASMSSTRINGS + sasc, schr, sright, sleft, smid, sspc, +#endif +#ifdef HASEDITOR + sedit, +#endif + 0 +}; + +/* the zero terminated token dictonary needed for scalability */ +const token_t tokens[] PROGMEM = { + GREATEREQUAL, LESSEREQUAL, NOTEQUAL, TPRINT, TLET, + TINPUT, TGOTO, TGOSUB, TRETURN, TIF, TFOR, TTO, TSTEP, + TNEXT, TSTOP, TLIST, TNEW, TRUN, TABS, TRND, TSIZE, TREM, +#ifdef HASAPPLE1 + TNOT, TAND, TOR, TLEN, TSGN, TPEEK, TDIM, TCLR, + THIMEM, TTAB, TTHEN, TEND, TPOKE, +#endif +#ifdef HASSTEFANSEXT + TCONT, TSQR, TPOW, TMAP, TDUMP, TBREAK, +#endif + TSAVE, TLOAD, +#ifdef HASSTEFANSEXT + TGET, TPUT, TSET, TCLS, TLOCATE, TELSE, +#endif +#ifdef HASARDUINOIO + TPINM, TDWRITE, TDREAD, TAWRITE, TAREAD, TDELAY, TMILLIS, + TAZERO, TLED, +#endif +#ifdef HASTONE + TTONE, +#endif +#ifdef HASPULSE + TPULSE, +#endif +#ifdef HASFILEIO + TCATALOG, TDELETE, TOPEN, TCLOSE, TFDISK, +#endif +#ifdef HASSTEFANSEXT + TUSR, TCALL, +#endif +#ifdef HASFLOAT + TSIN, TCOS, TTAN, TATAN, TLOG, TEXP, +#endif + TINT, +#ifdef HASGRAPH + TCOLOR, TPLOT, TLINE, TCIRCLE, TRECT, + TFCIRCLE, TFRECT, +#endif +#ifdef HASDARTMOUTH + TDATA, TREAD, TRESTORE, TDEF, TFN, TON, +#endif +#ifdef HASDARKARTS + TMALLOC, TFIND, TEVAL, +#endif +#ifdef HASERRORHANDLING + TERROR, +#endif +#ifdef HASIOT + TAVAIL, TSTR, TINSTR, TVAL, TNETSTAT, + TSENSOR, TWIRE, TSLEEP, +#endif +#ifdef HASTIMER + TAFTER, TEVERY, +#endif +#ifdef HASEVENTS + TEVENT, +#endif +#ifdef HASSTRUCT + TWHILE, TWEND, TREPEAT, TUNTIL, TSWITCH, TCASE, TSWEND, + TDO, TDEND, +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS + TFEND, +#endif +#endif +#ifdef HASMSSTRINGS + TASC, TCHR, TRIGHT, TLEFT, TMID, TSPC, +#endif +#ifdef HASEDITOR + TEDIT, +#endif + 0 +}; + +/* experimental, do not use right now */ +const bworkfunction_t workfunctions[] PROGMEM = { + 0, 0, 0, xprint, 0 +}; + +/* errors and messages */ +const char mfile[] PROGMEM = "file.bas"; +const char mprompt[] PROGMEM = "> "; +const char mgreet[] PROGMEM = "Stefan's Basic 2.0alpha"; +const char mline[] PROGMEM = "LINE"; +const char mnumber[] PROGMEM = "NUMBER"; +const char mvariable[] PROGMEM = "VARIABLE"; +const char marray[] PROGMEM = "ARRAY"; +const char mstring[] PROGMEM = "STRING"; +const char mstringv[] PROGMEM = "STRINGVAR"; +const char egeneral[] PROGMEM = "Error"; +#ifdef HASERRORMSG +const char eunknown[] PROGMEM = "Syntax"; +const char enumber[] PROGMEM = "Number"; +const char edivide[] PROGMEM = "Div by 0"; +const char eline[] PROGMEM = "Unknown Line"; +const char emem[] PROGMEM = "Memory"; +const char estack[] PROGMEM = "Stack"; +const char erange[] PROGMEM = "Range"; +const char estring[] PROGMEM = "String"; +const char evariable[] PROGMEM = "Variable"; +const char eloop[] PROGMEM = "Loop"; +const char efile[] PROGMEM = "File"; +const char efun[] PROGMEM = "Function"; +const char eargs[] PROGMEM = "Args"; +const char eeeprom[] PROGMEM = "EEPROM"; +const char esdcard[] PROGMEM = "SD card"; +#endif + +const char* const message[] PROGMEM = { + mfile, mprompt, mgreet, + mline, mnumber, mvariable, marray, + mstring, mstringv, + egeneral +#ifdef HASERRORMSG + , eunknown, enumber, edivide, eline, + emem, estack, erange, + estring, evariable, eloop, efile, efun, eargs, + eeeprom, esdcard +#endif +}; + +/* + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: in the new code this is simply the size of the + * stringlength type. Currently only 1 byte and 2 bytes are tested. + */ +#ifdef HASFLOAT +const number_t maxnum=16777216; +#else +const number_t maxnum=(number_t)~((number_t)1<<(sizeof(number_t)*8-1)); +#endif +const int numsize=sizeof(number_t); +const int addrsize=sizeof(address_t); +const int eheadersize=sizeof(address_t)+1; +const int strindexsize=sizeof(stringlength_t); /* default in the meantime, strings up to unsigned 16 bit length */ +const address_t maxaddr=(address_t)(~0); + +/* + * The basic interpreter is implemented as a stack machine + * with global variable for the interpreter state, the memory + * and the arithmetic during run time. + */ + +/* the stack, all BASIC arithmetic is done here */ + +accu_t stack[STACKSIZE]; +address_t sp=0; + +/* a small buffer to process string arguments, mostly used for Arduino PROGMEM and string functions */ +/* use with care as it is used in some string functions */ +char sbuffer[SBUFSIZE]; + +/* the input buffer, the lexer can tokenize this and run from it, bi is an index to this. + bi must be global as it is the program cursor in interactive mode */ +char ibuffer[BUFSIZE] = "\0"; +char *bi; + +/* a static array of variables A-Z for the small systems that have no heap */ +#ifndef HASAPPLE1 +number_t vars[VARSIZE]; +#endif + +/* the BASIC working memory, either malloced or allocated as a global array */ +#if MEMSIZE != 0 +mem_t mem[MEMSIZE]; +#else +mem_t* mem; +#endif +address_t himem, memsize; + +/* reimplementation of the loops, will replace the forstack */ +bloop_t loopstack[FORDEPTH]; +index_t loopsp = 0; + +/* the GOSUB stack remembers an address to jump to */ +address_t gosubstack[GOSUBDEPTH]; +index_t gosubsp = 0; + +/* arithmetic accumulators */ +number_t x, y; + +/* the name of on object, replaced xc and xy in BASIC 1 */ +name_t name; + +/* an address accumulator, used a lot in string operations */ +address_t ax; + +/* a string index registers, new style identifying a string either in C memory or BASIC memory */ +string_t sr; + +/* the active token */ +token_t token; + +/* the curent error, can be a token, hence token type */ +token_t er; +/* the jmp buffer for the error handling */ +#if USELONGJUMP == 1 +jmp_buf sthook; +#endif + +/* a trapable error */ +mem_t ert; + +/* the interpreter state, interactive, run or run from EEPROM */ +mem_t st; + +/* the current program location */ +address_t here; + +/* the topmost byte of a program in memory, beginning of free BASIC RAM */ +address_t top; + +/* used to format output with # */ +mem_t form = 0; + +/* do we use the Microsoft convention of an array starting at 0 or 1 like Apple 1 + two seperate variables because arraylimit can be changed at runtime for existing arrays + msarraylimit says if an array should be created with n or n+1 elements */ +#ifdef MSARRAYLIMITS +mem_t msarraylimits = 1; +address_t arraylimit = 0; +#else +mem_t msarraylimits = 0; +address_t arraylimit = 1; +#endif + + +/* behaviour around boolean, needed to change the interpreters personality at runtime */ +/* -1 is microsoft true while 1 is Apple 1 and C style true. */ +mem_t booleanmode = BOOLEANMODE; + +/* setting the interpreter to integer at runtime */ +mem_t forceint = 0; + +/* the default size of a string now as a variable */ +stringlength_t defaultstrdim = STRSIZEDEF; + +/* the base of the random number generator + * 0 is Apple 1 style RND from 0 to n-epsilon + * 1 is Palo Alto style from 1 to n + */ +mem_t randombase = 0; + +/* is substring logic used or not */ +#ifdef SUPPRESSSUBSTRINGS +mem_t substringmode = 0; +#else +mem_t substringmode = 1; +#endif + +/* the flag for true MS tabs */ +mem_t reltab = 0; + +/* the flag for lower case names */ +mem_t lowercasenames = 0; + +/* the number of arguments parsed from a command */ +mem_t args; + +/* the random number seed, this is unsigned */ +#ifndef HASFLOAT +address_t rd; +#else +unsigned long rd; +#endif + +/* the RUN debuglevel */ +mem_t debuglevel = 0; + +/* DATA pointer, where is the current READ statement */ +#ifdef HASDARTMOUTH +address_t data = 0; +address_t datarc = 1; +#endif + +/* + * process command line arguments in the POSIX world + * bnointafterrun is a flag to remember if called as command + * line argument, in this case we don't return to interactive + */ +#ifdef HASARGS +int bargc; +char** bargv; +mem_t bnointafterrun = 0; +#endif + +/* formaters lastouttoken and spaceafterkeyword to make a nice LIST */ +mem_t lastouttoken; +mem_t spaceafterkeyword; +mem_t outliteral = 0; +mem_t lexliteral = 0; + +/* + * The cache for the heap search - helps the string code. + * The last found object on the heap is remembered. This is needed + * because the string code sometime searches the heap twice during the + * same operation. Also, bfind is used to remember the length of the + * last found object. + */ +#ifdef HASAPPLE1 +heap_t bfind_object; +#endif + +/* + * a variable for string to numerical conversion, + * telling you were the number ended. + */ +address_t vlength; + +/* the timer code - very simple needs to be converted to to a struct */ +/* timer type */ +#ifdef HASTIMER +btimer_t after_timer = {0, 0, 0, 0, 0}; +btimer_t every_timer = {0, 0, 0, 0, 0}; +#endif + +/* the event code */ +#ifdef HASEVENTS + +#define EVENTLISTSIZE 4 + +/* the event list */ +int nevents = 0; +int ievent = 0; +mem_t events_enabled = 1; +volatile bevent_t eventlist[EVENTLISTSIZE]; + +/* the extension of the GOSUB stack */ +mem_t gosubarg[GOSUBDEPTH]; +#endif + +#ifdef HASERRORHANDLING +/* the error handler type, very simple for now */ +typedef struct { + mem_t type; + address_t linenumber; +} berrorh_t; + +berrorh_t berrorh = {0 , 0}; +mem_t erh = 0; +#endif + +/* the string for real time clocks */ +char rtcstring[20] = { 0 }; + +/* the units pulse operates on, in microseconds*/ +address_t bpulseunit = 10; + +/* only needed for POSIXNONBLOCKING */ +mem_t breakcondition = 0; + +/* the FN context, how deep are we in a nested function call, negative values reserved */ +int fncontext = 0; + +/* + * BASIC timer stuff, this is a core interpreter function now + */ + +/* the millis function for BASIC */ +void bmillis() { + number_t m; +/* millis is processed as integer and is cyclic mod maxnumber and not cast to float!! */ + m=(number_t) (millis()/(unsigned long)pop() % (unsigned long)maxnum); + push(m); +} + +/* + * Determine the possible basic memory size. + * using malloc causes some overhead which can be relevant on the smaller + * boards. + * + * Set MEMSIZE instead to a static value. In this case ballocmem + * just returns the static MEMSIZE. + * + * If SPIRAMINTERFACE is defined, we use the memory from a serial RAM and dont + * allocate it here at all. + * + */ +#if MEMSIZE == 0 && !(defined(SPIRAMINTERFACE)) +address_t ballocmem() { + +/* on most platforms we know the free memory for BASIC, this comes from runtime */ + long m=freememorysize(); + +/* we subtract some language feature depended things, this is only needed on + small Arduino boards with memories below 16kb */ + if (m < 16000) { +#ifdef HASAPPLE1 + m-=64; /* strings cost memory */ +#endif +#ifdef USELONGJUMP + m-=160; /* odd but true on Ardunio UNO and the like */ +#endif +#ifdef HASFLOAT + m-=96; +#endif +#ifdef HASGRAPH + m-=256; +#endif + } + +/* and keep fingers crossed here */ + if (m<0) m=128; + +/* we allocate as much as address_t can handle */ + if (m>maxaddr) m=maxaddr; + +/* try to allocate the memory */ + mem=(mem_t*)malloc(m); + if (mem != 0) return m-1; + +/* fallback if allocation failed, 128 bytes */ + mem=(mem_t*)malloc(128); + if (mem != 0) return 128; else return 0; + +} +#else +address_t ballocmem(){ return MEMSIZE-1; }; +#endif + +/* + * Layer 0 function - variable handling. + * + * These function access variables and data + */ + +/* + * Eeprom load / save / autorun functions + * needed for SAVE and LOAD to an EEPROM + * autorun is generic. + * + * The eeprom is accessed through the runtime functions + * elength(), eupdate(), ewrite() and eflush(); + * + */ + +/* save a file to EEPROM, disabled if we use the EEPROM directly */ +void esave() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + + /* does the program fit into the eeprom */ + if (top+eheadersize < elength()) { + + /* EEPROM per default is 255, 0 indicates that there is a program */ + eupdate(a++, 0); + + /* store the size of the program in byte 1,2,... of the EEPROM*/ + setaddress(a, eupdate, top); + a+=addrsize; + + /* store the program */ + while (a < top+eheadersize){ + eupdate(a, memread2(a-eheadersize)); + a++; + } + eupdate(a++,0); + + /* needed on I2C EEPROM and other platforms where we buffer */ + eflush(); + + } else { + error(EOUTOFMEMORY); + er=0; + } +#endif +} + +/* load a file from EEPROM, disabled if the use the EEPROM directly */ +void eload() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + + /* have we stored a program? */ + if (elength()>0 && (eread(a) == 0 || eread(a) == 1)) { + + /* how long is it? */ + a++; + top=getaddress(a, eread); + a+=addrsize; + + /* load it to memory, memwrite2 is direct mem access */ + while (a < top+eheadersize){ + memwrite2(a-eheadersize, eread(a)); + a++; + } + } else { + /* no valid program data is stored */ + error(EEEPROM); + } +#endif +} + +/* autorun something from EEPROM or a filesystem */ +char autorun() { + +/* autorun from EEPROM if there is an EEPROM flagged for autorun */ + if (elength()>0 && eread(0) == 1) { /* autorun from the EEPROM */ + top=getaddress(1, eread); + st=SERUN; + return 1; /* EEPROM autorun overrules filesystem autorun */ + } + +/* autorun from a given command line argument, if we have one */ +#ifdef HASARGS + if (bargc > 0 && ifileopen(bargv[1])) { + xload(bargv[1]); + st=SRUN; + ifileclose(); + bnointafterrun=TERMINATEAFTERRUN; + return 1; + } +#endif + +/* on a platform with a file system, autoexec from a file */ +#if defined(FILESYSTEMDRIVER) + if (ifileopen("autoexec.bas")) { + xload("autoexec.bas"); + st=SRUN; + ifileclose(); + return 1; + } +#endif + +/* nothing to autorun */ + return 0; +} + +#ifdef HASAPPLE1 +/* + * The new malloc code. Heap structure is now + * payload + * (payload size) + * name + * type + * + * In the new heap implementation himem points to the first free byte on the heap. + * The payload is stored first and then the header. + * + * The new heap code uses name_t for the name of the object. + * + */ + +address_t bmalloc(name_t* name, address_t l) { + address_t payloadsize; /* the payload size */ + address_t heapheadersize = sizeof(name_t) + addrsize; /* this is only used to estimate the free space, it is the maximum */ + address_t b=himem; /* the current position on the heap, we store it in case of errors */ + +/* Initial DEBUG message. */ + if (DEBUG) { + outsc("** bmalloc with token "); + outnumber(name->token); outspc(); + outname(name); outspc(); + outnumber(l); outcr(); + } + +/* + * How much space does the payload of the object need? + */ + switch(name->token) { + case VARIABLE: /* a variable needs numsize bytes*/ + payloadsize=numsize; + + break; +#ifndef HASMULTIDIM + case ARRAYVAR: /* a one dimensional array needs numsize*l bytes */ + payloadsize=numsize*l; + break; +#else + case ARRAYVAR: /* a two dimensional array needs numsize*l bytes plus one word for the additional dimension*/ + payloadsize=numsize*l+addrsize; + break; +#endif +#ifdef HASDARTMOUTH + case TFN: /* the jump address, the type of function/type of return value, the number of vars + and all variables are stored*/ + payloadsize=addrsize+2+sizeof(name_t)*l; + break; +#endif +/* these are plain buffers allocated by the MALLOC call in BASIC */ + default: + payloadsize=l; + } + +/* enough memory ?, on an EEPROM system we limit the heap to the RAM */ +#ifndef EEPROMMEMINTERFACE + if ((himem-top) < payloadsize+heapheadersize) { error(EOUTOFMEMORY); return 0;} +#else + if (himem-(elength()-eheadersize) < payloadsize+heapheadersize) { error(EOUTOFMEMORY); return 0;} +#endif + +/* first we reserve space for the payload, address points to the first byte of the payload */ +/* b points to the first free byte after the payload*/ + b-=payloadsize; + bfind_object.address=b+1; + +/* for ARRAYS, STRINGS and BUFFERS, store the object length now - these are variable size objects*/ + if (name->token != VARIABLE) { + b-=(addrsize-1); + setaddress(b, memwrite2, payloadsize); + if (DEBUG) { + outsc("** bmalloc writes payloadsize "); outnumber(payloadsize); + outsc(" at "); outnumber(b); outcr(); + } + b--; + } + +/* store the name of the objects including the type as identifier */ + b=setname_heap(b, name); + +/* store the type of the object */ + memwrite2(b--, name->token); + +/* if anything went wrong we exit here without changing himem */ + if (b < top || er) { error(EOUTOFMEMORY); return 0; } + +/* we fill the cache here as well, both right now for compatibility */ + bfind_object.name=*name; + bfind_object.size=payloadsize; + +/* himem is the next free byte now again */ + himem=b; + + if (DEBUG) { + outsc("** bmalloc returns "); outnumber(bfind_object.address); + outsc(" himem is "); outnumber(himem); outcr(); + } + +/* return the address of the payload */ + return bfind_object.address; +} + +address_t bfind(name_t* name) { + address_t b, b0; + address_t i=0; + +/* Initial DEBUG message. */ + if (DEBUG) { + outsc("*** bfind called for "); outname(name); + outsc(" on heap with token "); outnumber(name->token); + outsc(" himem is "); outnumber(himem); outcr(); + } + +/* do we have anything on the heap? */ + if (himem == memsize) return 0; else b=himem+1; + +/* we have the object already in cache and return */ + if (name->token == bfind_object.name.token && cmpname(name, &bfind_object.name)) { + if (DEBUG) { outsc("*** bfind found in cache "); outname(name); outsc(" at "); outnumber(bfind_object.address); outcr(); } + return bfind_object.address; + } + +/* walk through the heap from the last object added to the first */ + while (b <= memsize) { + +/* get the name and the type */ + bfind_object.name.token=memread2(b++); + b=getname(b, &bfind_object.name, memread2); + +/* determine the size of the object and advance */ + if (bfind_object.name.token != VARIABLE) { + bfind_object.size=getaddress(b, memread2); + b+=addrsize; + } else { + bfind_object.size=numsize; + } + +/* this is the location of the payload */ + bfind_object.address=b; + +/* have we found the object */ + if (name->token == bfind_object.name.token && cmpname(name, &bfind_object.name)) { + if (DEBUG) { outsc("*** bfind found "); outname(name); outsc(" at "); outnumber(bfind_object.address); outcr(); } + return bfind_object.address; + } + +/* advance on the heap */ + b0=b; + b+=bfind_object.size; + +/* safety net */ + if (b0 > b) { + error(EVARIABLE); + return 0; + } + + } + +/* nothing found return 0 and clear the cache */ + + if (DEBUG) { outsc("bfind returns 0"); outcr(); } + + zeroheap(&bfind_object); + return 0; +} + +/* reimplementation bfree with name interface */ +address_t bfree(name_t* name) { + address_t b; + address_t i; + + if (DEBUG) { outsc("*** bfree called for "); outname(name); outsc(" on heap with token "); outnumber(name->token); outcr(); } + +/* use bfind to find the place */ + b=bfind(name); + +/* nothing found, return 0 */ + if (b == 0) return 0; + + if (DEBUG) { outsc("** bfree found "); outnumber(b); outcr(); } + +/* clear the entire memory area */ + for (i=himem; i<=b+bfind_object.size-1; i++) memwrite2(i, 0); + +/* set the number of variables to the new value */ + himem=b+bfind_object.size-1; + + if (DEBUG) { outsc("** bfree returns "); outnumber(himem); outcr(); } + +/* forget the chache, because heap structure has changed !! */ + zeroheap(&bfind_object); + return himem; +} + +/* the length of an object, we directly return from the cache */ +address_t blength(name_t* name) { + if (bfind(name)) return bfind_object.size; else return 0; +} +#endif /* HASAPPLE1 */ + +/* reimplementation of getvar and setvar with name_t */ +number_t getvar(name_t *name){ + address_t a; + + if (DEBUG) { outsc("* getvar "); outname(name); outspc(); outcr(); } + +/* the special variables */ + if (name->c[0] == '@') { + switch (name->c[1]) { + case 'A': + return availch(); + case 'S': + return ert|ioer; + case 'I': + return id; + case 'O': + return od; + case 'C': + if (availch()) return inch(); else return 0; + case 'E': + return elength()/numsize; + case 0: + return (himem-top)/numsize; + case 'R': + return rd; + case 'U': + return getusrvar(); +#ifdef HASIOT + case 'V': + return vlength; +#endif +#if defined(DISPLAYDRIVER) || defined (GRAPHDISPLAYDRIVER) + case 'X': + return dspgetcursorx(); + case 'Y': + return dspgetcursory(); +#endif + } + } + +#ifdef HASAPPLE1 +/* search the heap first */ + a=bfind(name); + if (!USELONGJUMP && er) return 0; + +/* if we don't find on the heap and it is not a static variable, we autocreate */ + if (a == 0) { + a=bmalloc(name, 0); + if (!USELONGJUMP && er) return 0; + } + +/* something went wrong */ + if (a == 0) { + error(EVARIABLE); + return 0; + } +/* retrieve the value */ + return getnumber(a, memread2); + +#else +/* we only have the static variable array */ + if (name->c[0] >= 65 && name->c[0] <= 91 && name->c[1] == 0) return vars[name->c[0]-65]; + +/* systems without Apple1 extension i.e. HEAP throw an error */ + error(EVARIABLE); + return 0; +#endif +} + +/* set and create a variable */ +void setvar(name_t *name, number_t v){ + address_t a; + + if (DEBUG) { outsc("* setvar "); outname(name); outspc(); outnumber(v); outcr(); } + +/* the special variables */ + if (name->c[0] == '@') + switch (name->c[1]) { + case 'S': + ert=v; + ioer=v; + return; + case 'I': + id=v; + return; + case 'O': + od=v; + return; + case 'C': + outch(v); + return; + case 'R': + rd=v; + return; + case 'U': + setusrvar(v); + return; +#ifdef HASIOT + case 'V': + return; +#endif +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case 'X': + dspsetcursorx((int)v); +/* set the charcount, this is half broken but works */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=v; +#endif + return; + case 'Y': + dspsetcursory((int)v); + return; +#endif + } + +#ifdef HASAPPLE1 +/* dynamically allocated vars */ + a=bfind(name); + +/* autocreate if not found */ + if (a == 0) { + a=bmalloc(name, 0); + if (!USELONGJUMP && er) return; + } + +/* something went wrong */ + if (a == 0) { + error(EVARIABLE); + return; + } + +/* set the value */ + setnumber(a, memwrite2, v); +#else +/* the static variable array */ + if (name->c[1] == 0 && name->c[0] >= 65 && name->c[0] <= 91) { + vars[name->c[0]-65]=v; + return; + } + error(EVARIABLE); +#endif +} + +/* clr all variables */ +void clrvars() { + +/* delete all static variables */ + address_t i; + +/* clear static variable (only on no heap systems) */ +#ifndef HASAPPLE1 + for (i=0; ic[1]); + memwrite2(m--, name->c[0]); + return m; +} + +/* this one is for the pgm were we count up writing */ +address_t setname_pgm(address_t m, name_t* name) { + memwrite2(m++, name->c[0]); + memwrite2(m++, name->c[1]); + return m; +} + +/* get a name from a memory location */ +address_t getname(address_t m, name_t* name, memreader_t f) { + name->c[0]=f(m++); + name->c[1]=f(m++); + return m; +} + +/* compare two names */ +mem_t cmpname(name_t* a, name_t* b) { + if (a->c[0] == b->c[0] && a->c[1] == b->c[1]) return 1; else return 0; +} + +/* zero a name and a heap object */ +void zeroname(name_t* name) { + name->c[0]=0; + name->c[1]=0; + name->token=0; +} + +void zeroheap(heap_t* heap) { + heap->address=0; + heap->size=0; + zeroname(&heap->name); +} + +/* output a name */ +void outname(name_t* name) { + outch(name->c[0]); + if (name->c[1]) outch(name->c[1]); +} + +#else +/* this one is for the heap were we count down writing*/ +address_t setname_heap(address_t m, name_t* name) { + mem_t l; + for(l=name->l; l>0; l--) memwrite2(m--, name->c[l-1]); + memwrite2(m--, name->l); + return m; +} + +/* this one is for the pgm were we count up writing */ +address_t setname_pgm(address_t m, name_t* name) { + mem_t l; + memwrite2(m++, name->l); + for(l=0; ll; l++) memwrite2(m++, name->c[l]); + return m; +} + +/* get a name from a memory location */ +address_t getname(address_t m, name_t* name, memreader_t f) { + mem_t l; + name->l=f(m++); + + for(l=0; ll; l++) name->c[l]=f(m++); + for(; lc[l]=0; /* should not be there, is needed for + now because the lexer is not implemented correctly*/ + return m; +} + +/* compare two names */ +mem_t cmpname(name_t* a, name_t* b) { + mem_t l; + if (a->l != b->l) return 0; + for(l=0; ll; l++) if (a->c[l] != b->c[l]) return 0; + return 1; +} + +/* zero a name and a heap object */ +void zeroname(name_t* name) { + mem_t l; + name->l=0; + for(l=0; lc[l]=0; + name->token=0; +} + +void zeroheap(heap_t* heap) { + heap->address=0; + heap->size=0; + zeroname(&heap->name); +} + +/* output a name */ +void outname(name_t* name) { + mem_t l; + for(l=0; ll; l++) outch(name->c[l]); +} +#endif + + +/* create an array */ +/* reimplementation with name_t */ +address_t createarray(name_t* variable, address_t i, address_t j) { + address_t a; + +/* if we want to me MS compatible, the array ranges from 0-n */ + if (msarraylimits) { + i+=1; + j+=1; + } + + +/* this code allows redimension now for local variables */ +#ifdef HASAPPLE1 + if (DEBUG) { + outsc("* create array "); outname(variable); outspc(); + outsc("* with name length "); outnumber(variable->l); outspc(); + outnumber(i); outspc(); outnumber(j); outcr(); + } + +#ifndef HASMULTIDIM + return bmalloc(variable, i); +#else + +/* allocate the array space */ + a=bmalloc(variable, i*j); + +/* store the dimension of the array at the beginning of the array area */ + setaddress(a+i*j*numsize, memwrite2, j); + +/* return value is the address of the payload area */ + return a; +#endif +#endif + return 0; +} + +/* + * Reimplementation of the array function to avoid the various problem with the old one. + * we use the lefthandside object here with the convention that i is the first index + * and j the second index. This is inconsistent with the use in strings. Will be fixed + * when a true indexing type is introduced. + */ + +void array(lhsobject_t* object, mem_t getset, number_t* value) { + address_t a; /* the address of the array element */ + address_t h; /* the number of elements in the array */ + address_t l=arraylimit; /* the lower limit, defaults to the arraylimit, here for further use */ + address_t dim=1; /* the array dimension */ + + if (DEBUG) { + outsc("* array2: accessing "); + outname(&name); outspc(); outspc(); + outnumber(object->i); outspc(); + outnumber(object->j); outspc(); + outsc(" getset "); outch(getset); outcr(); + } + +/* handling the special array, range check and access is done here */ + if (object->name.c[0] == '@') { + switch(object->name.c[1]) { + case 'E': + h=elength()/numsize; + a=elength()-numsize*object->i; + if (a < eheadersize) { error(EORANGE); return; } + if (getset == 'g') *value=getnumber(a, eread); + else if (getset == 's') setnumber(a, eupdate, *value); + return; +#if defined(DISPLAYDRIVER) && defined(DISPLAYCANSCROLL) + case 'D': + if (getset == 'g') *value=dspget(object->i-1); + else if (getset == 's') dspset(object->i-1, *value); + return; +#endif +#if defined(HASCLOCK) + case 'T': + if (getset == 'g') *value=rtcget(object->i); + else if (getset == 's') rtcset(object->i, *value); + return; +#endif +#if defined(ARDUINO) && defined(ARDUINOSENSORS) + case 'S': + if (getset == 'g') *value=sensorread(object->i, 0); + return; +#endif + case 'U': + if (getset == 'g') *value=getusrarray(object->i); + else if (getset == 's') setusrarray(object->i, *value); + return; + case 0: + h=(himem-top)/numsize; + a=himem-numsize*(object->i+1)+1; + if (object->i < 0 || a < top) { error(EORANGE); return; } + if (getset == 'g') *value=getnumber(a, memread2); + else if (getset == 's') setnumber(a, memwrite2, *value); + return; + case 'M': + h=himem-top; + a=himem-object->i; + if (object->i < 0 || a < top) { error(EORANGE); return; } + if (getset == 'g') *value=memread2(a); + else if (getset == 's') memwrite2(a, *value); + return; + default: + error(EVARIABLE); + return; + } + } else { +/* dynamically allocated arrays */ +#ifdef HASAPPLE1 + object->name.token=ARRAYVAR; + if (!(a=bfind(&object->name))) a=createarray(&object->name, ARRAYSIZEDEF, 1); + if (!USELONGJUMP && er) return; + +/* multidim reserves one address word for the dimension, hence we have less bytes */ +#ifndef HASMULTIDIM + h=bfind_object.size/numsize; +#else + h=(bfind_object.size-addrsize)/numsize; +#endif + + if (DEBUG) { + outsc("** in array dynamical base address "); outnumber(a); + outsc(" and array element number"); outnumber(h); + outcr(); + } + +#ifdef HASMULTIDIM + dim=getaddress(a+bfind_object.size-2, memread2); + if (DEBUG) { + outsc("** in array, second dimension is "); outnumber(dim); + outspc(); outnumber(a+bfind_object.size); + outcr(); + } + a=a+((object->i-l)*dim+(object->j-l))*numsize; +#else + a=a+(object->i-l)*numsize; +#endif +#else /* no array code */ + error(EVARIABLE); + return; +#endif + } + +/* range check */ +#ifdef HASMULTIDIM + if ( (object->j < l) || (object->j >= dim+l) || (object->i < l) || (object->i >= h/dim+l)) { error(EORANGE); return; } +#else + if ( (object->i < l) || (object->i >= h+l) ) { error(EORANGE); return; } +#endif + +/* set or get the array */ + if (getset == 'g') *value=getnumber(a, memread2); + else if (getset == 's') setnumber(a, memwrite2, *value); +} + +/* Create a string on the heap, i is the length of the string, j the dimension of the array */ +address_t createstring(name_t* variable, address_t i, address_t j) { +#ifdef HASAPPLE1 + address_t a; + + if (DEBUG) { outsc("Create string "); outname(variable); outcr(); } + +/* the MS string compatibility, DIM 10 creates 11 elements */ + if (msarraylimits) j+=1; + +#ifndef HASMULTIDIM +/* if no string arrays are in the code, we reserve the number of bytes i and space for the index */ +/* allow redimension without check right now, for local variables */ + a=bmalloc(variable, i+strindexsize); + if (er != 0) return 0; + return a; +#else +/* string arrays need the number of array elements which address_ hence addresize bytes and then + the space for j strings */ +/* allow redimension without check right now, for local variables */ + a=bmalloc(variable, addrsize+j*(i+strindexsize)); + if (er != 0) return 0; + +/* set the array length */ + setaddress(a+j*(i+strindexsize), memwrite2, j); + +/* return the address of the first string */ + return a; +#endif + if (er != 0) return 0; + return a; +#else + return 0; +#endif +} + + +/* + * Get a string at position b. The -1+stringdexsize is needed because a string index starts with 1 + * in addition to the memory pointer, return the address in memory. + * We use a pointer to memory here instead of going through the mem interface with an integer variable. + * This makes string code lean to compile but is awkward for systems with serial memory. + * + * Getstring returns a pointer to the first string element in question. + * + * All side effects are removed now. (Hopefully). + */ +#ifdef HASAPPLE1 + +/* helpers to handle strings */ +/* stores a C string to a BASIC string variable */ +void storecstring(address_t ax, address_t s, char* b) { + address_t k; + + for (k=0; kaddress */ + +/* we know nothing about the string */ + ax=0; + strp->address=0; + strp->ir=0; + strp->length=0; + strp->arraydim=1; + strp->strdim=0; + + if (DEBUG) { + outsc("* getstring from var "); outname(name); outspc(); + outnumber(b); outspc(); + outnumber(j); outcr(); + } + +/* special string variables */ + if (name->c[0] == '@') + switch(name->c[1]) { + case 0: + strp->ir=ibuffer+b; + strp->length=ibuffer[0]; + strp->strdim=BUFSIZ-2; + return; + default: + error(EVARIABLE); + return; + case 'U': + makeusrstring(); /* a user definable special string in sbuffer */ + strp->ir=sbuffer+b; + strp->length=sbuffer[0]; + return; +#ifdef HASCLOCK + case 'T': + rtcmkstr(); /* the time string */ + strp->ir=rtcstring+b; + strp->length=rtcstring[0]; + return; +#endif +/* the arguments string on POSIX systems */ +#ifdef HASARGS + case 'A': + if (bargc > 2) { + strp->ir=bargv[2]; + strp->length=cstringlength(bargv[2], BUFSIZE); + return; + } + return; +#endif + } + +/* dynamically allocated strings, create on the fly */ + if (!(ax=bfind(name))) ax=createstring(name, defaultstrdim, arraylimit); + + if (DEBUG) { + outsc("** heap address "); outnumber(ax); outcr(); + if (ax) { outsc("** byte length of string memory segment "); outnumber(bfind_object.size); outcr(); } + } + +/* string creating has caused an error, typically no memoryy */ + if (!USELONGJUMP && er) return; + +#ifndef HASMULTIDIM +/* the maximum length of the string */ + strp->strdim=bfind_object.size-strindexsize; + +/* are we in range */ + if ((b < 1) || (b > strp->strdim )) { error(EORANGE); return; } + + if (DEBUG) { outsc("** maximum string length "); outnumber(strp->strdim); outcr(); } + +/* get the actual full length, this is redundant to lenstring but lenstring does + not autocreate */ + strp->length=getstrlength(ax, memread2); + +/* now find the payload address */ + ax=ax+strindexsize+(b-1); +#else + +/* the dimension of the string array */ +/* it is at the top of the string, this uses a side effect of bfind */ + strp->arraydim=getaddress(ax + bfind_object.size - addrsize, memread2); + +/* is the array index in range */ + if ((j < arraylimit) || (j >= strp->arraydim + arraylimit )) { error(EORANGE); return; } + + if (DEBUG) { outsc("** string dimension "); outnumber(strp->arraydim); outcr(); } + +/* the max length of a string */ + strp->strdim=(bfind_object.size - addrsize)/strp->arraydim-strindexsize; + +/* are we in range */ + if ((b < 1) || (b > strp->strdim )) { error(EORANGE); return; } + + if (DEBUG) { outsc("** maximum string length "); outnumber(strp->strdim); outcr(); } + +/* the base address of a string */ + ax=ax+(j-arraylimit)*(strp->strdim + strindexsize); + + if (DEBUG) { outsc("** string base address "); outnumber(ax); outcr(); } + +/* from this base address we can get the actual length of the string */ + strp->length=getstrlength(ax, memread2); + +/* the address of the payload */ + ax=ax+b-1+strindexsize; + +#endif + + if (DEBUG) { outsc("** payload address "); outnumber(ax); outcr(); } + +/* store the payload address to the string object, length to be done if needed!! */ + strp->address=ax; + +/* return value is 0 if we have no direct memory access, the caller needs to handle the string + through the mem address */ +#ifdef USEMEMINTERFACE + strp->ir=0; +#else + strp->ir=(char *)&mem[ax]; +#endif +} + + +/* reimplementation with name_t */ +/* set the length of a string */ +void setstringlength(name_t* name, address_t l, address_t j) { + address_t a; + stringlength_t stringdim; + + if (DEBUG) { + outsc("** setstringlength "); + outname(name); + outspc(); outnumber(l); outspc(); outnumber(j); + outcr(); + } + +/* the special strings */ + if (name->c[0] == '@') + switch(name->c[1]) { + case 0: + *ibuffer=l; + return; + case 'U': + /* do nothing here for the moment */ + return; + } + +/* find the variable address */ + a=bfind(name); + if (!USELONGJUMP && er) return; + if (a == 0) { error(EVARIABLE); return; } + +/* stringdim calculation moved here */ +#ifndef HASMULTIDIM + stringdim=bfind_object.size-strindexsize; +#else +/* getaddress seeks the dimension of the string array directly after the payload */ + stringdim=(bfind_object.size - addrsize)/(getaddress(a + bfind_object.size - addrsize, memread2)) - strindexsize; +#endif + +/* where do we write it to */ + a=a+(stringdim+strindexsize)*(j-arraylimit); + if (DEBUG) { outsc("** setstringlength writing to "); outnumber(a); outsc(" value "); outnumber(l); outcr(); } + setstrlength(a, memwrite2, l); +} + +/* the BASIC string mechanism for real time clocks, create a string with the clock data */ +#ifdef HASCLOCK +void rtcmkstr() { + int cc = 1; + int t; + +/* hours */ + t=rtcget(2); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* minutes */ + t=rtcget(1); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* seconds */ + t=rtcget(0); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='-'; + +/* days */ + t=rtcget(4); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* months */ + t=rtcget(5); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* years */ + t=rtcget(6)%100; /* only 100 years no 19xx epochs */ + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc]=0; + +/* needed for BASIC strings */ + rtcstring[0]=cc-1; +} +#endif +#endif + +/* + * Layer 0 Extension: the user defined extension functions, use this function for a + * quick way to extend BASIC. + * + * @U is a single variable that can be set and get. Every access to this variable + * calls getusrvar() or setusrvar(). + * @U() is a 1d array every access calls get or setusrarray(). + * @U$ is a read only string created by makeusrstring(). + * USR(32, V) is a user defined function created by usrfunction(). + * CALL 32 is a user defined call + * + */ + +/* read or write the variable @U, you can do anything you want here */ +number_t getusrvar() { return 0; } +void setusrvar(number_t v) {return; } + +/* read or write the array @U(), you can do anything you want here */ +number_t getusrarray(address_t i) {return 0;} +void setusrarray(address_t i, number_t v) {return; } + +/* make the usr string from @U$, this function can be called multiple times for one operation */ +void makeusrstring() { +/* + * sample code could be: + * + * mem_t i; + * const char text[] = "hello world"; + * for(i=0; i 31 calls this */ +number_t usrfunction(address_t i, number_t v) { return 0; } + +/* CALL with arguments > 31 calls this */ +void usrcall(address_t i) { return; } + +/* + * Layer 0 - keyword handling - PROGMEM logic goes here + * getkeyword(), getmessage(), and getokenvalue() are + * the only access to the keyword array in the code. + * + * Same for messages and errors. + * + * All keywords are stored in PROGMEM, the Arduino way to store + * constant data in flash memory. sbuffer is used to recall the + * keywords and messages from PROGMEM on Arduino. Other systems + * use the keyword array directly. + */ +char* getkeyword(address_t i) { + + if (DEBUG) { outsc("** getkeyword from index "); outnumber(i); outcr(); } + +#ifndef ARDUINOPROGMEM + return (char *) keyword[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(keyword[i]))); + return sbuffer; +#endif +} + +/* messages are read from the message array */ +char* getmessage(char i) { + if (i >= sizeof(message) || i < 0) return 0; +#ifndef ARDUINOPROGMEM + return (char *) message[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(message[i]))); + return sbuffer; +#endif +} + +/* tokens read here are token_t constructed from multi byte sequences */ +token_t gettokenvalue(address_t i) { + if (i >= sizeof(tokens)) return 0; +#ifndef ARDUINOPROGMEM + return tokens[i]; +#else +#ifndef HASLONGTOKENS + return (token_t) pgm_read_byte(&tokens[i]); +#else + return (token_t) pgm_read_word(&tokens[i]); +#endif +#endif +} + +/* print a message directly to the default outpur stream */ +void printmessage(char i){ +#ifndef HASERRORMSG + if (i > EGENERAL) return; +#endif + outsc((char *)getmessage(i)); +} + +/* + * Layer 0 - error handling + * + * The general error handler. The static variable er + * contains the error state. + * + * debugtoken() writes a token for debug + * bdebug() is the general debug message function + * + * Strategy: the error() function writes the message and then + * clears the stack. All calling functions must check er and + * return after funtion calls with no further messages etc. + * reseterror() sets the error state to normal and end the + * run loop. + */ +void error(token_t e){ + address_t i; + +/* store the error number */ + er=e; + +/* clear the stacks */ + clearst(); + clrforstack(); + clrgosubstack(); + +/* switch off all timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +/* is the error handler active? then silently go if we do GOTO or CONT actions in it */ +#ifdef HASERRORHANDLING +#if !USELONGJUMP + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) return; +#else + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) longjmp(sthook, er); +#endif +#endif + +/* set input and output device back to default, and delete the form */ + iodefaults(); + form=0; + +/* find the line number if in RUN modes */ + if (st != SINT) { + outnumber(myline(here)); + outch(':'); + outspc(); + } + +/* if we have error messages, display them */ +#ifdef HASERRORMSG + if (e > 0) + printmessage(e); + else { + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=e; i++); + outsc(getkeyword(i)); + } + outspc(); + printmessage(EGENERAL); +#else + printmessage(EGENERAL); + outspc(); + outnumber(er); +#endif + if (DEBUG) { outsc("** at "); outnumber(here); } + outcr(); + +/* reset fncontext - this is odd */ + fncontext=0; + +/* we return to the statement loop, bringing the error with us */ +#if USELONGJUMP == 1 + longjmp(sthook, er); +#endif +} + +void reseterror() { + er=0; + here=0; + st=SINT; +} + +void debugtoken(){ + outsc("* "); + if (debuglevel>2) { outnumber(here); outsc(" * "); } + + if (token == EOL) { + outsc("EOL"); + return; + } + + switch(token) { + case LINENUMBER: + printmessage(MLINE); + break; + case NUMBER: + printmessage(MNUMBER); + break; + case VARIABLE: + printmessage(MVARIABLE); + break; + case ARRAYVAR: + printmessage(MARRAY); + break; + case STRING: + printmessage(MSTRING); + break; + case STRINGVAR: + printmessage(MSTRINGVAR); + break; + } + + outspc(); + outputtoken(); +} + +void bdebug(const char *c){ + outch('*'); + outspc(); + outsc(c); + debugtoken(); + outcr(); +} + +/* + * Arithmetic and runtime operations are mostly done + * on a stack of number_t. + * + * push(), pop(), clearst() handle the stack + */ +void push(number_t t){ + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(t); outcr(); + } + +/* in forced integer mode every operation is truncated */ +#ifdef HASFLOAT + if (forceint) t=trunc(t); +#endif + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].n=t; +} + +number_t pop(){ + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp-1].n); outcr(); + } + + if (sp == 0) { error(ESTACK); return 0; } + + return stack[--sp].n; +} + +void pushaddress2(address_t a) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(a); outcr(); + } + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].a=a; +} + +address_t popaddress2() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp-1].a); outcr(); + } + + if (sp == 0) { error(ESTACK); return 0; } + + return stack[--sp].a; +} + +void pushinteger(index_t i) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(i); outcr(); + } + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].i=i; +} + +index_t popinteger() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp-1].i); outcr(); + } + + if (sp == 0) { error(ESTACK); return 0; } + + return stack[--sp].i; +} + + +/* this one gets a positive integer from the stack and traps the error*/ +address_t popaddress(){ + number_t tmp = 0; + + tmp=pop(); + if (tmp < 0) { error(EORANGE); return 0;} + return (address_t) tmp; +} + +void clearst(){ + sp=0; +} + +/* these are not really stack operations but a way to handle temp char data */ +address_t charsp; + +void pushchar(char ch) {} + +char popchar() { return 0; } + +/* + * clear the cursor for the READ/DATA mechanism + */ +void clrdata() { +#ifdef HASDARTMOUTH + data=0; +#endif +} + +/* + * Stack handling for FOR + * Reimplementation of the for stack with names and with all loops + * cleaned up. + */ + +/* the new stack type for loops */ +void pushloop(name_t* name, token_t t, address_t here, number_t to, number_t step) { + address_t i; + + if (DEBUG) { + outsc("** loopsp and here in pushloopstack "); + outnumber(loopsp); outspc(); outnumber(here); outcr(); + if (name != 0) { outsc("** loop name "); outname(name); outcr(); } + else { outsc("** loop name is 0"); outcr(); } + outsc("** loop token "); outnumber(t); outcr(); + outsc("** loop to "); outnumber(to); outcr(); + outsc("** loop step "); outnumber(step); outcr(); + } + +/* + * Before pushing into the loop stack we check is an + * old loop exists. + * + * There are two situations to handle: + * 1. A loop is reentered because a GOTO went back to or even before + * the loop start. This is identified by the here location. + * 2. A new FOR loop is created after the existing loop with the same + * variable name. This happens if a jump or break went outside the + * loop. This is identified by the variable name. +*/ + +/* Situation 1, scan for here */ + for(i=0; i0) { + return &loopstack[loopsp-1]; + } else { + error(ELOOP); + return 0; + } +} + +void droploop() { + if (loopsp>0) { + loopsp--; + } else { + error(ELOOP); + return; + } +} + +void clrforstack() { + loopsp=0; +} + +/* GOSUB stack handling */ +void pushgosubstack(mem_t a){ + if (gosubsp < GOSUBDEPTH) { + gosubstack[gosubsp]=here; +#ifdef HASEVENTS + gosubarg[gosubsp]=a; +#endif + gosubsp++; + } else + error(TGOSUB); +} + +void popgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TRETURN); + return; + } + here=gosubstack[gosubsp]; +} + +void dropgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TGOSUB); + } +} + +void clrgosubstack() { + gosubsp=0; +} + +/* two helper commands for structured BASIC, without the GOSUB stack */ + +void pushlocation(blocation_t* l) { + if (st == SINT) l->location=bi-ibuffer; + else l->location=here; + l->token=token; +} + +void poplocation(blocation_t* l) { + if (st == SINT) bi=ibuffer+l->location; + else here=l->location; + token=l->token; +} + +/* little helpers of the io functions */ + +/* send a newline */ +void outcr() { +#ifdef HASSERIAL1 + if (sendcr) outch('\r'); +#endif + outch('\n'); +} + +/* send a space */ +void outspc() { + outch(' '); +} + +/* output a zero terminated string - c style */ +void outsc(const char *c){ while (*c != 0) outch(*c++); } + +/* output a zero terminated string in a formated box padding spaces + needed for catalog output */ +void outscf(const char *c, index_t f){ + int i = 0; + + while (*c != 0) { outch(*c++); i++; } + if (f > i) { + f=f-i; + while (f--) outspc(); + } +} + +/* + * reading a positive number from a char buffer + * maximum number of digits is adjusted to 16 + * ugly here, testcode when introducting + * number_t was only 16 bit before + */ +address_t parsenumber(char *c, number_t *r) { + address_t nd = 0; + + *r=0; + while (*c >= '0' && *c <= '9' && *c != 0) { + *r=*r*10+*c++-'0'; + nd++; + if (nd == SBUFSIZE) break; + } + return nd; +} + + +#ifdef HASFLOAT +/* a poor man's atof implementation with character count */ +address_t parsenumber2(char *c, number_t *r) { + address_t nd = 0; + index_t i; + number_t fraction = 0; + number_t exponent = 0; + mem_t nexp = 0; + + *r=0; + +/* integer part */ + i=parsenumber(c, r); + c+=i; + nd+=i; + +/* the fractional part */ + if (*c == '.') { + c++; + nd++; + + i=parsenumber(c, &fraction); + c+=i; + nd+=i; + + if (i > 0) { + while ((--i)>=0) fraction=fraction/10; + *r+=fraction; + } + } + +/* the exponent */ + if (*c == 'E' || *c == 'e') { + c++; + nd++; + if (*c == '-') {c++; nd++; nexp=1;}; + i=parsenumber(c, &exponent); + nd+=i; + while ((--exponent)>=0) if (nexp) *r=*r/10; else *r=*r*10; + } + + return nd; +} +#endif + +/* + * convert a number to a string + * the argument type controls the largest displayable integer + * default is int but it can be increased without any side effects + */ +address_t writenumber(char *c, wnumber_t v){ + address_t nd = 0; + index_t i,j; + mem_t s = 1; + char c1; + +/* the sign */ + if (v<0) s=-1; + +/* the digits */ + do { + c[nd++]=(v%10)*s+'0'; + v=v/10; + } while (v != 0); + +/* print the minus */ + if (s < 0 ) c[nd]='-'; else nd--; + +/* reverse the order of digits */ + i=0; + j=nd; + while (j>i) { + c1=c[i]; + c[i]=c[j]; + c[j]=c1; + i++; + j--; + } + + nd++; + c[nd]=0; + return nd; +} + +#ifdef HASFLOAT +/* + * this is for floats, handling output without library + * functions as well. + */ +address_t tinydtostrf(number_t v, index_t p, char* c) { + index_t i; + address_t nd = 0; + number_t f; + +/* if we are in forced integer mode */ + if (forceint) { + v=trunc(v); + return writenumber(c, (int)v); + } + +/* we do the sign here and don't rely on writenumbers sign handling, guess why */ + if (v<0) { + v=fabs(v); + c[nd++]='-'; + } + +/* write the integer part */ + nd+=writenumber(c+nd, (int)v); + c[nd++]='.'; + +/* only the fraction to precision p */ + f=fabs(v); + +/* get p digits of the fraction */ + for (i=p; i>0; i--) { + f=f-floor(f); + f=f*10; + c[nd++]=(int)floor(f)+'0'; + } + +/* and a terminating 0 */ + c[nd]=0; + return nd; +} + +address_t writenumber2(char *c, number_t vi) { + index_t i; + index_t nd; + number_t f; + index_t exponent = 0; + mem_t eflag=0; + const int p = 5; + +/* pseudo integers are displayed as integer + zero trapped here */ + f=floor(vi); + if (f == vi && fabs(vi) < maxnum) return writenumber(c, vi); + +/* earlier, floats where displayed in POSIx using the libraties + * return sprintf(c, "%g", vi); + * we dont do this any more + */ + +/* we check if we have anything to write */ + if (!isfinite(vi)) { + c[0]='*'; + c[1]=0; + return 1; + } + +/* normalize the number and see which exponent we have to deal with */ + f=vi; + while (fabs(f)<1.0) { f=f*10; exponent--; } + while (fabs(f)>=10.0-0.00001) { f=f/10; exponent++; } + +/* there are platforms where dtostrf is broken, we do things by hand in a simple way */ + + if (exponent > -2 && exponent < 7) { + tinydtostrf(vi, 5, c); + } else { + tinydtostrf(f, 5, c); + eflag=1; + } + +/* remove trailing zeros */ + for (i=0; (i < SBUFSIZE && c[i] !=0 ); i++); + i--; + +/* */ + while (c[i] == '0' && i>1) { i--; } + i++; + +/* add the exponent */ + if (eflag && exponent != 0) { + c[i++]='E'; + i+=writenumber(c+i, exponent); + } + + c[i]=0; + return i; + +} +#endif + +/* + * innumber is used as a helper only by xinput(). It reads a number from an input + * buffer and returns it in the number_t r. It returns 0 if the number is invalid, 1 if + * the number is valid, and -1 if the user has pressed the BREAKCHAR key. + * + * Unlike the old innumber() implementation it is meant to read comma separated numbers + * through input. Handling of the buffer is done by the calling function. + * + * The TINYBASICINPUT is an alternative implementation following the Palo Alto BASIC + * way of doing it. The expression parser is reused. This allows variables names and + * expressions to be used as input as well. + * Due to the reuse of sbuffer in the calling function, this will probably only work + * in RUN mode. + */ + +int innumber(number_t *r, char* buffer, address_t k) { + address_t i = k; + mem_t s = 1; + +#ifndef HASTINYBASICINPUT +/* result is zero*/ + *r=0; + +/* remove all leading whitespaces first */ + while ((buffer[i] == ' ' || buffer[i] == '\t') && i <= (address_t) buffer[0]) i++; + +/* is there anything left */ + if (i > (address_t) buffer[0]) return 0; + +/* now the sign */ + if (buffer[i] == '-') { s=-1; i++; } + +/* check for the break character */ + if (buffer[i] == BREAKCHAR) return -1; + +/* the number */ +#ifndef HASFLOAT + if (buffer[i] < '0' || buffer[i] > '9') return 0; + i+=parsenumber(&buffer[i], r); +#else + if ((buffer[i] < '0' || buffer[i] > '9') && buffer[i] != '.') return 0; + i+=parsenumber2(&buffer[i], r); +#endif + +/* the sign */ + *r*=s; + return i; +#else + char *b; + token_t t; + +/* result is zero */ + *r=0; + +/* save the interpreter state */ + b=bi; + s=st; + t=token; + +/* switch to fake interactive with the buffer as input */ + st=SINT; + bi=buffer+k; + +/* BREAK handling */ + if (*bi == BREAKCHAR) { + return -1; + } + +/* start to interpret the buffer as an expression */ + nexttoken(); + expression(); + +/* restore the interpreter state */ + i=bi-buffer-1; + bi=b; + st=s; + token=t; + +/* error handling, we trap the error and return zero */ + if (er) { + er=0; + return 0; + } + +/* the result is on the stack */ + *r=pop(); + return i; +#endif +} + +/* prints a number */ +void outnumber(number_t n){ + address_t nd, i; + +/* number write to sbuffer, remember the number of digits in nd */ +#ifndef HASFLOAT + nd=writenumber(sbuffer, n); +#else + nd=writenumber2(sbuffer, n); +#endif + +/* negative number format aligns right */ + if (form < 0) { i=nd; while(i < -form) {outspc(); i++;} } + +/* the number */ + outs(sbuffer, nd); + +/* number formats in Palo Alto style, positive numbers align left */ + if (form > 0) { while (nd < form) {outspc(); nd++;} } +} + +/* + * Layer 1 functions - providing data into the global variable and + * changing the interpreter state + */ + +/* + * Lexical analyser - tokenizes the input line. + * + * nexttoken() increments the input buffer index bi and delivers values in the global + * variable token, with arguments in the accumulators ax, x and the index register ir + * name is used in the routine. + * + * name, sr, ax and x change values in nexttoken and deliver the result to the calling + * function. + * + * bi and ibuffer should not be changed or used for any other function in + * interactive node as they contain the state of nexttoken(). In run mode + * bi and ibuffer are not used as the program is fully tokenized in mem. + * + * all this is pretty much stateless. + */ + +/* skip whitespaces */ +void whitespaces(){ + while (*bi == ' ' || *bi == '\t') bi++; +} + +/* upper case, don't trust the buildins on microcontrollers */ +char btoupper(char c) { + if (c >= 'a' && c <= 'z') return c-32; else return c; +} + +/* the token stream */ +void nexttoken() { + address_t k, l, i; + char* ir; + char quotechar; + +/* RUN mode vs. INT mode, in RUN mode we read from mem via gettoken() */ + if (st == SRUN || st == SERUN) { +/* in the token stream we call fastticker - all fast timing functions are in stream */ + fastticker(); +/* read the token from memory */ + gettoken(); +/* show what we are doing */ + if (debuglevel>1) { debugtoken(); outcr(); } + return; + } + +/* after change in buffer logic the first byte is reserved for the length */ + if (bi == ibuffer) bi++; + +/* literal mode only(!) EOL ends literal mode, used to have REM without quotes */ + if (lexliteral) { + token=*bi; + if (*bi != '\0') bi++; else lexliteral=0; + return; + } + +/* remove whitespaces outside strings */ + whitespaces(); + +/* end of line token */ + if (*bi == '\0') { + token=EOL; + if (DEBUG) debugtoken(); + return; + } + +/* unsigned numbers, value returned in x */ +#ifndef HASFLOAT + if (*bi <='9' && *bi >= '0') { + bi+=parsenumber(bi, &x); +#else + if ((*bi <='9' && *bi >= '0') || *bi == '.') { + bi+=parsenumber2(bi, &x); +#endif + token=NUMBER; + if (DEBUG) debugtoken(); + return; + } + +/* strings between " " or " EOL, value returned in ir and in sr for now */ + if (*bi == '"' || *bi == '\'') { + quotechar=*bi; + k=0; + bi++; + ir=bi; + sr.ir=bi; + while(*bi != quotechar && *bi !='\0') { + k++; + bi++; + } + bi++; + token=STRING; + sr.length=k; + sr.address=0; /* we don't find the string in BASIC memory, as we lex from bi */ + if (DEBUG) debugtoken(); + return; + } + +/* + * relations + * single character relations are their own token + * >=, =<, =<, =>, <> are tokenized + */ + if (*bi == '=') { + bi++; + whitespaces(); + if (*bi == '>') { + token=GREATEREQUAL; + bi++; + } else if (*bi == '<') { + token=LESSEREQUAL; + bi++; + } else { + token='='; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '>'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=GREATEREQUAL; + bi++; + } else { + token='>'; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '<'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=LESSEREQUAL; + bi++; + } else if (*bi == '>') { + token=NOTEQUAL; + bi++; + } else { + token='<'; + } + if (DEBUG) debugtoken(); + return; + } + +/* + * Keyworks and variables + * + * Isolate a word, bi points to the beginning, l is the length of the word. + * ir points to the end of the word after isolating. + * @ is a letter here to make the special @ arrays possible. + */ + + l=0; + ir=bi; + while (-1) { + if (*ir >= 'a' && *ir <= 'z') { + if (!lowercasenames) *ir-=32; /* toupper code, changing the input buffer directly */ + ir++; + l++; + } else if ((*ir >= '@' && *ir <= 'Z') || *ir == '_') { + ir++; + l++; + } else { + break; + } + } + + +/* + * Ir is reused here to implement string compares + * scanning the keyword array. + * Once a keyword is detected the input buffer is advanced + * by its length, and the token value is returned. + * + * Keywords are an array of null terminated strings. + * They are always matched uppercase. + */ + k=0; + while (gettokenvalue(k) != 0) { + ir=getkeyword(k); + i=0; + while (*(ir+i) != 0) { + if (*(ir+i) != btoupper(*(bi+i))) { + k++; + i=0; + break; + } else + i++; + } + if (i == 0) continue; + bi+=i; + token=gettokenvalue(k); + if (token == TREM) lexliteral=1; + if (DEBUG) debugtoken(); + return; + } + +/* + * A variable has length 2 with either two letters or a letter + * and a number. @ can be the first letter of a variable. + * Here, no tokens can appear any more as they have been processed + * further up. + * + * The longname code supports MAXNAME characters and _ as additional character. + */ +#ifdef HASLONGNAMES + if (l>0 && l<=MAXNAME) { + token=VARIABLE; + zeroname(&name); + while (((*bi >= '0' && *bi <= '9') || + (*bi >= '@' && *bi <= 'Z') || + (*bi >= 'a' && *bi <= 'z') || + (*bi == '_') ) && name.l < MAXNAME && *bi != 0) { + name.c[name.l]=*bi; + bi++; + name.l++; + } + if (*bi == '$') { + token=STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token=ARRAYVAR; + } +/* the new code filling the name variable directly, will be used in the entire code soon */ + name.token=token; + if (DEBUG) debugtoken(); + return; + } +#else + if (l == 1 || l == 2) { + token=VARIABLE; + name.l=0; + name.c[0]=*bi; + name.c[1]=0; + bi++; + if ((*bi >= '0' && *bi <= '9') || (*bi >= 'A' && *bi <= 'Z') || *bi == '_' ) { + name.c[1]=*bi; + bi++; + } + if (*bi == '$') { + token=STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token=ARRAYVAR; + } +/* the new code filling the name variable directly, will be used in the entire code soon */ + name.token=token; + if (DEBUG) debugtoken(); + return; + } +#endif + +/* other single characters are parsed and stored */ + token=*bi; + bi++; + if (DEBUG) debugtoken(); + return; +} + +/* + * Layer 1 - program editor + * + * Editing the program, the structure of a line is + * LINENUMBER linenumber(2 or more bytes) token(n bytes) + * + * store* stores something to memory + * get* retrieves information + * + * No matter how long number_t is in the C implementation + * we pack into bytes, this is clumsy but portable + * the store and get commands all operate on here + * and advance it + * + * storetoken() operates on the variable top. + * We always append at the end and then sort. + * + * gettoken() operate on the variable here + * which will also be the key variable in run mode. + * + * tokens are stored including their payload. + * + * This group of functions changes global states and + * cannot be called at program runtime with saving + * the relevant global variable to the stack. + */ + +/* + * check if we still have memory left, on RAM only systems we make + * sure that we don't hit himem. On systems with EEPROM program storage we make + * sure that we stay within the EEPROM range. + */ +char nomemory(number_t b){ +#ifndef EEPROMMEMINTERFACE + if (top >= himem-b) return 1; else return 0; +#else + if (top >= elength()-eheadersize-b) return 1; else return 0; +#endif +} + +/* store a token - check free memory before changing anything */ +void storetoken() { + int i; + + switch (token) { + case LINENUMBER: + if (nomemory(addrsize+1)) break; + memwrite2(top++, token); + setaddress(top, memwrite2, ax); + top+=addrsize; + return; + case NUMBER: + if (nomemory(numsize+1)) break; + memwrite2(top++, token); + setnumber(top, memwrite2, x); + top+=numsize; + return; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + if (nomemory(sizeof(name_t))) break; + memwrite2(top++, token); + top=setname_pgm(top, &name); + return; + case STRING: + i=sr.length; + if (nomemory(i+2)) break; + memwrite2(top++, token); + memwrite2(top++, i); + while (i > 0) { memwrite2(top++, *sr.ir++); i--; } + return; + default: + if (token >= -127) { /* the good old code with just one byte token */ + if (nomemory(1)) break; + memwrite2(top++, token); + } else { +#ifdef HASLONGTOKENS + if (nomemory(2)) break; /* this is the two byte token extension */ + memwrite2(top++, TEXT1); + memwrite2(top++, token+255); +#endif + } + return; + } +} + + +/* + * wrappers around mem access in genereal + * + * memread is used only in the token stream, it reads from a stream + * read only. If run is done from eeprom then bytes are taken from this + * stream, this would also be the place to implement direct run from + * another device like a file system or embedded programs on flash. + * Only the token stream uses memread. + * + * memread2 and memwrite2 always go to ram. They are read/write. Variables and + * the program editor uses these functions. + * + * currently only the SPIRAM and the EEPROM direct edit interface is implemented. + * This is handled in the runtime library. + * + * USEMEMINTERFACE is the macro to control this. + * + * The POSIX code has a test interface for SPIRAM as a dummy. + * + */ +#ifndef USEMEMINTERFACE +mem_t memread(address_t a) { + if (st != SERUN) { + return mem[a]; + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return mem[a]; } + +void memwrite2(address_t a, mem_t c) { mem[a]=c; } +#else +#if defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR) +mem_t memread(address_t a) { + if (st != SERUN) { + return spiram_robufferread(a); + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return spiram_rwbufferread(a); } + +void memwrite2(address_t a, mem_t c) { spiram_rwbufferwrite(a, c); } +#else +#ifdef EEPROMMEMINTERFACE +mem_t memread(address_t a) { + if (a < elength()-eheadersize) return eread(a+eheadersize); else return mem[a-(elength()-eheadersize)]; +} + +mem_t memread2(address_t a) { return memread(a); } + +void memwrite2(address_t a, mem_t c) { + if (a < elength()-eheadersize) eupdate(a+eheadersize, c); else mem[a-(elength()-eheadersize)]=c; +} +#endif +#endif +#endif + + +/* get a token from memory */ +void gettoken() { + stringlength_t i; + +/* if we have reached the end of the program, EOL is always returned + we don't rely on mem having a trailing EOL */ + if (here >= top) { + token=EOL; + return; + } + +/* if we have no data type we are done reading just one byte */ + token=memread(here++); + name.token=token; + +/* if there are multibyte tokens, get the next byte and construct a token value <-127 */ +#ifdef HASLONGTOKENS + if (token == TEXT1) { + token=memread(here++)-255; + } +#endif + + /* otherwise we check for the argument */ + switch (token) { + case LINENUMBER: + ax=getaddress(here, memread); + here+=addrsize; + break; + case NUMBER: + x=getnumber(here, memread); + here+=numsize; + break; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + here=getname(here, &name, memread); + name.token=token; + break; + case STRING: + sr.length=(unsigned char)memread(here++); + +/* + * if we run from EEPROM, the input buffer is used to get string constants. + * if we run on a system with real memory, we produce a mem pointer + * otherwise the caller has to handle strings through the address (SPIRAM systems) + */ + if (st == SERUN) { + for(i=0; i= top) { + here=top; + ax=0; + return; + } + } +} + +/* + * the line cache mechanism, useful for large codes. + * addlinecache does not test if the line already exist because it + * assumes that findline calls it only if a new line is to be stored + * the LINECACHE size depends on the architecture. + */ +#if defined(LINECACHESIZE) && LINECACHESIZE>0 +const unsigned char linecachedepth = LINECACHESIZE; +typedef struct {address_t l; address_t h;} linecacheentry; +linecacheentry linecache[LINECACHESIZE]; +unsigned char linecachehere = 0; + +void clrlinecache() { + unsigned char i; + + for(i=0; i= h) break; + gettoken(); + } + here=here2; + if (token == LINENUMBER) + return l1; + else + return l; +} + +/* + * Move a block of storage beginng at b ending at e + * to destination d. No error handling here!! + */ +void moveblock(address_t b, address_t l, address_t d) { + address_t i; + + if (d+l > himem) { + error(EOUTOFMEMORY); + return; + } + if (l<1) return; + + if (b < d) for (i=l; i>0; i--) memwrite2(d+i-1, memread2(b+i-1)); + else for (i=0; i himem) { error(EOUTOFMEMORY); return; } + if (l<1) return; + + for (i=0; i y) break; + } + +/* + * at this point y contains the number of the line to be inserted + * x contains the number of the first line with a higher line number + * or 0 if the line is to be inserted at the end + * here points to the following line and here2 points to the previous line + */ + if (ax == 0) { + here=here3-lnlength; + gettoken(); + if (token == LINENUMBER && ax == y) { + here2-=lnlength; + here-=lnlength; + moveblock(here2, linelength, here); + top=here+linelength; + } + return; + } + here-=lnlength; + t1=here; + here=here2-lnlength; + t2=here; + gettoken(); + if (ax == y) { /* the line already exists and has to be replaced */ + here2=t2; /* this is the line we are dealing with */ + here=t1; /* this is the next line */ + y=here-here2; /* the length of the line as it is */ + if (linelength == y) { /* no change in line length */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else if (linelength > y) { /* the new line is longer than the old one */ + moveblock(here, top-here, here+linelength-y); + here=here+linelength-y; + top=top+linelength-y; + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else { /* the new line is short than the old one */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + moveblock(here, top-here, here2+linelength); + top=top-y+linelength; + } + } else { /* the line has to be inserted in between */ + here=t1; + moveblock(here, top-here, here+linelength); + moveblock(top, linelength, here); + } + } +} + +/* + * Layer 1 - the code in this section calculates an expression + * with a recursive descent algorithm + * + * all function use the stack to pass values back. We use the + * Backus-Naur form of basic from here https: + * implementing a C style logical expression model + */ + +/* the terminal symbol it ends a statement list - ELSE is one too as it ends a statement list */ +char termsymbol() { + return (token == LINENUMBER || token == ':' || token == EOL || token == TELSE); +} + +/* a little helpers - one token expect */ +char expect(token_t t, mem_t e) { + nexttoken(); + if (token != t) {error(e); return 0; } else return 1; +} + +/* a little helpers - expression expect */ +char expectexpr() { + nexttoken(); + expression(); + if (er != 0) return 0; else return 1; +} + +/* parses a list of expression, this may be recursive! */ +void parsearguments() { + short argsl; + +/* begin counting */ + argsl=0; + +/* having 0 args at the end of a command is legal */ + if (!termsymbol()) { + +/* list of expressions separated by commas */ + do { + expression(); + if (er != 0) break; + argsl++; + if (token == ',') nexttoken(); else break; + } while (1); + } + +/* because of the recursion ... */ + args=argsl; +} + + +/* expect exactly n arguments */ +void parsenarguments(char n) { + parsearguments(); + if (args != n) error(EARGS); +} + +/* counts and parses the number of arguments given in brakets, this function + should not advance to the next token because it is called in factor */ +void parsesubscripts() { + blocation_t l; + + args=0; + + if (DEBUG) { + outsc("** in parsesubscripts "); outcr(); + bdebug("token "); + } + +/* remember where we where */ + pushlocation(&l); + +/* parsesubscripts is called directly after the object in question, it does + nexttoken() itself now */ + nexttoken(); + +/* if we have no bracket here, we return with zero */ + if (token != '(') { + poplocation(&l); + return; + } + nexttoken(); + +/* if () we return also with -1 */ +#ifdef HASMULTIDIM + if (token == ')') { + args=-1; + return; + } +#endif + +/* now we are ready to parse a set of arguments */ + parsearguments(); + if (!USELONGJUMP && er) return; + + if (token != ')') { error(EARGS); return; } /* we return with ) as a last token on success */ + +/* we end with the ) still as active token */ +} + +/* parse a function argument ae is the number of + expected expressions in the argument list, parsesubscripts + should not avance precisely because it is used in factor */ + +void parsefunction(void (*f)(), short ae){ + parsesubscripts(); + if (!USELONGJUMP && er) return; + if (args == ae) f(); else error(EARGS); +} + +/* helper function in the recursive decent parser */ +void parseoperator(void (*f)()) { + mem_t u=1; + + nexttoken(); +/* unary minuses in front of an operator are consumed once! */ + if (token == '-') { + u=-1; + nexttoken(); + } +/* the operator */ + f(); + if (er !=0 ) return; + y=pop(); + if (u == -1) y=-y; + x=pop(); +} + +/* + * ABS absolute value + */ +void xabs(){ + number_t x; + + if ((x=pop())<0) { x=-x; } + push(x); +} + +/* + * SGN evaluates the sign + */ +void xsgn(){ + number_t x; + + x=pop(); + if (x>0) x=1; + if (x<0) x=-1; + push(x); +} + +/* + * PEEK on an arduino, negative values of peek address + * the EEPROM range -1 .. -1024 on an UNO + */ +void xpeek(){ + number_t a; + +/* get the argument from the stack because this is a function only */ + a=pop(); + +/* the memory and EEPROM range */ + if (a >= 0 && a<=memsize) + push(memread2(a)); + else if (a < 0 && -a <= elength()) + push(eread(-a-1)); + else { + error(EORANGE); + return; + } +} + +/* + * MAP Arduino map function, we always cast to long, this + * makes it potable for various integer sizes and the float. + */ +void xmap() { + long v, in_min, in_max, out_min, out_max; + + out_max=pop(); + out_min=pop(); + in_max=pop(); + in_min=pop(); + v=pop(); + push((v - in_min) * (out_max - out_min) / (in_max - in_min) + out_min); +} + +/* + * RND very basic random number generator with constant seed in 16 bit + * for float systems, use glibc parameters https: + */ + +void xrnd() { + number_t r; + mem_t base = randombase; + +/* the argument of the RND() function */ + r=pop(); + +/* this is the microsoft mode, argument <0 resets the sequence, 0 always the same number, > 1 a number between 0 and 1 */ + if (randombase < 0) { + base=0; + if (r < 0) { + rd=-r; + r=1; + } else if (r == 0) { + r=1; + goto pushresult; + } else { + r=1; + } + } + +/* this is the congruence */ +#ifndef HASFLOAT +/* the original 16 bit congruence, the & is needed to make it work for all kinds of ints */ + rd = (31421*rd + 6927) & 0xffff; +#else +/* glibc parameters */ + rd = (110351245*rd + 12345) & 0x7fffffff; +#endif + +pushresult: + +/* the result is calculated with the right modulus */ +#ifndef HASFLOAT + if (r>=0) + push((unsigned long)rd*r/0x10000+base); + else + push((unsigned long)rd*r/0x10000+1-base); +#else + if (r>=0) + push(rd*r/0x80000000+base); + else + push(rd*r/0x80000000+1-base); +#endif +} + + +#ifndef HASFLOAT +/* + * SQR - a very simple approximate square root formula + * for integers, for floats we use the library + */ +void sqr(){ + number_t t,r; + number_t l=0; + + r=pop(); + t=r; + while (t > 0) { + t>>=1; + l++; + } + l=l/2; + t=1; + t<<=l; + do { + l=t; + t=(t+r/t)/2; + } while (abs(t-l)>1); + push(t); +} +#else +void sqr(){ + push(sqrt(pop())); +} +#endif + +/* + * POW(X, N) evaluates powers + */ + +/* this function is called by POW(a, c) in BASIC */ +void xpow(){ + number_t n; + number_t a; + + n=pop(); + a=pop(); + push(bpow(a, n)); +} + +/* while this is needed by ^*/ +number_t bpow(number_t x, number_t y) { +#ifdef HASFLOAT + return pow(x, y); +#else + number_t r; + address_t i; + + r=1; + if (y>=0) for(i=0; iname=name; + lhs->i=1; /* we start at 1 */ + lhs->j=arraylimit; /* we assume a string array of length 1, all simple strings are like this */ + lhs->i2=0; /* we want the full string length */ + lhs->ps=1; /* we deal with a pure string */ + +/* the array index default, can vary */ + /* array_index=arraylimit; this is i2 */ + +/* remember the location */ + pushlocation(&l); + +/* and inspect the (first) brackets */ + parsesubscripts(); + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in parsestringvar "); outnumber(args); outsc(" arguments \n"); } + +/* do we deal with a pure unindexed string or something more complicated */ + if (args == 0) { +/* pure string, we rewind and are done here */ + poplocation(&l); + } else if (!substringmode) { +/* we have no substring interpretation hence the brackets can only be one array index */ + if (args == 1) lhs->j=pop(); else { error(EORANGE); return; } + } else { +/* not a pure string */ + lhs->ps=0; +/* we are in the substring world here */ + if (args == 2) { lhs->i2=popaddress(); args--; } /* A$(i,j) */ + if (!USELONGJUMP && er) return; + if (args == 1) { lhs->i=popaddress(); } /* A$(i) */ + if (!USELONGJUMP && er) return; + if (args == -1) {} /* A$(), ignore */ +/* here we have parsed a full substring and remember where we are and look forward*/ + pushlocation(&l); + nexttoken(); + if (token == '(') { +/* a second pair of braces is coming, we parse an array index */ + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + if (token != ')') { error(EUNKNOWN); return; } + lhs->j=popaddress(); + if (!USELONGJUMP && er) return; + } else + poplocation(&l); + } + +/* in pure parse mode we end here. This is used for the lefthandside code */ + if (!strp) return; + +/* try to get the string */ + getstring(strp, &lhs->name, lhs->i, lhs->j); + if (!USELONGJUMP && er) return; + +/* look what we do with the upper index */ + if (!lhs->i2) lhs->i2=strp->length; + + if (DEBUG) { + outsc("** in parsestringvar lower is "); outnumber(lhs->i); outcr(); + outsc("** in parsestringvar upper is "); outnumber(lhs->i2); outcr(); + outsc("** in parsestringvar array_index is "); outnumber(lhs->j); outcr(); + } + +/* find the length */ + if (lhs->i2-lhs->i+1 > 0) strp->length=lhs->i2-lhs->i+1; else strp->length=0; + +/* done */ + if (DEBUG) { + outsc("** in parsestringvar, length "); + outnumber(strp->length); + outsc(" from "); outnumber(lhs->i); outspc(); outnumber(lhs->i2); + outcr(); + } + +/* restore the name */ + name=lhs->name; +#else + return; +#endif +} + + +/* + * stringvalue(string_t*) evaluates a string value, return 0 if there is no string, + * 1 if there is a string. The pointer contains all the data needed to process the string. + * + */ + +char stringvalue(string_t* strp) { + address_t k, l; + address_t i; + token_t t; + mem_t args=1; + + lhsobject_t lhs; + + if (DEBUG) outsc("** entering stringvalue \n"); + +/* make sure everything is nice and clean */ + strp->address=0; + strp->arraydim=0; + strp->length=0; + strp->strdim=0; + strp->ir=0; + + switch(token) { + case STRING: +/* sr has the string information from gettoken and nexttoken*/ + strp->ir=sr.ir; + strp->length=sr.length; + strp->address=sr.address; + break; +#ifdef HASAPPLE1 + case STRINGVAR: + parsestringvar(strp, &lhs); + break; + case TSTR: + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; +#ifdef HASFLOAT + strp->length=writenumber2(sbuffer, pop()); +#else + strp->length=writenumber(sbuffer, pop()); +#endif + strp->ir=sbuffer; + if (er != 0) return 0; + if (token != ')') {error(EARGS); return 0; } + break; +#ifdef HASMSSTRINGS + case TCHR: + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; + *sbuffer=pop(); + strp->ir=sbuffer; + strp->length=1; + if (token != ')') {error(EARGS); return 0; } + break; + case TRIGHT: + case TMID: + case TLEFT: + t=token; + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { error(EARGS); return 0; } + nexttoken(); + if (token != STRINGVAR) { error(EARGS); return 0; } + parsestringvar(strp, &lhs); + if (er != 0) return 0; + k=strp->length; /* the length of the original string variable */ + nexttoken(); + if (token != ',') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; +/* all the rest depends on the function */ + switch (t) { + case TRIGHT: + l=popaddress(); + if (k < l) l=k; + if (strp->address) strp->address=strp->address+(k-l); + if (strp->ir) strp->ir=strp->ir+(k-l); + break; + case TLEFT: + l=popaddress(); + if (k < l) l=k; + break; + case TMID: + if (token == ',') { + nexttoken(); + expression(); + if (er != 0) return 0; + args++; + } + if (args == 1) { + i=popaddress(); + l=0; + if (i <= k) l=k-i+1; + } else { + l=popaddress(); + if (er != 0) return 0; + i=popaddress(); + } + if (k < i+l) l=k-i+1; + if (l < 0) l=0; + if (strp->address != 0) strp->address=strp->address+i-1; + if (strp->ir) strp->ir=strp->ir+i-1;; + break; + } + strp->length=l; + + if (token != ')') {error(EARGS); return 0; } + break; +#endif +#endif + default: + return 0; + } + return 1; +} + + +/* + * (numerical) evaluation of a string expression, used for + * comparison and for string rightvalues as numbers + * the token rewind here is needed as streval is called in + * factor - no factor function should nexttoken + */ + +void streval(){ + token_t t; + address_t k; + string_t s1, s2; + char* ir; + address_t a; + blocation_t l; + +/* is the right side of the expression a string */ + if (!stringvalue(&s1)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in streval first string"); outcr(); } + +/* get ready for rewind to this location */ + pushlocation(&l); + t=token; + +/* is the next token a operator, hence we need to compare two strings? */ + nexttoken(); + if (token != '=' && token != NOTEQUAL) { + +/* if not, rewind one token and evaluate the string as a boolean */ + poplocation(&l); + token=t; + +/* a zero length string evaluates to zero else to the first character */ + if (s1.length == 0) push(0); else { + if (s1.ir) push(s1.ir[0]); + else if (s1.address) push(memread2(s1.address)); + else error(EGENERAL); + } + + return; + } + +/* remember which operator we use */ + t=token; + +/* questionable !! */ + nexttoken(); + + if (DEBUG) { + outsc("** in streval second string"); outcr(); + debugtoken(); outcr(); + } + +/* get the second string */ + if (!stringvalue(&s2)){ error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in streval result: "); outnumber(x); outcr(); } + +/* different length means unequal */ + if (s2.length != s1.length) goto neq; + +/* and a different character somewhere is also unequal */ +#ifdef USEMEMINTERFACE + if (s1.ir && s2.ir) + for (k=0; k < s1.length; k++) { if (s1.ir[k] != s2.ir[k]) goto neq; } + else if (s1.address && s2.address) + for (k=0; k < s1.length; k++) { if (memread2(s1.address+k) != memread2(s2.address+k)) goto neq; } + else { + if (s1.address) { a=s1.address; ir=s2.ir; } else { a=s2.address; ir=s1.ir; } + for (k=0; k < s1.length; k++) { if (memread2(a+k) != ir[k] ) goto neq; } + } +#else + for (k=0; k < s1.length; k++) if (s1.ir[k] != s2.ir[k]) goto neq; +#endif + +/* which operator did we use */ + if (t == '=') push(booleanmode); else push(0); + return; +neq: + if (t == '=') push(0); else push(booleanmode); + return; +} + + +#ifdef HASFLOAT +/* + * floating point arithmetic + * SIN, COS, TAN, ATAN, LOG, EXP, INT + * INT is always there and is nop in integer BASICs + * no handling of floating point errors yet. + */ +void xsin() { push(sin(pop())); } +void xcos() { push(cos(pop())); } +void xtan() { push(tan(pop())); } +void xatan() { push(atan(pop())); } +void xlog() { push(log(pop())); } +void xexp() { push(exp(pop())); } +void xint() { push(floor(pop())); } +#else +void xint() {} +#endif + +/* + * Recursive expression parser functions + * + * factor(); term(); addexpression(); compexpression(); + * notexpression(); andexpression(); expression() + * + * doing + * + * functions, numbers; *, /, %; +, -; =, <>, =>, <=; + * NOT; AND; OR + * + */ + +/* + * factor() - contrary to all other function + * nothing here should end with a new token - this is handled + * in factors calling function + * + * evaluates constants, variables and all functions + */ + +/* helpers of factor - array access */ +void factorarray() { + lhsobject_t object; + number_t v; + +/* remember the variable, because parsesubscript changes this */ + object.name=name; + +/* parse the arguments */ + parsesubscripts(); + if (er != 0 ) return; + + switch(args) { + case 1: + object.i=popaddress(); + if (!USELONGJUMP && er) return; + object.j=arraylimit; + break; +#ifdef HASMULTIDIM + case 2: + object.j=popaddress(); + object.i=popaddress(); + if (!USELONGJUMP && er) return; + break; +#endif + default: + error(EARGS); + return; + } + array(&object, 'g', &v); + push(v); +} + +/* helpers of factor - string length */ +void factorlen() { +#ifdef HASAPPLE1 + address_t a; + string_t s; + name_t n; + lhsobject_t lhs; + + nexttoken(); + if ( token != '(') { error(EARGS); return; } + + nexttoken(); + switch(token) { + case STRING: + push(sr.length); + nexttoken(); + break; + case STRINGVAR: + parsestringvar(&s, &lhs); + push(s.length); + nexttoken(); + break; +#ifdef HASMSSTRINGS + case TRIGHT: + case TLEFT: + case TMID: + case TCHR: +#endif + case TSTR: + error(EARGS); + return; + default: + expression(); + if (!USELONGJUMP && er) return; + n.token=TBUFFER; + a=pop(); + n.c[0]=a%256; + n.c[1]=a/256; + push(blength(&n)); + } + + if (!USELONGJUMP && er) return; + + if (token != ')') { error(EARGS); return; } +#else + push(0); +#endif +} + +/* helpers of factor - the VAL command */ +void factorval() { + index_t y; + number_t x; + string_t s; + address_t a; + char *ir; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue(&s)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + +/* the length of the strings consumed */ + vlength=0; + +/* get the string if it is in serial memory */ +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + +/* generate a 0 terminated string for use with parsenumber */ + stringtobuffer(sbuffer, &s); + ir=sbuffer; + +/* remove whitespaces */ + while(*ir==' ' || *ir=='\t') { ir++; vlength++; } + +/* find a sign */ + if(*ir=='-') { y=-1; ir++; vlength++; } else y=1; + + x=0; +#ifdef HASFLOAT + if ((a=parsenumber2(ir, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#else + if ((a=parsenumber(ir, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#endif + push(x*y); + + nexttoken(); + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the INSTR command */ +#ifndef HASFULLINSTR +/* this is instring in a single character version, usefull to split strings */ +void factorinstr() { + char ch; + address_t a; + string_t s; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue(&s)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + nexttoken(); + + if (token != ',') { error(EARGS); return; } + + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + ch=pop(); + if (s.address) { + for (a=1; a<=s.length; a++) {if (memread2(s.address+a-1) == ch) break; } + } else { + for (a=1; a<=s.length; a++) {if (s.ir[a-1] == ch) break; } + } + if (a > s.length) a=0; + push(a); + + if (token != ')') { error(EARGS); return; } +} +#else +/* the full instr command which can compare two strings */ +void factorinstr() { + char ch; + address_t a=1; + address_t i=1; + string_t search; + string_t s; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + nexttoken(); + +/* the search string */ + if(!stringvalue(&s)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + nexttoken(); + + if (token != ',') { error(EARGS); return; } + nexttoken(); + +/* the string to be searched */ + if (!stringvalue(&search)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + nexttoken(); + +/* potentially the start value */ + if (token == ',') { + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + a=popaddress(); + if (!USELONGJUMP && er) return; + } + + if (token != ')') { + error(EUNKNOWN); + return; + } + +/* health check */ + if (search.length == 0 || search.length+a > s.length || a == 0) { + push(0); + return; + } + +/* go through the search string */ + while(i<=search.length) { + +/* get one character from the string */ + if (search.address) { + ch=memread2(search.address+i-1); + } else { + ch=search.ir[i-1]; + } + +/* search the character */ + if (s.address) { + for (; a<=s.length; a++) {if (memread2(s.address+a-1) == ch) break; } + } else { + for (; a<=s.length; a++) {if ( s.ir[a-1] == ch ) break; } + } + +/* we haven't found the character until the end of the string */ + if (a > s.length) { + a=0; + break; + } + +/* next character */ + i+=1; + + } + +/* how did the search go? a rewind because we were at the end of the search part already */ + if (i <= search.length) { + a=0; + } else { + a=a-search.length+1; + } + + + push(a); +} +#endif + +/* helpers of factor - the NETSTAT command */ +void factornetstat() { + address_t x=0; + + if (netconnected()) x=1; + if (mqttstate() == 0) x+=2; + push(x); +} + +/* helpers of factor - the ASC command, really not needed but for completeness */ +void factorasc() { +#ifdef HASAPPLE1 + string_t s; + lhsobject_t lhs; + + nexttoken(); + if ( token != '(') { error(EARGS); return; } + + nexttoken(); + switch(token) { + case STRING: + if (sr.ir) push(sr.ir[0]); else push(memread2(sr.address)); + nexttoken(); + break; + case STRINGVAR: + parsestringvar(&s, &lhs); + if (s.length > 0) { + if (s.ir) push(s.ir[0]); else push(memread2(s.address)); + } else + push(0); + nexttoken(); + break; + default: + error(EARGS); + return; + } + + if (!USELONGJUMP && er) return; + + if (token != ')') { error(EARGS); return; } +#else + push(0); +#endif +} + +void factor(){ + if (DEBUG) bdebug("factor\n"); + switch (token) { + case NUMBER: + push(x); + break; + case VARIABLE: + push(getvar(&name)); + break; + case ARRAYVAR: + factorarray(); + break; + case '(': + nexttoken(); + expression(); + if (er != 0 ) return; + if (token != ')') { error(EARGS); return; } + break; +/* Palo Alto BASIC functions */ + case TABS: + parsefunction(xabs, 1); + break; + case TRND: + parsefunction(xrnd, 1); + break; + case TSIZE: + push(himem-top); + break; +/* Apple 1 BASIC functions */ +#ifdef HASAPPLE1 + case TSGN: + parsefunction(xsgn, 1); + break; + case TPEEK: + parsefunction(xpeek, 1); + break; + case TLEN: + factorlen(); + break; +#ifdef HASIOT + case TAVAIL: + parsefunction(xavail, 1); + break; + case TOPEN: + parsefunction(xfopen, 1); + break; + case TSENSOR: + parsefunction(xfsensor, 2); + break; + case TVAL: + factorval(); + break; + case TINSTR: + factorinstr(); + break; + case TWIRE: + parsefunction(xfwire, 1); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + push(erh); + break; +#endif + case THIMEM: + push(himem); + break; +/* Apple 1 string compare code */ + case STRING: + case STRINGVAR: +#ifdef HASIOT + case TSTR: +#endif +#ifdef HASMSSTRINGS + case TLEFT: + case TRIGHT: + case TMID: + case TCHR: +#endif + streval(); + if (er != 0 ) return; + break; +#endif +/* Stefan's tinybasic additions */ +#ifdef HASSTEFANSEXT + case TSQR: + parsefunction(sqr, 1); + break; + case TMAP: + parsefunction(xmap, 5); + break; + case TUSR: + parsefunction(xusr, 2); + break; + case TPOW: + parsefunction(xpow, 2); + break; +#endif +/* Arduino I/O */ +#ifdef HASARDUINOIO + case TAREAD: + parsefunction(xaread, 1); + break; + case TDREAD: + parsefunction(xdread, 1); + break; + case TMILLIS: + parsefunction(bmillis, 1); + break; +#ifdef HASPULSE + case TPULSE: + parsefunction(bpulsein, 3); + break; +#endif + case TAZERO: +#if defined(ARDUINO) && defined(A0) + push(A0); +#else + push(0); +#endif + break; + case TLED: +#ifdef LED_BUILTIN + push(LED_BUILTIN); +#else + push(0); +#endif + break; +#endif +/* mathematical functions in case we have float */ +#ifdef HASFLOAT + case TSIN: + parsefunction(xsin, 1); + break; + case TCOS: + parsefunction(xcos, 1); + break; + case TTAN: + parsefunction(xtan, 1); + break; + case TATAN: + parsefunction(xatan, 1); + break; + case TLOG: + parsefunction(xlog, 1); + break; + case TEXP: + parsefunction(xexp, 1); + break; +#endif +/* int is always present to make programs compatible */ + case TINT: + parsefunction(xint, 1); + break; +#ifdef HASDARTMOUTH + case TFN: + xfn(0); + break; +/* an arcane feature, DATA evaluates to the data record number */ + case TDATA: + push(datarc); + break; +#endif +#ifdef HASDARKARTS + case TMALLOC: + parsefunction(xmalloc, 2); + break; + case TFIND: + xfind(); + break; +#endif +#ifdef HASIOT + case TNETSTAT: + factornetstat(); + break; +#endif +#ifdef HASMSSTRINGS + case TASC: + factorasc(); + break; +#endif +/* unknown function */ + default: + error(EUNKNOWN); + return; + } +} + +/* this is how the power operator ^ is handled */ +#ifdef POWERRIGHTTOLEFT +/* the recursive version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (!USELONGJUMP && er) return; + + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + parseoperator(power); + if (!USELONGJUMP && er) return; + push(bpow(x,y)); + } + if (DEBUG) bdebug("leaving power\n"); +} +#else +/* the left associative version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (!USELONGJUMP && er) return; + +nextpower: + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + parseoperator(factor); + push(bpow(x,y)); + goto nextpower; + } + if (DEBUG) bdebug("leaving power\n"); +} +#endif + +/* + * term() evaluates multiplication, division and mod + */ +void term(){ + if (DEBUG) bdebug("term\n"); + power(); + if (!USELONGJUMP && er) return; + +nextfactor: + if (DEBUG) bdebug("in term\n"); + if (token == '*'){ + parseoperator(power); + if (!USELONGJUMP && er) return; + push(x*y); + goto nextfactor; + } else if (token == '/'){ + parseoperator(power); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x/y); +#else + if (forceint) push((int)x/(int)y); else push(x/y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == '%') { + parseoperator(power); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x%y); +#else + push((int)x%(int)y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } + if (DEBUG) bdebug("leaving term\n"); +} + +/* add and subtract */ +void addexpression(){ + if (DEBUG) bdebug("addexp\n"); + if (token != '+' && token != '-') { + term(); + if (!USELONGJUMP && er) return; + } else { + push(0); + } + +nextterm: + if (token == '+' ) { + parseoperator(term); + if (!USELONGJUMP && er) return; + push(x+y); + goto nextterm; + } else if (token == '-'){ + parseoperator(term); + if (!USELONGJUMP && er) return; + push(x-y); + goto nextterm; + } +} + +/* comparisions */ +void compexpression() { + if (DEBUG) bdebug("compexp\n"); + addexpression(); + if (!USELONGJUMP && er) return; + switch (token){ + case '=': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x == y ? booleanmode : 0); + break; + case NOTEQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x != y ? booleanmode : 0); + break; + case '>': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x > y ? booleanmode : 0); + break; + case '<': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x < y ? booleanmode : 0); + break; + case LESSEREQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x <= y ? booleanmode : 0); + break; + case GREATEREQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x >= y ? booleanmode : 0); + break; + } +} + +#ifdef HASAPPLE1 +/* boolean NOT */ +void notexpression() { + if (DEBUG) bdebug("notexp\n"); + if (token == TNOT) { + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + if (booleanmode == -1) push(~(short)pop()); + else if (pop() == 0) push(1); else push(0); + } else + compexpression(); +} + +/* boolean AND and at the same time bitwise */ +void andexpression() { + if (DEBUG) bdebug("andexp\n"); + notexpression(); + if (!USELONGJUMP && er) return; + if (token == TAND) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x & (short)y); + } +} + +/* expression function and boolean OR at the same time bitwise !*/ +void expression(){ + if (DEBUG) bdebug("exp\n"); + andexpression(); + if (!USELONGJUMP && er) return; + if (token == TOR) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x | (short)y); + } +} +#else + +/* expression function simplified */ +void expression(){ + if (DEBUG) bdebug("exp\n"); + compexpression(); + if (!USELONGJUMP && er) return; + if (token == TOR) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x | (short)y); + } +} +#endif + +/* + * Layer 2 - The commands and their helpers + * + * Palo Alto BASIC languge set - PRINT, LET, INPUT, GOTO, GOSUB, RETURN, + * IF, FOR, TO, NEXT, STEP, BREAK, STOP, END, LIST, NEW, RUN, REM + * BREAK is not Palo ALto but fits here, eEND is identical to STOP. + */ + +/* + * PRINT command, extended by many features like file, wire, mqtt and radio i/o. + * TAB added as part of the PRINT statement with C64 compatibility. + */ +void xprint(){ + char semicolon = 0; + char oldod; + char modifier = 0; + string_t s; + stringlength_t i; + + form=0; + oldod=od; + nexttoken(); + +processsymbol: +/* at the end of a print statement, do we need a newline, restore the defaults */ + if (termsymbol()) { + if (!semicolon) outcr(); + od=oldod; + form=0; + return; + } + semicolon=0; + +/* output a string if we found it */ + if (stringvalue(&s)) { + if (!USELONGJUMP && er) return; + +/* buffer must be used here for machine code to work */ +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(s.ir, s.length); + + nexttoken(); + goto separators; + } + +/* the tab command as part of print */ +#ifdef HASMSSTRINGS + if (token == TTAB || token == TSPC) { + xtab(); + goto separators; + } +#endif + +/* modifiers of the print statement */ + if (token == '#' || token == '&') { + modifier=token; + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + switch(modifier) { + case '#': + form=pop(); + break; + case '&': + od=pop(); + break; + } + goto separators; + } + + if (token != ',' && token != ';') { + expression(); + if (!USELONGJUMP && er) return; + outnumber(pop()); + } + +/* commas and semicolons, all other symbols are accepted and no error is thrown */ +separators: + if (termsymbol()) goto processsymbol; + + switch (token) { + case ',': + if (!modifier) outspc(); + case ';': + semicolon=1; + nexttoken(); + break; + } + modifier=0; + + goto processsymbol; +} + +/* + * LET assigment code for various lefthand and righthand side. + * + * + * lefthandside is a helper function for reuse in other + * commands. It determines the address the value is to be + * assigned to and whether the assignment target is a + * "pure" i.e. subscriptless string expression + * + * assignnumber assigns a number to a given lefthandside + * + * In lefthandside the type of the object is determined and + * possible subscripts are parsed. + * + * Variables have no subscripts. The arguments are unchanged. + * Arrays may have two subscript which will go to i, j + * Strings may have a string subscript, going to i and an array subscript + * going to j + * String arrays use i2 as the array index. + * Note that the role of the variables differs for string array and normal + * arrays. + * Strings without a subscript i.e. pure strings, set the ps flag + * + */ + +/* the new lefthandsite code */ +void lefthandside(lhsobject_t* lhs) { + +/* just to provide it for parsestringvar to reuse the righthandside code */ + address_t temp; + + if (DEBUG) { + outsc("assigning to variable "); + outname(&lhs->name); outspc(); + outsc(" type "); outnumber(lhs->name.token); + outcr(); + } + +/* prep it */ + lhs->i=1; + lhs->i2=0; + lhs->j=arraylimit; + lhs->ps=1; + +/* look at the variables and continue parsing */ + switch (lhs->name.token) { + case VARIABLE: + nexttoken(); + break; + case ARRAYVAR: + parsesubscripts(); + if (!USELONGJUMP && er) return; + switch(args) { + case 1: + lhs->i=popaddress(); + if (!USELONGJUMP && er) return; + lhs->j=arraylimit; + break; + case 2: + lhs->j=popaddress(); + if (!USELONGJUMP && er) return; + lhs->i=popaddress(); + if (!USELONGJUMP && er) return; + break; + default: + error(EARGS); + return; + } + nexttoken(); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + parsestringvar(0, lhs); + nexttoken(); + break; +#else /* HASAPPLE1 */ +/* here we could implement a string thing for a true Tinybasic */ +#endif + default: + error(EUNKNOWN); + return; + } + + if (DEBUG) { + outsc("** in assignment lefthandside with (i,j,ps,i2) "); + outnumber(lhs->i); outspc(); + outnumber(lhs->j); outspc(); + outnumber(lhs->ps); outspc(); + outnumber(lhs->i2); outcr(); + outsc(" token is "); outputtoken(); + outsc(" at "); outnumber(here); outcr(); + } +} + +/* assign a number to a left hand side we have parsed */ +void assignnumber2(lhsobject_t* lhs, number_t x) { + string_t sr; + +/* depending on the variable type, assign the value */ + switch (lhs->name.token) { + case VARIABLE: + setvar(&lhs->name, x); + break; + case ARRAYVAR: + array(lhs, 's', &x); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + +/* find the string variable */ + getstring(&sr, &lhs->name, lhs->i, lhs->j); + if (!USELONGJUMP && er) return; + +/* the first character of the string is set to the number */ + if (sr.ir) sr.ir[0]=x; else if (sr.address) memwrite2(ax, x); else error(EUNKNOWN); + +/* set the length */ + if (lhs->ps) + setstringlength(&lhs->name, 1, lhs->j); + else + if (sr.length < lhs->i && lhs->i <= sr.strdim) + setstringlength(&lhs->name, lhs->i, lhs->j); + break; +#endif + } +} + +/* + * LET - the core assigment function, this is different from other BASICs + */ +void assignment() { + address_t newlength, copybytes; + mem_t s; + index_t k; + char tmpchar; /* for number conversion only */ + string_t sr, sl; /* the right and left hand side strings */ + +/* the lefthandside identifier */ + lhsobject_t lhs; + +/* this code evaluates the left hand side, we remember the object information first */ + lhs.name=name; + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + +/* the assignment part */ + if (token != '=') { error(EUNKNOWN); return; } + nexttoken(); + +/* here comes the code for the right hand side, the evaluation depends on the left hand side type */ + switch (lhs.name.token) { +/* the lefthandside is a scalar, evaluate the righthandside as a number, even if it is a string */ + case VARIABLE: + case ARRAYVAR: + expression(); + if (!USELONGJUMP && er) return; + assignnumber2(&lhs, pop()); + break; +#ifdef HASAPPLE1 +/* the lefthandside is a string variable, try evaluate the righthandside as a stringvalue */ + case STRINGVAR: +nextstring: + +/* do we deal with a string as righthand side */ + s=stringvalue(&sr); + if (!USELONGJUMP && er) return; + +/* and then as an expression if it is no string, any number appearing in a string expression terminates the addition loop */ + if (!s) { + expression(); + if (!USELONGJUMP && er) return; + tmpchar=pop(); + sr.length=1; + sr.ir=&tmpchar; + } else + nexttoken(); /* we do this here because expression also advances, this way we avoid double advance */ + + if (DEBUG) { outsc("* assigment stringcode at "); outnumber(here); outcr(); } + +/* at this point we have a stringvalue with ir2 pointing to the payload and the stack the length + this is either coming from stringvalue or from the expression code */ + +/* we now process the source string */ + +/* getstring of the destination */ + getstring(&sl, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + +/* this debug messes up sbuffer hence all functions that use it in stringvalue produce wrong results */ + if (DEBUG) { + outsc("* assigment stringcode "); outname(&lhs.name); outcr(); + outsc("** assignment source string length "); outnumber(sr.length); outcr(); + outsc("** assignment dest string length "); outnumber(sl.length); outcr(); + outsc("** assignment dest string dimension "); outnumber(sl.strdim); outcr(); + } + +/* does the source string fit into the destination if we have no destination second index*/ + if ((lhs.i2 == 0) && ((lhs.i+sr.length-1)>sl.strdim)) { error(EORANGE); return; }; + +/* if we have a second index, is it in range */ + if ((lhs.i2 != 0) && lhs.i2>sl.strdim) { error(EORANGE); return; }; + +/* calculate the number of bytes we truely want to copy */ + if (lhs.i2 > 0) copybytes=((lhs.i2-lhs.i+1) > sr.length) ? sr.length : (lhs.i2-lhs.i+1); + else copybytes=sr.length; + + if (DEBUG) { outsc("** assignment copybytes "); outnumber(copybytes); outcr(); } + +/* now do the heavy lifting in a seperate function to encasulate buffering */ + assignstring(&sl, &sr, copybytes); + +/* + * classical Apple 1 behaviour is string truncation in substring logic, with + * two index destination string we follow another route. We extend the string + * for the number of copied bytes + */ + if (lhs.i2 == 0) { + newlength = lhs.i+sr.length-1; + } else { + if (lhs.i+copybytes > sl.length) newlength=lhs.i+copybytes-1; + else newlength=sl.length; + } + + setstringlength(&lhs.name, newlength, lhs.j); +/* + * we have processed one string and copied it fully to the destination + * see if there is more to come. For inplace strings this is odd because + * one term can change during adding (A$ = B$ + A$). + */ +addstring: + if (token == '+') { + lhs.i=lhs.i+copybytes; + nexttoken(); + goto nextstring; + } + break; /* case STRINGVAR */ +#endif /* HASAPPLE1 */ + } /* switch */ +} + + +/* + * Try to copy one string to the other, assumes that getstring did its work + * and that copybyte is correct. + * BASICs in place strings make this a non trivial exercise as we need to + * avoid overwrites. + * Another complication is the mixed situation of BASIC memory strings + * and C memory strings. + */ +void assignstring(string_t* sl, string_t* sr, stringlength_t copybytes) { + stringlength_t k; + +/* if we have a memory model that needs the mem interface, go through the addresses by default + else use just the pointers */ + +#ifdef USEMEMINTERFACE +/* for a regular string variable as left hand side we know the address */ + if (sl->address) { + +/* for a regular string variable as a source we need to take care of order */ + + if (sr->address) { + if (sr->address > sl->address) + for (k=0; kaddress+k, memread2(sr->address+k)); + else + for (k=1; k<=copybytes; k++) memwrite2(sl->address+copybytes-k, memread2(sr->address+copybytes-k)); + } else { + +/* if the right hand side is a special string or a constant things are much simpler */ + + for (k=0; kaddress+k, sr->ir[k]); + + } + } else { + +/* non regular string variables like @U$ and @T$ are never assignable */ + error(EUNKNOWN); + } +#else + +/* we just go through the C memory here */ + + if (sr->ir && sl->ir) { + if (sr->ir > sl->ir) + for (k=0; kir[k]=sr->ir[k]; + else + for (k=1; k<=copybytes; k++) sl->ir[copybytes-k]=sr->ir[copybytes-k]; + } else { + error(EUNKNOWN); + } + +#endif +} + +/* + * INPUT ["string",] variable [,["string",] variable] + * + * The original version of input only processes simple variables one at a time + * and does not support arrays. The code is redudant to assignment and read. + * It also does not support comma separated lists of values to be input. + */ +void showprompt() { + outsc("? "); +} + +/* + * Reimplementation of input using the same pattern as read and print . + */ +void xinput() { + + mem_t oldid = id; /* remember the stream on modify */ + mem_t prompt = 1; /* determine if we show the prompt */ + number_t xv; /* for number conversion with innumber */ + +/* the identifier of the lefthandside */ + lhsobject_t lhs; + + address_t maxlen, newlength; /* the maximum length of the string to be read */ + int k=0; /* the result of the number conversion */ + string_t s; + char* buffer; /* the buffer we use for input */ + address_t bufsize; /* the size of the buffer */ + +/* depending on the RUN state we use either the input buffer or the string buffer */ +/* this ways we can process long inputs in RUN and don't need a lot of memory */ + if (st == SRUN || st == SERUN) { + buffer=ibuffer; + bufsize=BUFSIZE; + } else { + buffer=sbuffer; + bufsize=SBUFSIZE; + } + +/* get the next token and check what we are dealing with */ + nexttoken(); + +/* modifiers of the input statement (stream) */ + if (token == '&') { + if(!expectexpr()) return; + oldid=id; + id=pop(); + if (id != ISERIAL || id !=IKEYBOARD) prompt=0; + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + +/* unlike print, form can appear only once in input after the + stream, it controls character counts in wire */ + if (token == '#') { + if(!expectexpr()) return; + form=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + +/* we have a string to be printed to prompt the user */ +nextstring: + if (token == STRING && id != IFILE) { + prompt=0; +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(sr.ir, sr.length); + nexttoken(); + } + +/* now we check for a variable and parse it */ +nextvariable: + if (token == VARIABLE || token == ARRAYVAR || token == STRINGVAR) { + +/* check for a valid lefthandside expression */ + lhs.name=name; + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + +/* which data type do we input */ + switch (lhs.name.token) { + case VARIABLE: + case ARRAYVAR: +again: +/* if we have no buffer or are at the end, read it and set cursor k to the beginning */ + if (k == 0 || (address_t) buffer[0] < k) { + if (prompt) showprompt(); + (void) ins(buffer, bufsize); + k=1; + } + +/* read a number from the buffer and return it, advance the cursor k */ + k=innumber(&xv, buffer, k); + +/* if we break, end it here */ + if (k == -1) { + st=SINT; + token=EOL; + goto resetinput; + } + +/* if we have no valid number, ask again */ + if (k == 0) { + if (id == ISERIAL || id == IKEYBOARD) { + printmessage(ENUMBER); + outspc(); + printmessage(EGENERAL); + outcr(); + xv=0; + k=0; + goto again; + } else { + ert=1; + xv=0; + goto resetinput; + } + } + +/* now assign the number */ + assignnumber2(&lhs, xv); + +/* look if there is a comma coming in the buffer and keep it */ + while (k < (address_t) buffer[0] && buffer[k] != 0) { + if (buffer[k] == ',') { + k++; + break; + } + k++; + } + break; +#ifdef HASAPPLE1 + case STRINGVAR: +/* the destination address of the lefthandside, on the fly create included */ + getstring(&s, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + +/* the length of the lefthandside string */ + if (lhs.i2 == 0) { + maxlen=s.strdim-lhs.i+1; + } else { + maxlen=lhs.i2-lhs.i+1; + if (maxlen > s.strdim) maxlen=s.strdim-lhs.i+1; + } + +/* the number of bytes we want to read the form parameter in WIRE can be used + to set the expected number of bytes */ + if (form != 0 && form < maxlen) maxlen=form; + +/* what is going on */ + if (DEBUG) { + outsc("** input stringcode at "); outnumber(here); outcr(); + outsc("** input stringcode "); outname(&lhs.name); outcr(); + outsc("** input stringcode maximum length "); outnumber(maxlen); outcr(); + } + +/* now read the string inplace */ + if (prompt) showprompt(); +#ifndef USEMEMINTERFACE + newlength=ins(s.ir-1, maxlen); +#else + newlength=ins(spistrbuf1, maxlen); + +/* if we have a string variable, we need to copy the buffer to the string */ + if (newlength > 0) { + if (s.ir) { + for (k=0; k= BASEKEYWORD) || token < -127) { + if ((token == TTHEN || + token == TELSE || + token == TTO || + token == TSTEP || + token == TGOTO || + token == TGOSUB || + token == TOR || + token == TAND) && lastouttoken != LINENUMBER) outspc(); + else + if (lastouttoken == NUMBER || lastouttoken == VARIABLE) outspc(); + + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=token; i++); + outsc(getkeyword(i)); + if (token != GREATEREQUAL && + token != NOTEQUAL && + token != LESSEREQUAL && + token != TREM && + token != TFN) spaceafterkeyword=1; + break; + } + if (token >= 32) { + outch(token); + if (token == ':' && !outliteral) outspc(); + break; + } + outch(token); outspc(); outnumber(token); + } + + lastouttoken=token; +} + +/* + * LIST programs to an output device. + * + * The output is formatted to fit the screen, the heuristic is simple. + * + */ + +void listlines(address_t b, address_t e) { + mem_t oflag=0; + +/* global variables controlling outputtoken, reset to default */ + lastouttoken=0; + spaceafterkeyword=0; + +/* if there is a programm ... */ + if ( top != 0 ) { + here=0; + gettoken(); + while (here < top) { + if (token == LINENUMBER && ax >= b) oflag=1; + if (token == LINENUMBER && ax > e) oflag=0; + if (oflag) outputtoken(); + gettoken(); + if (token == LINENUMBER && oflag) { + outcr(); +/* wait after every line on small displays + removed if ( dspactive() && (dsp_rows < 10) ){ if ( inch() == 27 ) break;} */ + if (dspactive() && dspwaitonscroll() == 27) break; + } + } + if (here == top && oflag) outputtoken(); + if (e == maxaddr || b != e) outcr(); /* supress newlines in "list 50" - a little hack */ + } + +} + +void xlist(){ + number_t b, e; + +/* get the argument */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + +/* parse the arguments */ + switch (args) { + case 0: + b=0; + e=maxaddr; + break; + case 1: + b=pop(); + e=b; + break; + case 2: + e=pop(); + b=pop(); + break; + default: + error(EARGS); + return; + } + +/* list the line from b to e in the default output device */ + listlines(b, e); + +/* we are done */ + nexttoken(); + } + +/* + * The progam line editor, first version. The code is + * not save for BUFSIZE greater than 127. A cast to + * unsigned char aka uint8_t is needed for the string + * length as some platforms have a signed char and some + * don't. + */ +void xedit(){ + mem_t ood = od; + address_t line; + address_t l; + int i, k, j; + char ch; + +/* we edit only in interactive mode */ + if (st != SINT) { error(EUNKNOWN); return; } + +/* currently only one line number */ + if(!expectexpr()) { error(EARGS); return; } + +/* this uses the input buffer now */ + line=pop(); +undo: /* this is the undo point */ + ibuffer[0]=0; + ibuffer[1]=0; + od=0; + listlines(line, line); + if (ibuffer[0] == 0) { + outnumber(line); + outspc(); + } + od=ood; + +/* set the cursor to the first character */ + l=1; + +/* editing loop for blocking and non blocking terminals */ + while (-1) { + +/* show the line and indicate the cursor */ + for(i=1; i<=(unsigned char)ibuffer[0]; i++) outch(ibuffer[i]); + outcr(); + for(i=0; i 1) l--; + break; + case 'k': /* vi style right */ + if (l<(unsigned char)ibuffer[0]) l++; + break; + case 'x': /* delete the cursor character */ + if ((unsigned char)ibuffer[0]>0) { + for (j=l; j<(unsigned char)ibuffer[0]; j++) ibuffer[j]=ibuffer[j+1]; + ibuffer[j]=0; + ibuffer[0]=(unsigned char)ibuffer[0]-1; + } + if ((unsigned char)ibuffer[0]=l; j--) { + ibuffer[j+i-k]=ibuffer[j]; + if (j<=l+i-k) ibuffer[j]=sbuffer[k+1+(j-l)]; + } + } + ibuffer[0]=(unsigned char)ibuffer[0]+i-k; + k=i; + break; + case '^': /* vi style start of line */ + l=1; + break; + case '$': /* vi style end of line */ + l=(unsigned char)ibuffer[0]+1; + break; + case 'h': /* vi style backspace */ + if (l > 1) { + for (j=l-1; j<(unsigned char)ibuffer[0]; j++) ibuffer[j]=ibuffer[j+1]; + ibuffer[j]=0; + ibuffer[0]=(unsigned char)ibuffer[0]-1; + l--; + } + break; + case 'u': /* vi style undo */ + goto undo; + break; + case ':': /* find the next colon : character*/ + if (l <= (unsigned char)ibuffer[0]) { + while (l <= (unsigned char)ibuffer[0] && ibuffer[l] != ':') l++; + if (l <= (unsigned char)ibuffer[0]) l++; + } + break; + default: /* do nothing if the character is not recogized */ + break; + } + } + } + +/* try to store the line, may heaven help us */ +done: + bi=ibuffer; + st=SINT; + nexttoken(); + if (token == NUMBER) { + ax=x; + storeline(); + } + +/* and we are done, restore the output device and clean the buffer */ +endnosave: + ibuffer[0]=0; + ibuffer[1]=0; + bi=ibuffer+1; + nexttoken(); +} + +/* + * RUN and CONTINUE are the same function + */ +void xrun(){ + if (token == TCONT) { + st=SRUN; + nexttoken(); + } else { + nexttoken(); + parsearguments(); + if (er != 0 ) return; + if (args > 1) { error(EARGS); return; } + if (args == 0) { + here=0; + } else { + findline(pop()); + } + if (!USELONGJUMP && er) return; + if (st == SINT) st=SRUN; + +/* all reset on run */ + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + ioer=0; + fncontext=0; +#ifdef HASEVENTS + resettimer(&every_timer); + resettimer(&after_timer); + events_enabled=1; +#endif + + nexttoken(); + } + +/* once statement is called it stays into a loop until the token stream + is exhausted. Then we return to interactive mode. */ + statement(); + st=SINT; +/* flush the EEPROM when changing to interactive mode */ + eflush(); + +/* if called from command line with file arg - exit after run */ +#ifdef HASARGS + if (bnointafterrun) restartsystem(); +#endif +} + +/* + * NEW the general cleanup function - new deletes everything + * + * restbasicstate() is a helper, it keeps the memory intact + * this is needed for EEPROM direct memory + */ +void resetbasicstate() { + + if (DEBUG) { outsc("** BASIC state reset \n"); } + + /* all stacks are purged */ + clearst(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrvars(); + clrlinecache(); + +/* error status reset */ + reseterror(); + +/* let here point to the beginning of the program */ + here=0; + +/* function context back to zero */ + fncontext=0; + +/* interactive mode */ + st=SINT; + +/* switch off timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +} + +void xnew(){ + +/* reset the state of the interpreter */ + resetbasicstate(); + + + if (DEBUG) { + outsc("** clearing memory "); + outnumber(memsize); + outsc(" bytes \n"); + } + +/* program memory back to zero and variable heap cleared */ + himem=memsize; + zeroblock(0, memsize); + top=0; + + if (DEBUG) outsc("** clearing EEPROM state \n "); +/* on EEPROM systems also clear the stored state and top */ +#ifdef EEPROMMEMINTERFACE + eupdate(0, 0); + setaddress(1, eupdate, top); +#endif +} + +/* + * REM - skip everything + */ +void xrem() { + if (debuglevel == -1) outsc("REM: "); + while (token != LINENUMBER && token != EOL && here <= top) + { + nexttoken(); + if (debuglevel == -1) { + if (token != LINENUMBER) outputtoken(); else outcr(); + } + } +} + +/* + * The Apple 1 BASIC additions + * CLR, DIM, POKE, TAB + */ + +/* + * CLR - clearing variable space + */ +void xclr() { + +#ifdef HASDARKARTS + name_t variable; + + nexttoken(); + + if (termsymbol()) { + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + ioer=0; + } else { + variable=name; + switch (variable.token) { + case VARIABLE: + if (variable.c[0] == '@') { return; } + break; + case ARRAYVAR: + nexttoken(); + if (token != '(') { error(EVARIABLE); return; } + nexttoken(); + if (token != ')') { error(EVARIABLE); return; } + break; + case STRINGVAR: + if (variable.c[0] == '@') { error(EVARIABLE); return; } + break; + case TGOSUB: + clrgosubstack(); + goto next; + case TFOR: + clrforstack(); + goto next; + case TEVERY: + resettimer(&every_timer); + goto next; + case TAFTER: + resettimer(&after_timer); + goto next; + default: + expression(); + if (!USELONGJUMP && er) return; + ax=pop(); + variable.c[0]=ax%256; + variable.c[1]=ax/256; + variable.token=TBUFFER; + } + +/* we have to clear an object, call free */ + ax=bfree(&variable); + if (ax == 0) { + if (variable.token != TBUFFER) { error(EVARIABLE); return; } + else ert=1; + } + } +#else + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + ioer=0; +#endif + +next: + nexttoken(); +} + +#ifdef HASAPPLE1 +/* + * DIM - the dimensioning of arrays and strings from Apple 1 BASIC + */ +void xdim(){ + name_t variable; + address_t x; + address_t y=1; + +/* which object should be dimensioned or created */ + nexttoken(); + +nextvariable: + if (token == ARRAYVAR || token == STRINGVAR ){ + +/* remember the object, direct assignment of struct for the moment */ + variable=name; + + if (DEBUG) { + outsc("** in xdim "); outname(&variable); outspc(); outnumber(variable.token); + outspc(); outname(&name); outspc(); outnumber(name.token); outcr(); + } + +/* parse the arguments */ + parsesubscripts(); + if (!USELONGJUMP && er) return; + +#ifndef HASMULTIDIM + if (args != 1) {error(EARGS); return; } + x=popaddress(); +#else + if (args != 1 && args != 2) {error(EARGS); return; } + if (args == 2) y=popaddress(); + x=popaddress(); +#endif + +/* we create at least one element */ + if (x<1 || y<1) {error(EORANGE); return; } + +/* various checks - do we have enough space in buffers and string indices */ + if (variable.token == STRINGVAR) { + if ((x>255) && (strindexsize==1)) {error(EORANGE); return; } +#ifdef SPIRAMSBSIZE + if (x>SPIRAMSBSIZE-1) {error(EORANGE); return; } +#endif +/* With the substringmode switched off, if only one argument is given + we interpret the argument as the string array dimension and not as + the length two arguments are allowed and work as always. This makes + things more compatible to the Microsoft BASIC world. */ + if (!substringmode) + if (args == 1) { + y=x; + x=defaultstrdim; + } + + (void) createstring(&variable, x, y); + } else { + (void) createarray(&variable, x, y); + } + if (!USELONGJUMP && er) return; + + } else if (token == VARIABLE) { + (void) bmalloc(&name, 0); /* this is a local variable, currently no safety net */ + } else { + error(EUNKNOWN); + return; + } + + nexttoken(); + if (token == ',') { + nexttoken(); + goto nextvariable; + } + + nexttoken(); +} + + +/* + * POKE - low level poke to the basic memory. + * on 16bit systems, the address is signed, so we can only go up to 32767. + * If the address is negative, we poke into the EEPROM. + */ +void xpoke(){ + number_t a, v; + +/* get the address and the value */ + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + v=pop(); /* the value */ + a=pop(); /* the address */ + +/* catch memsize here because memwrite doesn't do it */ + if (a >= 0 && a<=memsize) + memwrite2(a, v); + else if (a < 0 && a >= -elength()) + eupdate(-a-1, v); + else { + error(EORANGE); + } +} + +/* + * TAB - spaces command of Apple 1 BASIC + * charcount mechanism for relative tab if HASMSTAB is set + */ +void xtab(){ + address_t a; + token_t t = token; + +/* get the number of spaces, we allow brackets here to use xtab also in PRINT */ + nexttoken(); + if (token == '(') nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + if (token == ')') nexttoken(); + + a=popaddress(); + if (!USELONGJUMP && er) return; + +/* the runtime environment can do a true tab then ... */ +#ifdef HASMSTAB + if (t != TSPC && reltab && od <= OPRT && od > 0) { + if (charcount[od-1] >= a) a=0; else a=a-charcount[od-1]-1; + } +#endif + while (a-- > 0) outspc(); +} +#endif + +/* + * locate the curor on the screen + */ + +void xlocate() { + address_t cx, cy; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + cy=popaddress(); + cx=popaddress(); + if (!USELONGJUMP && er) return; + +/* for locate we go through the VT52 interface for cursor positioning*/ + if (cx > 0 && cy > 0 && cx < 224 && cy < 224) { + outch(27); outch('Y'); + outch(31+(unsigned int) cy); + outch(31+(unsigned int) cx); + } + +/* set the charcount, this is half broken on escape sequences */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=cx; +#endif + +} + +/* + * Stefan's additions to Palo Alto BASIC + * DUMP, SAVE, LOAD, GET, PUT, SET + * + */ + +/* + * DUMP - memory dump program + */ +void xdump() { + address_t a, x; + char eflag = 0; + + nexttoken(); + if (token == '!') { eflag=1; nexttoken(); } + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 0: + x=0; + a=memsize; + break; + case 1: + x=pop(); + a=memsize; + break; + case 2: + a=pop(); + x=pop(); + break; + default: + error(EARGS); + return; + } + + form=6; + if (a>x) dumpmem((a-x)/8+1, x, eflag); + form=0; +} + +/* + * helper of DUMP, wrote the memory out + */ +void dumpmem(address_t r, address_t b, char eflag) { + address_t j, i; + address_t k; + mem_t c; + address_t end; + + k=b; + i=r; + if (eflag) end=elength(); else end=memsize; + while (i>0) { + outnumber(k); outspc(); + for (j=0; j<8; j++) { + if (eflag) c=eread(k); else c=memread(k); + k++; + outnumber(c); outspc(); + if (k > end) break; + } + outcr(); + i--; + if (k > end) break; + } + if (eflag) { + outsc("elength: "); outnumber(elength()); outcr(); + } else { + outsc("top: "); outnumber(top); outcr(); + outsc("himem: "); outnumber(himem); outcr(); + } +} + +/* + * creates a C string from a BASIC string + * after reading a BASIC string + */ +void stringtobuffer(char *buffer, string_t* s) { + index_t i = s->length; + + if (i >= SBUFSIZE) i=SBUFSIZE-1; + buffer[i--]=0; + while (i >= 0) { buffer[i]=s->ir[i]; i--; } +} + +/* helper for the memintercase code */ +void getstringtobuffer(string_t* strp, char *buffer, stringlength_t maxlen) { + stringlength_t i; + + for (i=0; ilength && iaddress+i); + strp->ir=buffer; +} + +/* get a file argument */ +void getfilename(char *buffer, char d) { + index_t s; + char *sbuffer; + string_t sr; + +/* do we have a string argument? */ + s=stringvalue(&sr); + if (!USELONGJUMP && er) return; + if (DEBUG) {outsc("** in getfilename2 stringvalue delivered "); outnumber(s); outcr(); } + + if (s) { + if (DEBUG) {outsc("** in getfilename2 copying string of length "); outnumber(x); outcr(); } +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + stringtobuffer(buffer, &sr); + if (DEBUG) {outsc("** in getfilename2 stringvalue string "); outsc(buffer); outcr(); } + nexttoken(); + } else if (termsymbol()) { + if (d) { + sbuffer=getmessage(MFILE); + s=0; + while ((sbuffer[s] != 0) && (s < SBUFSIZE-1)) { buffer[s]=sbuffer[s]; s++; } + buffer[s]=0; + x=s; + } else { + buffer[0]=0; + x=0; + } + nexttoken(); + } else { + expression(); + if (!USELONGJUMP && er) return; + buffer[0]=pop(); + buffer[1]=0; + } +} + +/* + * an alternative getfilename implementation that simply gives back a buffer + * with the filename in it. We avoid a string buffer in the calling commands + * like SAVE and LOAD. + */ +char* getfilename2(char d) { + mem_t s; + string_t sr; + +/* we have no argument and use the default */ + if (termsymbol()) { + if (d) return getmessage(MFILE); + else return 0; + } + +/* we have a string argument or an expression */ + s=stringvalue(&sr); + if (!USELONGJUMP && er) return 0; + if (s) { +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, sbuffer, SBUFSIZE); +#endif + nexttoken(); /* undo the rewind of stringvalue, only then use the buffer */ + for (s=0; s BUFSIZE) { + error(EOUTOFMEMORY); + break; + } + } + ifileclose(); +/* after a successful load we save top to the EEPROM header */ +#ifdef EEPROMMEMINTERFACE + setaddress(1, eupdate, top); +#endif + +/* go back to run mode and start from the first line */ + if (chain) { + st=SRUN; + here=0; + nexttoken(); + } + } +} +#else +/* + * SAVE a file to EEPROM - minimal version for small Arduinos + */ +void xsave() { + esave(); + nexttoken(); +} +/* + * LOAD a file from EEPROM - minimal version for small Arduinos + */ +void xload(const char* f) { + eload(); + nexttoken(); +} +#endif + +/* + * GET just one character from input + */ +void xget(){ + +/* identifier of the lefthandside */ + lhsobject_t lhs; + + mem_t oid=id; /* remember the input stream */ + char ch; + + nexttoken(); + +/* modifiers of the get statement */ + if (token == '&') { + + if (!expectexpr()) return; + id=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + +/* this code evaluates the left hand side - remember type and name */ + lhs.name=name; + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + +/* get the data, non blocking on Arduino */ + if (availch()) ch=inch(); else ch=0; + +/* store the data element as a number expect for */ + assignnumber2(&lhs, ch); + +/* but then, strings where we deliver a string with length 0 if there is no data */ +#ifdef HASAPPLE1 + if (lhs.name.token == STRINGVAR && ch == 0 && lhs.ps) setstringlength(&lhs.name, 0, arraylimit); +#endif + +/* restore the output device */ + id=oid; +} + +/* + * PUT writes one character to an output stream + */ +void xput(){ + mem_t ood=od; + index_t i; + + nexttoken(); + +/* modifiers of the put statement */ + if (token == '&') { + + if(!expectexpr()) return; + od=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + parsearguments(); + if (!USELONGJUMP && er) return; + + for (i=args-1; i>=0; i--) sbuffer[i]=pop(); + outs(sbuffer, args); + + od=ood; +} + +/* setpersonality is a helper of xset */ +void setpersonality(index_t p) { +#ifdef HASAPPLE1 + switch(p) { +/* a Microsoft like BASIC have arrays starting at 0 with n+1 elements and no substrings, MS type RND */ + case 'm': + case 'M': + msarraylimits=1; + arraylimit=0; + substringmode=0; + booleanmode=-1; + randombase=-1; + reltab=1; + break; +/* an Apple 1 like BASIC have arrays starting at 1 with n elements and substrings */ + case 'a': + case 'A': + msarraylimits=0; + arraylimit=1; + substringmode=1; + booleanmode=1; + randombase=0; + reltab=0; + break; +/* PaloAlto BASIC is an integer basic with slightly different behaviour */ + case 'p': + case 'P': + msarraylimits=0; + arraylimit=0; + substringmode=1; + booleanmode=1; + forceint=1; + randombase=1; + reltab=0; + break; + } +#endif +} + +/* + * SET - the command itself is also apocryphal it is a low level + * control command setting certain properties + * syntax, currently it is only SET expression, expression + */ +void xset(){ + address_t function; + index_t argument; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + argument=pop(); + function=pop(); + switch (function) { +/* runtime debug level */ + case 0: + debuglevel=argument; + break; +/* autorun/run flag of the EEPROM 255 for clear, 0 for prog, 1 for autorun */ + case 1: + eupdate(0, argument); + break; +/* change the output device */ + case 2: + switch (argument) { + case 0: + od=OSERIAL; + break; + case 1: + od=ODSP; + break; + } + break; +/* change the default output device */ + case 3: + switch (argument) { + case 0: + od=(odd=OSERIAL); + break; + case 1: + od=(odd=ODSP); + break; + } + break; + /* change the input device */ + case 4: + switch (argument) { + case 0: + id=ISERIAL; + break; + case 1: + id=IKEYBOARD; + break; + } + break; +/* change the default input device */ + case 5: + switch (argument) { + case 0: + idd=(id=ISERIAL); + break; + case 1: + idd=(id=IKEYBOARD); + break; + } + break; +#ifdef HASSERIAL1 +/* set the cr behaviour */ + case 6: + sendcr=(char)argument; + break; +/* set the blockmode behaviour */ + case 7: + blockmode=argument; + break; +/* set the second serial ports baudrate */ + case 8: + prtset(argument); + break; +#endif +/* set the power amplifier level of the radio module */ +#ifdef HASRF24 + case 9: + radioset(argument); + break; +#endif +/* display update control for paged displays */ +#ifdef DISPLAYDRIVER + case 10: + dspsetupdatemode(argument); + break; +#endif +/* change the output device to a true TAB */ +#ifdef HASMSTAB + case 11: + reltab=argument; + break; +#endif +/* change the lower array limit */ +#ifdef HASAPPLE1 + case 12: + if (argument>=0) arraylimit=argument; else error(EORANGE); + break; +#endif +/* the keyboard repeat frequency */ +#ifdef HASKEYPAD + case 13: + kbdrepeat=argument; + break; +#endif +/* the units the pulse command is using */ +#ifdef HASPULSE + case 14: + bpulseunit=argument; + break; +#endif +/* switch on the vt52 emulation an a POSIX system with an ANSI terminal */ +#ifdef POSIXVT52TOANSI + case 15: + vt52active=argument; + break; +#endif +/* change the default size of a string at autocreate */ +#ifdef HASAPPLE1 + case 16: + if (argument>0) defaultstrdim=argument; else error(EORANGE); + break; +#endif +/* set the boolean mode */ + case 17: + if (argument==-1 || argument==1) booleanmode=argument; else error(EORANGE); + break; +/* set the integer mode */ + case 18: + forceint=(argument != 0); + break; +/* set the random number behaviour */ + case 19: + randombase=argument; + break; +/* the substring mode on and off */ +#ifdef HASAPPLE1 + case 20: + substringmode=(argument != 0); + break; +#endif +/* the MS array behaviour, creates n+1 elements when on */ +#ifdef HASAPPLE1 + case 21: + msarraylimits=(argument != 0); + break; +#endif +/* set many settings at once to change the entire personality of the interpreter */ + case 22: + setpersonality(argument); + break; +#ifdef HASAPPLE1 + case 23: + lowercasenames=(argument != 0); + break; +#endif + } +} + +/* + * NETSTAT - network status command, rudimentary + */ +void xnetstat(){ +#if defined(HASMQTT) + + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 0: + if (netconnected()) outsc("Network connected \n"); else outsc("Network not connected \n"); + outsc("MQTT state "); outnumber(mqttstate()); outcr(); + outsc("MQTT out topic "); outsc(mqtt_otopic); outcr(); + outsc("MQTT inp topic "); outsc(mqtt_itopic); outcr(); + outsc("MQTT name "); outsc(mqttname); outcr(); + break; + case 1: + ax=pop(); + switch (ax) { + case 0: + netstop(); + break; + case 1: + netbegin(); + break; + case 2: + if (!mqttreconnect()) ert=1; + break; + default: + error(EARGS); + return; + } + break; + default: + error(EARGS); + return; + } +#endif + nexttoken(); +} + +/* + * The arduino io functions. + * + */ + +/* + * rtaread and rtdread are wrappers coming from runtime + * This is done for portability for raspberry pi and other systems + */ + +void xaread(){ + push(aread(popaddress())); +} + +void xdread(){ + push(dread(popaddress())); +} + + /* + * DWRITE - digital write + */ +void xdwrite(){ + address_t x,y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x=popaddress(); + y=popaddress(); + if (!USELONGJUMP && er) return; + dwrite(y, x); +} + +/* + * AWRITE - analog write + */ +void xawrite(){ + address_t x,y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x=popaddress(); + if (x > 255) error(EORANGE); + y=popaddress(); + if (!USELONGJUMP && er) return; + awrite(y, x); +} + +/* + * PINM - pin mode + */ +void xpinm(){ + address_t x,y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x=popaddress(); + if (x > 1) error(EORANGE); + y=popaddress(); + if (!USELONGJUMP && er) return; + pinm(y, x); +} + +/* + * DELAY in milliseconds + * + * this must call bdelay() and not delay() as bdelay() + * handles all the yielding and timing functions + * + */ +void xdelay(){ + nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + bdelay(pop()); +} + +/* tone if the platform has it -> BASIC command PLAY */ +#ifdef HASTONE +/* play a tone */ +void xtone(){ + address_t d = 0; + address_t v = 100; + address_t f, p; + +/* get minimum of 2 and maximum of 4 args */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 4 || args < 2) { error(EARGS); return; } + +/* a switch would be more elegant but needs more progspace ;-) */ + if (args == 4) v=popaddress(); + if (args >= 3) d=popaddress(); + f=popaddress(); + p=popaddress(); + if (!USELONGJUMP && er) return; + + playtone(p, f, d, v); +} +#endif + +/* pulse output - pin, duration, [value], [repetitions, delay] */ +#ifdef HASPULSE +void xpulse(){ + address_t pin, duration; + address_t val = 1; + address_t interval = 0; + address_t repetition = 1; + +/* do we have at least 2 and not more than 5 arguments */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args>5 || args<2) { error(EARGS); return; } + +/* get the data from stack */ + if (args == 5) { interval=popaddress(); repetition=popaddress(); } + if (args == 4) { error(EARGS); return; } + if (args > 2) val=popaddress(); + duration=popaddress(); + pin=popaddress(); + if (!USELONGJUMP && er) return; + +/* low level run time function for the pulse */ + pulseout(bpulseunit, pin, duration, val, repetition, interval); +} + +/* read a pulse, units given by bpulseunit - default 10 microseconds */ +void bpulsein() { + address_t x,y; + unsigned long t, pt; + + t=((unsigned long) popaddress())*1000; + y=popaddress(); + x=popaddress(); + if (!USELONGJUMP && er) return; + + push(pulsein(x, y, t)/bpulseunit); +} +#endif + + +#ifdef HASGRAPH +/* + * COLOR setting, accepting one or 3 arguments + */ +void xcolor() { + int r, g, b; + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + switch(args) { + case 1: + vgacolor(pop()); + break; + case 3: + b=pop(); + g=pop(); + r=pop(); + rgbcolor(r, g, b); + break; + default: + error(EARGS); + break; + } +} + +/* + * PLOT a pixel on the screen + */ +void xplot() { + int x0, y0; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + y0=pop(); + x0=pop(); + plot(x0, y0); +} + +/* + * LINE draws a line + */ +void xline() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + line(x0, y0, x1, y1); +} + +void xrect() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + rect(x0, y0, x1, y1); +} + +void xcircle() { + int x0, y0, r; + + nexttoken(); + parsenarguments(3); + if (!USELONGJUMP && er) return; + r=pop(); + y0=pop(); + x0=pop(); + circle(x0, y0, r); +} + +void xfrect() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + frect(x0, y0, x1, y1); +} + +void xfcircle() { + int x0, y0, r; + + nexttoken(); + parsenarguments(3); + if (!USELONGJUMP && er) return; + r=pop(); + y0=pop(); + x0=pop(); + fcircle(x0, y0, r); +} +#endif + +#ifdef HASDARKARTS +/* + * MALLOC allocates a chunk of memory + */ +void xmalloc() { + address_t s; + address_t a; + name_t name; + +/* size and identifier */ + s=popaddress(); + a=popaddress(); + if (!USELONGJUMP && er) return; + +/* create a name */ + name.token=TBUFFER; + name.l=2; + name.c[0]=a%256; + name.c[1]=a/256; + +/* allocate the memory */ + push(bmalloc(&name, s)); +} + +/* + * FIND an object on the heap + * xfind can find things in the variable name space and the buffer space + */ + +void xfind() { + address_t a; + address_t n; + +/* is there a ( */ + if (!expect('(', EUNKNOWN)) return; + +/* after that, try to find the object on the heap */ + nexttoken(); + if (token == TFN) { + nexttoken(); + name.token=TFN; + } + a=bfind(&name); + +/* depending on the object, interpret the result */ + switch (token) { + case ARRAYVAR: + case TFN: + if (!expect('(', EUNKNOWN)) return; + if (!expect(')', EUNKNOWN)) return; + case VARIABLE: + case STRINGVAR: + nexttoken(); + break; + default: + expression(); /* do not use expectexpr here because of the token sequence */ + if (!USELONGJUMP && er) return; + n=popaddress(); + if (!USELONGJUMP && er) return; + name.token=TBUFFER; + name.l=2; + name.c[0]=n%256; + name.c[1]=n/256; + a=bfind(&name); + } + +/* closing braket, dont use expect here because of the token sequence */ + if (token != ')') { error(EUNKNOWN); return; } + + push(a); +} + +/* + * EVAL can modify a program, there are serious side effects + * which are not caught (and cannot be). All FOR loops and RETURN + * vectors break if EVAL inserts in their range + */ +void xeval(){ + address_t i, l; + address_t mline, line; + string_t s; + +/* get the line number to store */ + if (!expectexpr()) return; + line=popaddress(); + if (!USELONGJUMP && er) return; + + if (token != ',') { error(EUNKNOWN); return; } + +/* the line to be stored */ + nexttoken(); + if (!stringvalue(&s)) { error(EARGS); return; } + +/* here we have the string to evaluate it to the ibuffer + only one line allowed, BUFSIZE is the limit */ + l=s.length; + if (!USELONGJUMP && er) return; + + if (l>BUFSIZE-1) {error(EORANGE); return; } + +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + + for (i=0; ienabled=0; + t->interval=0; + t->last=0; + t->type=0; + t->linenumber=0; +} + +void xtimer() { + token_t t; + btimer_t* timer; + +/* do we deal with every or after */ + if (token == TEVERY) timer=&every_timer; else timer=&after_timer; + + /* one argument expected, the time intervall */ + if (!expectexpr()) return; + + /* after that, a command GOTO or GOSUB with a line number + more commands thinkable */ + switch(token) { + case TGOSUB: + case TGOTO: + t=token; + if (!expectexpr()) return; + timer->last=millis(); + timer->type=t; + timer->linenumber=pop(); + timer->interval=pop(); + timer->enabled=1; + break; + default: + if (termsymbol()) { + x=pop(); + if (x == 0) + timer->enabled=0; + else { + if (timer->linenumber) { + timer->enabled=1; + timer->interval=x; + timer->last=millis(); + } else + error(EARGS); + } + } else + error(EUNKNOWN); + return; + } +} +#endif + +#ifdef HASEVENTS +/* + * The events API for Arduino with interrupt service routines + * analogous to the timer API. + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + * detach und attach are wrappers around the original Arduino functions. + * Runtime needs to be compiled with #define ARDUINOINTERRUPTS for this to + * work. + * + */ + +/* interrupts in BASIC fire once and then disable themselves, BASIC reenables them */ +void bintroutine0() { + eventlist[0].active=1; + detachinterrupt(eventlist[0].pin); +} +void bintroutine1() { + eventlist[1].active=1; + detachinterrupt(eventlist[1].pin); +} +void bintroutine2() { + eventlist[2].active=1; + detachinterrupt(eventlist[2].pin); +} +void bintroutine3() { + eventlist[3].active=1; + detachinterrupt(eventlist[3].pin); +} + +mem_t eventindex(mem_t pin) { + mem_t i; + + for(i=0; i= 0) { + outnumber(eventlist[ax].pin); outspc(); + outnumber(eventlist[ax].mode); outspc(); + outnumber(eventlist[ax].type); outspc(); + outnumber(eventlist[ax].linenumber); outspc(); + outcr(); + } + } + outnumber(nevents); outcr(); + nexttoken(); + return; + } + +/* control of events */ + if (token == TSTOP) { + events_enabled=0; + nexttoken(); + return; + } + + if (token == TCONT) { + events_enabled=1; + nexttoken(); + return; + } + +/* argument parsing */ + parsearguments(); + if (!USELONGJUMP && er) return; + + switch(args) { + case 2: + mode=pop(); + if (mode > 3) { + error(EARGS); + return; + } + case 1: + pin=pop(); + break; + default: + error(EARGS); + } + +/* followed by termsymbol, GOTO or GOSUB */ + if (token == TGOTO || token == TGOSUB) { + type=token; + +/* which line to go to */ + if (!expectexpr()) return; + line=pop(); + } + + +/* all done either set the interrupt up or delete it*/ + if (type) { + if (!addevent(pin, mode, type, line)) { + error(EARGS); + return; + } + } else { + disableevent(pin); + deleteevent(pin); + return; + } + +/* enable the interrupt */ + if (!enableevent(pin)) { + deleteevent(pin); + error(EARGS); + return; + } +} + +/* handling the event list */ +mem_t addevent(mem_t pin, mem_t mode, mem_t type, address_t linenumber) { + int i; + +/* is the event already there */ + for (i=0; i= EVENTLISTSIZE) return 0; + for (i=0; i= 0) { + eventlist[i].enabled=0; + eventlist[i].pin=-1; + eventlist[i].mode=0; + eventlist[i].type=0; + eventlist[i].linenumber=0; + eventlist[i].active=0; + nevents--; + } +} +#endif + +/* + * BASIC DOS - disk access programs, to control mass storage from BASIC + */ + +/* string match helper in catalog */ +char streq(const char *s, char *m){ + short i=0; + + while (m[i]!=0 && s[i]!=0 && i < SBUFSIZE){ + if (s[i] != m[i]) return 0; + i++; + } + return 1; +} + +/* + * CATALOG - basic directory function + */ +void xcatalog() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + const char *name; + + nexttoken(); + getfilename(filename, 0); + if (!USELONGJUMP && er) return; + + rootopen(); + while (rootnextfile()) { + if (rootisfile()) { + name=rootfilename(); + if (*name != '_' && *name !='.' && streq(name, filename)){ + outscf(name, 14); outspc(); + if (rootfilesize()>0) outnumber(rootfilesize()); + outcr(); + if (dspwaitonscroll() == 27) break; + } + } + rootfileclose(); + } + rootclose(); +#else + nexttoken(); +#endif +} + +/* + * DELETE a file + */ +void xdelete() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + + nexttoken(); + getfilename(filename, 0); + if (!USELONGJUMP && er) return; + + removefile(filename); +#else + nexttoken(); +#endif +} + +/* + * OPEN a file or I/O stream - very raw mix of different functions + */ +void xopen() { +#if defined(FILESYSTEMDRIVER) || defined(HASRF24) || defined(HASMQTT) || defined(HASWIRE) || defined(HASSERIAL1) + char stream = IFILE; /* default is file operation */ + char* filename; + int mode; + +/* which stream do we open? default is FILE */ + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',') {error(EUNKNOWN); return; } + nexttoken(); + } + +/* the filename and its length */ + + filename = getfilename2(0); + if (!USELONGJUMP && er) return; + +/* and the arguments */ + args=0; + if (token == ',') { + nexttoken(); + parsearguments(); + } + +/* getting an argument, no argument is read, i.e. mode 0 */ + if (args == 0 ) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + +/* open the stream */ + switch(stream) { +#ifdef HASSERIAL1 + case ISERIAL1: + prtclose(); + if (mode == 0) mode=9600; + if (prtopen(filename, mode)) ert=0; else ert=1; + break; +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + switch (mode) { + case 1: + ofileclose(); + if (ofileopen(filename, "w")) ert=0; else ert=1; + break; + case 2: + ofileclose(); + if (ofileopen(filename, "a")) ert=0; else ert=1; + break; + default: + case 0: + ifileclose(); + if (ifileopen(filename)) ert=0; else ert=1; + break; + } + break; +#endif +#ifdef HASRF24 + case IRADIO: + if (mode == 0) { + iradioopen(filename); + } else if (mode == 1) { + oradioopen(filename); + } + break; +#endif +#if defined(HASWIRE) + case IWIRE: + wireopen(filename[0], mode); + break; +#endif +#ifdef HASMQTT + case IMQTT: + if (mode == 0) { + mqttsubscribe(filename); + } else if (mode == 1) { + mqttsettopic(filename); + } + break; +#endif + default: + error(EORANGE); + return; + } +#endif + nexttoken(); +} + +/* + * OPEN as a function, currently only implemented for MQTT + */ +void xfopen() { + address_t stream = popaddress(); + if (stream == 9) push(mqttstate()); else push(0); +} + +/* + * CLOSE a file or stream + */ +void xclose() { +#if defined(FILESYSTEMDRIVER) || defined(HASRF24) || defined(HASMQTT) || defined(HASWIRE) + char stream = IFILE; + char mode; + + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',' && ! termsymbol()) {error(EUNKNOWN); return; } + nexttoken(); + } + + parsearguments(); + if (args == 0) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + +/* currently only close of files is implemented, should be also implemented for Wire */ + switch(stream) { + case IFILE: + if (mode == 1 || mode == 2) ofileclose(); else if (mode == 0) ifileclose(); + break; + } +#endif + nexttoken(); +} + +/* + * FDISK - format internal disk storages of RP2040, ESP and the like + */ +void xfdisk() { +#if defined(FILESYSTEMDRIVER) + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 1) error(EORANGE); + if (args == 0) push(0); + outsc("Format disk (y/N)?"); + (void) consins(sbuffer, SBUFSIZE); + if (sbuffer[1] == 'y') formatdisk(pop()); + if (fsstat(1) > 0) outsc("ok\n"); else outsc("fail\n"); +#endif + nexttoken(); +} + +#ifdef HASSTEFANSEXT +/* + * USR low level function access of the interpreter + * for each group of functions there is a call vector + * and and argument. + * + * USR arguments from 0 to 31 are reserved for the + * interpreter status and the input output stream + * mechanisms. All other values are free and can be used + * for individual functions - see case 32 for an example. + */ +void xusr() { + address_t fn; + number_t v; + int arg; + address_t a; + + v=pop(); + arg=(int)v; /* a bit paranoid here */ + fn=pop(); + switch(fn) { +/* USR(0,y) delivers all the internal constants and variables or the interpreter */ + case 0: + switch(arg) { + case 0: + push(bsystype); + break; + case 1: /* language set identifier, odd because USR is part of STEFANSEXT*/ + a=0; +#ifdef HASAPPLE1 + a|=1; +#endif +#ifdef HASARDUINOIO + a|=2; +#endif +#ifdef HASFILEIO + a|=4; +#endif +#ifdef HASDARTMOUTH + a|=8; +#endif +#ifdef HASGRAPH + a|=16; +#endif +#ifdef HASDARKARTS + a|=32; +#endif +#ifdef HASIOT + a|=64; +#endif + push(a); break; + case 2: + push(0); break; /* reserved for system speed identifier */ + +#ifdef HASFLOAT + case 3: push(-1); break; +#else + case 3: push(0); break; +#endif + case 4: push(numsize); break; + case 5: push(maxnum); break; + case 6: push(addrsize); break; + case 7: push(maxaddr); break; + case 8: push(strindexsize); break; + case 9: push(memsize+1); break; + case 10: push(elength()); break; + case 11: push(GOSUBDEPTH); break; + case 12: push(FORDEPTH); break; + case 13: push(STACKSIZE); break; + case 14: push(BUFSIZE); break; + case 15: push(SBUFSIZE); break; + case 16: push(ARRAYSIZEDEF); break; + case 17: push(defaultstrdim); break; +/* - 24 reserved, don't use */ + case 24: push(top); break; + case 25: push(here); break; + case 26: push(himem); break; + case 27: push(0); break; + case 28: push(freeRam()); break; + case 29: push(gosubsp); break; + case 30: push(loopsp); break; + case 31: push(0); break; /* fnc removed as interpreter variable */ + case 32: push(sp); break; +#ifdef HASDARTMOUTH + case 33: push(data); break; +#else + case 33: push(0); break; +#endif + case 34: push(0); break; +#ifdef FASTTICKERPROFILE + case 35: push(avgfasttick); break; +#endif +/* - 48 reserved, don't use */ + case 48: push(id); break; + case 49: push(idd); break; + case 50: push(od); break; + case 51: push(odd); break; + default: push(0); + } + break; +/* access to properties of stream 1 - serial */ + case 1: + push(serialstat(arg)); + break; +/* access to properties of stream 2 - display and keyboard */ + case 2: +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + push(dspstat(arg)); +#elif defined(ARDUINOVGA) + push(vgastat(arg)); +#else + push(0); +#endif + break; +/* access to properties of stream 4 - printer */ +#ifdef HASSERIAL1 + case 4: + push(prtstat(arg)); + break; +#endif +/* access to properties of stream 7 - wire */ +#if defined(HASWIRE) + case 7: + push(wirestat(arg)); + break; +#endif +/* access to properties of stream 8 - radio */ +#ifdef HASRF24 + case 8: + push(radiostat(arg)); + break; +#endif +/* access to properties of stream 9 - mqtt */ +#ifdef HASMQTT + case 9: + push(mqttstat(arg)); + break; +#endif +/* access to properties of stream 16 - file */ +#ifdef FILESYSTEMDRIVER + case 16: + push(fsstat(arg)); + break; +#endif + case 32: +/* user function 32 and beyond can be used freely */ +/* all USR values not assigned return 0 */ + default: + if (fn>31) push(usrfunction(fn, v)); else push(0); + } +} +#endif + +/* + * CALL currently only to exit the interpreter + */ +void xcall() { + int r; + + if (!expectexpr()) return; + r=pop(); + switch(r) { + case 0: +/* flush the EEPROM dummy and the output file and then exit */ + eflush(); + ofileclose(); +#if defined(POSIXFRAMEBUFFER) + vgaend(); /* clean up if you have played with the framebuffer */ +#endif + restartsystem(); + break; +/* restart the filesystem - only test code */ + case 1: + fsbegin(); + break; +/* call values to 31 reserved! */ + default: +/* your custom code into usrcall() */ + if (r > 31) usrcall(r); else { error(EORANGE); return; } + nexttoken(); + return; + } +} + +/* the dartmouth stuff */ +#ifdef HASDARTMOUTH +/* + * DATA is simply skipped when encountered as a command + */ +void xdata() { + while (!termsymbol()) nexttoken(); +} + +/* + * for READ find the next data record, helper of READ + */ +void nextdatarecord() { + address_t h; + mem_t s=1; + +/* save the location of the interpreter and the token we are processing */ + h=here; + +/* data at zero means we need to init it, by searching the first data record */ + if (data == 0) { + here=0; + while (here s.strdim) { error(EORANGE); return; } + +/* now write the string */ + assignstring(&s, &sr, sr.length); + +/* classical Apple 1 behaviour is string truncation in substring logic */ + newlength = lhs.i+sr.length-1; + setstringlength(&lhs.name, newlength, lhs.j); + + } + break; + default: + error(EUNKNOWN); + return; + } + +/* next list item */ + if (t0 == ',') goto nextdata; + +/* no nexttoken here as we have already a termsymbol */ + if (DEBUG) { + outsc("** leaving xread with "); outnumber(token); outcr(); + outsc("** at here "); outnumber(here); outcr(); + outsc("** and data pointer "); outnumber(data); outcr(); + } + +/* restore the token for further processing */ + token=t0; +} + +/* + * RESTORE sets the data pointer to zero right now + */ +void xrestore(){ + short rec; + + nexttoken(); + +/* a plain restore */ + if (termsymbol()) { + data=0; + datarc=1; + return; + } + +/* something with an argument */ + expression(); + if (!USELONGJUMP && er) return; + +/* we search a record */ + rec=pop(); + +/* if we need to search backward, back to the beginning */ + if (rec < datarc) { + data=0; + datarc=1; + } + +/* advance to the record or top */ + while (datarc < rec && data < top) nextdatarecord(); + +/* token is poisoned after nextdatarecord, need to cure this here */ + nexttoken(); +} + +/* + * DEF a function, functions are tokenized as FN ARRAYVAR to make + * name processing easy. + */ +void xdef(){ + address_t a; + + name_t function; /* the name of the function */ + name_t variable; /* the name of the argument */ + +/* do we define a function */ + if (!expect(TFN, EUNKNOWN)) return; + +/* the name of the function, it is tokenized as an array */ + if (!expect(ARRAYVAR, EUNKNOWN)) return; + + function=name; + function.token=TFN; /* set the right type here */ + +/* the argument variable */ + if (!expect('(', EUNKNOWN)) return; + nexttoken(); + if (token == ')') { + zeroname(&variable); + } else if (token == VARIABLE) { + variable=name; + nexttoken(); + } else { + error(EUNKNOWN); + return; + } + if (token != ')') { error(EUNKNOWN); return; } + +/* which type of function do we store is found in token */ + nexttoken(); + +/* ready to store the function */ + if (DEBUG) { + outsc("** DEF FN with function "); + outname(&function); + outsc(" and argument "); + outname(&variable); + outsc(" at here "); + outnumber(here); + outsc(" and token is "); + outnumber(token); + outcr(); + } + +/* find the function, we allow redefinition, currently only functions with 1 argument */ + if ((a=bfind(&function))==0) a=bmalloc(&function, 1); + if (DEBUG) {outsc("** found function structure at "); outnumber(a); outcr(); } + if (!USELONGJUMP && er) return; + +/* no more memory */ + if (a == 0) { error(EVARIABLE); return; } + +/* store the payload */ + +/* first the jump address */ + setaddress(a, memwrite2, here); + a=a+addrsize; + +/* the type of the return value - at the moment only numbers */ + if (token == '=') + memwrite2(a++, VARIABLE); + else + memwrite2(a++, 0); + +/* store the number of variables */ + memwrite2(a++, 1); + +/* store the type and the name of the variables */ + memwrite2(a++, variable.token); + setname_pgm(a, &variable); + a=a+sizeof(name_t)-1; /* useless now but needed later */ + +/* skip the function body during defintion */ + if (token == '=') { + while (!termsymbol()) nexttoken(); + } else { +#if defined(HASMULTILINEFUNCTIONS) + while (token != TFEND) { + nexttoken(); + if (token == TDEF || token == EOL) { error(EFUN); return; } + } + nexttoken(); +#else + error(EFUN); + return; +#endif + } +} + +/* + * FN function evaluation, this is a call from factor or directly from + * statement, the variable m tells xfn which one it is. 0 is from + * factor and 1 is from statement. + * + * This mechanism is only needed in multiline functions. In this case, + * a new interpreter instance is started with statement(). The variable + * m decides whether the stack should contain a return value (call from factor) + * or should be empty. + * + * The new function code has local variable capability of the new heap. + */ +void xfn(mem_t m) { + address_t a; + address_t h1, h2; + name_t variable; + token_t type; + +/* the name of the function and its address */ + if (!expect(ARRAYVAR, EUNKNOWN)) return; + name.token=TFN; + a=bfind(&name); + if (a == 0) {error(EUNKNOWN); return; } + + if (DEBUG) { outsc("** in xfn found function "); outname(&name); outsc(" at "); outnumber(a); outcr(); } + +/* and the argument */ + if (!expect('(', EUNKNOWN)) return; + nexttoken(); + +/* if there is no argument, set it to zero */ + if (token == ')') { + push(0); + } else { + expression(); + if (!USELONGJUMP && er) return; + } + if (token != ')') {error(EUNKNOWN); return; } + +/* where is the function code */ + h1=getaddress(a, memread2); + a=a+addrsize; + + if (DEBUG) { outsc("** found function address "); outnumber(h1); outcr(); } + +/* which type of function do we have*/ + type=memread2(a++); + + if (DEBUG) { outsc("** found function type "); outnumber(type); outcr(); } + +/* the number of variables is always one here */ + a++; + +/* what is the name of the variable, direct read as getname also gets a token */ +/* skip the type here as not needed*/ + variable.token=memread2(a++); + (void) getname(a, &variable, memread2); + a=a+sizeof(name_t)-1; + + if (DEBUG) { outsc("** found function variable "); outname(&variable); outcr(); } + +/* create a local variable and store the value in it if there is a variable */ + if (variable.c[0]) { + if (!bmalloc(&variable, 0)) { error(EVARIABLE); return; } + setvar(&variable, pop()); + } + +/* store here and then evaluate the function */ + h2=here; + here=h1; + +/* for simple singleline function, we directly do experession evaluation */ + if (type == VARIABLE) { + if (DEBUG) {outsc("** evaluating expression at "); outnumber(here); outcr(); } + if (!expectexpr()) return; + } else { +#ifdef HASMULTILINEFUNCTIONS + +/* here comes the tricky part, we start a new interpreter instance */ + + if (DEBUG) {outsc("** starting a new interpreter instance "); outcr();} + + nexttoken(); + fncontext++; + if (fncontext > FNLIMIT) { error(EFUN); return; } + statement(); + if (!USELONGJUMP && er) return; + if (fncontext > 0) fncontext--; else error(EFUN); +#else + error(EFUN); + return; +#endif + } + +/* now that all the function stuff is done, return to here and set the variable right */ + here=h2; + (void) bfree(&variable); + +/* now, depending on how this was called, make things right, we remove + the return value from the stack and call nexttoken */ + if (m == 1) { + pop(); + nexttoken(); + } +} + +/* + * ON is a bit like IF + */ + +void xon(){ + number_t cr, tmp; + int ci; + token_t t; + int line = 0; + +/* ON can do the ON ERROR and ON EVENT commands as well, in this BASIC + ERROR and EVENT can also be used without the ON */ + + nexttoken(); + switch(token) { +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + return; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + return; +#endif + default: + expression(); + if (!USELONGJUMP && er) return; + } + +/* the result of the condition, can be any number even large */ + cr=pop(); + if (DEBUG) { outsc("** in on condition found "); outnumber(cr); outcr(); } + +/* is there a goto or gosub */ + if (token != TGOSUB && token != TGOTO) { error(EUNKNOWN); return; } + +/* remember if we do gosub or goto */ + t=token; + +/* how many arguments have we got here */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args == 0) { error(EARGS); return; } + +/* do we have more arguments then the condition? */ + if (cr > args && cr <= 0) ci=0; else ci=(int)cr; + +/* now find the line to jump to and clean the stack, reuse cr + * we need to clean the stack here completely, therefore complete the loop + * ERROR handling is needed for the trapping mechanism. No using popaddress() + * here, because of the needed stack cleanup. Unclear is this precaution is + * really needed. + */ + while (args) { + tmp=pop(); + if (args == ci) { + if (tmp < 0) er=ELINE; + line=tmp; + } + args--; + } + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in on found line as target "); outnumber(line); outcr(); } + +/* no line found to jump to */ + if (line == 0) { + nexttoken(); + return; + } + +/* prepare for the jump */ + if (t == TGOSUB) pushgosubstack(0); + if (!USELONGJUMP && er) return; + + findline(line); + if (!USELONGJUMP && er) return; + +/* goto in interactive mode switched to RUN mode + no clearing of variables and stacks */ + if (st == SINT) st=SRUN; + +} +#endif + +/* the structured BASIC extensions, WHILE, UNTIL, and SWITCH */ + +#ifdef HASSTRUCT +void xwhile() { + +/* what? */ + if (DEBUG) { outsc("** in while "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points to the condition, name is irrelevant */ + pushloop(0, TWHILE, here, 0, 0); + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND and clear the stack*/ + if (!pop()) { + droploop(); + if (st == SINT) bi=ibuffer+here; + nexttoken(); + findbraket(TWHILE, TWEND); + nexttoken(); + } +} + +void xwend() { + blocation_t l; + bloop_t* loop; + +/* remember where we are */ + pushlocation(&l); + +/* back to the condition */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + +/* is this a while loop */ + if (loop->var.token != TWHILE ) { error(TWEND); return; } + +/* interactive run or program run */ + if (st == SINT) bi=ibuffer+loop->here; else here=loop->here; + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND */ + if (!pop()) { + droploop(); + poplocation(&l); + nexttoken(); + } +} + +void xrepeat() { + /* what? */ + if (DEBUG) { outsc("** in repeat "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points statement after repeat */ + + pushloop(0, TREPEAT, here, 0, 0); + +/* we are done here */ + nexttoken(); +} + +void xuntil() { + blocation_t l; + bloop_t* loop; + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* remember the location */ + pushlocation(&l); + +/* look on the stack */ + + loop = activeloop(); + if (!USELONGJUMP && er) return; + +/* if false, go back to the repeat */ + if (!pop()) { + +/* the right loop type ? */ + if (loop->var.token != TREPEAT) { + error(TUNTIL); + return; + } + +/* correct for interactive */ + if (st == SINT) bi=ibuffer+loop->here; else here=loop->here; + + } else { + +/* back to where we were */ + droploop(); + poplocation(&l); + } + + nexttoken(); /* a bit of evil here, hobling over termsymbols */ +} + +void xswitch() { + number_t r; + mem_t match = 0; + mem_t swcount = 0; + blocation_t l; + +/* lets look at the condition */ + if (!expectexpr()) return; + r=pop(); + +/* remember where we are */ + pushlocation(&l); + +/* seek the first case to match the condition */ + while (token != EOL) { + if (token == TSWEND) break; + /* nested SWITCH - skip them all*/ + if (token == TSWITCH) { + + if (DEBUG) { outsc("** in SWITCH - nesting found "); outcr(); } + + nexttoken(); + findbraket(TSWITCH, TSWEND); + + if (DEBUG) { outsc("** in SWITCH SWEND found at "); outnumber(here); outcr(); } + + if (!USELONGJUMP && er) return; + } + /* a true case */ + if (token == TCASE) { + +/* more sophisticated, case can have an argument list */ + nexttoken(); + parsearguments(); + + if (DEBUG) { outsc("** in CASE found "); outnumber(args); outsc(" arguments"); outcr(); } + + if (!USELONGJUMP && er) return; + if (args == 0) { + error(TCASE); + return; + } + while (args > 0) { + if (pop() == r) match=1; + args--; + } + + if (match) { + return; + } + } + nexttoken(); + } + +/* return to the original location and continue if no case is found */ + poplocation(&l); +} + +/* a nacked case statement always seeks the end of the switch */ +void xcase() { + while (token != EOL) { + nexttoken(); + if (token == TSWEND) break; +/* broken if switch is nested deeper then once, need the braket mechanism here */ +/* + if (token == TSWITCH) { + nexttoken(); + findbraket(TSWITCH, TSWEND); + } +*/ + } +} +#endif + + +/* + * statement processes an entire basic statement until the end + * of the line. + * + * The statement loop is a bit odd and requires some explanation. + * A statement function called in the central switch here must either + * call nexttoken as its last action to feed the loop with a new token + * and then break or it must return which means that the rest of the + * line is ignored. A function that doesn't call nexttoken and just + * breaks causes an infinite loop. + * + * statement is called once in interactive mode and terminates + * at end of a line. + */ + +void statement(){ + mem_t xc; + + if (DEBUG) bdebug("statement \n"); + +/* we can long jump out out any function now, making error handling easier */ +/* if we return here with a long jump, only the error handler is triggered */ +/* this mechanism always branches to the highest context */ +#if USELONGJUMP == 1 + if (fncontext == 0) if (setjmp(sthook)) goto errorhandler; +#endif + +/* the core loop processing commands */ + while (token != EOL) { +#ifdef HASSTEFANSEXT +/* debug level 1 happens only in the statement loop */ + if (debuglevel == 1) { debugtoken(); outcr(); } +#endif + switch(token){ + case ':': + case LINENUMBER: + nexttoken(); + break; +/* Palo Alto BASIC language set + BREAK */ + case TPRINT: + xprint(); + break; + case TLET: + nexttoken(); + if ((token != ARRAYVAR) && (token != STRINGVAR) && (token != VARIABLE)) { + error(EUNKNOWN); + break; + } + case STRINGVAR: + case ARRAYVAR: + case VARIABLE: + assignment(); + break; + case TINPUT: + xinput(); + break; + case TRETURN: +#ifndef HASMULTILINEFUNCTIONS + xreturn(); +#else + if (fncontext > 0) { + nexttoken(); + if (termsymbol()) { push(0); } + else expression(); + return; + } else + xreturn(); +#endif + break; +#ifndef HASMULTILINEFUNCTIONS + case TGOSUB: + case TGOTO: + xgoto(); + break; +#else + case TGOSUB: + if (fncontext > 0) { error(EFUN); return; } + case TGOTO: + xgoto(); + break; +#endif + case TIF: + xif(); + break; + case TFOR: + xfor(); + break; + case TNEXT: + xnext(); + break; + case TBREAK: + xbreak(); + break; + case TSTOP: + case TEND: /* return here because new input is needed, end as a block end is handles elsewhere */ + *ibuffer=0; /* clear ibuffer - this is a hack */ + st=SINT; /* switch to interactive mode */ + eflush(); /* if there is an EEPROM dummy, flush it here (protects flash storage!) */ + ofileclose(); + nexttoken(); + if (token == TSTOP) { + restartsystem(); + } + *ibuffer=0; /* clear ibuffer - this is a hack */ + st=SINT; /* switch to interactive mode */ + return; + case TLIST: + xlist(); + break; + case TNEW: /* return here because new input is needed */ + xnew(); + return; + case TCONT: /* cont behaves differently in interactive and in run mode */ + if (st==SRUN || st==SERUN) { + xcont(); + break; + } /* no break here, because interactively CONT=RUN minus CLR */ + case TRUN: + xrun(); + return; + case TREM: + xrem(); + break; +/* Apple 1 language set */ +#ifdef HASAPPLE1 + case TDIM: + xdim(); + break; + case TCLR: + xclr(); + break; + case TTAB: + case TSPC: + xtab(); + break; + case TPOKE: + xpoke(); + break; +#endif +/* Stefan's tinybasic additions */ + case TSAVE: + xsave(); + break; + case TLOAD: + xload(0); + if (st == SINT) return; /* interactive load doesn't like break as the ibuffer is messed up; */ + else break; +#ifdef HASSTEFANSEXT + case TDUMP: + xdump(); + break; + case TGET: + xget(); + break; + case TPUT: + xput(); + break; + case TSET: + xset(); + break; + case TNETSTAT: + xnetstat(); + break; + case TCLS: + ax=od; +/* if we have a display it is the default for CLS */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + od=ODSP; +#endif + outch(12); + od=ax; + nexttoken(); + break; + case TLOCATE: + xlocate(); + break; +/* low level functions as part of Stefan's extension */ + case TCALL: + xcall(); + break; +#endif +/* Arduino IO */ +#ifdef HASARDUINOIO + case TDWRITE: + xdwrite(); + break; + case TAWRITE: + xawrite(); + break; + case TPINM: + xpinm(); + break; + case TDELAY: + xdelay(); + break; +#ifdef HASTONE + case TTONE: + xtone(); + break; +#endif +#ifdef HASPULSE + case TPULSE: + xpulse(); + break; +#endif +#endif +/* BASIC DOS function */ +#ifdef HASFILEIO + case TCATALOG: + xcatalog(); + break; + case TDELETE: + xdelete(); + break; + case TOPEN: + xopen(); + break; + case TCLOSE: + xclose(); + break; + case TFDISK: + xfdisk(); + break; +#endif +/* graphics */ +#ifdef HASGRAPH + case TCOLOR: + xcolor(); + break; + case TPLOT: + xplot(); + break; + case TLINE: + xline(); + break; + case TRECT: + xrect(); + break; + case TCIRCLE: + xcircle(); + break; + case TFRECT: + xfrect(); + break; + case TFCIRCLE: + xfcircle(); + break; +#endif +#ifdef HASDARTMOUTH + case TDATA: + xdata(); + break; + case TREAD: + xread(); + break; + case TRESTORE: + xrestore(); + break; + case TDEF: + xdef(); + break; + case TON: + xon(); + break; +#ifdef HASMULTILINEFUNCTIONS + case TFN: + xfn(1); + break; + case TFEND: +/* we leave the statement loop and return to the calling expression() */ +/* if the function is ended with FEND we return 0 */ + if (fncontext == 0) { error(EFUN); return; } + else { push(0); return; } + break; +#endif +#endif +#ifdef HASSTEFANSEXT + case TELSE: + xelse(); + break; +#endif +#ifdef HASDARKARTS + case TEVAL: + xeval(); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + break; +#endif +#ifdef HASIOT + case TSLEEP: + xsleep(); + break; + case TWIRE: + xwire(); + break; +#endif +#ifdef HASTIMER + case TAFTER: + case TEVERY: + xtimer(); + break; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + break; +#endif +#ifdef HASSTRUCT + case TWHILE: + xwhile(); + break; + case TWEND: + xwend(); + break; + case TREPEAT: + xrepeat(); + break; + case TUNTIL: + xuntil(); + break; + case TSWITCH: + xswitch(); + break; + case TCASE: + xcase(); + break; + case TSWEND: + case TDO: + case TDEND: + nexttoken(); + break; +#endif +#ifdef HASEDITOR + case TEDIT: + xedit(); + break; +#endif + default: +/* strict syntax checking */ + error(EUNKNOWN); + goto errorhandler; + } + + +/* + * after each statement we check on a break character + * on an Arduino entering "#" at runtime stops the program + * for POSIXNONBLOCKING we do this in the background loop + * to avoid slowing down + */ +#if defined(BREAKCHAR) +#ifndef POSIXNONBLOCKING + if (checkch() == BREAKCHAR) { + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#else + if (breakcondition) { + breakcondition=0; + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#endif +#endif + +/* and after each statement, check the break pin */ +#if defined(BREAKPIN) + if (getbreakpin() == 0) { + st=SINT; + return; + }; +#endif + +/* and then there is also signal handling on some platforms */ +#if defined(POSIXSIGNALS) + if (breaksignal) { + st=SINT; + breaksignal=0; + serialflush(); + outcr(); + return; + } +#endif + +/* yield after each statement which is a 10-100 microsecond cycle + on Arduinos and the like, all background tasks are handled in byield */ + byield(); + +/* if error handling is compiled into the code, errors can be trapped here */ +errorhandler: +#ifdef HASERRORHANDLING + if (er) { + if (st != SINT) { + erh=er; + er=0; + switch(berrorh.type) { + case TCONT: + while(!termsymbol()) nexttoken(); + break; + case TGOTO: + findline(berrorh.linenumber); + berrorh.type=0; + berrorh.linenumber=0; + if (er) return; + break; + case 0: + return; + default: + nexttoken(); + } + } else + return; + } +#else +/* when an error is encountered the statement loop is ended */ + if (er) return; +#endif + +/* + * if we run error free, interrupts and times can be processed + * + * We can savely interrupt and return only if here points either to + * a termsymbol : or LINENUMBER. NEXT is a special case. We need to + * catch this here because empty FOR loops never even have a termsymbol + * a : is swallowed after FOR. + * + * the interrupts are only triggered in fncontext 0, i.e. in the + * main loop. While in functions, all interrupts are disabled. + * + */ +#ifdef HASTIMER + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* after is always processed before every */ + if (after_timer.enabled && fncontext == 0) { + if (millis() > after_timer.last + after_timer.interval) { + after_timer.enabled=0; + if (after_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + } + findline(after_timer.linenumber); + if (er) return; + } + } +/* periodic events */ + if (every_timer.enabled && fncontext == 0) { + if (millis() > every_timer.last + every_timer.interval) { + every_timer.last=millis(); + if (every_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + if (er) return; + } + findline(every_timer.linenumber); + if (er) return; + } + } + } +#endif + +/* the branch code for interrupts, we round robin through the event list */ +#ifdef HASEVENTS + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* interrupts */ + if (events_enabled && fncontext == 0) { + for (ax=0; ax= sizeof(address_t) + * and that the entire memory is smaller than the positive + * part of number type (!!) + * + * we assume that float >= 4 bytes in the following + * + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: the index size of strings either + * 1 byte or 2 bytes - no other values supported + */ +#ifdef HASFLOAT +typedef float number_t; +typedef long wnumber_t; +#else +typedef int number_t; +typedef int wnumber_t; +#endif +typedef uint16_t address_t; /* this type addresses memory */ +typedef int8_t mem_t; /* a signed 8 bit type for the memory */ +typedef int index_t; /* this type counts at least 16 bit */ +#ifndef HASLONGTOKENS +typedef int8_t token_t; /* the type of tokens, normally mem_t with a maximum of 127 commands and data types */ +#else +typedef int16_t token_t; /* token type extension, allows an extra of 127 commands and symbols */ +#endif + +/* the memreader function type, a function accessing memory has to have this shape */ +typedef mem_t (*memreader_t)(address_t); +typedef void (*memwriter_t)(address_t, mem_t); + +/* the worker function type - experimental */ +typedef void (*bworkfunction_t)(); + +/* the location type, this is the cursor on the actual interpreter location */ +typedef struct { + address_t location; + token_t token; +} blocation_t; + + +/* the new string type used in the reimplementation of the string functions */ +/* + * stringlength_t is the maximum length of a string, currently only 2 bytes is really tested. + * one byte lengthes may work, will be fixed soon to arbitrary types + * + * string_t says where we can find a string. It is either in BASIC memory and has a valid BASIC memory + * address a, or it is in C memory outside mem[]. Then ir says where the string can be found. + * This is necessary because BASIC can handle different memory layouts, EEPROM models and serial + * memory chips. We cannot simply rely on data to be found in BASIC memory like in old 8 bit + * computers or all in C memory like on modern Linux/Windows/Mac systems. + * + * Components of the string_t: + * - the address of the string in BASIC memory + * - the C memory pointer ir to the string location, if this is 0, the string is somewhere outside C memory + * - the length of the entire string + * - the dimension of the string strdim, this is the length of the memory segment reserved for the string + * - the dimension of the string array, arraydim + */ + +typedef uint16_t stringlength_t; + +typedef struct { + address_t address; + char* ir; + stringlength_t length; + address_t strdim; + address_t arraydim; +} string_t; + +/* + * Two types for identifiying objects and lefthandsides. + * name_t is the type for variable names and types. + * lhsobject_t identifies an assignable object like variables, + * arrays and strings. + * + * Currently name_t only implements two letter objects and lhsobject_t + * only implements two dimensional arrays and one dimensional strings. + */ +typedef struct { + token_t token; + mem_t c[MAXNAME]; + mem_t l; +} name_t; + +/* used to identify mostly lefthandsides and some righthandsides with these conventions */ +typedef struct { + name_t name; /* the name of a variable */ + address_t i; /* the start value of a substring or the first index of a number array */ + address_t j; /* the second index of an array */ + address_t i2; /* the second value of a substring string */ + mem_t ps; /* flag to indicate a pure string */ +} lhsobject_t; + +/* heap objects have a name a size and a payload address */ +typedef struct { + name_t name; + address_t address; + address_t size; +} heap_t; + +/* + * a general loop time, needed for the reimplementation of all loops + * the loop time knows the variable of a for loop or alternatively + * the type of the for loop. For this the token field of the name is + * reused. At also knows the here address of the loops beginning and optinally + * the end and the step + */ +typedef struct { + name_t var; + address_t here; + number_t to; + number_t step; +} bloop_t; + + +/* + * The accumulator type, used for the stack and the + * arithmetic operations. + */ +typedef union { + number_t n; + address_t a; + index_t i; + stringlength_t s; + mem_t c[sizeof(number_t)]; +} accu_t; + +/* the timer type, knows the linenumber and all the data of the timer */ +typedef struct { + mem_t enabled; + unsigned long last; + unsigned long interval; + mem_t type; + address_t linenumber; +} btimer_t; + +/* + * The events API for Arduino with interrupt service routines + * analogous to the timer API. + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + */ + +/* event type for external events */ +typedef struct { + mem_t enabled; + mem_t pin; + mem_t mode; + mem_t type; + address_t linenumber; + mem_t active; +} bevent_t; + +/* + * Function prototypes, ordered by layers + * HAL - hardware abstraction + * Layer 0 - memory and I/O + * Layer 1 - Program storage and control + * Layer 2 - Where stuff happens + */ + +/* + * Layer 0 functions - I/O and memory management + */ + +/* event types and functions */ +void bintroutine0(); +void bintroutine1(); +void bintroutine2(); +void bintroutine3(); +mem_t enableevent(mem_t); +void disableevent(mem_t); +mem_t eventindex(mem_t); +mem_t addevent(mem_t, mem_t, mem_t, address_t); +void deleteevent(mem_t); +volatile bevent_t* findevent(mem_t); + +/* make room for BASIC */ +address_t ballocmem(); + +/* handle files im EEPROM */ +void eload(); +void esave(); +char autorun(); + +/* the variable heap from Apple 1 BASIC */ +address_t bmalloc(name_t*, address_t); +address_t bfind(name_t*); +address_t bfree(name_t*); +address_t blength (name_t*); + +/* normal variables of number_t */ +number_t getvar(name_t*); +void setvar(name_t*, number_t); +void clrvars(); + +/* the new set of functions for memory access */ +number_t getnumber(address_t, memreader_t); +address_t getaddress(address_t, memreader_t); +stringlength_t getstrlength(address_t, memreader_t); +void setnumber(address_t, memwriter_t, number_t); +void setaddress(address_t, memwriter_t, address_t); +void setstrlength(address_t, memwriter_t, stringlength_t); + +/* setting names */ +address_t setname_heap(address_t, name_t*); +address_t setname_pgm(address_t, name_t*); +address_t getname(address_t, name_t*, memreader_t); +mem_t cmpname(name_t*, name_t*); +void zeroname(name_t*); +void zeroheap(heap_t*); + +/* array and string handling */ +/* the multidim extension is experimental, here only 2 array dimensions implemented as test */ +address_t createarray(name_t*, address_t, address_t); +void array(lhsobject_t*, mem_t, number_t*); +address_t createstring(name_t*, address_t, address_t); +void getstring(string_t*, name_t*, address_t, address_t); +void setstringlength(name_t*, address_t, address_t); + +/* the user defined extension functions */ +number_t getusrvar(); +void setusrvar(number_t); +number_t getusrarray(address_t); +void setusrarray(address_t, number_t); +void makeusrstring(); +number_t usrfunction(address_t, number_t); +void usrcall(address_t); + +/* get keywords and tokens from PROGMEM */ +char* getkeyword(address_t); +char* getmessage(char); +token_t gettokenvalue(address_t); +void printmessage(char); + +/* error handling */ +void error(token_t); +void reseterror(); +void debugtoken(); +void bdebug(const char*); + +/* the arithemtic stack */ +void push(number_t); +number_t pop(); +address_t popaddress(); +void drop(); +void clearst(); + +/* READ DATA handling */ +void clrdata(); + +/* FOR NEXT GOSUB stacks */ +void pushforstack(name_t*, number_t, number_t); +void popforstack(name_t*, number_t*, number_t*); +void dropforstack(); +void clrforstack(); +void pushgosubstack(mem_t); +void popgosubstack(); +void dropgosubstack(); +void clrgosubstack(); + +/* handling location rewinds */ +void pushlocation(blocation_t*); +void poplocation(blocation_t*); + +/* signal handling */ +void signalon(); +void signaloff(); +void signalhandler(int); + +/* output */ +void outcr(); +void outspc(); +void outsc(const char*); +void outscf(const char *, index_t); + +/* output a name */ +void outname(name_t*); + +/* I/O of number_t - floats and integers */ +address_t parsenumber(char*, number_t*); +address_t parsenumber2(char*, number_t*); +address_t writenumber(char*, wnumber_t); +address_t writenumber2(char*, number_t); +address_t tinydtostrf(number_t, index_t, char*); +int innumber(number_t*, char*, address_t); +void outnumber(number_t); + +/* + * Layer 1 functions, provide data and do the heavy lifting + * for layer 2 including lexical analysis, storing programs + * and expression evaluation + */ + +/* lexical analysis */ +void whitespaces(); +void nexttoken(); + +/* storing and retrieving programs */ +char nomemory(number_t); +void storetoken(); +mem_t memread(address_t); +mem_t memread2(address_t); +void memwrite2(address_t, mem_t); +void gettoken(); +void firstline(); +void nextline(); + +void clrlinecache(); +void addlinecache(address_t, address_t); +address_t findinlinecache(address_t); +void findline(address_t); +address_t myline(address_t); +void moveblock(address_t, address_t, address_t); +void zeroblock(address_t, address_t); +void diag(); +void storeline(); + +/* read arguments from the token stream and process them */ +char termsymbol(); +char expect(token_t, mem_t); +char expectexpr(); +void parsearguments(); +void parsenarguments(char); +void parsesubscripts(); +void parsefunction(void (*)(), short); +void parseoperator(void (*)()); +void parsesubstring(); + +/* mathematics and other functions for int and float */ +void xabs(); +void xsgn(); +void xpeek(); +void xmap(); +number_t rnd(); +void xrnd(); +void sqr(); +void xpow(); +number_t bpow(number_t, number_t); + +/* string values and string evaluation */ +void parsestringvar(string_t*, lhsobject_t*); +char stringvalue(string_t*); +void streval(); + +/* floating point functions */ +void xsin(); +void xcos(); +void xtan(); +void xatan(); +void xlog(); +void xexp(); +void xint(); + +/* expression evaluation */ +void factor(); +void power(); +void term(); +void addexpression(); +void compexpression(); +void notexpression(); +void andexpression(); +void expression(); + +/* real time clock string stuff */ +void rtcmkstr(); + +/* + * Layer 2 - statements and functions + * use the global variables + */ + +/* basic commands of the core language set */ +void xprint(); +void getstringtobuffer(string_t*, char*, stringlength_t); +void lefthandside(lhsobject_t*); +void assignnumber(lhsobject_t, number_t); +void assignstring(string_t*, string_t*, stringlength_t); +void assignment(); +void showprompt(); +void xinput(); +void xgoto(); +void xreturn(); +void xif(); + +/* FOR NEXT loops */ +void findnextcmd(); +void findbraket(token_t, token_t); +void xfor(); +void xbreak(); +void xcont(); +void xnext(); + +/* WHILE WEND*/ +void xwhile(); +void xwend(); + +/* REPEAT UNTIL */ +void xrepeat(); +void xuntil(); + +/* control commands and misc */ +void outputtoken(); +void xlist(); +void xrun(); +void xnew(); +void xrem(); +void xclr(); +void xdim(); +void xpoke(); +void xtab(); +void xdump(); +void dumpmem(address_t, address_t, char); +void xlocate(); + +/* file access and other i/o */ +void stringtobuffer(char*, string_t*); +void getfilename(char*, char); +void xsave(); +void xload(const char*); +void xget(); +void xput(); +void xset(); +void xnetstat(); + +/* Arduino IO control interface */ +void xaread(); +void xdread(); +void xdwrite(); +void xawrite(); +void xpinm(); +void xdelay(); +void xtone(); +void btone(int); +void bpulsein(); + +/* graphics commands */ +void xcolor(); +void xplot(); +void xline(); +void xrect(); +void xcircle(); +void xfrect(); +void xfcircle(); + +/* the darkarts */ +void xmalloc(); +void xfind(); +void xeval(); + +/* IoT commands */ +void xavail(); +void xfsensor(); +void xsleep(); +void xwire(); +void xfwire(); + +/* timers */ +void xafter(); +void xevent(); + +/* File I/O functions */ +char streq(const char*, char*); +void xcatalog(); +void xdelete(); +void xopen(); +void xfopen(); +void xclose(); +void xfdisk(); + +/* low level access functions */ +void xcall(); +void xusr(); + +/* the dartmouth stuff */ +void xdata(); +void nextdatarecord(); +void xread(); +void xrestore(); +void xdef(); +void xfn(mem_t); +void xon(); + +/* timers and interrupts */ +void xtimer(); +void resettimer(btimer_t*); + +/* structured BASIC extensions */ +void xwhile(); +void xwend(); +void xrepeat(); +void xuntil(); +void xswitch(); +void xcase(); +void xendswitch(); + +/* the editor */ +void xedit(); + +/* the statement loop */ +void statement(); + +/* the extension functions */ +void bsetup(); +void bloop(); diff --git a/data/Basic2/MSDOS/dosify b/data/Basic2/MSDOS/dosify new file mode 100644 index 0000000000000000000000000000000000000000..9e635262616723d7d0a6065d0e6574ec8baf4fcf --- /dev/null +++ b/data/Basic2/MSDOS/dosify @@ -0,0 +1 @@ +cat $1 | sed 's/\/\/.*$//g' | perl -pe 's/\r\n|\n|\r/\r\n/g' | sed 's/^#undef.*MSDOS/#define MSDOS/' | sed 's/^#define.*POSIX/#undef POSIX/' diff --git a/data/Basic2/MSDOS/getcode b/data/Basic2/MSDOS/getcode new file mode 100644 index 0000000000000000000000000000000000000000..d853d8a8b8a26715c74b32758afcd6b109c9c79e --- /dev/null +++ b/data/Basic2/MSDOS/getcode @@ -0,0 +1,12 @@ +#!/bin/sh + +SOURCE=../Posix/ +# Put your DOSEMU folder here +DOSDIR=/Users/stefan/Documents/DOS/B20 +files="basic.c basic.h language.h runtime.c runtime.h hardware.h" + +for file in $files +do + ./dosify $SOURCE/$file > $file + cp $file $DOSDIR +done diff --git a/data/Basic2/MSDOS/hardware.h b/data/Basic2/MSDOS/hardware.h new file mode 100644 index 0000000000000000000000000000000000000000..67295b0d62f80fab69c4d0d7ac5b0b5bfbfed6e2 --- /dev/null +++ b/data/Basic2/MSDOS/hardware.h @@ -0,0 +1,214 @@ +/* + * + * $Id: hardware.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * See the licence file on + * https: + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * + * Runtime environment for the BASIC interpreter, the + * hardware configuration file. It contains all hardware + * related settings and dependencies. + * + * This is hardware.h for POSIX systems and the POSIX runtime + * environment runtime.c. + * + * Default setting is POSIX for most UNIXes including Mac. + * RASPPI activates Raspberry PI related features. + * MINGW activates windows related features. + * MSDOS for MSDOS compiles with tc 2.0 (untested in this version, last tested in 1.4) + * + */ + +#undef MINGW +#define MSDOS +#undef RASPPI +#undef POSIX + +/* + * Hardware flags of the POSIX systems + * POSIXTERMINAL, POSIXVT52TOANSI: ensure compatibility of BASIC programs + * control characters of BASIC are translated to ANSI, bringing the Aruino + * VT52 commands to POSIX + * POSIXSIGNALS: enables signal handling of ^C interrupting programs + * POSIXNONBLOCKING: non blocking I/O to handle GET and the BREAKCHAR + * tricky on DOS, not very portable, experimental, use signals instead + * POSIXFRAMEBUFFER: directly draw to the frame buffer of Raspberry PI + * only tested on this platform + * POSIXWIRE: simple Raspberry PI wire code + * POSIXMQTT: analogous to ARDUINOMQTT, send and receive MQTT messages (unfinished) + * POSIXWIRING: use the (deprectated) wiring code for gpio on Raspberry Pi + * POSIXPIGPIO: use the pigpio library on a Raspberry PI + */ + +#undef POSIXTERMINAL +#undef POSIXVT52TOANSI +#undef POSIXSIGNALS +#undef POSIXNONBLOCKING +#undef POSIXFRAMEBUFFER +#undef POSIXWIRE +#undef POSIXMQTT +#undef POSIXWIRING +#undef POSIXPIGPIO + +/* simulates SPI RAM, only test code, keep undefed if you don't want to do something special */ +#undef SPIRAMSIMULATOR + +#ifdef SPIRAMSIMULATOR +#define USEMEMINTERFACE +#endif + +/* use a serial port as printer interface - unfinished - similar to Arduino */ +#undef POSIXPRT + +/* use TAB in MS mode */ +#define HASMSTAB + +/* used pins and other parameters */ + +/* set this is you want pin 4 on low interrupting the interpreter */ +/* #define BREAKPIN 4 */ +#define BREAKPIN 4 + +/* the SIGNAL the interpreters listens to for interrupt */ +#define BREAKSIGNAL SIGINT + +/* in case of non blocking IO turn on background tasks */ +#ifdef POSIXNONBLOCKING +#define BASICBGTASK +#endif + +/* frame buffer health check - currently only supported on Raspberry */ +#ifndef RASPPI +#undef POSIXFRAMEBUFFER +#endif + +/* wire parameters for Raspberry*/ +#undef POSIXI2CBUS 1 + +/* the size of the EEPROM dummy */ +#define EEPROMSIZE 1024 + +/* they all have this */ +#define FILESYSTEMDRIVER + +/* and they have this */ +#define HASCLOCK + +/* some have this */ +#if defined(POSIXWIRE) && defined(POSIXPIGPIO) +#define HASWIRE +#endif + +/* we can do graphics and tell language.h that we can */ +#ifdef POSIXFRAMEBUFFER +#define DISPLAYHASGRAPH +#endif + +/* after run behaviour on POSIX systems, 1 to terminate if started + on the command line with a file argument, 0 to stay active and + show a BASIC prompt*/ +#define TERMINATEAFTERRUN 1 + +/* + * all the things the POSIX platforms need to source + */ + +/* define all the types Arduino has for compatibility of the interface */ + +typedef unsigned char uint8_t; +typedef signed char int8_t; +typedef unsigned short uint16_t; +typedef signed short int16_t; +typedef unsigned char byte; +typedef unsigned long long uint64_t; +typedef unsigned int uint32_t; + +/* + * additional prototypes in an non Arduino world + */ +unsigned long millis(); + +/* the ususal suspects */ +#include +#include + +/* floating point maths only needed if HASFLOAT*/ +#include +#include + +/* time stuff */ +#include +#include +#include + +/* directories and files */ +#ifndef MSDOS +#include +#include +#else +#include +#include +#endif + +/* windowy things for windows */ +#ifdef MINGW +#include +#endif + +/* + * Tell BASIC we have a second serial port + */ +#ifdef POSIXPRT +#define HASSERIAL1 +#endif + +/* + * Tell BASIC we have a radio adapter + */ +#undef HASRF24 + +/* + * Tell BASIC we have MQTT + */ +#ifdef POSIXMQTT +#define HASMQTT +#endif + +/* we definitely don't run on an Arduino */ +#undef ARDUINOPROGMEM +#define PROGMEM +#undef ARDUINO + +/* and we use the buffer sizes for real computers */ +#define BUFSIZE 256 +#define STACKSIZE 256 +#define GOSUBDEPTH 64 +#define FORDEPTH 64 +#define LINECACHESIZE 64 + +/* the buffer size for simulated serial RAM */ +#define SPIRAMSBSIZE 512 + +/* + * This code measures the fast ticker frequency in microseconds + * Activate this only for test purposes. Not really useful on POSIX. + */ +#define FASTTICKERPROFILE + +/* + * Does the platform has command line args and do we want to use them + */ +#define HASARGS + +/* + * How restrictive are we on function recursive calls to protect the stack + * On Posix systems we can be more generous. + */ +#define FNLIMIT 128 + diff --git a/data/Basic2/MSDOS/language.h b/data/Basic2/MSDOS/language.h new file mode 100644 index 0000000000000000000000000000000000000000..4360d32999c8c790dffbbfa7b738e625f854090b --- /dev/null +++ b/data/Basic2/MSDOS/language.h @@ -0,0 +1,340 @@ +/* + * + * $Id: language.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter + * + * See the licence file on + * https: + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * This is the language definition file. Edit this to set the language + * capabilities. + * + * MEMSIZE sets the BASIC main memory to a fixed value, + * if MEMSIZE=0 a heuristic is used based on free heap + * size and architecture parameters + */ +#define MEMSIZE 0 + +/* + * DEBUG switches on compiled debug mode. Consider using runtime + * debug with SET 0,x before using this. + */ +#define DEBUG 0 + +/* + * Interpreter feature sets, choose one of the predefines or undefine all predefines and set the + * features in custom settings + * + * BASICFULL: full language set, use this with flash >32kB - ESPs, MKRs, Mega2560, RP2040, UNO R4 + * BASICINTEGER: integer BASIC with full language, use this with flash >32kB + * BASICSIMPLE: integer BASIC with reduced language set, 32kB capable - for UNOs with a lot of device drivers + * BASICSIMPLEWITHFLOAT: a small floating point BASIC, 32kB capable, for UNOs - good for UNOs with the need of float + * BASICTINYWITHFLOAT: a floating point tinybasic, if you have 32kB and need complex device drivers + * BASICMINIMAL: minimal language, just Palo Alto plus Arduino I/O, works on 168 with 1kB RAM and 16kB flash + * + */ +#define BASICFULL +#undef BASICINTEGER +#undef BASICSIMPLE +#undef BASICMINIMAL +#undef BASICSIMPLEWITHFLOAT +#undef BASICTINYWITHFLOAT + +/* + * Custom settings undef all the the language sets above when you are using this. Not all language + * features work in all combinations. + * + * HASAPPLE1: Apple 1 BASIC compatibility. This is the base for all other features. + * In this version the interpreter has a heap, a string pool and one dimensional arrays. + * HASARDUINOIO: Arduino I/O functions, including millis() timer. + * HASFILEIO: file I/O functions, including open, close, read, write, remove, rename. + * HASTONE: tone() and noTone() functions for sound output mapped to the PLAY command. + * HASPULSE: pulseIn() function for measuring pulse lengths. Pulse output. Both mapped to the PULSE command. + * HASSTEFANSEXT: Stefan's BASIC extensions, including ELSE, PUT, GET, advanced FOR loops, SQR and POW. + * HASERRORMSG: error messages for syntax and runtime errors. + * HASVT52: VT52 terminal emulation for text output. + * HASFLOAT: floating point support. + * HASGRAPH: graphics support, including line, circle, rectangle, fill, color. + * HASDARTMOUTH: Dartmouth BASIC compatibility: single line DEF FN, ON, READ, DATA. + * HASDARKARTS: Dark Arts BASIC is MALLOC, FIND, CLR for individual variables and EVAL for self modifying code. + * HASIOT: IoT functions, Wire access, Sensor functions, MQTT. Needs strings and heap. STR, VAL, INSTR are + * part of this. MQTT support only on Arduino- + * HASMULTIDIM: two dimensional arrays and one dimensional string arrays. + * HASTIMER: timer functions, AFTER and EVERY for periodic execution of programs. + * HASEVENTS: event handling, EVENT command. + * HASERRORHANDLING: error handling with ERROR GOTO. + * HASSTRUCT: structured language elements, WHILE WEND, REPEAT UNTIL, SWITCH CASE. Multi line IF THEN ELSE + * with the DO DEND construct. + * HASMSSTRINGS: MS Basic compatible strings, RIGHT$, LEFT$, MID$, ASC, CHR$, and string addition with +. + * Compatibility to MS BASICs is limited as this BASIC has only inplace string operations- + * HASMULTILINEFUNCTIONS: multi line functions, DEF FN, FEND. + * HASEDITOR: line editor for the console. + * HASTINYBASICINPUT: Tiny BASIC compatible input using the expression parser. Expressions and variables + * are valid number input with it. Default now but can have odd side effects. + * HASLONGNAMES: long variable names, up to 16 characters. Name length is set by MAXNAME in basic.h and + * can be any value <128 bytes. Names are still only uppercase and all names will be uppercased by lexer. + * + */ + +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES + +/* + * + * Odd stuff - these things change the behaviour of BASIC in some aspects. + * They can be used to make the interpreter compatible with other dialects. + * + * POWERRIGHTTOLEFT: normally the ^ operator works from left to right + * which means 2^3^2 = (2^3)^2 = 8^2 = 64. Setting this flag would + * change the behaviour to 2^3^2 = 2^(3^2) = 512 + * MSARRAYLIMITS: in BASIC arrays start at 1 and DIM A(10) creates 10 + * elements. With MSARRAYLIMITS defined, arrays start at 0 and have + * n+1 elements. This can be changed at any time with SET 21,0 or 1. + * SUPPRESSSUBSTRINGS: switch off substring logic by default, makes only sense with + * HASMSSTRINGS activated. With this, the syntax of strings and string + * arrays is comaptible to MS strings (only used to preset the variable now). + * SET 20 can change this at runtime. + * USELONGJUMP: use the longjmp feature of C. This greatly simplifies + * error handling at the cost of portability to some MCU platforms + * currently only experimental. It costs memory for the jump buffer. + * Don't use it on very small systems. LONGJUMP must be set to 0 or 1 as + * it is used in boolean expression in the code + * BOOLEANMODE: switch the behaviour of BASICs boolean operators. Default (-1) + * is to cast all numbers to signed 16bit and then do bitwise arithemtic. + * In this mode false is 0 and -1 is true. (1) is C style boolean arithemtic. + * In this mode true is 1 and false is 0. AND and OR still do bitwise operations + * but NOT is C not. SET 19,1 or -1 can change this at runtime. + * HASFULLINSTR: the full C64 style INSTR command. Without this flag INSTR only accepts + * a single character as argument. This is much faster and leaner on an Arduino. + * This macro is activated when HASMSSTRINGS is set. + * + */ +#undef POWERRIGHTTOLEFT +#undef MSARRAYLIMITS +#undef SUPPRESSSUBSTRINGS +#define USELONGJUMP 0 +#define BOOLEANMODE -1 +#undef HASFULLINSTR + +/* Palo Alto plus Arduino functions */ +#ifdef BASICMINIMAL +#undef HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#undef HASSTEFANSEXT +#undef HASERRORMSG +#undef HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* all features minus float and tone */ +#ifdef BASICINTEGER +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#endif + +/* a simple integer basic for small systems (UNO etc) */ +#ifdef BASICSIMPLE +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#define HASIOT +#undef HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* all features activated */ +#ifdef BASICFULL +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#endif + +/* a simple BASIC with float support */ +#ifdef BASICSIMPLEWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* a Tinybasic with float support */ +#ifdef BASICTINYWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* + * Language feature dependencies + * + * Dartmouth and darkarts needs the heap which is in Apple 1 + * IoT needs strings and the heap, also Apple 1 + * + * String arrays need multi dimensional capabilities + * + * The structured language set needs ELSE from STEFANSEXT + * + */ +#if defined(HASMULTILINEFUNCTIONS) +#define HASDARTMOUTH +#endif + +#if defined(HASDARTMOUTH) || defined(HASDARKARTS) || defined(HASIOT) || defined(HASMSSTRINGS) +#define HASAPPLE1 +#endif + +#if defined(HASSTRUCT) +#define HASSTEFANSEXT +#endif + +/* MS strings also bring the full INSTR */ +#if defined(HASMSSTRINGS) +#define HASFULLINSTR +#endif + +/* dependencies on the hardware */ +#if !defined(DISPLAYHASGRAPH) +#undef HASGRAPH +#endif + + + diff --git a/data/Basic2/MSDOS/runtime.c b/data/Basic2/MSDOS/runtime.c new file mode 100644 index 0000000000000000000000000000000000000000..15897c451b7e40125a1fb4c3fccf751fa571ed4f --- /dev/null +++ b/data/Basic2/MSDOS/runtime.c @@ -0,0 +1,2027 @@ +/* + * + * $Id: runtime.c,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * This is the Posix runtime environment for BASIC. It maps the functions + * needed for the various subsystems to the MCU specific implementations. + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * + * Configure the hardware settings in hardware.h. + * + */ + +#include "hardware.h" +#include "runtime.h" + +/* a small character buffer to receive strings */ +#define CBUFSIZE 4 +char* cbuffer[CBUFSIZE]; + +/* if the BASIC interpreter provides a loop function it will superseed this one */ +#ifndef MSDOS +void __attribute__((weak)) bloop() {} +#else +void bloop() {} +#endif + + +/* + * Global variables of the runtime env. + */ + +int8_t id; +int8_t od; +int8_t idd = ISERIAL; +int8_t odd = OSERIAL; +int8_t ioer = 0; + +/* counts the outputed characters on streams 0-3, used to emulate a real tab */ +#ifdef HASMSTAB +uint8_t charcount[3]; /* devices 1-4 support tabing */ +#endif + +/* the pointer to the buffer used for the &0 device */ +char* nullbuffer = ibuffer; +uint16_t nullbufsize = BUFSIZE; + +/* the system type */ +#if defined(MSDOS) +uint8_t bsystype = SYSTYPE_MSDOS; +#elif defined(RASPPI) +uint8_t bsystype = SYSTYPE_PASPPI; +#elif defined(MINGW) +uint8_t bsystype = SYSTYPE_MINGW; +#elif defined(POSIX) +uint8_t bsystype = SYSTYPE_POSIX; +#else +uint8_t bsystype = SYSTYPE_UNKNOWN; +#endif + +/* libraries from OSes */ + +/* Wiring Code, which library to use */ +#ifdef POSIXWIRING +#include +#endif + +#ifdef POSIXPIGPIO +#include +#undef POSIXWIRING +int pigpio_pi = 0; +#endif + +/* + * Default serial baudrate and serial flags for the + * two supported serial interfaces. Serial is always active and + * connected to channel &1 with 9600 baud. + * + * channel 4 (POSIXPRT) can be either in character or block + * mode. Blockmode is set as default here. This means that all + * available characters are always loaded to a string -> inb() + */ +/* + * Arduino default serial baudrate and serial flags for the + * two supported serial interfaces. Set to 0 on POSIX OSes + */ +const uint16_t serial_baudrate = 0; +const uint16_t serial1_baudrate = 0; +uint8_t sendcr = 0; +uint8_t blockmode = 0; + +/* + * Input and output functions. + * + * ioinit(): called at setup to initialize what ever io is needed + * outch(): prints one ascii character + * inch(): gets one character (and waits for it) + * checkch(): checks for one character (non blocking) + * ins(): reads an entire line (uses inch except for pioserial) + * + */ +void ioinit() { + +/* a standalone system runs from keyboard and display */ +#ifdef STANDALONE + idd = IKEYBOARD; + odd = ODSP; +#endif + +/* run standalone on second serial, set the right parameters */ +#ifdef STANDALONESECONDSERIAL + idd = ISERIAL1; + odd = OPRT; + blockmode = 0; + sendcr = 0; +#endif + +/* signal handling - by default SIGINT which is ^C is always caught and + leads to program stop. Side effect: the interpreter cannot be stopped + with ^C, it has to be left with CALL 0, works on Linux, Mac and MINGW + but not on DOSBOX MSDOS as DOSBOS does not handle CTRL BREAK correctly + DOS can be interrupted with the CONIO mechanism using BREAKCHAR. +*/ + signalon(); + +/* this is only for RASPBERRY - wiring has to be started explicitly */ + wiringbegin(); + +/* all serial protocolls, ttl channels, SPI and Wire */ + serialbegin(); + +#ifdef POSIXPRT + prtbegin(); +#endif +#ifdef ARDUINOSPI + spibegin(); +#endif +#ifdef HASWIRE + wirebegin(); +#endif + +/* filesystems and networks */ + fsbegin(); +#ifdef POSIXMQTT + netbegin(); + mqttbegin(); +#endif + +/* the keyboards */ +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + kbdbegin(); +#endif +/* the displays */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + dspbegin(); +#endif +#if defined(ARDUINOVGA) || defined(POSIXFRAMEBUFFER) + vgabegin(); /* mind this - the fablib code and framebuffer is special here */ +#endif +/* sensor startup */ +#ifdef ARDUINOSENSORS + sensorbegin(); +#endif +/* clocks and time */ +#if defined(HASCLOCK) + rtcbegin(); +#endif + +/* the eeprom dummy */ + ebegin(); + +/* activate the iodefaults */ + iodefaults(); +} + +void iodefaults() { + od=odd; + id=idd; +} + +/* + * Layer 0 - The generic IO code + * + * inch() reads one character from the stream, mostly blocking + * checkch() reads one character from the stream, unblocking, a peek(), + * inmplemented inconsistently + * availch() checks availablibity in the stream + * inb() a block read function for serial interfacing, developed for + * AT message receiving + */ + +/* this is odd ;-) */ +int cheof(int c) { if ((c == -1) || (c == 255)) return 1; else return 0; } + +/* the generic inch code reading one character from a stream */ +char inch() { + switch(id) { + case ONULL: + return bufferread(); + case ISERIAL: + return serialread(); +#ifdef POSIXPRT + case ISERIAL1: + return prtread(); +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) + case IKEYBOARD: +#if defined(HASVT52) + if (vt52avail()) return vt52read(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdread(); +#endif +#endif +#if defined(HASWIRE) && defined(HASFILEIO) + case IWIRE: + return wireread(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioread(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttread(); +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileread(); +#endif + } + return 0; +} + +/* + * checking on a character in the stream, this is + * normally only used for interrupting a program, + * for many streams this is just mapped to avail + */ +char checkch(){ + switch (id) { + case ONULL: + return buffercheckch(); + case ISERIAL: + return serialcheckch(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttcheckch(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return 0; +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtcheckch(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdcheckch(); /* here no display read as this is only for break and scroll control */ +#endif + break; + } + return 0; +} + +/* character availability */ +uint16_t availch(){ + switch (id) { + case ONULL: + return bufferavailable(); + case ISERIAL: + return serialavailable(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttavailable(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return wireavailable(); +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtavailable(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) +#if defined(HASVT52) + if (vt52avail()) return vt52avail(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdavailable(); +#endif +#endif + break; + } + return 0; +} + +/* + * the block mode reader for esp and sensor modules + * on a serial interface, it tries to read as many + * characters as possible into a buffer + * blockmode = 1 reads once availch() bytes + * blockmode > 1 implements a timeout mechanism and tries + * to read until blockmode milliseconds have expired + * this is needed for esps and other sensors without + * flow control and volatile timing to receive more + * then 64 bytes + */ + +uint16_t inb(char *b, int16_t nb) { + long m; + uint16_t z; + int16_t i = 0; + + if (blockmode == 1) { + i=availch(); + if (i>nb-1) i=nb-1; + b[0]=(unsigned char)i; + z=i; + b[i+1]=0; + b++; + while (i--) {*b++=inch();} + } else if (blockmode > 1) { + m=millis(); + while (i < nb-1) { + if (availch()) b[++i]=inch(); + if (millis() > m+blockmode) break; + } + b[0]=(unsigned char)i; + z=i; + b[i+1]=0; + } else { + b[0]=0; + z=0; + b[1]=0; + } + return z; +} + +/* + * reading from the console with inch, local echo is handled by the terminal + */ +uint16_t consins(char *b, uint16_t nb) { + char c; + uint16_t z; + + z=1; + while(z < nb) { + c=inch(); + if (c == '\r') c=inch(); + if (c == '\n' || cheof(c)) { /* terminal character is either newline or EOF */ + break; + } else { + b[z++]=c; + } + } + b[z]=0x00; + z--; + b[0]=(unsigned char)z; + return z; +} + + +/* + * ins() is the generic reader into a string, by default + * it works in line mode and ends reading after newline + * + * the first element of the buffer is the lower byte of the length + * + * this is corrected later in xinput, z.a has to be set as + * a side effect + * + * for streams providing entire strings as an input the + * respective string method is called + * + * all other streams are read using consins() for character by character + * input until a terminal character is reached + */ +uint16_t ins(char *b, uint16_t nb) { + switch(id) { + case ONULL: + return bufferins(b, nb); + case ISERIAL: + return serialins(b, nb); + break; +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + case IKEYBOARD: + return kbdins(b, nb); +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtins(b, nb); + #endif +#if defined(HASWIRE) && defined(HASFILEIO) + case IWIRE: + return wireins(b, nb); +#endif +#ifdef HASRF24 + case IRADIO: + return radioins(b, nb); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttins(b, nb); +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + return consins(b, nb); +#endif + default: + b[0]=0; b[1]=0; + return 0; + } +} + +/* + * outch() outputs one character to a stream + * block oriented i/o like in radio not implemented here + */ +void outch(char c) { + +/* do we have a MS style tab command, then count characters on stream 1-4 but not in fileio */ +/* this does not work for control characters - needs to go to vt52 later */ + +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) { + if (c > 31) charcount[od-1]+=1; + if (c == 10) charcount[od-1]=0; + } +#endif + + switch(od) { + case ONULL: + bufferwrite(c); + break; + case OSERIAL: + serialwrite(c); + break; +#ifdef POSIXPRT + case OPRT: + prtwrite(c); + break; +#endif +#ifdef FILESYSTEMDRIVER + case OFILE: + filewrite(c); + break; +#endif +#if defined(ARDUINOVGA) + case ODSP: + vgawrite(c); + break; +#elif defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case ODSP: + dspwrite(c); + break; +#endif +#ifdef POSIXMQTT + case OMQTT: + mqttwrite(c); /* buffering for the PRINT command */ + break; +#endif + default: + break; + } + byield(); /* yield after every character for ESP8266 */ +} + +/* + * outs() outputs a string of length x at index ir - basic style + * default is a character by character operation, block + * oriented write needs special functions + */ +void outs(char *ir, uint16_t l){ + uint16_t i; + + switch (od) { +#ifdef HASRF24 + case ORADIO: + radioouts(ir, l); + break; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case OWIRE: + wireouts(ir, l); + break; +#endif +#ifdef POSIXMQTT + case OMQTT: + mqttouts(ir, l); + break; +#endif +#ifdef GRAPHDISPLAYDRIVER + case ODSP: + dspouts(ir, l); + break; +#endif + default: + for(i=0; i +uint8_t breaksignal = 0; + +/* simple signal handler */ +void signalhandler(int sig){ + breaksignal=1; + signal(BREAKSIGNAL, signalhandler); +} + +/* activate signal handling */ +void signalon() { + signal(BREAKSIGNAL, signalhandler); +} + +/* deactivate signal handling unused and not yet done*/ +void signaloff() {} + +#endif + +/* + * helper functions OS, heuristic on how much memory is available in BASIC + */ +long freememorysize() { +#ifdef MSDOS + return 48000; +#else + return 65536; +#endif +} + +long freeRam() { + return freememorysize(); +} + +/* + * the sleep and restart functions + */ +void restartsystem() { exit(0);} +void activatesleep(long t) {} + +/* + * start the SPI bus + */ +void spibegin() {} + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + */ +const int dsp_rows=0; +const int dsp_columns=0; +void dspsetupdatemode(uint8_t c) {} +void dspwrite(char c){} +void dspbegin() {} +uint8_t dspstat(uint8_t c) {return 0; } +char dspwaitonscroll() { return 0; } +uint8_t dspactive() {return 0; } +void dspsetscrollmode(uint8_t c, uint8_t l) {} +void dspsetcursor(uint8_t c) {} + +#ifndef POSIXFRAMEBUFFER +/* these are the graphics commands */ +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) {} +void vgacolor(uint8_t c) {} +void plot(int x, int y) {} +void line(int x0, int y0, int x1, int y1) {} +void rect(int x0, int y0, int x1, int y1) {} +void frect(int x0, int y0, int x1, int y1) {} +void circle(int x0, int y0, int r) {} +void fcircle(int x0, int y0, int r) {} + +/* stubs for the vga code part analogous to ESP32 */ +void vgabegin(){} +void vgawrite(char c){} +#else +/* + * This is the first draft of the linux framebuffer code + * currently very raw, works only if the framebuffer is 24 bit + * very few checks, all kind of stuff can go wrong here. + * + * Main ideas and some part of the code came from this + * article https: + * by Andy W. + * + * Bresenham's algorithm came from the Wikipedia article + * and this very comprehensive discussion + * http: + * by Alois Zingl from the Vienna Technikum. I also recommend + * his thesis: http: + * + */ +#include +#include +#include +#include +#include + +/* 'global' variables to store screen info */ +char *framemem = 0; +int framedesc = 0; + +/* info from the frame buffer itself */ +struct fb_var_screeninfo vinfo; +struct fb_fix_screeninfo finfo; +struct fb_var_screeninfo orig_vinfo; + +/* the color variable of the frame buffer */ +long framecolor = 0xffffff; +int framevgacolor = 0x0f; +long framescreensize = 0; +int framecolordepth = 0; + +/* prepare the framebuffer device */ +void vgabegin() { + +/* see if we can open the framebuffer device */ + framedesc = open("/dev/fb0", O_RDWR); + if (!framedesc) { + printf("** error opening frame buffer \n"); + return; + } + +/* now get the variable info of the screen */ + if (ioctl(framedesc, FBIOGET_VSCREENINFO, &vinfo)) { + printf("** error reading screen information \n"); + return; + } + printf("** detected screen %dx%d, %dbpp \n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel); + +/* BASIC currently does 24 bit color only */ + memcpy(&orig_vinfo, &vinfo, sizeof(struct fb_var_screeninfo)); +/* + vinfo.bits_per_pixel = 24; + if (ioctl(framedesc, FBIOPUT_VSCREENINFO, &vinfo)) { + printf("** error setting variable information \n"); + return; + } +*/ + +/* how much color have we got */ + framecolordepth = vinfo.bits_per_pixel; + +/* get the fixed information of the screen */ + if (ioctl(framedesc, FBIOGET_FSCREENINFO, &finfo)) { + printf("Error reading fixed information.\n"); + return; + } + +/* now ready to memory map the screen - evil, we assume 24 bit without checking */ + + framescreensize = (framecolordepth/8) * vinfo.xres * vinfo.yres; + framemem = (char*)mmap(0, framescreensize, PROT_READ | PROT_WRITE, MAP_SHARED, framedesc, 0); + if ((int)framemem == -1) { + printf("** error failed to mmap.\n"); + framemem=0; + return; + } + +/* if all went well we have valid non -1 framemem and can continue */ +} + +/* this function does not exist in the ESP32 world because we don't care there */ +void vgaend() { + if ((int)framemem) munmap(framemem, framescreensize); + if (ioctl(framedesc, FBIOPUT_VSCREENINFO, &orig_vinfo)) { + printf("** error re-setting variable information \n"); + } + close(framedesc); +} + +/* set the color variable depending on the color depth*/ +void rgbcolor(int r, int g, int b) { + switch (framecolordepth/8) { + case 4: + framecolor = (((long)r << 16) & 0x00ff0000) | (((long)g << 8) & 0x0000ff00) | ((long)b & 0x000000ff); /* untested */ + break; + case 3: + framecolor = (((long)r << 16) & 0x00ff0000) | (((long)g << 8) & 0x0000ff00) | ((long)b & 0x000000ff); + break; + case 2: + framecolor = ((long) (r & 0xff) >> 3) << 10 | ((long) (g & 0xff) >> 2) << 6 | ((long) (b & 0xff) >> 3); /* untested */ + break; + case 1: + framecolor = ((long) (r & 0xff) >> 5) << 5 | ((long) (g & 0xff) >> 5) << 2 | ((long) (b & 0xff) >> 6); /* untested */ + break; + } +} + +/* this is taken from the Arduino TFT code */ +void vgacolor(short c) { + short base=128; + framevgacolor=c; + if (c==8) { rgbcolor(64, 64, 64); return; } + if (c>8) base=255; + rgbcolor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} + +/* plot directly into the framebuffer */ +void plot(int x, int y) { + unsigned long pix_offset; + +/* is everything in range, no error here */ + if (x < 0 || y < 0 || x >= vinfo.xres || y >= vinfo.yres) return; + +/* find the memory location */ + pix_offset = (framecolordepth/8) * x + y * finfo.line_length; + + if (pix_offset < 0 || pix_offset+ (framecolordepth/8-1) > framescreensize) return; + +/* write to the buffer */ + switch (framecolordepth/8) { + case 4: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 8) & 0x000000ff); + *((char*)(framemem + pix_offset+3)) = (unsigned char)((framecolor >> 16) & 0x000000ff); + break; + case 3: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 8) & 0x000000ff); + *((char*)(framemem + pix_offset+2)) = (unsigned char)((framecolor >> 16) & 0x000000ff); + break; + case 2: + *((char*)(framemem + pix_offset )) = (unsigned char)((framecolor & 0x1f) + (((framecolor >> 5) & 0x03) << 6)); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 7) & 0xff); + break; + case 1: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + break; + } + +} + +/* Bresenham's algorith from Wikipedia */ +void line(int x0, int y0, int x1, int y1) { + int dx, dy, sx, sy; + int error, e2; + + dx=abs(x0-x1); + sx=x0 < x1 ? 1 : -1; + dy=-abs(y1-y0); + sy=y0 < y1 ? 1 : -1; + error=dx+dy; + + while(1) { + plot(x0, y0); + if (x0 == x1 && y0 == y1) break; + e2=2*error; + if (e2 > dy) { + if (x0 == x1) break; + error=error+dy; + x0=x0+sx; + } + if (e2 <= dx) { + if (y0 == y1) break; + error=error+dx; + y0=y0+sy; + } + } +} + +/* rects could also be drawn with hline and vline */ +void rect(int x0, int y0, int x1, int y1) { + line(x0, y0, x1, y0); + line(x1, y0, x1, y1); + line(x1, y1, x0, y1); + line(x0, y1, x0, y0); +} + +/* filled rect, also just using line right now */ +void frect(int x0, int y0, int x1, int y1) { + int dx, sx; + int x; + sx=x0 < x1 ? 1 : -1; + for(x=x0; x != x1; x=x+sx) line(x, y0, x, y1); +} + +/* Bresenham for circles, based on Alois Zingl's work */ +void circle(int x0, int y0, int r) { + int x, y, err; + x=-r; + y=0; + err=2-2*r; + do { + plot(x0-x, y0+y); + plot(x0-y, y0-x); + plot(x0+x, y0-y); + plot(x0+y, y0+x); + r=err; + if (r <= y) err+=++y*2+1; + if (r > x || err > y) err+=++x*2+1; + } while (x < 0); +} + +/* for filled circles draw lines instead of points */ +void fcircle(int x0, int y0, int r) { + int x, y, err; + x=-r; + y=0; + err=2-2*r; + do { + line(x0-x, y0+y, x0+x, y0+y); + line(x0+x, y0-y, x0-x, y0-y); + r=err; + if (r <= y) err+=++y*2+1; + if (r > x || err > y) err+=++x*2+1; + } while (x < 0); +} + +/* not needed really, now, later yes ;-) */ +void vgawrite(char c) {} +#endif + +/* + * Keyboard code stubs + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +void kbdbegin() {} +uint8_t kbdstat(uint8_t c) {return 0; } +uint8_t kbdavailable(){ return 0;} +char kbdread() { return 0;} +char kbdcheckch() { return 0;} + +/* vt52 code stubs - unused here - needed for basic.c */ +uint8_t vt52avail() {return 0;} +char vt52read() { return 0; } + +/* Display driver would be here, together with vt52 */ + +/* + * Real Time clock code + */ + +void rtcbegin() {} + +uint16_t rtcget(uint8_t i) { + struct timeb thetime; + struct tm *ltime; + ftime(&thetime); + ltime=localtime(&thetime.time); + switch (i) { + case 0: + return ltime->tm_sec; + case 1: + return ltime->tm_min; + case 2: + return ltime->tm_hour; + case 3: + return ltime->tm_wday; + case 4: + return ltime->tm_mday; + case 5: + return ltime->tm_mon+1; + case 6: + return ltime->tm_year-100; + default: + return 0; + } +} + +void rtcset(uint8_t i, uint16_t v) {} + +/* + * Wifi and MQTT code + */ +#ifndef POSIXMQTT +void netbegin() {} +uint8_t netconnected() { return 0; } +void mqttbegin() {} +uint8_t mqttstat(uint8_t c) {return 0; } +uint8_t mqttstate() {return 0;} +void mqttsubscribe(const char *t) {} +void mqttsettopic(const char *t) {} +void mqttouts(const char *m, uint16_t l) {} +uint16_t mqttins(char *b, uint16_t nb) { return 0; }; +char mqttread() {return 0;}; +#else +/* we use mosquitto */ +#include +/* we assume to be on the network */ +void netbegin() {} +uint8_t netconnected() { return 1; } +/* the mqtt code */ +void mqttbegin() {} +uint8_t mqttstat(uint8_t c) {return 0; } +uint8_t mqttstate() {return 0;} +void mqttsubscribe(const char *t) {} +void mqttsettopic(const char *t) {} +void mqttouts(const char *m, uint16_t l) {} +uint16_t mqttins(char *b, uint16_t nb) { return 0; }; +char mqttread() {return 0;}; +#endif + +/* + * EEPROM handling, these function enable the @E array and + * loading and saving to EEPROM with the "!" mechanism + * a filesystem based dummy + */ +int8_t eeprom[EEPROMSIZE]; +void ebegin(){ + int i; + FILE* efile; + for (i=0; i=0 && a=0 && a YIELDINTERVAL-1) { + yieldfunction(); + lastyield=millis(); + } + +/* yield every second */ + if (millis()-lastlongyield > LONGYIELDINTERVAL-1) { + longyieldfunction(); + lastlongyield=millis(); + } + #endif + + /* call the background task scheduler on some platforms implemented in hardware-* */ + yieldschedule(); +} + +/* delay must be implemented to use byield() while waiting */ +void bdelay(uint32_t t) { + unsigned long i; + if (t>0) { + i=millis(); + while (millis() < i+t) byield(); + } +} + +/* fastticker is the hook for all timing functions */ +void fastticker() { +/* fastticker profiling test code */ +#ifdef FASTTICKERPROFILE + fasttickerprofile(); +#endif +/* toggle the tone pin */ +#ifdef ARDUINOTONEEMULATION + tonetoggle(); +#endif +} + +/* everything that needs to be done often - 32 ms */ +void yieldfunction() {} + +/* everything that needs to be done not so often - 1 second */ +void longyieldfunction() { +#ifdef BASICBGTASK +/* polling for the BREAKCHAR */ +#ifdef POSIXNONBLOCKING + if (checkch() == BREAKCHAR) breakcondition=1; +#endif +#endif +} + +void yieldschedule() {} + +/* + * The file system driver - all methods needed to support BASIC fs access + * MSDOS to be done + * + * file system code is a wrapper around the POSIX API + */ +void fsbegin() {} +FILE* ifile; +FILE* ofile; +#ifndef MSDOS +DIR* root; +struct dirent* file; +#else +void* root; +void* file; +#endif + +/* POSIX OSes always have filesystems */ +uint8_t fsstat(uint8_t c) { return 1; } + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char c) { + if (ofile) + fputc(c, ofile); + else + ioer=1; +} + +char fileread(){ + char c; + if (ifile) c=fgetc(ifile); else { ioer=1; return 0; } + if (cheof(c)) ioer=-1; + return c; +} + +uint8_t ifileopen(const char* filename){ + ifile=fopen(filename, "r"); + return ifile!=0; +} + +void ifileclose(){ + if (ifile) fclose(ifile); + ifile=0; +} + +uint8_t ofileopen(const char* filename, const char* m){ + ofile=fopen(filename, m); + return ofile!=0; +} + +void ofileclose(){ + if (ofile) fclose(ofile); + ofile=0; +} + +int fileavailable(){ return !feof(ifile); } + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +#ifdef MSDOS +#include +#include +struct ffblk *bffblk; +#endif + +void rootopen() { +#ifndef MSDOS + root=opendir ("./"); +#else + (void) findfirst("*.*", bffblk, 0); +#endif +} + +uint8_t rootnextfile() { +#ifndef MSDOS + file = readdir(root); + return (file != 0); +#else + return (findnext(bffblk) == 0); +#endif +} + +uint8_t rootisfile() { +#if !defined(MSDOS) && !defined(MINGW) + return (file->d_type == DT_REG); +#else + return 1; +#endif +} + +const char* rootfilename() { +#ifndef MSDOS + return (file->d_name); +#else + return (bffblk->ff_name); +#endif +} + +uint32_t rootfilesize() { +#ifndef MSDOS + return 0; +#else + return (bffblk->ff_fsize); +#endif +} + +void rootfileclose() {} +void rootclose(){ +#ifndef MSDOS + (void) closedir(root); +#endif +} + +/* + * remove method for files + */ +void removefile(const char *filename) { + remove(filename); +} + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(uint8_t i) { + puts("Format not implemented on this platform."); +} + +/* + * The buffer code, a simple buffer to store output and + * input data. It can be used as a device in BASIC using the + * modifier &0. + */ + +/* use the input buffer variable from BASIC here, it is extern to runtime */ +void bufferbegin() {} + +/* write to the buffer, works only until 127 + uses vt52 style commands to handle the buffer content*/ +void bufferwrite(char c) { + if (!nullbuffer) return; + switch (c) { + case 12: /* clear screen */ + nullbuffer[nullbuffer[0]+1]=0; + nullbuffer[0]=0; + break; + case 10: + case 13: /* cr and lf ignored */ + break; + case 8: /* backspace */ + if (nullbuffer[0]>0) nullbuffer[0]--; + break; + default: + if (nullbuffer[0] < nullbufsize-1 && nullbuffer[0] < 127) { + nullbuffer[++nullbuffer[0]]=c; + nullbuffer[nullbuffer[0]+1]=0; /* null terminate */ + } + break; + } +} + +/* read not needed right now */ +char bufferread() { return 0; } +uint16_t bufferavailable() { return 0; } +char buffercheckch() { return 0; } +void bufferflush() { } +uint16_t bufferins(char *b, uint16_t nb) { return 0; } + +/* + * Primary serial code, if NONBLOCKING is set, + * platform dependent I/O is used. This means that + * UNIXes use fcntl() to implement a serialcheckch + * and MSDOS as well als WIndows use kbhit(). + * This serves only to interrupt programs with + * BREAKCHAR at the moment. + */ +#ifdef POSIXNONBLOCKING +#if !defined(MSDOS) && !defined(MINGW) +#include + +/* we need to poll the serial port in non blocking mode + this slows it down so that we don't block an entire core + read speed here is one character per millisecond which + is 8000 baud, no one can type that fast but tedious when + from stdin */ +/* +void freecpu() { + struct timespec intervall; + struct timespec rtmp; + intervall.tv_sec=0; + intervall.tv_nsec=1000000; + nanosleep(&intervall, &rtmp); +} +*/ + +/* for non blocking I/O try to modify the stdin file descriptor */ +void serialbegin() { +/* we keep I/O mostly blocking here */ +/* + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); +*/ +} + +/* get and unget the character in a non blocking way */ +char serialcheckch(){ + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); + int ch=getchar(); + ungetc(ch, stdin); + fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); + return ch; +} + +/* check EOF, don't use feof()) here */ +uint16_t serialavailable() { + if (cheof(serialcheckch())) return 0; else return 1; +} + +/* two versions of serialread */ +char serialread() { + char ch; +/* blocking to let the OS handle the wait - this means: no call to byield() in interaction */ + ch=getchar(); + return ch; +/* this is the code that waits - calls byield() often just like on the Arduino */ +/* + while (cheof(serialcheckch())) { byield(); freecpu(); } + return getchar(); +*/ +} + +/* flushes the serial code in non blocking mode */ +void serialflush() { + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); + while (!cheof(getchar())); + fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); +} +#else +/* the non blocking MSDOS and MINGW code */ +#include +/* we go way back in time here and do it like DOS did it */ +void serialbegin(){} + +/* we go through the terminal on read */ +char serialread() { + return getchar(); +} + +/* check if a key is hit, get it and return it */ +char serialcheckch(){ + if (kbhit()) return getch(); +} + +/* simple version */ +uint16_t serialavailable() { + return 1; +} + +/* simple version */ +void serialflush() { } + +#endif +#else +/* the blocking code only uses puchar and getchar */ +void serialbegin(){} +char serialread() { return getchar(); } +char serialcheckch(){ return 1; } +uint16_t serialavailable() { return 1; } +void serialflush() {} +#endif + +uint8_t serialstat(uint8_t c) { + if (c == 0) return 1; + if (c == 1) return serial_baudrate/1000; + return 0; +} + +/* send the CSI sequence to start with ANSI */ +void sendcsi() { + putchar(27); putchar('['); /* CSI */ +} + +/* the vt52 state engine */ +#ifdef POSIXVT52TOANSI +#include +uint8_t dspesc = 0; +uint8_t vt52s = 0; +int cursory = 0; +uint8_t vt52active = 1; + +/* something little */ +uint8_t vt52number(char c) { + uint8_t b=c; + if (b>31) return b-32; else return 0; +} + +/* set the cursor */ +void dspsetcursory(uint8_t i) { + cursory=i; +} + +/* remember the position */ +void dspsetcursorx(uint8_t i) { + sendcsi(); + printf("%d;%dH", abs(cursory)+1, i+1); +} + +/* set colors, vga here */ +void dspsetfgcolor(uint8_t co) { + sendcsi(); + if (co < 8) { + putchar('3'); + } else { + putchar('9'); + co=co-8; + } + putchar('0'+co); + putchar('m'); +} + +void dspsetbgcolor(uint8_t co) { + sendcsi(); + if (co < 8) { + putchar('4'); + } else { + putchar('1'); putchar('0'); + co=co-8; + } + putchar('0'+co); + putchar('m'); +} + +/* vt52 state engine, a smaller version of the Arduino code*/ +void dspvt52(char* c){ + +/* reading and processing multi byte commands */ + switch (vt52s) { + case 'Y': + if (dspesc == 2) { + dspsetcursory(vt52number(*c)); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + dspsetcursorx(vt52number(*c)); + *c=0; + } + vt52s=0; + break; + case 'b': + dspsetfgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + case 'c': + dspsetbgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + } + +/* commands of the terminal in text mode */ + switch (*c) { + case 'v': /* GEMDOS / TOS extension enable wrap */ + break; + case 'w': /* GEMDOS / TOS extension disable wrap */ + break; + case '^': /* Printer extensions - print on */ + break; + case '_': /* Printer extensions - print off */ + break; + case 'W': /* Printer extensions - print without display on */ + break; + case 'X': /* Printer extensions - print without display off */ + break; + case 'V': /* Printer extensions - print cursor line */ + break; + case ']': /* Printer extension - print screen */ + break; + case 'F': /* enter graphics mode */ + break; + case 'G': /* exit graphics mode */ + break; + case 'Z': + break; + case '=': + case '>': + break; + case 'b': + case 'c': + vt52s=*c; + dspesc=1; + *c=0; + return; + case 'e': + break; + case 'f': + break; + case 'p': + break; + case 'q': + break; + case 'A': + sendcsi(); + putchar('A'); + break; + case 'B': + sendcsi(); + putchar('B'); + break; + case 'C': + sendcsi(); + putchar('C'); + break; + case 'D': + sendcsi(); + putchar('D'); + break; + case 'E': + *c=12; + dspesc=0; + return; + case 'H': + *c=2; + dspesc=0; + return; + case 'Y': + vt52s='Y'; + dspesc=2; + *c=0; + return; + case 'J': + sendcsi(); + putchar('J'); + break; + case 'd': + sendcsi(); + putchar('1'); putchar('J'); + break; + case 'K': + sendcsi(); + putchar('K'); + break; + case 'l': + sendcsi(); + putchar('2'); putchar('K'); + break; + case 'o': + sendcsi(); + putchar('1'); putchar('K'); + break; + case 'k': + break; + case 'j': + break; + case 'I': + putchar(27); + putchar('M'); + break; + case 'L': + break; + case 'M': + sendcsi(); + putchar('2'); putchar('K'); + break; + } + dspesc=0; + *c=0; +} +#endif + + +uint16_t serialins(char* b, uint16_t nb) { return consins(b, nb); } + +void serialwrite(char c) { + +/* the vt52 state engine */ +#ifdef POSIXVT52TOANSI + if (dspesc) { + dspvt52(&c); + if (c == 0) return; + } + +/* ESC is caught here and we only listen to VT52 not to ANSI */ + if (c == 27 && vt52active) { + dspesc=1; + return; + } +#endif + +/* this is the character translation routine to convert the Arduino + style characters 12 for CLS and 2 for HOME to ANSI, makes + BASIC programs more compatible */ +#ifdef POSIXTERMINAL + switch (c) { +/* form feed is clear screen - compatibility with Arduino code */ + case 12: + sendcsi(); + putchar('2'); putchar('J'); +/* home sequence in the arduino code */ + case 2: + sendcsi(); + putchar('H'); + return; + } +#endif + +/* finally send the plain character */ + putchar(c); +} + +/* + * handling the second serial interface - only done on Mac so far + * test code + * + * Tried to learn from https: + * + */ +#ifdef POSIXPRT +#include +#if !defined(MSDOS) && !defined(MINGW) +#include +#endif + +/* the file name of the printer port */ +int prtfile; + +/* the buffer to read one character */ +char prtbuf = 0; + + +void prtbegin() {} + +char prtopen(char* filename, uint16_t mode) { +#if !defined(MSDOS) && !defined(MINGW) + +/* try to open the device file */ + prtfile=open(filename, O_RDWR | O_NOCTTY); + if (prtfile == -1) { + perror(filename); + return 0; + } + +/* get rid of garbage */ + tcflush(prtfile, TCIOFLUSH); + +/* configure the device */ + struct termios opt; + (void) tcgetattr(prtfile, &opt); + + +/* raw terminal settings + opt.c_iflag &= ~(INLCR | IGNCR | ICRNL | IXON | IXOFF); + opt.c_oflag &= ~(ONLCR | OCRNL); + opt.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); +*/ + +/* timeout settings on read 100ms, read every character */ + opt.c_cc[VTIME] = 1; + opt.c_cc[VMIN] = 0; + +/* set the baudrate */ + switch (mode) { + case 9600: + cfsetospeed(&opt, B9600); + break; + default: + cfsetospeed(&opt, B9600); + break; + } + cfsetispeed(&opt, cfgetospeed(&opt)); + +/* set the termin attributes */ + tcsetattr(prtfile, TCSANOW, &opt); +#endif + + return 1; +} + +void prtclose() { + if (prtfile) close(prtfile); +} + +uint8_t prtstat(uint8_t c) {return 1; } + +void prtset(uint32_t s) {} + +/* write the characters byte by byte */ +void prtwrite(char c) { + int i=write(prtfile, &c, 1); + if (i != 1) ioer=1; +} + +/* read just one byte, map no bytes to EOF = -1 */ +char prtread() { + char c; + +/* something in the buffer? return it! */ + if (prtbuf) { + c=prtbuf; + prtbuf=0; + } else { +/* try to read */ + int i=read(prtfile, &c, 1); + if (i < 0) { + ioer=1; + return 0; + } + if (i == 0) return -1; + } + return c; +} + +/* not yet implemented */ +char prtcheckch(){ + if (!prtbuf) { /* try to read */ + int i=read(prtfile, &prtbuf, 1); + if (i <= 0) prtbuf=0; + } + return prtbuf; +} + +uint16_t prtavailable(){ + return prtcheckch()!=0; +} + +uint16_t prtins(char* b, uint16_t nb) { + if (blockmode > 0) return inb(b, nb); else return consins(b, nb); +} + +#else +void prtbegin() {} +uint8_t prtstat(uint8_t c) {return 0; } +void prtset(uint32_t s) {} +void prtwrite(char c) {} +char prtread() {return 0;} +char prtcheckch(){ return 0; } +uint16_t prtavailable(){ return 0; } +uint16_t prtins(char* b, uint16_t nb) { return 0; } +#endif + + +/* + * The wire code + */ +#if defined(POSIXWIRE) && defined(POSIXPIGPIO) +uint8_t wire_slaveid = 0; + +/* open the wire connection in pigpio */ +void wirebegin() { +} + +/* we return the handle here, inconsistent with the Arduino code */ +uint8_t wirestat(uint8_t c) { + return 1; +} + +void wireopen(char s, uint8_t m) { + if (m == 0) { + wire_slaveid=s; + } else if ( m == 1 ) { + outsc("** wire slave mode not implemented"); outcr(); + } else + error(EORANGE); +} + + +/* read a number of bytes, depending on the string length */ +uint16_t wireins(char *b, uint8_t l) { + int handle; + int16_t z; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, wire_slaveid, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + } + + z=i2c_read_device(pigpio_pi, handle, b+1, l); + + if (z < 0) { + ioer=-1; + z=0; + } + b[0]=z; + + i2c_close(pigpio_pi, handle); + + return z; +} + + +void wireouts(char *b, uint8_t l) { + int handle; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, wire_slaveid, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + } + + if (i2c_write_device(pigpio_pi, handle, b, l) < 0) ioer=-1; + + i2c_close(pigpio_pi, handle); +} + +uint16_t wireavailable() { return 1; } + +/* the register access functions */ +int16_t wirereadbyte(uint8_t port) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + return -1; + } + + res=i2c_read_byte(pigpio_pi, handle); + i2c_close(pigpio_pi, handle); + return res; +} + +/* use the simple wire byte function */ +void wirewritebyte(uint8_t port, int16_t data) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + ioer=i2c_write_byte(pigpio_pi, handle, data); + + i2c_close(pigpio_pi, handle); +} + + +/* this code used the write byte function twice */ +/* +void wirewriteword(short port, short data1, short data2) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + ioer=i2c_write_byte(pigpio_pi, handle, data1); + ioer+=i2c_write_byte(pigpio_pi, handle, data2); + + i2c_close(pigpio_pi, handle); +} +*/ + +/* use the raw access function in a buffer */ +void wirewriteword(short port, short data1, short data2) { + int res, handle; + mem_t buf[2]; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + buf[0]=data1; + buf[1]=data2; + + if (i2c_write_device(pigpio_pi, handle, buf, 2) <0 ) ioer=-1; + + i2c_close(pigpio_pi, handle); +} + +/* just a helper to make GET work, wire is string oriented */ +char wireread() { + char wbuffer[2]; + if wireins(wbuffer, 1) return wbuffer[1]; else return 0; +} + +#else +void wirebegin() {} +uint8_t wirestat(uint8_t c) {return 0; } +void wireopen(char s, uint8_t m) {} +uint16_t wireins(char *b, uint8_t l) { b[0]=0; return 0; } +void wireouts(char *b, uint8_t l) {} +uint16_t wireavailable() { return 1; } +int16_t wirereadbyte(uint8_t port) { return 0; } +void wirewritebyte(uint8_t port, int16_t data) { return; } +void wirewriteword(uint8_t port, int16_t data1, int16_t data2) { return; } +/* just a helper to make GET work, wire is string oriented */ +char wireread() { return 0; } +#endif + +/* + * Read from the radio interface, radio is always block + * oriented. + */ +uint8_t radiostat(uint8_t c) {return 0; } +void radioset(uint8_t s) {} +uint16_t radioins(char *b, uint8_t nb) { b[0]=0; b[1]=0; return 0; } +void radioouts(char *b, uint8_t l) {} +void iradioopen(const char *filename) {} +void oradioopen(const char *filename) {} +uint16_t radioavailable() { return 0; } +char radioread() { return 0; } + +/* Arduino sensors */ +void sensorbegin() {} +float sensorread(uint8_t s, uint8_t v) {return 0;}; + + +/* + * event handling wrappers, to keep Arduino specifics out of BASIC + */ + +uint8_t pintointerrupt(uint8_t pin) { return 0; } +void attachinterrupt(uint8_t inter, void (*f)(), uint8_t mode) {} +void detachinterrupt(uint8_t pin) {} + +/* + * Experimental code to simulate 64kb SPI SRAM modules + * + * currently used to test the string code of the mem + * interface + * + */ + +#ifdef SPIRAMSIMULATOR + +static int8_t spiram[65536]; + +/* the RAM begin method sets the RAM to byte mode */ +uint16_t spirambegin() { + return 65534; +} + +/* the simple unbuffered byte write, with a cast to signed char */ +void spiramrawwrite(uint16_t a, int8_t c) {spiram[a]=c;} + +/* the simple unbuffered byte read, with a cast to signed char */ +int8_t spiramrawread(uint16_t a) {return spiram[a];} + +/* the buffers calls, also only simulated here */ + +void spiram_rwbufferwrite(uint16_t a, int8_t c) {spiram[a]=c;} + +int8_t spiram_rwbufferread(uint16_t a) {return spiram[a];} + +int8_t spiram_robufferread(uint16_t a) {return spiram[a];} + +/* to handle strings in SPIRAM situations two more buffers are needed + * they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set + */ +char spistrbuf1[SPIRAMSBSIZE]; +char spistrbuf2[SPIRAMSBSIZE]; +#endif + +/* + * This code measures the fast ticker frequency in microseconds + * Activate this only for test purposes. Not really useful on POSIX. + */ + +#ifdef FASTTICKERPROFILE +uint32_t lastfasttick = 0; +uint32_t fasttickcalls = 0; +uint16_t avgfasttick = 0; +long devfasttick = 0; + +void fasttickerprofile() { + int delta; + if (lastfasttick == 0) { lastfasttick=micros(); return; } + delta=micros()-lastfasttick; + lastfasttick=micros(); + avgfasttick=(avgfasttick*fasttickcalls+delta)/(fasttickcalls+1); + fasttickcalls++; +} +#endif + diff --git a/data/Basic2/MSDOS/runtime.h b/data/Basic2/MSDOS/runtime.h new file mode 100644 index 0000000000000000000000000000000000000000..bb29a7ddf8294b6c1d7e91def82f0e51598f1f8c --- /dev/null +++ b/data/Basic2/MSDOS/runtime.h @@ -0,0 +1,775 @@ +/* + * + * $Id: runtime.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * Prototypes for the runtime environment of the BASIC interpreter. + * + * Needs to be included by runtime.c or runtime.cpp and basic.c + * + * Parametrized by hardware.h. + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + */ + +#if !defined(__RUNTIMEH__) +#define __RUNTIMEH__ + +/* + * system type identifiers + */ +#define SYSTYPE_UNKNOWN 0 +#define SYSTYPE_AVR 1 +#define SYSTYPE_ESP8266 2 +#define SYSTYPE_ESP32 3 +#define SYSTYPE_RP2040 4 +#define SYSTYPE_SAM 5 +#define SYSTYPE_XMC 6 +#define SYSTYPE_SMT32 7 +#define SYSTYPE_NRENESA 8 +#undef POSIX 32 +#define SYSTYPE_MSDOS 33 +#define SYSTYPE_MINGW 34 +#define SYSTYPE_RASPPI 35 + +/* + * Input and output channels. + * The channels are used to identify the I/O devices in the + * runtime environment. + * + * NULL is the memory channel outputting to a buffer. + * SERIAL is the standard serial channel and the default device. + * DSP is the display channel. + * PRT is the second serial channel used for printing and communication + * with external devices. + * WIRE is the I2C channel. + * RADIO is the RF24 channel. + * MQTT is the MQTT channel. + * FILE is the file system channel. + */ +#define ONULL 0 +#define OSERIAL 1 +#define ODSP 2 +#define OPRT 4 +#define OWIRE 7 +#define ORADIO 8 +#define OMQTT 9 +#define OFILE 16 + +#define INULL 0 +#define ISERIAL 1 +#define IKEYBOARD 2 +#define ISERIAL1 4 +#define IWIRE 7 +#define IRADIO 8 +#define IMQTT 9 +#define IFILE 16 + +/* + * The main IO interface. This is how BASIC uses I/O functions + * + * ioinit(): called at setup to initialize what ever io is needed + * outch(): prints one ascii character + * inch(): gets one character (and waits for it) + * checkch(): checks for one character (non blocking) + * ins(): reads an entire line (uses inch except for pioserial) + * + */ +void ioinit(); +void iodefaults(); +int cheof(int); +char inch(); +char checkch(); +uint16_t availch(); +uint16_t inb(char*, int16_t); +uint16_t ins(char*, uint16_t); +void outch(char); +void outs(char*, uint16_t); + +/* + * Global variables of the runtime env, visible to BASIC + */ +extern int8_t id; /* active input stream */ +extern int8_t od; /* active output stream */ +extern int8_t idd; /* default input stream in interactive mode */ +extern int8_t odd; /* default output stream in interactive mode */ +extern int8_t ioer; /* the io error */ + +/* io control flags */ +extern uint8_t kbdrepeat; +extern uint8_t blockmode; +extern uint8_t sendcr; + +/* counts the outputed characters on streams 0-3, used to emulate a real tab */ +extern uint8_t charcount[3]; /* devices 1-4 support tabing */ + +/* the memory buffer comes from BASIC in this version */ +extern char ibuffer[BUFSIZE]; /* the input buffer */ + +/* only needed in POSIX worlds */ +extern uint8_t breaksignal; +extern uint8_t vt52active; + +/* the string buffer the interpreter needs, here to be known by BASIC */ +extern char spistrbuf1[SPIRAMSBSIZE], spistrbuf2[SPIRAMSBSIZE]; + +/* the mqtt variable the interpreter needs */ +#define MQTTLENGTH 32 +extern char mqtt_otopic[MQTTLENGTH]; +extern char mqtt_itopic[MQTTLENGTH]; +extern char mqttname[]; + +/* + * accessing the fastticker information + */ +extern uint16_t avgfasttick; + +/* + * A byte in the runtime memory containing the system type + */ +extern uint8_t bsystype; + +/* + * These functions are always empty on Arduino, they are only used in + * the POSIX branch of the code. + * + * BASIC calls these functions once to start the timing, wiring, and signal handling. + */ + +void timeinit(); /* handling time - part of the Arduino core - only needed on POSIX OSes */ +void wiringbegin(); /* starting wiring is only needed on raspberry */ +void signalon(); /* POSIX signals - not needed on Ardunino */ + +/* + * Memory allocation functions. + * + * BASIC calls freememorysize() to detemine how much memory can be allocated + * savely on the heap. + * BASIC calls restartsystem() for a complete reboot. + * freeRam() is the actual free heap. Used in BASIC only in USR. + * + * Arduino data from https: + */ + +long freememorysize(); /* determine how much actually to allocate */ +void restartsystem(); /* cold start of the MCU */ +long freeRam(); /* try to find the free heap after alocating all globals */ + +/* This is unfinished, don't use, sleep and RTC interrupt code. */ +void rtcsqw(); +void aftersleepinterrupt(void); +void activatesleep(long); + +/* + * Start the SPI bus. Called once on start. + * + * Some libraries also try to start the SPI which may lead to on override of + * the PIN settings if the library code is not clean - currenty no conflict known. + * for the libraries used here. + */ +void spibegin(); + +/* + * Timeing functions and background tasks. + * + * byield() is called after every statement and in all + * waiting loops for I/O. BASIC gives back the unneeded + * CPU cycles by calling byield(). + * + * byield() it allows three levels of background tasks. + * + * BASICBGTASK controls if time for background tasks is + * needed, usually set by hardware features + * + * YIELDINTERVAL by default is 32, generating a 32 ms call + * to the network loop function. + * + * LONGYIELDINTERVAL by default is 1000, generating a one second + * call to maintenance functions. + * + * fastticker() is called in every byield for fast I/O control. + * It is currently only used for the tone emulation. + * + * byield calls back bloop() in the BASIC interpreter for user + * defined background tasks. + * + * the time intervall in ms needed for + * ESP8266 yields, network client loops + * and other timing related functions + */ +#define LONGYIELDINTERVAL 1000 +#define YIELDINTERVAL 32 + +void byield(); /* the yield function called in empty loops */ +void bdelay(uint32_t); /* a delay function using byield() */ +void fastticker(); /* a function for very frequent background tasks */ +void yieldfunction(); /* everything that needs to be done often - 32 ms */ +void longyieldfunction(); /* everything that needs to be done not so often - 1 second */ +void yieldschedule(); /* scheduler call for some platforms */ + +/* + * EEPROM handling, these function enable the @E array and + * loading and saving to EEPROM with the "!" mechanism + * + * The EEPROM code can address EEPROMS up to 64 kB. It returns + * signed byte values which corresponds to the definition of + * mem_t in BASIC. This is needed because running from EEPROM + * requires negative token values to be recongized. + * + */ +void ebegin(); +void eflush(); +uint16_t elength(); +void eupdate(uint16_t, int8_t); +int8_t eread(uint16_t); + +/* + * The wrappers of the arduino io functions. + * + * The normalize the differences of some of the Arduino cores + * and raspberyy PI wiring implementations. + * + * pulseout generates microsecond pulses. + * + * awrite requires ESP32 2.0.2 core, else disable awrite(). + */ +uint16_t aread(uint8_t); +uint8_t dread(uint8_t); +void awrite(uint8_t, uint16_t); +void dwrite(uint8_t, uint8_t); +void pinm(uint8_t, uint8_t); +uint32_t pulsein(uint8_t, uint8_t, uint32_t); +void pulseout(uint16_t, uint8_t, uint16_t, uint16_t, uint16_t, uint16_t); +void playtone(uint8_t, uint16_t, uint16_t, uint8_t); +void tonetoggle(); /* internal function of the tone emulation, called by byield */ + +void breakpinbegin(); +uint8_t getbreakpin(); + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear(), dspupdate() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + * + * For non RGB ready displays, rgbcolor translates to the native color + * when BASIC requests an rgb color, in this case the nearest 4 bit + * color of the display is also stored for use in the text DISPLAY + * driver code + */ + + /* generate a 4 bit vga color from a given rgb color */ +uint8_t rgbtovga(uint8_t, uint8_t, uint8_t); + +/* + * prototypes for screen handling + */ +void dspbegin(); +void dspprintchar(char, uint8_t, uint8_t); +void dspclear(); +void dspupdate(); +void dspsetcursor(uint8_t); +void dspsavepen(); +void dsprestorepen(); +void dspsetfgcolor(uint8_t); +void dspsetbgcolor(uint8_t); +void dspsetreverse(uint8_t); +uint8_t dspident(); +void rgbcolor(uint8_t, uint8_t, uint8_t); +void vgacolor(uint8_t); +void plot(int, int); +void line(int, int, int, int); +void rect(int, int, int, int); +void frect(int, int, int, int); +void circle(int, int, int); +void fcircle(int, int, int); + +/* + * this is a generic display code + * it combines the functions of LCD and TFT drivers + * if this code is active + * + * dspprintchar(char c, uint8_t col, uint8_t row) + * dspclear() + * dspbegin() + * dspupdate() + * dspsetcursor(uint8_t c) + * dspsetfgcolor(uint8_t c) + * void dspsetbgcolor(uint8_t c) + * void dspsetreverse(uint8_t c) + * uint8_t dspident() + * + * have to be defined before in a hardware dependent section. + * Only dspprintchar and dspclear are needed, all other can be stubs + * + * VGA systems don't use the display driver for text based output. + * + * The display driver exists as a buffered version that can scroll + * or an unbuffered version that cannot scroll. Interfaces to hardware + * scrolling are not yet implemented. + * + * A VT52 state engine is implemented and works for buffered and + * unbuffered displays. Only buffered displays have the full VT52 + * feature set including most of the GEMDOS extensions described here: + * https: + * + * dspupdatemode controls the page update behaviour + * 0: character mode, display each character separately + * 1: line mode, update the display after each line + * 2: page mode, update the display after an ETX + * ignored if the display has no update function + * + */ + +void dspsetcursorx(uint8_t); +void dspsetcursory(uint8_t); +uint8_t dspgetcursorx(); +uint8_t dspgetcursory(); +void dspbell(); /* to whom the bell tolls - implement this to you own liking */ + + +/* + * text color code for the scrolling display + * + * non scrolling displays simply use the pen color of the display + * stored in dspfgcolor to paint the information on the screen + * + * for scrolling displays we store the color information of every + * character in the display buffer to enable scrolling, to limit the + * storage requirements, this code translates the color to a 4 bit VGA + * color. This means that if BASIC uses 24 bit colors, the color may + * change at scroll + * + * for color displays the buffer is a 16 bit object + * lower 8 bits plus the sign are the character, + * higher 7 the color and font. + * for monochrome just the character is stored + */ + +#ifdef DISPLAYHASCOLOR +typedef short dspbuffer_t; +#else +typedef char dspbuffer_t; +#endif + +dspbuffer_t dspget(uint16_t); +dspbuffer_t dspgetrc(uint8_t, uint8_t); +dspbuffer_t dspgetc(uint8_t); + +void dspsetxy(dspbuffer_t, uint8_t, uint8_t); /* this functions prints a character and updates the display buffer */ +void dspset(uint16_t, dspbuffer_t); +void dspsetscrollmode(uint8_t, uint8_t); /* 0 normal scroll, 1 enable waitonscroll function */ + +void dspbufferclear(); /* clear the buffer */ +void dspscroll(uint8_t, uint8_t); /* do the scroll */ +void dspreversescroll(uint8_t); /* do the reverse scroll only one line implemented */ + +/* + * This is the minimalistic VT52 state engine. It is an interface to + * process single byte control sequences of the form char + */ + +char vt52read(); /* the reader from the buffer, for messages going back from the display */ +uint8_t vt52avail(); /* the avail from the buffer */ +void vt52push(char); /* putting something into the buffer */ +uint8_t vt52number(char); /* something little, generating numbers */ +void vt52graphcommand(uint8_t); /* execute one graphics command */ + +/* + * this is a special part of the vt52 code with this, the terminal + * can control the digital and analog pins. + * it is meant for situations where the terminal is controlled by a (powerful) + * device with no or very few I/O pins. It can use the pins of the Arduino through + * the terminal. This works as long as everything stays within the terminals timescale + * On a 9600 baud interface, the character processing time is 1ms, everything slower + * than approximately 10ms can be done through the serial line. + */ +void vt52wiringcommand(uint8_t); + +/* the vt52 state engine */ +void dspvt52(char*); + + +/* these functions are used to access the display */ +void dspouts(char*, uint16_t); +void dspwrite(char); +uint8_t dspstat(uint8_t); +char dspwaitonscroll(); +uint8_t dspactive(); +void dspsetupdatemode(uint8_t); +uint8_t dspgetupdatemode(); +void dspgraphupdate(); + +/* + * code for the VGA system of Fabgl + */ +void vgabegin(); /* this starts the vga controller and the terminal right now */ +int vgastat(uint8_t); /* currently unused */ +void vgascale(int*, int*); /* scale the screen size */ +void vgawrite(char); + +/* + * Keyboard code for either the Fablib Terminal class or + * PS2Keyboard - please note that you need the ESP patched + * version here as mentioned above + * + * sets HASKEYBOARD to inform basic about this capability + * + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ + +void kbdbegin(); +uint8_t kbdstat(uint8_t); +uint8_t kbdavailable(); +char kbdread(); +char kbdcheckch(); +uint16_t kbdins(char*, uint16_t); + +/* + * Arduino Real Time clock. The interface here offers the values as number_t + * combining all values. + * + * The code does not use an RTC library any more all the rtc support is + * builtin now. + * + * A clock must activate the macro #define HASCLOCK to make the clock + * available in BASIC. + * + * Four software models are supported + * - Built-in clocks of STM32, MKR, and ESP32 are supported by default + * - I2C clocks can be activated: DS1307, DS3231, and DS3232 + * - A Real Time Clock emulation is possible using millis() + * + * rtcget accesses the internal registers of the clock. + * Registers 0-6 are bcd transformed to return + * seconds, minutes, hours, day of week, day, month, year + * + * On I2C clocks registers 7-255 are returned as memory cells + */ + +/* No begin method needed */ +void rtcbegin(); +uint16_t rtcget(uint8_t); /* get the time from the registers */ +void rtcset(uint8_t, uint16_t); + +/* convert the time to a unix time number from https: +void rtctimetoutime(); +void rtcutimetotime(); + +/* + * definitions for ESP Wifi and MQTT, super experimental. + * As networking is only used for MQTT at the moment, + * mqtt, Wifi and Ethernet comes all in one. + * + * No encryption/authetication is implemented in MQTT. + * Only public, open servers can be used. + * + * MQTT topics can only be 32 bytes long. + * Buffered incoming and outgoing messages can be 128 bytes + * per default. + * + * wifisettings.h is the generic network definition file + * all network settings are compiled into the code + * BASIC cannot change them at runtime. + */ + +void mqttsetname(); +void netbegin(); +void netstop(); +void netreconnect(); +uint8_t netconnected(); + +/* + * mqtt event handling in BASIC can be triggered here + * the prototype uses exactly the Arduino types of the + * pubsub library. + * + */ +void mqttcallback(char*, byte*, unsigned int); + +/* + * mqtt prototypes + */ +void mqttbegin(); +uint8_t mqttstat(uint8_t); +uint8_t mqttreconnect(); +uint8_t mqttstate(); +void mqttsubscribe(const char*); +void mqttunsubscribe(); +void mqttsettopic(const char*); +void mqttouts(const char*, uint16_t); +void mqttwrite(const char); +char mqttread(); +uint16_t mqttins(char*, uint16_t); +uint16_t mqttavailable(); +char mqttcheckch(); + +/* + * The file system driver - all methods needed to support BASIC fs access + * Different filesystems need different prefixes and fs objects, these + * filesystems use the stream API + */ + +char* mkfilename(const char*); +const char* rmrootfsprefix(const char*); /* remove the prefix from the filename */ +void fsbegin(); +uint8_t fsstat(uint8_t); + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char); +char fileread(); +int fileavailable(); /* is int because some of the fs do this */ +uint8_t ifileopen(const char*); +void ifileclose(); +uint8_t ofileopen(const char*, const char*); +void ofileclose(); + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +void rootopen(); +uint8_t rootnextfile(); +uint8_t rootisfile(); +const char* rootfilename(); +uint32_t rootfilesize(); +void rootfileclose(); +void rootclose(); +void removefile(const char*); + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(uint8_t); + +/* + * The buffer I/O device. This is a stream to write to a given bufer + * from BASIC. + */ + +void bufferbegin(); +uint8_t bufferstat(uint8_t); +void bufferwrite(char); +char bufferread(); +char buffercheckch(); +uint16_t bufferavailable(); +uint16_t bufferins(char*, uint16_t); +void bufferouts(char*, uint16_t); + +/* + * Primary serial code uses the Serial object or Picoserial + * + * The picoseria an own interrupt function. This is used to fill + * the input buffer directly on read. Write is standard like in + * the serial code. + * + * As echoing is done in the interrupt routine, the code cannot be + * used to receive keystrokes from serial and then display the echo + * directly to a display. To do this the write command in picogetchar + * would have to be replaced with a outch() that then redirects to the + * display driver. This would be very tricky from the timing point of + * view if the display driver code is slow. + * + * The code for the UART control is mostly taken from PicoSerial + * https: + * and published under GPL3.0 just like this code + * + */ + +void picobegin(uint32_t); +void picowrite(char); /* the write code, sending bytes directly to the UART */ +uint16_t picoins(char *, uint16_t); /* the ins code of picoserial, called like this in consins */ + +/* + * picogetchar: this is the interrupt service routine. It + * recieves a character and feeds it into a buffer and echos it + * back. The logic here is that the ins() code sets the buffer + * to the input buffer. Only then the routine starts writing to the + * buffer. Once a newline is received, the length information is set + * and picoa is also set to 1 indicating an available string, this stops + * recevieing bytes until the input is processed by the calling code. + */ +void picogetchar(char); + +/* + * blocking serial single char read for Serial + * unblocking for Picoserial because it is not + * character oriented -> blocking is handled in + * consins instead. + */ +char serialread(); +void serialbegin(); +uint8_t serialstat(uint8_t); /* state information on the serial port */ +void serialwrite(char); /* write to a serial stream */ +char serialcheckch(); /* check on a character, needed for breaking */ +uint16_t serialavailable(); /* avail method, needed for AVAIL() */ +void serialflush(); /* flush serial */ +uint16_t serialins(char*, uint16_t); /* read a line from serial */ + +/* + * reading from the console with inch or the picoserial callback + * this mixes interpreter levels as inch/outch are used here + * this code needs to go to the main interpreter section after + * thorough rewrite + */ +uint16_t consins(char *, uint16_t); + +void prtbegin(); /* second serial port */ +char prtopen(char*, uint16_t); /* the open functions are not needed here */ +void prtclose(); +uint8_t prtstat(uint8_t); +void prtwrite(char); +char prtread(); +char prtcheckch(); +uint16_t prtavailable(); +void prtset(uint32_t); +uint16_t prtins(char*, uint16_t); + +/* + * The wire code, direct access to wire communication + * in master mode wire_slaveid is the I2C address bound + * to channel &7 and wire_myid is 0 + * in slave mode wire_myid is the devices slave address + * and wire_slaveid is 0 + * ARDUINOWIREBUFFER is the maximum length of meesages the + * underlying library can process. This is 32 for the Wire + * library + */ + +void wirebegin(); +void wireslavebegin(uint8_t); +uint8_t wirestat(uint8_t); /* wire status - just checks if wire is compiled */ +uint16_t wireavailable(); /* available characters - test code ecapsulation prep for slave*/ +void wireonreceive(int h); /* eventhandler for received data */ +void wireonrequest(); /* event handler for request, deliver the message and forget the buffer */ + +/* + * as a master open sets the slave id for the communication + * no extra begin while we stay master + */ +void wireopen(char, uint8_t); +char wireread(); /* */ +void wirewrite(char c); /* */ +uint16_t wireins(char*, uint8_t); /* input an entire string */ +void wireouts(char*, uint8_t); /* send an entire string - truncate radically */ +int16_t wirereadbyte(uint8_t); +void wirewritebyte(uint8_t, int16_t); +void wirewriteword(uint8_t, int16_t, int16_t); + +/* + * Read from the radio interface, radio is always block + * oriented. This function is called from ins for an entire + * line. + * + * In blockmode the entire message is returned in the + * receiving string while in line mode the length of the + * string is adapted. Blockmode can be used to transfer + * binary data. + */ + +uint8_t radiostat(uint8_t); +uint64_t pipeaddr(const char*); /* generate a uint64_t pipe address from the filename string for RF24 */ +uint16_t radioins(char*, uint8_t); /* read an entire string */ +void radioouts(char *, uint8_t); /* write to radio, no character mode here */ +uint16_t radioavailable(); /* radio available */ +char radioread(); + +/* + * we always read from pipe 1 and use pipe 0 for writing, + * the filename is the pipe address, by default the radio + * goes to reading mode after open and is only stopped for + * write + */ +void iradioopen(const char *); +void oradioopen(const char *); +void radioset(uint8_t); + +/* + * Arduino Sensor library code + * The sensorread() is a generic function called by + * SENSOR basic function and command. The first argument + * is the sensor and the second argument the value. + * sensorread(n, 0) checks if the sensorstatus. + */ +void sensorbegin(); +float sensorread(uint8_t, uint8_t); + +/* + * prototypes for the interrupt interface + */ +/* some have it and some dont */ +#if !(defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_MBED_NANO) || defined(ARDUINO_ARCH_RENESAS)) +typedef int PinStatus; +#endif + +uint8_t pintointerrupt(uint8_t); +void attachinterrupt(uint8_t, void (*f)(), uint8_t); +void detachinterrupt(uint8_t); + +/* + * Experimental code to drive SPI SRAM + * + * Currently only the 23LCV512 is implemented, assuming a + * 64kB SRAM + * The code below is taken in part from the SRAMsimple library + * + * two buffers are implemented: + * - a ro buffer used by memread, this buffer is mainly reading the token + * stream at runtime. + * - a rw buffer used by memread2 and memwrite2, this buffer is mainly accessing + * the heap at runtime. In interactive mode this is also the interface to read + * and write program code to memory + * + */ + +/* the RAM begin method sets the RAM to sequential mode */ +uint16_t spirambegin(); +int8_t spiramrawread(uint16_t); +void spiram_bufferread(uint16_t, int8_t*, uint16_t); +void spiram_bufferwrite(uint16_t, int8_t*, uint16_t); +int8_t spiram_robufferread(uint16_t); +void spiram_rwbufferflush(); /* flush the buffer */ +int8_t spiram_rwbufferread(uint16_t); +void spiram_rwbufferwrite(uint16_t, int8_t); /* the buffered file write */ +void spiramrawwrite(uint16_t, int8_t); /* the simple unbuffered byte write, with a cast to signed char */ + + +/* + * This code measures the fast ticker frequency in microseconds + * It leaves the data in variable F. Activate this only for test + * purposes. + */ +void fasttickerprofile(); + + +#endif diff --git a/data/Basic2/Posix/basic.c b/data/Basic2/Posix/basic.c new file mode 100644 index 0000000000000000000000000000000000000000..3fdd467d37637f53718bfc6cd9014a81632535e0 --- /dev/null +++ b/data/Basic2/Posix/basic.c @@ -0,0 +1,10926 @@ +/*---------------------------------------------------------------- + Please read this before compiling the code. + - Review hardware.h for settings specific hardware settings. + Super important on Arduino and Raspberry PI. + - language.h controls the language features. + A heuristic is used to compile the language features if + not defined explicitly in language.h. + ----------------------------------------------------------------- + + Stefan's IoT BASIC interpreter - BASIC for everywhere. + + See the licence file on + https://github.com/slviajero/tinybasic for copyright/left. + (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + + Author: Stefan Lenz, sl001@serverfabrik.de + + Currently there are two versions of the runtime environment. + One contains all platforms compiled in the Arduino IDE + (ESP8266, ESP32, AVR, MEGAAVR, SAM*, RP2040, STM*, + XMC*, NRENESA, Arduino GIGA). + + + Anothers contains all platforms compiled in gcc with a POSIX OS + (Mac, Raspberry, Windows/MINGW) plus rudimentary MSDOS with tc2.0. The + latter will be removed soon. + + The interface to BASIC is identical. +*/ + +/* the runtime environment */ +#include "hardware.h" +#include "runtime.h" + +/* + * the core basic language headers + */ +#include "language.h" +#include "basic.h" + +/* use long jump for error handling */ +#if USELONGJUMP == 1 +#include "setjmp.h" +#endif + +/* Global BASIC definitions */ + +/* + All BASIC keywords for the tokens, PROGMEM on Arduino + Normal memory elsewhere. +*/ +const char sge[] PROGMEM = "=>"; +const char sle[] PROGMEM = "<="; +const char sne[] PROGMEM = "<>"; +/* Palo Alto language set */ +const char sprint[] PROGMEM = "PRINT"; +const char slet[] PROGMEM = "LET"; +const char sinput[] PROGMEM = "INPUT"; +const char sgoto[] PROGMEM = "GOTO"; +const char sgosub[] PROGMEM = "GOSUB"; +const char sreturn[] PROGMEM = "RETURN"; +const char sif[] PROGMEM = "IF"; +const char sfor[] PROGMEM = "FOR"; +const char sto[] PROGMEM = "TO"; +const char sstep[] PROGMEM = "STEP"; +const char snext[] PROGMEM = "NEXT"; +const char sstop[] PROGMEM = "STOP"; +const char slist[] PROGMEM = "LIST"; +const char snew[] PROGMEM = "NEW"; +const char srun[] PROGMEM = "RUN"; +const char sabs[] PROGMEM = "ABS"; +const char srnd[] PROGMEM = "RND"; +const char ssize[] PROGMEM = "SIZE"; +const char srem[] PROGMEM = "REM"; +/* Apple 1 language set */ +#ifdef HASAPPLE1 +const char snot[] PROGMEM = "NOT"; +const char sand[] PROGMEM = "AND"; +const char sor[] PROGMEM = "OR"; +const char slen[] PROGMEM = "LEN"; +const char ssgn[] PROGMEM = "SGN"; +const char speek[] PROGMEM = "PEEK"; +const char sdim[] PROGMEM = "DIM"; +const char sclr[] PROGMEM = "CLR"; +const char shimem[] PROGMEM = "HIMEM"; +const char stab[] PROGMEM = "TAB"; +const char sthen[] PROGMEM = "THEN"; +const char sbend[] PROGMEM = "END"; +const char spoke[] PROGMEM = "POKE"; +#endif +/* Stefan's basic additions */ +#ifdef HASSTEFANSEXT +const char scont[] PROGMEM = "CONT"; +const char ssqr[] PROGMEM = "SQR"; +const char spow[] PROGMEM = "POW"; +const char smap[] PROGMEM = "MAP"; +const char sdump[] PROGMEM = "DUMP"; +const char sbreak[] PROGMEM = "BREAK"; +#endif +/* LOAD and SAVE is always there */ +const char ssave[] PROGMEM = "SAVE"; +const char sload[] PROGMEM = "LOAD"; +#ifdef HASSTEFANSEXT +const char sget[] PROGMEM = "GET"; +const char sput[] PROGMEM = "PUT"; +const char sset[] PROGMEM = "SET"; +const char scls[] PROGMEM = "CLS"; +const char slocate[] PROGMEM = "LOCATE"; +const char selse[] PROGMEM = "ELSE"; +#endif +/* Arduino functions */ +#ifdef HASARDUINOIO +const char spinm[] PROGMEM = "PINM"; +const char sdwrite[] PROGMEM = "DWRITE"; +const char sdread[] PROGMEM = "DREAD"; +const char sawrite[] PROGMEM = "AWRITE"; +const char saread[] PROGMEM = "AREAD"; +const char sdelay[] PROGMEM = "DELAY"; +const char smillis[] PROGMEM = "MILLIS"; +const char sazero[] PROGMEM = "AZERO"; +const char sled[] PROGMEM = "LED"; +#endif +#ifdef HASTONE +const char stone[] PROGMEM = "PLAY"; +#endif +#ifdef HASPULSE +const char spulse[] PROGMEM = "PULSE"; +#endif +/* DOS functions */ +#ifdef HASFILEIO +const char scatalog[] PROGMEM = "CATALOG"; +const char sdelete[] PROGMEM = "DELETE"; +const char sfopen[] PROGMEM = "OPEN"; +const char sfclose[] PROGMEM = "CLOSE"; +const char sfdisk[] PROGMEM = "FDISK"; +#endif +/* low level access functions */ +#ifdef HASUSRCALL +const char susr[] PROGMEM = "USR"; +const char scall[] PROGMEM = "CALL"; +#endif +/* mathematics */ +#ifdef HASFLOAT +const char ssin[] PROGMEM = "SIN"; +const char scos[] PROGMEM = "COS"; +const char stan[] PROGMEM = "TAN"; +const char satan[] PROGMEM = "ATAN"; +const char slog[] PROGMEM = "LOG"; +const char sexp[] PROGMEM = "EXP"; +#endif +/* INT is always needed to make float/int programs compatible */ +const char sint[] PROGMEM = "INT"; +/* elemetars graphics */ +#ifdef HASGRAPH +const char scolor[] PROGMEM = "COLOR"; +const char splot[] PROGMEM = "PLOT"; +const char sline[] PROGMEM = "LINE"; +const char scircle[] PROGMEM = "CIRCLE"; +const char srect[] PROGMEM = "RECT"; +const char sfcircle[] PROGMEM = "FCIRCLE"; +const char sfrect[] PROGMEM = "FRECT"; +#endif +/* Dartmouth BASIC extensions */ +#ifdef HASDARTMOUTH +const char sdata[] PROGMEM = "DATA"; +const char sread[] PROGMEM = "READ"; +const char srestore[] PROGMEM = "RESTORE"; +const char sdef[] PROGMEM = "DEF"; +const char sfn[] PROGMEM = "FN"; +const char son[] PROGMEM = "ON"; +#endif +/* The Darkarts commands */ +#ifdef HASDARKARTS +const char smalloc[] PROGMEM = "MALLOC"; +const char sfind[] PROGMEM = "FIND"; +const char seval[] PROGMEM = "EVAL"; +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING +const char serror[] PROGMEM = "ERROR"; +#endif +/* iot extensions */ +#ifdef HASIOT +const char savail[] PROGMEM = "AVAIL"; +const char sstr[] PROGMEM = "STR"; +const char sinstr[] PROGMEM = "INSTR"; +const char sval[] PROGMEM = "VAL"; +const char snetstat[] PROGMEM = "NETSTAT"; +const char ssensor[] PROGMEM = "SENSOR"; +const char swire[] PROGMEM = "WIRE"; +const char ssleep[] PROGMEM = "SLEEP"; +#endif +/* events and interrupts */ +#ifdef HASTIMER +const char safter[] PROGMEM = "AFTER"; +const char severy[] PROGMEM = "EVERY"; +#endif +#ifdef HASEVENTS +const char sevent[] PROGMEM = "EVENT"; +#endif +#ifdef HASSTRUCT +const char swhile[] PROGMEM = "WHILE"; +const char swend[] PROGMEM = "WEND"; +const char srepeat[] PROGMEM = "REPEAT"; +const char suntil[] PROGMEM = "UNTIL"; +const char sswitch[] PROGMEM = "SWITCH"; +const char scase[] PROGMEM = "CASE"; +const char sswend[] PROGMEM = "SWEND"; +const char sdo[] PROGMEM = "DO"; +const char sdend[] PROGMEM = "DEND"; +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS +const char sfend[] PROGMEM = "FEND"; +#endif +#endif +#ifdef HASMSSTRINGS +const char sasc[] PROGMEM = "ASC"; +const char schr[] PROGMEM = "CHR"; +const char sright[] PROGMEM = "RIGHT"; +const char sleft[] PROGMEM = "LEFT"; +const char smid[] PROGMEM = "MID"; +const char sspc[] PROGMEM = "SPC"; +#endif +#ifdef HASEDITOR +const char sedit[] PROGMEM = "EDIT"; +#endif +#ifdef HASHELP +const char shelp[] PROGMEM = "HELP"; +#endif +/* was BITWISE, now always there because really important */ +const char sshl[] PROGMEM = "<<"; +const char sshr[] PROGMEM = ">>"; +const char sbit[] PROGMEM = "BIT"; + + +/* zero terminated keyword storage */ +const char* const keyword[] PROGMEM = { + sge, sle, sne, sprint, slet, sinput, + sgoto, sgosub, sreturn, sif, sfor, sto, + sstep, snext, sstop, slist, snew, srun, + sabs, srnd, ssize, srem, +#ifdef HASAPPLE1 + snot, sand, sor, slen, ssgn, speek, sdim, + sclr, shimem, stab, sthen, + sbend, spoke, +#endif +#ifdef HASSTEFANSEXT + scont, ssqr, spow, smap, sdump, sbreak, +#endif + ssave, sload, +#ifdef HASSTEFANSEXT + sget, sput, sset, scls, slocate, selse, +#endif +#ifdef HASARDUINOIO + spinm, sdwrite, sdread, sawrite, saread, + sdelay, smillis, sazero, sled, +#endif +#ifdef HASTONE + stone, +#endif +#ifdef HASPULSE + spulse, +#endif +#ifdef HASFILEIO + scatalog, sdelete, sfopen, sfclose, sfdisk, +#endif +#ifdef HASUSRCALL + susr, scall, +#endif +#ifdef HASFLOAT + ssin, scos, stan, satan, slog, sexp, +#endif + sint, +#ifdef HASGRAPH + scolor, splot, sline, scircle, srect, + sfcircle, sfrect, +#endif +#ifdef HASDARTMOUTH + sdata, sread, srestore, sdef, sfn, son, +#endif +#ifdef HASDARKARTS + smalloc, sfind, seval, +#endif + /* complex error handling */ +#ifdef HASERRORHANDLING + serror, +#endif +#ifdef HASIOT + savail, sstr, sinstr, sval, + snetstat, ssensor, swire, ssleep, +#endif +#ifdef HASTIMER + safter, severy, +#endif +#ifdef HASEVENTS + sevent, +#endif +#ifdef HASSTRUCT + swhile, swend, srepeat, suntil, sswitch, scase, sswend, + sdo, sdend, +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS + sfend, +#endif +#endif +#ifdef HASMSSTRINGS + sasc, schr, sright, sleft, smid, sspc, +#endif +#ifdef HASEDITOR + sedit, +#endif +#ifdef HASHELP + shelp, +#endif + sshl, sshr, sbit, + 0 +}; + +/* the zero terminated token dictonary needed for scalability */ +const token_t tokens[] PROGMEM = { + GREATEREQUAL, LESSEREQUAL, NOTEQUAL, TPRINT, TLET, + TINPUT, TGOTO, TGOSUB, TRETURN, TIF, TFOR, TTO, TSTEP, + TNEXT, TSTOP, TLIST, TNEW, TRUN, TABS, TRND, TSIZE, TREM, +#ifdef HASAPPLE1 + TNOT, TAND, TOR, TLEN, TSGN, TPEEK, TDIM, TCLR, + THIMEM, TTAB, TTHEN, TEND, TPOKE, +#endif +#ifdef HASSTEFANSEXT + TCONT, TSQR, TPOW, TMAP, TDUMP, TBREAK, +#endif + TSAVE, TLOAD, +#ifdef HASSTEFANSEXT + TGET, TPUT, TSET, TCLS, TLOCATE, TELSE, +#endif +#ifdef HASARDUINOIO + TPINM, TDWRITE, TDREAD, TAWRITE, TAREAD, TDELAY, TMILLIS, + TAZERO, TLED, +#endif +#ifdef HASTONE + TTONE, +#endif +#ifdef HASPULSE + TPULSE, +#endif +#ifdef HASFILEIO + TCATALOG, TDELETE, TOPEN, TCLOSE, TFDISK, +#endif +#ifdef HASSTEFANSEXT + TUSR, TCALL, +#endif +#ifdef HASFLOAT + TSIN, TCOS, TTAN, TATAN, TLOG, TEXP, +#endif + TINT, +#ifdef HASGRAPH + TCOLOR, TPLOT, TLINE, TCIRCLE, TRECT, + TFCIRCLE, TFRECT, +#endif +#ifdef HASDARTMOUTH + TDATA, TREAD, TRESTORE, TDEF, TFN, TON, +#endif +#ifdef HASDARKARTS + TMALLOC, TFIND, TEVAL, +#endif +#ifdef HASERRORHANDLING + TERROR, +#endif +#ifdef HASIOT + TAVAIL, TSTR, TINSTR, TVAL, TNETSTAT, + TSENSOR, TWIRE, TSLEEP, +#endif +#ifdef HASTIMER + TAFTER, TEVERY, +#endif +#ifdef HASEVENTS + TEVENT, +#endif +#ifdef HASSTRUCT + TWHILE, TWEND, TREPEAT, TUNTIL, TSWITCH, TCASE, TSWEND, + TDO, TDEND, +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS + TFEND, +#endif +#endif +#ifdef HASMSSTRINGS + TASC, TCHR, TRIGHT, TLEFT, TMID, TSPC, +#endif +#ifdef HASEDITOR + TEDIT, +#endif +#ifdef HASHELP + THELP, +#endif + TSHL, TSHR, TBIT, + 0 +}; + +/* experimental, do not use right now */ +const bworkfunction_t workfunctions[] PROGMEM = { + 0, 0, 0, xprint, 0 +}; + +/* errors and messages */ +const char mfile[] PROGMEM = "file.bas"; +const char mprompt[] PROGMEM = "> "; +const char mgreet[] PROGMEM = "Stefan's Basic 2.0"; +const char mline[] PROGMEM = "LINE"; +const char mnumber[] PROGMEM = "NUMBER"; +const char mvariable[] PROGMEM = "VARIABLE"; +const char marray[] PROGMEM = "ARRAY"; +const char mstring[] PROGMEM = "STRING"; +const char mstringv[] PROGMEM = "STRINGVAR"; +const char egeneral[] PROGMEM = "Error"; +#ifdef HASERRORMSG +const char eunknown[] PROGMEM = "Syntax"; +const char enumber[] PROGMEM = "Number"; +const char edivide[] PROGMEM = "Div by 0"; +const char eline[] PROGMEM = "Unknown Line"; +const char emem[] PROGMEM = "Memory"; +const char estack[] PROGMEM = "Stack"; +const char erange[] PROGMEM = "Range"; +const char estring[] PROGMEM = "String"; +const char evariable[] PROGMEM = "Variable"; +const char eloop[] PROGMEM = "Loop"; +const char efile[] PROGMEM = "File"; +const char efun[] PROGMEM = "Function"; +const char eargs[] PROGMEM = "Args"; +const char eeeprom[] PROGMEM = "EEPROM"; +const char esdcard[] PROGMEM = "SD card"; +#endif +#ifdef HASHELP +#ifdef BASICFULL +const char mbasiclangset[] PROGMEM = "full"; +#elif defined(BASICSIMPLE) +const char mbasiclangset[] PROGMEM = "simple with integer"; +#elif defined(BASICINTEGER) +const char mbasiclangset[] PROGMEM = "integer"; +#elif defined(BASICMINIMAL) +const char mbasiclangset[] PROGMEM = "minimal"; +#elif defined(BASICSIMPLEWITHFLOAT) +const char mbasiclangset[] PROGMEM = "simple with float"; +#elif defined(BASICTINYWITHFLOAT) +const char mbasiclangset[] PROGMEM = "tiny with float"; +#else +const char mbasiclangset[] PROGMEM = "custom"; +#endif +const char mlangset[] PROGMEM = "Language set: "; +const char mkeywords[] PROGMEM = "Keywords: "; +#endif + +const char* const message[] PROGMEM = { + mfile, mprompt, mgreet, + mline, mnumber, mvariable, marray, + mstring, mstringv, + egeneral +#ifdef HASERRORMSG + , eunknown, enumber, edivide, eline, + emem, estack, erange, + estring, evariable, eloop, efile, efun, eargs, + eeeprom, esdcard +#endif +#ifdef HASHELP + , mbasiclangset, mlangset, mkeywords +#endif +}; + +/* + maxnum: the maximum accurate(!) integer of a + 32 bit float + strindexsize: in the new code this is simply the size of the + stringlength type. Currently only 1 byte and 2 bytes are tested. +*/ +#ifdef HASFLOAT +#ifdef HAS64BIT +const number_t maxnum = 9007199254740992; +#else +const number_t maxnum = 16777216; +#endif +#else +const number_t maxnum = (number_t)~((number_t)1 << (sizeof(number_t) * 8 - 1)); +#endif +const int numsize = sizeof(number_t); +const int addrsize = sizeof(address_t); +const int eheadersize = sizeof(address_t) + 1; +const int strindexsize = sizeof(stringlength_t); /* default in the meantime, strings up to unsigned 16 bit length */ +const address_t maxaddr = (address_t)(~0); + +/* + The basic interpreter is implemented as a stack machine + with global variable for the interpreter state, the memory + and the arithmetic during run time. +*/ + +/* the stack, all BASIC arithmetic is done here */ +accu_t stack[STACKSIZE]; +address_t sp = 0; + +/* a small buffer to process string arguments, mostly used for Arduino PROGMEM and string functions */ +/* use with care as it is used in some string functions */ +char sbuffer[SBUFSIZE]; + +/* the input buffer, the lexer can tokenize this and run from it, bi is an index to this. + bi must be global as it is the program cursor in interactive mode */ +char ibuffer[BUFSIZE] = "\0"; +char *bi; + +/* a static array of variables A-Z for the small systems that have no heap */ +#ifndef HASAPPLE1 +number_t vars[VARSIZE]; +#endif + +/* the BASIC working memory, either malloced or allocated as a global array */ +#if (defined(MEMSIZE) && MEMSIZE != 0) +mem_t mem[MEMSIZE]; +#else +mem_t* mem; +#endif +address_t himem, memsize; + +/* reimplementation of the loops, will replace the forstack */ +bloop_t loopstack[FORDEPTH]; +index_t loopsp = 0; + +/* the GOSUB stack remembers an address to jump to */ +address_t gosubstack[GOSUBDEPTH]; +index_t gosubsp = 0; + +/* arithmetic accumulators */ +number_t x, y; + +/* the name of on object, replaced xc and xy in BASIC 1 */ +name_t name; + +/* an address accumulator, used a lot in string operations */ +address_t ax; + +/* a string index registers, new style identifying a string either in C memory or BASIC memory */ +string_t sr; + +/* the active token */ +token_t token; + +/* the curent error, can be a token, hence token type */ +token_t er; +/* the jmp buffer for the error handling */ +#if USELONGJUMP == 1 +jmp_buf sthook; +#endif + +/* a trapable error */ +mem_t ert; + +/* the interpreter state, interactive, run or run from EEPROM */ +mem_t st; + +/* the current program location */ +address_t here; + +/* the topmost byte of a program in memory, beginning of free BASIC RAM */ +address_t top; + +/* used to format output with # */ +mem_t form = 0; + +/* do we use the Microsoft convention of an array starting at 0 or 1 like Apple 1 + two seperate variables because arraylimit can be changed at runtime for existing arrays + msarraylimit says if an array should be created with n or n+1 elements */ +#ifdef MSARRAYLIMITS +mem_t msarraylimits = 1; +address_t arraylimit = 0; +#else +mem_t msarraylimits = 0; +address_t arraylimit = 1; +#endif + +/* behaviour around boolean, needed to change the interpreters personality at runtime */ +/* -1 is microsoft true while 1 is Apple 1 and C style true. */ +mem_t booleanmode = BOOLEANMODE; + +/* setting the interpreter to integer at runtime */ +mem_t forceint = 0; + +/* the default size of a string now as a variable */ +stringlength_t defaultstrdim = STRSIZEDEF; + +/* the base of the random number generator + 0 is Apple 1 style RND from 0 to n-epsilon + 1 is Palo Alto style from 1 to n +*/ +mem_t randombase = 0; + +/* is substring logic used or not */ +#ifdef SUPPRESSSUBSTRINGS +mem_t substringmode = 0; +#else +mem_t substringmode = 1; +#endif + +/* the flag for true MS tabs */ +mem_t reltab = 0; +mem_t dummy; + +/* the flag for lower case names */ +mem_t lowercasenames = 0; + +/* the number of arguments parsed from a command */ +mem_t args; + +/* the random number seed, this is unsigned */ +#ifndef HASFLOAT +address_t rd; +#else +unsigned long rd; +#endif + +/* the RUN debuglevel */ +mem_t debuglevel = 0; + +/* DATA pointer, where is the current READ statement */ +#ifdef HASDARTMOUTH +address_t data = 0; +address_t datarc = 1; +#endif + +/* + process command line arguments in the POSIX world + bnointafterrun is a flag to remember if called as command + line argument, in this case we don't return to interactive +*/ +#ifdef HASARGS +int bargc; +char** bargv; +mem_t bnointafterrun = 0; +#endif + +/* formaters lastouttoken and spaceafterkeyword to make a nice LIST */ +mem_t lastouttoken; +mem_t spaceafterkeyword; +mem_t outliteral = 0; +mem_t lexliteral = 0; + +/* + The cache for the heap search - helps the string code. + The last found object on the heap is remembered. This is needed + because the string code sometime searches the heap twice during the + same operation. Also, bfind is used to remember the length of the + last found object. +*/ +#ifdef HASAPPLE1 +heap_t bfind_object; +#endif + +/* + a variable for string to numerical conversion, + telling you were the number ended. +*/ +address_t vlength; + +/* the timer code - very simple needs to be converted to to a struct */ +/* timer type */ +#ifdef HASTIMER +btimer_t after_timer = {0, 0, 0, 0, 0}; +btimer_t every_timer = {0, 0, 0, 0, 0}; +#endif + +/* the event code */ +#ifdef HASEVENTS + +/* should go to the headers eventually */ +#define EVENTLISTSIZE 4 + +/* the event list, nevents is the number of active events */ +mem_t nevents = 0; +int ievent = 0; +mem_t events_enabled = 1; +volatile bevent_t eventlist[EVENTLISTSIZE]; + +/* the extension of the GOSUB stack */ +mem_t gosubarg[GOSUBDEPTH]; +#endif + +#ifdef HASERRORHANDLING +/* the error handler type, very simple for now */ +typedef struct { + mem_t type; + address_t linenumber; +} berrorh_t; + +berrorh_t berrorh = {0 , 0}; +mem_t erh = 0; +#endif + +/* the string for real time clocks */ +char rtcstring[20] = { 0 }; + +/* the units pulse operates on, in microseconds*/ +address_t bpulseunit = 10; + +/* only needed if the break condition is handled in the background */ +char breakcondition = 0; + +/* the FN context, how deep are we in a nested function call, negative values reserved */ +int fncontext = 0; + +/* the accuracy of a equal or not equal statement on numbers */ +#ifdef HASFLOAT +number_t epsilon = 0; +#else +const number_t epsilon = 0; +#endif + +/* the number of digits displayed in the fraction of a float */ +#ifdef HASFLOAT +mem_t precision = 5; +#endif + +/* + * BASIC timer stuff, this is a core interpreter function now + */ + +/* the millis function for BASIC */ +void bmillis() { + number_t m; + /* millis is processed as integer and is cyclic mod maxnumber and not cast to float!! */ + m = (number_t) (millis() / (unsigned long)pop() % (unsigned long)maxnum); + push(m); +} + +/* + * Determine the possible basic memory size. + * using malloc causes some overhead which can be relevant on the smaller + * boards. + * + * Set MEMSIZE instead to a static value. In this case ballocmem + * just returns the static MEMSIZE. + * + * If SPIRAMINTERFACE is defined, we use the memory from a serial RAM and dont + * allocate it here at all. + */ + +#if (!defined(MEMSIZE) || MEMSIZE == 0) && !(defined(SPIRAMINTERFACE)) +address_t ballocmem() { + + /* on most platforms we know the free memory for BASIC, this comes from runtime */ + long m = freememorysize(); + + /* we subtract some language feature depended things, this is only needed on + small Arduino boards with memories below 16kb */ + if (m < 16000) { +#ifdef HASAPPLE1 + m -= 64; /* strings cost memory */ +#endif +#ifdef USELONGJUMP + m -= 160; /* odd but true on Ardunio UNO and the like */ +#endif +#ifdef HASFLOAT + m -= 96; +#endif +#ifdef HASGRAPH + m -= 256; +#endif + } + + /* and keep fingers crossed here */ + if (m < 0) m = 128; + + /* we allocate as much as address_t can handle */ + if (m > maxaddr) m = maxaddr; + + /* try to allocate the memory */ + mem = (mem_t*)malloc(m); + if (mem != 0) return m - 1; + + /* fallback if allocation failed, 128 bytes */ + mem = (mem_t*)malloc(128); + if (mem != 0) return 128; else return 0; + +} +#else +address_t ballocmem() { + return MEMSIZE - 1; +}; +#endif + +/* + Layer 0 function - variable handling. + + These function access variables and data +*/ + +/* + Eeprom load / save / autorun functions + needed for SAVE and LOAD to an EEPROM + autorun is generic. + + The eeprom is accessed through the runtime functions + elength(), eupdate(), ewrite() and eflush(); + +*/ + +/* save a file to EEPROM, disabled if we use the EEPROM directly */ +void esave() { +#ifndef EEPROMMEMINTERFACE + address_t a = 0; + + /* does the program fit into the eeprom */ + if (top + eheadersize < elength()) { + + /* EEPROM per default is 255, 0 indicates that there is a program */ + eupdate(a++, 0); + + /* store the size of the program in byte 1,2,... of the EEPROM*/ + setaddress(a, beupdate, top); + a += addrsize; + + /* store the program */ + while (a < top + eheadersize) { + eupdate(a, memread2(a - eheadersize)); + a++; + } + eupdate(a++, 0); + + /* needed on I2C EEPROM and other platforms where we buffer */ + eflush(); + + } else { + error(EOUTOFMEMORY); + er = 0; + } +#endif +} + +/* load a file from EEPROM, disabled if the use the EEPROM directly */ +void eload() { +#ifndef EEPROMMEMINTERFACE + address_t a = 0; + + /* have we stored a program? */ + if (elength() > 0 && (eread(a) == 0 || eread(a) == 1)) { + + /* how long is it? */ + a++; + top = getaddress(a, beread); + a += addrsize; + + /* load it to memory, memwrite2 is direct mem access */ + while (a < top + eheadersize) { + memwrite2(a - eheadersize, beread(a)); + a++; + } + } else { + /* no valid program data is stored */ + error(EEEPROM); + } +#endif +} + +/* autorun something from EEPROM or a filesystem */ +char autorun() { + + /* autorun from EEPROM if there is an EEPROM flagged for autorun */ + if (elength() > 0 && eread(0) == 1) { /* autorun from the EEPROM */ + top = getaddress(1, beread); + st = SERUN; + return 1; /* EEPROM autorun overrules filesystem autorun */ + } + + /* autorun from a given command line argument, if we have one */ +#ifdef HASARGS + if (bargc > 1 && ifileopen(bargv[1])) { + xload(bargv[1]); + st = SRUN; + ifileclose(); + bnointafterrun = TERMINATEAFTERRUN; + return 1; + } +#endif + + /* on a platform with a file system, autoexec from a file */ +#if defined(FILESYSTEMDRIVER) + if (ifileopen("autoexec.bas")) { + xload("autoexec.bas"); + st = SRUN; + ifileclose(); + return 1; + } +#endif + + /* nothing to autorun */ + return 0; +} + +#ifdef HASAPPLE1 +/* + The new malloc code. Heap structure is now + payload + (payload size) + name + type + + In the new heap implementation himem points to the first free byte on the heap. + The payload is stored first and then the header. + + The new heap code uses name_t for the name of the object. + +*/ + +address_t bmalloc(name_t* name, address_t l) { + address_t payloadsize; /* the payload size */ + address_t heapheadersize = sizeof(name_t) + addrsize; /* this is only used to estimate the free space, it is the maximum */ + address_t b = himem; /* the current position on the heap, we store it in case of errors */ + + /* Initial DEBUG message. */ + if (DEBUG) { + outsc("** bmalloc with token "); + outnumber(name->token); outspc(); + outname(name); outspc(); + outnumber(l); outcr(); + } + + /* + How much space does the payload of the object need? + */ + switch (name->token) { + case VARIABLE: /* a variable needs numsize bytes*/ + payloadsize = numsize; + + break; +#ifndef HASMULTIDIM + case ARRAYVAR: /* a one dimensional array needs numsize*l bytes */ + payloadsize = numsize * l; + break; +#else + case ARRAYVAR: /* a two dimensional array needs numsize*l bytes plus one word for the additional dimension*/ + payloadsize = numsize * l + addrsize; + break; +#endif +#ifdef HASDARTMOUTH + case TFN: /* the jump address, the type of function/type of return value, the number of vars + and all variables are stored*/ + payloadsize = addrsize + 2 + sizeof(name_t) * l; + break; +#endif + /* these are plain buffers allocated by the MALLOC call in BASIC */ + default: + payloadsize = l; + } + + /* enough memory ?, on an EEPROM system we limit the heap to the RAM */ +#ifndef EEPROMMEMINTERFACE + if ((himem - top) < payloadsize + heapheadersize) { + error(EOUTOFMEMORY); + return 0; + } +#else + if (himem - (elength() - eheadersize) < payloadsize + heapheadersize) { + error(EOUTOFMEMORY); + return 0; + } +#endif + + /* first we reserve space for the payload, address points to the first byte of the payload */ + /* b points to the first free byte after the payload*/ + b -= payloadsize; + bfind_object.address = b + 1; + + /* for ARRAYS, STRINGS and BUFFERS, store the object length now - these are variable size objects*/ + if (name->token != VARIABLE) { + b -= (addrsize - 1); + setaddress(b, memwrite2, payloadsize); + if (DEBUG) { + outsc("** bmalloc writes payloadsize "); outnumber(payloadsize); + outsc(" at "); outnumber(b); outcr(); + } + b--; + } + + /* store the name of the objects including the type as identifier */ + b = setname_heap(b, name); + + /* store the type of the object */ + memwrite2(b--, name->token); + + /* if anything went wrong we exit here without changing himem */ + if (b < top || er) { + error(EOUTOFMEMORY); + return 0; + } + + /* we fill the cache here as well, both right now for compatibility */ + bfind_object.name = *name; + bfind_object.size = payloadsize; + + /* himem is the next free byte now again */ + himem = b; + + if (DEBUG) { + outsc("** bmalloc returns "); outnumber(bfind_object.address); + outsc(" himem is "); outnumber(himem); outcr(); + } + + /* return the address of the payload */ + return bfind_object.address; +} + +address_t bfind(name_t* name) { + address_t b, b0; + address_t i = 0; + + /* Initial DEBUG message. */ + if (DEBUG) { + outsc("*** bfind called for "); outname(name); + outsc(" on heap with token "); outnumber(name->token); + outsc(" himem is "); outnumber(himem); outcr(); + } + + /* do we have anything on the heap? */ + if (himem == memsize) return 0; else b = himem + 1; + + /* we have the object already in cache and return */ + if (name->token == bfind_object.name.token && cmpname(name, &bfind_object.name)) { + if (DEBUG) { + outsc("*** bfind found in cache "); + outname(name); + outsc(" at "); + outnumber(bfind_object.address); + outcr(); + } + return bfind_object.address; + } + + /* walk through the heap from the last object added to the first */ + while (b <= memsize) { + + /* get the name and the type and advance */ + bfind_object.name.token = memread2(b++); + b = getname(b, &bfind_object.name, memread2); + + /* determine the size of the object and advance */ + if (bfind_object.name.token != VARIABLE) { + bfind_object.size = getaddress(b, memread2); + b += addrsize; + } else { + bfind_object.size = numsize; + } + + /* this is the location of the payload */ + bfind_object.address = b; + + /* have we found the object */ + if (name->token == bfind_object.name.token && cmpname(name, &bfind_object.name)) { + if (DEBUG) { + outsc("*** bfind found "); + outname(name); + outsc(" at "); + outnumber(bfind_object.address); + outcr(); + } + return bfind_object.address; + } + + /* advance on the heap */ + b0 = b; + b += bfind_object.size; + + /* safety net for wraparound situations - should never happen - means corrupt heap */ + if (b0 > b) { + error(EVARIABLE); + return 0; + } + + } + + /* nothing found return 0 and clear the cache */ + + if (DEBUG) { + outsc("bfind returns 0"); + outcr(); + } + zeroheap(&bfind_object); + return 0; +} + +/* reimplementation bfree with name interface */ +address_t bfree(name_t* name) { + address_t b; + address_t i; + + if (DEBUG) { + outsc("*** bfree called for "); + outname(name); + outsc(" on heap with token "); + outnumber(name->token); + outcr(); + } + + /* use bfind to find the place */ + b = bfind(name); + + /* nothing found, return 0 */ + if (b == 0) return 0; + + if (DEBUG) { + outsc("** bfree found "); + outnumber(b); + outcr(); + } + + /* clear the entire memory area */ + for (i = himem; i <= b + bfind_object.size - 1; i++) memwrite2(i, 0); + + /* set the number of variables to the new value */ + himem = b + bfind_object.size - 1; + + if (DEBUG) { + outsc("** bfree returns "); + outnumber(himem); + outcr(); + } + + /* forget the chache, because heap structure has changed !! */ + zeroheap(&bfind_object); + return himem; +} + +/* the length of an object, we directly return from the cache */ +address_t blength(name_t* name) { + if (bfind(name)) return bfind_object.size; else return 0; +} +#endif /* HASAPPLE1 */ + +/* reimplementation of getvar and setvar with name_t */ +number_t getvar(name_t *name) { + address_t a; + + if (DEBUG) { + outsc("* getvar "); + outname(name); + outspc(); + outcr(); + } + + /* the special variables */ + if (name->c[0] == '@') { +#ifdef HASLONGNAMES + if (name->l == 1) name->c[1] = 0; /* to make sure @ alone works */ +#endif + switch (name->c[1]) { + case 'A': + return availch(); + case 'S': + return ert | ioer; + case 'I': + return id; + case 'O': + return od; + case 'T': + return millis(); + case 'C': + if (availch()) return inch(); else return 0; + case 'E': + return elength() / numsize; + case 0: + return (himem - top) / numsize; + case 'R': + return rd; +#ifdef HASSTEFANSEXT + case 'U': + return getusrvar(); +#endif +#ifdef HASFLOAT + case 'P': + return epsilon; +#endif +#ifdef HASIOT + case 'V': + return vlength; +#endif +#if defined(DISPLAYDRIVER) || defined (GRAPHDISPLAYDRIVER) + case 'X': + return dspgetcursorx(); + case 'Y': + return dspgetcursory(); +#endif + } + } + +#ifdef HASAPPLE1 + /* search the heap first */ + a = bfind(name); + if (!USELONGJUMP && er) return 0; + + /* if we don't find on the heap and it is not a static variable, we autocreate */ + if (a == 0) { + a = bmalloc(name, 0); + if (!USELONGJUMP && er) return 0; + } + + /* something went wrong */ + if (a == 0) { + error(EVARIABLE); + return 0; + } + /* retrieve the value */ + return getnumber(a, memread2); + +#else + /* we only have the static variable array */ + if (name->c[0] >= 65 && name->c[0] <= 91 && name->c[1] == 0) return vars[name->c[0] - 65]; + + /* systems without Apple1 extension i.e. HEAP throw an error */ + error(EVARIABLE); + return 0; +#endif +} + +/* set and create a variable */ +void setvar(name_t *name, number_t v) { + address_t a; + + if (DEBUG) { + outsc("* setvar "); + outname(name); + outspc(); + outnumber(v); + outcr(); + } + + /* the special variables */ + if (name->c[0] == '@') + switch (name->c[1]) { + case 'S': + ert = v; + ioer = v; + return; + case 'I': + id = v; + return; + case 'O': + od = v; + return; + case 'T': + return; + case 'C': + outch(v); + return; + case 'R': + rd = v; + return; +#ifdef HASTEFANSEXT + case 'U': + setusrvar(v); + return; +#endif +#ifdef HASFLOAT + case 'P': + epsilon = v; + return; +#endif +#ifdef HASIOT + case 'V': + return; +#endif +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case 'X': + dspsetcursorx((int)v); + /* set the charcount, this is half broken but works */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od] = v; +#endif + return; + case 'Y': + dspsetcursory((int)v); + return; +#endif + } + +#ifdef HASAPPLE1 + /* dynamically allocated vars */ + a = bfind(name); + + /* autocreate if not found */ + if (a == 0) { + a = bmalloc(name, 0); + if (!USELONGJUMP && er) return; + } + + /* something went wrong */ + if (a == 0) { + error(EVARIABLE); + return; + } + + /* set the value */ + setnumber(a, memwrite2, v); +#else + /* the static variable array */ + if (name->c[1] == 0 && name->c[0] >= 65 && name->c[0] <= 91) { + vars[name->c[0] - 65] = v; + return; + } + error(EVARIABLE); +#endif +} + +/* clr all variables */ +void clrvars() { + + /* delete all static variables */ + address_t i; + + /* clear static variable (only on no heap systems) */ +#ifndef HASAPPLE1 + for (i = 0; i < VARSIZE; i++) vars[i] = 0; +#endif + + /* then set the entire mem area to zero */ + for (i = himem; i < memsize; i++) memwrite2(i, 0); + + /* reset the heap start*/ + himem = memsize; + + /* and clear the cache */ +#ifdef HASAPPLE1 + zeroheap(&bfind_object); +#endif +} + +/* + The BASIC memory access function. + + getnumber2, getaddress and getstrlength are purely local, they + can be used with any memory reader function unlike the old BASIC 1 + code. +*/ + +/* + To avoid nasty warnings we encapsulate the EEPROM access functions + from runtime.c + This is only needed for the get* and set* functions as we use the + memreader_t and memwriter_t function pointers here. + This way, types in runtime.c can be changed without changing the + BASIC interpreter code. +*/ +mem_t beread(address_t a) { + return eread(a); +} + +void beupdate(address_t a, mem_t v) { + eupdate(a, v); +} + + +/* a generic memory reader for numbers */ +number_t getnumber(address_t m, memreader_t f) { + mem_t i; + accu_t z; + + for (i = 0; i < numsize; i++) z.c[i] = f(m++); + return z.n; +} + +/* same for addresses */ +address_t getaddress(address_t m, memreader_t f) { + mem_t i; + accu_t z; + + for (i = 0; i < addrsize; i++) z.c[i] = f(m++); + return z.a; +} + +/* same for strings */ +stringlength_t getstrlength(address_t m, memreader_t f) { + mem_t i; + accu_t z; + + z.a = 0; + for (i = 0; i < strindexsize; i++) z.c[i] = f(m++); + return z.a; +} + +/* set a number at a memory location, new version */ +void setnumber(address_t m, memwriter_t f, number_t v) { + mem_t i; + accu_t z; + + z.n = v; + for (i = 0; i < numsize; i++) f(m++, z.c[i]); +} + +/* set an address at a memory location */ +void setaddress(address_t m, memwriter_t f, address_t a) { + mem_t i; + accu_t z; + + z.a = a; + for (i = 0; i < addrsize; i++) f(m++, z.c[i]); +} + +/* set a stringlength at a memory location */ +void setstrlength(address_t m, memwriter_t f, stringlength_t s) { + mem_t i; + accu_t z; + + z.s = s; + for (i = 0; i < strindexsize; i++) f(m++, z.c[i]); +} + +/* + Code to handle names. These function mostly deal with the true + name part of name_t and not the token. The token has to be + processed by the caller. Name byte order conventon is + to have the first character in the lower byte and the second + character in the higher byte. Optionally, for HASLONGNAMES + the length of the name is stored before the name. + + setname_* sets a name and advance the number of bytes the name uses. + Two versions are needed because the heap is counted down + while the pgm is counted up. + + getname needs to go through a memreader because names are + read from eeproms as well! + + Currently the old code with twobyte names is still in place + if HASLONGNAMES is not defined. Default is now to have long names. + +*/ +#ifndef HASLONGNAMES + +/* this one is for the heap were we count down writing*/ +address_t setname_heap(address_t m, name_t* name) { + memwrite2(m--, name->c[1]); + memwrite2(m--, name->c[0]); + return m; +} + +/* this one is for the pgm were we count up writing */ +address_t setname_pgm(address_t m, name_t* name) { + memwrite2(m++, name->c[0]); + memwrite2(m++, name->c[1]); + return m; +} + +/* get a name from a memory location */ +address_t getname(address_t m, name_t* name, memreader_t f) { + name->c[0] = f(m++); + name->c[1] = f(m++); + return m; +} + +/* compare two names */ +mem_t cmpname(name_t* a, name_t* b) { + if (a->c[0] == b->c[0] && a->c[1] == b->c[1]) return 1; else return 0; +} + +/* copy the entire name stucture */ +void copyname(name_t* a, name_t* b) { + a->c[0] = b->c[0]; + a->c[1] = b->c[1]; + a->token = b->token; +} + +/* zero a name and a heap object */ +void zeroname(name_t* name) { + name->c[0] = 0; + name->c[1] = 0; + name->token = 0; +} + +void zeroheap(heap_t* heap) { + heap->address = 0; + heap->size = 0; + zeroname(&heap->name); +} + +/* output a name */ +void outname(name_t* name) { + outch(name->c[0]); + if (name->c[1]) outch(name->c[1]); +} + +#else +/* this one is for the heap were we count down writing*/ +address_t setname_heap(address_t m, name_t* name) { + mem_t l; + for (l = name->l; l > 0; l--) memwrite2(m--, name->c[l - 1]); + memwrite2(m--, name->l); + return m; +} + +/* this one is for the pgm were we count up writing */ +address_t setname_pgm(address_t m, name_t* name) { + mem_t l; + memwrite2(m++, name->l); + for (l = 0; l < name->l; l++) memwrite2(m++, name->c[l]); + return m; +} + +/* get a name from a memory location */ +address_t getname(address_t m, name_t* name, memreader_t f) { + mem_t l; + name->l = f(m++); + + for (l = 0; l < name->l; l++) name->c[l] = f(m++); + // for(; lc[l]=0; /* should not be there, is needed for */ + /* not having this here causes the obscure function namehandling bug if xfn does not do a zeroname + have not yet found the root cause for this */ + return m; +} + +/* compare two names */ +mem_t cmpname(name_t* a, name_t* b) { + mem_t l; + if (a->l != b->l) return 0; + for (l = 0; l < a->l; l++) if (a->c[l] != b->c[l]) return 0; + return 1; +} + +/* copy the entire name stucture */ +void copyname(name_t* a, name_t* b) { + mem_t l; + a->l = b->l; + for (l = 0; l < b->l; l++) a->c[l] = b->c[l]; + a->token = b->token; + if (a->l == 1) a->c[1] = 0; /* this is needed for compatibility with the short name code when handling special vars */ +} + +/* zero a name and a heap object */ +void zeroname(name_t* name) { + mem_t l; + name->l = 0; + for (l = 0; l < MAXNAME; l++) name->c[l] = 0; + name->token = 0; +} + +void zeroheap(heap_t* heap) { + heap->address = 0; + heap->size = 0; + zeroname(&heap->name); +} + +/* output a name */ +void outname(name_t* name) { + mem_t l; + for (l = 0; l < name->l; l++) outch(name->c[l]); +} +#endif + + +/* + Create an array. + + Arrays are created on the heap. This code allows redimensioning of arrays + which leads to a new array with the same name on the heap. This new + array is found first in a heap search. This ways we can have arrays + as local variables. + + msarraylimits is a flag to indicate that arrays should be created with + 0-n elements like in Microsoft BASIC. + +*/ +address_t createarray(name_t* variable, address_t i, address_t j) { + address_t a; + + /* if we want to me MS compatible, the array ranges from 0-n */ + if (msarraylimits) { + i += 1; + j += 1; + } + + /* this code allows redimension now for local variables */ +#ifdef HASAPPLE1 + if (DEBUG) { + outsc("* create array "); outname(variable); outspc(); + outsc("* with name length "); outnumber(variable->l); outspc(); + outnumber(i); outspc(); outnumber(j); outcr(); + } + +#ifndef HASMULTIDIM + return bmalloc(variable, i); +#else + + /* allocate the array space */ + a = bmalloc(variable, i * j); + + /* store the dimension of the array at the beginning of the array area */ + setaddress(a + i * j * numsize, memwrite2, j); + + /* return value is the address of the payload area */ + return a; +#endif +#endif + return 0; +} + +/* + The array function. + + We use the lefthandside object here with the convention that i is the first index + and j the second index. This is inconsistent with the use in strings. Will be fixed + when a true indexing type is introduced. +*/ +void array(lhsobject_t* object, mem_t getset, number_t* value) { + address_t a; /* the address of the array element */ + address_t h; /* the number of elements in the array */ + address_t l = arraylimit; /* the lower limit, defaults to the arraylimit, here for further use */ + address_t dim = 1; /* the array dimension */ + + if (DEBUG) { + outsc("* array: accessing "); + outname(&name); outspc(); outspc(); + outnumber(object->i); outspc(); + outnumber(object->j); outspc(); + outsc(" getset "); outch(getset); outcr(); + } + + /* handling the special array, range check and access is done here */ + if (object->name.c[0] == '@') { + switch (object->name.c[1]) { + /* @E ranges from 1 to the end of the EEPROM minus the header */ + case 'E': + h = elength() / numsize; + a = elength() - numsize * object->i; + if (a < eheadersize || a > elength() - numsize) { + error(EORANGE); + return; + } + if (getset == 'g') *value = getnumber(a, beread); + else if (getset == 's') setnumber(a, beupdate, *value); + return; +#if defined(DISPLAYDRIVER) && defined(DISPLAYCANSCROLL) + case 'D': + if (getset == 'g') *value = dspget(object->i - 1); + else if (getset == 's') dspset(object->i - 1, *value); + return; +#endif +#if defined(HASCLOCK) + case 'T': + if (getset == 'g') *value = rtcget(object->i); + else if (getset == 's') rtcset(object->i, *value); + return; +#endif +#if defined(ARDUINO) && defined(ARDUINOSENSORS) + case 'S': + if (getset == 'g') *value = sensorread(object->i, 0); + return; +#endif +#ifdef HASSTEFANSEXT + case 'U': + if (getset == 'g') *value = getusrarray(object->i); + else if (getset == 's') setusrarray(object->i, *value); + return; +#endif + case 0: + h = (himem - top) / numsize; + a = himem - numsize * (object->i + 1) + 1; + if (object->i < 0 || a < top) { + error(EORANGE); + return; + } + if (getset == 'g') *value = getnumber(a, memread2); + else if (getset == 's') setnumber(a, memwrite2, *value); + return; +#ifdef HASSTEFANSEXT + case 'M': + h = himem - top; + a = himem - object->i; + if (object->i < 0 || a < top) { + error(EORANGE); + return; + } + if (getset == 'g') *value = memread2(a); + else if (getset == 's') memwrite2(a, *value); + return; +#endif + case 'P': + /* the io ports */ + if (object->i >= 0 && object->i < 16) { + if (getset == 'g') *value = portread(object->i); + else if (getset == 's') portwrite(object->i, *value); + return; + } + /* the data direction registers */ + if (object->i >= 16 && object->i < 32) { + if (getset == 'g') *value = ddrread(object->i - 16); + else if (getset == 's') ddrwrite(object->i - 16, *value); + return; + } + /* the pin registers (only input) */ + if (object->i >= 32 && object->i < 48) { + if (getset == 'g') *value = pinread(object->i - 32); + return; + } + default: + error(EVARIABLE); + return; + } + } else { + /* dynamically allocated arrays */ +#ifdef HASAPPLE1 + object->name.token = ARRAYVAR; + if (!(a = bfind(&object->name))) a = createarray(&object->name, ARRAYSIZEDEF, 1); + if (!USELONGJUMP && er) return; + + /* multidim reserves one address word for the dimension, hence we have less bytes */ +#ifndef HASMULTIDIM + h = bfind_object.size / numsize; +#else + h = (bfind_object.size - addrsize) / numsize; +#endif + + if (DEBUG) { + outsc("** in array dynamical base address "); outnumber(a); + outsc(" and array element number "); outnumber(h); + outcr(); + } + +#ifdef HASMULTIDIM + dim = getaddress(a + bfind_object.size - addrsize, memread2); + if (DEBUG) { + outsc("** in array, second dimension is "); outnumber(dim); + outspc(); outnumber(a + bfind_object.size); + outcr(); + } + a = a + ((object->i - l) * dim + (object->j - l)) * numsize; +#else + a = a + (object->i - l) * numsize; +#endif +#else /* no array code */ + error(EVARIABLE); + return; +#endif + } + + /* range check */ +#ifdef HASMULTIDIM + if ( (object->j < l) || (object->j >= dim + l) || (object->i < l) || (object->i >= h / dim + l)) { + error(EORANGE); + return; + } +#else + if ( (object->i < l) || (object->i >= h + l) ) { + error(EORANGE); + return; + } +#endif + + /* set or get the array */ + if (getset == 'g') *value = getnumber(a, memread2); + else if (getset == 's') setnumber(a, memwrite2, *value); +} + +/* + Create a string on the heap. + + i is the length of the string, j the dimension of the array. + + String objects are either plain strings or arrays. In case of arrays + the number of strings is stored at the end of the array. +*/ +address_t createstring(name_t* variable, address_t i, address_t j) { +#ifdef HASAPPLE1 + address_t a; + + if (DEBUG) { + outsc("Create string "); + outname(variable); + outcr(); + } + + /* correct create length if arraylimit is not 1 */ + j = (j - arraylimit) + 1; + + /* the MS string compatibility, DIM 10 creates 11 elements */ + if (msarraylimits) j += 1; + +#ifndef HASMULTIDIM + /* if no string arrays are in the code, we reserve the number of bytes i and space for the index */ + /* allow redimension without check right now, for local variables */ + a = bmalloc(variable, i + strindexsize); + if (er != 0) return 0; + return a; +#else + /* string arrays need the number of array elements which address_ hence addresize bytes and then + the space for j strings */ + /* allow redimension without check right now, for local variables */ + a = bmalloc(variable, addrsize + j * (i + strindexsize)); + if (er != 0) return 0; + + /* set the array length */ + setaddress(a + j * (i + strindexsize), memwrite2, j); + + /* return the address of the first string */ + return a; +#endif + if (er != 0) return 0; + return a; +#else + return 0; +#endif +} + + +/* + Get a string at position b. + + getstring returns a pointer to the first string element in question. + + There is a lo tof complexity in the code to support systems with serial + memory. + +*/ +#ifdef HASAPPLE1 + +/* helpers to handle strings */ +/* Stores a C string to a BASIC string variable */ +void storecstring(address_t ax, address_t s, char* b) { + address_t k; + + for (k = 0; k < s - strindexsize && b[k] != 0; k++) memwrite2(ax + k + strindexsize, b[k]); + setstrlength(ax, memwrite2, k); +} + +/* length of a c string up to a limit l */ +address_t cstringlength(char* c, address_t l) { + address_t a; + + while (a < l && c[a] != 0) a++; + return a; +} + +/* get a memory pointer to a string, new version */ +void getstring(string_t* strp, name_t* name, address_t b, address_t j) { + address_t k, zt; + address_t ax; + + /* we know nothing about the string */ + ax = 0; + strp->address = 0; + strp->ir = 0; + strp->length = 0; + strp->arraydim = 1; + strp->strdim = 0; + + if (DEBUG) { + outsc("* getstring from var "); outname(name); outspc(); + outnumber(b); outspc(); + outnumber(j); outcr(); + } + + /* special string variables */ + if (name->c[0] == '@') + switch (name->c[1]) { + case 0: + strp->ir = ibuffer + b; + strp->length = ibuffer[0]; + strp->strdim = BUFSIZ - 2; + return; + default: + error(EVARIABLE); + return; + case 'U': + makeusrstring(); /* a user definable special string in sbuffer */ + strp->ir = sbuffer + b; + strp->length = sbuffer[0]; + return; +#ifdef HASCLOCK + case 'T': + rtcmkstr(); /* the time string */ + strp->ir = rtcstring + b; + strp->length = rtcstring[0]; + return; +#endif + /* the arguments string on POSIX systems */ +#ifdef HASARGS + case 'A': + if (bargc > 2) { + strp->ir = bargv[2]; + strp->length = cstringlength(bargv[2], BUFSIZE); + return; + } + return; +#endif + } + + /* dynamically allocated strings, create on the fly */ + if (!(ax = bfind(name))) ax = createstring(name, defaultstrdim, arraylimit); + + if (DEBUG) { + outsc("** heap address "); outnumber(ax); outcr(); + if (ax) { + outsc("** byte length of string memory segment "); + outnumber(bfind_object.size); + outcr(); + } + } + + /* string creating has caused an error, typically no memoryy */ + if (!USELONGJUMP && er) return; + +#ifndef HASMULTIDIM + /* the maximum length of the string */ + strp->strdim = bfind_object.size - strindexsize; + + /* are we in range */ + if ((b < 1) || (b > strp->strdim )) { + error(EORANGE); + return; + } + + if (DEBUG) { + outsc("** maximum string length "); + outnumber(strp->strdim); + outcr(); + } + + /* get the actual full length, this is redundant to lenstring but lenstring does + not autocreate */ + strp->length = getstrlength(ax, memread2); + + /* now find the payload address */ + ax = ax + strindexsize + (b - 1); +#else + + /* the dimension of the string array */ + /* it is at the top of the string, this uses a side effect of bfind */ + strp->arraydim = getaddress(ax + bfind_object.size - addrsize, memread2); + + /* is the array index in range */ + if ((j < arraylimit) || (j >= strp->arraydim + arraylimit )) { + error(EORANGE); + return; + } + + if (DEBUG) { + outsc("** string dimension "); + outnumber(strp->arraydim); + outcr(); + } + + /* the max length of a string */ + strp->strdim = (bfind_object.size - addrsize) / strp->arraydim - strindexsize; + + /* are we in range */ + if ((b < 1) || (b > strp->strdim )) { + error(EORANGE); + return; + } + + if (DEBUG) { + outsc("** maximum string length "); + outnumber(strp->strdim); + outcr(); + } + + /* the base address of a string */ + ax = ax + (j - arraylimit) * (strp->strdim + strindexsize); + + if (DEBUG) { + outsc("** string base address "); + outnumber(ax); + outcr(); + } + + /* from this base address we can get the actual length of the string */ + strp->length = getstrlength(ax, memread2); + + /* the address of the payload */ + ax = ax + b - 1 + strindexsize; + +#endif + + if (DEBUG) { + outsc("** payload address "); + outnumber(ax); + outcr(); + } + + /* store the payload address to the string object, length to be done if needed!! */ + strp->address = ax; + + /* return value is 0 if we have no direct memory access, the caller needs to handle the string + through the mem address */ +#ifdef USEMEMINTERFACE + strp->ir = 0; +#else + strp->ir = (char *)&mem[ax]; +#endif +} + + +/* reimplementation with name_t */ +/* set the length of a string */ +void setstringlength(name_t* name, address_t l, address_t j) { + address_t a; + stringlength_t stringdim; + + if (DEBUG) { + outsc("** setstringlength "); + outname(name); + outspc(); outnumber(l); outspc(); outnumber(j); + outcr(); + } + + /* the special strings */ + if (name->c[0] == '@') + switch (name->c[1]) { + case 0: + *ibuffer = l; + return; + case 'U': + /* do nothing here for the moment */ + return; + } + + /* find the variable address */ + a = bfind(name); + if (!USELONGJUMP && er) return; + if (a == 0) { + error(EVARIABLE); + return; + } + + /* stringdim calculation moved here */ +#ifndef HASMULTIDIM + stringdim = bfind_object.size - strindexsize; +#else + /* getaddress seeks the dimension of the string array directly after the payload */ + stringdim = (bfind_object.size - addrsize) / (getaddress(a + bfind_object.size - addrsize, memread2)) - strindexsize; +#endif + + /* where do we write it to */ + a = a + (stringdim + strindexsize) * (j - arraylimit); + if (DEBUG) { + outsc("** setstringlength writing to "); + outnumber(a); + outsc(" value "); + outnumber(l); + outcr(); + } + setstrlength(a, memwrite2, l); +} + +/* the BASIC string mechanism for real time clocks, create a string with the clock data */ +#ifdef HASCLOCK +void rtcmkstr() { + int cc = 1; + int t; + + /* hours */ + t = rtcget(2); + rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc++] = ':'; + + /* minutes */ + t = rtcget(1); + rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc++] = ':'; + + /* seconds */ + t = rtcget(0); + rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc++] = '-'; + + /* days */ + t = rtcget(4); + if (t / 10 > 0) rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc++] = '/'; + + /* months */ + t = rtcget(5); + if (t / 10 > 0) rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc++] = '/'; + + /* years */ + t = rtcget(6) % 100; /* only 100 years no 19xx epochs */ + if (t / 10 > 0) rtcstring[cc++] = t / 10 + '0'; + rtcstring[cc++] = t % 10 + '0'; + rtcstring[cc] = 0; + + /* needed for BASIC strings */ + rtcstring[0] = cc - 1; +} +#endif +#endif + +/* + Layer 0 Extension: the user defined extension functions, use this function for a + quick way to extend BASIC. + + @U is a single variable that can be set and get. Every access to this variable + calls getusrvar() or setusrvar(). + @U() is a 1d array every access calls get or setusrarray(). + @U$ is a read only string created by makeusrstring(). + USR(32, V) is a user defined function created by usrfunction(). + CALL 32 is a user defined call + +*/ + +/* read or write the variable @U, you can do anything you want here */ +number_t getusrvar() { + return 0; +} +void setusrvar(number_t v) { + return; +} + +/* read or write the array @U(), you can do anything you want here */ +number_t getusrarray(address_t i) { + return 0; +} +void setusrarray(address_t i, number_t v) { + return; +} + +/* make the usr string from @U$, this function can be called multiple times for one operation */ +void makeusrstring() { + /* + sample code could be: + + mem_t i; + const char text[] = "hello world"; + for(i=0; i 31 calls this */ +number_t usrfunction(address_t i, number_t v) { + return 0; +} + +/* CALL with arguments > 31 calls this */ +void usrcall(address_t i) { + return; +} + +/* + Layer 0 - keyword handling - PROGMEM logic goes here + getkeyword(), getmessage(), and getokenvalue() are + the only access to the keyword array in the code. + + Same for messages and errors. + + All keywords are stored in PROGMEM, the Arduino way to store + constant data in flash memory. sbuffer is used to recall the + keywords and messages from PROGMEM on Arduino. Other systems + use the keyword array directly. +*/ +char* getkeyword(address_t i) { + + if (DEBUG) { + outsc("** getkeyword from index "); + outnumber(i); + outcr(); + } + +#ifndef ARDUINOPROGMEM + return (char *) keyword[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(keyword[i]))); + return sbuffer; +#endif +} + +/* messages are read from the message array */ +char* getmessage(char i) { + if (i >= sizeof(message) || i < 0) return 0; +#ifndef ARDUINOPROGMEM + return (char *) message[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(message[i]))); + return sbuffer; +#endif +} + +/* tokens read here are token_t constructed from multi byte sequences */ +token_t gettokenvalue(address_t i) { + if (i >= sizeof(tokens)) return 0; +#ifndef ARDUINOPROGMEM + return tokens[i]; +#else +#ifndef HASLONGTOKENS + return (token_t) pgm_read_byte(&tokens[i]); +#else + return (token_t) pgm_read_word(&tokens[i]); +#endif +#endif +} + +/* print a message directly to the default outpur stream */ +void printmessage(char i) { +#ifndef HASERRORMSG + if (i > EGENERAL) return; +#endif + outsc((char *)getmessage(i)); +} + +/* + Layer 0 - error handling + + The general error handler. The static variable er + contains the error state. + + debugtoken() writes a token for debug + bdebug() is the general debug message function + + Strategy: the error() function writes the message and then + clears the stack. All calling functions must check er and + return after funtion calls with no further messages etc. + reseterror() sets the error state to normal and end the + run loop. +*/ +void error(token_t e) { + address_t i; + + /* store the error number */ + er = e; + + /* clear the stacks */ + clearst(); + clrforstack(); + clrgosubstack(); + + /* switch off all timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + + /* is the error handler active? then silently go if we do GOTO or CONT actions in it */ +#ifdef HASERRORHANDLING +#if !USELONGJUMP + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) return; +#else + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) longjmp(sthook, er); +#endif +#endif + + /* set input and output device back to default, and delete the form */ + iodefaults(); + form = 0; + + /* find the line number if in RUN modes */ + if (st != SINT) { + outnumber(myline(here)); + outch(':'); + outspc(); + } + + /* if we have error messages, display them */ +#ifdef HASERRORMSG + if (e > 0) + printmessage(e); + else { + for (i = 0; gettokenvalue(i) != 0 && gettokenvalue(i) != e; i++); + outsc(getkeyword(i)); + } + outspc(); + printmessage(EGENERAL); +#else + printmessage(EGENERAL); + outspc(); + outnumber(er); +#endif + if (DEBUG) { + outsc("** at "); + outnumber(here); + } + outcr(); + + /* reset fncontext - this is odd */ + fncontext = 0; + + /* we return to the statement loop, bringing the error with us */ +#if USELONGJUMP == 1 + longjmp(sthook, er); +#endif +} + +void reseterror() { + er = 0; + here = 0; + st = SINT; +} + +void debugtoken() { + outsc("* "); + if (debuglevel > 2) { + outnumber(here); + outsc(" * "); + } + + if (token == EOL) { + outsc("EOL"); + return; + } + + switch (token) { + case LINENUMBER: + printmessage(MLINE); + break; + case NUMBER: + printmessage(MNUMBER); + break; + case VARIABLE: + printmessage(MVARIABLE); + break; + case ARRAYVAR: + printmessage(MARRAY); + break; + case STRING: + printmessage(MSTRING); + break; + case STRINGVAR: + printmessage(MSTRINGVAR); + break; + } + + outspc(); + outputtoken(); +} + +void bdebug(const char *c) { + outch('*'); + outspc(); + outsc(c); + debugtoken(); + outcr(); +} + +/* + Arithmetic and runtime operations are mostly done + on a stack of number_t. + + push(), pop(), clearst() handle the stack +*/ +void push(number_t t) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(t); outcr(); + } + + /* in forced integer mode every operation is truncated */ +#ifdef HASFLOAT + if (forceint) t = trunc(t); +#endif + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].n = t; +} + +number_t pop() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp - 1].n); outcr(); + } + + if (sp == 0) { + error(ESTACK); + return 0; + } + + return stack[--sp].n; +} + +void pushaddress2(address_t a) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(a); outcr(); + } + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].a = a; +} + +address_t popaddress2() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp - 1].a); outcr(); + } + + if (sp == 0) { + error(ESTACK); + return 0; + } + + return stack[--sp].a; +} + +void pushinteger(index_t i) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(i); outcr(); + } + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].i = i; +} + +index_t popinteger() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp - 1].i); outcr(); + } + + if (sp == 0) { + error(ESTACK); + return 0; + } + + return stack[--sp].i; +} + + +/* this one gets a positive integer from the stack and traps the error*/ +address_t popaddress() { + number_t tmp = 0; + + tmp = pop(); + if (tmp < 0) { + error(EORANGE); + return 0; + } + return (address_t) tmp; +} + +void clearst() { + sp = 0; +} + +/* these are not really stack operations but a way to handle temp char data (not needed right now) */ +address_t charsp; + +void pushchar(char ch) {} + +char popchar() { + return 0; +} + +/* + clear the cursor for the READ/DATA mechanism +*/ +void clrdata() { +#ifdef HASDARTMOUTH + data = 0; +#endif +} + +/* + Stack handling for FOR + Reimplementation of the for stack with names and with all loops + cleaned up. +*/ + +/* the new stack type for loops */ +void pushloop(name_t* name, token_t t, address_t here, number_t to, number_t step) { + address_t i; + + if (DEBUG) { + outsc("** loopsp and here in pushloopstack "); + outnumber(loopsp); outspc(); outnumber(here); outcr(); + if (name != 0) { + outsc("** loop name "); + outname(name); + outcr(); + } + else { + outsc("** loop name is 0"); + outcr(); + } + outsc("** loop token "); outnumber(t); outcr(); + outsc("** loop to "); outnumber(to); outcr(); + outsc("** loop step "); outnumber(step); outcr(); + } + + /* + Before pushing into the loop stack we check is an + old loop exists. + + There are two situations to handle: + 1. A loop is reentered because a GOTO went back to or even before + the loop start. This is identified by the here location. + 2. A new FOR loop is created after the existing loop with the same + variable name. This happens if a jump or break went outside the + loop. This is identified by the variable name. + */ + + /* Situation 1, scan for here */ + for (i = 0; i < loopsp; i++) { + if (loopstack[i].here == here) { + loopsp = i; + break; + } + } + + /* Situation 2, scan for the name */ + if (name != 0) { + for (i = 0; i < loopsp; i++) { + if (cmpname(&loopstack[i].var, name)) { + loopsp = i; + break; + } + } + } + + /* Add the loop to the stack */ + if (loopsp < FORDEPTH) { + if (t == TWHILE || t == TREPEAT) { + loopstack[loopsp].var.token = t; + } else { + if (name != 0) { + loopstack[loopsp].var = *name; +#if defined(HASAPPLE1) && defined(HASLOOPOPT) + loopstack[loopsp].varaddress = bfind(name); +#else + loopstack[loopsp].varaddress = 0; +#endif + } else { + loopstack[loopsp].var.c[0] = 0; + loopstack[loopsp].var.l = 0; + loopstack[loopsp].var.token = 0; + loopstack[loopsp].varaddress = 0; + } + } + loopstack[loopsp].here = here; + loopstack[loopsp].to = to; + loopstack[loopsp].step = step; + loopsp++; + return; + } else + error(ELOOP); +} + +/* what is the active loop */ +bloop_t* activeloop() { + if (loopsp > 0) { + return &loopstack[loopsp - 1]; + } else { + error(ELOOP); + return 0; + } +} + +void droploop() { + if (loopsp > 0) { + loopsp--; + } else { + error(ELOOP); + return; + } +} + +void clrforstack() { + loopsp = 0; +} + +/* GOSUB stack handling */ +void pushgosubstack(mem_t a) { + if (gosubsp < GOSUBDEPTH) { + gosubstack[gosubsp] = here; +#ifdef HASEVENTS + gosubarg[gosubsp] = a; +#endif + gosubsp++; + } else + error(TGOSUB); +} + +void popgosubstack() { + if (gosubsp > 0) { + gosubsp--; + } else { + error(TRETURN); + return; + } + here = gosubstack[gosubsp]; +} + +void dropgosubstack() { + if (gosubsp > 0) { + gosubsp--; + } else { + error(TGOSUB); + } +} + +void clrgosubstack() { + gosubsp = 0; +} + +/* two helper commands for structured BASIC, without the GOSUB stack */ + +void pushlocation(blocation_t* l) { + if (st == SINT) l->location = bi - ibuffer; + else l->location = here; + l->token = token; +} + +void poplocation(blocation_t* l) { + if (st == SINT) bi = ibuffer + l->location; + else here = l->location; + token = l->token; +} + +/* little helpers of the io functions */ + +/* send a newline */ +void outcr() { +#ifdef HASSERIAL1 + if (sendcr) outch('\r'); +#endif + outch('\n'); +} + +/* send a space */ +void outspc() { + outch(' '); +} + +/* output a zero terminated string - c style */ +void outsc(const char *c) { + while (*c != 0) outch(*c++); +} + +/* output a zero terminated string in a formated box padding spaces + needed for catalog output */ +void outscf(const char *c, index_t f) { + int i = 0; + + while (*c != 0) { + outch(*c++); + i++; + } + if (f > i) { + f = f - i; + while (f--) outspc(); + } +} + +/* + two console logger functions, they are not needed in BASIC but in the runtime + environment, RTDEBUGSTREAM is the channel to log to +*/ + +#ifdef RTDEBUG +void consolelog(char* ch) { + mem_t ood = od; + od = RTDEBUGSTREAM; + outsc(ch); + od = ood; +} +void consolelognum(int i) { + mem_t ood = od; + od = RTDEBUGSTREAM; + outnumber(i); + od = ood; +} +#else +void consolelog(char* ch) {} +void consolelognum(int i) {} +#endif + +/* + Reading a positive number from a char buffer + maximum number of digits is adjusted to SBUFSIZE + as a fail safe. + This is only for integers. +*/ +address_t parsenumber(char *c, number_t *r) { + address_t nd = 0; + + *r = 0; + while (*c >= '0' && *c <= '9' && *c != 0) { + *r = *r * 10 + *c++ -'0'; + nd++; + if (nd == SBUFSIZE) break; + } + return nd; +} + +/* + Reimplementation of parsenumber with the capability + to scan hex, octal, and binary numbers as well. + This is only for integers. +*/ +address_t parsenumbern(char *c, number_t *r) { + address_t nd = 0; + mem_t base = 10; + + *r = 0; + + /* the base */ + if (*c == '0') { + c++; + nd++; + if (*c == 'x' || *c == 'X') { + c++; + nd++; + base = 16; + } else if (*c == 'b' || *c == 'B') { + c++; + nd++; + base = 2; + } else if (*c == 'o' || *c == 'O') { + c++; + nd++; + base = 8; + } + } + + /* the digits */ + while (*c != 0) { + if (base == 16) { + if (*c >= '0' && *c <= '9') *r = *r * 16 + *c - '0'; + else if (*c >= 'A' && *c <= 'F') *r = *r * 16 + *c - 'A' + 10; + else if (*c >= 'a' && *c <= 'f') *r = *r * 16 + *c - 'a' + 10; + else break; + } else if (base == 8) { + if (*c >= '0' && *c <= '7') *r = *r * 8 + *c - '0'; + else break; + } else if (base == 2) { + if (*c == '0' || *c == '1') *r = *r * 2 + *c - '0'; + else break; + } else { + if (*c >= '0' && *c <= '9') *r = *r * 10 + *c - '0'; + else break; + } + c++; + nd++; + if (nd == SBUFSIZE) break; + } + return nd; +} + + +#ifdef HASFLOAT +/* a poor man's atof implementation with character count */ +address_t parsenumber2(char *c, number_t *r) { + address_t nd = 0; + index_t i; + number_t fraction = 0; + number_t exponent = 0; + mem_t nexp = 0; + + *r = 0; + + /* integer part */ + i = parsenumber(c, r); + c += i; + nd += i; + + /* the fractional part */ + if (*c == '.') { + c++; + nd++; + + i = parsenumber(c, &fraction); + c += i; + nd += i; + + if (i > 0) { + while ((--i) >= 0) fraction = fraction / 10; + *r += fraction; + } + } + + /* the exponent */ + if (*c == 'E' || *c == 'e') { + c++; + nd++; + if (*c == '-') { + c++; + nd++; + nexp = 1; + }; + i = parsenumber(c, &exponent); + nd += i; + while ((--exponent) >= 0) if (nexp) *r = *r / 10; else *r = *r * 10; + } + + return nd; +} +#endif + +/* + Convert a number to a string. + + All writenumber funcions assume that the buffer is large enough. + The caller has to handle this. This normally no problem because + the decimal numbers converted are limited to the size of the + number_t type. For this reason the stringbuffer length in basic.h + is set to 16 time the size of the number_t type. + + The argument type controls the largest displayable integer. + wnumber_t is defined in basic.h as either int or long for float + systems. +*/ +address_t writenumber(char *c, wnumber_t v) { + address_t nd = 0; + index_t i, j; + mem_t s = 1; + char c1; + + /* the sign */ + if (v < 0) s = -1; + + /* the digits */ + do { + c[nd++] = (v % 10) * s + '0'; + v = v / 10; + } while (v != 0); + + /* print the minus */ + if (s < 0 ) c[nd] = '-'; else nd--; + + /* reverse the order of digits */ + i = 0; + j = nd; + while (j > i) { + c1 = c[i]; + c[i] = c[j]; + c[j] = c1; + i++; + j--; + } + + nd++; + c[nd] = 0; + return nd; +} + +/* writenumber with arbitrary base support */ +address_t writenumbern(char *c, wnumber_t v, mem_t n) { + address_t nd = 0; + index_t i, j; + mem_t s = 1; + char c1; + + /* the sign */ + if (v < 0) s = -1; + + /* the digits */ + do { + c[nd] = (v % n) * s + '0'; + v = v / n; + /* for base 16 we need more work */ + if (c[nd] > '9') c[nd] = c[nd] + 7; + nd++; + } while (v != 0); + + /* print the minus */ + if (s < 0 ) c[nd] = '-'; else nd--; + + /* reverse the order of digits */ + i = 0; + j = nd; + while (j > i) { + c1 = c[i]; + c[i] = c[j]; + c[j] = c1; + i++; + j--; + } + + nd++; + c[nd] = 0; + return nd; +} + +#ifdef HASFLOAT +/* + this is for floats, handling output without library + functions as well. +*/ +address_t tinydtostrf(number_t v, index_t p, char* c) { + index_t i; + address_t nd = 0; + number_t f; + + /* if we are in forced integer mode */ + if (forceint) { + v = trunc(v); + return writenumber(c, (int)v); + } + + /* we do the sign here */ + if (v < 0) { + v = fabs(v); + c[nd++] = '-'; + } + + /* write the integer part */ + nd += writenumber(c + nd, (int)v); + c[nd++] = '.'; + + /* only the fraction to precision p */ + f = fabs(v); + + /* get p digits of the fraction */ + for (i = p; i > 0; i--) { + f = f - floor(f); + f = f * 10; + c[nd++] = (int)floor(f) + '0'; + } + + /* and a terminating 0 */ + c[nd] = 0; + return nd; +} + +address_t writenumber2(char *c, number_t vi) { + index_t i; + index_t nd; + number_t f; + index_t exponent = 0; + mem_t eflag = 0; + const int p = 5; + + /* pseudo integers are displayed as integer + zero trapped here */ + f = floor(vi); + if (f == vi && fabs(vi) < maxnum) return writenumber(c, vi); + + /* earlier, floats where displayed in POSIx using the libraties + return sprintf(c, "%g", vi); + we dont do this any more + */ + + /* we check if we have anything to write */ + if (!isfinite(vi)) { + c[0] = '*'; + c[1] = 0; + return 1; + } + + /* normalize the number and see which exponent we have to deal with */ + f = vi; + while (fabs(f) < 1.0) { + f = f * 10; + exponent--; + } + while (fabs(f) >= 10.0 - 0.00001) { + f = f / 10; + exponent++; + } + + /* there are platforms where dtostrf is broken, we do things by hand in a simple way */ + + if (exponent > -2 && exponent < 7) { + tinydtostrf(vi, precision, c); + } else { + tinydtostrf(f, precision, c); + eflag = 1; + } + + /* remove trailing zeros */ + for (i = 0; (i < SBUFSIZE && c[i] != 0 ); i++); + i--; + + /* */ + while (c[i] == '0' && i > 1) { + i--; + } + i++; + + /* add the exponent */ + if (eflag && exponent != 0) { + c[i++] = 'E'; + i += writenumber(c + i, exponent); + } + + c[i] = 0; + return i; + +} +#endif + +/* + innumber is used as a helper only by xinput(). It reads a number from an input + buffer and returns it in the number_t r. It returns 0 if the number is invalid, 1 if + the number is valid, and -1 if the user has pressed the BREAKCHAR key. + + Unlike the old innumber() implementation it is meant to read comma separated numbers + through input. Handling of the buffer is done by the calling function. + + The TINYBASICINPUT is an alternative implementation following the Palo Alto BASIC + way of doing it. The expression parser is reused. This allows variables names and + expressions to be used as input as well. + Due to the reuse of sbuffer in the calling function, this will probably only work + in RUN mode. +*/ + +int innumber(number_t *r, char* buffer, address_t k) { + address_t i = k; + mem_t s = 1; + +#ifndef HASTINYBASICINPUT + /* result is zero*/ + *r = 0; + + /* remove all leading whitespaces first */ + while ((buffer[i] == ' ' || buffer[i] == '\t') && i <= (address_t) buffer[0]) i++; + + /* is there anything left */ + if (i > (address_t) buffer[0]) return 0; + + /* now the sign */ + if (buffer[i] == '-') { + s = -1; + i++; + } + + /* check for the break character */ +#if defined(BREAKCHAR) + if (buffer[i] == BREAKCHAR) return -1; +#endif + + /* the number */ +#ifndef HASFLOAT + if (buffer[i] < '0' || buffer[i] > '9') return 0; + i += parsenumber(&buffer[i], r); +#else + if ((buffer[i] < '0' || buffer[i] > '9') && buffer[i] != '.') return 0; + i += parsenumber2(&buffer[i], r); +#endif + + /* the sign */ + *r *= s; + return i; +#else + char *b; + token_t t; + + /* result is zero */ + *r = 0; + + /* save the interpreter state */ + b = bi; + s = st; + t = token; + + /* switch to fake interactive with the buffer as input */ + st = SINT; + bi = buffer + k; + + /* BREAK handling */ +#if defined(BREAKCHAR) + if (*bi == BREAKCHAR) { + return -1; + } +#endif + + /* start to interpret the buffer as an expression */ + nexttoken(); + expression(); + + /* restore the interpreter state */ + i = bi - buffer - 1; + bi = b; + st = s; + token = t; + + /* error handling, we trap the error and return zero */ + if (er) { + er = 0; + return 0; + } + + /* the result is on the stack */ + *r = pop(); + return i; +#endif +} + +/* prints a number */ +void outnumber(number_t n) { + address_t nd, i; + + /* number write to sbuffer, remember the number of digits in nd */ +#ifndef HASFLOAT + nd = writenumber(sbuffer, n); +#else + nd = writenumber2(sbuffer, n); +#endif + + /* negative number format aligns right */ + if (form < 0) { + i = nd; + while (i < -form) { + outspc(); + i++; + } + } + + /* the number */ + outs(sbuffer, nd); + + /* number formats in Palo Alto style, positive numbers align left */ + if (form > 0) { + while (nd < form) { + outspc(); + nd++; + } + } +} + +/* + Layer 1 functions - providing data into the global variable and + changing the interpreter state +*/ + +/* + Lexical analyser - tokenizes the input line. + + nexttoken() increments the input buffer index bi and delivers values in the global + variable token, with arguments in the accumulators ax, x and the index register ir + name is used in the routine. + + name, sr, ax and x change values in nexttoken and deliver the result to the calling + function. + + bi and ibuffer should not be changed or used for any other function in + interactive node as they contain the state of nexttoken(). In run mode + bi and ibuffer are not used as the program is fully tokenized in mem. + + all this is pretty much stateless. +*/ + +/* skip whitespaces */ +void whitespaces() { + while (*bi == ' ' || *bi == '\t') bi++; +} + +/* upper case, don't trust the buildins on microcontrollers */ +char btoupper(char c) { + if (c >= 'a' && c <= 'z') return c - 32; else return c; +} + +/* the token stream */ +void nexttoken() { + address_t k, l, i; + char* ir; + char quotechar; + + /* RUN mode vs. INT mode, in RUN mode we read from mem via gettoken() */ + if (st == SRUN || st == SERUN) { + /* in the token stream we call fastticker - all fast timing functions are in stream */ + fastticker(); + /* read the token from memory */ + gettoken(); + /* show what we are doing */ + if (debuglevel > 1) { + debugtoken(); + outcr(); + } + return; + } + + /* after change in buffer logic the first byte is reserved for the length */ + if (bi == ibuffer) bi++; + + /* literal mode only(!) EOL ends literal mode, used to have REM without quotes */ + if (lexliteral) { + token = *bi; + if (*bi != '\0') bi++; else lexliteral = 0; + return; + } + + /* remove whitespaces outside strings */ + whitespaces(); + + /* end of line token */ + if (*bi == '\0') { + token = EOL; + if (DEBUG) debugtoken(); + return; + } + + /* unsigned numbers, value returned in x */ +#ifndef HASFLOAT + if (*bi <= '9' && *bi >= '0') { + bi += parsenumber(bi, &x); +#else + if ((*bi <= '9' && *bi >= '0') || *bi == '.') { + bi += parsenumber2(bi, &x); +#endif + token = NUMBER; + if (DEBUG) debugtoken(); + return; + } + + /* strings between " " or " EOL, value returned in ir and in sr for now */ + if (*bi == '"' || *bi == '\'') { + quotechar = *bi; + k = 0; + bi++; + ir = bi; + sr.ir = bi; + while (*bi != quotechar && *bi != '\0') { + k++; + bi++; + } + bi++; + token = STRING; + sr.length = k; + sr.address = 0; /* we don't find the string in BASIC memory, as we lex from bi */ + if (DEBUG) debugtoken(); + return; + } + + /* + relations + single character relations are their own token + >=, =<, =<, =>, <> are tokenized + */ + if (*bi == '=') { + bi++; + whitespaces(); + if (*bi == '>') { + token = GREATEREQUAL; + bi++; + } else if (*bi == '<') { + token = LESSEREQUAL; + bi++; + } else { + token = '='; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '>') { + bi++; + whitespaces(); + if (*bi == '=') { + token = GREATEREQUAL; + bi++; + } else if (*bi == '>') { + token = TSHR; + bi++; + } else { + token = '>'; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '<') { + bi++; + whitespaces(); + if (*bi == '=') { + token = LESSEREQUAL; + bi++; + } else if (*bi == '>') { + token = NOTEQUAL; + bi++; + } else if (*bi == '<') { + token = TSHL; + bi++; + } else { + token = '<'; + } + if (DEBUG) debugtoken(); + return; + } + + /* + Keyworks and variables + + Isolate a word, bi points to the beginning, l is the length of the word. + ir points to the end of the word after isolating. + @ is a letter here to make the special @ arrays possible. + */ + + l = 0; + ir = bi; + while (-1) { + if (*ir >= 'a' && *ir <= 'z') { + if (!lowercasenames) *ir -= 32; /* toupper code, changing the input buffer directly */ + ir++; + l++; + } else if ((*ir >= '@' && *ir <= 'Z') || *ir == '_') { + ir++; + l++; + } else { + break; + } + } + + + /* + Ir is reused here to implement string compares + scanning the keyword array. + Once a keyword is detected the input buffer is advanced + by its length, and the token value is returned. + + Keywords are an array of null terminated strings. + They are always matched uppercase. + */ + k = 0; + while (gettokenvalue(k) != 0) { + ir = getkeyword(k); + i = 0; + while (*(ir + i) != 0) { + if (*(ir + i) != btoupper(*(bi + i))) { + k++; + i = 0; + break; + } else + i++; + } + if (i == 0) continue; + bi += i; + token = gettokenvalue(k); + if (token == TREM) lexliteral = 1; + if (DEBUG) debugtoken(); + return; + } + + /* + A variable has length 2 with either two letters or a letter + and a number. @ can be the first letter of a variable. + Here, no tokens can appear any more as they have been processed + further up. + + The longname code supports MAXNAME characters and _ as additional character. + */ +#ifdef HASLONGNAMES + if (l > 0 && l <= MAXNAME) { + token = VARIABLE; + zeroname(&name); + while (((*bi >= '0' && *bi <= '9') || + (*bi >= '@' && *bi <= 'Z') || + (*bi >= 'a' && *bi <= 'z') || + (*bi == '_') ) && name.l < MAXNAME && *bi != 0) { + name.c[name.l] = *bi; + bi++; + name.l++; + } + if (*bi == '$') { + token = STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token = ARRAYVAR; + } + /* the new code filling the name variable directly, will be used in the entire code soon */ + name.token = token; + if (DEBUG) debugtoken(); + return; + } +#else + if (l == 1 || l == 2) { + token = VARIABLE; + name.l = 0; + name.c[0] = *bi; + name.c[1] = 0; + bi++; + if ((*bi >= '0' && *bi <= '9') || (*bi >= 'A' && *bi <= 'Z') || *bi == '_' ) { + name.c[1] = *bi; + bi++; + } + if (*bi == '$') { + token = STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token = ARRAYVAR; + } + /* the new code filling the name variable directly, will be used in the entire code soon */ + name.token = token; + if (DEBUG) debugtoken(); + return; + } +#endif + + /* other single characters are parsed and stored */ + token = *bi; + bi++; + if (DEBUG) debugtoken(); + return; +} + +/* + Layer 1 - program editor + + Editing the program, the structure of a line is + LINENUMBER linenumber(2 or more bytes) token(n bytes) + + store* stores something to memory + get* retrieves information + + No matter how long number_t is in the C implementation + we pack into bytes, this is clumsy but portable + the store and get commands all operate on here + and advance it + + storetoken() operates on the variable top. + We always append at the end and then sort. + + gettoken() operate on the variable here + which will also be the key variable in run mode. + + tokens are stored including their payload. + + This group of functions changes global states and + cannot be called at program runtime with saving + the relevant global variable to the stack. +*/ + +/* + check if we still have memory left, on RAM only systems we make + sure that we don't hit himem. On systems with EEPROM program storage we make + sure that we stay within the EEPROM range. +*/ +char nomemory(number_t b) { +#ifndef EEPROMMEMINTERFACE + if (top >= himem - b) return 1; else return 0; +#else + if (top >= elength() - eheadersize - b) return 1; else return 0; +#endif +} + +/* store a token - check free memory before changing anything */ +void storetoken() { + int i; + + switch (token) { + case LINENUMBER: + if (nomemory(addrsize + 1)) break; + memwrite2(top++, token); + setaddress(top, memwrite2, ax); + top += addrsize; + return; + case NUMBER: + if (nomemory(numsize + 1)) break; + memwrite2(top++, token); + setnumber(top, memwrite2, x); + top += numsize; + return; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + if (nomemory(sizeof(name_t))) break; + memwrite2(top++, token); + top = setname_pgm(top, &name); + return; + case STRING: + i = sr.length; + if (nomemory(i + 2)) break; + memwrite2(top++, token); + memwrite2(top++, i); + while (i > 0) { + memwrite2(top++, *sr.ir++); + i--; + } + return; + default: + if (token >= -127) { /* the good old code with just one byte token */ + if (nomemory(1)) break; + memwrite2(top++, token); + } else { +#ifdef HASLONGTOKENS + if (nomemory(2)) break; /* this is the two byte token extension */ + memwrite2(top++, TEXT1); + memwrite2(top++, token + 255); +#endif + } + return; + } +} + + +/* + wrappers around mem access in genereal + + memread is used only in the token stream, it reads from a stream + read only. If run is done from eeprom then bytes are taken from this + stream, this would also be the place to implement direct run from + another device like a file system or embedded programs on flash. + Only the token stream uses memread. + + memread2 and memwrite2 always go to ram. They are read/write. Variables and + the program editor uses these functions. + + currently only the SPIRAM and the EEPROM direct edit interface is implemented. + This is handled in the runtime library. + + USEMEMINTERFACE is the macro to control this. + + The POSIX code has a test interface for SPIRAM as a dummy. + +*/ +#ifndef USEMEMINTERFACE +mem_t memread(address_t a) { + if (st != SERUN) { + return mem[a]; + } else { + return eread(a + eheadersize); + } +} + +mem_t memread2(address_t a) { + return mem[a]; +} + +void memwrite2(address_t a, mem_t c) { + mem[a] = c; +} +#else +#if defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR) +mem_t memread(address_t a) { + if (st != SERUN) { + return spiram_robufferread(a); + } else { + return eread(a + eheadersize); + } +} + +mem_t memread2(address_t a) { + return spiram_rwbufferread(a); +} + +void memwrite2(address_t a, mem_t c) { + spiram_rwbufferwrite(a, c); +} +#else +#ifdef EEPROMMEMINTERFACE +mem_t memread(address_t a) { + if (a < elength() - eheadersize) return eread(a + eheadersize); else return mem[a - (elength() - eheadersize)]; +} + +mem_t memread2(address_t a) { + return memread(a); +} + +void memwrite2(address_t a, mem_t c) { + if (a < elength() - eheadersize) eupdate(a + eheadersize, c); else mem[a - (elength() - eheadersize)] = c; +} +#endif +#endif +#endif + + +/* get a token from memory */ +void gettoken() { + stringlength_t i; + + /* if we have reached the end of the program, EOL is always returned + we don't rely on mem having a trailing EOL */ + if (here >= top) { + token = EOL; + return; + } + + /* if we have no data type we are done reading just one byte */ + token = memread(here++); + name.token = token; + + /* if there are multibyte tokens, get the next byte and construct a token value <-127 */ +#ifdef HASLONGTOKENS + if (token == TEXT1) { + token = memread(here++) - 255; + } +#endif + + /* otherwise we check for the argument */ + switch (token) { + case LINENUMBER: + ax = getaddress(here, memread); + here += addrsize; + break; + case NUMBER: + x = getnumber(here, memread); + here += numsize; + break; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + here = getname(here, &name, memread); + name.token = token; + break; + case STRING: + sr.length = (unsigned char)memread(here++); + + /* + if we run from EEPROM, the input buffer is used to get string constants. + if we run on a system with real memory, we produce a mem pointer + otherwise the caller has to handle strings through the address (SPIRAM systems) + */ + if (st == SERUN) { + for (i = 0; i < sr.length; i++) ibuffer[i] = memread(here + i); + sr.ir = ibuffer; + } else { +#ifndef USEMEMINTERFACE + sr.ir = (char*)&mem[here]; +#else + sr.ir = 0; +#endif + } + sr.address = here; + here += sr.length; + } +} + +/* goto the first line of a program */ +void firstline() { + if (top == 0) { + ax = 0; + return; + } + here = 0; + gettoken(); +} + +/* goto the next line, search forward */ +void nextline() { + while (here < top) { + gettoken(); + if (token == LINENUMBER) return; + if (here >= top) { + here = top; + ax = 0; + return; + } + } +} + +/* + the line cache mechanism, useful for large codes. + addlinecache does not test if the line already exist because it + assumes that findline calls it only if a new line is to be stored + the LINECACHE size depends on the architecture. +*/ +#if defined(LINECACHESIZE) && LINECACHESIZE>0 +const unsigned char linecachedepth = LINECACHESIZE; +typedef struct { + address_t l; + address_t h; +} linecacheentry; +linecacheentry linecache[LINECACHESIZE]; +unsigned char linecachehere = 0; + +void clrlinecache() { + unsigned char i; + + for (i = 0; i < linecachedepth; i++) linecache[i].l = linecache[i].h = 0; + linecachehere = 0; +} + +void addlinecache(address_t l, address_t h) { + linecache[linecachehere].l = l; + linecache[linecachehere].h = h; + linecachehere = (linecachehere + 1) % linecachedepth; +} + +address_t findinlinecache(address_t l) { + unsigned char i; + + for (i = 0; i < linecachedepth && linecache[i].l != 0; i++) { + if (linecache[i].l == l) return linecache[i].h; + } + return 0; +} +#else +void clrlinecache() {} +void addlinecache(address_t l, address_t h) {} +address_t findinlinecache(address_t l) { + return 0; +} +#endif + + +/* find a line, look in cache then search from the beginning + x is used as the valid line number once a line is found + hence x must be global + (this is the logic of the gettoken mechanism) +*/ +void findline(address_t l) { + address_t a; + + /* we know it already, here to advance */ + if ((a = findinlinecache(l))) { + here = a; + token = LINENUMBER; + ax = l; + return; + } + + /* we need to search */ + here = 0; + while (here < top) { + gettoken(); + if (token == LINENUMBER && ax == l ) { + /* now that we know we cache */ + addlinecache(l, here); + return; + } + } + error(ELINE); +} + +/* finds the line of a location */ +address_t myline(address_t h) { + address_t l = 0; + address_t l1 = 0; + address_t here2; + + here2 = here; + here = 0; + gettoken(); + while (here < top) { + if (token == LINENUMBER) { + l1 = l; + l = ax; + } + if (here >= h) break; + gettoken(); + } + here = here2; + if (token == LINENUMBER) + return l1; + else + return l; +} + +/* + Move a block of storage beginng at b ending at e + to destination d. No error handling here!! +*/ +void moveblock(address_t b, address_t l, address_t d) { + address_t i; + + if (d + l > himem) { + error(EOUTOFMEMORY); + return; + } + if (l < 1) return; + + if (b < d) for (i = l; i > 0; i--) memwrite2(d + i - 1, memread2(b + i - 1)); + else for (i = 0; i < l; i++) memwrite2(d + i, memread2(b + i)); +} + +/* zero a block of memory */ +void zeroblock(address_t b, address_t l) { + address_t i; + + if (b + l > himem) { + error(EOUTOFMEMORY); + return; + } + if (l < 1) return; + + for (i = 0; i < l + 1; i++) memwrite2(b + i, 0); +} + +/* + Line editor: + + stage 1: no matter what the line number is - store at the top + remember the location in here. + stage 2: see if it is only an empty line - try to delete this line + stage 3: calculate lengthes and free memory and make room at the + appropriate place + stage 4: copy to the right place + + Very fragile code, con't change if you don't have to + + zeroblock statements commented out after EOL code was fixed +*/ +#ifdef DEBUG +/* diagnosis function */ +void diag() { + outsc("top, here, y and x\n"); + outnumber(top); outspc(); + outnumber(here); outspc(); + outcr(); +} +#endif + +void storeline() { + const index_t lnlength = addrsize + 1; + index_t linelength; + number_t newline; + address_t here2, here3; + address_t t1, t2; + address_t y; + + /* the data pointers becomes invalid once the code has been changed */ + clrdata(); + + /* line cache is invalid on line storage */ + clrlinecache(); + + if (DEBUG) { + outsc("storeline "); + outnumber(ax); + outsc(" : "); + outsc(ibuffer); + outcr(); + } + + /* + stage 1: append the line at the end of the memory, + remember the line number on the stack and the old top in here + */ + t1 = ax; + here = top; + newline = here; + token = LINENUMBER; + do { + storetoken(); + if (er != 0 ) { + top = newline; + here = 0; + return; + } + nexttoken(); + } while (token != EOL); + + ax = t1; /* recall the line number */ + linelength = top - here; /* calculate the number of stored bytes */ + + /* + stage 2: check if only a linenumber stored - then delete this line + */ + if (linelength == (lnlength)) { + top -= (lnlength); + findline(ax); + if (er) return; + y = here - lnlength; + nextline(); + here -= lnlength; + if (ax != 0) { + moveblock(here, top - here, y); + top = top - (here - y); + } else { + top = y; + } + return; + } + + /* + stage 3, a nontrivial line with linenumber x is to be stored + try to find it first by walking through all lines + */ + else { + y = ax; + here2 = here; + here = lnlength; + nextline(); + /* there is no nextline after the first line, we are done */ + if (ax == 0) return; + /* go back to the beginning */ + here = 0; + here2 = 0; + while (here < top) { + here3 = here2; + here2 = here; + nextline(); + if (ax > y) break; + } + + /* + at this point y contains the number of the line to be inserted + x contains the number of the first line with a higher line number + or 0 if the line is to be inserted at the end + here points to the following line and here2 points to the previous line + */ + if (ax == 0) { + here = here3 - lnlength; + gettoken(); + if (token == LINENUMBER && ax == y) { // we have a double line at the end + here2 -= lnlength; + here -= lnlength; + moveblock(here2, linelength, here); + top = here + linelength; + } + return; + } + here -= lnlength; + t1 = here; + here = here2 - lnlength; + t2 = here; + gettoken(); + if (ax == y) { /* the line already exists and has to be replaced */ + here2 = t2; /* this is the line we are dealing with */ + here = t1; /* this is the next line */ + y = here - here2; /* the length of the line as it is */ + if (linelength == y) { /* no change in line length */ + moveblock(top - linelength, linelength, here2); + top = top - linelength; + } else if (linelength > y) { /* the new line is longer than the old one */ + moveblock(here, top - here, here + linelength - y); + here = here + linelength - y; + top = top + linelength - y; + moveblock(top - linelength, linelength, here2); + top = top - linelength; + } else { /* the new line is short than the old one */ + moveblock(top - linelength, linelength, here2); + top = top - linelength; + moveblock(here, top - here, here2 + linelength); + top = top - y + linelength; + } + } else { /* the line has to be inserted in between */ + here = t1; + moveblock(here, top - here, here + linelength); + moveblock(top, linelength, here); + } + } +} + +/* + Layer 1 - the code in this section calculates an expression + with a recursive descent algorithm + + all function use the stack to pass values back. We use the + Backus-Naur form of basic from here https://rosettacode.org/wiki/BNF_Grammar + implementing a C style logical expression model +*/ + +/* the terminal symbol it ends a statement list - ELSE is one too as it ends a statement list */ +char termsymbol() { + return (token == LINENUMBER || token == ':' || token == EOL || token == TELSE); +} + +/* a little helpers - one token expect */ +char expect(token_t t, mem_t e) { + nexttoken(); + if (token != t) { + error(e); + return 0; + } else return 1; +} + +/* a little helpers - expression expect */ +char expectexpr() { + nexttoken(); + expression(); + if (er != 0) return 0; else return 1; +} + +/* parses a list of expression, this may be recursive! */ +void parsearguments() { + short argsl; + + /* begin counting */ + argsl = 0; + + /* having 0 args at the end of a command is legal */ + if (!termsymbol()) { + + /* list of expressions separated by commas */ + do { + expression(); + if (er != 0) break; + argsl++; + if (token == ',') nexttoken(); else break; + } while (1); + } + + /* because of the recursion ... */ + args = argsl; +} + + +/* expect exactly n arguments */ +void parsenarguments(char n) { + parsearguments(); + if (args != n) error(EARGS); +} + +/* counts and parses the number of arguments given in brakets, this function + should not advance to the next token because it is called in factor */ +void parsesubscripts() { + blocation_t l; + + args = 0; + + if (DEBUG) { + outsc("** in parsesubscripts "); outcr(); + bdebug("token "); + } + + /* remember where we where */ + pushlocation(&l); + + /* parsesubscripts is called directly after the object in question, it does + nexttoken() itself now */ + nexttoken(); + + /* if we have no bracket here, we return with zero */ + if (token != '(') { + poplocation(&l); + return; + } + nexttoken(); + + /* if () we return also with -1 */ +#ifdef HASMULTIDIM + if (token == ')') { + args = -1; + return; + } +#endif + + /* now we are ready to parse a set of arguments */ + parsearguments(); + if (!USELONGJUMP && er) return; + + if (token != ')') { + error(EARGS); /* we return with ) as a last token on success */ + return; + } + + /* we end with the ) still as active token */ +} + +/* parse a function argument ae is the number of + expected expressions in the argument list, parsesubscripts + should not avance precisely because it is used in factor */ + +void parsefunction(void (*f)(), short ae) { + parsesubscripts(); + if (!USELONGJUMP && er) return; + if (args == ae) f(); else error(EARGS); +} + +/* helper function in the recursive decent parser */ +void parseoperator(void (*f)()) { + mem_t u = 1; + + nexttoken(); + /* unary minuses in front of an operator are consumed once! */ + if (token == '-') { + u = -1; + nexttoken(); + } + /* the operator */ + f(); + if (er != 0 ) return; + y = pop(); + if (u == -1) y = -y; + x = pop(); +} + +/* + ABS absolute value +*/ +void xabs() { + number_t x; + + if ((x = pop()) < 0) { + x = -x; + } + push(x); +} + +/* + SGN evaluates the sign +*/ +void xsgn() { + number_t x; + + x = pop(); + if (x > 0) x = 1; + if (x < 0) x = -1; + push(x); +} + +/* + PEEK on an arduino, negative values of peek address + the EEPROM range -1 .. -1024 on an UNO +*/ +void xpeek() { + number_t a; + + /* get the argument from the stack because this is a function only */ + a = pop(); + + /* the memory and EEPROM range */ + if (a >= 0 && a <= memsize) + push(memread2(a)); + else if (a < 0 && -a <= elength()) + push(eread(-a - 1)); + else { + error(EORANGE); + return; + } +} + +/* + MAP Arduino map function, we always cast to long, this + makes it potable for various integer sizes and the float. +*/ +void xmap() { + long v, in_min, in_max, out_min, out_max; + + out_max = pop(); + out_min = pop(); + in_max = pop(); + in_min = pop(); + v = pop(); + push((v - in_min) * (out_max - out_min) / (in_max - in_min) + out_min); +} + +/* + RND very basic random number generator with constant seed in 16 bit + for float systems, use glibc parameters https://en.wikipedia.org/wiki/Linear_congruential_generator +*/ + +void xrnd() { + number_t r; + mem_t base = randombase; + + /* the argument of the RND() function */ + r = pop(); + + /* this is the microsoft mode, argument <0 resets the sequence, 0 always the same number, > 1 a number between 0 and 1 */ + if (randombase < 0) { + base = 0; + if (r < 0) { + rd = -r; + r = 1; + } else if (r == 0) { + r = 1; + goto pushresult; + } else { + r = 1; + } + } + + /* this is the congruence */ +#ifndef HASFLOAT + /* the original 16 bit congruence, the & is needed to make it work for all kinds of ints */ + rd = (31421 * rd + 6927) & 0xffff; +#else + /* glibc parameters */ + rd = (110351245 * rd + 12345) & 0x7fffffff; +#endif + +pushresult: + + /* the result is calculated with the right modulus */ +#ifndef HASFLOAT + if (r >= 0) + push((unsigned long)rd * r / 0x10000 + base); + else + push((unsigned long)rd * r / 0x10000 + 1 - base); +#else + if (r >= 0) + push(rd * r / 0x80000000 + base); + else + push(rd * r / 0x80000000 + 1 - base); +#endif +} + + +#ifndef HASFLOAT +/* + SQR - a very simple approximate square root formula + for integers, for floats we use the library +*/ +void sqr() { + number_t t, r; + number_t l = 0; + + r = pop(); + t = r; + while (t > 0) { + t >>= 1; + l++; + } + l = l / 2; + t = 1; + t <<= l; + do { + l = t; + t = (t + r / t) / 2; + } while (abs(t - l) > 1); + push(t); +} +#else +void sqr() { + push(sqrt(pop())); +} +#endif + +/* + POW(X, N) evaluates powers +*/ + +/* this function is called by POW(a, c) in BASIC */ +void xpow() { + number_t n; + number_t a; + + n = pop(); + a = pop(); + push(bpow(a, n)); +} + +/* while this is needed by ^*/ +number_t bpow(number_t x, number_t y) { +#ifdef HASFLOAT + return pow(x, y); +#else + number_t r; + address_t i; + + r = 1; + if (y >= 0) for (i = 0; i < y; i++) r *= x; + else r = 0; + return r; +#endif +} + +/* + the reimplementation of parsestringvar, this code uses a lhsobject + to store the data in, which is somehow more natural with the new code. + + The need to handle substring and no substring situations makes thing + complex. + + A plain string has the format A$. + A substringed string has the format A$(i) or A$(i,j). + A string array has the format A$()(i2), A$(i)(i2), A$(i,j)(i2). + In the Microsoft world with substringmode==0 we only have + A$, A$(i2). + + All this is distiguished here. + +*/ + +void parsestringvar(string_t* strp, lhsobject_t* lhs) { +#ifdef HASAPPLE1 + blocation_t l; + address_t temp; + + /* remember the variable name and prep the indices */ + copyname(&lhs->name, &name); + lhs->i = 1; /* we start at 1 */ + lhs->j = arraylimit; /* we assume a string array of length 1, all simple strings are like this */ + lhs->i2 = 0; /* we want the full string length */ + lhs->ps = 1; /* we deal with a pure string */ + + /* remember the location */ + pushlocation(&l); + + /* and inspect the (first) brackets */ + parsesubscripts(); + if (!USELONGJUMP && er) return; + + if (DEBUG) { + outsc("** in parsestringvar "); + outnumber(args); + outsc(" arguments \n"); + } + + /* do we deal with a pure unindexed string or something more complicated */ + if (args == 0) { + /* pure string, we rewind and are done here */ + poplocation(&l); + } else if (!substringmode) { + /* we have no substring interpretation hence the brackets can only be one array index */ + if (args == 1) lhs->j = pop(); else { + error(EORANGE); + return; + } + } else { + /* not a pure string */ + lhs->ps = 0; + /* we are in the substring world here */ + if (args == 2) { + lhs->i2 = popaddress(); /* A$(i,j) */ + args--; + } + if (!USELONGJUMP && er) return; + if (args == 1) { + lhs->i = popaddress(); /* A$(i) */ + } + if (!USELONGJUMP && er) return; + if (args == -1) {} /* A$(), ignore */ + /* here we have parsed a full substring and remember where we are and look forward*/ + pushlocation(&l); + nexttoken(); + if (token == '(') { + /* a second pair of braces is coming, we parse an array index */ + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + if (token != ')') { + error(EUNKNOWN); + return; + } + lhs->j = popaddress(); + if (!USELONGJUMP && er) return; + } else + poplocation(&l); + } + + /* in pure parse mode we end here. This is used for the lefthandside code */ + if (!strp) return; + + /* try to get the string */ + getstring(strp, &lhs->name, lhs->i, lhs->j); + if (!USELONGJUMP && er) return; + + /* look what we do with the upper index */ + if (!lhs->i2) lhs->i2 = strp->length; + + if (DEBUG) { + outsc("** in parsestringvar lower is "); outnumber(lhs->i); outcr(); + outsc("** in parsestringvar upper is "); outnumber(lhs->i2); outcr(); + outsc("** in parsestringvar array_index is "); outnumber(lhs->j); outcr(); + } + + /* find the length */ + if (lhs->i2 - lhs->i + 1 > 0) strp->length = lhs->i2 - lhs->i + 1; else strp->length = 0; + + /* done */ + if (DEBUG) { + outsc("** in parsestringvar, length "); + outnumber(strp->length); + outsc(" from "); outnumber(lhs->i); outspc(); outnumber(lhs->i2); + outcr(); + } + + /* restore the name */ + name = lhs->name; +#else + return; +#endif +} + + +/* + stringvalue(string_t*) evaluates a string value, return 0 if there is no string, + 1 if there is a string. The pointer contains all the data needed to process the string. + + In STR all number bases are allowed now. + +*/ + +char stringvalue(string_t* strp) { + address_t k, l; + address_t i; + token_t t; + mem_t args = 1; + + lhsobject_t lhs; + +#ifdef HASNUMSYSTEM + mem_t base = 10; + number_t n; +#endif + + if (DEBUG) outsc("** entering stringvalue \n"); + + /* make sure everything is nice and clean */ + strp->address = 0; + strp->arraydim = 0; + strp->length = 0; + strp->strdim = 0; + strp->ir = 0; + + switch (token) { + case STRING: + /* sr has the string information from gettoken and nexttoken*/ + strp->ir = sr.ir; + strp->length = sr.length; + strp->address = sr.address; + break; +#ifdef HASAPPLE1 + case STRINGVAR: + parsestringvar(strp, &lhs); + break; + case TSTR: + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { + error(EARGS); + return 0; + } + nexttoken(); + expression(); + if (er != 0) return 0; +#ifdef HASNUMSYSTEM + if (token == ',') { + nexttoken(); + expression(); + if (er != 0) return 0; + base = pop(); + } + n = pop(); +#ifdef HASFLOAT + if (base == 10) { + strp->length = writenumber2(sbuffer, n); + } else { + n = floor(n); + strp->length = writenumbern(sbuffer, n, base); + } +#else + strp->length = writenumbern(sbuffer, n, base); +#endif +#else +#ifdef HASFLOAT + strp->length = writenumber2(sbuffer, pop()); +#else + strp->length = writenumber(sbuffer, pop()); +#endif +#endif + strp->ir = sbuffer; + if (er != 0) return 0; + if (token != ')') { + error(EARGS); + return 0; + } + break; +#ifdef HASMSSTRINGS + case TCHR: + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { + error(EARGS); + return 0; + } + nexttoken(); + expression(); + if (er != 0) return 0; + *sbuffer = pop(); + strp->ir = sbuffer; + strp->length = 1; + if (token != ')') { + error(EARGS); + return 0; + } + break; + case TRIGHT: + case TMID: + case TLEFT: + t = token; + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { + error(EARGS); + return 0; + } + nexttoken(); + if (token != STRINGVAR) { + error(EARGS); + return 0; + } + parsestringvar(strp, &lhs); + if (er != 0) return 0; + k = strp->length; /* the length of the original string variable */ + nexttoken(); + if (token != ',') { + error(EARGS); + return 0; + } + nexttoken(); + expression(); + if (er != 0) return 0; + /* all the rest depends on the function */ + switch (t) { + case TRIGHT: + l = popaddress(); + if (k < l) l = k; + if (strp->address) strp->address = strp->address + (k - l); + if (strp->ir) strp->ir = strp->ir + (k - l); + break; + case TLEFT: + l = popaddress(); + if (k < l) l = k; + break; + case TMID: + if (token == ',') { + nexttoken(); + expression(); + if (er != 0) return 0; + args++; + } + if (args == 1) { + i = popaddress(); + l = 0; + if (i <= k) l = k - i + 1; + } else { + l = popaddress(); + if (er != 0) return 0; + i = popaddress(); + } + if (i == 0) i = 1; + if (i > k) l = 0; + if (k < i + l) l = k - i + 1; + if (l < 0) l = 0; + if (strp->address != 0) strp->address = strp->address + i - 1; + if (strp->ir) strp->ir = strp->ir + i - 1;; + break; + } + strp->length = l; + + if (token != ')') { + error(EARGS); + return 0; + } + break; +#endif +#endif + default: + return 0; + } + return 1; +} + + +/* + (numerical) evaluation of a string expression, used for + comparison and for string rightvalues as numbers + the token rewind here is needed as streval is called in + factor - no factor function should nexttoken +*/ + +void streval() { + token_t t; + address_t k; + string_t s1, s2; + char* ir; + address_t a; + blocation_t l; + + /* is the right side of the expression a string */ + if (!stringvalue(&s1)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + + if (DEBUG) { + outsc("** in streval first string"); + outcr(); + } + + /* get ready for rewind to this location */ + pushlocation(&l); + t = token; + + /* is the next token a operator, hence we need to compare two strings? */ + nexttoken(); + if (token != '=' && token != NOTEQUAL) { + + /* if not, rewind one token and evaluate the string as a boolean */ + poplocation(&l); + token = t; + + /* a zero length string evaluates to zero else to the first character */ + if (s1.length == 0) push(0); else { + if (s1.ir) push(s1.ir[0]); + else if (s1.address) push(memread2(s1.address)); + else error(EGENERAL); + } + + return; + } + + /* remember which operator we use */ + t = token; + + /* questionable !! */ + nexttoken(); + + if (DEBUG) { + outsc("** in streval second string"); outcr(); + debugtoken(); outcr(); + } + + /* get the second string */ + if (!stringvalue(&s2)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + + if (DEBUG) { + outsc("** in streval result: "); + outnumber(x); + outcr(); + } + + /* different length means unequal */ + if (s2.length != s1.length) goto neq; + + /* and a different character somewhere is also unequal */ +#ifdef USEMEMINTERFACE + if (s1.ir && s2.ir) + for (k = 0; k < s1.length; k++) { + if (s1.ir[k] != s2.ir[k]) goto neq; + } + else if (s1.address && s2.address) + for (k = 0; k < s1.length; k++) { + if (memread2(s1.address + k) != memread2(s2.address + k)) goto neq; + } + else { + if (s1.address) { + a = s1.address; + ir = s2.ir; + } else { + a = s2.address; + ir = s1.ir; + } + for (k = 0; k < s1.length; k++) { + if (memread2(a + k) != ir[k] ) goto neq; + } + } +#else + for (k = 0; k < s1.length; k++) if (s1.ir[k] != s2.ir[k]) goto neq; +#endif + + /* which operator did we use */ + if (t == '=') push(booleanmode); else push(0); + return; +neq: + if (t == '=') push(0); else push(booleanmode); + return; +} + + +#ifdef HASFLOAT +/* + floating point arithmetic + SIN, COS, TAN, ATAN, LOG, EXP, INT + INT is always there and is nop in integer BASICs + no handling of floating point errors yet. +*/ +void xsin() { + push(sin(pop())); +} +void xcos() { + push(cos(pop())); +} +void xtan() { + push(tan(pop())); +} +void xatan() { + push(atan(pop())); +} +void xlog() { + push(log(pop())); +} +void xexp() { + push(exp(pop())); +} +void xint() { + push(floor(pop())); +} +#else +void xint() {} +#endif + +/* this function does a bitwise compare. It checks if one bit is 1 or 0 and returns + the right BASIC boolean value */ +void xbit() { + int a, b; + + /* this is slightly unclean as we do no error detection on the range */ + b = (int)pop(); + a = (int)pop(); + + /* pushing booleanmode makes sure we have the right kind of true (1 or -1) */ + if (a & (1 << b)) push(booleanmode); else push(0); +} + +/* + Recursive expression parser functions + + factor(); term(); addexpression(); compexpression(); + notexpression(); andexpression(); expression() + + doing + + functions, numbers; *, /, %; +, -; =, <>, =>, <=; + NOT; AND; OR + +*/ + +/* + factor() - contrary to all other function + nothing here should end with a new token - this is handled + in factors calling function + + evaluates constants, variables and all functions +*/ + +/* helpers of factor - array access */ +void factorarray() { + lhsobject_t object; + number_t v; + + /* remember the variable, because parsesubscript changes this */ + copyname(&object.name, &name); + + /* parse the arguments */ + parsesubscripts(); + if (er != 0 ) return; + + switch (args) { + case 1: + object.i = popaddress(); + if (!USELONGJUMP && er) return; + object.j = arraylimit; + break; +#ifdef HASMULTIDIM + case 2: + object.j = popaddress(); + object.i = popaddress(); + if (!USELONGJUMP && er) return; + break; +#endif + default: + error(EARGS); + return; + } + array(&object, 'g', &v); + push(v); +} + +/* helpers of factor - string length */ +void factorlen() { +#ifdef HASAPPLE1 + address_t a; + string_t s; + name_t n; + lhsobject_t lhs; + + nexttoken(); + if ( token != '(') { + error(EARGS); + return; + } + + nexttoken(); + switch (token) { + case STRING: + push(sr.length); + nexttoken(); + break; + case STRINGVAR: + parsestringvar(&s, &lhs); + push(s.length); + nexttoken(); + break; +#ifdef HASMSSTRINGS + case TRIGHT: + case TLEFT: + case TMID: + case TCHR: +#endif + case TSTR: + error(EARGS); + return; + default: + expression(); + if (!USELONGJUMP && er) return; + n.token = TBUFFER; + a = pop(); + n.c[0] = a % 256; + n.c[1] = a / 256; + push(blength(&n)); + } + + if (!USELONGJUMP && er) return; + + if (token != ')') { + error(EARGS); + return; + } +#else + push(0); +#endif +} + +/* helpers of factor - the VAL command */ +void factorval() { + index_t y; + number_t x; + string_t s; + address_t a; + char *ir; + +#define DEBUG 0 + + mem_t numsys = 0; + + + nexttoken(); + if (token != '(') { + error(EARGS); + return; + } + + nexttoken(); + if (!stringvalue(&s)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + + /* the length of the strings consumed */ + vlength = 0; + + /* get the string if it is in serial memory */ +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + + /* generate a 0 terminated string for use with parsenumber */ + stringtobuffer(sbuffer, &s); + ir = sbuffer; + + if (DEBUG) { + outsc("factorval: "); + outsc(ir); + outcr(); + } + + /* remove whitespaces */ + while (*ir == ' ' || *ir == '\t') { + ir++; + vlength++; + } + + /* find a sign */ + if (*ir == '-') { + y = -1; + ir++; + vlength++; + } else y = 1; + + /* see if we scan integer hex, octal or bin constants, the real scanning is done in parsenumbern */ +#ifdef HASNUMSYSTEM + if (*ir == '0' && ( *(ir + 1) == 'x' || *(ir + 1) == 'X' || *(ir + 1) == 'b' || *(ir + 1) == 'B' \ + || *(ir + 1) == 'o' || *(ir + 1) == 'O' )) { + numsys = 1; + } +#endif + + if (DEBUG) { + outsc("factorval: "); + outsc(ir); + outsc(" "); + outnumber(y); + outsc(" "); + outnumber(numsys); + outcr(); + } +#define DEBUG 0 + + x = 0; +#ifdef HASFLOAT +#ifdef HASNUMSYSTEM + if (numsys) { + if ((a = parsenumbern(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; + } else { + if ((a = parsenumber2(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; + } +#else + if ((a = parsenumber2(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; +#endif +#else +#ifdef HASNUMSYSTEM + if (numsys) { + if ((a = parsenumbern(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; + } else { + if ((a = parsenumber(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; + } +#else + if ((a = parsenumber(ir, &x)) > 0) { + vlength += a; + ert = 0; + } else { + vlength = 0; + ert = 1; + }; +#endif +#endif + push(x * y); + + nexttoken(); + if (token != ')') { + error(EARGS); + return; + } +} + +/* helpers of factor - the INSTR command */ +#ifndef HASFULLINSTR +/* this is instring in a single character version, usefull to split strings */ +void factorinstr() { + char ch; + address_t a; + string_t s; + + nexttoken(); + if (token != '(') { + error(EARGS); + return; + } + + nexttoken(); + if (!stringvalue(&s)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + nexttoken(); + + if (token != ',') { + error(EARGS); + return; + } + + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + ch = pop(); + if (s.address) { + for (a = 1; a <= s.length; a++) { + if (memread2(s.address + a - 1) == ch) break; + } + } else { + for (a = 1; a <= s.length; a++) { + if (s.ir[a - 1] == ch) break; + } + } + if (a > s.length) a = 0; + push(a); + //nexttoken(); + if (token != ')') { + error(EARGS); + return; + } +} +#else +/* the full instr command which can compare two strings */ +void factorinstr() { + char ch; + address_t a = 1; + address_t i = 1; + string_t search; + string_t s; + + nexttoken(); + if (token != '(') { + error(EARGS); + return; + } + nexttoken(); + + /* the search string */ + if (!stringvalue(&s)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + nexttoken(); + + if (token != ',') { + error(EARGS); + return; + } + nexttoken(); + + /* the string to be searched */ + if (!stringvalue(&search)) { + error(EUNKNOWN); + return; + } + if (!USELONGJUMP && er) return; + nexttoken(); + + /* potentially the start value */ + if (token == ',') { + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + a = popaddress(); + if (!USELONGJUMP && er) return; + } + + if (token != ')') { + error(EUNKNOWN); + return; + } + + /* health check */ + if (search.length == 0 || search.length + a > s.length || a == 0) { + push(0); + return; + } + + /* go through the search string */ + while (i <= search.length) { + + /* get one character from the string */ + if (search.address) { + ch = memread2(search.address + i - 1); + } else { + ch = search.ir[i - 1]; + } + + /* search the character */ + if (s.address) { + for (; a <= s.length; a++) { + if (memread2(s.address + a - 1) == ch) break; + } + } else { + for (; a <= s.length; a++) { + if ( s.ir[a - 1] == ch ) break; + } + } + + /* we haven't found the character until the end of the string */ + if (a > s.length) { + a = 0; + break; + } + + /* next character */ + i += 1; + + } + + /* how did the search go? a rewind because we were at the end of the search part already */ + if (i <= search.length) { + a = 0; + } else { + a = a - search.length + 1; + } + + + push(a); +} +#endif + +/* helpers of factor - the NETSTAT command */ +void factornetstat() { + address_t x = 0; + + if (netconnected()) x = 1; + if (mqttstate() == 0) x += 2; + push(x); +} + +/* helpers of factor - the ASC command, really not needed but for completeness */ +void factorasc() { +#ifdef HASAPPLE1 + string_t s; + lhsobject_t lhs; + + nexttoken(); + if ( token != '(') { + error(EARGS); + return; + } + + nexttoken(); + switch (token) { + case STRING: + if (sr.ir) push(sr.ir[0]); else push(memread2(sr.address)); + nexttoken(); + break; + case STRINGVAR: + parsestringvar(&s, &lhs); + if (s.length > 0) { + if (s.ir) push(s.ir[0]); else push(memread2(s.address)); + } else + push(0); + nexttoken(); + break; + default: + error(EARGS); + return; + } + + if (!USELONGJUMP && er) return; + + if (token != ')') { + error(EARGS); + return; + } +#else + push(0); +#endif +} + +void factor() { + if (DEBUG) bdebug("factor\n"); + switch (token) { + case NUMBER: + push(x); + break; + case VARIABLE: + push(getvar(&name)); + break; + case ARRAYVAR: + factorarray(); + break; + case '(': + nexttoken(); + expression(); + if (er != 0 ) return; + if (token != ')') { + error(EARGS); + return; + } + break; + /* Palo Alto BASIC functions */ + case TABS: + parsefunction(xabs, 1); + break; + case TRND: + parsefunction(xrnd, 1); + break; + case TSIZE: + push(himem - top); + break; + /* Apple 1 BASIC functions */ +#ifdef HASAPPLE1 + case TSGN: + parsefunction(xsgn, 1); + break; + case TPEEK: + parsefunction(xpeek, 1); + break; + case TLEN: + factorlen(); + break; +#ifdef HASIOT + case TAVAIL: + parsefunction(xavail, 1); + break; + case TOPEN: + parsefunction(xfopen, 1); + break; + case TSENSOR: + parsefunction(xfsensor, 2); + break; + case TVAL: + factorval(); + break; + case TINSTR: + factorinstr(); + break; + case TWIRE: + parsefunction(xfwire, 1); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + push(erh); + break; +#endif + case THIMEM: + push(himem); + break; + /* Apple 1 string compare code */ + case STRING: + case STRINGVAR: +#ifdef HASIOT + case TSTR: +#endif +#ifdef HASMSSTRINGS + case TLEFT: + case TRIGHT: + case TMID: + case TCHR: +#endif + streval(); + if (er != 0 ) return; + break; +#endif + /* Stefan's tinybasic additions */ +#ifdef HASSTEFANSEXT + case TSQR: + parsefunction(sqr, 1); + break; + case TMAP: + parsefunction(xmap, 5); + break; + case TPOW: + parsefunction(xpow, 2); + break; +#endif +#ifdef HASUSRCALL + case TUSR: + parsefunction(xusr, 2); + break; +#endif + /* Arduino I/O */ +#ifdef HASARDUINOIO + case TAREAD: + parsefunction(xaread, 1); + break; + case TDREAD: + parsefunction(xdread, 1); + break; + case TMILLIS: + parsefunction(bmillis, 1); + break; +#ifdef HASPULSE + case TPULSE: + parsefunction(bpulsein, 3); + break; +#endif + case TAZERO: +#if defined(ARDUINO) && defined(A0) + push(A0); +#else + push(0); +#endif + break; + case TLED: +#ifdef LED_BUILTIN + push(LED_BUILTIN); +#else + push(0); +#endif + break; +#endif + /* mathematical functions in case we have float */ +#ifdef HASFLOAT + case TSIN: + parsefunction(xsin, 1); + break; + case TCOS: + parsefunction(xcos, 1); + break; + case TTAN: + parsefunction(xtan, 1); + break; + case TATAN: + parsefunction(xatan, 1); + break; + case TLOG: + parsefunction(xlog, 1); + break; + case TEXP: + parsefunction(xexp, 1); + break; +#endif + /* int is always present to make programs compatible */ + case TINT: + parsefunction(xint, 1); + break; +#ifdef HASDARTMOUTH + case TFN: + xfn(0); + break; + /* an arcane feature, DATA evaluates to the data record number */ + case TDATA: + push(datarc); + break; +#endif +#ifdef HASDARKARTS + case TMALLOC: + parsefunction(xmalloc, 2); + break; + case TFIND: + xfind(); + break; +#endif +#ifdef HASIOT + case TNETSTAT: + factornetstat(); + break; +#endif +#ifdef HASMSSTRINGS + case TASC: + factorasc(); + break; +#endif + case TBIT: + parsefunction(xbit, 2); + break; + /* unknown function */ + default: + error(EUNKNOWN); + return; + } +} + +/* this is how the power operator ^ is handled */ +#ifdef POWERRIGHTTOLEFT +/* the recursive version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (!USELONGJUMP && er) return; + + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^') { + parseoperator(power); + if (!USELONGJUMP && er) return; + push(bpow(x, y)); + } + if (DEBUG) bdebug("leaving power\n"); +} +#else +/* the left associative version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (!USELONGJUMP && er) return; + +nextpower: + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^') { + parseoperator(factor); + push(bpow(x, y)); + goto nextpower; + } + if (DEBUG) bdebug("leaving power\n"); +} +#endif + +/* + * term() evaluates powers, multiplication, division and mod. + * There are two versions, one with a power operator ^ and one without. + */ +#ifdef HASPOWER +void term() { + if (DEBUG) bdebug("term\n"); + power(); + if (!USELONGJUMP && er) return; + +nextfactor: + if (DEBUG) bdebug("in term\n"); + if (token == '*') { + parseoperator(power); + if (!USELONGJUMP && er) return; + push(x * y); + goto nextfactor; + } else if (token == '/') { + parseoperator(power); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x / y); +#else + if (forceint) push((int)x / (int)y); else push(x / y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == '%') { + parseoperator(power); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x % y); +#else + push((int)x % (int)y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == TSHL) { + parseoperator(power); + if (!USELONGJUMP && er) return; + push((int)x << (int)y); + goto nextfactor; + } else if (token == TSHR) { + parseoperator(power); + if (!USELONGJUMP && er) return; + push((int)x >> (int)y); + goto nextfactor; + } + if (DEBUG) bdebug("leaving term\n"); +} +#else +void term() { + if (DEBUG) bdebug("term\n"); + factor(); + if (!USELONGJUMP && er) return; + +nextfactor: + nexttoken(); + if (DEBUG) bdebug("in term\n"); + if (token == '*') { + parseoperator(factor); + if (!USELONGJUMP && er) return; + push(x * y); + goto nextfactor; + } else if (token == '/') { + parseoperator(factor); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x / y); +#else + if (forceint) push((int)x / (int)y); else push(x / y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == '%') { + parseoperator(factor); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x % y); +#else + push((int)x % (int)y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == TSHL) { + parseoperator(factor); + if (!USELONGJUMP && er) return; + push((int)x << (int)y); + goto nextfactor; + } else if (token == TSHR) { + parseoperator(factor); + if (!USELONGJUMP && er) return; + push((int)x >> (int)y); + goto nextfactor; + } + if (DEBUG) bdebug("leaving term\n"); +} + + + +#endif + +/* add and subtract */ +void addexpression() { + if (DEBUG) bdebug("addexp\n"); + if (token != '+' && token != '-') { + term(); + if (!USELONGJUMP && er) return; + } else { + push(0); + } + +nextterm: + if (token == '+' ) { + parseoperator(term); + if (!USELONGJUMP && er) return; + push(x + y); + goto nextterm; + } else if (token == '-') { + parseoperator(term); + if (!USELONGJUMP && er) return; + push(x - y); + goto nextterm; + } +} + +/* comparisions */ +void compexpression() { + if (DEBUG) bdebug("compexp\n"); + addexpression(); + if (!USELONGJUMP && er) return; + switch (token) { + case '=': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; +#ifndef HASFLOAT + push(x == y ? booleanmode : 0); +#else + if (fabs(x - y) <= epsilon) push(booleanmode); else push(0); +#endif + break; + case NOTEQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; +#ifndef HASFLOAT + push(x != y ? booleanmode : 0); +#else + if (fabs(x - y) > epsilon) push(booleanmode); else push(0); +#endif + break; + case '>': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x > y ? booleanmode : 0); + break; + case '<': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x < y ? booleanmode : 0); + break; + case LESSEREQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x <= y ? booleanmode : 0); + break; + case GREATEREQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x >= y ? booleanmode : 0); + break; + } +} + +#ifdef HASAPPLE1 +/* boolean NOT */ +void notexpression() { + if (DEBUG) bdebug("notexp\n"); + if (token == TNOT) { + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + if (booleanmode == -1) push(~(short)pop()); + else if (pop() == 0) push(1); else push(0); + } else + compexpression(); +} + +/* boolean AND and at the same time bitwise */ +void andexpression() { + if (DEBUG) bdebug("andexp\n"); + notexpression(); + if (!USELONGJUMP && er) return; + if (token == TAND) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x & (short)y); + } +} + +/* expression function and boolean OR at the same time bitwise !*/ +void expression() { + if (DEBUG) bdebug("exp\n"); + andexpression(); + if (!USELONGJUMP && er) return; + if (token == TOR) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x | (short)y); + } +} +#else + +/* expression function simplified */ +void expression() { + if (DEBUG) bdebug("exp\n"); + compexpression(); + if (!USELONGJUMP && er) return; + if (token == TOR) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x | (short)y); + } +} +#endif + +/* + Layer 2 - The commands and their helpers + + Palo Alto BASIC languge set - PRINT, LET, INPUT, GOTO, GOSUB, RETURN, + IF, FOR, TO, NEXT, STEP, BREAK, STOP, END, LIST, NEW, RUN, REM + BREAK is not Palo ALto but fits here, eEND is identical to STOP. +*/ + +/* + PRINT command, extended by many features like file, wire, mqtt and radio i/o. + TAB added as part of the PRINT statement with C64 compatibility. +*/ +void xprint() { + char semicolon = 0; + char oldod; + char modifier = 0; + string_t s; + stringlength_t i; + + form = 0; + oldod = od; + nexttoken(); + +processsymbol: + /* at the end of a print statement, do we need a newline, restore the defaults */ + if (termsymbol()) { + if (!semicolon) outcr(); + od = oldod; + form = 0; + return; + } + semicolon = 0; + + /* output a string if we found it */ + if (stringvalue(&s)) { + if (!USELONGJUMP && er) return; + + /* buffer must be used here for machine code to work */ +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(s.ir, s.length); + + nexttoken(); + goto separators; + } + + /* the tab command as part of print */ +#ifdef HASMSSTRINGS + if (token == TTAB || token == TSPC) { + xtab(); + goto separators; + } +#endif + + /* modifiers of the print statement */ + if (token == '#' || token == '&') { + modifier = token; + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + switch (modifier) { + case '#': + form = pop(); + break; + case '&': + od = pop(); + break; + } + goto separators; + } + + if (token != ',' && token != ';') { + expression(); + if (!USELONGJUMP && er) return; + outnumber(pop()); + } + + /* commas and semicolons, all other symbols are accepted and no error is thrown */ +separators: + if (termsymbol()) goto processsymbol; + + switch (token) { + case ',': + if (!modifier) outspc(); + case ';': + semicolon = 1; + nexttoken(); + break; + } + modifier = 0; + + goto processsymbol; +} + +/* + LET assigment code for various lefthand and righthand side. + + + lefthandside is a helper function for reuse in other + commands. It determines the address the value is to be + assigned to and whether the assignment target is a + "pure" i.e. subscriptless string expression + + assignnumber assigns a number to a given lefthandside + + In lefthandside the type of the object is determined and + possible subscripts are parsed. + + Variables have no subscripts. The arguments are unchanged. + Arrays may have two subscript which will go to i, j + Strings may have a string subscript, going to i and an array subscript + going to j + String arrays use i2 as the array index. + Note that the role of the variables differs for string array and normal + arrays. + Strings without a subscript i.e. pure strings, set the ps flag + +*/ + +/* the new lefthandsite code */ +void lefthandside(lhsobject_t* lhs) { + + /* just to provide it for parsestringvar to reuse the righthandside code */ + address_t temp; + + if (DEBUG) { + outsc("assigning to variable "); + outname(&lhs->name); outspc(); + outsc(" type "); outnumber(lhs->name.token); + outcr(); + } + + /* prep it */ + lhs->i = 1; + lhs->i2 = 0; + lhs->j = arraylimit; + lhs->ps = 1; + + /* look at the variables and continue parsing */ + switch (lhs->name.token) { + case VARIABLE: + nexttoken(); + break; + case ARRAYVAR: + parsesubscripts(); + if (!USELONGJUMP && er) return; + switch (args) { + case 1: + lhs->i = popaddress(); + if (!USELONGJUMP && er) return; + lhs->j = arraylimit; + break; + case 2: + lhs->j = popaddress(); + if (!USELONGJUMP && er) return; + lhs->i = popaddress(); + if (!USELONGJUMP && er) return; + break; + default: + error(EARGS); + return; + } + nexttoken(); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + parsestringvar(0, lhs); + nexttoken(); + break; +#else /* HASAPPLE1 */ + /* here we could implement a string thing for a true Tinybasic */ +#endif + default: + error(EUNKNOWN); + return; + } + + if (DEBUG) { + outsc("** in assignment lefthandside with (i,j,ps,i2) "); + outnumber(lhs->i); outspc(); + outnumber(lhs->j); outspc(); + outnumber(lhs->ps); outspc(); + outnumber(lhs->i2); outcr(); + outsc(" token is "); outputtoken(); + outsc(" at "); outnumber(here); outcr(); + } +} + +/* assign a number to a left hand side we have parsed */ +void assignnumber2(lhsobject_t* lhs, number_t x) { + string_t sr; + + /* depending on the variable type, assign the value */ + switch (lhs->name.token) { + case VARIABLE: + setvar(&lhs->name, x); + break; + case ARRAYVAR: + array(lhs, 's', &x); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + + /* find the string variable */ + getstring(&sr, &lhs->name, lhs->i, lhs->j); + if (!USELONGJUMP && er) return; + + /* the first character of the string is set to the number */ + if (sr.ir) sr.ir[0] = x; else if (sr.address) memwrite2(ax, x); else error(EUNKNOWN); + + /* set the length */ + if (lhs->ps) + setstringlength(&lhs->name, 1, lhs->j); + else if (sr.length < lhs->i && lhs->i <= sr.strdim) + setstringlength(&lhs->name, lhs->i, lhs->j); + break; +#endif + } +} + +/* + LET - the core assigment function, this is different from other BASICs +*/ +void assignment() { + address_t newlength, copybytes; + mem_t s; + index_t k; + char tmpchar; /* for number conversion only */ + string_t sr, sl; /* the right and left hand side strings */ + + /* the lefthandside identifier */ + lhsobject_t lhs; + + /* this code evaluates the left hand side, we remember the object information first */ + copyname(&lhs.name, &name); + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + + /* the assignment part */ + if (token != '=') { + error(EUNKNOWN); + return; + } + nexttoken(); + + /* here comes the code for the right hand side, the evaluation depends on the left hand side type */ + switch (lhs.name.token) { + /* the lefthandside is a scalar, evaluate the righthandside as a number, even if it is a string */ + case VARIABLE: + case ARRAYVAR: + expression(); + if (!USELONGJUMP && er) return; + assignnumber2(&lhs, pop()); + break; +#ifdef HASAPPLE1 + /* the lefthandside is a string variable, try evaluate the righthandside as a stringvalue */ + case STRINGVAR: +nextstring: + + /* do we deal with a string as righthand side */ + s = stringvalue(&sr); + if (!USELONGJUMP && er) return; + + /* and then as an expression if it is no string, any number appearing in a string expression terminates the addition loop */ + if (!s) { + expression(); + if (!USELONGJUMP && er) return; + tmpchar = pop(); + sr.length = 1; + sr.ir = &tmpchar; + } else + nexttoken(); /* we do this here because expression also advances, this way we avoid double advance */ + + if (DEBUG) { + outsc("* assigment stringcode at "); + outnumber(here); + outcr(); + } + + /* at this point we have a stringvalue with ir2 pointing to the payload and the stack the length + this is either coming from stringvalue or from the expression code */ + + /* we now process the source string */ + + /* getstring of the destination */ + getstring(&sl, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + + /* this debug messes up sbuffer hence all functions that use it in stringvalue produce wrong results */ + if (DEBUG) { + outsc("* assigment stringcode "); outname(&lhs.name); outcr(); + outsc("** assignment source string length "); outnumber(sr.length); outcr(); + outsc("** assignment dest string length "); outnumber(sl.length); outcr(); + outsc("** assignment dest string dimension "); outnumber(sl.strdim); outcr(); + } + + /* does the source string fit into the destination if we have no destination second index*/ + if ((lhs.i2 == 0) && ((lhs.i + sr.length - 1) > sl.strdim)) { + error(EORANGE); + return; + }; + + /* if we have a second index, is it in range */ + if ((lhs.i2 != 0) && lhs.i2 > sl.strdim) { + error(EORANGE); + return; + }; + + /* calculate the number of bytes we truely want to copy */ + if (lhs.i2 > 0) copybytes = ((lhs.i2 - lhs.i + 1) > sr.length) ? sr.length : (lhs.i2 - lhs.i + 1); + else copybytes = sr.length; + + if (DEBUG) { + outsc("** assignment copybytes "); + outnumber(copybytes); + outcr(); + } + + /* now do the heavy lifting in a seperate function to encasulate buffering */ + assignstring(&sl, &sr, copybytes); + + /* + classical Apple 1 behaviour is string truncation in substring logic, with + two index destination string we follow another route. We extend the string + for the number of copied bytes + */ + if (lhs.i2 == 0) { + newlength = lhs.i + sr.length - 1; + } else { + if (lhs.i + copybytes > sl.length) newlength = lhs.i + copybytes - 1; + else newlength = sl.length; + } + + setstringlength(&lhs.name, newlength, lhs.j); + /* + we have processed one string and copied it fully to the destination + see if there is more to come. For inplace strings this is odd because + one term can change during adding (A$ = B$ + A$). + */ +addstring: + if (token == '+') { + lhs.i = lhs.i + copybytes; + nexttoken(); + goto nextstring; + } + break; /* case STRINGVAR */ +#endif /* HASAPPLE1 */ + } /* switch */ +} + + +/* + Try to copy one string to the other, assumes that getstring did its work + and that copybyte is correct. + BASICs in place strings make this a non trivial exercise as we need to + avoid overwrites. + Another complication is the mixed situation of BASIC memory strings + and C memory strings. +*/ +void assignstring(string_t* sl, string_t* sr, stringlength_t copybytes) { + stringlength_t k; + + /* if we have a memory model that needs the mem interface, go through the addresses by default + else use just the pointers */ + +#ifdef USEMEMINTERFACE + /* for a regular string variable as left hand side we know the address */ + if (sl->address) { + + /* for a regular string variable as a source we need to take care of order */ + + if (sr->address) { + if (sr->address > sl->address) + for (k = 0; k < copybytes; k++) memwrite2(sl->address + k, memread2(sr->address + k)); + else + for (k = 1; k <= copybytes; k++) memwrite2(sl->address + copybytes - k, memread2(sr->address + copybytes - k)); + } else { + + /* if the right hand side is a special string or a constant things are much simpler */ + + for (k = 0; k < copybytes; k++) memwrite2(sl->address + k, sr->ir[k]); + + } + } else { + + /* non regular string variables like @U$ and @T$ are never assignable */ + error(EUNKNOWN); + } +#else + + /* we just go through the C memory here */ + + if (sr->ir && sl->ir) { + if (sr->ir > sl->ir) + for (k = 0; k < copybytes; k++) sl->ir[k] = sr->ir[k]; + else + for (k = 1; k <= copybytes; k++) sl->ir[copybytes - k] = sr->ir[copybytes - k]; + } else { + error(EUNKNOWN); + } + +#endif +} + +/* + INPUT ["string",] variable [,["string",] variable] + + The original version of input only processes simple variables one at a time + and does not support arrays. The code is redudant to assignment and read. + It also does not support comma separated lists of values to be input. +*/ +void showprompt() { + outsc("? "); +} + +/* + Reimplementation of input using the same pattern as read and print . +*/ +void xinput() { + + mem_t oldid = id; /* remember the stream on modify */ + mem_t prompt = 1; /* determine if we show the prompt */ + number_t xv; /* for number conversion with innumber */ + + /* the identifier of the lefthandside */ + lhsobject_t lhs; + + address_t maxlen, newlength; /* the maximum length of the string to be read */ + int k = 0; /* the result of the number conversion */ + string_t s; + char* buffer; /* the buffer we use for input */ + address_t bufsize; /* the size of the buffer */ + + /* depending on the RUN state we use either the input buffer or the string buffer */ + /* this ways we can process long inputs in RUN and don't need a lot of memory */ + if (st == SRUN || st == SERUN) { + buffer = ibuffer; + bufsize = BUFSIZE; + } else { + buffer = sbuffer; + bufsize = SBUFSIZE; + } + + /* get the next token and check what we are dealing with */ + nexttoken(); + + /* modifiers of the input statement (stream) */ + if (token == '&') { + if (!expectexpr()) return; + oldid = id; + id = pop(); + if (id != ISERIAL || id != IKEYBOARD) prompt = 0; + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + + /* unlike print, form can appear only once in input after the + stream, it controls character counts in wire */ + if (token == '#') { + if (!expectexpr()) return; + form = pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + + /* we have a string to be printed to prompt the user */ +nextstring: + if (token == STRING && id != IFILE) { + prompt = 0; +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(sr.ir, sr.length); + nexttoken(); + } + + /* now we check for a variable and parse it */ +nextvariable: + if (token == VARIABLE || token == ARRAYVAR || token == STRINGVAR) { + + /* check for a valid lefthandside expression */ + copyname(&lhs.name, &name); + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + + /* which data type do we input */ + switch (lhs.name.token) { + case VARIABLE: + case ARRAYVAR: +again: + /* if we have no buffer or are at the end, read it and set cursor k to the beginning */ + if (k == 0 || (address_t) buffer[0] < k) { + if (prompt) showprompt(); + (void) ins(buffer, bufsize); + k = 1; + } + + /* read a number from the buffer and return it, advance the cursor k */ + k = innumber(&xv, buffer, k); + + /* if we break, end it here */ + if (k == -1) { + st = SINT; + token = EOL; + goto resetinput; + } + + /* if we have no valid number, ask again */ + if (k == 0) { + if (id == ISERIAL || id == IKEYBOARD) { + printmessage(ENUMBER); + outspc(); + printmessage(EGENERAL); + outcr(); + xv = 0; + k = 0; + goto again; + } else { + ert = 1; + xv = 0; + goto resetinput; + } + } + + /* now assign the number */ + assignnumber2(&lhs, xv); + + /* look if there is a comma coming in the buffer and keep it */ + while (k < (address_t) buffer[0] && buffer[k] != 0) { + if (buffer[k] == ',') { + k++; + break; + } + k++; + } + break; +#ifdef HASAPPLE1 + case STRINGVAR: + /* the destination address of the lefthandside, on the fly create included */ + getstring(&s, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + + /* the length of the lefthandside string */ + if (lhs.i2 == 0) { + maxlen = s.strdim - lhs.i + 1; + } else { + maxlen = lhs.i2 - lhs.i + 1; + if (maxlen > s.strdim) maxlen = s.strdim - lhs.i + 1; + } + + /* the number of bytes we want to read the form parameter in WIRE can be used + to set the expected number of bytes */ + if (form != 0 && form < maxlen) maxlen = form; + + /* what is going on */ + if (DEBUG) { + outsc("** input stringcode at "); outnumber(here); outcr(); + outsc("** input stringcode "); outname(&lhs.name); outcr(); + outsc("** input stringcode maximum length "); outnumber(maxlen); outcr(); + } + + /* now read the string inplace */ + if (prompt) showprompt(); +#ifndef USEMEMINTERFACE + newlength = ins(s.ir - 1, maxlen); +#else + newlength = ins(spistrbuf1, maxlen); + + /* if we have a string variable, we need to copy the buffer to the string */ + if (newlength > 0) { + if (s.ir) { + for (k = 0; k < newlength; k++) s.ir[k] = spistrbuf1[k + 1]; + } else { + for (k = 0; k < newlength; k++) memwrite2(s.address + k, spistrbuf1[k + 1]); + } + } +#endif + + /* if we have a string variable, we need to copy the buffer to the string */ + + + /* set the right string length */ + /* classical Apple 1 behaviour is string truncation in substring logic */ + newlength = lhs.i + newlength - 1; + setstringlength(&lhs.name, newlength, lhs.j); + break; +#endif + } + } + + /* seperators and termsymbols */ + if (token == ',' || token == ';') { + nexttoken(); + goto nextstring; + } + + /* no further data */ + if (!termsymbol()) { + error(EUNKNOWN); + } + +resetinput: + id = oldid; + form = 0; +} + +/* + GOTO, GOSUB, RETURN and their helpers + + GOTO and GOSUB function for a simple one statement goto +*/ +void xgoto() { + token_t t = token; + number_t x; + + if (!expectexpr()) return; + if (t == TGOSUB) pushgosubstack(0); + if (!USELONGJUMP && er) return; + + x = pop(); + + if (DEBUG) { + outsc("** goto/gosub evaluated line number "); + outnumber(x); + outcr(); + } + findline((address_t) x); + if (!USELONGJUMP && er) return; + if (DEBUG) { + outsc("** goto/gosub branches to "); + outnumber(here); + outcr(); + } + + /* goto in interactive mode switched to RUN mode + no clearing of variables and stacks */ + if (st == SINT) st = SRUN; +} + +/* + RETURN retrieves here from the gosub stack +*/ +void xreturn() { + popgosubstack(); + if (DEBUG) { + outsc("** restored location "); + outnumber(here); + outcr(); + } + if (!USELONGJUMP && er) return; + nexttoken(); +#ifdef HASEVENTS + /* we return from an interrupt and reenable them */ + if (gosubarg[gosubsp] == TEVENT) events_enabled = 1; +#endif +} + +/* + IF statement together with THEN +*/ +void xif() { + mem_t nl = 0; + + if (!expectexpr()) return; + x = pop(); + if (DEBUG) { + outsc("** in if, condition "); + outnumber(x); + outcr(); + } + + /* if can have a new line after the expression in this BASIC */ + if (token == LINENUMBER) nexttoken(); + + /* we only check false which is 0 */ + if (x == 0) { +#ifndef HASSTRUCT + /* on condition false skip the entire line and all : until a potential ELSE */ + while (token != LINENUMBER && token != EOL && token != TELSE) nexttoken(); +#else + /* in the structured language set, we need to look for a DO close to the IF and skip it*/ + /* a THEN or not and then a line number expects a block */ + if (token == TTHEN) nexttoken(); + if (token == LINENUMBER) { + nexttoken(); + nl = 1; + } + + /* skip the block */ + if (token == TDO) { + nexttoken(); + findbraket(TDO, TDEND); + nexttoken(); + goto processelse; + } + + /* skip the line */ + if (!nl) while (token != LINENUMBER && token != EOL && token != TELSE) nexttoken(); + +processelse: +#endif + + /* if we have ELSE at this point we want to execute this part of the line as the condition + was false, isolated ELSE is GOTO, otherwise just execute the code */ + +#ifdef HASSTEFANSEXT + /* look if ELSE is at the next line */ + if (token == LINENUMBER) nexttoken(); + + /* now process ELSE */ + if (token == TELSE) { + nexttoken(); + if (token == NUMBER) { + findline((address_t) x); + return; + } + } +#endif + } + + /* a THEN is interpreted as simple one statement goto if it is followed by a line number*/ +#ifdef HASAPPLE1 + /* then can be on a new line */ + if (token == TTHEN) { + nexttoken(); + if (token == NUMBER) { + findline((address_t) x); + } + } +#endif +} + +/* if else is encountered in the statement line, the rest of the code is skipped + as else code execution is triggered in the xif function */ +#ifdef HASSTEFANSEXT +void xelse() { + mem_t nl = 0; + +#ifndef HASSTRUCT + /* skip the entire line */ + while (token != LINENUMBER && token != EOL) nexttoken(); +#else + nexttoken(); + /* else in a single line */ + if (token == LINENUMBER) { + nexttoken(); + nl = 1; + } + + /* the block after the else on a new line or the current line */ + if (token == TDO) { + nexttoken(); + findbraket(TDO, TDEND); + } + + /* single line else, skip the line */ + if (!nl) while (token != LINENUMBER && token != EOL) nexttoken(); + +#endif +} +#endif + +/* + FOR, NEXT and the apocryphal BREAK + + find the NEXT token or the end of the program +*/ + +/* + The generic block scanner, used for structured code and in FOR NEXT. + The closing symbol of a symbol is found. Symbol pairs are: + + FOR NEXT + WHILE WEND + REPEAT UNTIL + DO DEND + SWITCH SWEND + +*/ +void findbraket(token_t bra, token_t ket) { + address_t fnc = 0; + + while (1) { + + if (DEBUG) { + outsc("** skpping braket "); + outputtoken(); outspc(); + outnumber(here); outspc(); + outnumber(fnc); outcr(); + } + + if (token == ket) { + if (fnc == 0) return; else fnc--; + } + + if (token == bra) fnc++; + + /* no closing symbol found */ + if (token == EOL) { + error(bra); + return; + } + nexttoken(); + } +} + +/* + FOR variable [= expression [to expression]] [STEP expression] + for stores the variable, the increment and the boudary on the + for stack. Changing steps and boundaries during the execution + of a loop has no effect. + + This is different from many other BASICS as FOR can be used + as an open loop with no boundary +*/ +void xfor() { + name_t variable; + number_t begin = 1; + number_t to = maxnum; + number_t step = 1; + + /* we need at least a name */ + if (!expect(VARIABLE, EUNKNOWN)) return; + copyname(&variable, &name); + + /* + This is not standard BASIC. + All combinations of FOR TO STEP are allowed. + FOR X : NEXT is an infinite loop. + FOR X=1 : NEXT is a loop with X=1 and an infinite loop. + FOR X=1 TO 10 : NEXT is a loop with X=1 to 10. + FOR X=1 TO 10 STEP 2 : NEXT is a loop with X=1 to 10 in steps of 2. + A variable must always be supplyed to indentify the loop. + FOR : NEXT is illegal. + */ + nexttoken(); + if (token == '=') { + if (!expectexpr()) return; + begin = pop(); + setvar(&variable, begin); + } + + if (token == TTO) { + if (!expectexpr()) return; + to = pop(); + } + + if (token == TSTEP) { + if (!expectexpr()) return; + step = pop(); + } + + if (!termsymbol()) { + error(EUNKNOWN); + return; + } + + /* in interactive mode we reuse here to store the offset in the buffer */ + if (st == SINT) here = bi - ibuffer; + + /* here we know everything to set up the loop */ + + if (DEBUG) { + outsc("** for loop with parameters var begin end step: "); + outname(&variable); + outspc(); outnumber(begin); + outspc(); outnumber(to); + outspc(); outnumber(step); + outcr(); + outsc("** for loop target location "); outnumber(here); outcr(); + } + + pushloop(&variable, TFOR, here, to, step); + if (!USELONGJUMP && er) return; + + /* + This tests the condition and stops if it is fulfilled already from start. + There is another apocryphal feature here: STEP 0 is legal triggers an infinite loop. + */ + if ((step > 0 && getvar(&variable) > to) || (step < 0 && getvar(&variable) < to)) { + droploop(); + findbraket(TFOR, TNEXT); + nexttoken(); + if (token == VARIABLE) nexttoken(); /* This BASIC does not check. */ + } +} + +/* + BREAK - an apocryphal feature here is the BREAK command ending a loop +*/ +#ifdef HASSTRUCT +void xbreak() { + bloop_t* loop; + + loop = activeloop(); + if (!USELONGJUMP && er) return; + switch (loop->var.token) { + case TWHILE: + findbraket(TWHILE, TWEND); + nexttoken(); + break; + case TREPEAT: + findbraket(TREPEAT, TUNTIL); + while (!termsymbol()) nexttoken(); + break; + default: /* a FOR loop is the default */ + findbraket(TFOR, TNEXT); + nexttoken(); + if (token == VARIABLE) nexttoken(); /* we are at next and skip the variable check */ + break; + } + droploop(); +} +#else +void xbreak() { + droploop(); + if (!USELONGJUMP && er) return; + findbraket(TFOR, TNEXT); + nexttoken(); + if (token == VARIABLE) nexttoken(); /* we are at next and skip the variable check */ +} +#endif + +/* + CONT as a loop control statement, as apocryphal as BREAK, simply + advance to next and the continue to process +*/ +#ifdef HASSTRUCT +void xcont() { + bloop_t* loop; + + loop = activeloop(); + if (!USELONGJUMP && er) return; + switch (loop->var.token) { + case TWHILE: + findbraket(TWHILE, TWEND); + break; + case TREPEAT: + findbraket(TREPEAT, TUNTIL); + break; + default: /* a FOR loop is the default */ + findbraket(TFOR, TNEXT); + break; + } +} +#else +void xcont() { + findbraket(TFOR, TNEXT); +} +#endif + +/* + NEXT variable statement. + + This code uses the global name variable right now for processing of + the variable in FOR. The variable name in next is stored in a local variable. +*/ + +/* reimplementation of xnext without change of the stack in a running loop */ + +void xnext() { + name_t variable; /* this is a potential variable argument of next */ + number_t value; + bloop_t* loop; + + /* check is we have the variable argument */ + nexttoken(); + + /* one variable is accepted as an argument, no list */ + if (token == VARIABLE) { + if (DEBUG) { + outsc("** variable argument "); + outname(&name); + outcr(); + } + + copyname(&variable, &name); + nexttoken(); + if (!termsymbol()) { + error(EUNKNOWN); + return; + } + } else { + variable.c[0] = 0; + } + + /* see whats going on */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + + /* check if this is really a FOR loop */ +#ifdef HASSTRUCT + if (loop->var.token == TWHILE || loop->var.token == TREPEAT) { + error(ELOOP); + return; + } +#endif + + /* a variable argument in next clears the for stack + down as BASIC programs can and do jump out to an outer next */ + if (variable.c[0] != 0) { + while (!cmpname(&variable, &loop->var)) { + droploop(); + if (!USELONGJUMP && er) return; + loop = activeloop(); + if (!USELONGJUMP && er) return; + } + } + + /* step=0 an infinite loop */ + /* this goes through the variable name */ +#ifndef HASLOOPOPT + value = getvar(&loop->var) + loop->step; + setvar(&loop->var, value); +#else + /* this goes through the stored address and then tries the name (for looping special variables) */ + if (loop->varaddress) { + value = getnumber(loop->varaddress, memread2) + loop->step; + setnumber(loop->varaddress, memwrite2, value); + } else { + value = getvar(&loop->var) + loop->step; + setvar(&loop->var, value); + } +#endif + + if (DEBUG) { + outsc("** next loop variable "); outname(&loop->var); outspc(); + outsc(" value "); outnumber(value); outcr(); + } + + /* do we need another iteration, STEP 0 always triggers an infinite loop */ + if ((loop->step == 0) || (loop->step > 0 && value <= loop->to) || (loop->step < 0 && value >= loop->to)) { + /* iterate in the loop */ + here = loop->here; + /* in interactive mode, jump to the right buffer location */ + if (st == SINT) bi = ibuffer + here; + } else { + /* last iteration completed we stay here after the next, + no precaution for SINT needed as bi unchanged */ + droploop(); + } + nexttoken(); + if (DEBUG) { + outsc("** after next found token "); + debugtoken(); + } +} + +/* + TOKEN output - this is also used in save. + list does a minimal formatting with a simple heuristic. + +*/ +void outputtoken() { + address_t i; + + if (token == EOL) return; + + if (token == LINENUMBER) outliteral = 0; + + if (token == TREM) outliteral = 1; + + if (spaceafterkeyword) { + if (token != '(' && + token != LINENUMBER && + token != ':' && + token != '$') outspc(); + spaceafterkeyword = 0; + } + + switch (token) { + case NUMBER: + outnumber(x); + break; + case LINENUMBER: + outnumber(ax); + outspc(); + break; + case ARRAYVAR: + case STRINGVAR: + case VARIABLE: + if (lastouttoken == NUMBER) outspc(); + outname(&name); + if (token == STRINGVAR) outch('$'); + break; + case STRING: + outch('"'); +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(sr.ir, sr.length); + outch('"'); + break; + default: + if ( (token < 32 && token >= BASEKEYWORD) || token < -127) { + if ((token == TTHEN || + token == TELSE || + token == TTO || + token == TSTEP || + token == TGOTO || + token == TGOSUB || + token == TOR || + token == TAND) && lastouttoken != LINENUMBER) outspc(); + else if (lastouttoken == NUMBER || lastouttoken == VARIABLE) { + if (token != GREATEREQUAL && + token <= LESSEREQUAL + && token != TSHL && + token != TSHR + ) outspc(); + } + + for (i = 0; gettokenvalue(i) != 0 && gettokenvalue(i) != token; i++); + outsc(getkeyword(i)); + if (token != GREATEREQUAL && + token != NOTEQUAL && + token != LESSEREQUAL && + token != TSHL && + token != TSHR && + token != TREM && + token != TFN) spaceafterkeyword = 1; + break; + } + if (token >= 32) { + outch(token); + if (token == ':' && !outliteral) outspc(); + break; + } + outch(token); outspc(); outnumber(token); + } + + lastouttoken = token; +} + +/* + LIST programs to an output device. + + The output is formatted to fit the screen, the heuristic is simple. + +*/ + +void listlines(address_t b, address_t e) { + mem_t oflag = 0; + address_t here2 = here; + + /* global variables controlling outputtoken, reset to default */ + lastouttoken = 0; + spaceafterkeyword = 0; + + /* if there is a programm ... */ + if (top != 0) { + here = 0; + gettoken(); + while (here < top) { + if (token == LINENUMBER && ax >= b) oflag = 1; + if (token == LINENUMBER && ax > e) oflag = 0; + if (oflag) outputtoken(); + gettoken(); + if (token == LINENUMBER && oflag) { + outcr(); + /* wait after every line on small displays + removed if ( dspactive() && (dsp_rows < 10) ){ if ( inch() == 27 ) break;} */ + if (dspactive() && dspwaitonscroll() == 27) break; + } + } + if (here == top && oflag) outputtoken(); + if (e == maxaddr || b != e) outcr(); /* supress newlines in "list 50" - a little hack */ + } + + if (st != SINT) here = here2; +} + +void xlist() { + address_t b, e; + + /* get the argument */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + + /* parse the arguments */ + switch (args) { + case 0: + b = 0; + e = maxaddr; + break; + case 1: + b = pop(); + e = b; + break; + case 2: + e = pop(); + b = pop(); + break; + default: + error(EARGS); + return; + } + + /* list the line from b to e in the default output device */ + listlines(b, e); + + /* we are done */ + nexttoken(); +} + +/* + The progam line editor, first version. The code is + not save for BUFSIZE greater than 127. A cast to + unsigned char aka uint8_t is needed for the string + length as some platforms have a signed char and some + don't. +*/ +void xedit() { + mem_t ood = od; + address_t line; + address_t l; + int i, k, j; + char ch; + + /* we edit only in interactive mode */ + if (st != SINT) { + error(EUNKNOWN); + return; + } + + /* currently only one line number */ + if (!expectexpr()) { + error(EARGS); + return; + } + + /* this uses the input buffer now */ + line = pop(); +undo: /* this is the undo point */ + ibuffer[0] = 0; + ibuffer[1] = 0; + od = 0; + listlines(line, line); + if (ibuffer[0] == 0) { + outnumber(line); + outspc(); + } + od = ood; + + /* set the cursor to the first character */ + l = 1; + + /* editing loop for blocking and non blocking terminals */ + while (-1) { + + /* show the line and indicate the cursor */ + for (i = 1; i <= (unsigned char)ibuffer[0]; i++) outch(ibuffer[i]); + outcr(); + for (i = 0; i < l - 1; i++) outspc(); + outch('^'); + outcr(); + + /* get a bunch of editing commands and process them*/ + i = ins(sbuffer, SBUFSIZE); + for (k = 1; k <= i; k++) { + ch = sbuffer[k]; + switch (ch) { + case 'q': /* quit the editor*/ + goto done; + case 'Q': /* end the editor without saving */ + goto endnosave; + break; + case 'X': /* delete from cursor until the end of the line */ + ibuffer[0] = (char)l; + ibuffer[l] = 0; + break; + case 'j': /* vi style left */ + if (l > 1) l--; + break; + case 'k': /* vi style right */ + if (l < (unsigned char)ibuffer[0]) l++; + break; + case 'x': /* delete the cursor character */ + if ((unsigned char)ibuffer[0] > 0) { + for (j = l; j < (unsigned char)ibuffer[0]; j++) ibuffer[j] = ibuffer[j + 1]; + ibuffer[j] = 0; + ibuffer[0] = (unsigned char)ibuffer[0] - 1; + } + if ((unsigned char)ibuffer[0] < l) l = (unsigned char)ibuffer[0]; + break; + case 's': /* substitute one character at the cursor position */ + if (k < i) { + k++; + ibuffer[l] = sbuffer[k]; + } + break; + case 'a': /* append multiple characters at the end of the line */ + l = (unsigned char)ibuffer[0] + 1; + case 'i': /* insert multiple characters at the cursor position */ + if (i - k + (unsigned char)ibuffer[0] < BUFSIZ) { + for (j = i - k + (unsigned char)ibuffer[0]; j >= l; j--) { + ibuffer[j + i - k] = ibuffer[j]; + if (j <= l + i - k) ibuffer[j] = sbuffer[k + 1 + (j - l)]; + } + } + ibuffer[0] = (unsigned char)ibuffer[0] + i - k; + k = i; + break; + case '^': /* vi style start of line */ + l = 1; + break; + case '$': /* vi style end of line */ + l = (unsigned char)ibuffer[0] + 1; + break; + case 'h': /* vi style backspace */ + if (l > 1) { + for (j = l - 1; j < (unsigned char)ibuffer[0]; j++) ibuffer[j] = ibuffer[j + 1]; + ibuffer[j] = 0; + ibuffer[0] = (unsigned char)ibuffer[0] - 1; + l--; + } + break; + case 'u': /* vi style undo */ + goto undo; + break; + case ':': /* find the next colon : character*/ + if (l <= (unsigned char)ibuffer[0]) { + while (l <= (unsigned char)ibuffer[0] && ibuffer[l] != ':') l++; + if (l <= (unsigned char)ibuffer[0]) l++; + } + break; + default: /* do nothing if the character is not recogized */ + break; + } + } + } + + /* try to store the line, may heaven help us */ +done: + bi = ibuffer; + st = SINT; + nexttoken(); + if (token == NUMBER) { + ax = x; + storeline(); + } + + /* and we are done, restore the output device and clean the buffer */ +endnosave: + ibuffer[0] = 0; + ibuffer[1] = 0; + bi = ibuffer + 1; + nexttoken(); +} + +/* + RUN and CONTINUE are the same function +*/ +void xrun() { + if (token == TCONT) { + st = SRUN; + nexttoken(); + } else { + nexttoken(); + parsearguments(); + if (er != 0 ) return; + if (args > 1) { + error(EARGS); + return; + } + if (args == 0) { + here = 0; + } else { + findline(pop()); + } + if (!USELONGJUMP && er) return; + if (st == SINT) st = SRUN; + + /* all reset on run */ + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert = 0; + ioer = 0; + fncontext = 0; +#ifdef HASEVENTS + resettimer(&every_timer); + resettimer(&after_timer); + events_enabled = 1; +#endif + + nexttoken(); + } + + /* once statement is called it stays into a loop until the token stream + is exhausted. Then we return to interactive mode. */ + statement(); + st = SINT; + /* flush the EEPROM when changing to interactive mode */ + eflush(); + + /* if called from command line with file arg - exit after run */ +#ifdef HASARGS + if (bnointafterrun) restartsystem(); +#endif +} + +/* + a simple help function for the help command, will be extended to + a more sophisticated help system in the future +*/ +void xhelp() { + int i; + nexttoken(); + if (token == EOL) { + displaybanner(); + outsc(getmessage(MKEYWORDS)); + for (i = 0; gettokenvalue(i) != 0; i++) { + outsc(getkeyword(i)); + outch(' '); + if (i % 8 == 7) outcr(); + } + outcr(); + } else { + if (token < 31 && token >= BASEKEYWORD) { /* attention, doesn't work with long tokens */ + outputtoken(); + outsc(": "); + outcr(); + } + nexttoken(); + } +} + +/* + NEW the general cleanup function - new deletes everything + + restbasicstate() is a helper, it keeps the memory intact + this is needed for EEPROM direct memory +*/ +void resetbasicstate() { + + if (DEBUG) { + outsc("** BASIC state reset \n"); + } + + /* all stacks are purged */ + clearst(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrvars(); + clrlinecache(); + + /* error status reset */ + reseterror(); + + /* let here point to the beginning of the program */ + here = 0; + + /* function context back to zero */ + fncontext = 0; + + /* interactive mode */ + st = SINT; + + /* switch off timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +} + +void xnew() { + + /* reset the state of the interpreter */ + resetbasicstate(); + + + if (DEBUG) { + outsc("** clearing memory "); + outnumber(memsize); + outsc(" bytes \n"); + } + + /* program memory back to zero and variable heap cleared */ + himem = memsize; + zeroblock(0, memsize); + top = 0; + + if (DEBUG) outsc("** clearing EEPROM state \n "); + /* on EEPROM systems also clear the stored state and top */ +#ifdef EEPROMMEMINTERFACE + eupdate(0, 0); + setaddress(1, beupdate, top); +#endif +} + +/* + REM - skip everything +*/ +void xrem() { + if (debuglevel == -1) outsc("REM: "); + while (token != LINENUMBER && token != EOL && here <= top) + { + nexttoken(); + if (debuglevel == -1) { + if (token != LINENUMBER) outputtoken(); else outcr(); + } + } +} + +/* + The Apple 1 BASIC additions + CLR, DIM, POKE, TAB +*/ + +/* + CLR - clearing variable space +*/ +void xclr() { + +#ifdef HASDARKARTS + name_t variable; + + nexttoken(); + + if (termsymbol()) { + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert = 0; + ioer = 0; + } else { + copyname(&variable, &name); + switch (variable.token) { + case VARIABLE: + if (variable.c[0] == '@') { + return; + } + break; + case ARRAYVAR: + nexttoken(); + if (token != '(') { + error(EVARIABLE); + return; + } + nexttoken(); + if (token != ')') { + error(EVARIABLE); + return; + } + break; + case STRINGVAR: + if (variable.c[0] == '@') { + error(EVARIABLE); + return; + } + break; + case TGOSUB: + clrgosubstack(); + goto next; + case TFOR: + clrforstack(); + goto next; + case TEVERY: + resettimer(&every_timer); + goto next; + case TAFTER: + resettimer(&after_timer); + goto next; + default: + expression(); + if (!USELONGJUMP && er) return; + ax = pop(); + variable.c[0] = ax % 256; + variable.c[1] = ax / 256; + variable.token = TBUFFER; + } + + /* we have to clear an object, call free */ + ax = bfree(&variable); + if (ax == 0) { + if (variable.token != TBUFFER) { + error(EVARIABLE); + return; + } + else ert = 1; + } + } +#else + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert = 0; + ioer = 0; +#endif + +next: + nexttoken(); +} + +#ifdef HASAPPLE1 +/* + DIM - the dimensioning of arrays and strings from Apple 1 BASIC +*/ +void xdim() { + name_t variable; + address_t x; + address_t y = 1; + + /* which object should be dimensioned or created */ + nexttoken(); + +nextvariable: + if (token == ARRAYVAR || token == STRINGVAR ) { + + /* remember the object, direct assignment of struct for the moment */ + copyname(&variable, &name); + + if (DEBUG) { + outsc("** in xdim "); outname(&variable); outspc(); outnumber(variable.token); + outspc(); outname(&name); outspc(); outnumber(name.token); outcr(); + } + + /* parse the arguments */ + parsesubscripts(); + if (!USELONGJUMP && er) return; + +#ifndef HASMULTIDIM + if (args != 1) { + error(EARGS); + return; + } + x = popaddress(); +#else + if (args != 1 && args != 2) { + error(EARGS); + return; + } + if (args == 2) y = popaddress(); + x = popaddress(); +#endif + + /* we create at least one element */ + if (x < 1 || y < 1) { + error(EORANGE); + return; + } + + /* various checks - do we have enough space in buffers and string indices */ + if (variable.token == STRINGVAR) { + if ((x > 255) && (strindexsize == 1)) { + error(EORANGE); + return; + } +#ifdef SPIRAMSBSIZE + if (x > SPIRAMSBSIZE - 1) { + error(EORANGE); + return; + } +#endif + /* With the substringmode switched off, if only one argument is given + we interpret the argument as the string array dimension and not as + the length two arguments are allowed and work as always. This makes + things more compatible to the Microsoft BASIC world. */ + if (!substringmode) + if (args == 1) { + y = x; + x = defaultstrdim; + } + + (void) createstring(&variable, x, y); + } else { + (void) createarray(&variable, x, y); + } + if (!USELONGJUMP && er) return; + + } else if (token == VARIABLE) { + (void) bmalloc(&name, 0); /* this is a local variable, currently no safety net */ + } else { + error(EUNKNOWN); + return; + } + + nexttoken(); + if (token == ',') { + nexttoken(); + goto nextvariable; + } + + nexttoken(); +} + + +/* + POKE - low level poke to the basic memory. + on 16bit systems, the address is signed, so we can only go up to 32767. + If the address is negative, we poke into the EEPROM. +*/ +void xpoke() { + number_t a, v; + + /* get the address and the value */ + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + v = pop(); /* the value */ + a = pop(); /* the address */ + + /* catch memsize here because memwrite doesn't do it */ + if (a >= 0 && a <= memsize) + memwrite2(a, v); + else if (a < 0 && a >= -elength()) + eupdate(-a - 1, v); + else { + error(EORANGE); + } +} + +/* + TAB - spaces command of Apple 1 BASIC + charcount mechanism for relative tab if HASMSTAB is set +*/ +void xtab() { + address_t a; + number_t tmp; + token_t t = token; + + /* get the number of spaces, we allow brackets here to use xtab also in PRINT */ + nexttoken(); + if (token == '(') nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + if (token == ')') nexttoken(); + + /* we handle negative values here */ + tmp = pop(); + if (!USELONGJUMP && er) return; + + /* negative tabs mapped to 0 */ + if (tmp < 0) t = 0; + a = tmp; + + /* the runtime environment can do a true tab then ... */ +#ifdef HASMSTAB + if (t != TSPC && reltab && od <= OPRT && od >= 0) { + if (charcount[od] >= a) a = 0; else a = a - charcount[od] - 1; + } +#endif + + /* debug output */ + if (DEBUG) { + outsc("** tabbing "); + outnumber(a); + outsc(" spaces "); + outsc(" charcount"); + outnumber(charcount[od - 1]); + outcr(); + } + + /* output the spaces */ + while (a-- > 0) outspc(); +} +#endif + +/* + locate the curor on the screen +*/ + +void xlocate() { + address_t cx, cy; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + cy = popaddress(); + cx = popaddress(); + if (!USELONGJUMP && er) return; + + /* for locate we go through the VT52 interface for cursor positioning*/ + if (cx > 0 && cy > 0 && cx < 224 && cy < 224) { + outch(27); outch('Y'); + outch(31 + (unsigned int) cy); + outch(31 + (unsigned int) cx); + } + + /* set the charcount, this is half broken on escape sequences */ +#ifdef HASMSTAB + if (od >= 0 && od <= OPRT) charcount[od] = cx; +#endif + +} + +/* + Stefan's additions to Palo Alto BASIC + DUMP, SAVE, LOAD, GET, PUT, SET +*/ + +/* + DUMP - memory dump program +*/ +void xdump() { + address_t a, x; + char eflag = 0; + + nexttoken(); + if (token == '!') { + eflag = 1; + nexttoken(); + } + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 0: + x = 0; + a = memsize; + break; + case 1: + x = pop(); + a = memsize; + break; + case 2: + a = pop(); + x = pop(); + break; + default: + error(EARGS); + return; + } + + form = 6; + if (a > x) dumpmem((a - x) / 8 + 1, x, eflag); + form = 0; +} + +/* + helper of DUMP, wrote the memory out +*/ +void dumpmem(address_t r, address_t b, char eflag) { + address_t j, i; + address_t k; + mem_t c; + address_t end; + + k = b; + i = r; + if (eflag) end = elength(); else end = memsize; + while (i > 0) { + outnumber(k); outspc(); + for (j = 0; j < 8; j++) { + if (eflag) c = eread(k); else c = memread(k); + k++; + outnumber(c); outspc(); + if (k > end) break; + } + outcr(); + i--; + if (k > end) break; + } + if (eflag) { + outsc("elength: "); outnumber(elength()); outcr(); + } else { + outsc("top: "); outnumber(top); outcr(); + outsc("himem: "); outnumber(himem); outcr(); + } +} + +/* + Creates a C string from a BASIC string after reading a BASIC string. + This function handles strings up to SBUFFERSIZE - 1 characters long. + It is used in commands that convert strings like VAL and in handling + filenames. +*/ +void stringtobuffer(char *buffer, string_t* s) { + index_t i = s->length; + + if (i >= SBUFSIZE) { i = SBUFSIZE - 1; ert=1; } + buffer[i--] = 0; + while (i >= 0) { + buffer[i] = s->ir[i]; + i--; + } +} + +/* helper for the memintercase code */ +void getstringtobuffer(string_t* strp, char *buffer, stringlength_t maxlen) { + stringlength_t i; + + for (i = 0; i < strp->length && i < maxlen; i++) buffer[i] = memread2(strp->address + i); + strp->ir = buffer; +} + +/* get a file argument */ +void getfilename(char *buffer, char d) { + index_t s; + char *sbuffer; + string_t sr; + + /* do we have a string argument? */ + s = stringvalue(&sr); + if (!USELONGJUMP && er) return; + if (DEBUG) { + outsc("** in getfilename2 stringvalue delivered "); + outnumber(s); + outcr(); + } + + if (s) { + if (DEBUG) { + outsc("** in getfilename2 copying string of length "); + outnumber(x); + outcr(); + } +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + stringtobuffer(buffer, &sr); + if (DEBUG) { + outsc("** in getfilename2 stringvalue string "); + outsc(buffer); + outcr(); + } + nexttoken(); + } else if (termsymbol()) { + if (d) { + sbuffer = getmessage(MFILE); + s = 0; + while ((sbuffer[s] != 0) && (s < SBUFSIZE - 1)) { + buffer[s] = sbuffer[s]; + s++; + } + buffer[s] = 0; + x = s; + } else { + buffer[0] = 0; + x = 0; + } + nexttoken(); + } else { + expression(); + if (!USELONGJUMP && er) return; + buffer[0] = pop(); + buffer[1] = 0; + } +} + +/* + an alternative getfilename implementation that simply gives back a buffer + with the filename in it. We avoid a string buffer in the calling commands + like SAVE and LOAD. +*/ +char* getfilename2(char d) { + mem_t s; + string_t sr; + + /* we have no argument and use the default */ + if (termsymbol()) { + if (d) return getmessage(MFILE); + else return 0; + } + + /* we have a string argument or an expression */ + s = stringvalue(&sr); + if (!USELONGJUMP && er) return 0; + if (s) { +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, sbuffer, SBUFSIZE); +#endif + nexttoken(); /* undo the rewind of stringvalue, only then use the buffer */ + for (s = 0; s < sr.length && s < SBUFSIZE - 1; s++) sbuffer[s] = sr.ir[s]; + sbuffer[s] = 0; + return sbuffer; + } else { + expression(); + if (!USELONGJUMP && er) return 0; + sbuffer[0] = pop(); + sbuffer[1] = 0; + return sbuffer; + } +} + +#if defined(FILESYSTEMDRIVER) +/* + SAVE a file either to disk or to EEPROM +*/ +void xsave() { + char *filename; + address_t here2; + token_t t; + + nexttoken(); + filename = getfilename2(1); + if (!USELONGJUMP && er) return; + t = token; + + if (filename[0] == '!') { + esave(); + } else { + if (DEBUG) { + outsc("** Opening the file "); + outsc(filename); + outcr(); + }; + + if (!ofileopen(filename, "w")) { + error(EFILE); + return; + } + + /* save the output mode and then save */ + push(od); + od = OFILE; + + /* the core save - xlist() not used any more */ + ert = 0; /* reset error to trap file problems */ + here2 = here; + here = 0; + gettoken(); + while (here < top) { + outputtoken(); + if (ert) break; + gettoken(); + if (token == LINENUMBER) outcr(); + } + if (here == top) outputtoken(); + outcr(); + + /* back to where we were */ + here = here2; + + /* restore the output mode */ + od = pop(); + + /* clean up */ + ofileclose(); + + /* did an accident happen */ + if (ert) { + printmessage(EGENERAL); + outcr(); + ert = 0; + } + } + + /* and continue remembering, where we were */ + token = t; +} + +/* + LOAD a file, LOAD can either be invoked with a filename argument + or without, in the latter case the filename is read from the token stream + with getfilename. +*/ +void xload(const char* f) { + char* filename; + char ch; + address_t here2; + mem_t chain = 0; + + if (f == 0) { + nexttoken(); + filename = getfilename2(1); + if (!USELONGJUMP && er) return; + } else { + filename = (char*)f; + } + + if (filename[0] == '!') { + eload(); + } else { + + /* + If load is called during runtime it merges + the program as new but perserve the variables + gosub and for stacks are cleared. This is incomplete + as there is one side effect. Functions are not cleared + as they are stored in the heap. If lines are overwritten + by the merge, the function pointers in the heap become + invalid. There is no safety net for this in the current + */ + if (st == SRUN) { + chain = 1; + st = SINT; + top = 0; + clrgosubstack(); + clrforstack(); + clrdata(); + } + + if (!f) + if (!ifileopen(filename)) { + error(EFILE); + return; + } + + bi = ibuffer + 1; + while (fileavailable()) { + ch = fileread(); + + if (ch == '\n' || ch == '\r' || cheof(ch)) { + *bi = 0; + bi = ibuffer + 1; + if (*bi != '#') { /* lines starting with a # are skipped - Unix style shell startup */ + nexttoken(); + if (token == NUMBER) { + ax = x; + storeline(); + } + if (er != 0 ) break; + bi = ibuffer + 1; + } + } else { + *bi++ = ch; + } + + if ((bi - ibuffer) > BUFSIZE) { + error(EOUTOFMEMORY); + break; + } + } + ifileclose(); + /* after a successful load we save top to the EEPROM header */ +#ifdef EEPROMMEMINTERFACE + setaddress(1, beupdate, top); +#endif + + /* go back to run mode and start from the first line */ + if (chain) { + st = SRUN; + here = 0; + nexttoken(); + } + } +} +#else +/* + SAVE a file to EEPROM - minimal version for small Arduinos +*/ +void xsave() { + esave(); + nexttoken(); +} +/* + LOAD a file from EEPROM - minimal version for small Arduinos +*/ +void xload(const char* f) { + eload(); + nexttoken(); +} +#endif + +/* + GET just one character from input +*/ +void xget() { + + /* identifier of the lefthandside */ + lhsobject_t lhs; + + mem_t oid = id; /* remember the input stream */ + char ch; + + nexttoken(); + + /* modifiers of the get statement */ + if (token == '&') { + + if (!expectexpr()) return; + id = pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + /* this code evaluates the left hand side - remember type and name */ + copyname(&lhs.name, &name); + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + + /* get the data, non blocking on Arduino */ + if (availch()) ch = inch(); else ch = 0; + + /* store the data element as a number expect for */ + assignnumber2(&lhs, ch); + + /* but then, strings where we deliver a string with length 0 if there is no data */ +#ifdef HASAPPLE1 + if (lhs.name.token == STRINGVAR && ch == 0 && lhs.ps) setstringlength(&lhs.name, 0, arraylimit); +#endif + + /* restore the output device */ + id = oid; +} + +/* + PUT writes one character to an output stream +*/ +void xput() { + mem_t ood = od; + index_t i; + + nexttoken(); + + /* modifiers of the put statement */ + if (token == '&') { + + if (!expectexpr()) return; + od = pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + parsearguments(); + if (!USELONGJUMP && er) return; + + for (i = args - 1; i >= 0; i--) sbuffer[i] = pop(); + outs(sbuffer, args); + + od = ood; +} + +/* setpersonality is a helper of xset */ +void setpersonality(index_t p) { +#ifdef HASAPPLE1 + switch (p) { + /* a Microsoft like BASIC have arrays starting at 0 with n+1 elements and no substrings, MS type RND */ + case 'm': + case 'M': + msarraylimits = 1; + arraylimit = 0; + substringmode = 0; + booleanmode = -1; + randombase = -1; + reltab = 1; + break; + /* an Apple 1 like BASIC have arrays starting at 1 with n elements and substrings */ + case 'a': + case 'A': + msarraylimits = 0; + arraylimit = 1; + substringmode = 1; + booleanmode = 1; + randombase = 0; + reltab = 0; + break; + /* PaloAlto BASIC is an integer basic with slightly different behaviour */ + case 'p': + case 'P': + msarraylimits = 0; + arraylimit = 0; + substringmode = 1; + booleanmode = 1; + forceint = 1; + randombase = 1; + reltab = 0; + break; + } +#endif +} + +/* + SET - the command itself is also apocryphal it is a low level + control command setting certain properties + syntax, currently it is only SET expression, expression +*/ +void xset() { + address_t function; + index_t argument; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + argument = pop(); + function = pop(); + switch (function) { + /* runtime debug level */ + case 0: + debuglevel = argument; + break; + /* autorun/run flag of the EEPROM 255 for clear, 0 for prog, 1 for autorun */ + /* eflush() is needed to make sure the change is written immediately */ + /* the bdelay is only for protection of the eeprom against tight loops doing SET 1,x */ + case 1: + eupdate(0, argument); + eflush(); + bdelay(1000); + break; + /* change the output device */ + case 2: + switch (argument) { + case 0: + od = OSERIAL; + break; + case 1: + od = ODSP; + break; + } + break; + /* change the default output device */ + case 3: + switch (argument) { + case 0: + od = (odd = OSERIAL); + break; + case 1: + od = (odd = ODSP); + break; + } + break; + /* change the input device */ + case 4: + switch (argument) { + case 0: + id = ISERIAL; + break; + case 1: + id = IKEYBOARD; + break; + } + break; + /* change the default input device */ + case 5: + switch (argument) { + case 0: + idd = (id = ISERIAL); + break; + case 1: + idd = (id = IKEYBOARD); + break; + } + break; +#ifdef HASSERIAL1 + /* set the cr behaviour */ + case 6: + sendcr = (char)argument; + break; + /* set the blockmode behaviour */ + case 7: + blockmode = argument; + break; + /* set the second serial ports baudrate */ + case 8: + prtset(argument); + break; +#endif + /* set the power amplifier level of the radio module */ +#ifdef HASRF24 + case 9: + radioset(argument); + break; +#endif + /* display update control for paged displays */ +#ifdef DISPLAYDRIVER + case 10: + dspsetupdatemode(argument); + break; +#endif + /* change the output device to a true TAB */ +#ifdef HASMSTAB + case 11: + reltab = argument; + break; +#endif + /* change the lower array limit */ +#ifdef HASAPPLE1 + case 12: + if (argument >= 0) arraylimit = argument; else error(EORANGE); + break; +#endif + /* the keyboard repeat frequency */ +#ifdef HASKEYPAD + case 13: + kbdrepeat = argument; + break; +#endif + /* the units the pulse command is using */ +#ifdef HASPULSE + case 14: + bpulseunit = argument; + break; +#endif + /* switch on the vt52 emulation an a POSIX system with an ANSI terminal */ +#ifdef POSIXVT52TOANSI + case 15: + vt52active = argument; + break; +#endif + /* change the default size of a string at autocreate */ +#ifdef HASAPPLE1 + case 16: + if (argument > 0) defaultstrdim = argument; else error(EORANGE); + break; +#endif + /* set the boolean mode */ + case 17: + if (argument == -1 || argument == 1) booleanmode = argument; else error(EORANGE); + break; + /* set the integer mode */ + case 18: + forceint = (argument != 0); + break; + /* set the random number behaviour */ + case 19: + randombase = argument; + break; + /* the substring mode on and off */ +#ifdef HASAPPLE1 + case 20: + substringmode = (argument != 0); + break; +#endif + /* the MS array behaviour, creates n+1 elements when on */ +#ifdef HASAPPLE1 + case 21: + msarraylimits = (argument != 0); + break; +#endif + /* set many settings at once to change the entire personality of the interpreter */ + case 22: + setpersonality(argument); + break; +#ifdef HASAPPLE1 + case 23: + lowercasenames = (argument != 0); + break; +#endif +#ifdef HASFLOAT + case 24: + precision = argument; + break; +#endif + } +} + +/* + NETSTAT - network status command, rudimentary +*/ +void xnetstat() { +#if defined(HASMQTT) + + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 0: + if (netconnected()) outsc("Network connected \n"); else outsc("Network not connected \n"); + outsc("MQTT state "); outnumber(mqttstate()); outcr(); + outsc("MQTT out topic "); outsc(mqtt_otopic); outcr(); + outsc("MQTT inp topic "); outsc(mqtt_itopic); outcr(); + outsc("MQTT name "); outsc(mqttname); outcr(); + break; + case 1: + ax = pop(); + switch (ax) { + case 0: + netstop(); + break; + case 1: + netbegin(); + break; + case 2: + if (!mqttreconnect()) ert = 1; + break; + default: + error(EARGS); + return; + } + break; + default: + error(EARGS); + return; + } +#endif + nexttoken(); +} + +/* + The arduino io functions. + +*/ + +/* + rtaread and rtdread are wrappers coming from runtime + This is done for portability for raspberry pi and other systems +*/ + +void xaread() { + push(aread(popaddress())); +} + +void xdread() { + push(dread(popaddress())); +} + +/* + DWRITE - digital write +*/ +void xdwrite() { + address_t x, y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x = popaddress(); + y = popaddress(); + if (!USELONGJUMP && er) return; + dwrite(y, x); +} + +/* + AWRITE - analog write +*/ +void xawrite() { + address_t x, y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x = popaddress(); + if (x > 255) error(EORANGE); + y = popaddress(); + if (!USELONGJUMP && er) return; + awrite(y, x); +} + +/* + PINM - pin mode +*/ +void xpinm() { + address_t x, y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x = popaddress(); + if (x > 1) error(EORANGE); + y = popaddress(); + if (!USELONGJUMP && er) return; + pinm(y, x); +} + +/* + DELAY in milliseconds + + this must call bdelay() and not delay() as bdelay() + handles all the yielding and timing functions + +*/ +void xdelay() { + nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + bdelay(pop()); +} + +/* tone if the platform has it -> BASIC command PLAY */ +#ifdef HASTONE +/* play a tone */ +void xtone() { + address_t d = 0; + address_t v = 100; + address_t f, p; + + /* get minimum of 2 and maximum of 4 args */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 4 || args < 2) { + error(EARGS); + return; + } + + /* a switch would be more elegant but needs more progspace ;-) */ + if (args == 4) v = popaddress(); + if (args >= 3) d = popaddress(); + f = popaddress(); + p = popaddress(); + if (!USELONGJUMP && er) return; + + playtone(p, f, d, v); +} +#endif + +/* pulse output - pin, duration, [value], [repetitions, delay] */ +#ifdef HASPULSE +void xpulse() { + address_t pin, duration; + address_t val = 1; + address_t interval = 0; + address_t repetition = 1; + + /* do we have at least 2 and not more than 5 arguments */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 5 || args < 2) { + error(EARGS); + return; + } + + /* get the data from stack */ + if (args == 5) { + interval = popaddress(); + repetition = popaddress(); + } + if (args == 4) { + error(EARGS); + return; + } + if (args > 2) val = popaddress(); + duration = popaddress(); + pin = popaddress(); + if (!USELONGJUMP && er) return; + + /* low level run time function for the pulse */ + pulseout(bpulseunit, pin, duration, val, repetition, interval); +} + +/* read a pulse, units given by bpulseunit - default 10 microseconds */ +void bpulsein() { + address_t x, y; + unsigned long t, pt; + + t = ((unsigned long) popaddress()) * 1000; + y = popaddress(); + x = popaddress(); + if (!USELONGJUMP && er) return; + + push(pulsein(x, y, t) / bpulseunit); +} +#endif + + +#ifdef HASGRAPH +/* + COLOR setting, accepting one or 3 arguments +*/ +void xcolor() { + int r, g, b; + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + switch (args) { + case 1: + vgacolor(pop()); + break; + case 3: + b = pop(); + g = pop(); + r = pop(); + rgbcolor(r, g, b); + break; + default: + error(EARGS); + break; + } +} + +/* + PLOT a pixel on the screen +*/ +void xplot() { + int x0, y0; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + y0 = pop(); + x0 = pop(); + plot(x0, y0); +} + +/* + LINE draws a line +*/ +void xline() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1 = pop(); + x1 = pop(); + y0 = pop(); + x0 = pop(); + line(x0, y0, x1, y1); +} + +void xrect() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1 = pop(); + x1 = pop(); + y0 = pop(); + x0 = pop(); + rect(x0, y0, x1, y1); +} + +void xcircle() { + int x0, y0, r; + + nexttoken(); + parsenarguments(3); + if (!USELONGJUMP && er) return; + r = pop(); + y0 = pop(); + x0 = pop(); + circle(x0, y0, r); +} + +void xfrect() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1 = pop(); + x1 = pop(); + y0 = pop(); + x0 = pop(); + frect(x0, y0, x1, y1); +} + +void xfcircle() { + int x0, y0, r; + + nexttoken(); + parsenarguments(3); + if (!USELONGJUMP && er) return; + r = pop(); + y0 = pop(); + x0 = pop(); + fcircle(x0, y0, r); +} +#endif + +#ifdef HASDARKARTS +/* + MALLOC allocates a chunk of memory +*/ +void xmalloc() { + address_t s; + address_t a; + name_t name; + + /* size and identifier */ + s = popaddress(); + a = popaddress(); + if (!USELONGJUMP && er) return; + + /* create a name */ + name.token = TBUFFER; + name.l = 2; + name.c[0] = a % 256; + name.c[1] = a / 256; + + /* allocate the memory */ + push(bmalloc(&name, s)); +} + +/* + FIND an object on the heap + xfind can find things in the variable name space and the buffer space +*/ + +void xfind() { + address_t a; + address_t n; + + /* is there a ( */ + if (!expect('(', EUNKNOWN)) return; + + /* after that, try to find the object on the heap */ + nexttoken(); + if (token == TFN) { + nexttoken(); + name.token = TFN; + } + a = bfind(&name); + + /* depending on the object, interpret the result */ + switch (token) { + case ARRAYVAR: + case TFN: + if (!expect('(', EUNKNOWN)) return; + if (!expect(')', EUNKNOWN)) return; + case VARIABLE: + case STRINGVAR: + nexttoken(); + break; + default: + expression(); /* do not use expectexpr here because of the token sequence */ + if (!USELONGJUMP && er) return; + n = popaddress(); + if (!USELONGJUMP && er) return; + name.token = TBUFFER; + name.l = 2; + name.c[0] = n % 256; + name.c[1] = n / 256; + a = bfind(&name); + } + + /* closing braket, dont use expect here because of the token sequence */ + if (token != ')') { + error(EUNKNOWN); + return; + } + + push(a); +} + +/* + EVAL can modify a program, there are serious side effects + which are not caught (and cannot be). All FOR loops and RETURN + vectors break if EVAL inserts in their range +*/ +void xeval() { + address_t i, l; + address_t mline, line; + string_t s; + + /* get the line number to store */ + if (!expectexpr()) return; + line = popaddress(); + if (!USELONGJUMP && er) return; + + if (token != ',') { + error(EUNKNOWN); + return; + } + + /* the line to be stored */ + nexttoken(); + if (!stringvalue(&s)) { + error(EARGS); + return; + } + + /* here we have the string to evaluate it to the ibuffer + only one line allowed, BUFSIZE is the limit */ + l = s.length; + if (!USELONGJUMP && er) return; + + if (l > BUFSIZE - 1) { + error(EORANGE); + return; + } + +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + + for (i = 0; i < l; i++) ibuffer[i + 1] = s.ir[i]; + ibuffer[l + 1] = 0; + if (DEBUG) { + outsc("** Preparing to store line "); + outnumber(line); + outspc(); + outsc(ibuffer + 1); + outcr(); + } + + /* we find the line we are currently at */ + if (st != SINT) { + mline = myline(here); + if (DEBUG) { + outsc("** myline is "); + outnumber(mline); + outcr(); + } + } + + /* go to interactive mode and try to store the line */ + ax = line; // the linennumber + push(st); st = SINT; // go to (fake) interactive mode + bi = ibuffer; // go to the beginning of the line + storeline(); // try to store it + st = pop(); // go back to run mode + + /* find my line - side effects not checked here */ + if (st != SINT) { + findline(mline); + nextline(); + } +} +#endif + + +#ifdef HASIOT + +/* + AVAIL of a stream - are there characters in the stream +*/ +void xavail() { + mem_t oid = id; + + id = popaddress(); + if (!USELONGJUMP && er) return; + push(availch()); + id = oid; +} + +/* + IoT functions - sensor reader, experimentral +*/ +void xfsensor() { + address_t s, a; + + a = popaddress(); + if (!USELONGJUMP && er) return; + s = popaddress(); + if (!USELONGJUMP && er) return; + push(sensorread(s, a)); +} + + +/* + Going to sleep for battery saving - implemented for ESP8266 and ESP32 + in hardware-*.h +*/ + +void xsleep() { + nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + activatesleep(pop()); +} + +/* + single byte wire access - keep it simple +*/ + +void xwire() { + int i; + + nexttoken(); +#if defined(HASWIRE) || defined(HASSIMPLEWIRE) + parsearguments(); + if (!USELONGJUMP && er) return; + +/* this code is the only place where the stack is accessed directly */ + if (args > 1) { + wirestart((int)stack[sp-args].n, 0); + for(i=1; ienabled = 0; + t->interval = 0; + t->last = 0; + t->type = 0; + t->linenumber = 0; +} + +void xtimer() { + token_t t; + btimer_t* timer; + + /* do we deal with every or after */ + if (token == TEVERY) timer = &every_timer; else timer = &after_timer; + + /* one argument expected, the time intervall */ + if (!expectexpr()) return; + + /* after that, a command GOTO or GOSUB with a line number + more commands thinkable */ + switch (token) { + case TGOSUB: + case TGOTO: + t = token; + if (!expectexpr()) return; + timer->last = millis(); + timer->type = t; + timer->linenumber = pop(); + timer->interval = pop(); + timer->enabled = 1; + break; + default: + if (termsymbol()) { + x = pop(); + if (x == 0) + timer->enabled = 0; + else { + if (timer->linenumber) { + timer->enabled = 1; + timer->interval = x; + timer->last = millis(); + } else + error(EARGS); + } + } else + error(EUNKNOWN); + return; + } +} +#endif + +#ifdef HASEVENTS +/* + The events API for Arduino with interrupt service routines + analogous to the timer API. + + we use raw modes here + + #define CHANGE 1 + #define FALLING 2 + #define RISING 3 + + detach und attach are wrappers around the original Arduino functions. + Runtime needs to be compiled with #define ARDUINOINTERRUPTS for this to + work. + +*/ + +/* interrupts in BASIC fire once and then disable themselves, BASIC reenables them */ +void bintroutine0() { + eventlist[0].active = 1; + detachinterrupt(eventlist[0].pin); +} +void bintroutine1() { + eventlist[1].active = 1; + detachinterrupt(eventlist[1].pin); +} +void bintroutine2() { + eventlist[2].active = 1; + detachinterrupt(eventlist[2].pin); +} +void bintroutine3() { + eventlist[3].active = 1; + detachinterrupt(eventlist[3].pin); +} + +mem_t eventindex(mem_t pin) { + mem_t i; + + for (i = 0; i < EVENTLISTSIZE; i++ ) if (eventlist[i].pin == pin) return i; + return -1; +} + +mem_t enableevent(mem_t pin) { + mem_t inter; + mem_t i; + + /* do we have the data */ + if ((i = eventindex(pin)) < 0) return 0; + + /* can we use this pin? */ + inter = pintointerrupt(eventlist[i].pin); + if (inter < 0) return 0; + + /* attach the interrupt function to this pin */ + switch (i) { + case 0: + attachinterrupt(inter, bintroutine0, eventlist[i].mode); + break; + case 1: + attachinterrupt(inter, bintroutine1, eventlist[i].mode); + break; + case 2: + attachinterrupt(inter, bintroutine2, eventlist[i].mode); + break; + case 3: + attachinterrupt(inter, bintroutine3, eventlist[i].mode); + break; + default: + return 0; + } + + /* now set it enabled in BASIC */ + eventlist[i].enabled = 1; + return 1; +} + + +void disableevent(mem_t pin) { + detachinterrupt(pin); +} + +/* the event BASIC commands */ +void initevents() { + mem_t i; + + for (i = 0; i < EVENTLISTSIZE; i++) eventlist[i].pin = -1; + nevents = 0; +} + +void xevent() { + mem_t pin, mode; + mem_t type = 0; + address_t line = 0; + + /* in this version two arguments are neded, one is the pin, the second the mode */ + nexttoken(); + + /* debug code, display the event list */ + if (termsymbol()) { + for (ax = 0; ax < EVENTLISTSIZE; ax++) { + if (eventlist[ax].pin >= 0) { + outnumber(eventlist[ax].pin); outspc(); + outnumber(eventlist[ax].mode); outspc(); + // outnumber(eventlist[ax].type); outspc(); + if (eventlist[ax].type == TGOTO) outsc("GOTO"); else outsc("GOSUB"); + outspc(); + outnumber(eventlist[ax].linenumber); outspc(); + outcr(); + } + } + outnumber(nevents); outcr(); + nexttoken(); + return; + } + + /* control of events */ + + /* stop and continue */ + if (token == TSTOP) { + events_enabled = 0; + nexttoken(); + return; + } + + if (token == TCONT) { + events_enabled = 1; + nexttoken(); + return; + } + + /* clear the event list */ + if (token == TCLR) { + initevents(); + nexttoken(); + return; + } + + /* argument parsing */ + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 2: + mode = pop(); + if (mode > 3) { + error(EARGS); + return; + } + case 1: + pin = pop(); + break; + default: + error(EARGS); + } + + /* followed by termsymbol, GOTO or GOSUB */ + if (token == TGOTO || token == TGOSUB) { + type = token; + + /* which line to go to */ + if (!expectexpr()) return; + line = pop(); + } else { + if (!termsymbol()) { + error(EARGS); + return; + } + } + + /* all done either set the interrupt up or delete it*/ + if (type) { + if (!addevent(pin, mode, type, line)) { + error(EARGS); + return; + } + } else { + disableevent(pin); + deleteevent(pin); + return; + } + + /* enable the interrupt */ + if (!enableevent(pin)) { + deleteevent(pin); + error(EARGS); + return; + } +} + +/* handling the event list */ +mem_t addevent(mem_t pin, mem_t mode, mem_t type, address_t linenumber) { + int i; + + /* is the event already there */ + for (i = 0; i < EVENTLISTSIZE; i++) + if (pin == eventlist[i].pin) goto slotfound; + + /* if not, look for a free slot */ + /* there is none, return with an error */ + if (nevents >= EVENTLISTSIZE) return 0; + + /* we have a free slot, increase number of events in list */ + for (i = 0; i < EVENTLISTSIZE; i++) + if (eventlist[i].pin == -1) { + nevents++; + goto slotfound; + } + + /* no free event slot */ + return 0; + + /* we have a slot */ +slotfound: + eventlist[i].enabled = 0; + eventlist[i].pin = pin; + eventlist[i].mode = mode; + eventlist[i].type = type; + eventlist[i].linenumber = linenumber; + eventlist[i].active = 0; + return 1; +} + +void deleteevent(mem_t pin) { + int i; + + /* do we have the event? */ + i = eventindex(pin); + + if (i >= 0) { + eventlist[i].enabled = 0; + eventlist[i].pin = -1; + eventlist[i].mode = 0; + eventlist[i].type = 0; + eventlist[i].linenumber = 0; + eventlist[i].active = 0; + nevents--; + } +} +#endif + +/* + BASIC DOS - disk access programs, to control mass storage from BASIC +*/ + +/* string match helper in catalog */ +char streq(const char *s, char *m) { + short i = 0; + + while (m[i] != 0 && s[i] != 0 && i < SBUFSIZE) { + if (s[i] != m[i]) return 0; + i++; + } + return 1; +} + +/* + CATALOG - basic directory function +*/ +void xcatalog() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + const char *name; + + nexttoken(); + getfilename(filename, 0); + if (!USELONGJUMP && er) return; + + rootopen(); + while (rootnextfile()) { + if (rootisfile()) { + name = rootfilename(); + if (*name != '_' && *name != '.' && streq(name, filename)) { + outscf(name, 14); outspc(); + if (rootfilesize() > 0) outnumber(rootfilesize()); + outcr(); + if (dspwaitonscroll() == 27) break; + } + } + rootfileclose(); + } + rootclose(); +#else + nexttoken(); +#endif +} + +/* + DELETE a file +*/ +void xdelete() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + + nexttoken(); + getfilename(filename, 0); + if (!USELONGJUMP && er) return; + + removefile(filename); +#else + nexttoken(); +#endif +} + +/* + OPEN a file or I/O stream - very raw mix of different functions +*/ +void xopen() { +#if defined(FILESYSTEMDRIVER) || defined(HASRF24) || defined(HASMQTT) || defined(HASWIRE) || defined(HASSERIAL1) + char stream = IFILE; /* default is file operation */ + char* filename; + int mode; + + /* which stream do we open? default is FILE */ + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream = pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + /* the filename and its length */ + // getfilename(filename, 0); + filename = getfilename2(0); + if (!USELONGJUMP && er) return; + + /* and the arguments */ + args = 0; + if (token == ',') { + nexttoken(); + parsearguments(); + } + + /* getting an argument, no argument is read, i.e. mode 0 */ + if (args == 0 ) { + mode = 0; + } else if (args == 1) { + mode = pop(); + } else { + error(EARGS); + return; + } + + /* open the stream */ + switch (stream) { +#ifdef HASSERIAL1 + case ISERIAL1: + prtclose(); + if (mode == 0) mode = 9600; + if (prtopen(filename, mode)) ert = 0; else ert = 1; + break; +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + switch (mode) { + case 1: + ofileclose(); + if (ofileopen(filename, "w")) ert = 0; else ert = 1; + break; + case 2: + ofileclose(); + if (ofileopen(filename, "a")) ert = 0; else ert = 1; + break; + default: + case 0: + ifileclose(); + if (ifileopen(filename)) ert = 0; else ert = 1; + break; + } + break; +#endif +#ifdef HASRF24 + case IRADIO: + if (mode == 0) { + iradioopen(filename); + } else if (mode == 1) { + oradioopen(filename); + } + break; +#endif +#if defined(HASWIRE) + case IWIRE: + wireopen(filename[0], mode); + break; +#endif +#ifdef HASMQTT + case IMQTT: + if (mode == 0) { + mqttsubscribe(filename); + } else if (mode == 1) { + mqttsettopic(filename); + } + break; +#endif + default: + error(EORANGE); + return; + } +#endif + nexttoken(); +} + +/* + OPEN as a function, currently only implemented for MQTT +*/ +void xfopen() { + address_t stream = popaddress(); + if (stream == 9) push(mqttstate()); else push(0); +} + +/* + CLOSE a file or stream +*/ +void xclose() { +#if defined(FILESYSTEMDRIVER) || defined(HASRF24) || defined(HASMQTT) || defined(HASWIRE) + char stream = IFILE; + char mode; + + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream = pop(); + if (token != ',' && ! termsymbol()) { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + parsearguments(); + if (args == 0) { + mode = 0; + } else if (args == 1) { + mode = pop(); + } else { + error(EARGS); + return; + } + + /* currently only close of files is implemented, should be also implemented for Wire */ + switch (stream) { + case IFILE: + if (mode == 1 || mode == 2) ofileclose(); else if (mode == 0) ifileclose(); + break; + } +#endif + nexttoken(); +} + +/* + FDISK - format internal disk storages of RP2040, ESP and the like +*/ +void xfdisk() { +#if defined(FILESYSTEMDRIVER) + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 1) error(EORANGE); + if (args == 0) push(0); + outsc("Format disk (y/N)?"); + (void) consins(sbuffer, SBUFSIZE); + if (sbuffer[1] == 'y') formatdisk(pop()); + if (fsstat(1) > 0) outsc("ok\n"); else outsc("fail\n"); +#endif + nexttoken(); +} + +#ifdef HASUSRCALL +/* + USR low level function access of the interpreter + for each group of functions there is a call vector + and and argument. + + USR arguments from 0 to 31 are reserved for the + interpreter status and the input output stream + mechanisms. All other values are free and can be used + for individual functions - see case 32 for an example. +*/ +void xusr() { + address_t fn; + number_t v; + int arg; + address_t a; + + v = pop(); + arg = (int)v; /* a bit paranoid here */ + fn = pop(); + switch (fn) { + /* USR(0,y) delivers all the internal constants and variables or the interpreter */ + case 0: + switch (arg) { + case 0: + push(bsystype); + break; + case 1: /* language set identifier, odd because USR is part of STEFANSEXT*/ + a = 0; +#ifdef HASAPPLE1 + a |= 1; +#endif +#ifdef HASARDUINOIO + a |= 2; +#endif +#ifdef HASFILEIO + a |= 4; +#endif +#ifdef HASDARTMOUTH + a |= 8; +#endif +#ifdef HASGRAPH + a |= 16; +#endif +#ifdef HASDARKARTS + a |= 32; +#endif +#ifdef HASIOT + a |= 64; +#endif + push(a); break; + case 2: + push(0); break; /* reserved for system speed identifier */ + +#ifdef HASFLOAT + case 3: push(-1); break; +#else + case 3: push(0); break; +#endif + case 4: push(numsize); break; + case 5: push(maxnum); break; + case 6: push(addrsize); break; + case 7: push(maxaddr); break; + case 8: push(strindexsize); break; + case 9: push(memsize + 1); break; + case 10: push(elength()); break; + case 11: push(GOSUBDEPTH); break; + case 12: push(FORDEPTH); break; + case 13: push(STACKSIZE); break; + case 14: push(BUFSIZE); break; + case 15: push(SBUFSIZE); break; + case 16: push(ARRAYSIZEDEF); break; + case 17: push(defaultstrdim); break; + // - 24 reserved, don't use + case 24: push(top); break; + case 25: push(here); break; + case 26: push(himem); break; + case 27: push(0); break; + case 28: push(freeRam()); break; + case 29: push(gosubsp); break; + case 30: push(loopsp); break; + case 31: push(0); break; // fnc removed as interpreter variable + case 32: push(sp); break; +#ifdef HASDARTMOUTH + case 33: push(data); break; +#else + case 33: push(0); break; +#endif + case 34: push(0); break; +#ifdef FASTTICKERPROFILE + case 35: + push(avgfastticker()); + clearfasttickerprofile(); + break; +#endif + /* - 48 reserved, don't use */ + case 48: push(id); break; + case 49: push(idd); break; + case 50: push(od); break; + case 51: push(odd); break; + default: push(0); + } + break; + /* access to properties of stream 1 - serial */ + case 1: + push(serialstat(arg)); + break; + /* access to properties of stream 2 - display and keyboard */ + case 2: +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + push(dspstat(arg)); +#elif defined(ARDUINOVGA) + push(vgastat(arg)); +#else + push(0); +#endif + break; + /* access to properties of stream 4 - printer */ +#ifdef HASSERIAL1 + case 4: + push(prtstat(arg)); + break; +#endif + /* access to properties of stream 7 - wire */ +#if defined(HASWIRE) + case 7: + push(wirestat(arg)); + break; +#endif + /* access to properties of stream 8 - radio */ +#ifdef HASRF24 + case 8: + push(radiostat(arg)); + break; +#endif + /* access to properties of stream 9 - mqtt */ +#ifdef HASMQTT + case 9: + push(mqttstat(arg)); + break; +#endif + /* access to properties of stream 16 - file */ +#ifdef FILESYSTEMDRIVER + case 16: + push(fsstat(arg)); + break; +#endif + case 32: + /* user function 32 and beyond can be used freely */ + /* all USR values not assigned return 0 */ + default: + if (fn > 31) push(usrfunction(fn, v)); else push(0); + } +} + +/* + CALL currently only to exit the interpreter +*/ +void xcall() { + int r; + + if (!expectexpr()) return; + r = pop(); + switch (r) { + case 0: + /* flush the EEPROM dummy and the output file and then exit */ + eflush(); + ofileclose(); +#if defined(POSIXFRAMEBUFFER) + vgaend(); /* clean up if you have played with the framebuffer */ +#endif + restartsystem(); + break; + /* restart the filesystem - only test code */ + case 1: + fsbegin(); + break; + /* show the banner again */ + case 2: + displaybanner(); + break; + /* hard network start */ + case 3: +#ifdef ARDUINOMQTT + netbegin(); + mqttbegin(); +#endif + break; + /* call values to 31 reserved! */ + default: + /* your custom code into usrcall() */ + if (r > 31) usrcall(r); else { + error(EORANGE); + return; + } + nexttoken(); + return; + } +} +#endif + + +/* the dartmouth stuff */ +#ifdef HASDARTMOUTH +/* + DATA is simply skipped when encountered as a command +*/ +void xdata() { + while (!termsymbol()) nexttoken(); +} + +/* + for READ find the next data record, helper of READ +*/ +void nextdatarecord() { + address_t h; + mem_t s = 1; + + /* save the location of the interpreter and the token we are processing */ + h = here; + + /* data at zero means we need to init it, by searching the first data record */ + if (data == 0) { + here = 0; + while (here < top && token != TDATA) gettoken(); + data = here; + datarc = 1; + } + +processdata: + /* + data at top means we have exhausted all data, + nothing more to be done here, however we simulate + a number value of 0 here and don't throw an error + this is not Dartmouth style, more consistent with + iterables + */ + if (data == top) { + token = NUMBER; + x = 0; + ert = 1; + here = h; + return; + } + + /* we process the data record by setting the here pointer to data and search with gettoken */ + here = data; + gettoken(); + if (token == '-') { + s = -1; + gettoken(); + } + if (token == NUMBER || token == STRING) goto enddatarecord; + if (token == ',') { + gettoken(); + if (token == '-') { + s = -1; + gettoken(); + } + if (token != NUMBER && token != STRING) { + error(EUNKNOWN); + here = h; + return; + } + goto enddatarecord; + } + + if (termsymbol()) { + while (here < top && token != TDATA) gettoken(); + data = here; + goto processdata; + } + + if (DEBUG) { + outsc("** error in nextdata after termsymbol "); + outnumber(data); + outcr(); + } + error(EUNKNOWN); + +enddatarecord: + if (token == NUMBER && s == -1) { + x = -x; /* this is needed because we tokenize only positive numbers */ + s = 1; + } + data = here; + datarc++; + here = h; + + if (DEBUG) { + outsc("** leaving nextdata with data and here "); + outnumber(data); outspc(); + outnumber(here); outcr(); + } +} + +/* + READ - find data records and insert them to variables +*/ +void xread() { + token_t t0; /* remember the left hand side token until the end of the statement, type of the lhs */ + + lhsobject_t lhs; + + mem_t datat; /* the type of the data element */ + address_t lendest, lensource, newlength; + int k; + string_t s; + + +nextdata: + /* look for the variable */ + nexttoken(); + + /* this code evaluates the left hand side - remember type and name */ + copyname(&lhs.name, &name); + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + + + if (DEBUG) { + outsc("** read lefthandside "); + outname(&lhs.name); + outsc(" at here "); + outnumber(here); + outsc(" and data pointer "); + outnumber(data); + outcr(); + } + + + /* if the token after lhs is not a termsymbol or a comma, something is wrong */ + if (!termsymbol() && token != ',') { + error(EUNKNOWN); + return; + } + + /* remember the token we have draw from the stream */ + t0 = token; + + /* find the data and assign */ + nextdatarecord(); + if (!USELONGJUMP && er) return; + + /* assign the value to the lhs - somewhat redundant code to assignment */ + switch (token) { + case NUMBER: + /* a number is stored on the stack */ + assignnumber2(&lhs, x); + break; + case STRING: + if (lhs.name.token != STRINGVAR) { + /* we read a string into a numerical variable */ + if (sr.address) assignnumber2(&lhs, memread2(sr.address)); + else assignnumber2(&lhs, *sr.ir); + } else { + /* we have all we need in sr */ + /* the destination address of the lefthandside, on the fly create included */ + getstring(&s, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + + /* the length of the lefthandside string */ + lendest = s.length; + + if (DEBUG) { + outsc("* read stringcode "); outname(&lhs.name); outcr(); + outsc("** read source string length "); outnumber(sr.length); outcr(); + outsc("** read dest string length "); outnumber(s.length); outcr(); + outsc("** read dest string dimension "); outnumber(s.strdim); outcr(); + } + + /* does the source string fit into the destination */ + if ((lhs.i + sr.length - 1) > s.strdim) { + error(EORANGE); + return; + } + + /* now write the string */ + assignstring(&s, &sr, sr.length); + + /* classical Apple 1 behaviour is string truncation in substring logic */ + newlength = lhs.i + sr.length - 1; + setstringlength(&lhs.name, newlength, lhs.j); + + } + break; + default: + error(EUNKNOWN); + return; + } + + /* next list item */ + if (t0 == ',') goto nextdata; + + /* no nexttoken here as we have already a termsymbol */ + if (DEBUG) { + outsc("** leaving xread with "); outnumber(token); outcr(); + outsc("** at here "); outnumber(here); outcr(); + outsc("** and data pointer "); outnumber(data); outcr(); + } + + /* restore the token for further processing */ + token = t0; +} + +/* + RESTORE sets the data pointer to zero right now +*/ +void xrestore() { + short rec; + + nexttoken(); + + /* a plain restore */ + if (termsymbol()) { + data = 0; + datarc = 1; + return; + } + + /* something with an argument */ + expression(); + if (!USELONGJUMP && er) return; + + /* we search a record */ + rec = pop(); + + /* if we need to search backward, back to the beginning */ + if (rec < datarc) { + data = 0; + datarc = 1; + } + + /* advance to the record or top */ + while (datarc < rec && data < top) nextdatarecord(); + + /* token is poisoned after nextdatarecord, need to cure this here */ + nexttoken(); +} + +/* + DEF a function, functions are tokenized as FN ARRAYVAR to make + name processing easy. +*/ +void xdef() { + address_t a; + + name_t function; /* the name of the function */ + name_t variable; /* the name of the argument */ + + /* do we define a function */ + if (!expect(TFN, EUNKNOWN)) return; + + /* the name of the function, it is tokenized as an array */ + if (!expect(ARRAYVAR, EUNKNOWN)) return; + + copyname(&function, &name); + function.token = TFN; /* set the right type here */ + + /* the argument variable */ + if (!expect('(', EUNKNOWN)) return; + nexttoken(); + if (token == ')') { + zeroname(&variable); + } else if (token == VARIABLE) { + copyname(&variable, &name); + nexttoken(); + } else { + error(EUNKNOWN); + return; + } + if (token != ')') { + error(EUNKNOWN); + return; + } + + /* which type of function do we store is found in token */ + nexttoken(); + + /* ready to store the function */ + if (DEBUG) { + outsc("** DEF FN with function "); + outname(&function); + outsc(" and argument "); + outname(&variable); + outsc(" at here "); + outnumber(here); + outsc(" and token is "); + outnumber(token); + outcr(); + } + + /* find the function, we allow redefinition, currently only functions with 1 argument */ + if ((a = bfind(&function)) == 0) a = bmalloc(&function, 1); + if (DEBUG) { + outsc("** found function structure at "); + outnumber(a); + outcr(); + } + if (!USELONGJUMP && er) return; + + /* no more memory */ + if (a == 0) { + error(EVARIABLE); + return; + } + + /* store the payload */ + + /* first the jump address */ + setaddress(a, memwrite2, here); + a = a + addrsize; + + /* the type of the return value - at the moment only numbers */ + if (token == '=') + memwrite2(a++, VARIABLE); + else + memwrite2(a++, 0); + + /* store the number of variables */ + memwrite2(a++, 1); + + /* store the type and the entire name of the variables */ + memwrite2(a++, variable.token); + setname_pgm(a, &variable); + a = a + sizeof(name_t) - 1; /* reserves space for redefinition of functions with different variable */ + + /* skip the function body during defintion */ + if (token == '=') { + while (!termsymbol()) nexttoken(); + } else { +#if defined(HASMULTILINEFUNCTIONS) + while (token != TFEND) { + nexttoken(); + if (token == TDEF || token == EOL) { + error(EFUN); + return; + } + } + nexttoken(); +#else + error(EFUN); + return; +#endif + } +} + +/* + FN function evaluation, this is a call from factor or directly from + statement, the variable m tells xfn which one it is. 0 is from + factor and 1 is from statement. + + This mechanism is only needed in multiline functions. In this case, + a new interpreter instance is started with statement(). The variable + m decides whether the stack should contain a return value (call from factor) + or should be empty. + + The new function code has local variable capability of the new heap. +*/ +void xfn(mem_t m) { + address_t a; + address_t h1, h2; + name_t variable; + token_t type; + + /* the name of the function and its address */ + if (!expect(ARRAYVAR, EUNKNOWN)) return; + name.token = TFN; + a = bfind(&name); + if (a == 0) { + error(EUNKNOWN); + return; + } + + if (DEBUG) { + outsc("** in xfn found function "); + outname(&name); + outsc(" at "); + outnumber(a); + outcr(); + } + + /* and the argument */ + if (!expect('(', EUNKNOWN)) return; + nexttoken(); + + /* if there is no argument, set it to zero */ + if (token == ')') { + push(0); + } else { + expression(); + if (!USELONGJUMP && er) return; + } + if (token != ')') { + error(EUNKNOWN); + return; + } + + /* where is the function code */ + h1 = getaddress(a, memread2); + a = a + addrsize; + + if (DEBUG) { + outsc("** found function address "); + outnumber(h1); + outcr(); + } + + /* which type of function do we have*/ + type = memread2(a++); + + if (DEBUG) { + outsc("** found function type "); + outnumber(type); + outcr(); + } + + /* the number of variables is always one here */ + a++; + + /* what is the name of the variable, direct read as getname also gets a token */ + /* skip the type here as not needed*/ + // zeroname(&variable); /* fixes the obscure function namehandling bug not needed any more with copyname in place */ + variable.token = memread2(a++); + (void) getname(a, &variable, memread2); + a = a + sizeof(name_t) - 1; + + if (DEBUG) { + outsc("** found function variable "); + outname(&variable); + outcr(); + } + + /* create a local variable and store the value in it if there is a variable */ + if (variable.c[0]) { + if (!bmalloc(&variable, 0)) { + error(EVARIABLE); + return; + } + setvar(&variable, pop()); + } else { + /* create a dummy variable to make sure local variables are cleaned up */ + variable.token = VARIABLE; + variable.c[0] = '_'; + variable.c[1] = 0; + variable.l = 1; + if (!bmalloc(&variable, 0)) { + error(EVARIABLE); + return; + } + } + + /* store here and then evaluate the function */ + h2 = here; + here = h1; + + /* + * For simple singleline function, we directly do expression evaluation. + * This is inexpensive as no new interpreter instance is started. + */ + if (type == VARIABLE) { + if (DEBUG) { + outsc("** evaluating expression at "); + outnumber(here); + outcr(); + } + if (!expectexpr()) return; + } else { +#ifdef HASMULTILINEFUNCTIONS + /* + * Here comes the tricky part, we start a new interpreter instance. + * For multiline functions we generate a new interpreter instance by + * calling statement(). The variable m decides whether the stack should + * contain a return value (call from factor) or should be empty. + * fncontext counts and limits the depth of function calls. This is + * important to avoid stack overflow. For this reason statement() + * should not allocate a lot of memory on the C stack. + */ + + if (DEBUG) { + outsc("** starting a new interpreter instance "); + outcr(); + } + + nexttoken(); + fncontext++; + if (fncontext > FNLIMIT) { + error(EFUN); + return; + } + statement(); + if (!USELONGJUMP && er) return; + if (fncontext > 0) fncontext--; else error(EFUN); +#else + error(EFUN); + return; +#endif + } + + /* now that all the function stuff is done, return to here and set the variable right */ + here = h2; + (void) bfree(&variable); + + + /* now, depending on how this was called, make things right, we remove + the return value from the stack and call nexttoken */ + if (m == 1) { + pop(); + nexttoken(); + } +} + +/* + ON is a bit like IF +*/ + +void xon() { + number_t cr, tmp; + int ci; + token_t t; + int line = 0; + + /* ON can do the ON ERROR and ON EVENT commands as well, in this BASIC + ERROR and EVENT can also be used without the ON */ + + nexttoken(); + switch (token) { +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + return; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + return; +#endif + default: + expression(); + if (!USELONGJUMP && er) return; + } + + /* the result of the condition, can be any number even large */ + cr = pop(); + if (DEBUG) { + outsc("** in on condition found "); + outnumber(cr); + outcr(); + } + + /* is there a goto or gosub */ + if (token != TGOSUB && token != TGOTO) { + error(EUNKNOWN); + return; + } + + /* remember if we do gosub or goto */ + t = token; + + /* how many arguments have we got here */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args == 0) { + error(EARGS); + return; + } + + /* do we have more arguments then the condition? */ + if (cr > args && cr <= 0) ci = 0; else ci = (int)cr; + + /* now find the line to jump to and clean the stack, reuse cr + we need to clean the stack here completely, therefore complete the loop + ERROR handling is needed for the trapping mechanism. No using popaddress() + here, because of the needed stack cleanup. Unclear is this precaution is + really needed. + */ + while (args) { + tmp = pop(); + if (args == ci) { + if (tmp < 0) er = ELINE; + line = tmp; + } + args--; + } + if (!USELONGJUMP && er) return; + + if (DEBUG) { + outsc("** in on found line as target "); + outnumber(line); + outcr(); + } + + /* no line found to jump to */ + if (line == 0) { + nexttoken(); + return; + } + + /* prepare for the jump */ + if (t == TGOSUB) pushgosubstack(0); + if (!USELONGJUMP && er) return; + + findline(line); + if (!USELONGJUMP && er) return; + + /* goto in interactive mode switched to RUN mode + no clearing of variables and stacks */ + if (st == SINT) st = SRUN; + +} +#endif + +/* the structured BASIC extensions, WHILE, UNTIL, and SWITCH */ + +#ifdef HASSTRUCT +void xwhile() { + + /* what? */ + if (DEBUG) { + outsc("** in while "); + outnumber(here); + outspc(); + outnumber(token); + outcr(); + } + + /* interactively we need to save the buffer location */ + if (st == SINT) here = bi - ibuffer; + + /* save the current location and token type, here points to the condition, name is irrelevant */ + pushloop(0, TWHILE, here, 0, 0); + + /* is there a valid condition */ + if (!expectexpr()) return; + + /* if false, seek WEND and clear the stack*/ + if (!pop()) { + droploop(); + if (st == SINT) bi = ibuffer + here; + nexttoken(); + findbraket(TWHILE, TWEND); + nexttoken(); + } +} + +void xwend() { + blocation_t l; + bloop_t* loop; + + /* remember where we are */ + pushlocation(&l); + + /* back to the condition */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + + /* is this a while loop */ + if (loop->var.token != TWHILE ) { + error(TWEND); + return; + } + + /* interactive run or program run */ + if (st == SINT) bi = ibuffer + loop->here; else here = loop->here; + + /* is there a valid condition */ + if (!expectexpr()) return; + + /* if false, seek WEND */ + if (!pop()) { + droploop(); + poplocation(&l); + nexttoken(); + } +} + +void xrepeat() { + /* what? */ + if (DEBUG) { + outsc("** in repeat "); + outnumber(here); + outspc(); + outnumber(token); + outcr(); + } + + /* interactively we need to save the buffer location */ + if (st == SINT) here = bi - ibuffer; + + /* save the current location and token type, here points statement after repeat */ + pushloop(0, TREPEAT, here, 0, 0); + + /* we are done here */ + nexttoken(); +} + +void xuntil() { + blocation_t l; + bloop_t* loop; + + /* is there a valid condition */ + if (!expectexpr()) return; + + /* remember the location */ + pushlocation(&l); + + /* look on the stack */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + + /* if false, go back to the repeat */ + if (!pop()) { + + /* the right loop type ? */ + if (loop->var.token != TREPEAT) { + error(TUNTIL); + return; + } + + /* correct for interactive */ + if (st == SINT) bi = ibuffer + loop->here; else here = loop->here; + + } else { + + /* back to where we were */ + droploop(); + poplocation(&l); + } + + nexttoken(); /* a bit of evil here, hobling over termsymbols */ +} + +void xswitch() { + number_t r; + mem_t match = 0; + mem_t swcount = 0; + blocation_t l; + + /* lets look at the condition */ + if (!expectexpr()) return; + r = pop(); + + /* remember where we are */ + pushlocation(&l); + + /* seek the first case to match the condition */ + while (token != EOL) { + if (token == TSWEND) break; + /* nested SWITCH - skip them all*/ + if (token == TSWITCH) { + + if (DEBUG) { + outsc("** in SWITCH - nesting found "); + outcr(); + } + + nexttoken(); + findbraket(TSWITCH, TSWEND); + + if (DEBUG) { + outsc("** in SWITCH SWEND found at "); + outnumber(here); + outcr(); + } + + if (!USELONGJUMP && er) return; + } + /* a true case */ + if (token == TCASE) { + + /* more sophisticated, case can have an argument list */ + nexttoken(); + parsearguments(); + + if (DEBUG) { + outsc("** in CASE found "); + outnumber(args); + outsc(" arguments"); + outcr(); + } + + if (!USELONGJUMP && er) return; + if (args == 0) { + error(TCASE); + return; + } + while (args > 0) { + if (pop() == r) match = 1; + args--; + } + + if (match) { + return; + } + } + nexttoken(); + } + + /* return to the original location and continue if no case is found */ + poplocation(&l); +} + +/* a nacked case statement always seeks the end of the switch, + currently SWITCH statements cannot be nested. */ +void xcase() { + while (token != EOL) { + nexttoken(); + if (token == TSWEND) break; + } +} +#endif + + +/* + statement processes an entire basic statement until the end + of the line. + + The statement loop is a bit odd and requires some explanation. + A statement function called in the central switch here must either + call nexttoken as its last action to feed the loop with a new token + and then break or it must return which means that the rest of the + line is ignored. A function that doesn't call nexttoken and just + breaks causes an infinite loop. + + statement is called once in interactive mode and terminates + at end of a line. +*/ + +void statement() { + mem_t xc; + + if (DEBUG) bdebug("statement \n"); + + /* we can long jump out out any function now, making error handling easier */ + /* if we return here with a long jump, only the error handler is triggered */ + /* this mechanism always branches to the highest context */ +#if USELONGJUMP == 1 + if (fncontext == 0) if (setjmp(sthook)) goto errorhandler; +#endif + + /* the core loop processing commands */ + while (token != EOL) { +#ifdef HASSTEFANSEXT + /* debug level 1 happens only in the statement loop */ + if (debuglevel == 1) { + debugtoken(); + outcr(); + } +#endif + switch (token) { + case ':': + case LINENUMBER: + nexttoken(); + break; + /* Palo Alto BASIC language set + BREAK */ + case TPRINT: + xprint(); + break; + case TLET: + nexttoken(); + if ((token != ARRAYVAR) && (token != STRINGVAR) && (token != VARIABLE)) { + error(EUNKNOWN); + break; + } + case STRINGVAR: + case ARRAYVAR: + case VARIABLE: + assignment(); + break; + case TINPUT: + xinput(); + break; + case TRETURN: +#ifndef HASMULTILINEFUNCTIONS + xreturn(); +#else + if (fncontext > 0) { + nexttoken(); + if (termsymbol()) { + push(0); + } + else expression(); + return; /* this returns from statement and ends one interpreter instance */ + } else + xreturn(); /* while this happens inside the instance */ +#endif + break; +#ifndef HASMULTILINEFUNCTIONS + case TGOSUB: + case TGOTO: + xgoto(); + break; +#else + case TGOSUB: + if (fncontext > 0) { + error(EFUN); + return; + } + case TGOTO: + xgoto(); + break; +#endif + case TIF: + xif(); + break; + case TFOR: + xfor(); + break; + case TNEXT: + xnext(); + break; + case TBREAK: + xbreak(); + break; + case TSTOP: + case TEND: /* return here because new input is needed, end as a block end is handles elsewhere */ + *ibuffer = 0; /* clear ibuffer - this is a hack */ + st = SINT; /* switch to interactive mode */ + eflush(); /* if there is an EEPROM dummy, flush it here (protects flash storage!) */ + ofileclose(); + nexttoken(); + if (token == TSTOP) { + restartsystem(); + } + *ibuffer = 0; /* clear ibuffer - this is a hack */ + st = SINT; /* switch to interactive mode */ + return; /* leave the interpreter instance */ + case TLIST: + xlist(); + break; + case TNEW: /* return here because new input is needed */ + xnew(); + return; + case TCONT: /* cont behaves differently in interactive and in run mode */ + if (st == SRUN || st == SERUN) { + xcont(); + break; + } /* no break here, because interactively CONT=RUN minus CLR */ + case TRUN: + xrun(); + return; + case TREM: + xrem(); + break; + /* Apple 1 language set */ +#ifdef HASAPPLE1 + case TDIM: + xdim(); + break; + case TCLR: + xclr(); + break; + case TTAB: + case TSPC: + xtab(); + break; + case TPOKE: + xpoke(); + break; +#endif + /* Stefan's tinybasic additions */ + case TSAVE: + xsave(); + break; + case TLOAD: + xload(0); + if (st == SINT) return; /* interactive load doesn't like break as the ibuffer is messed up; */ + else break; +#ifdef HASSTEFANSEXT + case TDUMP: + xdump(); + break; + case TGET: + xget(); + break; + case TPUT: + xput(); + break; + case TSET: + xset(); + break; + case TNETSTAT: + xnetstat(); + break; + case TCLS: + ax = od; + /* if we have a display it is the default for CLS */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + od = ODSP; +#endif + outch(12); + od = ax; + nexttoken(); + break; + case TLOCATE: + xlocate(); + break; +#endif +#ifdef HASUSRCALL + /* low level functions */ + case TCALL: + xcall(); + break; +#endif + /* Arduino IO */ +#ifdef HASARDUINOIO + case TDWRITE: + xdwrite(); + break; + case TAWRITE: + xawrite(); + break; + case TPINM: + xpinm(); + break; + case TDELAY: + xdelay(); + break; +#ifdef HASTONE + case TTONE: + xtone(); + break; +#endif +#ifdef HASPULSE + case TPULSE: + xpulse(); + break; +#endif +#endif + /* BASIC DOS function */ +#ifdef HASFILEIO + case TCATALOG: + xcatalog(); + break; + case TDELETE: + xdelete(); + break; + case TOPEN: + xopen(); + break; + case TCLOSE: + xclose(); + break; + case TFDISK: + xfdisk(); + break; +#endif + /* graphics */ +#ifdef HASGRAPH + case TCOLOR: + xcolor(); + break; + case TPLOT: + xplot(); + break; + case TLINE: + xline(); + break; + case TRECT: + xrect(); + break; + case TCIRCLE: + xcircle(); + break; + case TFRECT: + xfrect(); + break; + case TFCIRCLE: + xfcircle(); + break; +#endif +#ifdef HASDARTMOUTH + case TDATA: + xdata(); + break; + case TREAD: + xread(); + break; + case TRESTORE: + xrestore(); + break; + case TDEF: + xdef(); + break; + case TON: + xon(); + break; +#ifdef HASMULTILINEFUNCTIONS + case TFN: + xfn(1); + break; + case TFEND: + /* we leave the statement loop and return to the calling expression() */ + /* if the function is ended with FEND we return 0 */ + if (fncontext == 0) { + error(EFUN); + return; + } + else { + push(0); + return; + } + break; +#endif +#endif +#ifdef HASSTEFANSEXT + case TELSE: + xelse(); + break; +#endif +#ifdef HASDARKARTS + case TEVAL: + xeval(); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + break; +#endif +#ifdef HASIOT + case TSLEEP: + xsleep(); + break; + case TWIRE: + xwire(); + break; +#endif +#ifdef HASTIMER + case TAFTER: + case TEVERY: + xtimer(); + break; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + break; +#endif +#ifdef HASSTRUCT + case TWHILE: + xwhile(); + break; + case TWEND: + xwend(); + break; + case TREPEAT: + xrepeat(); + break; + case TUNTIL: + xuntil(); + break; + case TSWITCH: + xswitch(); + break; + case TCASE: + xcase(); + break; + case TSWEND: + case TDO: + case TDEND: + nexttoken(); + break; +#endif +#ifdef HASEDITOR + case TEDIT: + xedit(); + break; +#endif +#ifdef HASHELP + case THELP: + xhelp(); + break; +#endif + default: + /* strict syntax checking */ + error(EUNKNOWN); + goto errorhandler; + } + + + /* + after each statement we check on a break character + on an Arduino entering "#" at runtime stops the program + for BREAKINBACKGROUND we do this in the background loop + to avoid slowing down. + */ +#if defined(BREAKCHAR) +#ifndef BREAKINBACKGROUND + if (checkch() == BREAKCHAR) { + st = SINT; + if (od == 1) serialflush(); else xc = inch(); + return; + } +#else + if (breakcondition) { + breakcondition = 0; + st = SINT; + if (od == 1) serialflush(); else xc = inch(); + return; + } +#endif +#endif + + /* and after each statement, check the break pin */ +#if defined(BREAKPIN) + if (getbreakpin() == 0) { + st = SINT; + return; + }; +#endif + + /* and then there is also signal handling on some platforms */ +#if defined(POSIXSIGNALS) + if (breaksignal) { + st = SINT; + breaksignal = 0; + serialflush(); + outcr(); + return; + } +#endif + + /* yield after each statement which is a 10-100 microsecond cycle + on Arduinos and the like, all background tasks are handled in byield */ + byield(); + + /* if error handling is compiled into the code, errors can be trapped here */ +errorhandler: +#ifdef HASERRORHANDLING + if (er) { + if (st != SINT) { + erh = er; + er = 0; + switch (berrorh.type) { + case TCONT: + while (!termsymbol()) nexttoken(); + break; + case TGOTO: + findline(berrorh.linenumber); + berrorh.type = 0; + berrorh.linenumber = 0; + if (er) return; + break; + case 0: + return; + default: + nexttoken(); + } + } else + return; + } +#else + /* when an error is encountered the statement loop is ended */ + if (er) return; +#endif + + /* + if we run error free, interrupts and times can be processed + + We can savely interrupt and return only if here points either to + a termsymbol : or LINENUMBER. NEXT is a special case. We need to + catch this here because empty FOR loops never even have a termsymbol + a ":"" is swallowed after FOR. This is probably also true for + WHILE and REPEAT loops but has not been tested yet. + + The interrupts are only triggered in fncontext 0, i.e. in the + main loop. While in functions, all interrupts are disabled. + + */ + + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { + +/* timer functions are processed before events */ +#ifdef HASTIMER + /* after is always processed before every */ + if (after_timer.enabled && fncontext == 0) { + if (millis() > after_timer.last + after_timer.interval) { + after_timer.enabled = 0; + if (after_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here -= (1 + sizeof(address_t)); + pushgosubstack(0); + } + findline(after_timer.linenumber); + if (er) return; + } + } + /* periodic events */ + if (every_timer.enabled && fncontext == 0) { + if (millis() > every_timer.last + every_timer.interval) { + every_timer.last = millis(); + if (every_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here -= (1 + sizeof(address_t)); + pushgosubstack(0); + if (er) return; + } + findline(every_timer.linenumber); + if (er) return; + } + } + #endif + /* the branch code for interrupts, we round robin through the event list */ +#ifdef HASEVENTS + /* interrupts */ + if (nevents > 0 && events_enabled && fncontext == 0) { + for (xc = 0; xc < EVENTLISTSIZE; xc++) { + if (eventlist[ievent].pin && eventlist[ievent].enabled && eventlist[ievent].active) { + if (eventlist[ievent].type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here -= (1 + sizeof(address_t)); + pushgosubstack(TEVENT); + if (er) return; + } + findline(eventlist[ievent].linenumber); /* here we jump to the new line */ + if (er) return; + eventlist[ievent].active = 0; + enableevent(eventlist[ievent].pin); /* events are disabled in the interrupt function, here they are activated again */ + events_enabled = 0; /* once we have jumped, we keep the events in BASIC off until reenabled by the program */ + break; + } + ievent = (ievent + 1) % EVENTLISTSIZE; + } + } +#endif + } + } +} + +/* + the banner message +*/ +void displaybanner() { + int i; + printmessage(MGREET); outspc(); + printmessage(EOUTOFMEMORY); outspc(); + if (memsize < maxnum) outnumber(memsize + 1); else { + outnumber(memsize / 1024 + 1); + outch('k'); + } + outspc(); +#ifdef HASERRORHANDLING + printmessage(EEEPROM); + outspc(); +#endif + outnumber(elength()); + outcr(); +#ifdef HASHELP + outsc(getmessage(MLANGSET)); + outsc(getmessage(MBASICLANGSET)); outcr(); + outsc("IO: "); + for (i = 0; i < 32; i++) { + if (iostat(i)) { + outnumber(i); outspc(); + } + } + outcr(); +#endif +} + +/* + the setup routine - Arduino style +*/ +void setup() { + + /* start measureing time */ + timeinit(); + + /* initialize the event system */ +#ifdef HASEVENTS + initevents(); +#endif + + /* init all io functions */ + ioinit(); +#ifdef FILESYSTEMDRIVER + // if (fsstat(1) == 1 && fsstat(2) > 0) outsc("Filesystem started\n"); +#endif + + /* setup for all non BASIC stuff */ + bsetup(); + + /* get the BASIC memory, either as memory array with + ballocmem() or as an SPI serical memory */ +#if (defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR)) && (!defined(MEMSIZE) || MEMSIZE == 0) + himem = memsize = spirambegin(); +#else +#if defined(EEPROMMEMINTERFACE) + /* + for an EEPROMMEM system, the memory consists of the + EEPROM from 0 to elength()-eheadersize and then the RAM. + */ + himem = memsize = ballocmem() + (elength() - eheadersize); +#else + himem = memsize = ballocmem(); +#endif +#endif + +#ifndef EEPROMMEMINTERFACE + if (DEBUG) { + outsc("** on startup, memsize is "); + outnumber(memsize); + outcr(); + } + + /* be ready for a new program if we run on RAM*/ + xnew(); + + if (DEBUG) { + outsc("** on startup, ran xnew "); + outcr(); + } +#else + /* if we run on an EEPROM system, more work is needed */ + if (eread(0) == 0 || eread(0) == 1) { /* have we stored a program and don't do new */ + top = getaddress(1, beread); + resetbasicstate(); /* the little brother of new, reset the state but let the program memory be */ + for (address_t a = elength(); a < memsize; a++) memwrite2(a, 0); /* clear the heap i.e. the basic RAM*/ + } else { + eupdate(0, 0); /* now we have stored a program of length 0 */ + setaddress(1, beupdate, 0); + xnew(); + } +#endif + + /* check if there is something to autorun and prepare + the interpreter to got into autorun once loop is reached */ + if (!autorun()) displaybanner(); + + /* activate the BREAKPIN */ + breakpinbegin(); +} + +/* + the loop routine for interactive input +*/ +void loop() { + + /* + autorun state was found in setup, autorun now but only once + autorun BASIC programs return to interactive after completion + autorun code always must loop in itself + */ + if (st == SERUN) { + xrun(); + /* on an EEPROM system we don't set top to 0 here */ +#ifndef EEPROMMEMINTERFACE + top = 0; +#endif + st = SINT; + } else if (st == SRUN) { + here = 0; + xrun(); + st = SINT; + } + + /* always return to default io channels once interactive mode is reached */ + iodefaults(); + form = 0; + + /* the prompt and the input request */ + printmessage(MPROMPT); + (void) ins(ibuffer, BUFSIZE - 2); + + /* tokenize first token from the input buffer */ + bi = ibuffer; + nexttoken(); + + /* a number triggers the line storage, anything else is executed */ + if (token == NUMBER) { + ax = x; + storeline(); + + /* on an EEPROM system we store top after each succesful line insert */ +#ifdef EEPROMMEMINTERFACE + setaddress(1, beupdate, top); +#endif + } else { + /* st=SINT; */ + statement(); + st = SINT; + } + + /* here, at last, all errors need to be catched and back to interactive input*/ + if (er) reseterror(); + +} + +/* if we are not on an Arduino, we need a main */ +#ifndef ARDUINO +int main(int argc, char* argv[]) { + + /* save the arguments if there are any */ +#ifdef HASARGS + bargc = argc; + bargv = argv; +#endif + + /* do what an Arduino would do, this loops for every interactive input */ + setup(); + while (1) + loop(); +} +#endif + +/* + Arduino style function for non BASIC code to run on the MCU. + All code that needs to run on the MCU independently can be put here. + It works more or less just like the normal loop() and setup(). + + This is meant for robotics and other device control type of stuff + on the Arduino platform. + + On POSIX systems I/O is blocking and therefore bloop() is not called + consistently. + + Rules of the game: + - bsetup() is called once during interpreter startup after all + IO subsystems are started and before the BASIC main memory is + allocated. Allocate memory here. Do not allocate a lot of memory + in bloop(). + - Never start or restart I/O functions of BASIC in bsetup(), + no Wire.begin(), Serial.begin() etc. If BASIC also uses this + BASIC handles the I/O startup. Things that BASIC does not use + can be started here. + - bloop() is called after every token, during I/O polling and in + DELAY functions. + - The typical call frequency of bloop() is 20 microseconds or faster. + This is fairly constant and reliable. + - The interpreter is robust against code in bloop() that needs a lot + of CPU time. It will simply slow down but it will not break, + unless(!) other I/O systems like network also need background CPU time + and you block bloop for a long time. As a rule of thumb, on network systems + bloop() should return after 1 ms. After bloop() has returned, the interpreter + tries to handle network and USB update stuff. + - Never use delay() in bloop(). Set a counter. Look at the tone + emulation code for examples. + - Never ever call BASIC functions from bloop(). BASIC function will + eventually call byield() which calls bloop() and so forth. + If you need to communicate data into BASIC, use the BASIC main + memory, variables or the USR function mechanism. + - Avoid allocating a lot of memory in bloop(). +*/ + +void bsetup() { + /* put your setup code here, to run once: */ + +} + +void bloop() { + /* put your main code here, to run repeatedly: */ + +} diff --git a/data/Basic2/Posix/basic.h b/data/Basic2/Posix/basic.h new file mode 100644 index 0000000000000000000000000000000000000000..1cf966b3db1cd32804bf210301214c2e2dc8b4ab --- /dev/null +++ b/data/Basic2/Posix/basic.h @@ -0,0 +1,829 @@ +/* + * + * $Id: basic.h,v 1.1 2023/09/27 15:23:20 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * basic.h are the core defintions and function protypes. + * + */ + +/* + * A few of the buffers and vars come from hardware.h. These are + * + * #define BUFSIZE + * #define STACKSIZE + * #define GOSUBDEPTH + * #define FORDEPTH + * #define LINECACHESIZE + * + * They depend on the hardware architecture and are configured there. + * + */ + +/* Additional buffers and vars, VARSIZE only needed for Tinybasics */ +#define SBUFSIZE 16*sizeof(number_t) +#define VARSIZE 26 + +/* Default sizes of arrays and strings if they are not DIMed */ +#define ARRAYSIZEDEF 10 +#define STRSIZEDEF 32 + +/* the maximum name length */ +#define MAXNAME 32 + +/* + * The tokens for the BASIC keywords + * + * All single character operators are their own tokens + * ASCII values above 0x7f are used for tokens of keywords. + * EOL is a token. + * + * The two byte tokens are possible to extend the language beyond + * 127 keywords. + */ +#define EOL 0 +#define NUMBER -127 +#define LINENUMBER -126 +#define STRING -125 +#define VARIABLE -124 +#define STRINGVAR -123 +#define ARRAYVAR -122 +/* multi character tokens - BASEKEYWORD (3) */ +#define GREATEREQUAL -121 +#define LESSEREQUAL -120 +#define NOTEQUAL -119 +/* this is the Palo Alto Language Set (19) */ +#define TPRINT -118 +#define TLET -117 +#define TINPUT -116 +#define TGOTO -115 +#define TGOSUB -114 +#define TRETURN -113 +#define TIF -112 +#define TFOR -111 +#define TTO -110 +#define TSTEP -109 +#define TNEXT -108 +#define TSTOP -107 +#define TLIST -106 +#define TNEW -105 +#define TRUN -104 +#define TABS -103 +#define TRND -102 +#define TSIZE -101 +#define TREM -100 +/* this is the Apple 1 language set in addition to Palo Alto (14) */ +#define TNOT -99 +#define TAND -98 +#define TOR -97 +#define TLEN -96 +#define TSGN -95 +#define TPEEK -94 +#define TDIM -93 +#define TCLR -92 +#define THIMEM -91 +#define TTAB -90 +#define TTHEN -89 +#define TEND -88 +#define TPOKE -87 +/* Stefan's tinybasic additions (14) */ +#define TCONT -86 +#define TSQR -85 +#define TPOW -84 +#define TMAP -83 +#define TDUMP -82 +#define TBREAK -81 +#define TSAVE -80 +#define TLOAD -79 +#define TGET -78 +#define TPUT -77 +#define TSET -76 +#define TCLS -75 +#define TLOCATE -74 +#define TELSE -73 +/* Arduino functions (10) */ +#define TPINM -72 +#define TDWRITE -71 +#define TDREAD -70 +#define TAWRITE -69 +#define TAREAD -68 +#define TDELAY -67 +#define TMILLIS -66 +#define TTONE -65 +#define TPULSE -64 +#define TAZERO -63 +#define TLED -62 +/* the DOS functions (5) */ +#define TCATALOG -61 +#define TDELETE -60 +#define TOPEN -59 +#define TCLOSE -58 +#define TFDISK -57 +/* low level access of internal routines (2) */ +#define TUSR -56 +#define TCALL -55 +/* mathematical functions (7) */ +#define TSIN -54 +#define TCOS -53 +#define TTAN -52 +#define TATAN -51 +#define TLOG -50 +#define TEXP -49 +#define TINT -48 +/* graphics - rudimentary (7) */ +#define TCOLOR -47 +#define TPLOT -46 +#define TLINE -45 +#define TCIRCLE -44 +#define TRECT -43 +#define TFCIRCLE -42 +#define TFRECT -41 +/* the Dartmouth extensions (6) */ +#define TDATA -40 +#define TREAD -39 +#define TRESTORE -38 +#define TDEF -37 +#define TFN -36 +#define TON -35 +/* darkarts (3) */ +#define TMALLOC -34 +#define TFIND -33 +#define TEVAL -32 +/* iot extensions (9) */ +#define TERROR -31 +#define TAVAIL -30 +#define TSTR -29 +#define TINSTR -28 +#define TVAL -27 +#define TNETSTAT -26 +#define TSENSOR -25 +#define TWIRE -24 +#define TSLEEP -23 +/* events and interrupts */ +#define TAFTER -22 +#define TEVERY -21 +#define TEVENT -20 +/* structured commands */ +#define TWHILE -19 +#define TWEND -18 +#define TREPEAT -17 +#define TUNTIL -16 +#define TSWITCH -15 +#define TCASE -14 +#define TSWEND -13 +#define TDO -12 +#define TDEND -11 +/* multiline function extension */ +#define TFEND -10 +/* these are multibyte token extension, currently unused */ +/* using them would allow over 1000 BASIC keywords */ +#define TEXT7 -9 +#define TEXT6 -8 +#define TEXT5 -7 +#define TEXT4 -6 +#define TEXT3 -5 +#define TEXT2 -4 +#define TEXT1 -3 +/* end of tokens */ +/* constants used for some purposes other than token */ +/* Indentifying a buffer on the heap */ +#define TBUFFER -2 +/* UNKNOWN is not used in the current code, the + * lexer tokenizes everything blindly. There is a UNKNOWN hook + * in statement for a grammar aware lexer */ +#define UNKNOWN -1 + +/* alternative implementation using positive token values */ +#define TASC 1 +#define TCHR 2 +#define TRIGHT 3 +#define TLEFT 4 +#define TMID 5 +#define TSPC 6 + +/* The editor and other helpers */ +#define TEDIT 7 +#define THELP 8 + +/* bitwise operations, avoid 10 as a token value */ +#define TSHL 9 +#define TSHR 11 +#define TBIT 12 +/* + * Extension tokens can be in the range from -128 upwards. + * one needs to set HASLONGTOKENS. Currently ony one set of + * extension tokens is implemented ranging from -128 to -255. + * + * **** right now unused and untested **** */ + +/* BASEKEYWORD is used by the lexer. From this keyword on it tries to match. */ +#define BASEKEYWORD -121 + +/* + * Interpreter states + * SRUN means running from a programm + * SINT means interactive mode + * SERUN means running directly from EEPROM + * (enum would be the right way of doing this.) + */ +#define SINT 0 +#define SRUN 1 +#define SERUN 2 + +/* + * the message catalog + */ +#define MFILE 0 +#define MPROMPT 1 +#define MGREET 2 +#define MLINE 3 +#define MNUMBER 4 +#define MVARIABLE 5 +#define MARRAY 6 +#define MSTRING 7 +#define MSTRINGVAR 8 +#define EGENERAL 9 +#define EUNKNOWN 10 +#define ENUMBER 11 +#define EDIVIDE 12 +#define ELINE 13 +#define EOUTOFMEMORY 14 +#define ESTACK 15 +#define EORANGE 16 +#define ESTRING 17 +#define EVARIABLE 18 +#define ELOOP 19 +#define EFILE 20 +#define EFUN 21 +#define EARGS 22 +#define EEEPROM 23 +#define ESDCARD 24 +#define MBASICLANGSET 25 +#define MLANGSET 26 +#define MKEYWORDS 27 + + +/* + * code for variable numbers and addresses sizes + * the original code was 16 bit but can be extended here + * to arbitrary types + * + * number_t is the type for numerical work - either float or int + * wnumber_t is the type containing the largest printable integer, + * for float keep this int on 32 bit and long on 8 bit unless you + * want to use very long integers, like 64 or 128 bit types. + * address_t is an unsigned type adddressing memory, default 16bit + * mem_t is a SIGNED 8bit character type. + * index_t is a SIGNED minimum 16 bit integer type + * + * works with the tacit assumption that + * sizeof(number_t) >= sizeof(address_t) + * and that the entire memory is smaller than the positive + * part of number type (!!) + * + * we assume that float >= 4 bytes in the following + * + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: the index size of strings either + * 1 byte or 2 bytes - no other values supported + */ +#ifdef HASFLOAT +#ifdef HAS64BIT +typedef double number_t; +typedef long long wnumber_t; +#else +typedef float number_t; +typedef long long wnumber_t; +#endif +#else +#ifdef HAS64BIT +typedef int64_t number_t; +typedef int64_t wnumber_t; +#elif defined(HAS32BITINT) +typedef int32_t number_t; +typedef int32_t wnumber_t; +#else +typedef int number_t; +typedef int wnumber_t; +#endif +#endif +/* default is 16bit addresses and max 64k memory, setting MEMSIZE in hardware.h overrides this */ +#if !defined(MEMSIZE) || MEMSIZE < 65536 +typedef uint16_t address_t; /* this type addresses memory */ +#else +/* use this for large memory systems, tested occassionally */ +typedef uint32_t address_t; +#endif +typedef int8_t mem_t; /* a signed 8 bit type for the memory */ +typedef int index_t; /* this type counts at least 16 bit */ +#ifndef HASLONGTOKENS +typedef int8_t token_t; /* the type of tokens, normally mem_t with a maximum of 127 commands and data types */ +#else +typedef int16_t token_t; /* token type extension, allows more commands and symbols */ +#endif + +/* the memreader function type, a function accessing memory has to have this shape */ +typedef mem_t (*memreader_t)(address_t); +typedef void (*memwriter_t)(address_t, mem_t); + +/* the worker function type - experimental */ +typedef void (*bworkfunction_t)(); + +/* the location type, this is the cursor on the actual interpreter location */ +typedef struct { + address_t location; + token_t token; +} blocation_t; + + +/* the new string type used in the reimplementation of the string functions */ +/* + * stringlength_t is the maximum length of a string, currently only 2 bytes is really tested. + * one byte lengthes may work, will be fixed soon to arbitrary types + * + * string_t says where we can find a string. It is either in BASIC memory and has a valid BASIC memory + * address a, or it is in C memory outside mem[]. Then ir says where the string can be found. + * This is necessary because BASIC can handle different memory layouts, EEPROM models and serial + * memory chips. We cannot simply rely on data to be found in BASIC memory like in old 8 bit + * computers or all in C memory like on modern Linux/Windows/Mac systems. + * + * Components of the string_t: + * - the address of the string in BASIC memory + * - the C memory pointer ir to the string location, if this is 0, the string is somewhere outside C memory + * - the length of the entire string + * - the dimension of the string strdim, this is the length of the memory segment reserved for the string + * - the dimension of the string array, arraydim + */ + +typedef uint16_t stringlength_t; + +typedef struct { + address_t address; + char* ir; + stringlength_t length; + address_t strdim; + address_t arraydim; +} string_t; + +/* + * Two types for identifiying objects and lefthandsides. + * name_t is the type for variable names and types. + * lhsobject_t identifies an assignable object like variables, + * arrays and strings. + * + * Currently name_t only implements two letter objects and lhsobject_t + * only implements two dimensional arrays and one dimensional strings. + */ +typedef struct { + token_t token; + mem_t c[MAXNAME]; + mem_t l; +} name_t; + +/* used to identify mostly lefthandsides and some righthandsides with these conventions */ +typedef struct { + name_t name; /* the name of a variable */ + address_t i; /* the start value of a substring or the first index of a number array */ + address_t j; /* the second index of an array */ + address_t i2; /* the second value of a substring string */ + mem_t ps; /* flag to indicate a pure string */ +} lhsobject_t; + +/* heap objects have a name a size and a payload address */ +typedef struct { + name_t name; + address_t address; + address_t size; +} heap_t; + +/* + * a general loop time, needed for the reimplementation of all loops + * the loop time knows the variable of a for loop or alternatively + * the type of the for loop. For this the token field of the name is + * reused. At also knows the here address of the loops beginning and optinally + * the end and the step + */ +typedef struct { + name_t var; + address_t varaddress; /* experimental to speed up loops */ + address_t here; + number_t to; + number_t step; +} bloop_t; + +/* + * The accumulator type, used for the stack and the + * arithmetic operations. + */ +typedef union { + number_t n; + address_t a; + index_t i; + stringlength_t s; + mem_t c[sizeof(number_t)]; +} accu_t; + +/* the timer type, knows the linenumber and all the data of the timer */ +typedef struct { + mem_t enabled; + unsigned long last; + unsigned long interval; + mem_t type; + address_t linenumber; +} btimer_t; + +/* + * The events API for Arduino with interrupt service routines + * analogous to the timer API. + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + */ + +/* event type for external events */ +typedef struct { + mem_t enabled; + mem_t pin; + mem_t mode; + mem_t type; + address_t linenumber; + mem_t active; +} bevent_t; + +/* + * Function prototypes, ordered by layers + * HAL - hardware abstraction + * Layer 0 - memory and I/O + * Layer 1 - Program storage and control + * Layer 2 - Where stuff happens + */ + +/* + * Layer 0 functions - I/O and memory management + */ + +/* event types and functions */ +void bintroutine0(); +void bintroutine1(); +void bintroutine2(); +void bintroutine3(); +mem_t enableevent(mem_t); +void disableevent(mem_t); +mem_t eventindex(mem_t); +mem_t addevent(mem_t, mem_t, mem_t, address_t); +void deleteevent(mem_t); +volatile bevent_t* findevent(mem_t); + +/* make room for BASIC */ +address_t ballocmem(); + +/* handle files im EEPROM */ +void eload(); +void esave(); + +/* starts programs from the filesystem */ +char autorun(); + +/* display a startup banner */ +void displaybanner(); + +/* the variable heap from Apple 1 BASIC */ +address_t bmalloc(name_t*, address_t); +address_t bfind(name_t*); +address_t bfree(name_t*); +address_t blength (name_t*); + +/* normal variables of number_t */ +number_t getvar(name_t*); +void setvar(name_t*, number_t); +void clrvars(); + +/* the new set of functions for memory access */ +number_t getnumber(address_t, memreader_t); +address_t getaddress(address_t, memreader_t); +stringlength_t getstrlength(address_t, memreader_t); +void setnumber(address_t, memwriter_t, number_t); +void setaddress(address_t, memwriter_t, address_t); +void setstrlength(address_t, memwriter_t, stringlength_t); + +/* setting names */ +address_t setname_heap(address_t, name_t*); +address_t setname_pgm(address_t, name_t*); +address_t getname(address_t, name_t*, memreader_t); +mem_t cmpname(name_t*, name_t*); +void zeroname(name_t*); +void zeroheap(heap_t*); + +/* array and string handling */ +/* the multidim extension is experimental, here only 2 array dimensions implemented as test */ +address_t createarray(name_t*, address_t, address_t); +void array(lhsobject_t*, mem_t, number_t*); +address_t createstring(name_t*, address_t, address_t); +void getstring(string_t*, name_t*, address_t, address_t); +void setstringlength(name_t*, address_t, address_t); + +/* the user defined extension functions */ +number_t getusrvar(); +void setusrvar(number_t); +number_t getusrarray(address_t); +void setusrarray(address_t, number_t); +void makeusrstring(); +number_t usrfunction(address_t, number_t); +void usrcall(address_t); + +/* get keywords and tokens from PROGMEM */ +char* getkeyword(address_t); +char* getmessage(char); +token_t gettokenvalue(address_t); +void printmessage(char); + +/* error handling */ +void error(token_t); +void reseterror(); +void debugtoken(); +void bdebug(const char*); + +/* the arithemtic stack */ +void push(number_t); +number_t pop(); +address_t popaddress(); +void drop(); +void clearst(); + +/* READ DATA handling */ +void clrdata(); + +/* FOR NEXT GOSUB stacks */ +void pushforstack(name_t*, number_t, number_t); +void popforstack(name_t*, number_t*, number_t*); +void dropforstack(); +void clrforstack(); +void pushgosubstack(mem_t); +void popgosubstack(); +void dropgosubstack(); +void clrgosubstack(); + +/* handling location rewinds */ +void pushlocation(blocation_t*); +void poplocation(blocation_t*); + +/* signal handling */ +void signalon(); +void signaloff(); +void signalhandler(int); + +/* output */ +void outcr(); +void outspc(); +void outsc(const char*); +void outscf(const char *, index_t); + +/* console logger as external function for runtime */ +void consolelog(char*); +void consolelognum(int); + +/* output a name */ +void outname(name_t*); + +/* I/O of number_t - floats and integers */ +address_t parsenumber(char*, number_t*); +address_t parsenumbern(char*, number_t*); /* can do hex,oct,bin */ +address_t parsenumber2(char*, number_t*); +address_t writenumber(char*, wnumber_t); +address_t writenumbern(char*, wnumber_t, mem_t); /* can do hex,oct,bin */ +address_t writenumber2(char*, number_t); +address_t tinydtostrf(number_t, index_t, char*); +int innumber(number_t*, char*, address_t); +void outnumber(number_t); + +/* + * Layer 1 functions, provide data and do the heavy lifting + * for layer 2 including lexical analysis, storing programs + * and expression evaluation + */ + +/* lexical analysis */ +void whitespaces(); +void nexttoken(); + +/* storing and retrieving programs */ +char nomemory(number_t); +void storetoken(); +mem_t memread(address_t); +mem_t memread2(address_t); +void memwrite2(address_t, mem_t); +mem_t beread(address_t); +void beupdate(address_t, mem_t); +void gettoken(); +void firstline(); +void nextline(); + +void clrlinecache(); +void addlinecache(address_t, address_t); +address_t findinlinecache(address_t); +void findline(address_t); +address_t myline(address_t); +void moveblock(address_t, address_t, address_t); +void zeroblock(address_t, address_t); +void diag(); +void storeline(); + +/* read arguments from the token stream and process them */ +char termsymbol(); +char expect(token_t, mem_t); +char expectexpr(); +void parsearguments(); +void parsenarguments(char); +void parsesubscripts(); +void parsefunction(void (*)(), short); +void parseoperator(void (*)()); +void parsesubstring(); + +/* mathematics and other functions for int and float */ +void xabs(); +void xsgn(); +void xpeek(); +void xmap(); +number_t rnd(); +void xrnd(); +void sqr(); +void xpow(); +number_t bpow(number_t, number_t); + +/* string values and string evaluation */ +void parsestringvar(string_t*, lhsobject_t*); +char stringvalue(string_t*); +void streval(); + +/* floating point functions */ +void xsin(); +void xcos(); +void xtan(); +void xatan(); +void xlog(); +void xexp(); +void xint(); + +/* expression evaluation */ +void factor(); +void power(); +void term(); +void addexpression(); +void compexpression(); +void notexpression(); +void andexpression(); +void expression(); + +/* real time clock string stuff */ +void rtcmkstr(); + +/* + * Layer 2 - statements and functions + * use the global variables + */ + +/* basic commands of the core language set */ +void xprint(); +void getstringtobuffer(string_t*, char*, stringlength_t); +void lefthandside(lhsobject_t*); +void assignnumber(lhsobject_t, number_t); +void assignstring(string_t*, string_t*, stringlength_t); +void assignment(); +void showprompt(); +void xinput(); +void xgoto(); +void xreturn(); +void xif(); + +/* FOR NEXT loops */ +void findnextcmd(); +void findbraket(token_t, token_t); +void xfor(); +void xbreak(); +void xcont(); +void xnext(); + +/* WHILE WEND*/ +void xwhile(); +void xwend(); + +/* REPEAT UNTIL */ +void xrepeat(); +void xuntil(); + +/* control commands and misc */ +void outputtoken(); +void xlist(); +void xrun(); +void xnew(); +void xrem(); +void xclr(); +void xdim(); +void xpoke(); +void xtab(); +void xdump(); +void dumpmem(address_t, address_t, char); +void xlocate(); + +/* file access and other i/o */ +void stringtobuffer(char*, string_t*); +void getfilename(char*, char); +void xsave(); +void xload(const char*); +void xget(); +void xput(); +void xset(); +void xnetstat(); + +/* Arduino IO control interface */ +void xaread(); +void xdread(); +void xdwrite(); +void xawrite(); +void xpinm(); +void xdelay(); +void xtone(); +void btone(int); +void bpulsein(); + +/* graphics commands */ +void xcolor(); +void xplot(); +void xline(); +void xrect(); +void xcircle(); +void xfrect(); +void xfcircle(); + +/* the darkarts */ +void xmalloc(); +void xfind(); +void xeval(); + +/* IoT commands */ +void xavail(); +void xfsensor(); +void xsleep(); +void xwire(); +void xfwire(); + +/* timers */ +void xafter(); +void xevent(); + +/* File I/O functions */ +char streq(const char*, char*); +void xcatalog(); +void xdelete(); +void xopen(); +void xfopen(); +void xclose(); +void xfdisk(); + +/* low level access functions */ +void xcall(); +void xusr(); + +/* the dartmouth stuff */ +void xdata(); +void nextdatarecord(); +void xread(); +void xrestore(); +void xdef(); +void xfn(mem_t); +void xon(); + +/* timers and interrupts */ +void xtimer(); +void resettimer(btimer_t*); + +/* structured BASIC extensions */ +void xwhile(); +void xwend(); +void xrepeat(); +void xuntil(); +void xswitch(); +void xcase(); +void xendswitch(); + +/* the editor */ +void xedit(); + +/* the statement loop */ +void statement(); + +/* the extension functions */ +void bsetup(); +void bloop(); diff --git a/data/Basic2/Posix/buildin.h b/data/Basic2/Posix/buildin.h new file mode 100644 index 0000000000000000000000000000000000000000..253df91dc931316e96daf5a8526aa1dc5c47ce1f --- /dev/null +++ b/data/Basic2/Posix/buildin.h @@ -0,0 +1,41 @@ +/* + * This is the demo code for the buildin programs. + * + * Format of the buildin program store: + * + * programs are one long string terminated by FF \f. + * lines are terminated by newline. + * + * Programs can have any name, * as a prefix is used to + * distinguish them from other programs. This is not yet + * implemented. + */ + +const char buildin_pgm1[] PROGMEM = { + "10 print \"hello world\"\n" + "20 end\n" + "\f" +}; + +const char buildin_pgm1_name[] PROGMEM = "*hello.bas"; + +const char buildin_pgm2[] PROGMEM = { + "10 PI=22000/7\n" + "20 PRINT 'PI=',INT(PI)\n" + "30 END\n" + "\f" +}; + +const char buildin_pgm2_name[] PROGMEM = "*pi.bas"; + +const char* const buildin_programs[] PROGMEM = { + buildin_pgm1, + buildin_pgm2, + 0 +}; + +const char* const buildin_program_names[] PROGMEM = { + buildin_pgm1_name, + buildin_pgm2_name, + 0 +}; diff --git a/data/Basic2/Posix/buildin/buildin-arduinotest.h b/data/Basic2/Posix/buildin/buildin-arduinotest.h new file mode 100644 index 0000000000000000000000000000000000000000..2dd89234b93bafb3ed7bcef415b7f88b6ee9734f --- /dev/null +++ b/data/Basic2/Posix/buildin/buildin-arduinotest.h @@ -0,0 +1,84 @@ +const char buildin_pgm1[] PROGMEM = { +"10 REM Test program for integer BASICs\n" +"100 PRINT \"*** Core language features ***\"\n" +"110 A=5: B=19: C=A-B: D=A+B: E=A*B: F=INT(B/A)\n" +"120 PRINT \"Math:\"\n" +"130 PRINT A,B,C,D,E,F\n" +"140 PRINT A,B,A-B,A+B,A*B,INT(B/A)\n" +"150 PRINT \"5 19 -14 24 95 3\"\n" +"200 PRINT \"Loop and GOTO:\"\n" +"210 FOR I=1 TO 10\n" +"220 PRINT I,\n" +"230 NEXT: PRINT \n" +"240 FOR I=1\n" +"250 PRINT I,: IF I=10 BREAK\n" +"260 NEXT: PRINT\n" +"270 I=1\n" +"280 PRINT I,: I=I+1: IF I<=10: GOTO 280\n" +"290 PRINT\n" +"300 PRINT \"GOSUB and RETURN\"\n" +"310 GOSUB 340\n" +"320 PRINT \"Returned\"\n" +"330 GOTO 400\n" +"340 PRINT \"In GOSUB\"\n" +"350 RETURN\n" +"400 PRINT \"Functions\"\n" +"410 A=-1: B=1: @R=1\n" +"420 PRINT SGN(A), SGN(B), ABS(A), RND(10)\n" +"430 PRINT \"-1 1 1\"\n" +"500 PRINT \"*** Arduino features ***\"\n" +"510 PRINT \"Blink\"\n" +"520 PINM LED, 1\n" +"530 FOR I=1 TO 4: DWRITE LED, 1: DELAY 200: DWRITE LED, 0: NEXT\n" +"540 PRINT \"Time\"\n" +"550 PRINT MILLIS(1): DELAY 200: PRINT MILLIS(1)\n" +"560 PRINT \"EEPROM\"\n" +"570 PRINT \"Size:\", @E\n" +"580 FOR I=1 TO 4: PRINT I, @E(I): NEXT\n" +"590 @E(1)=10: PRINT \"10=\",@E(1)\n" +"600 PRINT \"*** Dartmouth features ***\"\n" +"610 DEF FNF(X)=X*X \n" +"620 X=5: PRINT \"X=\", X \n" +"630 PRINT \"FNF(7)=\", FNF(7)\n" +"640 PRINT \"X=\",X \n" +"650 FOR I=1 TO 3\n" +"660 ON I GOSUB 700, 710, 720\n" +"670 NEXT\n" +"680 GOTO 800\n" +"700 PRINT \"One\": RETURN\n" +"710 PRINT \"Two\": RETURN\n" +"720 PRINT \"Three\": RETURN\n" +"730 DATA \"Hello\", \"World\", 31414\n" +"800 READ A$, B$: PRINT A$,B$\n" +"810 READ A: PRINT \"PI is\",A\n" +"820 PRINT \"DATA pointer is\", DATA\n" +"900 PRINT \"*** Strings ***\"\n" +"910 A$=\"Hello World\"\n" +"920 PRINT A$, \":\", LEN(A$)\n" +"930 FOR I=1 TO LEN(A$)\n" +"940 PRINT TAB(I-1);A$(I)\n" +"950 NEXT\n" +"960 FOR I=1 TO LEN(A$)\n" +"970 PRINT A$(1,I)\n" +"980 NEXT\n" +"990 B$=\"Arduino says \"\n" +"1000 B$=B$+A$: PRINT B$\n" +"1010 B$=STR$(A): PRINT \"PI is\", B$\n" +"1020 B=VAL(B$): PRINT \"PI is\", B \n" +"1030 PRINT \"String length pointer is\", @V\n" +"1040 FOR I=1 TO 5\n" +"1050 PRINT TAB(I-1);MID$(A$,I,LEN(A$)-2*I+1)\n" +"1060 NEXT\n" +"1070 FOR I=1 TO 5: PRINT LEFT$(A$,I): NEXT\n" +"1080 FOR I=1 TO 5: PRINT TAB(5-I);RIGHT$(A$,I): NEXT\n" +"\f" +}; +const char buildin_pgm1_name[] PROGMEM = "*corep.bas"; +const char* const buildin_programs[] PROGMEM = { +buildin_pgm1, +0 +}; +const char* const buildin_program_names[] PROGMEM = { +buildin_pgm1_name, +0 +}; diff --git a/data/Basic2/Posix/buildin/buildin-games.h b/data/Basic2/Posix/buildin/buildin-games.h new file mode 100644 index 0000000000000000000000000000000000000000..f70ce0d4d10965f4c05dfc8bf9df90ed188eaefd --- /dev/null +++ b/data/Basic2/Posix/buildin/buildin-games.h @@ -0,0 +1,324 @@ +const char buildin_pgm1[] PROGMEM = { +"10 REM \"TIC TAC TOE from 101 BASIC games\"\n" +"20 REM \"by David Ahl.\"\n" +"30 REM \"Ported to Stefan's BASIC in 2021\"\n" +"40 REM \"The machine goes first\"\n" +"100 PRINT \"Welcome to tictactoe\"\n" +"110 PRINT \"The game board is numbered:\"\n" +"120 PRINT\n" +"130 PRINT \"1 2 3\"\n" +"140 PRINT \"8 9 4\"\n" +"150 PRINT \"7 6 5\"\n" +"160 PRINT\n" +"200 REM \"Main Program\"\n" +"210 PRINT \"Staring a new game\"\n" +"230 A=9\n" +"240 M=A\n" +"250 GOSUB 800 \n" +"260 P=M\n" +"270 B=P%8+1\n" +"280 M=B\n" +"290 GOSUB 800 \n" +"300 Q=M\n" +"310 IF Q=(B+3)%8+1 GOTO 360\n" +"320 C=(B+3)%8+1\n" +"330 M=C\n" +"340 GOSUB 900 \n" +"350 GOTO 640 \n" +"360 C=(B+1)%8+1\n" +"370 M=C\n" +"380 GOSUB 800 \n" +"390 R=M\n" +"400 IF R=(C+3)%8+1 GOTO 450\n" +"410 D=(C+3)%8+1\n" +"420 M=D\n" +"430 GOSUB 900\n" +"440 GOTO 640 \n" +"450 IF P%2<>0 GOTO 500\n" +"460 D=(C+6)%8+1\n" +"470 M=D\n" +"480 GOSUB 900\n" +"490 GOTO 640 \n" +"500 D=(C+2)%8+1\n" +"510 M=D\n" +"520 GOSUB 800 \n" +"530 S=M\n" +"540 IF S=(D+3)%8+1 GOTO 590\n" +"550 E=(D+3)%8+1\n" +"560 M=E\n" +"570 GOSUB 900\n" +"580 REM \"Game is a draw\"\n" +"590 E=(D+5)%8+1\n" +"600 M=E\n" +"610 GOSUB 900\n" +"620 PRINT \"The game is a draw.\"\n" +"630 GOTO 200\n" +"640 PRINT \"and wins! ********\"\n" +"650 GOTO 200\n" +"800 REM \"Subroutine to ask user for the move\"\n" +"810 GOSUB 900\n" +"820 INPUT \"Your move? \", M\n" +"830 RETURN\n" +"900 REM \"Subroutine to display move\"\n" +"910 PRINT \"Computer moves:\",M\n" +"920 RETURN\n" +"\f" +}; +const char buildin_pgm1_name[] PROGMEM = "*tictac.bas"; +const char buildin_pgm2[] PROGMEM = { +"10 REM \"Rocket from 101 Basic Games\"\n" +"20 REM \"Ported to Stefan's BASIC in 2021\"\n" +"30 PRINT\n" +"100 PRINT \"LUNAR LANDING SIMULATION\"\n" +"110 PRINT \"----- ------- ----------\":PRINT \n" +"120 INPUT \"DO YOU WANT INSTRUCTIONS (YES OR NO)? \";A$\n" +"130 IF A$(1,1)=\"N\" OR A$(1,1)=\"n\" THEN 390\n" +"140 CLS \n" +"150 PRINT \n" +"200 PRINT \"YOU ARE LANDING ON THE MOON AND AND HAVE\"\n" +"210 PRINT \"TAKEN OVER MANUAL CONTROL 1000 FEET\"\n" +"215 PRINT \"ABOVE A GOOD LANDING SPOT.\": PRINT \n" +"220 PRINT \"YOU HAVE A DOWNWARD VELOCITY OF 50 FEET/SEC.\"\n" +"225 PRINT \"150 UNITS OF FUEL REMAIN.\": PRINT \n" +"230 PRINT \"HERE ARE THE RULES THAT GOVERN YOUR DESCENT\"\n" +"240 PRINT \"(1) AFTER EACH SECOND THE HEIGHT, VELOCITY, AND\"\n" +"250 PRINT \" REMAINING FUEL WILL BE REPORTED BY YOUR\"\n" +"255 PRINT \" ON-BOARD COMPUTER.\"\n" +"260 PRINT \"(2) AFTER THE REPORT A '?' WILL APPEAR. ENTER\"\n" +"270 PRINT \" THE NUMBER OF UNITS OF FUEL YOU WISH TO BURN\"\n" +"280 PRINT \" DURING THE NEXT SECOND. EACH UNIT OF FUEL\"\n" +"285 PRINT \" WILL SLOW YOUR DESCENT BY 1 FOOT/SEC.\"\n" +"310 PRINT \"(3) THE MAXIMUM THRUST OF YOUR ENGINE IS \"\n" +"315 PRINT \" 30 FEET/SEC/SEC OR 30 UNITS OF FUEL\"\n" +"320 PRINT \" PER SECOND.\"\n" +"330 PRINT \"(4) WHEN YOU CONTACT THE LUNAR SURFACE. YOUR \"\n" +"340 PRINT \" DESCENT ENGINE WILL AUTOMATICALLY SHUT DOWN\"\n" +"345 PRINT \" AND YOU WILL BE GIVEN A REPORT OF YOUR \"\n" +"350 PRINT \" LANDING SPEED AND REMAINING FUEL.\"\n" +"360 PRINT \"(5) IF YOU RUN OUT OF FUEL THE '?' WILL NO\"\n" +"370 PRINT \" LONGER APPEAR BUT YOUR SECOND BY SECOND\"\n" +"380 PRINT \" REPORT WILL CONTINUE UNTIL YOU CONTACT THE\"\n" +"385 PRINT \" LUNAR SURFACE.\":PRINT \n" +"390 PRINT \"BEGINNING LANDING PROCEDURE..........\":PRINT \n" +"400 PRINT \"G O O D L U C K ! ! !\"\n" +"420 PRINT\n" +"425 INPUT \"Read to go - press return \", A$\n" +"426 CLS \n" +"430 PRINT \"SEC FEET SPEED FUEL \"\n" +"450 PRINT\n" +"455 T=0: H=1000: V=50: F=150\n" +"490 PRINT #6,T,H,V,F;\" I\";\n" +"495 TAB(H/70): PRINT \"*\"\n" +"500 INPUT B\n" +"510 IF B<0 THEN 650\n" +"520 IF B>30 THEN B=30\n" +"530 IF B>F THEN B=F\n" +"540 V1=V-B+5\n" +"560 F=F-B\n" +"570 H=H-(V+V1)/2\n" +"580 IF H<=0 THEN 670\n" +"590 T=T+1\n" +"600 V=V1\n" +"610 IF F>0 THEN 490\n" +"615 IF B=0 THEN 640\n" +"620 PRINT \"**** OUT OF FUEL ****\"\n" +"640 PRINT #6,T,H,V,F;\" I\";\n" +"645 TAB(H/70): PRINT \"*\"\n" +"650 B=0\n" +"660 GOTO 540\n" +"670 PRINT \"***** CONTACT *****\"\n" +"680 H=H+(V1+V)/2\n" +"690 IF B=5 THEN 720\n" +"700 D=(-V+SQR(V*V+H*(10-2*B)))/(5-B)\n" +"710 GOTO 730\n" +"720 D=H/V\n" +"730 V1=V+(5-B)*D\n" +"760 PRINT \"TOUCHDOWN AT\"; T+D; \"SECONDS.\"\n" +"770 PRINT \"LANDING VELOCITY=\"; V1; \"FEET/SEC.\"\n" +"780 PRINT F; \"UNITS OF FUEL REMAINING.\"\n" +"790 IF V1<>0 THEN 810\n" +"800 PRINT \"CONGRATULATIONS! A PERFECT LANDING!!\"\n" +"805 PRINT \"YOUR LICENSE WILL BE RENEWED.......LATER.\"\n" +"810 IF ABS(V1)<2 THEN 840\n" +"820 PRINT \"***** SORRY, BUT YOU BLEW IT!!!!\"\n" +"830 PRINT \"APPROPRIATE CONDOLENCES WILL BE SENT TO YOUR NEXT OF KIN.\"\n" +"840 PRINT\n" +"850 INPUT \"ANOTHER MISSION? \"; A$\n" +"860 IF A$(1,1)=\"Y\" OR A$(1,1)=\"y\" THEN 390\n" +"870 PRINT: PRINT \"CONTROL OUT.\": PRINT \n" +"999 END \n" +"\f" +}; +const char buildin_pgm2_name[] PROGMEM = "*rocket.bas"; +const char buildin_pgm3[] PROGMEM = { +"100 REM \"NIM\"\n" +"110 REM \"Ported by Stefan in 2022\"\n" +"120 REM\n" +"210 DIM A(100),B(100,11),D(2)\n" +"220 PRINT \"THIS IS THE GAME OF NIM.\"\n" +"230 PRINT \"DO YOU WANT INSTRUCTIONS\";\n" +"240 INPUT Z$\n" +"250 IF Z$=\"NO\" THEN 440\n" +"260 IF Z$=\"no\" THEN 440\n" +"270 IF Z$=\"YES\" THEN 310\n" +"280 IF Z$=\"yes\" THEN 310\n" +"290 PRINT \"PLEASE ANSWER YES OR NO\"\n" +"300 GOTO 240\n" +"310 PRINT \"THE GAME IS PLAYED WITH A NUMBER OF PILES OF OBJECTS.\"\n" +"320 PRINT \"ANY NUMBER OF OBJECTS ARE REMOVED FROM ONE PILE BY YOU AND\"\n" +"330 PRINT \"THE MACHINE ALTERNATELY. ON YOUR TURN, YOU MAY TAKE\"\n" +"340 PRINT \"ALL THE OBJECTS THAT REMAIN IN ANY PILE, BUT YOU MUST\"\n" +"350 PRINT \"TAKE AT LEAST ONE OBJECT, AND YOU MAY TAKE OBJECTS FROM\"\n" +"360 PRINT \"ONLY ONE PILE ON A SINGLE TURN. YOU MUST SPECIFY WHETHER\"\n" +"370 PRINT \"WINNING IS DEFINED AS TAKING OR NOT TAKING THE LAST OBJECT,\"\n" +"380 PRINT \"THE NUMBER OF PILES IN THE GAME, AND HOW MANY OBJECTS ARE\"\n" +"390 PRINT \"ORIGINALLY IN EACH PILE. EACH PILE MAY CONTAIN A\"\n" +"400 PRINT \"DIFFERENT NUMBER OF OBJECTS.\"\n" +"410 PRINT \"THE MACHINE WILL SHOW ITS MOVE BY LISTING EACH PILE AND THE\"\n" +"420 PRINT \"NUMBER OF OBJECTS REMAINING IN THE PILES AFTER EACH OF ITS\"\n" +"430 PRINT \"MOVES.\"\n" +"440 PRINT\n" +"450 PRINT \"ENTER WIN OPTION - 1 TO TAKE LAST, 2 TO AVOID LAST\";\n" +"460 INPUT W\n" +"470 IF W=1 THEN 490\n" +"480 IF W<>2 THEN 450\n" +"490 PRINT \"ENTER NUMBER OF PILES\";\n" +"500 INPUT N\n" +"510 IF N>100 THEN 490\n" +"520 IF N<1 THEN 490\n" +"530 IF N<>INT(N) THEN 490\n" +"540 PRINT \"ENTER PILE SIZES\"\n" +"550 FOR I=1 TO N\n" +"560 PRINT I;\n" +"570 INPUT A(I)\n" +"580 IF A(I)>2000 THEN 560\n" +"590 IF A(I)<1 THEN 560\n" +"600 IF A(I)<>INT(A(I)) THEN 560\n" +"610 NEXT I\n" +"620 PRINT \"DO YOU WANT TO MOVE FIRST\";\n" +"630 INPUT Q9$\n" +"640 IF Q9$=\"YES\" THEN 1450\n" +"650 IF Q9$=\"yes\" THEN 1450\n" +"660 IF Q9$=\"NO\" THEN 700\n" +"670 IF Q9$=\"no\" THEN 700\n" +"680 PRINT \"PLEASE ANSWER YES OR NO.\"\n" +"690 GOTO 630\n" +"700 IF W=1 THEN 940\n" +"710 LET C=0\n" +"720 FOR I=1 TO N\n" +"730 IF A(I)=0 THEN 770\n" +"740 LET C=C+1\n" +"750 IF C=3 THEN 840\n" +"760 LET D(C)=I\n" +"770 NEXT I\n" +"780 IF C=2 THEN 920\n" +"790 IF A(D(1))>1 THEN 820\n" +"800 PRINT \"MACHINE LOSES\"\n" +"810 GOTO 1640\n" +"820 PRINT \"MACHINE WINS\"\n" +"830 GOTO 1640\n" +"840 LET C=0\n" +"850 FOR I=1 TO N\n" +"860 IF A(I)>1 THEN 940\n" +"870 IF A(I)=0 THEN 890\n" +"880 LET C=C+1\n" +"890 NEXT I\n" +"900 IF C/2<>INT(C/2) THEN 800\n" +"910 GOTO 940\n" +"920 IF A(D(1))=1 THEN 820\n" +"930 IF A(D(2))=1 THEN 820\n" +"940 FOR I=1 TO N\n" +"950 LET E=A(I)\n" +"960 FOR J=0 TO 10\n" +"970 LET F=E/2\n" +"980 LET B(I,J+1)=2*(F-INT(F))\n" +"990 LET E=INT(F)\n" +"1000 NEXT J\n" +"1010 NEXT I\n" +"1020 FOR J=10 TO 0 STEP -1\n" +"1030 LET C=0\n" +"1040 LET H=0\n" +"1050 FOR I=1 TO N\n" +"1060 IF B(I,J+1)=0 THEN 1110\n" +"1070 LET C=C+1\n" +"1080 IF A(I)<=H THEN 1110\n" +"1090 LET H=A(I)\n" +"1100 LET G=I\n" +"1110 NEXT I\n" +"1120 IF C/2<>INT(C/2) THEN 1190\n" +"1130 NEXT J\n" +"1140 LET E=INT(N*RND(1)+1)\n" +"1150 IF A(E)=0 THEN 1140\n" +"1160 LET F=INT(A(E)*RND(1)+1)\n" +"1170 LET A(E)=A(E)-F\n" +"1180 GOTO 1380\n" +"1190 LET A(G)=0\n" +"1200 FOR J=0 TO 10\n" +"1210 LET B(G,J+1)=0\n" +"1220 LET C=0\n" +"1230 FOR I=1 TO N\n" +"1240 IF B(I,J+1)=0 THEN 1260\n" +"1250 LET C=C+1\n" +"1260 NEXT I\n" +"1270 LET A(G)=A(G)+2*(C/2-INT(C/2))*POW(2,J)\n" +"1280 NEXT J\n" +"1290 IF W=1 THEN 1380\n" +"1300 LET C=0\n" +"1310 FOR I=1 TO N\n" +"1320 IF A(I)>1 THEN 1380\n" +"1330 IF A(I)=0 THEN 1350\n" +"1340 LET C=C+1\n" +"1350 NEXT I\n" +"1360 IF C/2<>INT(C/2) THEN 1380\n" +"1370 LET A(G)=1-A(G)\n" +"1380 PRINT \"PILE SIZE\"\n" +"1390 FOR I=1 TO N\n" +"1400 PRINT #8;I,A(I)\n" +"1410 NEXT I\n" +"1420 IF W=2 THEN 1450\n" +"1430 GOSUB 1570\n" +"1440 IF Z=1 THEN 820\n" +"1450 PRINT \"YOUR MOVE - PILE, NUMBER TO BE REMOVED\";\n" +"1460 INPUT X,Y\n" +"1470 IF X>N THEN 1450\n" +"1480 IF X<1 THEN 1450\n" +"1490 IF X<>INT(X) THEN 1450\n" +"1500 IF Y>A(X) THEN 1450\n" +"1510 IF Y<1 THEN 1450\n" +"1520 IF Y<>INT(Y) THEN 1450\n" +"1530 LET A(X)=A(X)-Y\n" +"1540 GOSUB 1570\n" +"1550 IF Z=1 THEN 800\n" +"1560 GOTO 700\n" +"1570 LET Z=0\n" +"1580 FOR I=1 TO N\n" +"1590 IF A(I)=0 THEN 1610\n" +"1600 RETURN\n" +"1610 NEXT I\n" +"1620 LET Z=1\n" +"1630 RETURN\n" +"1640 PRINT \"DO YOU WANT TO PLAY ANOTHER GAME\";\n" +"1650 INPUT Q9$\n" +"1660 IF Q9$=\"YES\" THEN 1720\n" +"1670 IF Q9$=\"yes\" THEN 1720\n" +"1680 IF Q9$=\"NO\" THEN 1730\n" +"1690 IF Q9$=\"no\" THEN 1730\n" +"1700 PRINT \"PLEASE. YES OR NO.\"\n" +"1710 GOTO 1650 \n" +"1720 GOTO 440\n" +"1730 END\n" +"\f" +}; +const char buildin_pgm3_name[] PROGMEM = "*nim.bas"; +const char* const buildin_programs[] PROGMEM = { +buildin_pgm1, +buildin_pgm2, +buildin_pgm3, +0 +}; +const char* const buildin_program_names[] PROGMEM = { +buildin_pgm1_name, +buildin_pgm2_name, +buildin_pgm3_name, +0 +}; diff --git a/data/Basic2/Posix/buildin/buildin-tutorial.h b/data/Basic2/Posix/buildin/buildin-tutorial.h new file mode 100644 index 0000000000000000000000000000000000000000..0e95eb131238a32f1e4732126e076b60ac71d303 --- /dev/null +++ b/data/Basic2/Posix/buildin/buildin-tutorial.h @@ -0,0 +1,288 @@ +const char buildin_pgm1[] PROGMEM = { +"100 REM \"CALCULATING PI FOR HUNDREDS OF DIGITS\"\n" +"110 REM \"THX TO ROSETTACODE.ORG FOR THE BASE OF THE PROGRAM\"\n" +"120 REM \"SHOULD BE A BENCHMARK FOR THE BASIC INTERPRETER/COMPILER\"\n" +"130 REM \"WRITTEN IN 2023 FOR FORUM.CLASSIC-COMPUTING.DE BY PETER DASSOW\"\n" +"135 REM \"Ported to IoT BASIC by Guido Lehwalder\"\n" +"136 REM \"Added some IoT BASIC features - Stefan Lenz, 2023\"\n" +"137 CLS\n" +"140 PRINT \"Calculating Pi as a BASIC benchmark.\"\n" +"150 PRINT \"Enter number of digits: \";\n" +"160 INPUT S$\n" +"170 IF S$=\"\" THEN PRINT \"Nothing done.\": END\n" +"180 N=VAL(S$): IF N<1 THEN PRINT \"Not a valid number.\": GOTO 150\n" +"190 REM \"N DETERMINES ALSO THE ARRAY (ABOUT 3-4 TIMES BIGGER)\"\n" +"200 LN=INT(10*N/3)+16\n" +"204 REM \"@ is the space on the heap for numbers, reserve 64 bytes\"\n" +"205 IF LN>(@-64) THEN PRINT \"Not enough memory\": GOTO 150\n" +"210 ND=1\n" +"220 SM=MILLIS(1)\n" +"225 REM \"Delete the array if already there\"\n" +"230 IF FIND(A())<>0 THEN CLR A()\n" +"235 REM \"Then redim\"\n" +"240 DIM A(LN)\n" +"250 N9=0\n" +"260 PD=0\n" +"270 REM\n" +"280 FOR J=1 TO LN\n" +"290 A(J)=2\n" +"300 NEXT J\n" +"310 REM \"Use of the modulo operator % speeds things up\"\n" +"320 FOR J=1 TO N\n" +"330 Q=0\n" +"340 FOR I=LN TO 1 STEP -1\n" +"350 X=10*A(I)+Q*I\n" +"360 A(I)=X%(2*I-1)\n" +"370 Q=INT(X/(2*I-1))\n" +"380 NEXT I\n" +"390 A(1)=Q%10\n" +"400 Q=INT(Q/10)\n" +"410 IF Q=9 THEN N9=N9+1: GOTO 610\n" +"420 IF Q<>10 THEN GOTO 540\n" +"430 REM \"Q==10\"\n" +"440 D=PD+1: GOSUB 670\n" +"450 IF N9<=0 THEN GOTO 500\n" +"460 FOR K=1 TO N9\n" +"470 D=0: GOSUB 670\n" +"480 NEXT K\n" +"490 REM \"END IF\"\n" +"500 PD=0\n" +"510 N9=0\n" +"520 GOTO 610\n" +"530 REM \"Q<>10\"\n" +"540 D=PD: GOSUB 670\n" +"550 PD=Q\n" +"560 IF N9=0 THEN GOTO 610\n" +"570 FOR K=1 TO N9\n" +"580 D=9: GOSUB 670\n" +"590 NEXT K\n" +"600 N9=0\n" +"610 NEXT J\n" +"620 C$=(\"0\"+PD%10)\n" +"621 PRINT C$\n" +"630 EM=MILLIS(1)-SM\n" +"635 PRINT \"Calculation time \";EM/1000;\" seconds.\"\n" +"640 GOTO 140\n" +"650 REM\n" +"660 REM \"OUTPUT DIGITS\"\n" +"670 C$=(\"0\"+D%10)\n" +"671 IF ND=0 THEN PRINT C$;: RETURN\n" +"680 IF D=0 THEN RETURN\n" +"691 PRINT C$;\".\";\n" +"700 ND=0\n" +"710 RETURN\n" +"\f" +}; +const char buildin_pgm1_name[] PROGMEM = "*cpinew2.bas"; +const char buildin_pgm2[] PROGMEM = { +"10 REM \"Solves the Euler 9 problem \"\n" +"20 REM \"See https://projecteuler.net/problem=9 for details\"\n" +"30 REM \"with a number theoretical approach\"\n" +"100 PRINT \"Enter the circumference K of a triangle\"\n" +"110 PRINT \"The program finds a pythagorean triangle\"\n" +"120 PRINT \"a^2 + b^2 = c^2\"\n" +"130 INPUT \"K= (0 to end) \",K \n" +"140 IF K=0 THEN END \n" +"150 IF K%2=0 THEN U=K/2: GOTO 200 \n" +"160 PRINT \"K is odd, no solution\": GOTO 130 \n" +"200 REM \"Main Program\"\n" +"210 F=0 \n" +"220 X=SQR(U/2)\n" +"230 FOR I=1 TO X \n" +"240 IF U%I<>0 THEN CONT \n" +"250 FOR J=1 TO I \n" +"260 D=I+J \n" +"270 IF U%D<>0 THEN CONT \n" +"280 IF D%2=0 THEN CONT \n" +"290 R=I: Q=J \n" +"300 GOSUB 800 \n" +"310 IF R<>1 THEN CONT \n" +"320 A=I*I-J*J \n" +"330 B=2*I*J \n" +"340 C=I*I+J*J \n" +"350 PRINT \"Primitive triple\",A ,B, C \n" +"360 PRINT \"Circumference=\",A+B+C \n" +"370 S=K/(A+B+C)\n" +"380 PRINT \"Scale with\",S \n" +"390 PRINT \"Solution \",A*S, B*S, C*S \n" +"400 F=1 \n" +"420 NEXT \n" +"430 NEXT \n" +"440 REM \"All solutions found\"\n" +"450 IF F=0 THEN PRINT \"No solution\"\n" +"460 GOTO 130 \n" +"800 REM \"Find GCD\"\n" +"810 IF R=Q THEN RETURN \n" +"820 IF R>Q THEN R=R-Q \n" +"830 IF Q>R THEN Q=Q-R \n" +"840 GOTO 810 \n" +"\f" +}; +const char buildin_pgm2_name[] PROGMEM = "*euler9.bas"; +const char buildin_pgm3[] PROGMEM = { +"10 REM \"Calculates the Fibonacci numbers\"\n" +"20 REM \"And the Golden Ratio on an Integer BASIC\"\n" +"200 REM \"Main program\"\n" +"210 N=19\n" +"220 DIM A(N)\n" +"230 A(1)=1\n" +"240 A(2)=1\n" +"250 FOR I=3 TO N\n" +"260 IF A(I)>16000 THEN BREAK\n" +"270 A(I)=A(I-1)+A(I-2)\n" +"280 Q=A(I): D=A(I-1)\n" +"290 PRINT #4;I,Q,D;\n" +"300 GOSUB 500\n" +"310 NEXT\n" +"320 END\n" +"500 REM \"Print a decimal ratio of a fraction\"\n" +"520 Z=INT(Q/D)\n" +"530 PRINT \" \";Z;\".\";\n" +"540 FOR J=1 TO 10\n" +"550 Z=Q%D\n" +"560 Q=Z*10\n" +"570 Z=INT(Q/D)\n" +"580 PRINT Z;\n" +"590 NEXT\n" +"600 PRINT \" \"\n" +"610 RETURN\n" +"\f" +}; +const char buildin_pgm3_name[] PROGMEM = "*fibo.bas"; +const char buildin_pgm4[] PROGMEM = { +"100 REM \"Calculate the first N prime numbers\"\n" +"110 REM \"and output them!\"\n" +"200 CLR \n" +"210 INPUT \"How many primes (0=stop)? \", N \n" +"220 IF N=0 THEN 500\n" +"230 DIM P(N): P(1)=2: P(2)=3: I=2 \n" +"240 IF I=N THEN 360\n" +"250 K=P(I)\n" +"260 K=K+2 \n" +"270 L=SQR(K)\n" +"280 J=1 \n" +"290 D=P(J)\n" +"310 M=K%D \n" +"320 IF M=0 THEN 260\n" +"330 IF D0 GOTO 500\n" +"460 D=(C+6)%8+1\n" +"470 M=D\n" +"480 GOSUB 900\n" +"490 GOTO 640 \n" +"500 D=(C+2)%8+1\n" +"510 M=D\n" +"520 GOSUB 800 \n" +"530 S=M\n" +"540 IF S=(D+3)%8+1 GOTO 590\n" +"550 E=(D+3)%8+1\n" +"560 M=E\n" +"570 GOSUB 900\n" +"580 REM \"Game is a draw\"\n" +"590 E=(D+5)%8+1\n" +"600 M=E\n" +"610 GOSUB 900\n" +"620 PRINT \"The game is a draw.\"\n" +"630 GOTO 200\n" +"640 PRINT \"and wins! ********\"\n" +"650 GOTO 200\n" +"800 REM \"Subroutine to ask user for the move\"\n" +"810 GOSUB 900\n" +"820 INPUT \"Your move? \", M\n" +"830 RETURN\n" +"900 REM \"Subroutine to display move\"\n" +"910 PRINT \"Computer moves:\",M\n" +"920 RETURN\n" +"\f" +}; +const char buildin_pgm6_name[] PROGMEM = "*tictac.bas"; +const char* const buildin_programs[] PROGMEM = { +buildin_pgm1, +buildin_pgm2, +buildin_pgm3, +buildin_pgm4, +buildin_pgm5, +buildin_pgm6, +0 +}; +const char* const buildin_program_names[] PROGMEM = { +buildin_pgm1_name, +buildin_pgm2_name, +buildin_pgm3_name, +buildin_pgm4_name, +buildin_pgm5_name, +buildin_pgm6_name, +0 +}; diff --git a/data/Basic2/Posix/buildin/buildin.h b/data/Basic2/Posix/buildin/buildin.h new file mode 100644 index 0000000000000000000000000000000000000000..253df91dc931316e96daf5a8526aa1dc5c47ce1f --- /dev/null +++ b/data/Basic2/Posix/buildin/buildin.h @@ -0,0 +1,41 @@ +/* + * This is the demo code for the buildin programs. + * + * Format of the buildin program store: + * + * programs are one long string terminated by FF \f. + * lines are terminated by newline. + * + * Programs can have any name, * as a prefix is used to + * distinguish them from other programs. This is not yet + * implemented. + */ + +const char buildin_pgm1[] PROGMEM = { + "10 print \"hello world\"\n" + "20 end\n" + "\f" +}; + +const char buildin_pgm1_name[] PROGMEM = "*hello.bas"; + +const char buildin_pgm2[] PROGMEM = { + "10 PI=22000/7\n" + "20 PRINT 'PI=',INT(PI)\n" + "30 END\n" + "\f" +}; + +const char buildin_pgm2_name[] PROGMEM = "*pi.bas"; + +const char* const buildin_programs[] PROGMEM = { + buildin_pgm1, + buildin_pgm2, + 0 +}; + +const char* const buildin_program_names[] PROGMEM = { + buildin_pgm1_name, + buildin_pgm2_name, + 0 +}; diff --git a/data/Basic2/Posix/hardware.h b/data/Basic2/Posix/hardware.h new file mode 100644 index 0000000000000000000000000000000000000000..7e65f7fc37b25047b29d45205b836558664935bb --- /dev/null +++ b/data/Basic2/Posix/hardware.h @@ -0,0 +1,256 @@ +/* + * + * $Id: hardware.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * + * Runtime environment for the BASIC interpreter, the + * hardware configuration file. It contains all hardware + * related settings and dependencies. + * + * This is hardware.h for POSIX systems and the POSIX runtime + * environment runtime.c. + * + * Default setting is POSIX for most UNIXes including Mac. + * RASPPI activates Raspberry PI related features. + * MINGW activates windows related features. + * MSDOS for MSDOS compiles with tc 2.0 (untested in this version, last tested in 1.4) + * + */ + +#undef MINGW +#undef MSDOS +#undef RASPPI +#define POSIX + +/* + * MEMSIZE sets the BASIC main memory to a fixed value, + * if MEMSIZE=0 a heuristic is used based on free heap + * size and architecture parameters + */ +#define MEMSIZE 0 + +/* + * Hardware flags of the POSIX systems + * POSIXTERMINAL, POSIXVT52TOANSI: ensure compatibility of BASIC programs + * control characters of BASIC are translated to ANSI, bringing the Aruino + * VT52 commands to POSIX + * POSIXSIGNALS: enables signal handling of ^C interrupting programs + * POSIXNONBLOCKING: non blocking I/O to handle GET and the BREAKCHAR + * tricky on DOS, not very portable, experimental, use signals instead + * POSIXFRAMEBUFFER: directly draw to the frame buffer of Raspberry PI + * only tested on this platform + * POSIXWIRE: simple Raspberry PI wire code + * POSIXMQTT: analogous to ARDUINOMQTT, send and receive MQTT messages (unfinished) + * POSIXWIRING: use the (deprectated) wiring code for gpio on Raspberry Pi + * POSIXPIGPIO: use the pigpio library on a Raspberry PI - currently broken - wire change - don't use + */ + +#define POSIXTERMINAL +#define POSIXVT52TOANSI +#define POSIXSIGNALS +#undef POSIXNONBLOCKING +#undef POSIXFRAMEBUFFER +#undef POSIXWIRE +#undef POSIXMQTT +#undef POSIXWIRING +#undef POSIXPIGPIO + +/* simulates SPI RAM, only test code, keep undefed if you don't want to do something special */ +#undef SPIRAMSIMULATOR + +#ifdef SPIRAMSIMULATOR +#define USEMEMINTERFACE +#endif + +/* use a serial port as printer interface - unfinished - similar to Arduino */ +#define POSIXPRT + +/* use TAB in MS mode */ +#define HASMSTAB + +/* build in BASIC programs on Posix currently without function */ +#define HASBUILDIN +/* this is the demo module */ +// #define BUILDINMODULE "buildin/buildin.h" +/* a small tutorial */ +// #define BUILDINMODULE "buildin/buildin-tutorial.h" +#define BUILDINMODULE "buildin/buildin-arduinotest.h" +// #define BUILDINMODULE "buildin/buildin-games.h" + +/* used pins and other parameters */ + +/* + * Mechanisms to interrupt the interpreter + * + * BREAKCHAR is the character stopping the program on Ardunios + * BREAKPIN can be set, it is a pin that needs to go to low to stop a BASIC program + * This should be done in hardware*.h + * BREAKSIGNAL can also be set, should be done in hardware*.h + */ + +#define BREAKCHAR '#' /* the character to interrupt the interpreter */ + +/* set this is you want pin 4 on low interrupting the interpreter */ +/* #define BREAKPIN 4 */ + +/* the SIGNAL the interpreters listens to for interrupt */ +#define BREAKSIGNAL SIGINT + +/* + * In case of non blocking IO turn on background tasks, we check BREAKCHAR only + * once every second in background and don't poll the keyboard after each statement. + * + * This is also needed for slow keyboards on Arduino. + */ +#ifdef POSIXNONBLOCKING +#define BREAKINBACKGROUND +#define BASICBGTASK +#endif + +/* frame buffer health check - currently only supported on Raspberry */ +#ifndef RASPPI +#undef POSIXFRAMEBUFFER +#endif + +/* wire parameters for Raspberry*/ +#define POSIXI2CBUS 1 + +/* the size of the EEPROM dummy */ +#define EEPROMSIZE 1024 + +/* they all have this */ +#define FILESYSTEMDRIVER + +/* and they have this */ +#define HASCLOCK + +/* some have this */ +#if defined(POSIXWIRE) && defined(POSIXPIGPIO) +#define HASWIRE +#endif + +/* we can do graphics and tell language.h that we can */ +#ifdef POSIXFRAMEBUFFER +#define DISPLAYHASGRAPH +#endif + +/* after run behaviour on POSIX systems, 1 to terminate if started + on the command line with a file argument, 0 to stay active and + show a BASIC prompt*/ +#define TERMINATEAFTERRUN 1 + +/* + * all the things the POSIX platforms need to source + */ + +/* define all the types Arduino has for compatibility of the interface */ + +typedef unsigned char uint8_t; +typedef signed char int8_t; +typedef unsigned short uint16_t; +typedef signed short int16_t; +typedef unsigned char byte; +typedef unsigned long long uint64_t; +typedef unsigned int uint32_t; + +/* + * additional prototypes in an non Arduino world + */ +unsigned long millis(); + +/* the ususal suspects */ +#include +#include + +/* floating point maths only needed if HASFLOAT*/ +#include +#include + +/* time stuff */ +#include +#include +#include + +/* directories and files */ +#ifndef MSDOS +#include +#include +#else +#include +#include +#endif + +/* windowy things for windows */ +#ifdef MINGW +#include +#endif + +/* + * Tell BASIC we have a second serial port + */ +#ifdef POSIXPRT +#define HASSERIAL1 +#endif + +/* + * Tell BASIC we have a radio adapter + */ +#undef HASRF24 + +/* + * Tell BASIC we have MQTT + */ +#ifdef POSIXMQTT +#define HASMQTT +#endif + +/* we definitely don't run on an Arduino */ +#undef ARDUINOPROGMEM +#define PROGMEM +#undef ARDUINO + +/* and we use the buffer sizes for real computers */ +#if MEMSIZE == 0 || MEMSIZE < 2560000 +#define BUFSIZE 256 +#define STACKSIZE 256 +#define GOSUBDEPTH 64 +#define FORDEPTH 64 +#define LINECACHESIZE 64 +#else +#define BUFSIZE 256 +#define STACKSIZE 256 +#define GOSUBDEPTH 196 +#define FORDEPTH 196 +#define LINECACHESIZE 196 +#endif + +/* the buffer size for simulated serial RAM */ +#define SPIRAMSBSIZE 512 + +/* + * This code measures the fast ticker frequency. + */ +#define FASTTICKERPROFILE + +/* + * Does the platform has command line args and do we want to use them + */ +#define HASARGS + +/* + * How restrictive are we on function recursive calls to protect the stack + * On Posix systems we can be more generous. + */ +#define FNLIMIT 128 + +/* all POSIXish systems can do the full interpreter, only here for compatibility with Arduino */ +#define BASICFULL + diff --git a/data/Basic2/Posix/language.h b/data/Basic2/Posix/language.h new file mode 100644 index 0000000000000000000000000000000000000000..3aa7b54e8b157abfe2225e765e8358f2d01fc0bb --- /dev/null +++ b/data/Basic2/Posix/language.h @@ -0,0 +1,464 @@ +/* + * + * $Id: language.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * This is the language definition file. Edit this to set the language + * capabilities. + * + * MEMSIZE was moved to hardware.h now as it is a hardware setting. + * + */ + +/* + * DEBUG switches on compiled debug mode. Consider using runtime + * debug with SET 0,x before using this. + */ +#define DEBUG 0 + +/* + * Interpreter feature sets, choose one of the predefines or undefine all predefines and set the + * features in custom settings + * + * BASICFULL: full language set, use this with flash >32kB - ESPs, MKRs, Mega2560, RP2040, UNO R4 + * BASICINTEGER: integer BASIC with full language, use this with flash >32kB + * BASICSIMPLE: integer BASIC with reduced language set, 32kB capable - for UNOs with a lot of device drivers + * BASICSIMPLEWITHFLOAT: a small floating point BASIC, 32kB capable, for UNOs - good for UNOs with the need of float + * BASICTINYWITHFLOAT: a floating point tinybasic, if you have 32kB and need complex device drivers + * BASICMINIMAL: minimal language, just Palo Alto plus Arduino I/O, works on 168 with 1kB RAM and 16kB flash + * + * The board will try to find the best language model for it's size and capabilities. Relies on the + * information hardware.h produces. It set one of the language models: + * + * BASICFULL, BASICSIMPLE, BASICMINIMAL. + * + * Setting NOLANGUAGEHEURISTICS and then one of the models below will override this + * selection. + */ +#define LANGUAGEHEURISTICS + +#ifndef LANGUAGEHEURISTICS +#undef BASICFULL +#undef BASICINTEGER +#undef BASICSIMPLE +#undef BASICMINIMAL +#undef BASICPALOALTO +#undef BASICSIMPLEWITHFLOAT +#undef BASICTINYWITHFLOAT +#endif + +/* + * Custom settings undef all the the language sets above when you are using this. Not all language + * features work in all combinations. + * + * HASAPPLE1: Apple 1 BASIC compatibility. This is the base for all other features. + * In this version the interpreter has a heap, a string pool and one dimensional arrays. + * HASARDUINOIO: Arduino I/O functions, including millis() timer. + * HASFILEIO: file I/O functions, including open, close, read, write, remove, rename. + * HASTONE: tone() and noTone() functions for sound output mapped to the PLAY command. + * HASPULSE: pulseIn() function for measuring pulse lengths. Pulse output. Both mapped to the PULSE command. + * HASSTEFANSEXT: Stefan's BASIC extensions, including ELSE, PUT, GET, advanced FOR loops, SQR and POW. + * HASERRORMSG: error messages for syntax and runtime errors. + * HASVT52: VT52 terminal emulation for text output -> moved to hardware.h + * HASFLOAT: floating point support. + * HASGRAPH: graphics support, including line, circle, rectangle, fill, color. + * HASDARTMOUTH: Dartmouth BASIC compatibility: single line DEF FN, ON, READ, DATA. + * HASDARKARTS: Dark Arts BASIC is MALLOC, FIND, CLR for individual variables and EVAL for self modifying code. + * HASIOT: IoT functions, Wire access, Sensor functions, MQTT. Needs strings and heap. STR, VAL, INSTR are + * part of this. MQTT support only on Arduino- + * HASMULTIDIM: two dimensional arrays and one dimensional string arrays. + * HASTIMER: timer functions, AFTER and EVERY for periodic execution of programs. + * HASEVENTS: event handling, EVENT command. + * HASERRORHANDLING: error handling with ERROR GOTO. + * HASSTRUCT: structured language elements, WHILE WEND, REPEAT UNTIL, SWITCH CASE. Multi line IF THEN ELSE + * with the DO DEND construct. + * HASMSSTRINGS: MS Basic compatible strings, RIGHT$, LEFT$, MID$, ASC, CHR$, and string addition with +. + * Compatibility to MS BASICs is limited as this BASIC has only inplace string operations- + * HASMULTILINEFUNCTIONS: multi line functions, DEF FN, FEND. + * HASEDITOR: line editor for the console. + * HASTINYBASICINPUT: Tiny BASIC compatible input using the expression parser. Expressions and variables + * are valid number input with it. Default now but can have odd side effects. + * HASLONGNAMES: long variable names, up to 16 characters. Name length is set by MAXNAME in basic.h and + * can be any value <128 bytes. Names are still only uppercase and all names will be uppercased by lexer. + * HASHELP: show the commands of the interpreter. Will be extended to a help system. + * HASFULLINSTR: the full C64 style INSTR command. Without this flag INSTR only accepts + * a single character as argument. This is much faster and leaner on an Arduino. + * This macro is activated when HASMSSTRINGS is set. + * HASLOOPOPT: optimizes the FOR loops for speed. This is a trade off between speed and + * memory. It is activated by default. Speeup is about 10% on a Mac. On platforms + * with low memory bandwidth it is much more. + * HASNUMSYSTEM: constants can be hex, octal, binary or decimal. This is not activated by + * default. Currently only implemented in VAL() and STR(). + * HASBITWISE: has bitwise operations >>, << and the function BIT -> removed and default now. + * + * If you want to set everything manually, set NOLANGUAGEHEURISTICS above + */ + +#ifndef LANGUAGEHEURISTICS +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#define HASHELP +#define HASFULLINSTR +#define HASLOOPOPT +#define HASNUMSYSTEM +#endif + + +/* + * + * Odd stuff - these things change the behaviour of BASIC in some aspects. + * They can be used to make the interpreter compatible with other dialects. + * + * POWERRIGHTTOLEFT: normally the ^ operator works from left to right + * which means 2^3^2 = (2^3)^2 = 8^2 = 64. Setting this flag would + * change the behaviour to 2^3^2 = 2^(3^2) = 512 + * MSARRAYLIMITS: in BASIC arrays start at 1 and DIM A(10) creates 10 + * elements. With MSARRAYLIMITS defined, arrays start at 0 and have + * n+1 elements. This can be changed at any time with SET 21,0 or 1. + * SUPPRESSSUBSTRINGS: switch off substring logic by default, makes only sense with + * HASMSSTRINGS activated. With this, the syntax of strings and string + * arrays is comaptible to MS strings (only used to preset the variable now). + * SET 20 can change this at runtime. + * USELONGJUMP: use the longjmp feature of C. This greatly simplifies + * error handling at the cost of portability to some MCU platforms + * currently only experimental. It costs memory for the jump buffer. + * Don't use it on very small systems. LONGJUMP must be set to 0 or 1 as + * it is used in boolean expression in the code + * BOOLEANMODE: switch the behaviour of BASICs boolean operators. Default (-1) + * is to cast all numbers to signed 16bit and then do bitwise arithemtic. + * In this mode false is 0 and -1 is true. (1) is C style boolean arithemtic. + * In this mode true is 1 and false is 0. AND and OR still do bitwise operations + * but NOT is C not. SET 19,1 or -1 can change this at runtime. + * HAS64BIT: 64 bit floating point support on platforms that have a 64 bit double. + * Counterexample: AVR 8bit does not have 64 bit floating point. + * HAS32BITINT: 32 bit integer support on 8 bit platforms. + * HASPOWER: the POWER operator ^ is available in addition to the POW function. + * HASUSRCALL: the USR and CALL functions. On small systems they need a lot + * of flash and can be disabled. + */ + +#undef POWERRIGHTTOLEFT +#undef MSARRAYLIMITS +#undef SUPPRESSSUBSTRINGS +#define USELONGJUMP 0 +#define BOOLEANMODE -1 +#undef HAS64BIT +#undef HAS32BITINT +#define HASPOWER +#define HASUSRCALL + +/* Palo Alto plus Arduino functions */ +#ifdef BASICMINIMAL +#undef HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#undef HASSTEFANSEXT +#undef HASERRORMSG +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + +/* the original Palo Alto Tinybasic, this is the real minimum */ +#ifdef BASICPALOALTO +#undef HASAPPLE1 +#undef HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#undef HASSTEFANSEXT +#undef HASERRORMSG +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASBITWISE +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + +/* all features minus float and tone */ +#ifdef BASICINTEGER +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#define HASHELP +#define HASFULLINSTR +#define HASLOOPOPT +#define HASNUMSYSTEM +#endif + +/* a simple integer basic for small systems mainly the UNO */ +#ifdef BASICSIMPLE +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#define HASIOT +#undef HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + +/* a small integer BASIC for 32kB systems with big cores */ +#ifdef BASICSMALL +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#define HASIOT +#undef HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + + +/* all features activated */ +#ifdef BASICFULL +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#define HASHELP +#define HASFULLINSTR +#define HASLOOPOPT +#define HASNUMSYSTEM +#endif + +/* a simple BASIC with float support */ +#ifdef BASICSIMPLEWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + +/* a Tinybasic with float support */ +#ifdef BASICTINYWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#undef HASHELP +#undef HASFULLINSTR +#undef HASLOOPOPT +#undef HASNUMSYSTEM +#undef HASPOWER +#undef HASUSRCALL +#endif + +/* + * Language feature dependencies + * + * Dartmouth and darkarts needs the heap which is in Apple 1 + * IoT needs strings and the heap, also Apple 1 + * + * String arrays need multi dimensional capabilities + * + * The structured language set needs ELSE from STEFANSEXT + * + */ +#if defined(HASMULTILINEFUNCTIONS) +#define HASDARTMOUTH +#endif + +#if defined(HASDARTMOUTH) || defined(HASDARKARTS) || defined(HASIOT) || defined(HASMSSTRINGS) +#define HASAPPLE1 +#endif + +#if defined(HASSTRUCT) +#define HASSTEFANSEXT +#endif + +/* MS strings also bring the full INSTR */ +#if defined(HASMSSTRINGS) +#define HASFULLINSTR +#endif + +/* dependencies on the hardware */ +#if !defined(DISPLAYHASGRAPH) +#undef HASGRAPH +#endif diff --git a/data/Basic2/Posix/runtime.c b/data/Basic2/Posix/runtime.c new file mode 100644 index 0000000000000000000000000000000000000000..5bd534b467525ae50ee0620c306f2afa185b50a8 --- /dev/null +++ b/data/Basic2/Posix/runtime.c @@ -0,0 +1,2201 @@ +/* + * + * $Id: runtime.c,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * This is the Posix runtime environment for BASIC. It maps the functions + * needed for the various subsystems to the MCU specific implementations. + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * + * Configure the hardware settings in hardware.h. + * + */ + +#include "hardware.h" +#include "runtime.h" + +/* the buildin BASIC programs, they appeare as a file system, on POSIX not implemented */ +#ifdef HASBUILDIN +#define FBUFSIZE 32 +#include BUILDINMODULE +#endif + +/* if the BASIC interpreter provides a loop function it will superseed this one */ +#ifndef MSDOS +void __attribute__((weak)) bloop() {} +#else +void bloop() {} +#endif + +/* + * Global variables of the runtime env. + */ + +int8_t id; // active input stream +int8_t od; // active output stream +int8_t idd = ISERIAL; // default input stream in interactive mode +int8_t odd = OSERIAL; // default output stream in interactive mode +int8_t ioer = 0; // the io error variable, always or-ed with ert in BASIC + +/* counts the outputed characters on streams 0-3, used to emulate a real tab */ +#ifdef HASMSTAB +uint8_t charcount[5]; /* devices 1-4 support tabing */ +#endif + +/* the pointer to the buffer used for the &0 device */ +char* nullbuffer = ibuffer; +uint16_t nullbufsize = BUFSIZE; +uint8_t bufferstat(uint8_t c) { return 1; } + +/* the system type */ +#if defined(MSDOS) +uint8_t bsystype = SYSTYPE_MSDOS; +#elif defined(RASPPI) +uint8_t bsystype = SYSTYPE_PASPPI; +#elif defined(MINGW) +uint8_t bsystype = SYSTYPE_MINGW; +#elif defined(POSIX) +uint8_t bsystype = SYSTYPE_POSIX; +#else +uint8_t bsystype = SYSTYPE_UNKNOWN; +#endif + +/* libraries from OSes */ + +/* Wiring Code, which library to use */ +#ifdef POSIXWIRING +#include +#endif + +#ifdef POSIXPIGPIO +#include +#undef POSIXWIRING +int pigpio_pi = 0; +#endif + +/* + * Default serial baudrate and serial flags for the + * two supported serial interfaces. Serial is always active and + * connected to channel &1 with 9600 baud. + * + * channel 4 (POSIXPRT) can be either in character or block + * mode. Blockmode is set as default here. This means that all + * available characters are always loaded to a string -> inb() + */ +/* + * Arduino default serial baudrate and serial flags for the + * two supported serial interfaces. Set to 0 on POSIX OSes + */ +const uint16_t serial_baudrate = 0; +const uint16_t serial1_baudrate = 0; +uint8_t sendcr = 0; +uint8_t blockmode = 0; + +/* + * Input and output functions. + * + * ioinit(): called at setup to initialize what ever io is needed + * outch(): prints one ascii character + * inch(): gets one character (and waits for it) + * checkch(): checks for one character (non blocking) + * ins(): reads an entire line (uses inch except for pioserial) + * + */ +void ioinit() { + +/* a standalone system runs from keyboard and display */ +#ifdef STANDALONE + idd = IKEYBOARD; + odd = ODSP; +#endif + +/* run standalone on second serial, set the right parameters */ +#ifdef STANDALONESECONDSERIAL + idd = ISERIAL1; + odd = OPRT; + blockmode = 0; + sendcr = 0; +#endif + +/* signal handling - by default SIGINT which is ^C is always caught and + leads to program stop. Side effect: the interpreter cannot be stopped + with ^C, it has to be left with CALL 0, works on Linux, Mac and MINGW + but not on DOSBOX MSDOS as DOSBOS does not handle CTRL BREAK correctly + DOS can be interrupted with the CONIO mechanism using BREAKCHAR. +*/ + signalon(); + +/* this is only for RASPBERRY - wiring has to be started explicitly */ + wiringbegin(); + +/* all serial protocolls, ttl channels, SPI and Wire */ + serialbegin(); + +#ifdef POSIXPRT + prtbegin(); +#endif +#ifdef ARDUINOSPI + spibegin(); +#endif +#ifdef HASWIRE + wirebegin(); +#endif + +/* filesystems and networks */ + fsbegin(); +#ifdef POSIXMQTT + netbegin(); + mqttbegin(); +#endif + +/* the keyboards */ +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + kbdbegin(); +#endif +/* the displays */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + dspbegin(); +#endif +#if defined(ARDUINOVGA) || defined(POSIXFRAMEBUFFER) + vgabegin(); /* mind this - the fablib code and framebuffer is special here */ +#endif +/* sensor startup */ +#ifdef ARDUINOSENSORS + sensorbegin(); +#endif +/* clocks and time */ +#if defined(HASCLOCK) + rtcbegin(); +#endif + +/* the eeprom dummy */ + ebegin(); + +/* activate the iodefaults */ + iodefaults(); +} + +void iodefaults() { + od=odd; + id=idd; +} + +/* the status of the io streams (on/off) */ +int iostat(int channel) { + switch(channel) { +/* channel 0, the buffer */ + case ONULL: + return bufferstat(0); + break; +/* channel 1, the serial port */ + case ISERIAL: + return serialstat(0); + break; +/* channel 2, the display */ + case ODSP: + return dspstat(0); + break; +/* channel 4, the second serial device */ +#ifdef POSIXPRT + case ISERIAL1: + return prtstat(0); + break; +#endif +/* channel 7 wire */ +#if defined(HASWIRE) + case IWIRE: + return wirestat(0); + break; +#endif +/* channel 8 radio adaptors */ +#ifdef HASRF24 + case IRADIO: + return radiostat(0); + break; +#endif +/* channel 9 mqtt */ +#ifdef POSIXMQTT + case IMQTT: + return mqttstat(0); + break; +#endif +/* channel 16 file system */ +#ifdef FILESYSTEMDRIVER + case IFILE: + return fsstat(0); + break; +#endif + } + return 0; +} + + +/* + * Layer 0 - The generic IO code + * + * inch() reads one character from the stream, mostly blocking + * checkch() reads one character from the stream, unblocking, a peek(), + * inmplemented inconsistently + * availch() checks availablibity in the stream + * inb() a block read function for serial interfacing, developed for + * AT message receiving + */ + +/* this is odd ;-) */ +int cheof(int c) { if ((c == -1) || (c == 255)) return 1; else return 0; } + +/* the generic inch code reading one character from a stream */ +char inch() { + + switch(id) { + case ONULL: + return bufferread(); + case ISERIAL: + return serialread(); +#ifdef POSIXPRT + case ISERIAL1: + return prtread(); +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) + case IKEYBOARD: +#if defined(HASVT52) + if (vt52avail()) return vt52read(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdread(); +#endif +#endif +#if defined(HASWIRE) && defined(HASFILEIO) + case IWIRE: + return wireread(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioread(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttread(); +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileread(); +#endif + } + return 0; +} + +/* + * checking on a character in the stream, this is + * normally only used for interrupting a program, + * for many streams this is just mapped to avail + */ +char checkch(){ + switch (id) { + case ONULL: + return buffercheckch(); + case ISERIAL: + return serialcheckch(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttcheckch(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return 0; +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtcheckch(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdcheckch(); /* here no display read as this is only for break and scroll control */ +#endif + break; + } + return 0; +} + +/* character availability */ +uint16_t availch(){ + switch (id) { + case ONULL: + return bufferavailable(); + case ISERIAL: + return serialavailable(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttavailable(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return wireavailable(); +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtavailable(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) +#if defined(HASVT52) + if (vt52avail()) return vt52avail(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdavailable(); +#endif +#endif + break; + } + return 0; +} + +/* + * the block mode reader for esp and sensor modules + * on a serial interface, it tries to read as many + * characters as possible into a buffer + * blockmode = 1 reads once availch() bytes + * blockmode > 1 implements a timeout mechanism and tries + * to read until blockmode milliseconds have expired + * this is needed for esps and other sensors without + * flow control and volatile timing to receive more + * then 64 bytes + */ + +uint16_t inb(char *b, int16_t nb) { + long m; + uint16_t z; + int16_t i = 0; // check this + + if (blockmode == 1) { + i=availch(); + if (i>nb-1) i=nb-1; + b[0]=(unsigned char)i; + z=i; + b[i+1]=0; + b++; + while (i--) {*b++=inch();} + } else if (blockmode > 1) { + m=millis(); + while (i < nb-1) { + if (availch()) b[++i]=inch(); + if (millis() > m+blockmode) break; + } + b[0]=(unsigned char)i; + z=i; + b[i+1]=0; + } else { + b[0]=0; + z=0; + b[1]=0; + } + return z; +} + +/* + * reading from the console with inch, local echo is handled by the terminal + */ +uint16_t consins(char *b, uint16_t nb) { + char c; + uint16_t z; + + z=1; + while(z < nb) { + c=inch(); + if (c == '\r') c=inch(); + if (c == '\n' || cheof(c)) { /* terminal character is either newline or EOF */ + break; + } else { + b[z++]=c; + } + } + b[z]=0x00; + z--; + b[0]=(unsigned char)z; + + /* clean up charcount after every ins in MSTAB mode */ +#ifdef HASMSTAB + if (od >= 0 && od <= OPRT) charcount[od]=0; +#endif + + return z; +} + + +/* + * ins() is the generic reader into a string, by default + * it works in line mode and ends reading after newline + * + * the first element of the buffer is the lower byte of the length + * + * this is corrected later in xinput, z.a has to be set as + * a side effect + * + * for streams providing entire strings as an input the + * respective string method is called + * + * all other streams are read using consins() for character by character + * input until a terminal character is reached + */ +uint16_t ins(char *b, uint16_t nb) { + switch(id) { + case ONULL: + return bufferins(b, nb); + case ISERIAL: + return serialins(b, nb); + break; +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + case IKEYBOARD: + return kbdins(b, nb); +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtins(b, nb); + #endif +#if defined(HASWIRE) && defined(HASFILEIO) + case IWIRE: + return wireins(b, nb); +#endif +#ifdef HASRF24 + case IRADIO: + return radioins(b, nb); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttins(b, nb); +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + return consins(b, nb); +#endif + default: + b[0]=0; b[1]=0; + return 0; + } +} + +/* + * outch() outputs one character to a stream + * block oriented i/o like in radio not implemented here + */ +void outch(char c) { + +/* do we have a MS style tab command, then count characters on stream 1-4 but not in fileio */ +/* this does not work for control characters - needs to go to vt52 later */ + +/* also composite characters like German Umlaut does not count properly */ + +#ifdef HASMSTAB + if (od >= 0 && od <= OPRT) { + if (c > 31) charcount[od]+=1; + if (c == 10) charcount[od]=0; + } +#endif + + switch(od) { + case ONULL: + bufferwrite(c); + break; + case OSERIAL: + serialwrite(c); + break; +#ifdef POSIXPRT + case OPRT: + prtwrite(c); + break; +#endif +#ifdef FILESYSTEMDRIVER + case OFILE: + filewrite(c); + break; +#endif +#if defined(ARDUINOVGA) + case ODSP: + vgawrite(c); + break; +#elif defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case ODSP: + dspwrite(c); + break; +#endif +#ifdef POSIXMQTT + case OMQTT: + mqttwrite(c); /* buffering for the PRINT command */ + break; +#endif + default: + break; + } + byield(); /* yield after every character for fuzzy OSes */ +} + +/* + * outs() outputs a string of length x at index ir - basic style + * default is a character by character operation, block + * oriented write needs special functions + */ +void outs(char *ir, uint16_t l){ + uint16_t i; + + switch (od) { +#ifdef HASRF24 + case ORADIO: + radioouts(ir, l); + break; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case OWIRE: + wireouts(ir, l); + break; +#endif +#ifdef POSIXMQTT + case OMQTT: + mqttouts(ir, l); + break; +#endif +#ifdef GRAPHDISPLAYDRIVER + case ODSP: + dspouts(ir, l); + break; +#endif + default: + for(i=0; i +uint8_t breaksignal = 0; + +/* simple signal handler */ +void signalhandler(int sig){ + breaksignal=1; + signal(BREAKSIGNAL, signalhandler); +} + +/* activate signal handling */ +void signalon() { + signal(BREAKSIGNAL, signalhandler); +} + +/* deactivate signal handling unused and not yet done*/ +void signaloff() {} + +#endif + +/* + * helper functions OS, heuristic on how much memory is available in BASIC + */ +long freememorysize() { +#ifdef MSDOS + return 48000; +#else + return 65536; +#endif +} + +long freeRam() { + return freememorysize(); +} + +/* + * the sleep and restart functions + */ +void restartsystem() { exit(0);} +void activatesleep(long t) {} + +/* + * start the SPI bus + */ +void spibegin() {} + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + */ +const int dsp_rows=0; +const int dsp_columns=0; +void dspsetupdatemode(uint8_t c) {} +void dspwrite(char c){} +void dspbegin() {} +uint8_t dspstat(uint8_t c) {return 0; } +char dspwaitonscroll() { return 0; } +uint8_t dspactive() {return 0; } +void dspsetscrollmode(uint8_t c, uint8_t l) {} +void dspsetcursor(uint8_t c) {} + +#ifndef POSIXFRAMEBUFFER +/* these are the graphics commands */ +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) {} +void vgacolor(uint8_t c) {} +void plot(int x, int y) {} +void line(int x0, int y0, int x1, int y1) {} +void rect(int x0, int y0, int x1, int y1) {} +void frect(int x0, int y0, int x1, int y1) {} +void circle(int x0, int y0, int r) {} +void fcircle(int x0, int y0, int r) {} + +/* stubs for the vga code part analogous to ESP32 */ +void vgabegin(){} +void vgawrite(char c){} +#else +/* + * This is the first draft of the linux framebuffer code + * currently very raw, works only if the framebuffer is 24 bit + * very few checks, all kind of stuff can go wrong here. + * + * Main ideas and some part of the code came from this + * article https://www.mikrocontroller.net/topic/379335 + * by Andy W. + * + * Bresenham's algorithm came from the Wikipedia article + * and this very comprehensive discussion + * http://members.chello.at/~easyfilter/bresenham.html + * by Alois Zingl from the Vienna Technikum. I also recommend + * his thesis: http://members.chello.at/%7Eeasyfilter/Bresenham.pdf + * + */ +#include +#include +#include +#include +#include + +/* 'global' variables to store screen info */ +char *framemem = 0; +int framedesc = 0; + +/* info from the frame buffer itself */ +struct fb_var_screeninfo vinfo; +struct fb_fix_screeninfo finfo; +struct fb_var_screeninfo orig_vinfo; + +/* the color variable of the frame buffer */ +long framecolor = 0xffffff; +int framevgacolor = 0x0f; +long framescreensize = 0; +int framecolordepth = 0; + +/* prepare the framebuffer device */ +void vgabegin() { + +/* see if we can open the framebuffer device */ + framedesc = open("/dev/fb0", O_RDWR); + if (!framedesc) { + printf("** error opening frame buffer \n"); + return; + } + +/* now get the variable info of the screen */ + if (ioctl(framedesc, FBIOGET_VSCREENINFO, &vinfo)) { + printf("** error reading screen information \n"); + return; + } + printf("Detected screen %dx%d, %dbpp \n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel); + +/* BASIC currently does 24 bit color only */ + memcpy(&orig_vinfo, &vinfo, sizeof(struct fb_var_screeninfo)); +/* + vinfo.bits_per_pixel = 24; + if (ioctl(framedesc, FBIOPUT_VSCREENINFO, &vinfo)) { + printf("** error setting variable information \n"); + return; + } +*/ + +/* how much color have we got */ + framecolordepth = vinfo.bits_per_pixel; + +/* get the fixed information of the screen */ + if (ioctl(framedesc, FBIOGET_FSCREENINFO, &finfo)) { + printf("Error reading fixed information.\n"); + return; + } + +/* now ready to memory map the screen - evil, we assume 24 bit without checking */ + + framescreensize = (framecolordepth/8) * vinfo.xres * vinfo.yres; + framemem = (char*)mmap(0, framescreensize, PROT_READ | PROT_WRITE, MAP_SHARED, framedesc, 0); + if ((int)framemem == -1) { + printf("** error failed to mmap.\n"); + framemem=0; + return; + } + +/* if all went well we have valid non -1 framemem and can continue */ +} + +/* this function does not exist in the ESP32 world because we don't care there */ +void vgaend() { + if ((int)framemem) munmap(framemem, framescreensize); + if (ioctl(framedesc, FBIOPUT_VSCREENINFO, &orig_vinfo)) { + printf("** error re-setting variable information \n"); + } + close(framedesc); +} + +/* set the color variable depending on the color depth*/ +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) { + switch (framecolordepth/8) { + case 4: + framecolor = (((long)r << 16) & 0x00ff0000) | (((long)g << 8) & 0x0000ff00) | ((long)b & 0x000000ff); /* untested */ + break; + case 3: + framecolor = (((long)r << 16) & 0x00ff0000) | (((long)g << 8) & 0x0000ff00) | ((long)b & 0x000000ff); + break; + case 2: + framecolor = ((long) (r & 0xff) >> 3) << 10 | ((long) (g & 0xff) >> 2) << 6 | ((long) (b & 0xff) >> 3); /* untested */ + break; + case 1: + framecolor = ((long) (r & 0xff) >> 5) << 5 | ((long) (g & 0xff) >> 5) << 2 | ((long) (b & 0xff) >> 6); /* untested */ + break; + } +} + +/* this is taken from the Arduino TFT code */ +void vgacolor(uint8_t c) { + short base=128; + framevgacolor=c; + if (c==8) { rgbcolor(64, 64, 64); return; } + if (c>8) base=255; + rgbcolor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} + +/* plot directly into the framebuffer */ +void plot(int x, int y) { + unsigned long pix_offset; + +/* is everything in range, no error here */ + if (x < 0 || y < 0 || x >= vinfo.xres || y >= vinfo.yres) return; + +/* find the memory location */ + pix_offset = (framecolordepth/8) * x + y * finfo.line_length; + + if (pix_offset < 0 || pix_offset+ (framecolordepth/8-1) > framescreensize) return; + +/* write to the buffer */ + switch (framecolordepth/8) { + case 4: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 8) & 0x000000ff); + *((char*)(framemem + pix_offset+3)) = (unsigned char)((framecolor >> 16) & 0x000000ff); + break; + case 3: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 8) & 0x000000ff); + *((char*)(framemem + pix_offset+2)) = (unsigned char)((framecolor >> 16) & 0x000000ff); + break; + case 2: + *((char*)(framemem + pix_offset )) = (unsigned char)((framecolor & 0x1f) + (((framecolor >> 5) & 0x03) << 6)); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 7) & 0xff); + break; + case 1: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + break; + } + +} + +/* Bresenham's algorith from Wikipedia */ +void line(int x0, int y0, int x1, int y1) { + int dx, dy, sx, sy; + int error, e2; + + dx=abs(x0-x1); + sx=x0 < x1 ? 1 : -1; + dy=-abs(y1-y0); + sy=y0 < y1 ? 1 : -1; + error=dx+dy; + + while(1) { + plot(x0, y0); + if (x0 == x1 && y0 == y1) break; + e2=2*error; + if (e2 > dy) { + if (x0 == x1) break; + error=error+dy; + x0=x0+sx; + } + if (e2 <= dx) { + if (y0 == y1) break; + error=error+dx; + y0=y0+sy; + } + } +} + +/* rects could also be drawn with hline and vline */ +void rect(int x0, int y0, int x1, int y1) { + line(x0, y0, x1, y0); + line(x1, y0, x1, y1); + line(x1, y1, x0, y1); + line(x0, y1, x0, y0); +} + +/* filled rect, also just using line right now */ +void frect(int x0, int y0, int x1, int y1) { + int dx, sx; + int x; + sx=x0 < x1 ? 1 : -1; + for(x=x0; x != x1; x=x+sx) line(x, y0, x, y1); +} + +/* Bresenham for circles, based on Alois Zingl's work */ +void circle(int x0, int y0, int r) { + int x, y, err; + x=-r; + y=0; + err=2-2*r; + do { + plot(x0-x, y0+y); + plot(x0-y, y0-x); + plot(x0+x, y0-y); + plot(x0+y, y0+x); + r=err; + if (r <= y) err+=++y*2+1; + if (r > x || err > y) err+=++x*2+1; + } while (x < 0); +} + +/* for filled circles draw lines instead of points */ +void fcircle(int x0, int y0, int r) { + int x, y, err; + x=-r; + y=0; + err=2-2*r; + do { + line(x0-x, y0+y, x0+x, y0+y); + line(x0+x, y0-y, x0-x, y0-y); + r=err; + if (r <= y) err+=++y*2+1; + if (r > x || err > y) err+=++x*2+1; + } while (x < 0); +} + +/* not needed really, now, later yes ;-) */ +void vgawrite(char c) {} +#endif + +/* + * Keyboard code stubs + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +void kbdbegin() {} +uint8_t kbdstat(uint8_t c) {return 0; } +uint8_t kbdavailable(){ return 0;} +char kbdread() { return 0;} +char kbdcheckch() { return 0;} + +/* vt52 code stubs - unused here - needed for basic.c */ +uint8_t vt52avail() {return 0;} +char vt52read() { return 0; } + +/* Display driver would be here, together with vt52 */ + +/* + * Real Time clock code + */ + +void rtcbegin() {} + +uint16_t rtcget(uint8_t i) { + struct timeb thetime; + struct tm *ltime; + ftime(&thetime); + ltime=localtime(&thetime.time); + switch (i) { + case 0: + return ltime->tm_sec; + case 1: + return ltime->tm_min; + case 2: + return ltime->tm_hour; + case 3: + return ltime->tm_wday; + case 4: + return ltime->tm_mday; + case 5: + return ltime->tm_mon+1; + case 6: + return ltime->tm_year-100; + default: + return 0; + } +} + +void rtcset(uint8_t i, uint16_t v) {} + +/* + * Wifi and MQTT code + */ +#ifndef POSIXMQTT +void netbegin() {} +uint8_t netconnected() { return 0; } +void mqttbegin() {} +uint8_t mqttstat(uint8_t c) {return 0; } +uint8_t mqttstate() {return 0;} +void mqttsubscribe(const char *t) {} +void mqttsettopic(const char *t) {} +void mqttouts(const char *m, uint16_t l) {} +uint16_t mqttins(char *b, uint16_t nb) { return 0; }; +char mqttread() {return 0;}; +#else +/* we use mosquitto */ +#include +/* we assume to be on the network */ +void netbegin() {} +uint8_t netconnected() { return 1; } +/* the mqtt code */ +void mqttbegin() {} +uint8_t mqttstat(uint8_t c) {return 0; } +uint8_t mqttstate() {return 0;} +void mqttsubscribe(const char *t) {} +void mqttsettopic(const char *t) {} +void mqttouts(const char *m, uint16_t l) {} +uint16_t mqttins(char *b, uint16_t nb) { return 0; }; +char mqttread() {return 0;}; +#endif + +/* + * EEPROM handling, these function enable the @E array and + * loading and saving to EEPROM with the "!" mechanism + * a filesystem based dummy + */ +int8_t eeprom[EEPROMSIZE]; +void ebegin(){ + int i; + FILE* efile; + for (i=0; i=0 && a=0 && a YIELDINTERVAL-1) { + yieldfunction(); + lastyield=millis(); + } + +/* yield every second */ + if (millis()-lastlongyield > LONGYIELDINTERVAL-1) { + longyieldfunction(); + lastlongyield=millis(); + } + #endif + + /* call the background task scheduler on some platforms implemented in hardware-* */ + yieldschedule(); +} + +/* delay must be implemented to use byield() while waiting */ +void bdelay(uint32_t t) { + unsigned long i; + if (t>0) { + i=millis(); + while (millis() < i+t) byield(); + } +} + +#ifdef FASTTICKERPROFILE +int avgfastticker() { + return countfasttick; +} + +void clearfasttickerprofile() { + countfasttick=0; +} +#endif + +/* fastticker is the hook for all timing functions */ +void fastticker() { +/* fastticker profiling test code */ +#ifdef FASTTICKERPROFILE + countfasttick++; +#endif +/* toggle the tone pin */ +#ifdef ARDUINOTONEEMULATION + tonetoggle(); +#endif +} + +/* everything that needs to be done often - 32 ms */ +void yieldfunction() {} + +/* everything that needs to be done not so often - 1 second */ +void longyieldfunction() { +#ifdef BASICBGTASK +/* polling for the BREAKCHAR */ +#ifdef BREAKINBACKGROUND + if (checkch() == BREAKCHAR) breakcondition=1; +#endif +#endif +} + +void yieldschedule() {} + +/* + * The file system driver - all methods needed to support BASIC fs access + * MSDOS to be done + * + * file system code is a wrapper around the POSIX API + */ +void fsbegin() {} +FILE* ifile; +FILE* ofile; +#ifndef MSDOS +DIR* root; +struct dirent* file; +#else +void* root; +void* file; +#endif + +/* the buildin file system for ro access - transfered and simplified from the Arduino runtime.cpp */ +#ifdef HASBUILDIN +char* buildin_ifile = 0; +uint16_t buildin_ifilepointer = 0; +char* buildin_file = 0; +char* buildin_pgm = 0; +uint8_t buildin_rootactive = 0; +uint16_t buildin_rootpointer = 0; +char buildin_tempname[FBUFSIZE]; /* this is needed for the catalog code as strings need to be copied from progmem */ +#endif + + +/* POSIX OSes always have filesystems */ +uint8_t fsstat(uint8_t c) { return 1; } + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char c) { + if (ofile) + fputc(c, ofile); + else + ioer=1; +} + +char fileread(){ + char c; +/* the buildin file is active, we handle this first, else we allow for another FS */ +#if defined(HASBUILDIN) + if (buildin_ifile) { + c=buildin_ifile[buildin_ifilepointer]; + if (c != '\f') buildin_ifilepointer++; else { ioer=-1; c=-1; } + return c; + } +#endif + if (ifile) c=fgetc(ifile); else { ioer=1; return 0; } + if (cheof(c)) ioer=-1; + return c; +} + +uint8_t ifileopen(const char* filename){ +#if defined(HASBUILDIN) + int i, file; + char* name; + char c; + +/* opening a new file */ + buildin_ifilepointer=0; + buildin_ifile=0; + +/* is a valid filename provided */ + if (!filename) return 0; + + file=0; + while(1) { + +/* find a name in progmem, 0 if no more name */ + name=(char*)buildin_program_names[file]; + if (name == 0) break; + +/* compare the name with the filename */ + for(i=0;i<32;i++) { + c=name[i]; + +/* we are at the end of the name, if filename is also ending, we got it */ + if (c == 0 && filename[i] == 0) { + buildin_ifile=(char*)buildin_programs[file]; + return (buildin_ifile != 0); + } + +/* a character mismatch means we need to go to the next name */ + if (c != filename[i]) { + file++; + break; + } + } + } +#endif + ifile=fopen(filename, "r"); + return ifile!=0; +} + +void ifileclose(){ + #if defined(HASBUILDIN) + if (buildin_ifile) { + buildin_ifile=0; + buildin_ifilepointer=0; + } +#endif + if (ifile) fclose(ifile); + ifile=0; +} + +uint8_t ofileopen(const char* filename, const char* m){ + ofile=fopen(filename, m); + return ofile!=0; +} + +void ofileclose(){ + if (ofile) fclose(ofile); + ofile=0; +} + +int fileavailable(){ +#if defined(HASBUILDIN) + if (buildin_ifile) { + if (buildin_ifile[buildin_ifilepointer] != '\f') return 1; else return 0; + } +#endif + return !feof(ifile); +} + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +#ifdef MSDOS +#include +#include +struct ffblk *bffblk; +#endif + +void rootopen() { +#ifdef HASBUILDIN + buildin_rootpointer=0; + buildin_rootactive=1; +#endif +#ifndef MSDOS + root=opendir ("./"); +#else + (void) findfirst("*.*", bffblk, 0); +#endif +} + +uint8_t rootnextfile() { +#ifdef HASBUILDIN + if (buildin_rootactive) { + buildin_file=(char*)buildin_program_names[buildin_rootpointer]; + if (buildin_file != 0) { + buildin_pgm=(char*)buildin_programs[buildin_rootpointer]; + buildin_rootpointer++; + return 1; + } else { + buildin_rootactive=0; + } + } +#endif +#ifndef MSDOS + file = readdir(root); + return (file != 0); +#else + return (findnext(bffblk) == 0); +#endif +} + +uint8_t rootisfile() { +#ifdef HASBUILDIN + if (buildin_rootactive) return 1; +#endif +#if !defined(MSDOS) && !defined(MINGW) + return (file->d_type == DT_REG); +#else + return 1; +#endif +} + +const char* rootfilename() { +/* can be simplified */ +#ifdef HASBUILDIN + if (buildin_rootactive) { + for(int i=0; id_name); +#else + return (bffblk->ff_name); +#endif +} + +uint32_t rootfilesize() { +#ifdef HASBUILDIN + int i=0; + if (buildin_rootactive && buildin_pgm) { + for (;;i++) { + char ch=buildin_pgm[i]; + if (ch == 0) return i; + } + } +#endif +#ifndef MSDOS + return 0; +#else + return (bffblk->ff_fsize); +#endif +} + +void rootfileclose() {} + +void rootclose(){ +#ifdef HASBUILDIN + buildin_rootactive=0; +#endif +#ifndef MSDOS + (void) closedir(root); +#endif +} + +/* + * remove method for files + */ +void removefile(const char *filename) { + remove(filename); +} + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(uint8_t i) { + puts("Format not implemented on this platform."); +} + +/* + * The buffer code, a simple buffer to store output and + * input data. It can be used as a device in BASIC using the + * modifier &0. + */ + +/* use the input buffer variable from BASIC here, it is extern to runtime */ +void bufferbegin() {} + +/* write to the buffer, works only until 127 + uses vt52 style commands to handle the buffer content*/ +void bufferwrite(char c) { + if (!nullbuffer) return; + switch (c) { + case 12: /* clear screen */ + //nullbuffer[nullbuffer[0]+1]=0; + nullbuffer[0]=0; + nullbuffer[1]=0; + break; + case 10: + case 13: /* cr and lf ignored */ + break; + case 8: /* backspace */ + if (nullbuffer[0]>0) nullbuffer[0]--; + break; + default: + if (nullbuffer[0] < nullbufsize-1 && nullbuffer[0] < 127) { + nullbuffer[++nullbuffer[0]]=c; + nullbuffer[nullbuffer[0]+1]=0; /* null terminate */ + } + break; + } +} + +/* read not needed right now */ +char bufferread() { return 0; } +uint16_t bufferavailable() { return 0; } +char buffercheckch() { return 0; } +void bufferflush() { } +uint16_t bufferins(char *b, uint16_t nb) { return 0; } + +/* + * Primary serial code, if NONBLOCKING is set, + * platform dependent I/O is used. This means that + * UNIXes use fcntl() to implement a serialcheckch + * and MSDOS as well als WIndows use kbhit(). + * This serves only to interrupt programs with + * BREAKCHAR at the moment. + */ +#ifdef POSIXNONBLOCKING +#if !defined(MSDOS) && !defined(MINGW) +#include + +/* we need to poll the serial port in non blocking mode + this slows it down so that we don't block an entire core + read speed here is one character per millisecond which + is 8000 baud, no one can type that fast but tedious when + from stdin */ +/* +void freecpu() { + struct timespec intervall; + struct timespec rtmp; + intervall.tv_sec=0; + intervall.tv_nsec=1000000; + nanosleep(&intervall, &rtmp); +} +*/ + +/* for non blocking I/O try to modify the stdin file descriptor */ +void serialbegin() { +/* we keep I/O mostly blocking here */ +/* + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); +*/ +} + +/* get and unget the character in a non blocking way */ +char serialcheckch(){ + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); + int ch=getchar(); + ungetc(ch, stdin); + fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); + return ch; +} + +/* check EOF, don't use feof()) here */ +uint16_t serialavailable() { + if (cheof(serialcheckch())) return 0; else return 1; +} + +/* two versions of serialread */ +char serialread() { + char ch; +/* blocking to let the OS handle the wait - this means: no call to byield() in interaction */ + ch=getchar(); + return ch; +/* this is the code that waits - calls byield() often just like on the Arduino */ +/* + while (cheof(serialcheckch())) { byield(); freecpu(); } + return getchar(); +*/ +} + +/* flushes the serial code in non blocking mode */ +void serialflush() { + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); + while (!cheof(getchar())); + fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); +} +#else +/* the non blocking MSDOS and MINGW code */ +#include +/* we go way back in time here and do it like DOS did it */ +void serialbegin(){} + +/* we go through the terminal on read */ +char serialread() { + return getchar(); +} + +/* check if a key is hit, get it and return it */ +char serialcheckch(){ + if (kbhit()) return getch(); +} + +/* simple version */ +uint16_t serialavailable() { + return 1; +} + +/* simple version */ +void serialflush() { } + +#endif +#else +/* the blocking code only uses puchar and getchar */ +void serialbegin(){} +char serialread() { return getchar(); } +char serialcheckch(){ return 1; } +uint16_t serialavailable() { return 1; } +void serialflush() {} +#endif + +uint8_t serialstat(uint8_t c) { + if (c == 0) return 1; + if (c == 1) return serial_baudrate/1000; + return 0; +} + +/* send the CSI sequence to start with ANSI */ +void sendcsi() { + putchar(27); putchar('['); /* CSI */ +} + +/* the vt52 state engine */ +#ifdef POSIXVT52TOANSI +#include +uint8_t dspesc = 0; +uint8_t vt52s = 0; +int cursory = 0; +uint8_t vt52active = 1; + +/* something little */ +uint8_t vt52number(char c) { + uint8_t b=c; + if (b>31) return b-32; else return 0; +} + +/* set the cursor */ +void dspsetcursory(uint8_t i) { + cursory=i; +} + +/* remember the position */ +void dspsetcursorx(uint8_t i) { + sendcsi(); + printf("%d;%dH", abs(cursory)+1, i+1); +} + +/* set colors, vga here */ +void dspsetfgcolor(uint8_t co) { + sendcsi(); + if (co < 8) { + putchar('3'); + } else { + putchar('9'); + co=co-8; + } + putchar('0'+co); + putchar('m'); +} + +void dspsetbgcolor(uint8_t co) { + sendcsi(); + if (co < 8) { + putchar('4'); + } else { + putchar('1'); putchar('0'); + co=co-8; + } + putchar('0'+co); + putchar('m'); +} + +/* vt52 state engine, a smaller version of the Arduino code*/ +void dspvt52(char* c){ + +/* reading and processing multi byte commands */ + switch (vt52s) { + case 'Y': + if (dspesc == 2) { + dspsetcursory(vt52number(*c)); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + dspsetcursorx(vt52number(*c)); + *c=0; + } + vt52s=0; + break; + case 'b': + dspsetfgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + case 'c': + dspsetbgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + } + +/* commands of the terminal in text mode */ + switch (*c) { + case 'v': /* GEMDOS / TOS extension enable wrap */ + break; + case 'w': /* GEMDOS / TOS extension disable wrap */ + break; + case '^': /* Printer extensions - print on */ + break; + case '_': /* Printer extensions - print off */ + break; + case 'W': /* Printer extensions - print without display on */ + break; + case 'X': /* Printer extensions - print without display off */ + break; + case 'V': /* Printer extensions - print cursor line */ + break; + case ']': /* Printer extension - print screen */ + break; + case 'F': /* enter graphics mode */ + break; + case 'G': /* exit graphics mode */ + break; + case 'Z': // Ident + break; + case '=': // alternate keypad on + case '>': // alternate keypad off + break; + case 'b': // GEMDOS / TOS extension text color + case 'c': // GEMDOS / TOS extension background color + vt52s=*c; + dspesc=1; + *c=0; + return; + case 'e': // GEMDOS / TOS extension enable cursor + break; + case 'f': // GEMDOS / TOS extension disable cursor + break; + case 'p': // GEMDOS / TOS extension reverse video + break; + case 'q': // GEMDOS / TOS extension normal video + break; + case 'A': // cursor up + sendcsi(); + putchar('A'); + break; + case 'B': // cursor down + sendcsi(); + putchar('B'); + break; + case 'C': // cursor right + sendcsi(); + putchar('C'); + break; + case 'D': // cursor left + sendcsi(); + putchar('D'); + break; + case 'E': // GEMDOS / TOS extension clear screen + *c=12; + dspesc=0; + return; + case 'H': // cursor home + *c=2; + dspesc=0; + return; + case 'Y': // Set cursor position + vt52s='Y'; + dspesc=2; + *c=0; + return; + case 'J': // clear to end of screen + sendcsi(); + putchar('J'); + break; + case 'd': // GEMDOS / TOS extension clear to start of screen + sendcsi(); + putchar('1'); putchar('J'); + break; + case 'K': // clear to the end of line + sendcsi(); + putchar('K'); + break; + case 'l': // GEMDOS / TOS extension clear line + sendcsi(); + putchar('2'); putchar('K'); + break; + case 'o': // GEMDOS / TOS extension clear to start of line + sendcsi(); + putchar('1'); putchar('K'); + break; + case 'k': // GEMDOS / TOS extension restore cursor + break; + case 'j': // GEMDOS / TOS extension save cursor + break; + case 'I': // reverse line feed + putchar(27); + putchar('M'); + break; + case 'L': // Insert line + break; + case 'M': // Delete line - questionable + sendcsi(); + putchar('2'); putchar('K'); + break; + } + dspesc=0; + *c=0; +} +#endif + +uint16_t serialins(char* b, uint16_t nb) { + return consins(b, nb); +} + +void serialwrite(char c) { + +/* the vt52 state engine */ +#ifdef POSIXVT52TOANSI + if (dspesc) { + dspvt52(&c); + if (c == 0) return; + } + +/* ESC is caught here and we only listen to VT52 not to ANSI */ + if (c == 27 && vt52active) { + dspesc=1; + return; + } +#endif + +/* this is the character translation routine to convert the Arduino + style characters 12 for CLS and 2 for HOME to ANSI, makes + BASIC programs more compatible */ +#ifdef POSIXTERMINAL + switch (c) { +/* form feed is clear screen - compatibility with Arduino code */ + case 12: + sendcsi(); + putchar('2'); putchar('J'); +/* home sequence in the arduino code */ + case 2: + sendcsi(); + putchar('H'); + return; + } +#endif + +/* finally send the plain character */ + putchar(c); +} + +/* + * handling the second serial interface - only done on Mac so far + * test code + * + * Tried to learn from https://www.pololu.com/docs/0J73/15.5 + * + */ +#ifdef POSIXPRT +#include +#if !defined(MSDOS) && !defined(MINGW) +#include +#endif + +/* the file name of the printer port */ +int prtfile; + +/* the buffer to read one character */ +char prtbuf = 0; + + +void prtbegin() {} + +char prtopen(char* filename, uint16_t mode) { +#if !defined(MSDOS) && !defined(MINGW) + +/* try to open the device file */ + prtfile=open(filename, O_RDWR | O_NOCTTY); + if (prtfile == -1) { + perror(filename); + return 0; + } + +/* get rid of garbage */ + tcflush(prtfile, TCIOFLUSH); + +/* configure the device */ + struct termios opt; + (void) tcgetattr(prtfile, &opt); + + +/* raw terminal settings + opt.c_iflag &= ~(INLCR | IGNCR | ICRNL | IXON | IXOFF); + opt.c_oflag &= ~(ONLCR | OCRNL); + opt.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); +*/ + +/* timeout settings on read 100ms, read every character */ + opt.c_cc[VTIME] = 1; + opt.c_cc[VMIN] = 0; + +/* set the baudrate */ + switch (mode) { + case 9600: + cfsetospeed(&opt, B9600); + break; + default: + cfsetospeed(&opt, B9600); + break; + } + cfsetispeed(&opt, cfgetospeed(&opt)); + +/* set the termin attributes */ + tcsetattr(prtfile, TCSANOW, &opt); +#endif + + return 1; +} + +void prtclose() { + if (prtfile) close(prtfile); +} + +uint8_t prtstat(uint8_t c) {return 1; } + +void prtset(uint32_t s) {} + +/* write the characters byte by byte */ +void prtwrite(char c) { + int i=write(prtfile, &c, 1); + if (i != 1) ioer=1; +} + +/* read just one byte, map no bytes to EOF = -1 */ +char prtread() { + char c; + +/* something in the buffer? return it! */ + if (prtbuf) { + c=prtbuf; + prtbuf=0; + } else { +/* try to read */ + int i=read(prtfile, &c, 1); + if (i < 0) { + ioer=1; + return 0; + } + if (i == 0) return -1; + } + return c; +} + +/* not yet implemented */ +char prtcheckch(){ + if (!prtbuf) { /* try to read */ + int i=read(prtfile, &prtbuf, 1); + if (i <= 0) prtbuf=0; + } + return prtbuf; +} + +uint16_t prtavailable(){ + return prtcheckch()!=0; +} + +uint16_t prtins(char* b, uint16_t nb) { + if (blockmode > 0) return inb(b, nb); else return consins(b, nb); +} + +#else +void prtbegin() {} +uint8_t prtstat(uint8_t c) {return 0; } +void prtset(uint32_t s) {} +void prtwrite(char c) {} +char prtread() {return 0;} +char prtcheckch(){ return 0; } +uint16_t prtavailable(){ return 0; } +uint16_t prtins(char* b, uint16_t nb) { return 0; } +#endif + + +/* + * The wire code + */ +#if defined(POSIXWIRE) && defined(POSIXPIGPIO) +uint8_t wire_slaveid = 0; + +/* open the wire connection in pigpio */ +void wirebegin() { +} + +/* we return the handle here, inconsistent with the Arduino code */ +uint8_t wirestat(uint8_t c) { + return 1; +} + +void wireopen(uint8_t s, uint8_t m) { + if (m == 0) { + wire_slaveid=s; + } else if (m == 1) { + outsc("** wire slave mode not implemented"); outcr(); + } else + error(EORANGE); +} + + +/* read a number of bytes, depending on the string length */ +uint16_t wireins(char *b, uint8_t l) { + int handle; + int16_t z; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, wire_slaveid, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + } + + z=i2c_read_device(pigpio_pi, handle, b+1, l); + + if (z < 0) { + ioer=-1; + z=0; + } + b[0]=z; + + i2c_close(pigpio_pi, handle); + + return z; +} + + +void wireouts(char *b, uint8_t l) { + int handle; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, wire_slaveid, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + } + + if (i2c_write_device(pigpio_pi, handle, b, l) < 0) ioer=-1; + + i2c_close(pigpio_pi, handle); +} + +uint16_t wireavailable() { return 1; } + +/* the register access functions */ +int16_t wirereadbyte(uint8_t port) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + return -1; + } + + res=i2c_read_byte(pigpio_pi, handle); + i2c_close(pigpio_pi, handle); + return res; +} + +/* use the simple wire byte function */ +void wirewritebyte(uint8_t port, int16_t data) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + ioer=i2c_write_byte(pigpio_pi, handle, data); + + i2c_close(pigpio_pi, handle); +} + + +/* this code used the write byte function twice */ +/* +void wirewriteword(short port, short data1, short data2) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + ioer=i2c_write_byte(pigpio_pi, handle, data1); + ioer+=i2c_write_byte(pigpio_pi, handle, data2); + + i2c_close(pigpio_pi, handle); +} +*/ + +/* use the raw access function in a buffer */ +void wirewriteword(short port, short data1, short data2) { + int res, handle; + mem_t buf[2]; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + buf[0]=data1; + buf[1]=data2; + + if (i2c_write_device(pigpio_pi, handle, buf, 2) <0 ) ioer=-1; + + i2c_close(pigpio_pi, handle); +} + +/* just a helper to make GET work, wire is string oriented */ +char wireread() { + char wbuffer[2]; + if wireins(wbuffer, 1) return wbuffer[1]; else return 0; +} + +#else +void wirebegin() {} +uint8_t wirestat(uint8_t c) {return 0; } +void wireopen(uint8_t s, uint8_t m) {} +uint16_t wireins(char *b, uint8_t l) { b[0]=0; return 0; } +void wireouts(char *b, uint8_t l) {} +uint16_t wireavailable() { return 1; } +int16_t wirereadbyte() { return 0; } +void wirewritebyte(uint8_t data) { return; } +void wirewriteword(uint8_t port, int16_t data1, int16_t data2) { return; } +/* just a helper to make GET work, wire is string oriented */ +char wireread() { return 0; } +#endif + +/* + * Read from the radio interface, radio is always block + * oriented. + */ +uint8_t radiostat(uint8_t c) {return 0; } +void radioset(uint8_t s) {} +uint16_t radioins(char *b, uint8_t nb) { b[0]=0; b[1]=0; return 0; } +void radioouts(char *b, uint8_t l) {} +void iradioopen(const char *filename) {} +void oradioopen(const char *filename) {} +uint16_t radioavailable() { return 0; } +char radioread() { return 0; } + +/* Arduino sensors */ +void sensorbegin() {} +float sensorread(uint8_t s, uint8_t v) {return 0;}; + + +/* + * event handling wrappers, to keep Arduino specifics out of BASIC + */ + +uint8_t pintointerrupt(uint8_t pin) { return 0; } +void attachinterrupt(uint8_t inter, void (*f)(), uint8_t mode) {} +void detachinterrupt(uint8_t pin) {} + +/* + * Experimental code to simulate 64kb SPI SRAM modules + * + * currently used to test the string code of the mem + * interface + * + */ + +#ifdef SPIRAMSIMULATOR + +static int8_t spiram[65536]; + +/* the RAM begin method sets the RAM to byte mode */ +uint16_t spirambegin() { + return 65534; +} + +/* the simple unbuffered byte write, with a cast to signed char */ +void spiramrawwrite(uint16_t a, int8_t c) {spiram[a]=c;} + +/* the simple unbuffered byte read, with a cast to signed char */ +int8_t spiramrawread(uint16_t a) {return spiram[a];} + +/* the buffers calls, also only simulated here */ + +void spiram_rwbufferwrite(uint16_t a, int8_t c) {spiram[a]=c;} + +int8_t spiram_rwbufferread(uint16_t a) {return spiram[a];} + +int8_t spiram_robufferread(uint16_t a) {return spiram[a];} + +/* to handle strings in SPIRAM situations two more buffers are needed + * they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set + */ +char spistrbuf1[SPIRAMSBSIZE]; +char spistrbuf2[SPIRAMSBSIZE]; +#endif + + diff --git a/data/Basic2/Posix/runtime.h b/data/Basic2/Posix/runtime.h new file mode 100644 index 0000000000000000000000000000000000000000..87419c844db8f88793fca0b8bf329553b5380d6f --- /dev/null +++ b/data/Basic2/Posix/runtime.h @@ -0,0 +1,1205 @@ +/* + * Stefan's basic interpreter. + * + * Prototypes for the runtime environment of the BASIC interpreter. + * + * Needs to be included by runtime.c or runtime.cpp and basic.c as + * it describes the interface between the BASIC interpreter and the + * runtime environment. + * + * Most configurable parameters are in hardware.h. + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + */ + +#if !defined(__RUNTIMEH__) +#define __RUNTIMEH__ + +/* + * The system type identifiers + * + * SYSTYPE_UNKNOWN: unknown system, typically an unknown Arduino + * SYSTYPE_AVR: an AVR based Arduino, like the UNO, NANO, MEGA, PRO + * SYSTYPE_ESP8266: an ESP8266 based Arduino, like the Wemos D1, very common and generic + * SYSTYPE_ESP32: an ESP32 based Arduino, like the Wemos Lolin32, very common and generic + * SYSTYPE_RP2040: a Raspberry PI Pico, the first RP2040 based Arduino + * SYSTYPE_SAM: a SAM based Arduino, like the DUE + * SYSTYPE_XMC: an XMC based Arduino, like the Infineon XMC1100 + * SYSTYPE_SMT32: an STM32 based Arduino, like the Blue Pill + * SYSTYPE_NRENESA: a Renesas based Arduino, like the R4 Wifi and Minimal + * SYSTYPE_GIGA: Arduino GIGA board + * SYSTYPE_POSIX: a POSIX system, like Linux, MacOS + * SYSTYPE_MSDOS: a DOS system, like FreeDOS + * SYSTYPE_MINGW: a Windows system with MinGW + * SYSTYPE_RASPPI: a Raspberry PI system + * + * Number ranges from 0-31 are reserved for Arduino systems + * Number ranges from 32-63 are reserved for POSIX systems + */ + +#define SYSTYPE_UNKNOWN 0 +#define SYSTYPE_AVR 1 +#define SYSTYPE_ESP8266 2 +#define SYSTYPE_ESP32 3 +#define SYSTYPE_RP2040 4 +#define SYSTYPE_SAM 5 +#define SYSTYPE_XMC 6 +#define SYSTYPE_SMT32 7 +#define SYSTYPE_NRENESA 8 +#define SYSTYPE_GIGA 9 +#define SYSTYPE_POSIX 32 +#define SYSTYPE_MSDOS 33 +#define SYSTYPE_MINGW 34 +#define SYSTYPE_RASPPI 35 + +/* + * Input and output channels. + * + * The channels are used to identify the I/O devices in the + * runtime environment. + * + * NULL is the memory channel outputting to a buffer. + * SERIAL is the standard serial channel and the default device. + * DSP is the display channel. + * GRAPH is the additional graphics display channel. + * PRT is the second serial channel used for printing and communication + * with external devices. + * WIRE is the I2C channel. + * RADIO is the RF24 channel. + * MQTT is the MQTT channel. + * FILE is the file system channel. + */ + +#define ONULL 0 +#define OSERIAL 1 +#define ODSP 2 +#define OGRAPH 3 +#define OPRT 4 +#define OWIRE 7 +#define ORADIO 8 +#define OMQTT 9 +#define OFILE 16 + +#define INULL 0 +#define ISERIAL 1 +#define IKEYBOARD 2 +#define IGRAPH 3 +#define ISERIAL1 4 +#define IWIRE 7 +#define IRADIO 8 +#define IMQTT 9 +#define IFILE 16 + +/* + * Global variables of the runtime env, visible to BASIC. + * These are the variables that BASIC provides to the runtime + * environment. They are used all over the BASIC code. Some + * could be encapsulated as function calls calls. + * + * Variables to control the io device channels. + * + * id: the current input device + * od: the current output device + * idd: the default input device in interactive mode + * odd: the default output device in interactive mode + * ioer: the io error + */ +extern int8_t id; +extern int8_t od; +extern int8_t idd; +extern int8_t odd; +extern int8_t ioer; + +/* + * Io control flags. + * + * These flags are used to control the I/O devices. + * kbdrepeat: the keyboard repeat flag for the keypad of a shield + * only used by SET and defined in the keypad code + * blockmode: the blockmode flag, switch a channel to blockmode + * sendcr: the sendcr flag, send a carriage return after a newline if true + */ + +extern uint8_t kbdrepeat; +extern uint8_t blockmode; +extern uint8_t sendcr; + +/* breaks, signaly back that the breakcondition has been detected */ +extern char breakcondition; + +/* counts the outputed characters on streams 0-4, used to emulate a real tab */ +extern uint8_t charcount[5]; /* devices 0-4 support tabing */ + +/* the memory buffer comes from BASIC in this version, it is the input buffer for lines */ +extern char ibuffer[BUFSIZE]; + +/* only needed in POSIX worlds */ +extern uint8_t breaksignal; +extern uint8_t vt52active; + +/* the string buffer the interpreter needs, here to be known by BASIC */ +extern char spistrbuf1[SPIRAMSBSIZE], spistrbuf2[SPIRAMSBSIZE]; + +/* + * the mqtt variable the interpreter needs. + * The following parameters are configured here: + * + * MQTTLENGTH: the length of the mqtt topic, restricted to 32 by default. + * MQTTBLENGTH: the length of the mqtt buffer, 128 by default. + * MQTTNAMELENGTH: the length of the autogenerated mqtt name, 12 by default. + * The mqtt name is used to identify the device in the mqtt network. + * + * mqtt_otopic: the outgoing topic + * mqtt_itopic: the incoming topic + * mqttname: the name of the device in the mqtt network +*/ + +#define MQTTLENGTH 32 +#define MQTTBLENGTH 128 +#define MQTTNAMELENGTH 12 + +extern char mqtt_otopic[MQTTLENGTH]; +extern char mqtt_itopic[MQTTLENGTH]; +extern char mqttname[]; + +/* a byte in the runtime memory containing the system type */ +extern uint8_t bsystype; + +/* + * Console logger functions for the runtime code. Runtime does not know + * anything about output deviced. BASIC is to provide this. This + * is used for debugging and logging. + */ + + extern void consolelog(char*); + extern void consolelognum(int); + +/* + * Statup function. They start the runtime environment. + * + * The functions timeinit(), wiringbegin(), signalon() + * are always empty on Arduino, they are only used in + * the POSIX branch of the code. + * + * timeinit() initializes the time functions. + * wiringbegin() initializes the wiring functions, this is needed on + * Raspberry PI. + * signalon() initializes the signal handling, this is needed on + * Unix like systems and Windows. + * + * BASIC calls these functions once to start the timing, wiring, and + * signal handling. + */ + + void timeinit(); + void wiringbegin(); + void signalon(); + +/* + * Start the SPI bus. Called once on start. Needed on Arduino. + * Empty in the POSIX branch of the code. + * + * Some libraries also try to start the SPI which may lead to on override of + * the PIN settings if the library code is not clean - currenty no conflict known. + * for the libraries used here. Old SD card libraries have problems as they always + * start the SPI bus with default settings and cannot get the settings from the + * SPI.begin() call. In these cases patching of the SD library is needed. + */ + + void spibegin(); + +/* + * Memory allocation functions. + * + * BASIC calls freememorysize() to detemine how much memory can be allocated + * savely on the heap. + * BASIC calls restartsystem() for a complete reboot. + * freeRam() is the actual free heap. Used by freememorysize() and in USR() + * + * Arduino data from https://docs.arduino.cc/learn/programming/memory-guide + */ + + long freememorysize(); /* determine how much actually to allocate */ + void restartsystem(); /* cold start of the MCU */ + long freeRam(); /* try to find the free heap after alocating all globals */ + + /* Test function for real time clock interrupt, currently not useable. + Kept for the future. */ + void rtcsqw(); + void aftersleepinterrupt(void); + void activatesleep(long); + +/* + * The main IO interface. This is how BASIC uses I/O functions. + * + * ioinit(): called at setup to initialize what ever io is needed + * iostat(): check which io devices are available + * iodefaults(): called at setup and while changing to interactive mode + * to set the default io devices + * cheof(): checks for end of file condition on the current input stream + * inch(): gets one character from the current input stream and waits for it + * checkch(): checks for one character on the current input stream, non blocking + * availch(): checks for available characters on the current input stream + * inb(): reads a block of characters from the current input stream + * ins(): reads an entire line from the current input stream, usually by consins() + * outch(): prints one ascii character to the current output stream + * outs(): prints a string of characters to the current output stream + */ + + void ioinit(); + int iostat(int); + void iodefaults(); + int cheof(int); + char inch(); + char checkch(); + uint16_t availch(); + uint16_t inb(char*, int16_t); + uint16_t ins(char*, uint16_t); + void outch(char); + void outs(char*, uint16_t); + +/* + * Timeing functions and background tasks. + * + * byield() must be called after every statement and in all + * waiting loops for I/O. BASIC gives back the unneeded + * CPU cycles by calling byield(). + * + * byield() allows three levels of background tasks. + * + * BASICBGTASK controls if time for background tasks is + * needed, usually set by hardware features + * + * YIELDINTERVAL by default is 32, generating a 32 ms call + * to the network loop function. This is the frequency + * yieldfunction() is called. + * + * LONGYIELDINTERVAL by default is 1000, generating a one second + * call to maintenance functions. This is the frequency + * longyieldfunction() is called. + * + * fastticker() is called in every byield for fast I/O control. + * It is currently only used for the tone emulation. + * + * byield() calls back bloop() in the BASIC interpreter for user + * defined background tasks in an Arduino style loop() function. + * + * bdelay() is a delay function using byield() to allow for + * background tasks to run even when the main code does a delay. + * + * The yield mechanism is needed for ESP8266 yields, network client + * loops and other timing related functions. + * + * yieldschedule() is a function that calls the buildin scheduler + * of some platforms. Currently it is only used in ESP8266. The + * core on this boards does not tolerate that the loop() function + * does not return and crashes the system. This can be prevented + * by calling yieldschedule() often enough. + */ + +#define LONGYIELDINTERVAL 1000 +#define YIELDINTERVAL 32 + +void byield(); +void bdelay(uint32_t); +void fastticker(); +void yieldfunction(); +void longyieldfunction(); +void yieldschedule(); + +/* + * This function measures the fast ticker frequency in microseconds. + * This can be accessed with USR(0, 35) in BASIC. + * Activate this only for test purposes as it slows down the interpreter. + * The value is the shortest timeframe the interpreter can handle. Activated + * if the code is compiled with FASTTICKERPROFILE in hardware.h. + */ + +void fasttickerprofile(); +void clearfasttickerprofile(); +int avgfastticker(); + +/* + * EEPROM handling, these function enable the @E array and + * loading and saving to EEPROM with the "!" mechanism + * + * The EEPROM code can address EEPROMS up to 64 kB. It returns + * signed byte values which corresponds to the definition of + * mem_t in BASIC. This is needed because running from EEPROM + * requires negative token values to be recongized. + * + * ebegin() starts the EEPROM code. Needed for the emulations. + * eflush() writes the EEPROM buffer to the EEPROM. Also this is + * mainly needed in the emulations. + * elength() returns the length of the EEPROM. + * eupdate() updates one EEPROM cell with a value. Does not flush. + * eread() reads one EEPROM cell. + */ + +void ebegin(); +void eflush(); +uint16_t elength(); +void eupdate(uint16_t, int8_t); +int8_t eread(uint16_t); + +/* + * The wrappers of the arduino io functions. + * + * The normalize the differences of some of the Arduino cores + * and raspberyy PI wiring implementations. + * + * Pin numbers are the raw numerical pin values in BASIC. + * The functions are called with this raw pin number and the value. + * + * The functions are: + * aread(pin): read an analog value from a pin + * dread(pin): read a digital value from a pin + * awrite(pin, value): write an analog value to a pin + * dwrite(pin, value): write a digital value to a pin + * pinm(pin, mode): set the mode of a pin, mode is also the raw value from the core + * pulsein(pin, value, timeout): read a pulse from a pin, timeout in microseconds + * void pulseout(unit, pin, duration, val, repetition, interval): generate a pulse on a pin + * unit is the timeunit in microsecind and the duration is the pulse length in this unit. + * This is needed for system were the number_t is only 16 bit. This way longer pulses can + * be generated. + * void playtone(pin, frequency, duration, volume): generate a tone on a pin. + * frequency is the frequency in Hz, duration the duration in ms, volume the volume in percent. + * The tone is generated in the background, the function returns immediately. + * tonetoggle(): toggle the tone generation, needed for the tone emulation, this is called + * by byield() to generate the tone. + */ + +uint16_t aread(uint8_t); +uint8_t dread(uint8_t); +void awrite(uint8_t, uint16_t); +void dwrite(uint8_t, uint8_t); +void pinm(uint8_t, uint8_t); +uint32_t pulsein(uint8_t, uint8_t, uint32_t); +void pulseout(uint16_t, uint8_t, uint16_t, uint16_t, uint16_t, uint16_t); +void playtone(uint8_t, uint16_t, uint16_t, uint8_t); +void tonetoggle(); /* internal function of the tone emulation, called by byield */ + +/* + * The break pin code. This is a pin that can be used to break the execution of the + * BASIC code. This is used as an alternative to the BREAK key in the terminal. + * + * brakepinbegin() initializes the break pin, usually a button connected to a pin. + * getbreakpin() returns the state of the break pin. This is called in statement() to + * check if the break condition is met and then change the interpreter state at the end + * of the statement. + */ + +void breakpinbegin(); +uint8_t getbreakpin(); + +/* + * The hardware port register access functions. + * They can be used to directly access hardware ports. Typically they + * call port macros like PORTB on the Arduino AVR platform. They are very + * fast and can be used to implement fast I/O functions but they are hardware + * dependent and not portable. Currently only AVR UNO and MEGA are implemented. + * + * The calling mechanism in BASIC is the special array @P()for read and write. + */ + +void portwrite(uint8_t, int); +int portread(uint8_t); +void ddrwrite(uint8_t, int); +int ddrread(uint8_t); +int pinread(uint8_t); + +/* + * Prototypes for the interrupt interface. This uses the standard Arduino + * interrupt functions. + */ + +uint8_t pintointerrupt(uint8_t); +void attachinterrupt(uint8_t, void (*f)(), uint8_t); +void detachinterrupt(uint8_t); + +/* some have PinStatus and some don't */ +#if !(defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_MBED_NANO) || \ + defined(ARDUINO_ARCH_RENESAS) || defined(ARDUINO_ARCH_MBED_GIGA) || \ + defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_MEGAAVR)) || defined(ARDUINO_SEEED_XIAO_M0) +typedef int PinStatus; +#endif + +/* + * IO channel 0 - the buffer I/O device. + * + * This is a stream to write to the input buffer from BASIC. + */ + + void bufferbegin(); + uint8_t bufferstat(uint8_t); + void bufferwrite(char); + char bufferread(); + char buffercheckch(); + uint16_t bufferavailable(); + uint16_t bufferins(char*, uint16_t); + void bufferouts(char*, uint16_t); + + +/* + * IO channel 1 - the serial I/O device. + * + * Primary serial code uses the Serial object or Picoserial on + * Arduino. On POSIX systems it uses the standard input/output. + * + * Functions are: + * + * serialbegin(): start the serial port + * serialread(): read a character from the serial port, this is blocking + * for the standard Serial object and non blocking for Picoserial. + * Picoserial is not character oriented. It read one entire line. + * serialstat(s): check the status of the serial port + * serialwrite(c): write a character to the serial port + * serialcheckch(): check if a character is available without blocking + * serialavailable(): check if characters are available + * serialflush(): flush the serial port + * serialins(s, l): read a line from the serial port + */ + + void serialbegin(); + char serialread(); + uint8_t serialstat(uint8_t); /* state information on the serial port */ + void serialwrite(char); /* write to a serial stream */ + char serialcheckch(); /* check on a character, needed for breaking */ + uint16_t serialavailable(); /* avail method, needed for AVAIL() */ + void serialflush(); /* flush serial */ + uint16_t serialins(char*, uint16_t); /* read a line from serial */ + + /* + * reading from the console with inch or the picoserial callback. + * consins() is used for all devices that have a character oriented + * input and creates entire lines from it. + */ + + uint16_t consins(char *, uint16_t); + +/* + * On Arduino Serial is a big object that needs a lot of memory + * on the smaller boards. Picoserial is smaller. It is mainly + * for the small 8bit AVR boards. It uses the UART macros directly. + * + * The picoseria has an own interrupt function. This is used to fill + * the input buffer directly on read. Write is standard like in + * the serial code. Currently picoserial is only implemented for + * AVR UNO, NANO and MEGA. + * + * As echoing is done in the interrupt routine, the code cannot be + * used to receive keystrokes from serial and then display the echo + * directly to a display. To do this the write command in picogetchar + * would have to be replaced with a outch() that then redirects to the + * display driver. This would be very tricky from the timing point of + * view if the display driver code is slow. + * + * The code for the UART control is mostly taken from PicoSerial + * https://github.com/gitcnd/PicoSerial, originally written by Chris Drake + * and published under GPL3.0 just like this code. + * + * Functions for the picoserial code are: + * + * picobegin(baud): start the picoserial port with the baud rate baud + * picowrite(c): write a character to the picoserial port + * picoins(s, l): read a line from the picoserial port + * + */ + + void picobegin(uint32_t); + void picowrite(char); + uint16_t picoins(char *, uint16_t); + + /* + * picogetchar: this is the interrupt service routine. It + * recieves a character and feeds it into a buffer and echos it + * back. The logic here is that the ins() code sets the buffer + * to the input buffer. Only then the routine starts writing to the + * buffer. Once a newline is received, the length information is set + * and picoa is also set to 1 indicating an available string, this stops + * recevieing bytes until the input is processed by the calling code. + */ + void picogetchar(char); + +/* + * IO channel 2 - the display I/O device. + * + * DISPLAY driver code section. The display driver is a generic text and graphics + * output device. Characters are buffered in a display buffer if DISPLAYCANSCROLL + * is defined. These displays can scroll. Scrolling is handled by the display driver. + * It is soft scroll, meaning that the display buffer is scrolled and the display is + * updated. This is slow for large displays. Hardware scrolling is not yet implemented. + * + * The display driver is used by the terminal code to output text and + * graphics. It is needed because there is no standard terminal emulation on Arduino + * systems. It tries to be so generic that everything from small 16*2 LCDs to large + * TFT displays can be used. It contains a VT52 state engine to process control + * sequences. + * + * The hardware dependent part of the display driver has to implement the following + * functions: + * + * Text display functions: + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(): start the display - can be empty + * dspprintchar(c, col, row): print a character at a given position + * logic here that col is the x coordinate and row the y coordinate + * for text and graphics the display coordinate system has its origin + * in the upper left corner + * dspclear(): clear the display + * dspupdate(): update the display, this function is needed for displays that + * have a buffer and can update the display after a series of prints. + * Examples are epaper displays and LCD displays like the Nokia. Writing + * directly to them is slow. + * dspsetcursor(c): switch the cursor on or off, typically used for text + * displays with blinking cursors. + * dspsetfgcolor(c): set the foreground color of the display. + * dspsetbgcolor(c): set the background color of the display. + * c is a VGA color. 4bit VGA colors are used for text displays. + * Graphics is 24 bit color rgb and 8 bit VGA color. + * dspsetreverse(c): set the reverse mode of the display, currently unused. + * dspident(): return the display type, currently unused. + * + * For displays with color, the macro DISPLAYHASCOLOR has to be defined. + * The text display buffer then contains one byte for the character and + * one byte for color and font. + * + * All displays which have these functions can be used with the + * generic display driver below. For minimal functionality only + * dspprintchar() and dspclear() are needed. The screen dimensions + * have to be set in dsp_rows and dsp_columns. + * + * Graphics displays need to implement the functions + * + * rgbcolor(r, g, b): set the color for graphics. The color + * is 24 bit rgb. This function needs to convert the byte + * values to the native color of the display. + * vgacolor(c): set the color for text. The color is a 256 VGA + * color for most displays. This function needs to convert this + * one byte value to the native color of the display. + * These two functions are called by the BASIC COLOR command. + * + * plot(x, y): plot a pixel at x, y + * line(x1, y1, x2, y2): draw a line from x1, y1 to x2, y2 + * rect(x1, y1, x2, y2): draw a rectangle from x1, y1 to x2, y2 + * frect(x1, y1, x2, y2): draw a filled rectangle from x1, y1 to x2, y2 + * circle(x, y, r): draw a circle with center x, y and radius r + * fcircle(x, y, r): draw a filled circle with center x, y and radius r + * + * + * Color is currently either 24 bit or 8 bit 16 VGA color. BW and displays + * only have 0 and 1 as colors. Text is buffered in 4 bit VGA color (see below). + */ + + /* Generate a 4 bit vga color from a given rgb color, to be checked */ +uint8_t rgbtovga(uint8_t, uint8_t, uint8_t); + + +/* Text functions */ +void dspbegin(); +void dspprintchar(char, uint8_t, uint8_t); +void dspclear(); +void dspupdate(); +void dspsetcursor(uint8_t); +void dspsavepen(); +void dsprestorepen(); +void dspsetfgcolor(uint8_t); +void dspsetbgcolor(uint8_t); +void dspsetreverse(uint8_t); +uint8_t dspident(); + +/* Graphics functions */ +void rgbcolor(uint8_t, uint8_t, uint8_t); +void vgacolor(uint8_t); +void plot(int, int); +void line(int, int, int, int); +void rect(int, int, int, int); +void frect(int, int, int, int); +void circle(int, int, int); +void fcircle(int, int, int); + +/* to whom the bell tolls - implement this to you own liking, reacts to ASCII 7 */ +void dspbell(); + +/* + * The public functions of the display driver are the following: + * + * dspouts(s, l): print a string of length l to the display. This + * function is only used for output on certain graphics displays + * These displays expect an entire string to be printed at once. + * Currently this is only implemented for epaper displays. + * dspwrite(c): print a character to the display. This function is + * the main output method for text displays. It prints a character + * at the current cursor position and updates the cursor position. + * For vt52 capable displays, the character goes through the vt52 + * state engine and it processed there. + * dspstat(s): check the status of the display. It returns 1 if the + * display is present and 0 if it is not. + * dspactive(): check if the display is the current output device. + * This function is used to control scrolling in the LIST command. + * dspwaitonscroll(): this function waits for character input if the + * display wants to scroll. This is used in the LIST command to + * wait for a keypress before scrolling the display. It returns the + * character that was pressed. This can also be used to end the output + * of the LIST command. + * dspsetupdatemode(m): set the update mode of the display. Valid update + * modes are 0, 1, 2. 0 is character mode, 1 is line mode, 2 is page mode. + * In character mode, the display is updated after every character. In line + * mode, the display is updated after every line. In page mode, the display + * is updated after an ETX character. This function is only used for displays + * that implement the dspupdate() function. + * dspgetupdatemode(): get the current update mode of the display. + * dspgraphupdate(): update the display after a series of graphics commands. While + * dspsetupdatemode() and dspgetupdatemode() control the update from the text buffer, + * dspgraphupdate() controls the update from the graphics buffer. See for example + * the Nokia display as an example. This function must be called after graphics + * operations to update the display. Typically this is done in the graphics functions + * like line(), rect(), circle(), etc. + * dspsetcursorx(x): set the x coordinate of the cursor + * dspsetcursory(y): set the y coordinate of the cursor + * dspgetcursorx(): get the x coordinate of the cursor + * dspgetcursory(): get the y coordinate of the cursor + */ + +void dspouts(char*, uint16_t); +void dspwrite(char); +uint8_t dspstat(uint8_t); +uint8_t dspactive(); +char dspwaitonscroll(); +void dspsetupdatemode(uint8_t); +uint8_t dspgetupdatemode(); +void dspgraphupdate(); +void dspsetcursorx(uint8_t); +void dspsetcursory(uint8_t); +uint8_t dspgetcursorx(); +uint8_t dspgetcursory(); + +/* + * These are the buffer control functions for the display driver. + * + * Color handling: + * + * Non scrolling displays simply use the pen color of the display + * stored in dspfgcolor() to paint the information on the screen. + * + * For scrolling displays we store the color information of every + * character in the display buffer to enable scrolling with color. + * To limit the storage requirements, this code translates the color + * to a 4 bit VGA color. This means that if BASIC uses 24 bit colors, + * the color may change at scroll + * + * For color displays the buffer is a 16 bit object. The lower 8 bits + * plus the sign are the character, higher 7 the color and font. + * For monochrome just the character is stored in an 8 bit object. + * + * The type dspbuffer_t is defined according to the display type. + * + * The following functions are used to control the display buffer: + * + * dspget(): get a character from the display buffer in form of a linear + * address. This is only used for the special array @D() in BASIC. + * It allows direct access to the display buffer. + * dspgetrc(r, c): get a character from the display buffer at row r and column c. + * This is used for the print function of the vt52 terminal. An entire display + * can be sent to the printer device OPRT + * dspgetc(c): get a character from the current line at column c. Also this is + * used for the print function of the VT52 terminal. This only sents the + * current line to the printer device OPRT. + * For both functions the actual print code is in the VT52 object. + * These three functions are somewhat redundant. + * + * dspsetxy(c, x, y): set a character at x, y in the display buffer and on the + * display. This function is needed for various control sequences of the VT52 + * terminal. + * dspset(c, v): set a character at a linear address in the display buffer. Also u + * used for the @D() array in BASIC. + * + * dspsetscrollmode(m, l): set the scroll mode. m is the mode and l is the number + * of lines to be scrolled. Mode 0 means that dspwaitonscroll() does not + * wait for keyboard input. Mode 1 is wait for input. + * dspbufferclear(): clears the input buffer. + * dspscroll(l, t): do the actual scrolling. l is the number of lines to be scrolled. + * t is the topmost line included in the scroll. O by default. + * dspreversescroll(l): reverse scroll from line l downward. + */ + +#ifdef DISPLAYHASCOLOR +typedef short dspbuffer_t; +#else +typedef char dspbuffer_t; +#endif + +dspbuffer_t dspget(uint16_t); +dspbuffer_t dspgetrc(uint8_t, uint8_t); +dspbuffer_t dspgetc(uint8_t); + +void dspsetxy(dspbuffer_t, uint8_t, uint8_t); +void dspset(uint16_t, dspbuffer_t); +void dspsetscrollmode(uint8_t, uint8_t); + +void dspbufferclear(); +void dspscroll(uint8_t, uint8_t); +void dspreversescroll(uint8_t); + +/* + * A VT52 state engine is implemented and works for buffered and + * unbuffered displays. Only buffered displays have the full VT52 + * feature set including most of the GEMDOS extensions described here: + * https://en.wikipedia.org/wiki/VT52 + * + * The VT52 state engine processes sequences of the form char. + * + * In addition to this, it also gives back certain return values. + * The can be read by vt52read() and vt52avail(). + * vt52push() is used to push characters into the VT52 buffer. + * vt52number() is used to convert a character into the VT52 number format. + * vt52graphcommand() is a VT52 extension to display graphics on the screen. + */ + +char vt52read(); +uint8_t vt52avail(); +void vt52push(char); +uint8_t vt52number(char); +void vt52graphcommand(uint8_t); + +/* + * this is a special part of the vt52 code with this, the terminal + * can control the digital and analog pins. + * + * It is meant for situations where the terminal is controlled by a (powerful) + * device with no or very few I/O pins. It can use the pins of the Arduino through + * the terminal. + * + * This works as long as everything stays within the terminals timescale. + * On a 9600 baud interface, the character processing time is 1ms, everything + * slower than approximately 10ms can be done through the serial line. + */ + +void vt52wiringcommand(uint8_t); + +/* the vt52 state engine */ +void dspvt52(char*); + +/* + * Code for the VGA system of Fabgl. This is a full VT52 terminal. The + * display driver is not used for this. + */ + +void vgabegin(); +int vgastat(uint8_t); +void vgascale(int*, int*); +void vgawrite(char); +void vgaend(); + +/* + * IO channel 2 (input) - the keyboard I/O device. + * + * Keyboard code for either the Fablib Terminal class, + * PS2Keyboard or other keyboards. + * + * PS2Keyboard: please note that you need the patched + * version here as mentioned above. + * + * Keyboards implement kbdbegin() which is called at startup + * and kbdstat() which is called to check if the keyboard is + * available. + * + * Keyboards need to provide the following functions: + * + * kbdavailable(): check if a character is available + * kbdread(): read a character from the keyboard + * kbdcheckch(): check if a character is available without blocking + * kbdins(): read a line from the keyboard + * + * kbdcheckch() is for interrupting running BASIC code with a + * BREAKCHAR character from the keyboard. If this functions is + * not implemented, the BREAKCHAR character is ignored. + * + * kbdins() is usually using consins() to read a line from the + * keyboard repeatedly calling kbdread() until a newline is + * received. A keyboard can also bring its on kbdins() function. + */ + +void kbdbegin(); +uint8_t kbdstat(uint8_t); +uint8_t kbdavailable(); +char kbdread(); +char kbdcheckch(); +uint16_t kbdins(char*, uint16_t); + +/* IO channel 3 - reserved for future use */ + + /* + * IO channel 4 - the second serial I/O device. + * + * This is the (mostly) the Serial1 object + * on Arduino. On POSIX systems this opens a serial port like /dev/ttyUSB1. + * This &4 in BASIC. + * + * Functions are: + * + * prtbegin(): start the serial port + * prtopen(name, baud): open the serial port with the baud rate baud. Only + * neded in POSIX to open the port. + * prtclose(): close the serial port + * prtstat(s): check the status of the serial port + * prtwrite(c): write a character to the serial port + * prtread(): read a character from the serial port + * prtcheckch(): check if a character is available without blocking + * prtavailable(): check if characters are available + * prtset(baud): set the baud rate of the serial port + * prtins(s, l): read a line from the serial port + */ + + void prtbegin(); + char prtopen(char*, uint16_t); + void prtclose(); + uint8_t prtstat(uint8_t); + void prtwrite(char); + char prtread(); + char prtcheckch(); + uint16_t prtavailable(); + void prtset(uint32_t); + uint16_t prtins(char*, uint16_t); + +/* + * IO channel 7 - I2C through the Wire library. + * + * The wire code, direct access to wire communication. + * + * In master mode wire_slaveid is the I2C address bound + * to channel &7 and wire_myid is 0. + * + * In slave mode wire_myid is the devices slave address + * and wire_slaveid is 0. + * + * The maximum number of bytes the Wire library can handle + * is 32. This is given by the Wire library. + * + * Wire is handled through the following functions: + * + * wirebegin(): start the wire system. + * wireslavebegin(id): start the wire system as a slave with the id. + * wirestat(s): check if the wire system is available. + * wireavailable(): check if characters are available in slave mode. + * wireonreceive(h): set the event handler for received data on a slave. + * wireonrequest(): set the event handler for request on a slave. + * wireopen(id, slaveid): open the wire system as a master with id to + * the slave id. + * wireread(): read a character from the wire system. + * wirewrite(c): write a character to the wire system. + * wireins(l, s): read a line l from the wire system max length is s. + * wireouts(l, s): write a line l to the wire system max length is s. + * They are available in BASIC as the WIRE + * command. + */ + + void wirebegin(); + void wireslavebegin(uint8_t); + uint8_t wirestat(uint8_t); + uint16_t wireavailable(); + void wireonreceive(int); + void wireonrequest(); + void wireopen(uint8_t, uint8_t); + char wireread(); + void wirewrite(char c); + uint16_t wireins(char*, uint8_t); + void wireouts(char*, uint8_t); + +/* new byte wire interface for direct access */ +void wirestart(uint8_t, uint8_t); +void wirewritebyte(uint8_t); +uint8_t wirestop(); +int16_t wirereadbyte(); + +/* + * IO channel 8 - the RF24 radio I/O device. + * + * Read from the radio interface, radio is always block + * oriented. This function is called from ins for an entire + * line. + * + * In blockmode the entire message is returned in the + * receiving string while in line mode the length of the + * string is adapted. Blockmode can be used to transfer + * binary data. + * + * The radio code is rather obsolet and not used a lot. + * + * On RF24 we always read from pipe 1 and use pipe 0 for writing, + * the filename is the pipe address, by default the radio + * goes to reading mode after open and is only stopped for + * write. + */ + + uint8_t radiostat(uint8_t); + uint64_t pipeaddr(const char*); + uint16_t radioins(char*, uint8_t); + void radioouts(char *, uint8_t); + uint16_t radioavailable(); + char radioread(); + void iradioopen(const char *); + void oradioopen(const char *); + void radioset(uint8_t); + +/* + * IO channel 9 - the network I/O device. + * + * Only MQTT is implemented at the moment. Other protocols + * will be channel 10-15. + * + * Underlying networks can be the Wifi classes of the ESP, MKR, and + * STM32 cores. The network code is based on the PubSubClient library. + * Ethernet is supported with the standard Ethernet library on Arduino. + * + * On POSIX systems networking is currently not supported. + * + * No encryptionis implemented in MQTT. Only unencrypted servers can be used. + * + * Buffers are defined above in the mqtt section. + * + * MQTTLENGTH: the length of the mqtt topic, restricted to 32 by default. + * MQTTBLENGTH: the length of the mqtt buffer, 128 by default. + * MQTTNAMELENGTH: the length of the autogenerated mqtt name, 12 by default. + * + * wifisettings.h is the generic network definition file all network settings + * are compiled into the code. BASIC cannot change them at runtime. + * + * Low level network functions are: + * + * netbegin(): start the network + * netstop(): stop the network + * netreconnect(): reconnect the network + * netconnected(): check if the network is connected + * + * BASIC uses these function to control the network and reconnect if + * the connection is lost. + */ + + void netbegin(); + void netstop(); + void netreconnect(); + uint8_t netconnected(); + + /* + * The mqtt prototypes used by BASIC are: + * + * mqttbegin(): start the mqtt client + * mqttsetname(): set the name of the mqtt client. The name is autogenerated. + * mqttstat(s): check the status of the mqtt client + * mqttreconnect(): reconnect the mqtt client + * mqttstate(): get the state of the mqtt client (redunant to mqttstat()) + * mqttsubscribe(t): subscribe to a topic + * mqttunsubscribe(): unsubscribe from a topic + * mqttsettopic(t): set the topic of the mqtt client + * mqttouts(s, l): send a string of length l to the mqtt server + * mqttwrite(c): send a character to the mqtt server. + * These two functions work buffered. The write to the MQTT output buffer. Only + * when the buffer is full or a newline is received, the buffer is sent to the + * server. + * mqttread(): read a character from the mqtt input buffer. + * mqttins(s, l): read a line from the mqtt input buffer. + * mqttavailable(): check if characters are available in the mqtt input buffer. + * mqttcheckch(): get the next character from the mqtt input buffer without advancing. + */ + + void mqttbegin(); + void mqttsetname(); + uint8_t mqttstat(uint8_t); + uint8_t mqttreconnect(); + uint8_t mqttstate(); + void mqttsubscribe(const char*); + void mqttunsubscribe(); + void mqttsettopic(const char*); + void mqttouts(const char*, uint16_t); + void mqttwrite(const char); + char mqttread(); + uint16_t mqttins(char*, uint16_t); + uint16_t mqttavailable(); + char mqttcheckch(); + + /* + * The callback function of the pubsub client. This is called when a + * message is received from the mqtt server. + * + * The Arduino type byte is used here because it is used this way in Pubsub. + */ + void mqttcallback(char*, byte*, unsigned int); + +/* + * IO channel 16 - the file system I/O device. + * + * The file system driver - all methods needed to support BASIC fs access. + * + * Different filesystems need different prefixes and fs objects, these + * filesystems use the stream API in the Arduino world. + * + * The functions to access the filesystem are: + * + * fsbegin(): start the filesystem + * fsstat(s): check the status of the filesystem + * mkfilename(s): make a filename from a string + * rmrootfsprefix(s): remove the prefix from a filename + * + * Different filesystems have different prefixes. In BASIC we + * only show a flat file system with no path names and prefixes. + * + * Supported filesystems are: + * + * SPIFF - the internal flash file system of the ESP32 and ESP8266 + * SD - the SD card file system (no formatting) + * EFS - the file system EFS for I2C EEPROMs + * LittleFS - the LittleFS file system on RP2040 + * USB devices on Arduino GIGA boards + * Posix and Windows file systems on POSIX systems + */ + + void fsbegin(); + uint8_t fsstat(uint8_t); + char* mkfilename(const char*); + const char* rmrootfsprefix(const char*); + + /* + * File I/O function on an Arduino: + * + * filewrite(c): write a character to a file + * fileread(): read a character from a file + * fileavailable(): check if a character is available in the file + * ifileopen(s): open a file for input + * ifileclose(): close a file for input + * ofileopen(s, m): open a file for output with mode m + * ofileclose(): close a file for output + * + * The wrapper and BASIC currently only support one file for read + * and one file for write. + */ + + void filewrite(char); + char fileread(); + int fileavailable(); /* is int because some of the fs do this */ + uint8_t ifileopen(const char*); + void ifileclose(); + uint8_t ofileopen(const char*, const char*); + void ofileclose(); + + /* + * Directory handling for the catalog function these methods are + * needed for a walkthtrough of one directory. + * + * The logic is: + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + * + * rootopen(): opens the root directory + * rootnextfile(): gets the next file in the directory + * rootisfile(): checks if the file is a file or something else + * rootfilename(): gets the name of the file + * rootfilesize(): gets the size of the file + * rootfileclose(): closes the root file + */ + + void rootopen(); + uint8_t rootnextfile(); + uint8_t rootisfile(); + const char* rootfilename(); + uint32_t rootfilesize(); + void rootfileclose(); + void rootclose(); + + /* delete a file, needed in the DELETE command of BASIC */ + void removefile(const char*); + + /* + * Formatting for fdisk of the internal filesystems. This + * is not implemented for all filesystems. + */ + void formatdisk(uint8_t); + +/* + * The Real Time clock. The interface here offers the values as number_t + * combining all values. + * + * On Arduino, he code does not use an RTC library any more all the + * RTC support is builtin now for standard I2C clocks. + * + * A clock must activate the macro #define HASCLOCK to make the clock + * available in BASIC. + * + * Four software models are supported in runtime.cpp for Arduino: + * - Built-in clocks of STM32, MKR, and ESP32 are supported by default. + * - I2C clocks can be activated: DS1307, DS3231, and DS3232 + * - A Real Time Clock emulation using millis() + * + * On POSIX the standard time functions are used and mapped to this API. + * + * rtcget(r) accesses the internal registers of the clock. + * r==0 is the seconds, r==1 the minutes, r==2 the hours, r==3 the + * day of week, r==4 the day, r==5 the month, r==6 the year. + * The day of the week feature is not supported by all clocks. + * rtcset(r, v) sets the internal registers of the clock. + * + * On I2C clocks with NVRAM the registers 7-255 are accessed as + * memory cells through these functions. + * + * rtcbegin() is called at startup to initialize the clock, normally + * a dummy function. + * + * rtctimetoutime() converts the clock time to a unix time number. + * rtcutimetotime() converts the unix time number to a clock time. + * Both are private functions of the clock emulation. + * + * Code in these two functions is taken from the German Wikipedia + * article on Unix time. https://de.wikipedia.org/wiki/Unixzeit + */ + +void rtcbegin(); +uint16_t rtcget(uint8_t); +void rtcset(uint8_t, uint16_t); +void rtctimetoutime(); +void rtcutimetotime(); + +/* + * Arduino Sensor library code + * The sensorread() is a generic function called by + * SENSOR basic function and command. The first argument + * is the sensor and the second argument the value. + * sensorread(n, 0) checks if the sensorstatus. + */ +void sensorbegin(); +float sensorread(uint8_t, uint8_t); + +/* + * Experimental code to drive SPI SRAM + * + * Currently only the 23LCV512 is implemented, assuming a 64kB SRAM. + * Part of code is taken in part from the SRAMsimple library. + * + * Two buffers are implemented: + * + * - a ro buffer used by memread, this buffer is mainly reading the token + * stream at runtime. + * - a rw buffer used by memread2 and memwrite2, this buffer is mainly accessing + * the heap at runtime. In interactive mode this is also the interface to read + * and write program code to memory. + * + */ + +/* the RAM begin method sets the RAM to sequential mode */ +uint16_t spirambegin(); +int8_t spiramrawread(uint16_t); +void spiram_bufferread(uint16_t, int8_t*, uint16_t); +void spiram_bufferwrite(uint16_t, int8_t*, uint16_t); +int8_t spiram_robufferread(uint16_t); +void spiram_rwbufferflush(); /* flush the buffer */ +int8_t spiram_rwbufferread(uint16_t); +void spiram_rwbufferwrite(uint16_t, int8_t); /* the buffered file write */ +void spiramrawwrite(uint16_t, int8_t); /* the simple unbuffered byte write, with a cast to signed char */ + +// defined RUNTIMEH +#endif diff --git a/data/Basic2/RaspPi/basic.c b/data/Basic2/RaspPi/basic.c new file mode 100644 index 0000000000000000000000000000000000000000..35b352e178e1d0caae92d1d60e014dd80aaa55fc --- /dev/null +++ b/data/Basic2/RaspPi/basic.c @@ -0,0 +1,9673 @@ +/*---------------------------------------------------------------- + * Please read this before compiling: + * - Review hardware.h for settings specific hardware settings. + * Super important on Arduino and Raspberry PI. + * - language.h controls the language features. + * For Arduino Integer BASIC is default and a limited language + * set. For the larger boards this can be extended a lot. + *----------------------------------------------------------------- + * + * $Id: basic.c,v 1.5 2024/03/02 15:38:20 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter - BASIC for everywhere. + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Currently there are two versions of the runtime environment. + * One contains all platforms compiled in the Arduino IDE + * (ESP8266, ESP32, AVR, MEGAAVR, SAM*, RP2040) + * + * Anothers contains all platforms compiled in gcc with a POSIX OS + * (Mac, Raspberry, Windows/MINGW) plus rudimentary MSDOS with tc2.0. The + * latter will be removed soon. + * + * The interface to BASIC is identical. + */ + +/* the runtime environment */ +#include "hardware.h" +#include "runtime.h" + +/* + * the core basic language headers + */ +#include "language.h" +#include "basic.h" + +/* use long jump for error handling */ +#if USELONGJUMP == 1 +#include "setjmp.h" +#endif + +/* Global BASIC definitions */ + +/* + * All BASIC keywords for the tokens, PROGMEM on Arduino + * Normal memory elsewhere. + */ +const char sge[] PROGMEM = "=>"; +const char sle[] PROGMEM = "<="; +const char sne[] PROGMEM = "<>"; +/* Palo Alto language set */ +const char sprint[] PROGMEM = "PRINT"; +const char slet[] PROGMEM = "LET"; +const char sinput[] PROGMEM = "INPUT"; +const char sgoto[] PROGMEM = "GOTO"; +const char sgosub[] PROGMEM = "GOSUB"; +const char sreturn[] PROGMEM = "RETURN"; +const char sif[] PROGMEM = "IF"; +const char sfor[] PROGMEM = "FOR"; +const char sto[] PROGMEM = "TO"; +const char sstep[] PROGMEM = "STEP"; +const char snext[] PROGMEM = "NEXT"; +const char sstop[] PROGMEM = "STOP"; +const char slist[] PROGMEM = "LIST"; +const char snew[] PROGMEM = "NEW"; +const char srun[] PROGMEM = "RUN"; +const char sabs[] PROGMEM = "ABS"; +const char srnd[] PROGMEM = "RND"; +const char ssize[] PROGMEM = "SIZE"; +const char srem[] PROGMEM = "REM"; +/* Apple 1 language set */ +#ifdef HASAPPLE1 +const char snot[] PROGMEM = "NOT"; +const char sand[] PROGMEM = "AND"; +const char sor[] PROGMEM = "OR"; +const char slen[] PROGMEM = "LEN"; +const char ssgn[] PROGMEM = "SGN"; +const char speek[] PROGMEM = "PEEK"; +const char sdim[] PROGMEM = "DIM"; +const char sclr[] PROGMEM = "CLR"; +const char shimem[] PROGMEM = "HIMEM"; +const char stab[] PROGMEM = "TAB"; +const char sthen[] PROGMEM = "THEN"; +const char sbend[] PROGMEM = "END"; +const char spoke[] PROGMEM = "POKE"; +#endif +/* Stefan's basic additions */ +#ifdef HASSTEFANSEXT +const char scont[] PROGMEM = "CONT"; +const char ssqr[] PROGMEM = "SQR"; +const char spow[] PROGMEM = "POW"; +const char smap[] PROGMEM = "MAP"; +const char sdump[] PROGMEM = "DUMP"; +const char sbreak[] PROGMEM = "BREAK"; +#endif +/* LOAD and SAVE is always there */ +const char ssave[] PROGMEM = "SAVE"; +const char sload[] PROGMEM = "LOAD"; +#ifdef HASSTEFANSEXT +const char sget[] PROGMEM = "GET"; +const char sput[] PROGMEM = "PUT"; +const char sset[] PROGMEM = "SET"; +const char scls[] PROGMEM = "CLS"; +const char slocate[] PROGMEM = "LOCATE"; +const char selse[] PROGMEM = "ELSE"; +#endif +/* Arduino functions */ +#ifdef HASARDUINOIO +const char spinm[] PROGMEM = "PINM"; +const char sdwrite[] PROGMEM = "DWRITE"; +const char sdread[] PROGMEM = "DREAD"; +const char sawrite[] PROGMEM = "AWRITE"; +const char saread[] PROGMEM = "AREAD"; +const char sdelay[] PROGMEM = "DELAY"; +const char smillis[] PROGMEM = "MILLIS"; +const char sazero[] PROGMEM = "AZERO"; +const char sled[] PROGMEM = "LED"; +#endif +#ifdef HASTONE +const char stone[] PROGMEM = "PLAY"; +#endif +#ifdef HASPULSE +const char spulse[] PROGMEM = "PULSE"; +#endif +/* DOS functions */ +#ifdef HASFILEIO +const char scatalog[] PROGMEM = "CATALOG"; +const char sdelete[] PROGMEM = "DELETE"; +const char sfopen[] PROGMEM = "OPEN"; +const char sfclose[] PROGMEM = "CLOSE"; +const char sfdisk[] PROGMEM = "FDISK"; +#endif +/* low level access functions */ +#ifdef HASSTEFANSEXT +const char susr[] PROGMEM = "USR"; +const char scall[] PROGMEM = "CALL"; +#endif +/* mathematics */ +#ifdef HASFLOAT +const char ssin[] PROGMEM = "SIN"; +const char scos[] PROGMEM = "COS"; +const char stan[] PROGMEM = "TAN"; +const char satan[] PROGMEM = "ATAN"; +const char slog[] PROGMEM = "LOG"; +const char sexp[] PROGMEM = "EXP"; +#endif +/* INT is always needed to make float/int programs compatible */ +const char sint[] PROGMEM = "INT"; +/* elemetars graphics */ +#ifdef HASGRAPH +const char scolor[] PROGMEM = "COLOR"; +const char splot[] PROGMEM = "PLOT"; +const char sline[] PROGMEM = "LINE"; +const char scircle[] PROGMEM = "CIRCLE"; +const char srect[] PROGMEM = "RECT"; +const char sfcircle[] PROGMEM = "FCIRCLE"; +const char sfrect[] PROGMEM = "FRECT"; +#endif +/* Dartmouth BASIC extensions */ +#ifdef HASDARTMOUTH +const char sdata[] PROGMEM = "DATA"; +const char sread[] PROGMEM = "READ"; +const char srestore[] PROGMEM = "RESTORE"; +const char sdef[] PROGMEM = "DEF"; +const char sfn[] PROGMEM = "FN"; +const char son[] PROGMEM = "ON"; +#endif +/* The Darkarts commands */ +#ifdef HASDARKARTS +const char smalloc[] PROGMEM = "MALLOC"; +const char sfind[] PROGMEM = "FIND"; +const char seval[] PROGMEM = "EVAL"; +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING +const char serror[] PROGMEM = "ERROR"; +#endif +/* iot extensions */ +#ifdef HASIOT +const char savail[] PROGMEM = "AVAIL"; +const char sstr[] PROGMEM = "STR"; +const char sinstr[] PROGMEM = "INSTR"; +const char sval[] PROGMEM = "VAL"; +const char snetstat[] PROGMEM = "NETSTAT"; +const char ssensor[] PROGMEM = "SENSOR"; +const char swire[] PROGMEM = "WIRE"; +const char ssleep[] PROGMEM = "SLEEP"; +#endif +/* events and interrupts */ +#ifdef HASTIMER +const char safter[] PROGMEM = "AFTER"; +const char severy[] PROGMEM = "EVERY"; +#endif +#ifdef HASEVENTS +const char sevent[] PROGMEM = "EVENT"; +#endif +#ifdef HASSTRUCT +const char swhile[] PROGMEM = "WHILE"; +const char swend[] PROGMEM = "WEND"; +const char srepeat[] PROGMEM = "REPEAT"; +const char suntil[] PROGMEM = "UNTIL"; +const char sswitch[] PROGMEM = "SWITCH"; +const char scase[] PROGMEM = "CASE"; +const char sswend[] PROGMEM = "SWEND"; +const char sdo[] PROGMEM = "DO"; +const char sdend[] PROGMEM = "DEND"; +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS +const char sfend[] PROGMEM = "FEND"; +#endif +#endif +#ifdef HASMSSTRINGS +const char sasc[] PROGMEM = "ASC"; +const char schr[] PROGMEM = "CHR"; +const char sright[] PROGMEM = "RIGHT"; +const char sleft[] PROGMEM = "LEFT"; +const char smid[] PROGMEM = "MID"; +const char sspc[] PROGMEM = "SPC"; +#endif +#ifdef HASEDITOR +const char sedit[] PROGMEM = "EDIT"; +#endif + + +/* zero terminated keyword storage */ +const char* const keyword[] PROGMEM = { + sge, sle, sne, sprint, slet, sinput, + sgoto, sgosub, sreturn, sif, sfor, sto, + sstep, snext, sstop, slist, snew, srun, + sabs, srnd, ssize, srem, +#ifdef HASAPPLE1 + snot, sand, sor, slen, ssgn, speek, sdim, + sclr, shimem, stab, sthen, + sbend, spoke, +#endif +#ifdef HASSTEFANSEXT + scont, ssqr, spow, smap, sdump, sbreak, +#endif + ssave, sload, +#ifdef HASSTEFANSEXT + sget, sput, sset, scls, slocate, selse, +#endif +#ifdef HASARDUINOIO + spinm, sdwrite, sdread, sawrite, saread, + sdelay, smillis, sazero, sled, +#endif +#ifdef HASTONE + stone, +#endif +#ifdef HASPULSE + spulse, +#endif +#ifdef HASFILEIO + scatalog, sdelete, sfopen, sfclose, sfdisk, +#endif +#ifdef HASSTEFANSEXT + susr, scall, +#endif +#ifdef HASFLOAT + ssin, scos, stan, satan, slog, sexp, +#endif + sint, +#ifdef HASGRAPH + scolor, splot, sline, scircle, srect, + sfcircle, sfrect, +#endif +#ifdef HASDARTMOUTH + sdata, sread, srestore, sdef, sfn, son, +#endif +#ifdef HASDARKARTS + smalloc, sfind, seval, +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING + serror, +#endif +#ifdef HASIOT + savail, sstr, sinstr, sval, + snetstat, ssensor, swire, ssleep, +#endif +#ifdef HASTIMER + safter, severy, +#endif +#ifdef HASEVENTS + sevent, +#endif +#ifdef HASSTRUCT + swhile, swend, srepeat, suntil, sswitch, scase, sswend, + sdo, sdend, +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS + sfend, +#endif +#endif +#ifdef HASMSSTRINGS + sasc, schr, sright, sleft, smid, sspc, +#endif +#ifdef HASEDITOR + sedit, +#endif + 0 +}; + +/* the zero terminated token dictonary needed for scalability */ +const token_t tokens[] PROGMEM = { + GREATEREQUAL, LESSEREQUAL, NOTEQUAL, TPRINT, TLET, + TINPUT, TGOTO, TGOSUB, TRETURN, TIF, TFOR, TTO, TSTEP, + TNEXT, TSTOP, TLIST, TNEW, TRUN, TABS, TRND, TSIZE, TREM, +#ifdef HASAPPLE1 + TNOT, TAND, TOR, TLEN, TSGN, TPEEK, TDIM, TCLR, + THIMEM, TTAB, TTHEN, TEND, TPOKE, +#endif +#ifdef HASSTEFANSEXT + TCONT, TSQR, TPOW, TMAP, TDUMP, TBREAK, +#endif + TSAVE, TLOAD, +#ifdef HASSTEFANSEXT + TGET, TPUT, TSET, TCLS, TLOCATE, TELSE, +#endif +#ifdef HASARDUINOIO + TPINM, TDWRITE, TDREAD, TAWRITE, TAREAD, TDELAY, TMILLIS, + TAZERO, TLED, +#endif +#ifdef HASTONE + TTONE, +#endif +#ifdef HASPULSE + TPULSE, +#endif +#ifdef HASFILEIO + TCATALOG, TDELETE, TOPEN, TCLOSE, TFDISK, +#endif +#ifdef HASSTEFANSEXT + TUSR, TCALL, +#endif +#ifdef HASFLOAT + TSIN, TCOS, TTAN, TATAN, TLOG, TEXP, +#endif + TINT, +#ifdef HASGRAPH + TCOLOR, TPLOT, TLINE, TCIRCLE, TRECT, + TFCIRCLE, TFRECT, +#endif +#ifdef HASDARTMOUTH + TDATA, TREAD, TRESTORE, TDEF, TFN, TON, +#endif +#ifdef HASDARKARTS + TMALLOC, TFIND, TEVAL, +#endif +#ifdef HASERRORHANDLING + TERROR, +#endif +#ifdef HASIOT + TAVAIL, TSTR, TINSTR, TVAL, TNETSTAT, + TSENSOR, TWIRE, TSLEEP, +#endif +#ifdef HASTIMER + TAFTER, TEVERY, +#endif +#ifdef HASEVENTS + TEVENT, +#endif +#ifdef HASSTRUCT + TWHILE, TWEND, TREPEAT, TUNTIL, TSWITCH, TCASE, TSWEND, + TDO, TDEND, +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS + TFEND, +#endif +#endif +#ifdef HASMSSTRINGS + TASC, TCHR, TRIGHT, TLEFT, TMID, TSPC, +#endif +#ifdef HASEDITOR + TEDIT, +#endif + 0 +}; + +/* experimental, do not use right now */ +const bworkfunction_t workfunctions[] PROGMEM = { + 0, 0, 0, xprint, 0 +}; + +/* errors and messages */ +const char mfile[] PROGMEM = "file.bas"; +const char mprompt[] PROGMEM = "> "; +const char mgreet[] PROGMEM = "Stefan's Basic 2.0"; +const char mline[] PROGMEM = "LINE"; +const char mnumber[] PROGMEM = "NUMBER"; +const char mvariable[] PROGMEM = "VARIABLE"; +const char marray[] PROGMEM = "ARRAY"; +const char mstring[] PROGMEM = "STRING"; +const char mstringv[] PROGMEM = "STRINGVAR"; +const char egeneral[] PROGMEM = "Error"; +#ifdef HASERRORMSG +const char eunknown[] PROGMEM = "Syntax"; +const char enumber[] PROGMEM = "Number"; +const char edivide[] PROGMEM = "Div by 0"; +const char eline[] PROGMEM = "Unknown Line"; +const char emem[] PROGMEM = "Memory"; +const char estack[] PROGMEM = "Stack"; +const char erange[] PROGMEM = "Range"; +const char estring[] PROGMEM = "String"; +const char evariable[] PROGMEM = "Variable"; +const char eloop[] PROGMEM = "Loop"; +const char efile[] PROGMEM = "File"; +const char efun[] PROGMEM = "Function"; +const char eargs[] PROGMEM = "Args"; +const char eeeprom[] PROGMEM = "EEPROM"; +const char esdcard[] PROGMEM = "SD card"; +#endif + +const char* const message[] PROGMEM = { + mfile, mprompt, mgreet, + mline, mnumber, mvariable, marray, + mstring, mstringv, + egeneral +#ifdef HASERRORMSG + , eunknown, enumber, edivide, eline, + emem, estack, erange, + estring, evariable, eloop, efile, efun, eargs, + eeeprom, esdcard +#endif +}; + +/* + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: in the new code this is simply the size of the + * stringlength type. Currently only 1 byte and 2 bytes are tested. + */ +#ifdef HASFLOAT +const number_t maxnum=16777216; +#else +const number_t maxnum=(number_t)~((number_t)1<<(sizeof(number_t)*8-1)); +#endif +const int numsize=sizeof(number_t); +const int addrsize=sizeof(address_t); +const int eheadersize=sizeof(address_t)+1; +const int strindexsize=sizeof(stringlength_t); /* default in the meantime, strings up to unsigned 16 bit length */ +const address_t maxaddr=(address_t)(~0); + +/* + * The basic interpreter is implemented as a stack machine + * with global variable for the interpreter state, the memory + * and the arithmetic during run time. + */ + +/* the stack, all BASIC arithmetic is done here */ +//number_t stack[STACKSIZE]; +accu_t stack[STACKSIZE]; +address_t sp=0; + +/* a small buffer to process string arguments, mostly used for Arduino PROGMEM and string functions */ +/* use with care as it is used in some string functions */ +char sbuffer[SBUFSIZE]; + +/* the input buffer, the lexer can tokenize this and run from it, bi is an index to this. + bi must be global as it is the program cursor in interactive mode */ +char ibuffer[BUFSIZE] = "\0"; +char *bi; + +/* a static array of variables A-Z for the small systems that have no heap */ +#ifndef HASAPPLE1 +number_t vars[VARSIZE]; +#endif + +/* the BASIC working memory, either malloced or allocated as a global array */ +#if MEMSIZE != 0 +mem_t mem[MEMSIZE]; +#else +mem_t* mem; +#endif +address_t himem, memsize; + +/* reimplementation of the loops, will replace the forstack */ +bloop_t loopstack[FORDEPTH]; +index_t loopsp = 0; + +/* the GOSUB stack remembers an address to jump to */ +address_t gosubstack[GOSUBDEPTH]; +index_t gosubsp = 0; + +/* arithmetic accumulators */ +number_t x, y; + +/* the name of on object, replaced xc and xy in BASIC 1 */ +name_t name; + +/* an address accumulator, used a lot in string operations */ +address_t ax; + +/* a string index registers, new style identifying a string either in C memory or BASIC memory */ +string_t sr; + +/* the active token */ +token_t token; + +/* the curent error, can be a token, hence token type */ +token_t er; +/* the jmp buffer for the error handling */ +#if USELONGJUMP == 1 +jmp_buf sthook; +#endif + +/* a trapable error */ +mem_t ert; + +/* the interpreter state, interactive, run or run from EEPROM */ +mem_t st; + +/* the current program location */ +address_t here; + +/* the topmost byte of a program in memory, beginning of free BASIC RAM */ +address_t top; + +/* used to format output with # */ +mem_t form = 0; + +/* do we use the Microsoft convention of an array starting at 0 or 1 like Apple 1 + two seperate variables because arraylimit can be changed at runtime for existing arrays + msarraylimit says if an array should be created with n or n+1 elements */ +#ifdef MSARRAYLIMITS +mem_t msarraylimits = 1; +address_t arraylimit = 0; +#else +mem_t msarraylimits = 0; +address_t arraylimit = 1; +#endif + + +/* behaviour around boolean, needed to change the interpreters personality at runtime */ +/* -1 is microsoft true while 1 is Apple 1 and C style true. */ +mem_t booleanmode = BOOLEANMODE; + +/* setting the interpreter to integer at runtime */ +mem_t forceint = 0; + +/* the default size of a string now as a variable */ +stringlength_t defaultstrdim = STRSIZEDEF; + +/* the base of the random number generator + * 0 is Apple 1 style RND from 0 to n-epsilon + * 1 is Palo Alto style from 1 to n + */ +mem_t randombase = 0; + +/* is substring logic used or not */ +#ifdef SUPPRESSSUBSTRINGS +mem_t substringmode = 0; +#else +mem_t substringmode = 1; +#endif + +/* the flag for true MS tabs */ +mem_t reltab = 0; + +/* the flag for lower case names */ +mem_t lowercasenames = 0; + +/* the number of arguments parsed from a command */ +mem_t args; + +/* the random number seed, this is unsigned */ +#ifndef HASFLOAT +address_t rd; +#else +unsigned long rd; +#endif + +/* the RUN debuglevel */ +mem_t debuglevel = 0; + +/* DATA pointer, where is the current READ statement */ +#ifdef HASDARTMOUTH +address_t data = 0; +address_t datarc = 1; +#endif + +/* + * process command line arguments in the POSIX world + * bnointafterrun is a flag to remember if called as command + * line argument, in this case we don't return to interactive + */ +#ifdef HASARGS +int bargc; +char** bargv; +mem_t bnointafterrun = 0; +#endif + +/* formaters lastouttoken and spaceafterkeyword to make a nice LIST */ +mem_t lastouttoken; +mem_t spaceafterkeyword; +mem_t outliteral = 0; +mem_t lexliteral = 0; + +/* + * The cache for the heap search - helps the string code. + * The last found object on the heap is remembered. This is needed + * because the string code sometime searches the heap twice during the + * same operation. Also, bfind is used to remember the length of the + * last found object. + */ +#ifdef HASAPPLE1 +heap_t bfind_object; +#endif + +/* + * a variable for string to numerical conversion, + * telling you were the number ended. + */ +address_t vlength; + +/* the timer code - very simple needs to be converted to to a struct */ +/* timer type */ +#ifdef HASTIMER +btimer_t after_timer = {0, 0, 0, 0, 0}; +btimer_t every_timer = {0, 0, 0, 0, 0}; +#endif + +/* the event code */ +#ifdef HASEVENTS + +#define EVENTLISTSIZE 4 + +/* the event list */ +int nevents = 0; +int ievent = 0; +mem_t events_enabled = 1; +volatile bevent_t eventlist[EVENTLISTSIZE]; + +/* the extension of the GOSUB stack */ +mem_t gosubarg[GOSUBDEPTH]; +#endif + +#ifdef HASERRORHANDLING +/* the error handler type, very simple for now */ +typedef struct { + mem_t type; + address_t linenumber; +} berrorh_t; + +berrorh_t berrorh = {0 , 0}; +mem_t erh = 0; +#endif + +/* the string for real time clocks */ +char rtcstring[20] = { 0 }; + +/* the units pulse operates on, in microseconds*/ +address_t bpulseunit = 10; + +/* only needed for POSIXNONBLOCKING */ +mem_t breakcondition = 0; + +/* the FN context, how deep are we in a nested function call, negative values reserved */ +int fncontext = 0; + +/* the accuracy of a equal or not equal statement on numbers */ +#ifdef HASFLOAT +number_t epsilon = 0; +#else +const number_t epsilon = 0; +#endif + +/* + * BASIC timer stuff, this is a core interpreter function now + */ + +/* the millis function for BASIC */ +void bmillis() { + number_t m; +/* millis is processed as integer and is cyclic mod maxnumber and not cast to float!! */ + m=(number_t) (millis()/(unsigned long)pop() % (unsigned long)maxnum); + push(m); +} + +/* + * Determine the possible basic memory size. + * using malloc causes some overhead which can be relevant on the smaller + * boards. + * + * Set MEMSIZE instead to a static value. In this case ballocmem + * just returns the static MEMSIZE. + * + * If SPIRAMINTERFACE is defined, we use the memory from a serial RAM and dont + * allocate it here at all. + * + */ +#if MEMSIZE == 0 && !(defined(SPIRAMINTERFACE)) +address_t ballocmem() { + +/* on most platforms we know the free memory for BASIC, this comes from runtime */ + long m=freememorysize(); + +/* we subtract some language feature depended things, this is only needed on + small Arduino boards with memories below 16kb */ + if (m < 16000) { +#ifdef HASAPPLE1 + m-=64; /* strings cost memory */ +#endif +#ifdef USELONGJUMP + m-=160; /* odd but true on Ardunio UNO and the like */ +#endif +#ifdef HASFLOAT + m-=96; +#endif +#ifdef HASGRAPH + m-=256; +#endif + } + +/* and keep fingers crossed here */ + if (m<0) m=128; + +/* we allocate as much as address_t can handle */ + if (m>maxaddr) m=maxaddr; + +/* try to allocate the memory */ + mem=(mem_t*)malloc(m); + if (mem != 0) return m-1; + +/* fallback if allocation failed, 128 bytes */ + mem=(mem_t*)malloc(128); + if (mem != 0) return 128; else return 0; + +} +#else +address_t ballocmem(){ return MEMSIZE-1; }; +#endif + +/* + * Layer 0 function - variable handling. + * + * These function access variables and data + */ + +/* + * Eeprom load / save / autorun functions + * needed for SAVE and LOAD to an EEPROM + * autorun is generic. + * + * The eeprom is accessed through the runtime functions + * elength(), eupdate(), ewrite() and eflush(); + * + */ + +/* save a file to EEPROM, disabled if we use the EEPROM directly */ +void esave() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + + /* does the program fit into the eeprom */ + if (top+eheadersize < elength()) { + + /* EEPROM per default is 255, 0 indicates that there is a program */ + eupdate(a++, 0); + + /* store the size of the program in byte 1,2,... of the EEPROM*/ + setaddress(a, beupdate, top); + a+=addrsize; + + /* store the program */ + while (a < top+eheadersize){ + eupdate(a, memread2(a-eheadersize)); + a++; + } + eupdate(a++,0); + + /* needed on I2C EEPROM and other platforms where we buffer */ + eflush(); + + } else { + error(EOUTOFMEMORY); + er=0; + } +#endif +} + +/* load a file from EEPROM, disabled if the use the EEPROM directly */ +void eload() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + + /* have we stored a program? */ + if (elength()>0 && (eread(a) == 0 || eread(a) == 1)) { + + /* how long is it? */ + a++; + top=getaddress(a, beread); + a+=addrsize; + + /* load it to memory, memwrite2 is direct mem access */ + while (a < top+eheadersize){ + memwrite2(a-eheadersize, beread(a)); + a++; + } + } else { + /* no valid program data is stored */ + error(EEEPROM); + } +#endif +} + +/* autorun something from EEPROM or a filesystem */ +char autorun() { + +/* autorun from EEPROM if there is an EEPROM flagged for autorun */ + if (elength()>0 && eread(0) == 1) { /* autorun from the EEPROM */ + top=getaddress(1, beread); + st=SERUN; + return 1; /* EEPROM autorun overrules filesystem autorun */ + } + +/* autorun from a given command line argument, if we have one */ +#ifdef HASARGS + if (bargc > 0 && ifileopen(bargv[1])) { + xload(bargv[1]); + st=SRUN; + ifileclose(); + bnointafterrun=TERMINATEAFTERRUN; + return 1; + } +#endif + +/* on a platform with a file system, autoexec from a file */ +#if defined(FILESYSTEMDRIVER) + if (ifileopen("autoexec.bas")) { + xload("autoexec.bas"); + st=SRUN; + ifileclose(); + return 1; + } +#endif + +/* nothing to autorun */ + return 0; +} + +#ifdef HASAPPLE1 +/* + * The new malloc code. Heap structure is now + * payload + * (payload size) + * name + * type + * + * In the new heap implementation himem points to the first free byte on the heap. + * The payload is stored first and then the header. + * + * The new heap code uses name_t for the name of the object. + * + */ + +address_t bmalloc(name_t* name, address_t l) { + address_t payloadsize; /* the payload size */ + address_t heapheadersize = sizeof(name_t) + addrsize; /* this is only used to estimate the free space, it is the maximum */ + address_t b=himem; /* the current position on the heap, we store it in case of errors */ + +/* Initial DEBUG message. */ + if (DEBUG) { + outsc("** bmalloc with token "); + outnumber(name->token); outspc(); + outname(name); outspc(); + outnumber(l); outcr(); + } + +/* + * How much space does the payload of the object need? + */ + switch(name->token) { + case VARIABLE: /* a variable needs numsize bytes*/ + payloadsize=numsize; + + break; +#ifndef HASMULTIDIM + case ARRAYVAR: /* a one dimensional array needs numsize*l bytes */ + payloadsize=numsize*l; + break; +#else + case ARRAYVAR: /* a two dimensional array needs numsize*l bytes plus one word for the additional dimension*/ + payloadsize=numsize*l+addrsize; + break; +#endif +#ifdef HASDARTMOUTH + case TFN: /* the jump address, the type of function/type of return value, the number of vars + and all variables are stored*/ + payloadsize=addrsize+2+sizeof(name_t)*l; + break; +#endif +/* these are plain buffers allocated by the MALLOC call in BASIC */ + default: + payloadsize=l; + } + +/* enough memory ?, on an EEPROM system we limit the heap to the RAM */ +#ifndef EEPROMMEMINTERFACE + if ((himem-top) < payloadsize+heapheadersize) { error(EOUTOFMEMORY); return 0;} +#else + if (himem-(elength()-eheadersize) < payloadsize+heapheadersize) { error(EOUTOFMEMORY); return 0;} +#endif + +/* first we reserve space for the payload, address points to the first byte of the payload */ +/* b points to the first free byte after the payload*/ + b-=payloadsize; + bfind_object.address=b+1; + +/* for ARRAYS, STRINGS and BUFFERS, store the object length now - these are variable size objects*/ + if (name->token != VARIABLE) { + b-=(addrsize-1); + setaddress(b, memwrite2, payloadsize); + if (DEBUG) { + outsc("** bmalloc writes payloadsize "); outnumber(payloadsize); + outsc(" at "); outnumber(b); outcr(); + } + b--; + } + +/* store the name of the objects including the type as identifier */ + b=setname_heap(b, name); + +/* store the type of the object */ + memwrite2(b--, name->token); + +/* if anything went wrong we exit here without changing himem */ + if (b < top || er) { error(EOUTOFMEMORY); return 0; } + +/* we fill the cache here as well, both right now for compatibility */ + bfind_object.name=*name; + bfind_object.size=payloadsize; + +/* himem is the next free byte now again */ + himem=b; + + if (DEBUG) { + outsc("** bmalloc returns "); outnumber(bfind_object.address); + outsc(" himem is "); outnumber(himem); outcr(); + } + +/* return the address of the payload */ + return bfind_object.address; +} + +address_t bfind(name_t* name) { + address_t b, b0; + address_t i=0; + +/* Initial DEBUG message. */ + if (DEBUG) { + outsc("*** bfind called for "); outname(name); + outsc(" on heap with token "); outnumber(name->token); + outsc(" himem is "); outnumber(himem); outcr(); + } + +/* do we have anything on the heap? */ + if (himem == memsize) return 0; else b=himem+1; + +/* we have the object already in cache and return */ + if (name->token == bfind_object.name.token && cmpname(name, &bfind_object.name)) { + if (DEBUG) { outsc("*** bfind found in cache "); outname(name); outsc(" at "); outnumber(bfind_object.address); outcr(); } + return bfind_object.address; + } + +/* walk through the heap from the last object added to the first */ + while (b <= memsize) { + +/* get the name and the type */ + bfind_object.name.token=memread2(b++); + b=getname(b, &bfind_object.name, memread2); + +/* determine the size of the object and advance */ + if (bfind_object.name.token != VARIABLE) { + bfind_object.size=getaddress(b, memread2); + b+=addrsize; + } else { + bfind_object.size=numsize; + } + +/* this is the location of the payload */ + bfind_object.address=b; + +/* have we found the object */ + if (name->token == bfind_object.name.token && cmpname(name, &bfind_object.name)) { + if (DEBUG) { outsc("*** bfind found "); outname(name); outsc(" at "); outnumber(bfind_object.address); outcr(); } + return bfind_object.address; + } + +/* advance on the heap */ + b0=b; + b+=bfind_object.size; + +/* safety net */ + if (b0 > b) { + error(EVARIABLE); + return 0; + } + + } + +/* nothing found return 0 and clear the cache */ + + if (DEBUG) { outsc("bfind returns 0"); outcr(); } + zeroheap(&bfind_object); + return 0; +} + +/* reimplementation bfree with name interface */ +address_t bfree(name_t* name) { + address_t b; + address_t i; + + if (DEBUG) { outsc("*** bfree called for "); outname(name); outsc(" on heap with token "); outnumber(name->token); outcr(); } + +/* use bfind to find the place */ + b=bfind(name); + +/* nothing found, return 0 */ + if (b == 0) return 0; + + if (DEBUG) { outsc("** bfree found "); outnumber(b); outcr(); } + +/* clear the entire memory area */ + for (i=himem; i<=b+bfind_object.size-1; i++) memwrite2(i, 0); + +/* set the number of variables to the new value */ + himem=b+bfind_object.size-1; + + if (DEBUG) { outsc("** bfree returns "); outnumber(himem); outcr(); } + +/* forget the chache, because heap structure has changed !! */ + zeroheap(&bfind_object); + return himem; +} + +/* the length of an object, we directly return from the cache */ +address_t blength(name_t* name) { + if (bfind(name)) return bfind_object.size; else return 0; +} +#endif /* HASAPPLE1 */ + +/* reimplementation of getvar and setvar with name_t */ +number_t getvar(name_t *name){ + address_t a; + + if (DEBUG) { outsc("* getvar "); outname(name); outspc(); outcr(); } + +/* the special variables */ + if (name->c[0] == '@') { + switch (name->c[1]) { + case 'A': + return availch(); + case 'S': + return ert|ioer; + case 'I': + return id; + case 'O': + return od; + case 'C': + if (availch()) return inch(); else return 0; + case 'E': + return elength()/numsize; + case 0: + return (himem-top)/numsize; + case 'R': + return rd; + case 'U': + return getusrvar(); +#ifdef HASFLOAT + case 'P': + return epsilon; +#endif +#ifdef HASIOT + case 'V': + return vlength; +#endif +#if defined(DISPLAYDRIVER) || defined (GRAPHDISPLAYDRIVER) + case 'X': + return dspgetcursorx(); + case 'Y': + return dspgetcursory(); +#endif + } + } + +#ifdef HASAPPLE1 +/* search the heap first */ + a=bfind(name); + if (!USELONGJUMP && er) return 0; + +/* if we don't find on the heap and it is not a static variable, we autocreate */ + if (a == 0) { + a=bmalloc(name, 0); + if (!USELONGJUMP && er) return 0; + } + +/* something went wrong */ + if (a == 0) { + error(EVARIABLE); + return 0; + } +/* retrieve the value */ + return getnumber(a, memread2); + +#else +/* we only have the static variable array */ + if (name->c[0] >= 65 && name->c[0] <= 91 && name->c[1] == 0) return vars[name->c[0]-65]; + +/* systems without Apple1 extension i.e. HEAP throw an error */ + error(EVARIABLE); + return 0; +#endif +} + +/* set and create a variable */ +void setvar(name_t *name, number_t v){ + address_t a; + + if (DEBUG) { outsc("* setvar "); outname(name); outspc(); outnumber(v); outcr(); } + +/* the special variables */ + if (name->c[0] == '@') + switch (name->c[1]) { + case 'S': + ert=v; + ioer=v; + return; + case 'I': + id=v; + return; + case 'O': + od=v; + return; + case 'C': + outch(v); + return; + case 'R': + rd=v; + return; + case 'U': + setusrvar(v); + return; +#ifdef HASFLOAT + case 'P': + epsilon=v; + return; +#endif +#ifdef HASIOT + case 'V': + return; +#endif +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case 'X': + dspsetcursorx((int)v); +/* set the charcount, this is half broken but works */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=v; +#endif + return; + case 'Y': + dspsetcursory((int)v); + return; +#endif + } + +#ifdef HASAPPLE1 +/* dynamically allocated vars */ + a=bfind(name); + +/* autocreate if not found */ + if (a == 0) { + a=bmalloc(name, 0); + if (!USELONGJUMP && er) return; + } + +/* something went wrong */ + if (a == 0) { + error(EVARIABLE); + return; + } + +/* set the value */ + setnumber(a, memwrite2, v); +#else +/* the static variable array */ + if (name->c[1] == 0 && name->c[0] >= 65 && name->c[0] <= 91) { + vars[name->c[0]-65]=v; + return; + } + error(EVARIABLE); +#endif +} + +/* clr all variables */ +void clrvars() { + +/* delete all static variables */ + address_t i; + +/* clear static variable (only on no heap systems) */ +#ifndef HASAPPLE1 + for (i=0; ic[1]); + memwrite2(m--, name->c[0]); + return m; +} + +/* this one is for the pgm were we count up writing */ +address_t setname_pgm(address_t m, name_t* name) { + memwrite2(m++, name->c[0]); + memwrite2(m++, name->c[1]); + return m; +} + +/* get a name from a memory location */ +address_t getname(address_t m, name_t* name, memreader_t f) { + name->c[0]=f(m++); + name->c[1]=f(m++); + return m; +} + +/* compare two names */ +mem_t cmpname(name_t* a, name_t* b) { + if (a->c[0] == b->c[0] && a->c[1] == b->c[1]) return 1; else return 0; +} + +/* zero a name and a heap object */ +void zeroname(name_t* name) { + name->c[0]=0; + name->c[1]=0; + name->token=0; +} + +void zeroheap(heap_t* heap) { + heap->address=0; + heap->size=0; + zeroname(&heap->name); +} + +/* output a name */ +void outname(name_t* name) { + outch(name->c[0]); + if (name->c[1]) outch(name->c[1]); +} + +#else +/* this one is for the heap were we count down writing*/ +address_t setname_heap(address_t m, name_t* name) { + mem_t l; + for(l=name->l; l>0; l--) memwrite2(m--, name->c[l-1]); + memwrite2(m--, name->l); + return m; +} + +/* this one is for the pgm were we count up writing */ +address_t setname_pgm(address_t m, name_t* name) { + mem_t l; + memwrite2(m++, name->l); + for(l=0; ll; l++) memwrite2(m++, name->c[l]); + return m; +} + +/* get a name from a memory location */ +address_t getname(address_t m, name_t* name, memreader_t f) { + mem_t l; + name->l=f(m++); + + for(l=0; ll; l++) name->c[l]=f(m++); + for(; lc[l]=0; /* should not be there, is needed for + now because the lexer is not implemented correctly*/ + return m; +} + +/* compare two names */ +mem_t cmpname(name_t* a, name_t* b) { + mem_t l; + if (a->l != b->l) return 0; + for(l=0; ll; l++) if (a->c[l] != b->c[l]) return 0; + return 1; +} + +/* zero a name and a heap object */ +void zeroname(name_t* name) { + mem_t l; + name->l=0; + for(l=0; lc[l]=0; + name->token=0; +} + +void zeroheap(heap_t* heap) { + heap->address=0; + heap->size=0; + zeroname(&heap->name); +} + +/* output a name */ +void outname(name_t* name) { + mem_t l; + for(l=0; ll; l++) outch(name->c[l]); +} +#endif + + +/* + * Create an array. + * + * Arrays are created on the heap. This code allows redimensioning of arrays + * which leads to a new array with the same name on the heap. This new + * array is found first in a heap search. This ways we can have arrays + * as local variables. + * + * msarraylimits is a flag to indicate that arrays should be created with + * 0-n elements like in Microsoft BASIC. + * + */ +address_t createarray(name_t* variable, address_t i, address_t j) { + address_t a; + +/* if we want to me MS compatible, the array ranges from 0-n */ + if (msarraylimits) { + i+=1; + j+=1; + } + +/* this code allows redimension now for local variables */ +#ifdef HASAPPLE1 + if (DEBUG) { + outsc("* create array "); outname(variable); outspc(); + outsc("* with name length "); outnumber(variable->l); outspc(); + outnumber(i); outspc(); outnumber(j); outcr(); + } + +#ifndef HASMULTIDIM + return bmalloc(variable, i); +#else + +/* allocate the array space */ + a=bmalloc(variable, i*j); + +/* store the dimension of the array at the beginning of the array area */ + setaddress(a+i*j*numsize, memwrite2, j); + +/* return value is the address of the payload area */ + return a; +#endif +#endif + return 0; +} + +/* + * The array function. + + * We use the lefthandside object here with the convention that i is the first index + * and j the second index. This is inconsistent with the use in strings. Will be fixed + * when a true indexing type is introduced. + */ +void array(lhsobject_t* object, mem_t getset, number_t* value) { + address_t a; /* the address of the array element */ + address_t h; /* the number of elements in the array */ + address_t l=arraylimit; /* the lower limit, defaults to the arraylimit, here for further use */ + address_t dim=1; /* the array dimension */ + + if (DEBUG) { + outsc("* array2: accessing "); + outname(&name); outspc(); outspc(); + outnumber(object->i); outspc(); + outnumber(object->j); outspc(); + outsc(" getset "); outch(getset); outcr(); + } + +/* handling the special array, range check and access is done here */ + if (object->name.c[0] == '@') { + switch(object->name.c[1]) { + case 'E': + h=elength()/numsize; + a=elength()-numsize*object->i; + if (a < eheadersize) { error(EORANGE); return; } + if (getset == 'g') *value=getnumber(a, beread); + else if (getset == 's') setnumber(a, beupdate, *value); + return; +#if defined(DISPLAYDRIVER) && defined(DISPLAYCANSCROLL) + case 'D': + if (getset == 'g') *value=dspget(object->i-1); + else if (getset == 's') dspset(object->i-1, *value); + return; +#endif +#if defined(HASCLOCK) + case 'T': + if (getset == 'g') *value=rtcget(object->i); + else if (getset == 's') rtcset(object->i, *value); + return; +#endif +#if defined(ARDUINO) && defined(ARDUINOSENSORS) + case 'S': + if (getset == 'g') *value=sensorread(object->i, 0); + return; +#endif + case 'U': + if (getset == 'g') *value=getusrarray(object->i); + else if (getset == 's') setusrarray(object->i, *value); + return; + case 0: + h=(himem-top)/numsize; + a=himem-numsize*(object->i+1)+1; + if (object->i < 0 || a < top) { error(EORANGE); return; } + if (getset == 'g') *value=getnumber(a, memread2); + else if (getset == 's') setnumber(a, memwrite2, *value); + return; + case 'M': + h=himem-top; + a=himem-object->i; + if (object->i < 0 || a < top) { error(EORANGE); return; } + if (getset == 'g') *value=memread2(a); + else if (getset == 's') memwrite2(a, *value); + return; + default: + error(EVARIABLE); + return; + } + } else { +/* dynamically allocated arrays */ +#ifdef HASAPPLE1 + object->name.token=ARRAYVAR; + if (!(a=bfind(&object->name))) a=createarray(&object->name, ARRAYSIZEDEF, 1); + if (!USELONGJUMP && er) return; + +/* multidim reserves one address word for the dimension, hence we have less bytes */ +#ifndef HASMULTIDIM + h=bfind_object.size/numsize; +#else + h=(bfind_object.size-addrsize)/numsize; +#endif + + if (DEBUG) { + outsc("** in array dynamical base address "); outnumber(a); + outsc(" and array element number "); outnumber(h); + outcr(); + } + +#ifdef HASMULTIDIM + dim=getaddress(a+bfind_object.size-addrsize, memread2); + if (DEBUG) { + outsc("** in array, second dimension is "); outnumber(dim); + outspc(); outnumber(a+bfind_object.size); + outcr(); + } + a=a+((object->i-l)*dim+(object->j-l))*numsize; +#else + a=a+(object->i-l)*numsize; +#endif +#else /* no array code */ + error(EVARIABLE); + return; +#endif + } + +/* range check */ +#ifdef HASMULTIDIM + if ( (object->j < l) || (object->j >= dim+l) || (object->i < l) || (object->i >= h/dim+l)) { error(EORANGE); return; } +#else + if ( (object->i < l) || (object->i >= h+l) ) { error(EORANGE); return; } +#endif + +/* set or get the array */ + if (getset == 'g') *value=getnumber(a, memread2); + else if (getset == 's') setnumber(a, memwrite2, *value); +} + +/* + * Create a string on the heap. + * + * i is the length of the string, j the dimension of the array. + * + * String objects are either plain strings or arrays. In case of arrays + * the number of strings is stored at the end of the array. + */ +address_t createstring(name_t* variable, address_t i, address_t j) { +#ifdef HASAPPLE1 + address_t a; + + if (DEBUG) { outsc("Create string "); outname(variable); outcr(); } + +/* the MS string compatibility, DIM 10 creates 11 elements */ + if (msarraylimits) j+=1; + +#ifndef HASMULTIDIM +/* if no string arrays are in the code, we reserve the number of bytes i and space for the index */ +/* allow redimension without check right now, for local variables */ + a=bmalloc(variable, i+strindexsize); + if (er != 0) return 0; + return a; +#else +/* string arrays need the number of array elements which address_ hence addresize bytes and then + the space for j strings */ +/* allow redimension without check right now, for local variables */ + a=bmalloc(variable, addrsize+j*(i+strindexsize)); + if (er != 0) return 0; + +/* set the array length */ + setaddress(a+j*(i+strindexsize), memwrite2, j); + +/* return the address of the first string */ + return a; +#endif + if (er != 0) return 0; + return a; +#else + return 0; +#endif +} + + +/* + * Get a string at position b. + * + * getstring returns a pointer to the first string element in question. + * + * There is a lo tof complexity in the code to support systems with serial + * memory. + * + */ +#ifdef HASAPPLE1 + +/* helpers to handle strings */ +/* Stores a C string to a BASIC string variable */ +void storecstring(address_t ax, address_t s, char* b) { + address_t k; + + for (k=0; k < s-strindexsize && b[k] != 0; k++) memwrite2(ax+k+strindexsize, b[k]); + setstrlength(ax, memwrite2, k); +} + +/* length of a c string up to a limit l */ +address_t cstringlength(char* c, address_t l) { + address_t a; + + while(a < l && c[a] != 0) a++; + return a; +} + +/* get a memory pointer to a string, new version */ +void getstring(string_t* strp, name_t* name, address_t b, address_t j) { + address_t k, zt; + address_t ax; + +/* we know nothing about the string */ + ax=0; + strp->address=0; + strp->ir=0; + strp->length=0; + strp->arraydim=1; + strp->strdim=0; + + if (DEBUG) { + outsc("* getstring from var "); outname(name); outspc(); + outnumber(b); outspc(); + outnumber(j); outcr(); + } + +/* special string variables */ + if (name->c[0] == '@') + switch(name->c[1]) { + case 0: + strp->ir=ibuffer+b; + strp->length=ibuffer[0]; + strp->strdim=BUFSIZ-2; + return; + default: + error(EVARIABLE); + return; + case 'U': + makeusrstring(); /* a user definable special string in sbuffer */ + strp->ir=sbuffer+b; + strp->length=sbuffer[0]; + return; +#ifdef HASCLOCK + case 'T': + rtcmkstr(); /* the time string */ + strp->ir=rtcstring+b; + strp->length=rtcstring[0]; + return; +#endif +/* the arguments string on POSIX systems */ +#ifdef HASARGS + case 'A': + if (bargc > 2) { + strp->ir=bargv[2]; + strp->length=cstringlength(bargv[2], BUFSIZE); + return; + } + return; +#endif + } + +/* dynamically allocated strings, create on the fly */ + if (!(ax=bfind(name))) ax=createstring(name, defaultstrdim, arraylimit); + + if (DEBUG) { + outsc("** heap address "); outnumber(ax); outcr(); + if (ax) { outsc("** byte length of string memory segment "); outnumber(bfind_object.size); outcr(); } + } + +/* string creating has caused an error, typically no memoryy */ + if (!USELONGJUMP && er) return; + +#ifndef HASMULTIDIM +/* the maximum length of the string */ + strp->strdim=bfind_object.size-strindexsize; + +/* are we in range */ + if ((b < 1) || (b > strp->strdim )) { error(EORANGE); return; } + + if (DEBUG) { outsc("** maximum string length "); outnumber(strp->strdim); outcr(); } + +/* get the actual full length, this is redundant to lenstring but lenstring does + not autocreate */ + strp->length=getstrlength(ax, memread2); + +/* now find the payload address */ + ax=ax+strindexsize+(b-1); +#else + +/* the dimension of the string array */ +/* it is at the top of the string, this uses a side effect of bfind */ + strp->arraydim=getaddress(ax + bfind_object.size - addrsize, memread2); + +/* is the array index in range */ + if ((j < arraylimit) || (j >= strp->arraydim + arraylimit )) { error(EORANGE); return; } + + if (DEBUG) { outsc("** string dimension "); outnumber(strp->arraydim); outcr(); } + +/* the max length of a string */ + strp->strdim=(bfind_object.size - addrsize)/strp->arraydim-strindexsize; + +/* are we in range */ + if ((b < 1) || (b > strp->strdim )) { error(EORANGE); return; } + + if (DEBUG) { outsc("** maximum string length "); outnumber(strp->strdim); outcr(); } + +/* the base address of a string */ + ax=ax+(j-arraylimit)*(strp->strdim + strindexsize); + + if (DEBUG) { outsc("** string base address "); outnumber(ax); outcr(); } + +/* from this base address we can get the actual length of the string */ + strp->length=getstrlength(ax, memread2); + +/* the address of the payload */ + ax=ax+b-1+strindexsize; + +#endif + + if (DEBUG) { outsc("** payload address "); outnumber(ax); outcr(); } + +/* store the payload address to the string object, length to be done if needed!! */ + strp->address=ax; + +/* return value is 0 if we have no direct memory access, the caller needs to handle the string + through the mem address */ +#ifdef USEMEMINTERFACE + strp->ir=0; +#else + strp->ir=(char *)&mem[ax]; +#endif +} + + +/* reimplementation with name_t */ +/* set the length of a string */ +void setstringlength(name_t* name, address_t l, address_t j) { + address_t a; + stringlength_t stringdim; + + if (DEBUG) { + outsc("** setstringlength "); + outname(name); + outspc(); outnumber(l); outspc(); outnumber(j); + outcr(); + } + +/* the special strings */ + if (name->c[0] == '@') + switch(name->c[1]) { + case 0: + *ibuffer=l; + return; + case 'U': + /* do nothing here for the moment */ + return; + } + +/* find the variable address */ + a=bfind(name); + if (!USELONGJUMP && er) return; + if (a == 0) { error(EVARIABLE); return; } + +/* stringdim calculation moved here */ +#ifndef HASMULTIDIM + stringdim=bfind_object.size-strindexsize; +#else +/* getaddress seeks the dimension of the string array directly after the payload */ + stringdim=(bfind_object.size - addrsize)/(getaddress(a + bfind_object.size - addrsize, memread2)) - strindexsize; +#endif + +/* where do we write it to */ + a=a+(stringdim+strindexsize)*(j-arraylimit); + if (DEBUG) { outsc("** setstringlength writing to "); outnumber(a); outsc(" value "); outnumber(l); outcr(); } + setstrlength(a, memwrite2, l); +} + +/* the BASIC string mechanism for real time clocks, create a string with the clock data */ +#ifdef HASCLOCK +void rtcmkstr() { + int cc = 1; + int t; + +/* hours */ + t=rtcget(2); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* minutes */ + t=rtcget(1); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* seconds */ + t=rtcget(0); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='-'; + +/* days */ + t=rtcget(4); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* months */ + t=rtcget(5); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* years */ + t=rtcget(6)%100; /* only 100 years no 19xx epochs */ + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc]=0; + +/* needed for BASIC strings */ + rtcstring[0]=cc-1; +} +#endif +#endif + +/* + * Layer 0 Extension: the user defined extension functions, use this function for a + * quick way to extend BASIC. + * + * @U is a single variable that can be set and get. Every access to this variable + * calls getusrvar() or setusrvar(). + * @U() is a 1d array every access calls get or setusrarray(). + * @U$ is a read only string created by makeusrstring(). + * USR(32, V) is a user defined function created by usrfunction(). + * CALL 32 is a user defined call + * + */ + +/* read or write the variable @U, you can do anything you want here */ +number_t getusrvar() { return 0; } +void setusrvar(number_t v) {return; } + +/* read or write the array @U(), you can do anything you want here */ +number_t getusrarray(address_t i) {return 0;} +void setusrarray(address_t i, number_t v) {return; } + +/* make the usr string from @U$, this function can be called multiple times for one operation */ +void makeusrstring() { +/* + * sample code could be: + * + * mem_t i; + * const char text[] = "hello world"; + * for(i=0; i 31 calls this */ +number_t usrfunction(address_t i, number_t v) { return 0; } + +/* CALL with arguments > 31 calls this */ +void usrcall(address_t i) { return; } + +/* + * Layer 0 - keyword handling - PROGMEM logic goes here + * getkeyword(), getmessage(), and getokenvalue() are + * the only access to the keyword array in the code. + * + * Same for messages and errors. + * + * All keywords are stored in PROGMEM, the Arduino way to store + * constant data in flash memory. sbuffer is used to recall the + * keywords and messages from PROGMEM on Arduino. Other systems + * use the keyword array directly. + */ +char* getkeyword(address_t i) { + + if (DEBUG) { outsc("** getkeyword from index "); outnumber(i); outcr(); } + +#ifndef ARDUINOPROGMEM + return (char *) keyword[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(keyword[i]))); + return sbuffer; +#endif +} + +/* messages are read from the message array */ +char* getmessage(char i) { + if (i >= sizeof(message) || i < 0) return 0; +#ifndef ARDUINOPROGMEM + return (char *) message[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(message[i]))); + return sbuffer; +#endif +} + +/* tokens read here are token_t constructed from multi byte sequences */ +token_t gettokenvalue(address_t i) { + if (i >= sizeof(tokens)) return 0; +#ifndef ARDUINOPROGMEM + return tokens[i]; +#else +#ifndef HASLONGTOKENS + return (token_t) pgm_read_byte(&tokens[i]); +#else + return (token_t) pgm_read_word(&tokens[i]); +#endif +#endif +} + +/* print a message directly to the default outpur stream */ +void printmessage(char i){ +#ifndef HASERRORMSG + if (i > EGENERAL) return; +#endif + outsc((char *)getmessage(i)); +} + +/* + * Layer 0 - error handling + * + * The general error handler. The static variable er + * contains the error state. + * + * debugtoken() writes a token for debug + * bdebug() is the general debug message function + * + * Strategy: the error() function writes the message and then + * clears the stack. All calling functions must check er and + * return after funtion calls with no further messages etc. + * reseterror() sets the error state to normal and end the + * run loop. + */ +void error(token_t e){ + address_t i; + +/* store the error number */ + er=e; + +/* clear the stacks */ + clearst(); + clrforstack(); + clrgosubstack(); + +/* switch off all timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +/* is the error handler active? then silently go if we do GOTO or CONT actions in it */ +#ifdef HASERRORHANDLING +#if !USELONGJUMP + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) return; +#else + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) longjmp(sthook, er); +#endif +#endif + +/* set input and output device back to default, and delete the form */ + iodefaults(); + form=0; + +/* find the line number if in RUN modes */ + if (st != SINT) { + outnumber(myline(here)); + outch(':'); + outspc(); + } + +/* if we have error messages, display them */ +#ifdef HASERRORMSG + if (e > 0) + printmessage(e); + else { + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=e; i++); + outsc(getkeyword(i)); + } + outspc(); + printmessage(EGENERAL); +#else + printmessage(EGENERAL); + outspc(); + outnumber(er); +#endif + if (DEBUG) { outsc("** at "); outnumber(here); } + outcr(); + +/* reset fncontext - this is odd */ + fncontext=0; + +/* we return to the statement loop, bringing the error with us */ +#if USELONGJUMP == 1 + longjmp(sthook, er); +#endif +} + +void reseterror() { + er=0; + here=0; + st=SINT; +} + +void debugtoken(){ + outsc("* "); + if (debuglevel>2) { outnumber(here); outsc(" * "); } + + if (token == EOL) { + outsc("EOL"); + return; + } + + switch(token) { + case LINENUMBER: + printmessage(MLINE); + break; + case NUMBER: + printmessage(MNUMBER); + break; + case VARIABLE: + printmessage(MVARIABLE); + break; + case ARRAYVAR: + printmessage(MARRAY); + break; + case STRING: + printmessage(MSTRING); + break; + case STRINGVAR: + printmessage(MSTRINGVAR); + break; + } + + outspc(); + outputtoken(); +} + +void bdebug(const char *c){ + outch('*'); + outspc(); + outsc(c); + debugtoken(); + outcr(); +} + +/* + * Arithmetic and runtime operations are mostly done + * on a stack of number_t. + * + * push(), pop(), clearst() handle the stack + */ +void push(number_t t){ + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(t); outcr(); + } + +/* in forced integer mode every operation is truncated */ +#ifdef HASFLOAT + if (forceint) t=trunc(t); +#endif + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].n=t; +} + +number_t pop(){ + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp-1].n); outcr(); + } + + if (sp == 0) { error(ESTACK); return 0; } + + return stack[--sp].n; +} + +void pushaddress2(address_t a) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(a); outcr(); + } + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].a=a; +} + +address_t popaddress2() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp-1].a); outcr(); + } + + if (sp == 0) { error(ESTACK); return 0; } + + return stack[--sp].a; +} + +void pushinteger(index_t i) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(i); outcr(); + } + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].i=i; +} + +index_t popinteger() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp-1].i); outcr(); + } + + if (sp == 0) { error(ESTACK); return 0; } + + return stack[--sp].i; +} + + +/* this one gets a positive integer from the stack and traps the error*/ +address_t popaddress(){ + number_t tmp = 0; + + tmp=pop(); + if (tmp < 0) { error(EORANGE); return 0;} + return (address_t) tmp; +} + +void clearst(){ + sp=0; +} + +/* these are not really stack operations but a way to handle temp char data */ +address_t charsp; + +void pushchar(char ch) {} + +char popchar() { return 0; } + +/* + * clear the cursor for the READ/DATA mechanism + */ +void clrdata() { +#ifdef HASDARTMOUTH + data=0; +#endif +} + +/* + * Stack handling for FOR + * Reimplementation of the for stack with names and with all loops + * cleaned up. + */ + +/* the new stack type for loops */ +void pushloop(name_t* name, token_t t, address_t here, number_t to, number_t step) { + address_t i; + + if (DEBUG) { + outsc("** loopsp and here in pushloopstack "); + outnumber(loopsp); outspc(); outnumber(here); outcr(); + if (name != 0) { outsc("** loop name "); outname(name); outcr(); } + else { outsc("** loop name is 0"); outcr(); } + outsc("** loop token "); outnumber(t); outcr(); + outsc("** loop to "); outnumber(to); outcr(); + outsc("** loop step "); outnumber(step); outcr(); + } + +/* + * Before pushing into the loop stack we check is an + * old loop exists. + * + * There are two situations to handle: + * 1. A loop is reentered because a GOTO went back to or even before + * the loop start. This is identified by the here location. + * 2. A new FOR loop is created after the existing loop with the same + * variable name. This happens if a jump or break went outside the + * loop. This is identified by the variable name. +*/ + +/* Situation 1, scan for here */ + for(i=0; i0) { + return &loopstack[loopsp-1]; + } else { + error(ELOOP); + return 0; + } +} + +void droploop() { + if (loopsp>0) { + loopsp--; + } else { + error(ELOOP); + return; + } +} + +void clrforstack() { + loopsp=0; +} + +/* GOSUB stack handling */ +void pushgosubstack(mem_t a){ + if (gosubsp < GOSUBDEPTH) { + gosubstack[gosubsp]=here; +#ifdef HASEVENTS + gosubarg[gosubsp]=a; +#endif + gosubsp++; + } else + error(TGOSUB); +} + +void popgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TRETURN); + return; + } + here=gosubstack[gosubsp]; +} + +void dropgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TGOSUB); + } +} + +void clrgosubstack() { + gosubsp=0; +} + +/* two helper commands for structured BASIC, without the GOSUB stack */ + +void pushlocation(blocation_t* l) { + if (st == SINT) l->location=bi-ibuffer; + else l->location=here; + l->token=token; +} + +void poplocation(blocation_t* l) { + if (st == SINT) bi=ibuffer+l->location; + else here=l->location; + token=l->token; +} + +/* little helpers of the io functions */ + +/* send a newline */ +void outcr() { +#ifdef HASSERIAL1 + if (sendcr) outch('\r'); +#endif + outch('\n'); +} + +/* send a space */ +void outspc() { + outch(' '); +} + +/* output a zero terminated string - c style */ +void outsc(const char *c){ while (*c != 0) outch(*c++); } + +/* output a zero terminated string in a formated box padding spaces + needed for catalog output */ +void outscf(const char *c, index_t f){ + int i = 0; + + while (*c != 0) { outch(*c++); i++; } + if (f > i) { + f=f-i; + while (f--) outspc(); + } +} + +/* + * reading a positive number from a char buffer + * maximum number of digits is adjusted to 16 + * ugly here, testcode when introducting + * number_t was only 16 bit before + */ +address_t parsenumber(char *c, number_t *r) { + address_t nd = 0; + + *r=0; + while (*c >= '0' && *c <= '9' && *c != 0) { + *r=*r*10+*c++-'0'; + nd++; + if (nd == SBUFSIZE) break; + } + return nd; +} + + +#ifdef HASFLOAT +/* a poor man's atof implementation with character count */ +address_t parsenumber2(char *c, number_t *r) { + address_t nd = 0; + index_t i; + number_t fraction = 0; + number_t exponent = 0; + mem_t nexp = 0; + + *r=0; + +/* integer part */ + i=parsenumber(c, r); + c+=i; + nd+=i; + +/* the fractional part */ + if (*c == '.') { + c++; + nd++; + + i=parsenumber(c, &fraction); + c+=i; + nd+=i; + + if (i > 0) { + while ((--i)>=0) fraction=fraction/10; + *r+=fraction; + } + } + +/* the exponent */ + if (*c == 'E' || *c == 'e') { + c++; + nd++; + if (*c == '-') {c++; nd++; nexp=1;}; + i=parsenumber(c, &exponent); + nd+=i; + while ((--exponent)>=0) if (nexp) *r=*r/10; else *r=*r*10; + } + + return nd; +} +#endif + +/* + * convert a number to a string + * the argument type controls the largest displayable integer + * default is int but it can be increased without any side effects + */ +address_t writenumber(char *c, wnumber_t v){ + address_t nd = 0; + index_t i,j; + mem_t s = 1; + char c1; + +/* the sign */ + if (v<0) s=-1; + +/* the digits */ + do { + c[nd++]=(v%10)*s+'0'; + v=v/10; + } while (v != 0); + +/* print the minus */ + if (s < 0 ) c[nd]='-'; else nd--; + +/* reverse the order of digits */ + i=0; + j=nd; + while (j>i) { + c1=c[i]; + c[i]=c[j]; + c[j]=c1; + i++; + j--; + } + + nd++; + c[nd]=0; + return nd; +} + +#ifdef HASFLOAT +/* + * this is for floats, handling output without library + * functions as well. + */ +address_t tinydtostrf(number_t v, index_t p, char* c) { + index_t i; + address_t nd = 0; + number_t f; + +/* if we are in forced integer mode */ + if (forceint) { + v=trunc(v); + return writenumber(c, (int)v); + } + +/* we do the sign here and don't rely on writenumbers sign handling, guess why */ + if (v<0) { + v=fabs(v); + c[nd++]='-'; + } + +/* write the integer part */ + nd+=writenumber(c+nd, (int)v); + c[nd++]='.'; + +/* only the fraction to precision p */ + f=fabs(v); + +/* get p digits of the fraction */ + for (i=p; i>0; i--) { + f=f-floor(f); + f=f*10; + c[nd++]=(int)floor(f)+'0'; + } + +/* and a terminating 0 */ + c[nd]=0; + return nd; +} + +address_t writenumber2(char *c, number_t vi) { + index_t i; + index_t nd; + number_t f; + index_t exponent = 0; + mem_t eflag=0; + const int p = 5; + +/* pseudo integers are displayed as integer + zero trapped here */ + f=floor(vi); + if (f == vi && fabs(vi) < maxnum) return writenumber(c, vi); + +/* earlier, floats where displayed in POSIx using the libraties + * return sprintf(c, "%g", vi); + * we dont do this any more + */ + +/* we check if we have anything to write */ + if (!isfinite(vi)) { + c[0]='*'; + c[1]=0; + return 1; + } + +/* normalize the number and see which exponent we have to deal with */ + f=vi; + while (fabs(f)<1.0) { f=f*10; exponent--; } + while (fabs(f)>=10.0-0.00001) { f=f/10; exponent++; } + +/* there are platforms where dtostrf is broken, we do things by hand in a simple way */ + + if (exponent > -2 && exponent < 7) { + tinydtostrf(vi, 5, c); + } else { + tinydtostrf(f, 5, c); + eflag=1; + } + +/* remove trailing zeros */ + for (i=0; (i < SBUFSIZE && c[i] !=0 ); i++); + i--; + +/* */ + while (c[i] == '0' && i>1) { i--; } + i++; + +/* add the exponent */ + if (eflag && exponent != 0) { + c[i++]='E'; + i+=writenumber(c+i, exponent); + } + + c[i]=0; + return i; + +} +#endif + +/* + * innumber is used as a helper only by xinput(). It reads a number from an input + * buffer and returns it in the number_t r. It returns 0 if the number is invalid, 1 if + * the number is valid, and -1 if the user has pressed the BREAKCHAR key. + * + * Unlike the old innumber() implementation it is meant to read comma separated numbers + * through input. Handling of the buffer is done by the calling function. + * + * The TINYBASICINPUT is an alternative implementation following the Palo Alto BASIC + * way of doing it. The expression parser is reused. This allows variables names and + * expressions to be used as input as well. + * Due to the reuse of sbuffer in the calling function, this will probably only work + * in RUN mode. + */ + +int innumber(number_t *r, char* buffer, address_t k) { + address_t i = k; + mem_t s = 1; + +#ifndef HASTINYBASICINPUT +/* result is zero*/ + *r=0; + +/* remove all leading whitespaces first */ + while ((buffer[i] == ' ' || buffer[i] == '\t') && i <= (address_t) buffer[0]) i++; + +/* is there anything left */ + if (i > (address_t) buffer[0]) return 0; + +/* now the sign */ + if (buffer[i] == '-') { s=-1; i++; } + +/* check for the break character */ + if (buffer[i] == BREAKCHAR) return -1; + +/* the number */ +#ifndef HASFLOAT + if (buffer[i] < '0' || buffer[i] > '9') return 0; + i+=parsenumber(&buffer[i], r); +#else + if ((buffer[i] < '0' || buffer[i] > '9') && buffer[i] != '.') return 0; + i+=parsenumber2(&buffer[i], r); +#endif + +/* the sign */ + *r*=s; + return i; +#else + char *b; + token_t t; + +/* result is zero */ + *r=0; + +/* save the interpreter state */ + b=bi; + s=st; + t=token; + +/* switch to fake interactive with the buffer as input */ + st=SINT; + bi=buffer+k; + +/* BREAK handling */ + if (*bi == BREAKCHAR) { + return -1; + } + +/* start to interpret the buffer as an expression */ + nexttoken(); + expression(); + +/* restore the interpreter state */ + i=bi-buffer-1; + bi=b; + st=s; + token=t; + +/* error handling, we trap the error and return zero */ + if (er) { + er=0; + return 0; + } + +/* the result is on the stack */ + *r=pop(); + return i; +#endif +} + +/* prints a number */ +void outnumber(number_t n){ + address_t nd, i; + +/* number write to sbuffer, remember the number of digits in nd */ +#ifndef HASFLOAT + nd=writenumber(sbuffer, n); +#else + nd=writenumber2(sbuffer, n); +#endif + +/* negative number format aligns right */ + if (form < 0) { i=nd; while(i < -form) {outspc(); i++;} } + +/* the number */ + outs(sbuffer, nd); + +/* number formats in Palo Alto style, positive numbers align left */ + if (form > 0) { while (nd < form) {outspc(); nd++;} } +} + +/* + * Layer 1 functions - providing data into the global variable and + * changing the interpreter state + */ + +/* + * Lexical analyser - tokenizes the input line. + * + * nexttoken() increments the input buffer index bi and delivers values in the global + * variable token, with arguments in the accumulators ax, x and the index register ir + * name is used in the routine. + * + * name, sr, ax and x change values in nexttoken and deliver the result to the calling + * function. + * + * bi and ibuffer should not be changed or used for any other function in + * interactive node as they contain the state of nexttoken(). In run mode + * bi and ibuffer are not used as the program is fully tokenized in mem. + * + * all this is pretty much stateless. + */ + +/* skip whitespaces */ +void whitespaces(){ + while (*bi == ' ' || *bi == '\t') bi++; +} + +/* upper case, don't trust the buildins on microcontrollers */ +char btoupper(char c) { + if (c >= 'a' && c <= 'z') return c-32; else return c; +} + +/* the token stream */ +void nexttoken() { + address_t k, l, i; + char* ir; + char quotechar; + +/* RUN mode vs. INT mode, in RUN mode we read from mem via gettoken() */ + if (st == SRUN || st == SERUN) { +/* in the token stream we call fastticker - all fast timing functions are in stream */ + fastticker(); +/* read the token from memory */ + gettoken(); +/* show what we are doing */ + if (debuglevel>1) { debugtoken(); outcr(); } + return; + } + +/* after change in buffer logic the first byte is reserved for the length */ + if (bi == ibuffer) bi++; + +/* literal mode only(!) EOL ends literal mode, used to have REM without quotes */ + if (lexliteral) { + token=*bi; + if (*bi != '\0') bi++; else lexliteral=0; + return; + } + +/* remove whitespaces outside strings */ + whitespaces(); + +/* end of line token */ + if (*bi == '\0') { + token=EOL; + if (DEBUG) debugtoken(); + return; + } + +/* unsigned numbers, value returned in x */ +#ifndef HASFLOAT + if (*bi <='9' && *bi >= '0') { + bi+=parsenumber(bi, &x); +#else + if ((*bi <='9' && *bi >= '0') || *bi == '.') { + bi+=parsenumber2(bi, &x); +#endif + token=NUMBER; + if (DEBUG) debugtoken(); + return; + } + +/* strings between " " or " EOL, value returned in ir and in sr for now */ + if (*bi == '"' || *bi == '\'') { + quotechar=*bi; + k=0; + bi++; + ir=bi; + sr.ir=bi; + while(*bi != quotechar && *bi !='\0') { + k++; + bi++; + } + bi++; + token=STRING; + sr.length=k; + sr.address=0; /* we don't find the string in BASIC memory, as we lex from bi */ + if (DEBUG) debugtoken(); + return; + } + +/* + * relations + * single character relations are their own token + * >=, =<, =<, =>, <> are tokenized + */ + if (*bi == '=') { + bi++; + whitespaces(); + if (*bi == '>') { + token=GREATEREQUAL; + bi++; + } else if (*bi == '<') { + token=LESSEREQUAL; + bi++; + } else { + token='='; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '>'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=GREATEREQUAL; + bi++; + } else { + token='>'; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '<'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=LESSEREQUAL; + bi++; + } else if (*bi == '>') { + token=NOTEQUAL; + bi++; + } else { + token='<'; + } + if (DEBUG) debugtoken(); + return; + } + +/* + * Keyworks and variables + * + * Isolate a word, bi points to the beginning, l is the length of the word. + * ir points to the end of the word after isolating. + * @ is a letter here to make the special @ arrays possible. + */ + + l=0; + ir=bi; + while (-1) { + if (*ir >= 'a' && *ir <= 'z') { + if (!lowercasenames) *ir-=32; /* toupper code, changing the input buffer directly */ + ir++; + l++; + } else if ((*ir >= '@' && *ir <= 'Z') || *ir == '_') { + ir++; + l++; + } else { + break; + } + } + + +/* + * Ir is reused here to implement string compares + * scanning the keyword array. + * Once a keyword is detected the input buffer is advanced + * by its length, and the token value is returned. + * + * Keywords are an array of null terminated strings. + * They are always matched uppercase. + */ + k=0; + while (gettokenvalue(k) != 0) { + ir=getkeyword(k); + i=0; + while (*(ir+i) != 0) { + if (*(ir+i) != btoupper(*(bi+i))) { + k++; + i=0; + break; + } else + i++; + } + if (i == 0) continue; + bi+=i; + token=gettokenvalue(k); + if (token == TREM) lexliteral=1; + if (DEBUG) debugtoken(); + return; + } + +/* + * A variable has length 2 with either two letters or a letter + * and a number. @ can be the first letter of a variable. + * Here, no tokens can appear any more as they have been processed + * further up. + * + * The longname code supports MAXNAME characters and _ as additional character. + */ +#ifdef HASLONGNAMES + if (l>0 && l<=MAXNAME) { + token=VARIABLE; + zeroname(&name); + while (((*bi >= '0' && *bi <= '9') || + (*bi >= '@' && *bi <= 'Z') || + (*bi >= 'a' && *bi <= 'z') || + (*bi == '_') ) && name.l < MAXNAME && *bi != 0) { + name.c[name.l]=*bi; + bi++; + name.l++; + } + if (*bi == '$') { + token=STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token=ARRAYVAR; + } +/* the new code filling the name variable directly, will be used in the entire code soon */ + name.token=token; + if (DEBUG) debugtoken(); + return; + } +#else + if (l == 1 || l == 2) { + token=VARIABLE; + name.l=0; + name.c[0]=*bi; + name.c[1]=0; + bi++; + if ((*bi >= '0' && *bi <= '9') || (*bi >= 'A' && *bi <= 'Z') || *bi == '_' ) { + name.c[1]=*bi; + bi++; + } + if (*bi == '$') { + token=STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token=ARRAYVAR; + } +/* the new code filling the name variable directly, will be used in the entire code soon */ + name.token=token; + if (DEBUG) debugtoken(); + return; + } +#endif + +/* other single characters are parsed and stored */ + token=*bi; + bi++; + if (DEBUG) debugtoken(); + return; +} + +/* + * Layer 1 - program editor + * + * Editing the program, the structure of a line is + * LINENUMBER linenumber(2 or more bytes) token(n bytes) + * + * store* stores something to memory + * get* retrieves information + * + * No matter how long number_t is in the C implementation + * we pack into bytes, this is clumsy but portable + * the store and get commands all operate on here + * and advance it + * + * storetoken() operates on the variable top. + * We always append at the end and then sort. + * + * gettoken() operate on the variable here + * which will also be the key variable in run mode. + * + * tokens are stored including their payload. + * + * This group of functions changes global states and + * cannot be called at program runtime with saving + * the relevant global variable to the stack. + */ + +/* + * check if we still have memory left, on RAM only systems we make + * sure that we don't hit himem. On systems with EEPROM program storage we make + * sure that we stay within the EEPROM range. + */ +char nomemory(number_t b){ +#ifndef EEPROMMEMINTERFACE + if (top >= himem-b) return 1; else return 0; +#else + if (top >= elength()-eheadersize-b) return 1; else return 0; +#endif +} + +/* store a token - check free memory before changing anything */ +void storetoken() { + int i; + + switch (token) { + case LINENUMBER: + if (nomemory(addrsize+1)) break; + memwrite2(top++, token); + setaddress(top, memwrite2, ax); + top+=addrsize; + return; + case NUMBER: + if (nomemory(numsize+1)) break; + memwrite2(top++, token); + setnumber(top, memwrite2, x); + top+=numsize; + return; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + if (nomemory(sizeof(name_t))) break; + memwrite2(top++, token); + top=setname_pgm(top, &name); + return; + case STRING: + i=sr.length; + if (nomemory(i+2)) break; + memwrite2(top++, token); + memwrite2(top++, i); + while (i > 0) { memwrite2(top++, *sr.ir++); i--; } + return; + default: + if (token >= -127) { /* the good old code with just one byte token */ + if (nomemory(1)) break; + memwrite2(top++, token); + } else { +#ifdef HASLONGTOKENS + if (nomemory(2)) break; /* this is the two byte token extension */ + memwrite2(top++, TEXT1); + memwrite2(top++, token+255); +#endif + } + return; + } +} + + +/* + * wrappers around mem access in genereal + * + * memread is used only in the token stream, it reads from a stream + * read only. If run is done from eeprom then bytes are taken from this + * stream, this would also be the place to implement direct run from + * another device like a file system or embedded programs on flash. + * Only the token stream uses memread. + * + * memread2 and memwrite2 always go to ram. They are read/write. Variables and + * the program editor uses these functions. + * + * currently only the SPIRAM and the EEPROM direct edit interface is implemented. + * This is handled in the runtime library. + * + * USEMEMINTERFACE is the macro to control this. + * + * The POSIX code has a test interface for SPIRAM as a dummy. + * + */ +#ifndef USEMEMINTERFACE +mem_t memread(address_t a) { + if (st != SERUN) { + return mem[a]; + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return mem[a]; } + +void memwrite2(address_t a, mem_t c) { mem[a]=c; } +#else +#if defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR) +mem_t memread(address_t a) { + if (st != SERUN) { + return spiram_robufferread(a); + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return spiram_rwbufferread(a); } + +void memwrite2(address_t a, mem_t c) { spiram_rwbufferwrite(a, c); } +#else +#ifdef EEPROMMEMINTERFACE +mem_t memread(address_t a) { + if (a < elength()-eheadersize) return eread(a+eheadersize); else return mem[a-(elength()-eheadersize)]; +} + +mem_t memread2(address_t a) { return memread(a); } + +void memwrite2(address_t a, mem_t c) { + if (a < elength()-eheadersize) eupdate(a+eheadersize, c); else mem[a-(elength()-eheadersize)]=c; +} +#endif +#endif +#endif + + +/* get a token from memory */ +void gettoken() { + stringlength_t i; + +/* if we have reached the end of the program, EOL is always returned + we don't rely on mem having a trailing EOL */ + if (here >= top) { + token=EOL; + return; + } + +/* if we have no data type we are done reading just one byte */ + token=memread(here++); + name.token=token; + +/* if there are multibyte tokens, get the next byte and construct a token value <-127 */ +#ifdef HASLONGTOKENS + if (token == TEXT1) { + token=memread(here++)-255; + } +#endif + + /* otherwise we check for the argument */ + switch (token) { + case LINENUMBER: + ax=getaddress(here, memread); + here+=addrsize; + break; + case NUMBER: + x=getnumber(here, memread); + here+=numsize; + break; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + here=getname(here, &name, memread); + name.token=token; + break; + case STRING: + sr.length=(unsigned char)memread(here++); + +/* + * if we run from EEPROM, the input buffer is used to get string constants. + * if we run on a system with real memory, we produce a mem pointer + * otherwise the caller has to handle strings through the address (SPIRAM systems) + */ + if (st == SERUN) { + for(i=0; i= top) { + here=top; + ax=0; + return; + } + } +} + +/* + * the line cache mechanism, useful for large codes. + * addlinecache does not test if the line already exist because it + * assumes that findline calls it only if a new line is to be stored + * the LINECACHE size depends on the architecture. + */ +#if defined(LINECACHESIZE) && LINECACHESIZE>0 +const unsigned char linecachedepth = LINECACHESIZE; +typedef struct {address_t l; address_t h;} linecacheentry; +linecacheentry linecache[LINECACHESIZE]; +unsigned char linecachehere = 0; + +void clrlinecache() { + unsigned char i; + + for(i=0; i= h) break; + gettoken(); + } + here=here2; + if (token == LINENUMBER) + return l1; + else + return l; +} + +/* + * Move a block of storage beginng at b ending at e + * to destination d. No error handling here!! + */ +void moveblock(address_t b, address_t l, address_t d) { + address_t i; + + if (d+l > himem) { + error(EOUTOFMEMORY); + return; + } + if (l<1) return; + + if (b < d) for (i=l; i>0; i--) memwrite2(d+i-1, memread2(b+i-1)); + else for (i=0; i himem) { error(EOUTOFMEMORY); return; } + if (l<1) return; + + for (i=0; i y) break; + } + +/* + * at this point y contains the number of the line to be inserted + * x contains the number of the first line with a higher line number + * or 0 if the line is to be inserted at the end + * here points to the following line and here2 points to the previous line + */ + if (ax == 0) { + here=here3-lnlength; + gettoken(); + if (token == LINENUMBER && ax == y) { // we have a double line at the end + here2-=lnlength; + here-=lnlength; + moveblock(here2, linelength, here); + top=here+linelength; + } + return; + } + here-=lnlength; + t1=here; + here=here2-lnlength; + t2=here; + gettoken(); + if (ax == y) { /* the line already exists and has to be replaced */ + here2=t2; /* this is the line we are dealing with */ + here=t1; /* this is the next line */ + y=here-here2; /* the length of the line as it is */ + if (linelength == y) { /* no change in line length */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else if (linelength > y) { /* the new line is longer than the old one */ + moveblock(here, top-here, here+linelength-y); + here=here+linelength-y; + top=top+linelength-y; + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else { /* the new line is short than the old one */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + moveblock(here, top-here, here2+linelength); + top=top-y+linelength; + } + } else { /* the line has to be inserted in between */ + here=t1; + moveblock(here, top-here, here+linelength); + moveblock(top, linelength, here); + } + } +} + +/* + * Layer 1 - the code in this section calculates an expression + * with a recursive descent algorithm + * + * all function use the stack to pass values back. We use the + * Backus-Naur form of basic from here https://rosettacode.org/wiki/BNF_Grammar + * implementing a C style logical expression model + */ + +/* the terminal symbol it ends a statement list - ELSE is one too as it ends a statement list */ +char termsymbol() { + return (token == LINENUMBER || token == ':' || token == EOL || token == TELSE); +} + +/* a little helpers - one token expect */ +char expect(token_t t, mem_t e) { + nexttoken(); + if (token != t) {error(e); return 0; } else return 1; +} + +/* a little helpers - expression expect */ +char expectexpr() { + nexttoken(); + expression(); + if (er != 0) return 0; else return 1; +} + +/* parses a list of expression, this may be recursive! */ +void parsearguments() { + short argsl; + +/* begin counting */ + argsl=0; + +/* having 0 args at the end of a command is legal */ + if (!termsymbol()) { + +/* list of expressions separated by commas */ + do { + expression(); + if (er != 0) break; + argsl++; + if (token == ',') nexttoken(); else break; + } while (1); + } + +/* because of the recursion ... */ + args=argsl; +} + + +/* expect exactly n arguments */ +void parsenarguments(char n) { + parsearguments(); + if (args != n) error(EARGS); +} + +/* counts and parses the number of arguments given in brakets, this function + should not advance to the next token because it is called in factor */ +void parsesubscripts() { + blocation_t l; + + args=0; + + if (DEBUG) { + outsc("** in parsesubscripts "); outcr(); + bdebug("token "); + } + +/* remember where we where */ + pushlocation(&l); + +/* parsesubscripts is called directly after the object in question, it does + nexttoken() itself now */ + nexttoken(); + +/* if we have no bracket here, we return with zero */ + if (token != '(') { + poplocation(&l); + return; + } + nexttoken(); + +/* if () we return also with -1 */ +#ifdef HASMULTIDIM + if (token == ')') { + args=-1; + return; + } +#endif + +/* now we are ready to parse a set of arguments */ + parsearguments(); + if (!USELONGJUMP && er) return; + + if (token != ')') { error(EARGS); return; } /* we return with ) as a last token on success */ + +/* we end with the ) still as active token */ +} + +/* parse a function argument ae is the number of + expected expressions in the argument list, parsesubscripts + should not avance precisely because it is used in factor */ + +void parsefunction(void (*f)(), short ae){ + parsesubscripts(); + if (!USELONGJUMP && er) return; + if (args == ae) f(); else error(EARGS); +} + +/* helper function in the recursive decent parser */ +void parseoperator(void (*f)()) { + mem_t u=1; + + nexttoken(); +/* unary minuses in front of an operator are consumed once! */ + if (token == '-') { + u=-1; + nexttoken(); + } +/* the operator */ + f(); + if (er !=0 ) return; + y=pop(); + if (u == -1) y=-y; + x=pop(); +} + +/* + * ABS absolute value + */ +void xabs(){ + number_t x; + + if ((x=pop())<0) { x=-x; } + push(x); +} + +/* + * SGN evaluates the sign + */ +void xsgn(){ + number_t x; + + x=pop(); + if (x>0) x=1; + if (x<0) x=-1; + push(x); +} + +/* + * PEEK on an arduino, negative values of peek address + * the EEPROM range -1 .. -1024 on an UNO + */ +void xpeek(){ + number_t a; + +/* get the argument from the stack because this is a function only */ + a=pop(); + +/* the memory and EEPROM range */ + if (a >= 0 && a<=memsize) + push(memread2(a)); + else if (a < 0 && -a <= elength()) + push(eread(-a-1)); + else { + error(EORANGE); + return; + } +} + +/* + * MAP Arduino map function, we always cast to long, this + * makes it potable for various integer sizes and the float. + */ +void xmap() { + long v, in_min, in_max, out_min, out_max; + + out_max=pop(); + out_min=pop(); + in_max=pop(); + in_min=pop(); + v=pop(); + push((v - in_min) * (out_max - out_min) / (in_max - in_min) + out_min); +} + +/* + * RND very basic random number generator with constant seed in 16 bit + * for float systems, use glibc parameters https://en.wikipedia.org/wiki/Linear_congruential_generator + */ + +void xrnd() { + number_t r; + mem_t base = randombase; + +/* the argument of the RND() function */ + r=pop(); + +/* this is the microsoft mode, argument <0 resets the sequence, 0 always the same number, > 1 a number between 0 and 1 */ + if (randombase < 0) { + base=0; + if (r < 0) { + rd=-r; + r=1; + } else if (r == 0) { + r=1; + goto pushresult; + } else { + r=1; + } + } + +/* this is the congruence */ +#ifndef HASFLOAT +/* the original 16 bit congruence, the & is needed to make it work for all kinds of ints */ + rd = (31421*rd + 6927) & 0xffff; +#else +/* glibc parameters */ + rd = (110351245*rd + 12345) & 0x7fffffff; +#endif + +pushresult: + +/* the result is calculated with the right modulus */ +#ifndef HASFLOAT + if (r>=0) + push((unsigned long)rd*r/0x10000+base); + else + push((unsigned long)rd*r/0x10000+1-base); +#else + if (r>=0) + push(rd*r/0x80000000+base); + else + push(rd*r/0x80000000+1-base); +#endif +} + + +#ifndef HASFLOAT +/* + * SQR - a very simple approximate square root formula + * for integers, for floats we use the library + */ +void sqr(){ + number_t t,r; + number_t l=0; + + r=pop(); + t=r; + while (t > 0) { + t>>=1; + l++; + } + l=l/2; + t=1; + t<<=l; + do { + l=t; + t=(t+r/t)/2; + } while (abs(t-l)>1); + push(t); +} +#else +void sqr(){ + push(sqrt(pop())); +} +#endif + +/* + * POW(X, N) evaluates powers + */ + +/* this function is called by POW(a, c) in BASIC */ +void xpow(){ + number_t n; + number_t a; + + n=pop(); + a=pop(); + push(bpow(a, n)); +} + +/* while this is needed by ^*/ +number_t bpow(number_t x, number_t y) { +#ifdef HASFLOAT + return pow(x, y); +#else + number_t r; + address_t i; + + r=1; + if (y>=0) for(i=0; iname=name; + lhs->i=1; /* we start at 1 */ + lhs->j=arraylimit; /* we assume a string array of length 1, all simple strings are like this */ + lhs->i2=0; /* we want the full string length */ + lhs->ps=1; /* we deal with a pure string */ + +/* the array index default, can vary */ + /* array_index=arraylimit; this is i2 */ + +/* remember the location */ + pushlocation(&l); + +/* and inspect the (first) brackets */ + parsesubscripts(); + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in parsestringvar "); outnumber(args); outsc(" arguments \n"); } + +/* do we deal with a pure unindexed string or something more complicated */ + if (args == 0) { +/* pure string, we rewind and are done here */ + poplocation(&l); + } else if (!substringmode) { +/* we have no substring interpretation hence the brackets can only be one array index */ + if (args == 1) lhs->j=pop(); else { error(EORANGE); return; } + } else { +/* not a pure string */ + lhs->ps=0; +/* we are in the substring world here */ + if (args == 2) { lhs->i2=popaddress(); args--; } /* A$(i,j) */ + if (!USELONGJUMP && er) return; + if (args == 1) { lhs->i=popaddress(); } /* A$(i) */ + if (!USELONGJUMP && er) return; + if (args == -1) {} /* A$(), ignore */ +/* here we have parsed a full substring and remember where we are and look forward*/ + pushlocation(&l); + nexttoken(); + if (token == '(') { +/* a second pair of braces is coming, we parse an array index */ + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + if (token != ')') { error(EUNKNOWN); return; } + lhs->j=popaddress(); + if (!USELONGJUMP && er) return; + } else + poplocation(&l); + } + +/* in pure parse mode we end here. This is used for the lefthandside code */ + if (!strp) return; + +/* try to get the string */ + getstring(strp, &lhs->name, lhs->i, lhs->j); + if (!USELONGJUMP && er) return; + +/* look what we do with the upper index */ + if (!lhs->i2) lhs->i2=strp->length; + + if (DEBUG) { + outsc("** in parsestringvar lower is "); outnumber(lhs->i); outcr(); + outsc("** in parsestringvar upper is "); outnumber(lhs->i2); outcr(); + outsc("** in parsestringvar array_index is "); outnumber(lhs->j); outcr(); + } + +/* find the length */ + if (lhs->i2-lhs->i+1 > 0) strp->length=lhs->i2-lhs->i+1; else strp->length=0; + +/* done */ + if (DEBUG) { + outsc("** in parsestringvar, length "); + outnumber(strp->length); + outsc(" from "); outnumber(lhs->i); outspc(); outnumber(lhs->i2); + outcr(); + } + +/* restore the name */ + name=lhs->name; +#else + return; +#endif +} + + +/* + * stringvalue(string_t*) evaluates a string value, return 0 if there is no string, + * 1 if there is a string. The pointer contains all the data needed to process the string. + * + */ + +char stringvalue(string_t* strp) { + address_t k, l; + address_t i; + token_t t; + mem_t args=1; + + lhsobject_t lhs; + + if (DEBUG) outsc("** entering stringvalue \n"); + +/* make sure everything is nice and clean */ + strp->address=0; + strp->arraydim=0; + strp->length=0; + strp->strdim=0; + strp->ir=0; + + switch(token) { + case STRING: +/* sr has the string information from gettoken and nexttoken*/ + strp->ir=sr.ir; + strp->length=sr.length; + strp->address=sr.address; + break; +#ifdef HASAPPLE1 + case STRINGVAR: + parsestringvar(strp, &lhs); + break; + case TSTR: + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; +#ifdef HASFLOAT + strp->length=writenumber2(sbuffer, pop()); +#else + strp->length=writenumber(sbuffer, pop()); +#endif + strp->ir=sbuffer; + if (er != 0) return 0; + if (token != ')') {error(EARGS); return 0; } + break; +#ifdef HASMSSTRINGS + case TCHR: + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; + *sbuffer=pop(); + strp->ir=sbuffer; + strp->length=1; + if (token != ')') {error(EARGS); return 0; } + break; + case TRIGHT: + case TMID: + case TLEFT: + t=token; + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { error(EARGS); return 0; } + nexttoken(); + if (token != STRINGVAR) { error(EARGS); return 0; } + parsestringvar(strp, &lhs); + if (er != 0) return 0; + k=strp->length; /* the length of the original string variable */ + nexttoken(); + if (token != ',') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; +/* all the rest depends on the function */ + switch (t) { + case TRIGHT: + l=popaddress(); + if (k < l) l=k; + if (strp->address) strp->address=strp->address+(k-l); + if (strp->ir) strp->ir=strp->ir+(k-l); + break; + case TLEFT: + l=popaddress(); + if (k < l) l=k; + break; + case TMID: + if (token == ',') { + nexttoken(); + expression(); + if (er != 0) return 0; + args++; + } + if (args == 1) { + i=popaddress(); + l=0; + if (i <= k) l=k-i+1; + } else { + l=popaddress(); + if (er != 0) return 0; + i=popaddress(); + } + if (k < i+l) l=k-i+1; + if (l < 0) l=0; + if (strp->address != 0) strp->address=strp->address+i-1; + if (strp->ir) strp->ir=strp->ir+i-1;; + break; + } + strp->length=l; + + if (token != ')') {error(EARGS); return 0; } + break; +#endif +#endif + default: + return 0; + } + return 1; +} + + +/* + * (numerical) evaluation of a string expression, used for + * comparison and for string rightvalues as numbers + * the token rewind here is needed as streval is called in + * factor - no factor function should nexttoken + */ + +void streval(){ + token_t t; + address_t k; + string_t s1, s2; + char* ir; + address_t a; + blocation_t l; + +/* is the right side of the expression a string */ + if (!stringvalue(&s1)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in streval first string"); outcr(); } + +/* get ready for rewind to this location */ + pushlocation(&l); + t=token; + +/* is the next token a operator, hence we need to compare two strings? */ + nexttoken(); + if (token != '=' && token != NOTEQUAL) { + +/* if not, rewind one token and evaluate the string as a boolean */ + poplocation(&l); + token=t; + +/* a zero length string evaluates to zero else to the first character */ + if (s1.length == 0) push(0); else { + if (s1.ir) push(s1.ir[0]); + else if (s1.address) push(memread2(s1.address)); + else error(EGENERAL); + } + + return; + } + +/* remember which operator we use */ + t=token; + +/* questionable !! */ + nexttoken(); + + if (DEBUG) { + outsc("** in streval second string"); outcr(); + debugtoken(); outcr(); + } + +/* get the second string */ + if (!stringvalue(&s2)){ error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in streval result: "); outnumber(x); outcr(); } + +/* different length means unequal */ + if (s2.length != s1.length) goto neq; + +/* and a different character somewhere is also unequal */ +#ifdef USEMEMINTERFACE + if (s1.ir && s2.ir) + for (k=0; k < s1.length; k++) { if (s1.ir[k] != s2.ir[k]) goto neq; } + else if (s1.address && s2.address) + for (k=0; k < s1.length; k++) { if (memread2(s1.address+k) != memread2(s2.address+k)) goto neq; } + else { + if (s1.address) { a=s1.address; ir=s2.ir; } else { a=s2.address; ir=s1.ir; } + for (k=0; k < s1.length; k++) { if (memread2(a+k) != ir[k] ) goto neq; } + } +#else + for (k=0; k < s1.length; k++) if (s1.ir[k] != s2.ir[k]) goto neq; +#endif + +/* which operator did we use */ + if (t == '=') push(booleanmode); else push(0); + return; +neq: + if (t == '=') push(0); else push(booleanmode); + return; +} + + +#ifdef HASFLOAT +/* + * floating point arithmetic + * SIN, COS, TAN, ATAN, LOG, EXP, INT + * INT is always there and is nop in integer BASICs + * no handling of floating point errors yet. + */ +void xsin() { push(sin(pop())); } +void xcos() { push(cos(pop())); } +void xtan() { push(tan(pop())); } +void xatan() { push(atan(pop())); } +void xlog() { push(log(pop())); } +void xexp() { push(exp(pop())); } +void xint() { push(floor(pop())); } +#else +void xint() {} +#endif + +/* + * Recursive expression parser functions + * + * factor(); term(); addexpression(); compexpression(); + * notexpression(); andexpression(); expression() + * + * doing + * + * functions, numbers; *, /, %; +, -; =, <>, =>, <=; + * NOT; AND; OR + * + */ + +/* + * factor() - contrary to all other function + * nothing here should end with a new token - this is handled + * in factors calling function + * + * evaluates constants, variables and all functions + */ + +/* helpers of factor - array access */ +void factorarray() { + lhsobject_t object; + number_t v; + +/* remember the variable, because parsesubscript changes this */ + object.name=name; + +/* parse the arguments */ + parsesubscripts(); + if (er != 0 ) return; + + switch(args) { + case 1: + object.i=popaddress(); + if (!USELONGJUMP && er) return; + object.j=arraylimit; + break; +#ifdef HASMULTIDIM + case 2: + object.j=popaddress(); + object.i=popaddress(); + if (!USELONGJUMP && er) return; + break; +#endif + default: + error(EARGS); + return; + } + array(&object, 'g', &v); + push(v); +} + +/* helpers of factor - string length */ +void factorlen() { +#ifdef HASAPPLE1 + address_t a; + string_t s; + name_t n; + lhsobject_t lhs; + + nexttoken(); + if ( token != '(') { error(EARGS); return; } + + nexttoken(); + switch(token) { + case STRING: + push(sr.length); + nexttoken(); + break; + case STRINGVAR: + parsestringvar(&s, &lhs); + push(s.length); + nexttoken(); + break; +#ifdef HASMSSTRINGS + case TRIGHT: + case TLEFT: + case TMID: + case TCHR: +#endif + case TSTR: + error(EARGS); + return; + default: + expression(); + if (!USELONGJUMP && er) return; + n.token=TBUFFER; + a=pop(); + n.c[0]=a%256; + n.c[1]=a/256; + push(blength(&n)); + } + + if (!USELONGJUMP && er) return; + + if (token != ')') { error(EARGS); return; } +#else + push(0); +#endif +} + +/* helpers of factor - the VAL command */ +void factorval() { + index_t y; + number_t x; + string_t s; + address_t a; + char *ir; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue(&s)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + +/* the length of the strings consumed */ + vlength=0; + +/* get the string if it is in serial memory */ +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + +/* generate a 0 terminated string for use with parsenumber */ + stringtobuffer(sbuffer, &s); + ir=sbuffer; + +/* remove whitespaces */ + while(*ir==' ' || *ir=='\t') { ir++; vlength++; } + +/* find a sign */ + if(*ir=='-') { y=-1; ir++; vlength++; } else y=1; + + x=0; +#ifdef HASFLOAT + if ((a=parsenumber2(ir, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#else + if ((a=parsenumber(ir, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#endif + push(x*y); + + nexttoken(); + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the INSTR command */ +#ifndef HASFULLINSTR +/* this is instring in a single character version, usefull to split strings */ +void factorinstr() { + char ch; + address_t a; + string_t s; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue(&s)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + nexttoken(); + + if (token != ',') { error(EARGS); return; } + + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + ch=pop(); + if (s.address) { + for (a=1; a<=s.length; a++) {if (memread2(s.address+a-1) == ch) break; } + } else { + for (a=1; a<=s.length; a++) {if (s.ir[a-1] == ch) break; } + } + if (a > s.length) a=0; + push(a); + //nexttoken(); + if (token != ')') { error(EARGS); return; } +} +#else +/* the full instr command which can compare two strings */ +void factorinstr() { + char ch; + address_t a=1; + address_t i=1; + string_t search; + string_t s; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + nexttoken(); + +/* the search string */ + if(!stringvalue(&s)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + nexttoken(); + + if (token != ',') { error(EARGS); return; } + nexttoken(); + +/* the string to be searched */ + if (!stringvalue(&search)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + nexttoken(); + +/* potentially the start value */ + if (token == ',') { + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + a=popaddress(); + if (!USELONGJUMP && er) return; + } + + if (token != ')') { + error(EUNKNOWN); + return; + } + +/* health check */ + if (search.length == 0 || search.length+a > s.length || a == 0) { + push(0); + return; + } + +/* go through the search string */ + while(i<=search.length) { + +/* get one character from the string */ + if (search.address) { + ch=memread2(search.address+i-1); + } else { + ch=search.ir[i-1]; + } + +/* search the character */ + if (s.address) { + for (; a<=s.length; a++) {if (memread2(s.address+a-1) == ch) break; } + } else { + for (; a<=s.length; a++) {if ( s.ir[a-1] == ch ) break; } + } + +/* we haven't found the character until the end of the string */ + if (a > s.length) { + a=0; + break; + } + +/* next character */ + i+=1; + + } + +/* how did the search go? a rewind because we were at the end of the search part already */ + if (i <= search.length) { + a=0; + } else { + a=a-search.length+1; + } + + + push(a); +} +#endif + +/* helpers of factor - the NETSTAT command */ +void factornetstat() { + address_t x=0; + + if (netconnected()) x=1; + if (mqttstate() == 0) x+=2; + push(x); +} + +/* helpers of factor - the ASC command, really not needed but for completeness */ +void factorasc() { +#ifdef HASAPPLE1 + string_t s; + lhsobject_t lhs; + + nexttoken(); + if ( token != '(') { error(EARGS); return; } + + nexttoken(); + switch(token) { + case STRING: + if (sr.ir) push(sr.ir[0]); else push(memread2(sr.address)); + nexttoken(); + break; + case STRINGVAR: + parsestringvar(&s, &lhs); + if (s.length > 0) { + if (s.ir) push(s.ir[0]); else push(memread2(s.address)); + } else + push(0); + nexttoken(); + break; + default: + error(EARGS); + return; + } + + if (!USELONGJUMP && er) return; + + if (token != ')') { error(EARGS); return; } +#else + push(0); +#endif +} + +void factor(){ + if (DEBUG) bdebug("factor\n"); + switch (token) { + case NUMBER: + push(x); + break; + case VARIABLE: + push(getvar(&name)); + break; + case ARRAYVAR: + factorarray(); + break; + case '(': + nexttoken(); + expression(); + if (er != 0 ) return; + if (token != ')') { error(EARGS); return; } + break; +/* Palo Alto BASIC functions */ + case TABS: + parsefunction(xabs, 1); + break; + case TRND: + parsefunction(xrnd, 1); + break; + case TSIZE: + push(himem-top); + break; +/* Apple 1 BASIC functions */ +#ifdef HASAPPLE1 + case TSGN: + parsefunction(xsgn, 1); + break; + case TPEEK: + parsefunction(xpeek, 1); + break; + case TLEN: + factorlen(); + break; +#ifdef HASIOT + case TAVAIL: + parsefunction(xavail, 1); + break; + case TOPEN: + parsefunction(xfopen, 1); + break; + case TSENSOR: + parsefunction(xfsensor, 2); + break; + case TVAL: + factorval(); + break; + case TINSTR: + factorinstr(); + break; + case TWIRE: + parsefunction(xfwire, 1); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + push(erh); + break; +#endif + case THIMEM: + push(himem); + break; +/* Apple 1 string compare code */ + case STRING: + case STRINGVAR: +#ifdef HASIOT + case TSTR: +#endif +#ifdef HASMSSTRINGS + case TLEFT: + case TRIGHT: + case TMID: + case TCHR: +#endif + streval(); + if (er != 0 ) return; + break; +#endif +/* Stefan's tinybasic additions */ +#ifdef HASSTEFANSEXT + case TSQR: + parsefunction(sqr, 1); + break; + case TMAP: + parsefunction(xmap, 5); + break; + case TUSR: + parsefunction(xusr, 2); + break; + case TPOW: + parsefunction(xpow, 2); + break; +#endif +/* Arduino I/O */ +#ifdef HASARDUINOIO + case TAREAD: + parsefunction(xaread, 1); + break; + case TDREAD: + parsefunction(xdread, 1); + break; + case TMILLIS: + parsefunction(bmillis, 1); + break; +#ifdef HASPULSE + case TPULSE: + parsefunction(bpulsein, 3); + break; +#endif + case TAZERO: +#if defined(ARDUINO) && defined(A0) + push(A0); +#else + push(0); +#endif + break; + case TLED: +#ifdef LED_BUILTIN + push(LED_BUILTIN); +#else + push(0); +#endif + break; +#endif +/* mathematical functions in case we have float */ +#ifdef HASFLOAT + case TSIN: + parsefunction(xsin, 1); + break; + case TCOS: + parsefunction(xcos, 1); + break; + case TTAN: + parsefunction(xtan, 1); + break; + case TATAN: + parsefunction(xatan, 1); + break; + case TLOG: + parsefunction(xlog, 1); + break; + case TEXP: + parsefunction(xexp, 1); + break; +#endif +/* int is always present to make programs compatible */ + case TINT: + parsefunction(xint, 1); + break; +#ifdef HASDARTMOUTH + case TFN: + xfn(0); + break; +/* an arcane feature, DATA evaluates to the data record number */ + case TDATA: + push(datarc); + break; +#endif +#ifdef HASDARKARTS + case TMALLOC: + parsefunction(xmalloc, 2); + break; + case TFIND: + xfind(); + break; +#endif +#ifdef HASIOT + case TNETSTAT: + factornetstat(); + break; +#endif +#ifdef HASMSSTRINGS + case TASC: + factorasc(); + break; +#endif +/* unknown function */ + default: + error(EUNKNOWN); + return; + } +} + +/* this is how the power operator ^ is handled */ +#ifdef POWERRIGHTTOLEFT +/* the recursive version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (!USELONGJUMP && er) return; + + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + parseoperator(power); + if (!USELONGJUMP && er) return; + push(bpow(x,y)); + } + if (DEBUG) bdebug("leaving power\n"); +} +#else +/* the left associative version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (!USELONGJUMP && er) return; + +nextpower: + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + parseoperator(factor); + push(bpow(x,y)); + goto nextpower; + } + if (DEBUG) bdebug("leaving power\n"); +} +#endif + +/* + * term() evaluates multiplication, division and mod + */ +void term(){ + if (DEBUG) bdebug("term\n"); + power(); + if (!USELONGJUMP && er) return; + +nextfactor: + if (DEBUG) bdebug("in term\n"); + if (token == '*'){ + parseoperator(power); + if (!USELONGJUMP && er) return; + push(x*y); + goto nextfactor; + } else if (token == '/'){ + parseoperator(power); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x/y); +#else + if (forceint) push((int)x/(int)y); else push(x/y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == '%') { + parseoperator(power); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x%y); +#else + push((int)x%(int)y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } + if (DEBUG) bdebug("leaving term\n"); +} + +/* add and subtract */ +void addexpression(){ + if (DEBUG) bdebug("addexp\n"); + if (token != '+' && token != '-') { + term(); + if (!USELONGJUMP && er) return; + } else { + push(0); + } + +nextterm: + if (token == '+' ) { + parseoperator(term); + if (!USELONGJUMP && er) return; + push(x+y); + goto nextterm; + } else if (token == '-'){ + parseoperator(term); + if (!USELONGJUMP && er) return; + push(x-y); + goto nextterm; + } +} + +/* comparisions */ +void compexpression() { + if (DEBUG) bdebug("compexp\n"); + addexpression(); + if (!USELONGJUMP && er) return; + switch (token){ + case '=': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; +#ifndef HASFLOAT + push(x == y ? booleanmode : 0); +#else + if (fabs(x-y) <= epsilon) push(booleanmode); else push(0); +#endif + break; + case NOTEQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; +#ifndef HASFLOAT + push(x != y ? booleanmode : 0); +#else + if (fabs(x-y) > epsilon) push(booleanmode); else push(0); +#endif + break; + case '>': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x > y ? booleanmode : 0); + break; + case '<': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x < y ? booleanmode : 0); + break; + case LESSEREQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x <= y ? booleanmode : 0); + break; + case GREATEREQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x >= y ? booleanmode : 0); + break; + } +} + +#ifdef HASAPPLE1 +/* boolean NOT */ +void notexpression() { + if (DEBUG) bdebug("notexp\n"); + if (token == TNOT) { + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + if (booleanmode == -1) push(~(short)pop()); + else if (pop() == 0) push(1); else push(0); + } else + compexpression(); +} + +/* boolean AND and at the same time bitwise */ +void andexpression() { + if (DEBUG) bdebug("andexp\n"); + notexpression(); + if (!USELONGJUMP && er) return; + if (token == TAND) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x & (short)y); + } +} + +/* expression function and boolean OR at the same time bitwise !*/ +void expression(){ + if (DEBUG) bdebug("exp\n"); + andexpression(); + if (!USELONGJUMP && er) return; + if (token == TOR) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x | (short)y); + } +} +#else + +/* expression function simplified */ +void expression(){ + if (DEBUG) bdebug("exp\n"); + compexpression(); + if (!USELONGJUMP && er) return; + if (token == TOR) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x | (short)y); + } +} +#endif + +/* + * Layer 2 - The commands and their helpers + * + * Palo Alto BASIC languge set - PRINT, LET, INPUT, GOTO, GOSUB, RETURN, + * IF, FOR, TO, NEXT, STEP, BREAK, STOP, END, LIST, NEW, RUN, REM + * BREAK is not Palo ALto but fits here, eEND is identical to STOP. + */ + +/* + * PRINT command, extended by many features like file, wire, mqtt and radio i/o. + * TAB added as part of the PRINT statement with C64 compatibility. + */ +void xprint(){ + char semicolon = 0; + char oldod; + char modifier = 0; + string_t s; + stringlength_t i; + + form=0; + oldod=od; + nexttoken(); + +processsymbol: +/* at the end of a print statement, do we need a newline, restore the defaults */ + if (termsymbol()) { + if (!semicolon) outcr(); + od=oldod; + form=0; + return; + } + semicolon=0; + +/* output a string if we found it */ + if (stringvalue(&s)) { + if (!USELONGJUMP && er) return; + +/* buffer must be used here for machine code to work */ +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(s.ir, s.length); + + nexttoken(); + goto separators; + } + +/* the tab command as part of print */ +#ifdef HASMSSTRINGS + if (token == TTAB || token == TSPC) { + xtab(); + goto separators; + } +#endif + +/* modifiers of the print statement */ + if (token == '#' || token == '&') { + modifier=token; + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + switch(modifier) { + case '#': + form=pop(); + break; + case '&': + od=pop(); + break; + } + goto separators; + } + + if (token != ',' && token != ';') { + expression(); + if (!USELONGJUMP && er) return; + outnumber(pop()); + } + +/* commas and semicolons, all other symbols are accepted and no error is thrown */ +separators: + if (termsymbol()) goto processsymbol; + + switch (token) { + case ',': + if (!modifier) outspc(); + case ';': + semicolon=1; + nexttoken(); + break; + } + modifier=0; + + goto processsymbol; +} + +/* + * LET assigment code for various lefthand and righthand side. + * + * + * lefthandside is a helper function for reuse in other + * commands. It determines the address the value is to be + * assigned to and whether the assignment target is a + * "pure" i.e. subscriptless string expression + * + * assignnumber assigns a number to a given lefthandside + * + * In lefthandside the type of the object is determined and + * possible subscripts are parsed. + * + * Variables have no subscripts. The arguments are unchanged. + * Arrays may have two subscript which will go to i, j + * Strings may have a string subscript, going to i and an array subscript + * going to j + * String arrays use i2 as the array index. + * Note that the role of the variables differs for string array and normal + * arrays. + * Strings without a subscript i.e. pure strings, set the ps flag + * + */ + +/* the new lefthandsite code */ +void lefthandside(lhsobject_t* lhs) { + +/* just to provide it for parsestringvar to reuse the righthandside code */ + address_t temp; + + if (DEBUG) { + outsc("assigning to variable "); + outname(&lhs->name); outspc(); + outsc(" type "); outnumber(lhs->name.token); + outcr(); + } + +/* prep it */ + lhs->i=1; + lhs->i2=0; + lhs->j=arraylimit; + lhs->ps=1; + +/* look at the variables and continue parsing */ + switch (lhs->name.token) { + case VARIABLE: + nexttoken(); + break; + case ARRAYVAR: + parsesubscripts(); + if (!USELONGJUMP && er) return; + switch(args) { + case 1: + lhs->i=popaddress(); + if (!USELONGJUMP && er) return; + lhs->j=arraylimit; + break; + case 2: + lhs->j=popaddress(); + if (!USELONGJUMP && er) return; + lhs->i=popaddress(); + if (!USELONGJUMP && er) return; + break; + default: + error(EARGS); + return; + } + nexttoken(); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + parsestringvar(0, lhs); + nexttoken(); + break; +#else /* HASAPPLE1 */ +/* here we could implement a string thing for a true Tinybasic */ +#endif + default: + error(EUNKNOWN); + return; + } + + if (DEBUG) { + outsc("** in assignment lefthandside with (i,j,ps,i2) "); + outnumber(lhs->i); outspc(); + outnumber(lhs->j); outspc(); + outnumber(lhs->ps); outspc(); + outnumber(lhs->i2); outcr(); + outsc(" token is "); outputtoken(); + outsc(" at "); outnumber(here); outcr(); + } +} + +/* assign a number to a left hand side we have parsed */ +void assignnumber2(lhsobject_t* lhs, number_t x) { + string_t sr; + +/* depending on the variable type, assign the value */ + switch (lhs->name.token) { + case VARIABLE: + setvar(&lhs->name, x); + break; + case ARRAYVAR: + array(lhs, 's', &x); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + +/* find the string variable */ + getstring(&sr, &lhs->name, lhs->i, lhs->j); + if (!USELONGJUMP && er) return; + +/* the first character of the string is set to the number */ + if (sr.ir) sr.ir[0]=x; else if (sr.address) memwrite2(ax, x); else error(EUNKNOWN); + +/* set the length */ + if (lhs->ps) + setstringlength(&lhs->name, 1, lhs->j); + else + if (sr.length < lhs->i && lhs->i <= sr.strdim) + setstringlength(&lhs->name, lhs->i, lhs->j); + break; +#endif + } +} + +/* + * LET - the core assigment function, this is different from other BASICs + */ +void assignment() { + address_t newlength, copybytes; + mem_t s; + index_t k; + char tmpchar; /* for number conversion only */ + string_t sr, sl; /* the right and left hand side strings */ + +/* the lefthandside identifier */ + lhsobject_t lhs; + +/* this code evaluates the left hand side, we remember the object information first */ + lhs.name=name; + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + +/* the assignment part */ + if (token != '=') { error(EUNKNOWN); return; } + nexttoken(); + +/* here comes the code for the right hand side, the evaluation depends on the left hand side type */ + switch (lhs.name.token) { +/* the lefthandside is a scalar, evaluate the righthandside as a number, even if it is a string */ + case VARIABLE: + case ARRAYVAR: + expression(); + if (!USELONGJUMP && er) return; + assignnumber2(&lhs, pop()); + break; +#ifdef HASAPPLE1 +/* the lefthandside is a string variable, try evaluate the righthandside as a stringvalue */ + case STRINGVAR: +nextstring: + +/* do we deal with a string as righthand side */ + s=stringvalue(&sr); + if (!USELONGJUMP && er) return; + +/* and then as an expression if it is no string, any number appearing in a string expression terminates the addition loop */ + if (!s) { + expression(); + if (!USELONGJUMP && er) return; + tmpchar=pop(); + sr.length=1; + sr.ir=&tmpchar; + } else + nexttoken(); /* we do this here because expression also advances, this way we avoid double advance */ + + if (DEBUG) { outsc("* assigment stringcode at "); outnumber(here); outcr(); } + +/* at this point we have a stringvalue with ir2 pointing to the payload and the stack the length + this is either coming from stringvalue or from the expression code */ + +/* we now process the source string */ + +/* getstring of the destination */ + getstring(&sl, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + +/* this debug messes up sbuffer hence all functions that use it in stringvalue produce wrong results */ + if (DEBUG) { + outsc("* assigment stringcode "); outname(&lhs.name); outcr(); + outsc("** assignment source string length "); outnumber(sr.length); outcr(); + outsc("** assignment dest string length "); outnumber(sl.length); outcr(); + outsc("** assignment dest string dimension "); outnumber(sl.strdim); outcr(); + } + +/* does the source string fit into the destination if we have no destination second index*/ + if ((lhs.i2 == 0) && ((lhs.i+sr.length-1)>sl.strdim)) { error(EORANGE); return; }; + +/* if we have a second index, is it in range */ + if ((lhs.i2 != 0) && lhs.i2>sl.strdim) { error(EORANGE); return; }; + +/* calculate the number of bytes we truely want to copy */ + if (lhs.i2 > 0) copybytes=((lhs.i2-lhs.i+1) > sr.length) ? sr.length : (lhs.i2-lhs.i+1); + else copybytes=sr.length; + + if (DEBUG) { outsc("** assignment copybytes "); outnumber(copybytes); outcr(); } + +/* now do the heavy lifting in a seperate function to encasulate buffering */ + assignstring(&sl, &sr, copybytes); + +/* + * classical Apple 1 behaviour is string truncation in substring logic, with + * two index destination string we follow another route. We extend the string + * for the number of copied bytes + */ + if (lhs.i2 == 0) { + newlength = lhs.i+sr.length-1; + } else { + if (lhs.i+copybytes > sl.length) newlength=lhs.i+copybytes-1; + else newlength=sl.length; + } + + setstringlength(&lhs.name, newlength, lhs.j); +/* + * we have processed one string and copied it fully to the destination + * see if there is more to come. For inplace strings this is odd because + * one term can change during adding (A$ = B$ + A$). + */ +addstring: + if (token == '+') { + lhs.i=lhs.i+copybytes; + nexttoken(); + goto nextstring; + } + break; /* case STRINGVAR */ +#endif /* HASAPPLE1 */ + } /* switch */ +} + + +/* + * Try to copy one string to the other, assumes that getstring did its work + * and that copybyte is correct. + * BASICs in place strings make this a non trivial exercise as we need to + * avoid overwrites. + * Another complication is the mixed situation of BASIC memory strings + * and C memory strings. + */ +void assignstring(string_t* sl, string_t* sr, stringlength_t copybytes) { + stringlength_t k; + +/* if we have a memory model that needs the mem interface, go through the addresses by default + else use just the pointers */ + +#ifdef USEMEMINTERFACE +/* for a regular string variable as left hand side we know the address */ + if (sl->address) { + +/* for a regular string variable as a source we need to take care of order */ + + if (sr->address) { + if (sr->address > sl->address) + for (k=0; kaddress+k, memread2(sr->address+k)); + else + for (k=1; k<=copybytes; k++) memwrite2(sl->address+copybytes-k, memread2(sr->address+copybytes-k)); + } else { + +/* if the right hand side is a special string or a constant things are much simpler */ + + for (k=0; kaddress+k, sr->ir[k]); + + } + } else { + +/* non regular string variables like @U$ and @T$ are never assignable */ + error(EUNKNOWN); + } +#else + +/* we just go through the C memory here */ + + if (sr->ir && sl->ir) { + if (sr->ir > sl->ir) + for (k=0; kir[k]=sr->ir[k]; + else + for (k=1; k<=copybytes; k++) sl->ir[copybytes-k]=sr->ir[copybytes-k]; + } else { + error(EUNKNOWN); + } + +#endif +} + +/* + * INPUT ["string",] variable [,["string",] variable] + * + * The original version of input only processes simple variables one at a time + * and does not support arrays. The code is redudant to assignment and read. + * It also does not support comma separated lists of values to be input. + */ +void showprompt() { + outsc("? "); +} + +/* + * Reimplementation of input using the same pattern as read and print . + */ +void xinput() { + + mem_t oldid = id; /* remember the stream on modify */ + mem_t prompt = 1; /* determine if we show the prompt */ + number_t xv; /* for number conversion with innumber */ + +/* the identifier of the lefthandside */ + lhsobject_t lhs; + + address_t maxlen, newlength; /* the maximum length of the string to be read */ + int k=0; /* the result of the number conversion */ + string_t s; + char* buffer; /* the buffer we use for input */ + address_t bufsize; /* the size of the buffer */ + +/* depending on the RUN state we use either the input buffer or the string buffer */ +/* this ways we can process long inputs in RUN and don't need a lot of memory */ + if (st == SRUN || st == SERUN) { + buffer=ibuffer; + bufsize=BUFSIZE; + } else { + buffer=sbuffer; + bufsize=SBUFSIZE; + } + +/* get the next token and check what we are dealing with */ + nexttoken(); + +/* modifiers of the input statement (stream) */ + if (token == '&') { + if(!expectexpr()) return; + oldid=id; + id=pop(); + if (id != ISERIAL || id !=IKEYBOARD) prompt=0; + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + +/* unlike print, form can appear only once in input after the + stream, it controls character counts in wire */ + if (token == '#') { + if(!expectexpr()) return; + form=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + +/* we have a string to be printed to prompt the user */ +nextstring: + if (token == STRING && id != IFILE) { + prompt=0; +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(sr.ir, sr.length); + nexttoken(); + } + +/* now we check for a variable and parse it */ +nextvariable: + if (token == VARIABLE || token == ARRAYVAR || token == STRINGVAR) { + +/* check for a valid lefthandside expression */ + lhs.name=name; + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + +/* which data type do we input */ + switch (lhs.name.token) { + case VARIABLE: + case ARRAYVAR: +again: +/* if we have no buffer or are at the end, read it and set cursor k to the beginning */ + if (k == 0 || (address_t) buffer[0] < k) { + if (prompt) showprompt(); + (void) ins(buffer, bufsize); + k=1; + } + +/* read a number from the buffer and return it, advance the cursor k */ + k=innumber(&xv, buffer, k); + +/* if we break, end it here */ + if (k == -1) { + st=SINT; + token=EOL; + goto resetinput; + } + +/* if we have no valid number, ask again */ + if (k == 0) { + if (id == ISERIAL || id == IKEYBOARD) { + printmessage(ENUMBER); + outspc(); + printmessage(EGENERAL); + outcr(); + xv=0; + k=0; + goto again; + } else { + ert=1; + xv=0; + goto resetinput; + } + } + +/* now assign the number */ + assignnumber2(&lhs, xv); + +/* look if there is a comma coming in the buffer and keep it */ + while (k < (address_t) buffer[0] && buffer[k] != 0) { + if (buffer[k] == ',') { + k++; + break; + } + k++; + } + break; +#ifdef HASAPPLE1 + case STRINGVAR: +/* the destination address of the lefthandside, on the fly create included */ + getstring(&s, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + +/* the length of the lefthandside string */ + if (lhs.i2 == 0) { + maxlen=s.strdim-lhs.i+1; + } else { + maxlen=lhs.i2-lhs.i+1; + if (maxlen > s.strdim) maxlen=s.strdim-lhs.i+1; + } + +/* the number of bytes we want to read the form parameter in WIRE can be used + to set the expected number of bytes */ + if (form != 0 && form < maxlen) maxlen=form; + +/* what is going on */ + if (DEBUG) { + outsc("** input stringcode at "); outnumber(here); outcr(); + outsc("** input stringcode "); outname(&lhs.name); outcr(); + outsc("** input stringcode maximum length "); outnumber(maxlen); outcr(); + } + +/* now read the string inplace */ + if (prompt) showprompt(); +#ifndef USEMEMINTERFACE + newlength=ins(s.ir-1, maxlen); +#else + newlength=ins(spistrbuf1, maxlen); + +/* if we have a string variable, we need to copy the buffer to the string */ + if (newlength > 0) { + if (s.ir) { + for (k=0; k= BASEKEYWORD) || token < -127) { + if ((token == TTHEN || + token == TELSE || + token == TTO || + token == TSTEP || + token == TGOTO || + token == TGOSUB || + token == TOR || + token == TAND) && lastouttoken != LINENUMBER) outspc(); + else + if (lastouttoken == NUMBER || lastouttoken == VARIABLE) outspc(); + + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=token; i++); + outsc(getkeyword(i)); + if (token != GREATEREQUAL && + token != NOTEQUAL && + token != LESSEREQUAL && + token != TREM && + token != TFN) spaceafterkeyword=1; + break; + } + if (token >= 32) { + outch(token); + if (token == ':' && !outliteral) outspc(); + break; + } + outch(token); outspc(); outnumber(token); + } + + lastouttoken=token; +} + +/* + * LIST programs to an output device. + * + * The output is formatted to fit the screen, the heuristic is simple. + * + */ + +void listlines(address_t b, address_t e) { + mem_t oflag=0; + +/* global variables controlling outputtoken, reset to default */ + lastouttoken=0; + spaceafterkeyword=0; + +/* if there is a programm ... */ + if ( top != 0 ) { + here=0; + gettoken(); + while (here < top) { + if (token == LINENUMBER && ax >= b) oflag=1; + if (token == LINENUMBER && ax > e) oflag=0; + if (oflag) outputtoken(); + gettoken(); + if (token == LINENUMBER && oflag) { + outcr(); +/* wait after every line on small displays + removed if ( dspactive() && (dsp_rows < 10) ){ if ( inch() == 27 ) break;} */ + if (dspactive() && dspwaitonscroll() == 27) break; + } + } + if (here == top && oflag) outputtoken(); + if (e == maxaddr || b != e) outcr(); /* supress newlines in "list 50" - a little hack */ + } + +} + +void xlist(){ + address_t b, e; + +/* get the argument */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + +/* parse the arguments */ + switch (args) { + case 0: + b=0; + e=maxaddr; + break; + case 1: + b=pop(); + e=b; + break; + case 2: + e=pop(); + b=pop(); + break; + default: + error(EARGS); + return; + } + +/* list the line from b to e in the default output device */ + listlines(b, e); + +/* we are done */ + nexttoken(); + } + +/* + * The progam line editor, first version. The code is + * not save for BUFSIZE greater than 127. A cast to + * unsigned char aka uint8_t is needed for the string + * length as some platforms have a signed char and some + * don't. + */ +void xedit(){ + mem_t ood = od; + address_t line; + address_t l; + int i, k, j; + char ch; + +/* we edit only in interactive mode */ + if (st != SINT) { error(EUNKNOWN); return; } + +/* currently only one line number */ + if(!expectexpr()) { error(EARGS); return; } + +/* this uses the input buffer now */ + line=pop(); +undo: /* this is the undo point */ + ibuffer[0]=0; + ibuffer[1]=0; + od=0; + listlines(line, line); + if (ibuffer[0] == 0) { + outnumber(line); + outspc(); + } + od=ood; + +/* set the cursor to the first character */ + l=1; + +/* editing loop for blocking and non blocking terminals */ + while (-1) { + +/* show the line and indicate the cursor */ + for(i=1; i<=(unsigned char)ibuffer[0]; i++) outch(ibuffer[i]); + outcr(); + for(i=0; i 1) l--; + break; + case 'k': /* vi style right */ + if (l<(unsigned char)ibuffer[0]) l++; + break; + case 'x': /* delete the cursor character */ + if ((unsigned char)ibuffer[0]>0) { + for (j=l; j<(unsigned char)ibuffer[0]; j++) ibuffer[j]=ibuffer[j+1]; + ibuffer[j]=0; + ibuffer[0]=(unsigned char)ibuffer[0]-1; + } + if ((unsigned char)ibuffer[0]=l; j--) { + ibuffer[j+i-k]=ibuffer[j]; + if (j<=l+i-k) ibuffer[j]=sbuffer[k+1+(j-l)]; + } + } + ibuffer[0]=(unsigned char)ibuffer[0]+i-k; + k=i; + break; + case '^': /* vi style start of line */ + l=1; + break; + case '$': /* vi style end of line */ + l=(unsigned char)ibuffer[0]+1; + break; + case 'h': /* vi style backspace */ + if (l > 1) { + for (j=l-1; j<(unsigned char)ibuffer[0]; j++) ibuffer[j]=ibuffer[j+1]; + ibuffer[j]=0; + ibuffer[0]=(unsigned char)ibuffer[0]-1; + l--; + } + break; + case 'u': /* vi style undo */ + goto undo; + break; + case ':': /* find the next colon : character*/ + if (l <= (unsigned char)ibuffer[0]) { + while (l <= (unsigned char)ibuffer[0] && ibuffer[l] != ':') l++; + if (l <= (unsigned char)ibuffer[0]) l++; + } + break; + default: /* do nothing if the character is not recogized */ + break; + } + } + } + +/* try to store the line, may heaven help us */ +done: + bi=ibuffer; + st=SINT; + nexttoken(); + if (token == NUMBER) { + ax=x; + storeline(); + } + +/* and we are done, restore the output device and clean the buffer */ +endnosave: + ibuffer[0]=0; + ibuffer[1]=0; + bi=ibuffer+1; + nexttoken(); +} + +/* + * RUN and CONTINUE are the same function + */ +void xrun(){ + if (token == TCONT) { + st=SRUN; + nexttoken(); + } else { + nexttoken(); + parsearguments(); + if (er != 0 ) return; + if (args > 1) { error(EARGS); return; } + if (args == 0) { + here=0; + } else { + findline(pop()); + } + if (!USELONGJUMP && er) return; + if (st == SINT) st=SRUN; + +/* all reset on run */ + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + ioer=0; + fncontext=0; +#ifdef HASEVENTS + resettimer(&every_timer); + resettimer(&after_timer); + events_enabled=1; +#endif + + nexttoken(); + } + +/* once statement is called it stays into a loop until the token stream + is exhausted. Then we return to interactive mode. */ + statement(); + st=SINT; +/* flush the EEPROM when changing to interactive mode */ + eflush(); + +/* if called from command line with file arg - exit after run */ +#ifdef HASARGS + if (bnointafterrun) restartsystem(); +#endif +} + +/* + * NEW the general cleanup function - new deletes everything + * + * restbasicstate() is a helper, it keeps the memory intact + * this is needed for EEPROM direct memory + */ +void resetbasicstate() { + + if (DEBUG) { outsc("** BASIC state reset \n"); } + + /* all stacks are purged */ + clearst(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrvars(); + clrlinecache(); + +/* error status reset */ + reseterror(); + +/* let here point to the beginning of the program */ + here=0; + +/* function context back to zero */ + fncontext=0; + +/* interactive mode */ + st=SINT; + +/* switch off timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +} + +void xnew(){ + +/* reset the state of the interpreter */ + resetbasicstate(); + + + if (DEBUG) { + outsc("** clearing memory "); + outnumber(memsize); + outsc(" bytes \n"); + } + +/* program memory back to zero and variable heap cleared */ + himem=memsize; + zeroblock(0, memsize); + top=0; + + if (DEBUG) outsc("** clearing EEPROM state \n "); +/* on EEPROM systems also clear the stored state and top */ +#ifdef EEPROMMEMINTERFACE + eupdate(0, 0); + setaddress(1, beupdate, top); +#endif +} + +/* + * REM - skip everything + */ +void xrem() { + if (debuglevel == -1) outsc("REM: "); + while (token != LINENUMBER && token != EOL && here <= top) + { + nexttoken(); + if (debuglevel == -1) { + if (token != LINENUMBER) outputtoken(); else outcr(); + } + } +} + +/* + * The Apple 1 BASIC additions + * CLR, DIM, POKE, TAB + */ + +/* + * CLR - clearing variable space + */ +void xclr() { + +#ifdef HASDARKARTS + name_t variable; + + nexttoken(); + + if (termsymbol()) { + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + ioer=0; + } else { + variable=name; + switch (variable.token) { + case VARIABLE: + if (variable.c[0] == '@') { return; } + break; + case ARRAYVAR: + nexttoken(); + if (token != '(') { error(EVARIABLE); return; } + nexttoken(); + if (token != ')') { error(EVARIABLE); return; } + break; + case STRINGVAR: + if (variable.c[0] == '@') { error(EVARIABLE); return; } + break; + case TGOSUB: + clrgosubstack(); + goto next; + case TFOR: + clrforstack(); + goto next; + case TEVERY: + resettimer(&every_timer); + goto next; + case TAFTER: + resettimer(&after_timer); + goto next; + default: + expression(); + if (!USELONGJUMP && er) return; + ax=pop(); + variable.c[0]=ax%256; + variable.c[1]=ax/256; + variable.token=TBUFFER; + } + +/* we have to clear an object, call free */ + ax=bfree(&variable); + if (ax == 0) { + if (variable.token != TBUFFER) { error(EVARIABLE); return; } + else ert=1; + } + } +#else + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + ioer=0; +#endif + +next: + nexttoken(); +} + +#ifdef HASAPPLE1 +/* + * DIM - the dimensioning of arrays and strings from Apple 1 BASIC + */ +void xdim(){ + name_t variable; + address_t x; + address_t y=1; + +/* which object should be dimensioned or created */ + nexttoken(); + +nextvariable: + if (token == ARRAYVAR || token == STRINGVAR ){ + +/* remember the object, direct assignment of struct for the moment */ + variable=name; + + if (DEBUG) { + outsc("** in xdim "); outname(&variable); outspc(); outnumber(variable.token); + outspc(); outname(&name); outspc(); outnumber(name.token); outcr(); + } + +/* parse the arguments */ + parsesubscripts(); + if (!USELONGJUMP && er) return; + +#ifndef HASMULTIDIM + if (args != 1) {error(EARGS); return; } + x=popaddress(); +#else + if (args != 1 && args != 2) {error(EARGS); return; } + if (args == 2) y=popaddress(); + x=popaddress(); +#endif + +/* we create at least one element */ + if (x<1 || y<1) {error(EORANGE); return; } + +/* various checks - do we have enough space in buffers and string indices */ + if (variable.token == STRINGVAR) { + if ((x>255) && (strindexsize==1)) {error(EORANGE); return; } +#ifdef SPIRAMSBSIZE + if (x>SPIRAMSBSIZE-1) {error(EORANGE); return; } +#endif +/* With the substringmode switched off, if only one argument is given + we interpret the argument as the string array dimension and not as + the length two arguments are allowed and work as always. This makes + things more compatible to the Microsoft BASIC world. */ + if (!substringmode) + if (args == 1) { + y=x; + x=defaultstrdim; + } + + (void) createstring(&variable, x, y); + } else { + (void) createarray(&variable, x, y); + } + if (!USELONGJUMP && er) return; + + } else if (token == VARIABLE) { + (void) bmalloc(&name, 0); /* this is a local variable, currently no safety net */ + } else { + error(EUNKNOWN); + return; + } + + nexttoken(); + if (token == ',') { + nexttoken(); + goto nextvariable; + } + + nexttoken(); +} + + +/* + * POKE - low level poke to the basic memory. + * on 16bit systems, the address is signed, so we can only go up to 32767. + * If the address is negative, we poke into the EEPROM. + */ +void xpoke(){ + number_t a, v; + +/* get the address and the value */ + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + v=pop(); /* the value */ + a=pop(); /* the address */ + +/* catch memsize here because memwrite doesn't do it */ + if (a >= 0 && a<=memsize) + memwrite2(a, v); + else if (a < 0 && a >= -elength()) + eupdate(-a-1, v); + else { + error(EORANGE); + } +} + +/* + * TAB - spaces command of Apple 1 BASIC + * charcount mechanism for relative tab if HASMSTAB is set + */ +void xtab(){ + address_t a; + token_t t = token; + +/* get the number of spaces, we allow brackets here to use xtab also in PRINT */ + nexttoken(); + if (token == '(') nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + if (token == ')') nexttoken(); + + a=popaddress(); + if (!USELONGJUMP && er) return; + +/* the runtime environment can do a true tab then ... */ +#ifdef HASMSTAB + if (t != TSPC && reltab && od <= OPRT && od > 0) { + if (charcount[od-1] >= a) a=0; else a=a-charcount[od-1]-1; + } +#endif + while (a-- > 0) outspc(); +} +#endif + +/* + * locate the curor on the screen + */ + +void xlocate() { + address_t cx, cy; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + cy=popaddress(); + cx=popaddress(); + if (!USELONGJUMP && er) return; + +/* for locate we go through the VT52 interface for cursor positioning*/ + if (cx > 0 && cy > 0 && cx < 224 && cy < 224) { + outch(27); outch('Y'); + outch(31+(unsigned int) cy); + outch(31+(unsigned int) cx); + } + +/* set the charcount, this is half broken on escape sequences */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=cx; +#endif + +} + +/* + * Stefan's additions to Palo Alto BASIC + * DUMP, SAVE, LOAD, GET, PUT, SET + * + */ + +/* + * DUMP - memory dump program + */ +void xdump() { + address_t a, x; + char eflag = 0; + + nexttoken(); + if (token == '!') { eflag=1; nexttoken(); } + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 0: + x=0; + a=memsize; + break; + case 1: + x=pop(); + a=memsize; + break; + case 2: + a=pop(); + x=pop(); + break; + default: + error(EARGS); + return; + } + + form=6; + if (a>x) dumpmem((a-x)/8+1, x, eflag); + form=0; +} + +/* + * helper of DUMP, wrote the memory out + */ +void dumpmem(address_t r, address_t b, char eflag) { + address_t j, i; + address_t k; + mem_t c; + address_t end; + + k=b; + i=r; + if (eflag) end=elength(); else end=memsize; + while (i>0) { + outnumber(k); outspc(); + for (j=0; j<8; j++) { + if (eflag) c=eread(k); else c=memread(k); + k++; + outnumber(c); outspc(); + if (k > end) break; + } + outcr(); + i--; + if (k > end) break; + } + if (eflag) { + outsc("elength: "); outnumber(elength()); outcr(); + } else { + outsc("top: "); outnumber(top); outcr(); + outsc("himem: "); outnumber(himem); outcr(); + } +} + +/* + * creates a C string from a BASIC string + * after reading a BASIC string + */ +void stringtobuffer(char *buffer, string_t* s) { + index_t i = s->length; + + if (i >= SBUFSIZE) i=SBUFSIZE-1; + buffer[i--]=0; + while (i >= 0) { buffer[i]=s->ir[i]; i--; } +} + +/* helper for the memintercase code */ +void getstringtobuffer(string_t* strp, char *buffer, stringlength_t maxlen) { + stringlength_t i; + + for (i=0; ilength && iaddress+i); + strp->ir=buffer; +} + +/* get a file argument */ +void getfilename(char *buffer, char d) { + index_t s; + char *sbuffer; + string_t sr; + +/* do we have a string argument? */ + s=stringvalue(&sr); + if (!USELONGJUMP && er) return; + if (DEBUG) {outsc("** in getfilename2 stringvalue delivered "); outnumber(s); outcr(); } + + if (s) { + if (DEBUG) {outsc("** in getfilename2 copying string of length "); outnumber(x); outcr(); } +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + stringtobuffer(buffer, &sr); + if (DEBUG) {outsc("** in getfilename2 stringvalue string "); outsc(buffer); outcr(); } + nexttoken(); + } else if (termsymbol()) { + if (d) { + sbuffer=getmessage(MFILE); + s=0; + while ((sbuffer[s] != 0) && (s < SBUFSIZE-1)) { buffer[s]=sbuffer[s]; s++; } + buffer[s]=0; + x=s; + } else { + buffer[0]=0; + x=0; + } + nexttoken(); + } else { + expression(); + if (!USELONGJUMP && er) return; + buffer[0]=pop(); + buffer[1]=0; + } +} + +/* + * an alternative getfilename implementation that simply gives back a buffer + * with the filename in it. We avoid a string buffer in the calling commands + * like SAVE and LOAD. + */ +char* getfilename2(char d) { + mem_t s; + string_t sr; + +/* we have no argument and use the default */ + if (termsymbol()) { + if (d) return getmessage(MFILE); + else return 0; + } + +/* we have a string argument or an expression */ + s=stringvalue(&sr); + if (!USELONGJUMP && er) return 0; + if (s) { +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, sbuffer, SBUFSIZE); +#endif + nexttoken(); /* undo the rewind of stringvalue, only then use the buffer */ + for (s=0; s BUFSIZE) { + error(EOUTOFMEMORY); + break; + } + } + ifileclose(); +/* after a successful load we save top to the EEPROM header */ +#ifdef EEPROMMEMINTERFACE + setaddress(1, beupdate, top); +#endif + +/* go back to run mode and start from the first line */ + if (chain) { + st=SRUN; + here=0; + nexttoken(); + } + } +} +#else +/* + * SAVE a file to EEPROM - minimal version for small Arduinos + */ +void xsave() { + esave(); + nexttoken(); +} +/* + * LOAD a file from EEPROM - minimal version for small Arduinos + */ +void xload(const char* f) { + eload(); + nexttoken(); +} +#endif + +/* + * GET just one character from input + */ +void xget(){ + +/* identifier of the lefthandside */ + lhsobject_t lhs; + + mem_t oid=id; /* remember the input stream */ + char ch; + + nexttoken(); + +/* modifiers of the get statement */ + if (token == '&') { + + if (!expectexpr()) return; + id=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + +/* this code evaluates the left hand side - remember type and name */ + lhs.name=name; + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + +/* get the data, non blocking on Arduino */ + if (availch()) ch=inch(); else ch=0; + +/* store the data element as a number expect for */ + assignnumber2(&lhs, ch); + +/* but then, strings where we deliver a string with length 0 if there is no data */ +#ifdef HASAPPLE1 + if (lhs.name.token == STRINGVAR && ch == 0 && lhs.ps) setstringlength(&lhs.name, 0, arraylimit); +#endif + +/* restore the output device */ + id=oid; +} + +/* + * PUT writes one character to an output stream + */ +void xput(){ + mem_t ood=od; + index_t i; + + nexttoken(); + +/* modifiers of the put statement */ + if (token == '&') { + + if(!expectexpr()) return; + od=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + parsearguments(); + if (!USELONGJUMP && er) return; + + for (i=args-1; i>=0; i--) sbuffer[i]=pop(); + outs(sbuffer, args); + + od=ood; +} + +/* setpersonality is a helper of xset */ +void setpersonality(index_t p) { +#ifdef HASAPPLE1 + switch(p) { +/* a Microsoft like BASIC have arrays starting at 0 with n+1 elements and no substrings, MS type RND */ + case 'm': + case 'M': + msarraylimits=1; + arraylimit=0; + substringmode=0; + booleanmode=-1; + randombase=-1; + reltab=1; + break; +/* an Apple 1 like BASIC have arrays starting at 1 with n elements and substrings */ + case 'a': + case 'A': + msarraylimits=0; + arraylimit=1; + substringmode=1; + booleanmode=1; + randombase=0; + reltab=0; + break; +/* PaloAlto BASIC is an integer basic with slightly different behaviour */ + case 'p': + case 'P': + msarraylimits=0; + arraylimit=0; + substringmode=1; + booleanmode=1; + forceint=1; + randombase=1; + reltab=0; + break; + } +#endif +} + +/* + * SET - the command itself is also apocryphal it is a low level + * control command setting certain properties + * syntax, currently it is only SET expression, expression + */ +void xset(){ + address_t function; + index_t argument; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + argument=pop(); + function=pop(); + switch (function) { +/* runtime debug level */ + case 0: + debuglevel=argument; + break; +/* autorun/run flag of the EEPROM 255 for clear, 0 for prog, 1 for autorun */ + case 1: + eupdate(0, argument); + break; +/* change the output device */ + case 2: + switch (argument) { + case 0: + od=OSERIAL; + break; + case 1: + od=ODSP; + break; + } + break; +/* change the default output device */ + case 3: + switch (argument) { + case 0: + od=(odd=OSERIAL); + break; + case 1: + od=(odd=ODSP); + break; + } + break; + /* change the input device */ + case 4: + switch (argument) { + case 0: + id=ISERIAL; + break; + case 1: + id=IKEYBOARD; + break; + } + break; +/* change the default input device */ + case 5: + switch (argument) { + case 0: + idd=(id=ISERIAL); + break; + case 1: + idd=(id=IKEYBOARD); + break; + } + break; +#ifdef HASSERIAL1 +/* set the cr behaviour */ + case 6: + sendcr=(char)argument; + break; +/* set the blockmode behaviour */ + case 7: + blockmode=argument; + break; +/* set the second serial ports baudrate */ + case 8: + prtset(argument); + break; +#endif +/* set the power amplifier level of the radio module */ +#ifdef HASRF24 + case 9: + radioset(argument); + break; +#endif +/* display update control for paged displays */ +#ifdef DISPLAYDRIVER + case 10: + dspsetupdatemode(argument); + break; +#endif +/* change the output device to a true TAB */ +#ifdef HASMSTAB + case 11: + reltab=argument; + break; +#endif +/* change the lower array limit */ +#ifdef HASAPPLE1 + case 12: + if (argument>=0) arraylimit=argument; else error(EORANGE); + break; +#endif +/* the keyboard repeat frequency */ +#ifdef HASKEYPAD + case 13: + kbdrepeat=argument; + break; +#endif +/* the units the pulse command is using */ +#ifdef HASPULSE + case 14: + bpulseunit=argument; + break; +#endif +/* switch on the vt52 emulation an a POSIX system with an ANSI terminal */ +#ifdef POSIXVT52TOANSI + case 15: + vt52active=argument; + break; +#endif +/* change the default size of a string at autocreate */ +#ifdef HASAPPLE1 + case 16: + if (argument>0) defaultstrdim=argument; else error(EORANGE); + break; +#endif +/* set the boolean mode */ + case 17: + if (argument==-1 || argument==1) booleanmode=argument; else error(EORANGE); + break; +/* set the integer mode */ + case 18: + forceint=(argument != 0); + break; +/* set the random number behaviour */ + case 19: + randombase=argument; + break; +/* the substring mode on and off */ +#ifdef HASAPPLE1 + case 20: + substringmode=(argument != 0); + break; +#endif +/* the MS array behaviour, creates n+1 elements when on */ +#ifdef HASAPPLE1 + case 21: + msarraylimits=(argument != 0); + break; +#endif +/* set many settings at once to change the entire personality of the interpreter */ + case 22: + setpersonality(argument); + break; +#ifdef HASAPPLE1 + case 23: + lowercasenames=(argument != 0); + break; +#endif + } +} + +/* + * NETSTAT - network status command, rudimentary + */ +void xnetstat(){ +#if defined(HASMQTT) + + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 0: + if (netconnected()) outsc("Network connected \n"); else outsc("Network not connected \n"); + outsc("MQTT state "); outnumber(mqttstate()); outcr(); + outsc("MQTT out topic "); outsc(mqtt_otopic); outcr(); + outsc("MQTT inp topic "); outsc(mqtt_itopic); outcr(); + outsc("MQTT name "); outsc(mqttname); outcr(); + break; + case 1: + ax=pop(); + switch (ax) { + case 0: + netstop(); + break; + case 1: + netbegin(); + break; + case 2: + if (!mqttreconnect()) ert=1; + break; + default: + error(EARGS); + return; + } + break; + default: + error(EARGS); + return; + } +#endif + nexttoken(); +} + +/* + * The arduino io functions. + * + */ + +/* + * rtaread and rtdread are wrappers coming from runtime + * This is done for portability for raspberry pi and other systems + */ + +void xaread(){ + push(aread(popaddress())); +} + +void xdread(){ + push(dread(popaddress())); +} + + /* + * DWRITE - digital write + */ +void xdwrite(){ + address_t x,y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x=popaddress(); + y=popaddress(); + if (!USELONGJUMP && er) return; + dwrite(y, x); +} + +/* + * AWRITE - analog write + */ +void xawrite(){ + address_t x,y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x=popaddress(); + if (x > 255) error(EORANGE); + y=popaddress(); + if (!USELONGJUMP && er) return; + awrite(y, x); +} + +/* + * PINM - pin mode + */ +void xpinm(){ + address_t x,y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x=popaddress(); + if (x > 1) error(EORANGE); + y=popaddress(); + if (!USELONGJUMP && er) return; + pinm(y, x); +} + +/* + * DELAY in milliseconds + * + * this must call bdelay() and not delay() as bdelay() + * handles all the yielding and timing functions + * + */ +void xdelay(){ + nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + bdelay(pop()); +} + +/* tone if the platform has it -> BASIC command PLAY */ +#ifdef HASTONE +/* play a tone */ +void xtone(){ + address_t d = 0; + address_t v = 100; + address_t f, p; + +/* get minimum of 2 and maximum of 4 args */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 4 || args < 2) { error(EARGS); return; } + +/* a switch would be more elegant but needs more progspace ;-) */ + if (args == 4) v=popaddress(); + if (args >= 3) d=popaddress(); + f=popaddress(); + p=popaddress(); + if (!USELONGJUMP && er) return; + + playtone(p, f, d, v); +} +#endif + +/* pulse output - pin, duration, [value], [repetitions, delay] */ +#ifdef HASPULSE +void xpulse(){ + address_t pin, duration; + address_t val = 1; + address_t interval = 0; + address_t repetition = 1; + +/* do we have at least 2 and not more than 5 arguments */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args>5 || args<2) { error(EARGS); return; } + +/* get the data from stack */ + if (args == 5) { interval=popaddress(); repetition=popaddress(); } + if (args == 4) { error(EARGS); return; } + if (args > 2) val=popaddress(); + duration=popaddress(); + pin=popaddress(); + if (!USELONGJUMP && er) return; + +/* low level run time function for the pulse */ + pulseout(bpulseunit, pin, duration, val, repetition, interval); +} + +/* read a pulse, units given by bpulseunit - default 10 microseconds */ +void bpulsein() { + address_t x,y; + unsigned long t, pt; + + t=((unsigned long) popaddress())*1000; + y=popaddress(); + x=popaddress(); + if (!USELONGJUMP && er) return; + + push(pulsein(x, y, t)/bpulseunit); +} +#endif + + +#ifdef HASGRAPH +/* + * COLOR setting, accepting one or 3 arguments + */ +void xcolor() { + int r, g, b; + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + switch(args) { + case 1: + vgacolor(pop()); + break; + case 3: + b=pop(); + g=pop(); + r=pop(); + rgbcolor(r, g, b); + break; + default: + error(EARGS); + break; + } +} + +/* + * PLOT a pixel on the screen + */ +void xplot() { + int x0, y0; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + y0=pop(); + x0=pop(); + plot(x0, y0); +} + +/* + * LINE draws a line + */ +void xline() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + line(x0, y0, x1, y1); +} + +void xrect() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + rect(x0, y0, x1, y1); +} + +void xcircle() { + int x0, y0, r; + + nexttoken(); + parsenarguments(3); + if (!USELONGJUMP && er) return; + r=pop(); + y0=pop(); + x0=pop(); + circle(x0, y0, r); +} + +void xfrect() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + frect(x0, y0, x1, y1); +} + +void xfcircle() { + int x0, y0, r; + + nexttoken(); + parsenarguments(3); + if (!USELONGJUMP && er) return; + r=pop(); + y0=pop(); + x0=pop(); + fcircle(x0, y0, r); +} +#endif + +#ifdef HASDARKARTS +/* + * MALLOC allocates a chunk of memory + */ +void xmalloc() { + address_t s; + address_t a; + name_t name; + +/* size and identifier */ + s=popaddress(); + a=popaddress(); + if (!USELONGJUMP && er) return; + +/* create a name */ + name.token=TBUFFER; + name.l=2; + name.c[0]=a%256; + name.c[1]=a/256; + +/* allocate the memory */ + push(bmalloc(&name, s)); +} + +/* + * FIND an object on the heap + * xfind can find things in the variable name space and the buffer space + */ + +void xfind() { + address_t a; + address_t n; + +/* is there a ( */ + if (!expect('(', EUNKNOWN)) return; + +/* after that, try to find the object on the heap */ + nexttoken(); + if (token == TFN) { + nexttoken(); + name.token=TFN; + } + a=bfind(&name); + +/* depending on the object, interpret the result */ + switch (token) { + case ARRAYVAR: + case TFN: + if (!expect('(', EUNKNOWN)) return; + if (!expect(')', EUNKNOWN)) return; + case VARIABLE: + case STRINGVAR: + nexttoken(); + break; + default: + expression(); /* do not use expectexpr here because of the token sequence */ + if (!USELONGJUMP && er) return; + n=popaddress(); + if (!USELONGJUMP && er) return; + name.token=TBUFFER; + name.l=2; + name.c[0]=n%256; + name.c[1]=n/256; + a=bfind(&name); + } + +/* closing braket, dont use expect here because of the token sequence */ + if (token != ')') { error(EUNKNOWN); return; } + + push(a); +} + +/* + * EVAL can modify a program, there are serious side effects + * which are not caught (and cannot be). All FOR loops and RETURN + * vectors break if EVAL inserts in their range + */ +void xeval(){ + address_t i, l; + address_t mline, line; + string_t s; + +/* get the line number to store */ + if (!expectexpr()) return; + line=popaddress(); + if (!USELONGJUMP && er) return; + + if (token != ',') { error(EUNKNOWN); return; } + +/* the line to be stored */ + nexttoken(); + if (!stringvalue(&s)) { error(EARGS); return; } + +/* here we have the string to evaluate it to the ibuffer + only one line allowed, BUFSIZE is the limit */ + l=s.length; + if (!USELONGJUMP && er) return; + + if (l>BUFSIZE-1) {error(EORANGE); return; } + +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + + for (i=0; ienabled=0; + t->interval=0; + t->last=0; + t->type=0; + t->linenumber=0; +} + +void xtimer() { + token_t t; + btimer_t* timer; + +/* do we deal with every or after */ + if (token == TEVERY) timer=&every_timer; else timer=&after_timer; + + /* one argument expected, the time intervall */ + if (!expectexpr()) return; + + /* after that, a command GOTO or GOSUB with a line number + more commands thinkable */ + switch(token) { + case TGOSUB: + case TGOTO: + t=token; + if (!expectexpr()) return; + timer->last=millis(); + timer->type=t; + timer->linenumber=pop(); + timer->interval=pop(); + timer->enabled=1; + break; + default: + if (termsymbol()) { + x=pop(); + if (x == 0) + timer->enabled=0; + else { + if (timer->linenumber) { + timer->enabled=1; + timer->interval=x; + timer->last=millis(); + } else + error(EARGS); + } + } else + error(EUNKNOWN); + return; + } +} +#endif + +#ifdef HASEVENTS +/* + * The events API for Arduino with interrupt service routines + * analogous to the timer API. + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + * detach und attach are wrappers around the original Arduino functions. + * Runtime needs to be compiled with #define ARDUINOINTERRUPTS for this to + * work. + * + */ + +/* interrupts in BASIC fire once and then disable themselves, BASIC reenables them */ +void bintroutine0() { + eventlist[0].active=1; + detachinterrupt(eventlist[0].pin); +} +void bintroutine1() { + eventlist[1].active=1; + detachinterrupt(eventlist[1].pin); +} +void bintroutine2() { + eventlist[2].active=1; + detachinterrupt(eventlist[2].pin); +} +void bintroutine3() { + eventlist[3].active=1; + detachinterrupt(eventlist[3].pin); +} + +mem_t eventindex(mem_t pin) { + mem_t i; + + for(i=0; i= 0) { + outnumber(eventlist[ax].pin); outspc(); + outnumber(eventlist[ax].mode); outspc(); + outnumber(eventlist[ax].type); outspc(); + outnumber(eventlist[ax].linenumber); outspc(); + outcr(); + } + } + outnumber(nevents); outcr(); + nexttoken(); + return; + } + +/* control of events */ + if (token == TSTOP) { + events_enabled=0; + nexttoken(); + return; + } + + if (token == TCONT) { + events_enabled=1; + nexttoken(); + return; + } + +/* argument parsing */ + parsearguments(); + if (!USELONGJUMP && er) return; + + switch(args) { + case 2: + mode=pop(); + if (mode > 3) { + error(EARGS); + return; + } + case 1: + pin=pop(); + break; + default: + error(EARGS); + } + +/* followed by termsymbol, GOTO or GOSUB */ + if (token == TGOTO || token == TGOSUB) { + type=token; + +/* which line to go to */ + if (!expectexpr()) return; + line=pop(); + } + + +/* all done either set the interrupt up or delete it*/ + if (type) { + if (!addevent(pin, mode, type, line)) { + error(EARGS); + return; + } + } else { + disableevent(pin); + deleteevent(pin); + return; + } + +/* enable the interrupt */ + if (!enableevent(pin)) { + deleteevent(pin); + error(EARGS); + return; + } +} + +/* handling the event list */ +mem_t addevent(mem_t pin, mem_t mode, mem_t type, address_t linenumber) { + int i; + +/* is the event already there */ + for (i=0; i= EVENTLISTSIZE) return 0; + for (i=0; i= 0) { + eventlist[i].enabled=0; + eventlist[i].pin=-1; + eventlist[i].mode=0; + eventlist[i].type=0; + eventlist[i].linenumber=0; + eventlist[i].active=0; + nevents--; + } +} +#endif + +/* + * BASIC DOS - disk access programs, to control mass storage from BASIC + */ + +/* string match helper in catalog */ +char streq(const char *s, char *m){ + short i=0; + + while (m[i]!=0 && s[i]!=0 && i < SBUFSIZE){ + if (s[i] != m[i]) return 0; + i++; + } + return 1; +} + +/* + * CATALOG - basic directory function + */ +void xcatalog() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + const char *name; + + nexttoken(); + getfilename(filename, 0); + if (!USELONGJUMP && er) return; + + rootopen(); + while (rootnextfile()) { + if (rootisfile()) { + name=rootfilename(); + if (*name != '_' && *name !='.' && streq(name, filename)){ + outscf(name, 14); outspc(); + if (rootfilesize()>0) outnumber(rootfilesize()); + outcr(); + if (dspwaitonscroll() == 27) break; + } + } + rootfileclose(); + } + rootclose(); +#else + nexttoken(); +#endif +} + +/* + * DELETE a file + */ +void xdelete() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + + nexttoken(); + getfilename(filename, 0); + if (!USELONGJUMP && er) return; + + removefile(filename); +#else + nexttoken(); +#endif +} + +/* + * OPEN a file or I/O stream - very raw mix of different functions + */ +void xopen() { +#if defined(FILESYSTEMDRIVER) || defined(HASRF24) || defined(HASMQTT) || defined(HASWIRE) || defined(HASSERIAL1) + char stream = IFILE; /* default is file operation */ + char* filename; + int mode; + +/* which stream do we open? default is FILE */ + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',') {error(EUNKNOWN); return; } + nexttoken(); + } + +/* the filename and its length */ + // getfilename(filename, 0); + filename = getfilename2(0); + if (!USELONGJUMP && er) return; + +/* and the arguments */ + args=0; + if (token == ',') { + nexttoken(); + parsearguments(); + } + +/* getting an argument, no argument is read, i.e. mode 0 */ + if (args == 0 ) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + +/* open the stream */ + switch(stream) { +#ifdef HASSERIAL1 + case ISERIAL1: + prtclose(); + if (mode == 0) mode=9600; + if (prtopen(filename, mode)) ert=0; else ert=1; + break; +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + switch (mode) { + case 1: + ofileclose(); + if (ofileopen(filename, "w")) ert=0; else ert=1; + break; + case 2: + ofileclose(); + if (ofileopen(filename, "a")) ert=0; else ert=1; + break; + default: + case 0: + ifileclose(); + if (ifileopen(filename)) ert=0; else ert=1; + break; + } + break; +#endif +#ifdef HASRF24 + case IRADIO: + if (mode == 0) { + iradioopen(filename); + } else if (mode == 1) { + oradioopen(filename); + } + break; +#endif +#if defined(HASWIRE) + case IWIRE: + wireopen(filename[0], mode); + break; +#endif +#ifdef HASMQTT + case IMQTT: + if (mode == 0) { + mqttsubscribe(filename); + } else if (mode == 1) { + mqttsettopic(filename); + } + break; +#endif + default: + error(EORANGE); + return; + } +#endif + nexttoken(); +} + +/* + * OPEN as a function, currently only implemented for MQTT + */ +void xfopen() { + address_t stream = popaddress(); + if (stream == 9) push(mqttstate()); else push(0); +} + +/* + * CLOSE a file or stream + */ +void xclose() { +#if defined(FILESYSTEMDRIVER) || defined(HASRF24) || defined(HASMQTT) || defined(HASWIRE) + char stream = IFILE; + char mode; + + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',' && ! termsymbol()) {error(EUNKNOWN); return; } + nexttoken(); + } + + parsearguments(); + if (args == 0) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + +/* currently only close of files is implemented, should be also implemented for Wire */ + switch(stream) { + case IFILE: + if (mode == 1 || mode == 2) ofileclose(); else if (mode == 0) ifileclose(); + break; + } +#endif + nexttoken(); +} + +/* + * FDISK - format internal disk storages of RP2040, ESP and the like + */ +void xfdisk() { +#if defined(FILESYSTEMDRIVER) + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 1) error(EORANGE); + if (args == 0) push(0); + outsc("Format disk (y/N)?"); + (void) consins(sbuffer, SBUFSIZE); + if (sbuffer[1] == 'y') formatdisk(pop()); + if (fsstat(1) > 0) outsc("ok\n"); else outsc("fail\n"); +#endif + nexttoken(); +} + +#ifdef HASSTEFANSEXT +/* + * USR low level function access of the interpreter + * for each group of functions there is a call vector + * and and argument. + * + * USR arguments from 0 to 31 are reserved for the + * interpreter status and the input output stream + * mechanisms. All other values are free and can be used + * for individual functions - see case 32 for an example. + */ +void xusr() { + address_t fn; + number_t v; + int arg; + address_t a; + + v=pop(); + arg=(int)v; /* a bit paranoid here */ + fn=pop(); + switch(fn) { +/* USR(0,y) delivers all the internal constants and variables or the interpreter */ + case 0: + switch(arg) { + case 0: + push(bsystype); + break; + case 1: /* language set identifier, odd because USR is part of STEFANSEXT*/ + a=0; +#ifdef HASAPPLE1 + a|=1; +#endif +#ifdef HASARDUINOIO + a|=2; +#endif +#ifdef HASFILEIO + a|=4; +#endif +#ifdef HASDARTMOUTH + a|=8; +#endif +#ifdef HASGRAPH + a|=16; +#endif +#ifdef HASDARKARTS + a|=32; +#endif +#ifdef HASIOT + a|=64; +#endif + push(a); break; + case 2: + push(0); break; /* reserved for system speed identifier */ + +#ifdef HASFLOAT + case 3: push(-1); break; +#else + case 3: push(0); break; +#endif + case 4: push(numsize); break; + case 5: push(maxnum); break; + case 6: push(addrsize); break; + case 7: push(maxaddr); break; + case 8: push(strindexsize); break; + case 9: push(memsize+1); break; + case 10: push(elength()); break; + case 11: push(GOSUBDEPTH); break; + case 12: push(FORDEPTH); break; + case 13: push(STACKSIZE); break; + case 14: push(BUFSIZE); break; + case 15: push(SBUFSIZE); break; + case 16: push(ARRAYSIZEDEF); break; + case 17: push(defaultstrdim); break; +/* - 24 reserved, don't use */ + case 24: push(top); break; + case 25: push(here); break; + case 26: push(himem); break; + case 27: push(0); break; + case 28: push(freeRam()); break; + case 29: push(gosubsp); break; + case 30: push(loopsp); break; + case 31: push(0); break; /* fnc removed as interpreter variable */ + case 32: push(sp); break; +#ifdef HASDARTMOUTH + case 33: push(data); break; +#else + case 33: push(0); break; +#endif + case 34: push(0); break; +#ifdef FASTTICKERPROFILE + case 35: push(avgfasttick); break; +#endif +/* - 48 reserved, don't use */ + case 48: push(id); break; + case 49: push(idd); break; + case 50: push(od); break; + case 51: push(odd); break; + default: push(0); + } + break; +/* access to properties of stream 1 - serial */ + case 1: + push(serialstat(arg)); + break; +/* access to properties of stream 2 - display and keyboard */ + case 2: +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + push(dspstat(arg)); +#elif defined(ARDUINOVGA) + push(vgastat(arg)); +#else + push(0); +#endif + break; +/* access to properties of stream 4 - printer */ +#ifdef HASSERIAL1 + case 4: + push(prtstat(arg)); + break; +#endif +/* access to properties of stream 7 - wire */ +#if defined(HASWIRE) + case 7: + push(wirestat(arg)); + break; +#endif +/* access to properties of stream 8 - radio */ +#ifdef HASRF24 + case 8: + push(radiostat(arg)); + break; +#endif +/* access to properties of stream 9 - mqtt */ +#ifdef HASMQTT + case 9: + push(mqttstat(arg)); + break; +#endif +/* access to properties of stream 16 - file */ +#ifdef FILESYSTEMDRIVER + case 16: + push(fsstat(arg)); + break; +#endif + case 32: +/* user function 32 and beyond can be used freely */ +/* all USR values not assigned return 0 */ + default: + if (fn>31) push(usrfunction(fn, v)); else push(0); + } +} +#endif + +/* + * CALL currently only to exit the interpreter + */ +void xcall() { + int r; + + if (!expectexpr()) return; + r=pop(); + switch(r) { + case 0: +/* flush the EEPROM dummy and the output file and then exit */ + eflush(); + ofileclose(); +#if defined(POSIXFRAMEBUFFER) + vgaend(); /* clean up if you have played with the framebuffer */ +#endif + restartsystem(); + break; +/* restart the filesystem - only test code */ + case 1: + fsbegin(); + break; +/* call values to 31 reserved! */ + default: +/* your custom code into usrcall() */ + if (r > 31) usrcall(r); else { error(EORANGE); return; } + nexttoken(); + return; + } +} + +/* the dartmouth stuff */ +#ifdef HASDARTMOUTH +/* + * DATA is simply skipped when encountered as a command + */ +void xdata() { + while (!termsymbol()) nexttoken(); +} + +/* + * for READ find the next data record, helper of READ + */ +void nextdatarecord() { + address_t h; + mem_t s=1; + +/* save the location of the interpreter and the token we are processing */ + h=here; + +/* data at zero means we need to init it, by searching the first data record */ + if (data == 0) { + here=0; + while (here s.strdim) { error(EORANGE); return; } + +/* now write the string */ + assignstring(&s, &sr, sr.length); + +/* classical Apple 1 behaviour is string truncation in substring logic */ + newlength = lhs.i+sr.length-1; + setstringlength(&lhs.name, newlength, lhs.j); + + } + break; + default: + error(EUNKNOWN); + return; + } + +/* next list item */ + if (t0 == ',') goto nextdata; + +/* no nexttoken here as we have already a termsymbol */ + if (DEBUG) { + outsc("** leaving xread with "); outnumber(token); outcr(); + outsc("** at here "); outnumber(here); outcr(); + outsc("** and data pointer "); outnumber(data); outcr(); + } + +/* restore the token for further processing */ + token=t0; +} + +/* + * RESTORE sets the data pointer to zero right now + */ +void xrestore(){ + short rec; + + nexttoken(); + +/* a plain restore */ + if (termsymbol()) { + data=0; + datarc=1; + return; + } + +/* something with an argument */ + expression(); + if (!USELONGJUMP && er) return; + +/* we search a record */ + rec=pop(); + +/* if we need to search backward, back to the beginning */ + if (rec < datarc) { + data=0; + datarc=1; + } + +/* advance to the record or top */ + while (datarc < rec && data < top) nextdatarecord(); + +/* token is poisoned after nextdatarecord, need to cure this here */ + nexttoken(); +} + +/* + * DEF a function, functions are tokenized as FN ARRAYVAR to make + * name processing easy. + */ +void xdef(){ + address_t a; + + name_t function; /* the name of the function */ + name_t variable; /* the name of the argument */ + +/* do we define a function */ + if (!expect(TFN, EUNKNOWN)) return; + +/* the name of the function, it is tokenized as an array */ + if (!expect(ARRAYVAR, EUNKNOWN)) return; + + function=name; + function.token=TFN; /* set the right type here */ + +/* the argument variable */ + if (!expect('(', EUNKNOWN)) return; + nexttoken(); + if (token == ')') { + zeroname(&variable); + } else if (token == VARIABLE) { + variable=name; + nexttoken(); + } else { + error(EUNKNOWN); + return; + } + if (token != ')') { error(EUNKNOWN); return; } + +/* which type of function do we store is found in token */ + nexttoken(); + +/* ready to store the function */ + if (DEBUG) { + outsc("** DEF FN with function "); + outname(&function); + outsc(" and argument "); + outname(&variable); + outsc(" at here "); + outnumber(here); + outsc(" and token is "); + outnumber(token); + outcr(); + } + +/* find the function, we allow redefinition, currently only functions with 1 argument */ + if ((a=bfind(&function))==0) a=bmalloc(&function, 1); + if (DEBUG) {outsc("** found function structure at "); outnumber(a); outcr(); } + if (!USELONGJUMP && er) return; + +/* no more memory */ + if (a == 0) { error(EVARIABLE); return; } + +/* store the payload */ + +/* first the jump address */ + setaddress(a, memwrite2, here); + a=a+addrsize; + +/* the type of the return value - at the moment only numbers */ + if (token == '=') + memwrite2(a++, VARIABLE); + else + memwrite2(a++, 0); + +/* store the number of variables */ + memwrite2(a++, 1); + +/* store the type and the name of the variables */ + memwrite2(a++, variable.token); + setname_pgm(a, &variable); + a=a+sizeof(name_t)-1; /* useless now but needed later */ + +/* skip the function body during defintion */ + if (token == '=') { + while (!termsymbol()) nexttoken(); + } else { +#if defined(HASMULTILINEFUNCTIONS) + while (token != TFEND) { + nexttoken(); + if (token == TDEF || token == EOL) { error(EFUN); return; } + } + nexttoken(); +#else + error(EFUN); + return; +#endif + } +} + +/* + * FN function evaluation, this is a call from factor or directly from + * statement, the variable m tells xfn which one it is. 0 is from + * factor and 1 is from statement. + * + * This mechanism is only needed in multiline functions. In this case, + * a new interpreter instance is started with statement(). The variable + * m decides whether the stack should contain a return value (call from factor) + * or should be empty. + * + * The new function code has local variable capability of the new heap. + */ +void xfn(mem_t m) { + address_t a; + address_t h1, h2; + name_t variable; + token_t type; + +/* the name of the function and its address */ + if (!expect(ARRAYVAR, EUNKNOWN)) return; + name.token=TFN; + a=bfind(&name); + if (a == 0) {error(EUNKNOWN); return; } + + if (DEBUG) { outsc("** in xfn found function "); outname(&name); outsc(" at "); outnumber(a); outcr(); } + +/* and the argument */ + if (!expect('(', EUNKNOWN)) return; + nexttoken(); + +/* if there is no argument, set it to zero */ + if (token == ')') { + push(0); + } else { + expression(); + if (!USELONGJUMP && er) return; + } + if (token != ')') {error(EUNKNOWN); return; } + +/* where is the function code */ + h1=getaddress(a, memread2); + a=a+addrsize; + + if (DEBUG) { outsc("** found function address "); outnumber(h1); outcr(); } + +/* which type of function do we have*/ + type=memread2(a++); + + if (DEBUG) { outsc("** found function type "); outnumber(type); outcr(); } + +/* the number of variables is always one here */ + a++; + +/* what is the name of the variable, direct read as getname also gets a token */ +/* skip the type here as not needed*/ + variable.token=memread2(a++); + (void) getname(a, &variable, memread2); + a=a+sizeof(name_t)-1; + + if (DEBUG) { outsc("** found function variable "); outname(&variable); outcr(); } + +/* create a local variable and store the value in it if there is a variable */ + if (variable.c[0]) { + if (!bmalloc(&variable, 0)) { error(EVARIABLE); return; } + setvar(&variable, pop()); + } else { +/* create a dummy variable to make sure local variables are cleaned up */ + variable.token=VARIABLE; + variable.c[0]='_'; + variable.c[1]=0; + variable.l=1; + if (!bmalloc(&variable, 0)) { error(EVARIABLE); return; } + } + +/* store here and then evaluate the function */ + h2=here; + here=h1; + +/* for simple singleline function, we directly do experession evaluation */ + if (type == VARIABLE) { + if (DEBUG) {outsc("** evaluating expression at "); outnumber(here); outcr(); } + if (!expectexpr()) return; + } else { +#ifdef HASMULTILINEFUNCTIONS + +/* here comes the tricky part, we start a new interpreter instance */ + + if (DEBUG) {outsc("** starting a new interpreter instance "); outcr();} + + nexttoken(); + fncontext++; + if (fncontext > FNLIMIT) { error(EFUN); return; } + statement(); + if (!USELONGJUMP && er) return; + if (fncontext > 0) fncontext--; else error(EFUN); +#else + error(EFUN); + return; +#endif + } + +/* now that all the function stuff is done, return to here and set the variable right */ + here=h2; + (void) bfree(&variable); + + +/* now, depending on how this was called, make things right, we remove + the return value from the stack and call nexttoken */ + if (m == 1) { + pop(); + nexttoken(); + } +} + +/* + * ON is a bit like IF + */ + +void xon(){ + number_t cr, tmp; + int ci; + token_t t; + int line = 0; + +/* ON can do the ON ERROR and ON EVENT commands as well, in this BASIC + ERROR and EVENT can also be used without the ON */ + + nexttoken(); + switch(token) { +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + return; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + return; +#endif + default: + expression(); + if (!USELONGJUMP && er) return; + } + +/* the result of the condition, can be any number even large */ + cr=pop(); + if (DEBUG) { outsc("** in on condition found "); outnumber(cr); outcr(); } + +/* is there a goto or gosub */ + if (token != TGOSUB && token != TGOTO) { error(EUNKNOWN); return; } + +/* remember if we do gosub or goto */ + t=token; + +/* how many arguments have we got here */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args == 0) { error(EARGS); return; } + +/* do we have more arguments then the condition? */ + if (cr > args && cr <= 0) ci=0; else ci=(int)cr; + +/* now find the line to jump to and clean the stack, reuse cr + * we need to clean the stack here completely, therefore complete the loop + * ERROR handling is needed for the trapping mechanism. No using popaddress() + * here, because of the needed stack cleanup. Unclear is this precaution is + * really needed. + */ + while (args) { + tmp=pop(); + if (args == ci) { + if (tmp < 0) er=ELINE; + line=tmp; + } + args--; + } + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in on found line as target "); outnumber(line); outcr(); } + +/* no line found to jump to */ + if (line == 0) { + nexttoken(); + return; + } + +/* prepare for the jump */ + if (t == TGOSUB) pushgosubstack(0); + if (!USELONGJUMP && er) return; + + findline(line); + if (!USELONGJUMP && er) return; + +/* goto in interactive mode switched to RUN mode + no clearing of variables and stacks */ + if (st == SINT) st=SRUN; + +} +#endif + +/* the structured BASIC extensions, WHILE, UNTIL, and SWITCH */ + +#ifdef HASSTRUCT +void xwhile() { + +/* what? */ + if (DEBUG) { outsc("** in while "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points to the condition, name is irrelevant */ + pushloop(0, TWHILE, here, 0, 0); + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND and clear the stack*/ + if (!pop()) { + droploop(); + if (st == SINT) bi=ibuffer+here; + nexttoken(); + findbraket(TWHILE, TWEND); + nexttoken(); + } +} + +void xwend() { + blocation_t l; + bloop_t* loop; + +/* remember where we are */ + pushlocation(&l); + +/* back to the condition */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + +/* is this a while loop */ + if (loop->var.token != TWHILE ) { error(TWEND); return; } + +/* interactive run or program run */ + if (st == SINT) bi=ibuffer+loop->here; else here=loop->here; + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND */ + if (!pop()) { + droploop(); + poplocation(&l); + nexttoken(); + } +} + +void xrepeat() { + /* what? */ + if (DEBUG) { outsc("** in repeat "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points statement after repeat */ + pushloop(0, TREPEAT, here, 0, 0); + +/* we are done here */ + nexttoken(); +} + +void xuntil() { + blocation_t l; + bloop_t* loop; + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* remember the location */ + pushlocation(&l); + +/* look on the stack */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + +/* if false, go back to the repeat */ + if (!pop()) { + +/* the right loop type ? */ + if (loop->var.token != TREPEAT) { + error(TUNTIL); + return; + } + +/* correct for interactive */ + if (st == SINT) bi=ibuffer+loop->here; else here=loop->here; + + } else { + +/* back to where we were */ + droploop(); + poplocation(&l); + } + + nexttoken(); /* a bit of evil here, hobling over termsymbols */ +} + +void xswitch() { + number_t r; + mem_t match = 0; + mem_t swcount = 0; + blocation_t l; + +/* lets look at the condition */ + if (!expectexpr()) return; + r=pop(); + +/* remember where we are */ + pushlocation(&l); + +/* seek the first case to match the condition */ + while (token != EOL) { + if (token == TSWEND) break; + /* nested SWITCH - skip them all*/ + if (token == TSWITCH) { + + if (DEBUG) { outsc("** in SWITCH - nesting found "); outcr(); } + + nexttoken(); + findbraket(TSWITCH, TSWEND); + + if (DEBUG) { outsc("** in SWITCH SWEND found at "); outnumber(here); outcr(); } + + if (!USELONGJUMP && er) return; + } + /* a true case */ + if (token == TCASE) { + +/* more sophisticated, case can have an argument list */ + nexttoken(); + parsearguments(); + + if (DEBUG) { outsc("** in CASE found "); outnumber(args); outsc(" arguments"); outcr(); } + + if (!USELONGJUMP && er) return; + if (args == 0) { + error(TCASE); + return; + } + while (args > 0) { + if (pop() == r) match=1; + args--; + } + + if (match) { + return; + } + } + nexttoken(); + } + +/* return to the original location and continue if no case is found */ + poplocation(&l); +} + +/* a nacked case statement always seeks the end of the switch, + currently SWITCH statements cannot be nested. */ +void xcase() { + while (token != EOL) { + nexttoken(); + if (token == TSWEND) break; + } +} +#endif + + +/* + * statement processes an entire basic statement until the end + * of the line. + * + * The statement loop is a bit odd and requires some explanation. + * A statement function called in the central switch here must either + * call nexttoken as its last action to feed the loop with a new token + * and then break or it must return which means that the rest of the + * line is ignored. A function that doesn't call nexttoken and just + * breaks causes an infinite loop. + * + * statement is called once in interactive mode and terminates + * at end of a line. + */ + +void statement(){ + mem_t xc; + + if (DEBUG) bdebug("statement \n"); + +/* we can long jump out out any function now, making error handling easier */ +/* if we return here with a long jump, only the error handler is triggered */ +/* this mechanism always branches to the highest context */ +#if USELONGJUMP == 1 + if (fncontext == 0) if (setjmp(sthook)) goto errorhandler; +#endif + +/* the core loop processing commands */ + while (token != EOL) { +#ifdef HASSTEFANSEXT +/* debug level 1 happens only in the statement loop */ + if (debuglevel == 1) { debugtoken(); outcr(); } +#endif + switch(token){ + case ':': + case LINENUMBER: + nexttoken(); + break; +/* Palo Alto BASIC language set + BREAK */ + case TPRINT: + xprint(); + break; + case TLET: + nexttoken(); + if ((token != ARRAYVAR) && (token != STRINGVAR) && (token != VARIABLE)) { + error(EUNKNOWN); + break; + } + case STRINGVAR: + case ARRAYVAR: + case VARIABLE: + assignment(); + break; + case TINPUT: + xinput(); + break; + case TRETURN: +#ifndef HASMULTILINEFUNCTIONS + xreturn(); +#else + if (fncontext > 0) { + nexttoken(); + if (termsymbol()) { push(0); } + else expression(); + return; + } else + xreturn(); +#endif + break; +#ifndef HASMULTILINEFUNCTIONS + case TGOSUB: + case TGOTO: + xgoto(); + break; +#else + case TGOSUB: + if (fncontext > 0) { error(EFUN); return; } + case TGOTO: + xgoto(); + break; +#endif + case TIF: + xif(); + break; + case TFOR: + xfor(); + break; + case TNEXT: + xnext(); + break; + case TBREAK: + xbreak(); + break; + case TSTOP: + case TEND: /* return here because new input is needed, end as a block end is handles elsewhere */ + *ibuffer=0; /* clear ibuffer - this is a hack */ + st=SINT; /* switch to interactive mode */ + eflush(); /* if there is an EEPROM dummy, flush it here (protects flash storage!) */ + ofileclose(); + nexttoken(); + if (token == TSTOP) { + restartsystem(); + } + *ibuffer=0; /* clear ibuffer - this is a hack */ + st=SINT; /* switch to interactive mode */ + return; + case TLIST: + xlist(); + break; + case TNEW: /* return here because new input is needed */ + xnew(); + return; + case TCONT: /* cont behaves differently in interactive and in run mode */ + if (st==SRUN || st==SERUN) { + xcont(); + break; + } /* no break here, because interactively CONT=RUN minus CLR */ + case TRUN: + xrun(); + return; + case TREM: + xrem(); + break; +/* Apple 1 language set */ +#ifdef HASAPPLE1 + case TDIM: + xdim(); + break; + case TCLR: + xclr(); + break; + case TTAB: + case TSPC: + xtab(); + break; + case TPOKE: + xpoke(); + break; +#endif +/* Stefan's tinybasic additions */ + case TSAVE: + xsave(); + break; + case TLOAD: + xload(0); + if (st == SINT) return; /* interactive load doesn't like break as the ibuffer is messed up; */ + else break; +#ifdef HASSTEFANSEXT + case TDUMP: + xdump(); + break; + case TGET: + xget(); + break; + case TPUT: + xput(); + break; + case TSET: + xset(); + break; + case TNETSTAT: + xnetstat(); + break; + case TCLS: + ax=od; +/* if we have a display it is the default for CLS */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + od=ODSP; +#endif + outch(12); + od=ax; + nexttoken(); + break; + case TLOCATE: + xlocate(); + break; +/* low level functions as part of Stefan's extension */ + case TCALL: + xcall(); + break; +#endif +/* Arduino IO */ +#ifdef HASARDUINOIO + case TDWRITE: + xdwrite(); + break; + case TAWRITE: + xawrite(); + break; + case TPINM: + xpinm(); + break; + case TDELAY: + xdelay(); + break; +#ifdef HASTONE + case TTONE: + xtone(); + break; +#endif +#ifdef HASPULSE + case TPULSE: + xpulse(); + break; +#endif +#endif +/* BASIC DOS function */ +#ifdef HASFILEIO + case TCATALOG: + xcatalog(); + break; + case TDELETE: + xdelete(); + break; + case TOPEN: + xopen(); + break; + case TCLOSE: + xclose(); + break; + case TFDISK: + xfdisk(); + break; +#endif +/* graphics */ +#ifdef HASGRAPH + case TCOLOR: + xcolor(); + break; + case TPLOT: + xplot(); + break; + case TLINE: + xline(); + break; + case TRECT: + xrect(); + break; + case TCIRCLE: + xcircle(); + break; + case TFRECT: + xfrect(); + break; + case TFCIRCLE: + xfcircle(); + break; +#endif +#ifdef HASDARTMOUTH + case TDATA: + xdata(); + break; + case TREAD: + xread(); + break; + case TRESTORE: + xrestore(); + break; + case TDEF: + xdef(); + break; + case TON: + xon(); + break; +#ifdef HASMULTILINEFUNCTIONS + case TFN: + xfn(1); + break; + case TFEND: +/* we leave the statement loop and return to the calling expression() */ +/* if the function is ended with FEND we return 0 */ + if (fncontext == 0) { error(EFUN); return; } + else { push(0); return; } + break; +#endif +#endif +#ifdef HASSTEFANSEXT + case TELSE: + xelse(); + break; +#endif +#ifdef HASDARKARTS + case TEVAL: + xeval(); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + break; +#endif +#ifdef HASIOT + case TSLEEP: + xsleep(); + break; + case TWIRE: + xwire(); + break; +#endif +#ifdef HASTIMER + case TAFTER: + case TEVERY: + xtimer(); + break; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + break; +#endif +#ifdef HASSTRUCT + case TWHILE: + xwhile(); + break; + case TWEND: + xwend(); + break; + case TREPEAT: + xrepeat(); + break; + case TUNTIL: + xuntil(); + break; + case TSWITCH: + xswitch(); + break; + case TCASE: + xcase(); + break; + case TSWEND: + case TDO: + case TDEND: + nexttoken(); + break; +#endif +#ifdef HASEDITOR + case TEDIT: + xedit(); + break; +#endif + default: +/* strict syntax checking */ + error(EUNKNOWN); + goto errorhandler; + } + + +/* + * after each statement we check on a break character + * on an Arduino entering "#" at runtime stops the program + * for POSIXNONBLOCKING we do this in the background loop + * to avoid slowing down + */ +#if defined(BREAKCHAR) +#ifndef POSIXNONBLOCKING + if (checkch() == BREAKCHAR) { + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#else + if (breakcondition) { + breakcondition=0; + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#endif +#endif + +/* and after each statement, check the break pin */ +#if defined(BREAKPIN) + if (getbreakpin() == 0) { + st=SINT; + return; + }; +#endif + +/* and then there is also signal handling on some platforms */ +#if defined(POSIXSIGNALS) + if (breaksignal) { + st=SINT; + breaksignal=0; + serialflush(); + outcr(); + return; + } +#endif + +/* yield after each statement which is a 10-100 microsecond cycle + on Arduinos and the like, all background tasks are handled in byield */ + byield(); + +/* if error handling is compiled into the code, errors can be trapped here */ +errorhandler: +#ifdef HASERRORHANDLING + if (er) { + if (st != SINT) { + erh=er; + er=0; + switch(berrorh.type) { + case TCONT: + while(!termsymbol()) nexttoken(); + break; + case TGOTO: + findline(berrorh.linenumber); + berrorh.type=0; + berrorh.linenumber=0; + if (er) return; + break; + case 0: + return; + default: + nexttoken(); + } + } else + return; + } +#else +/* when an error is encountered the statement loop is ended */ + if (er) return; +#endif + +/* + * if we run error free, interrupts and times can be processed + * + * We can savely interrupt and return only if here points either to + * a termsymbol : or LINENUMBER. NEXT is a special case. We need to + * catch this here because empty FOR loops never even have a termsymbol + * a : is swallowed after FOR. + * + * the interrupts are only triggered in fncontext 0, i.e. in the + * main loop. While in functions, all interrupts are disabled. + * + */ +#ifdef HASTIMER + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* after is always processed before every */ + if (after_timer.enabled && fncontext == 0) { + if (millis() > after_timer.last + after_timer.interval) { + after_timer.enabled=0; + if (after_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + } + findline(after_timer.linenumber); + if (er) return; + } + } +/* periodic events */ + if (every_timer.enabled && fncontext == 0) { + if (millis() > every_timer.last + every_timer.interval) { + every_timer.last=millis(); + if (every_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + if (er) return; + } + findline(every_timer.linenumber); + if (er) return; + } + } + } +#endif + +/* the branch code for interrupts, we round robin through the event list */ +#ifdef HASEVENTS + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* interrupts */ + if (events_enabled && fncontext == 0) { + for (ax=0; ax 0) outsc("Filesystem started\n"); +#endif + +/* setup for all non BASIC stuff */ + bsetup(); + +/* get the BASIC memory, either as memory array with + ballocmem() or as an SPI serical memory */ +#if (defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR)) && MEMSIZE == 0 + himem=memsize=spirambegin(); +#else +#if defined(EEPROMMEMINTERFACE) +/* + * for an EEPROMMEM system, the memory consists of the + * EEPROM from 0 to elength()-eheadersize and then the RAM. + */ + himem=memsize=ballocmem()+(elength()-eheadersize); +#else + himem=memsize=ballocmem(); +#endif +#endif + +#ifndef EEPROMMEMINTERFACE + if (DEBUG) { outsc("** on startup, memsize is "); outnumber(memsize); outcr(); } + +/* be ready for a new program if we run on RAM*/ + xnew(); + + if (DEBUG) { outsc("** on startup, ran xnew "); outcr(); } +#else +/* if we run on an EEPROM system, more work is needed */ + if (eread(0) == 0 || eread(0) == 1) { /* have we stored a program and don't do new */ + top=getaddress(1, beread); + resetbasicstate(); /* the little brother of new, reset the state but let the program memory be */ + for (address_t a=elength(); a= sizeof(address_t) + * and that the entire memory is smaller than the positive + * part of number type (!!) + * + * we assume that float >= 4 bytes in the following + * + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: the index size of strings either + * 1 byte or 2 bytes - no other values supported + */ +#ifdef HASFLOAT +typedef float number_t; +typedef long wnumber_t; +#else +typedef int number_t; +typedef int wnumber_t; +#endif +typedef uint16_t address_t; /* this type addresses memory */ +/* use this for large memory systems, tested occassionally */ +// typedef uint32_t address_t; +typedef int8_t mem_t; /* a signed 8 bit type for the memory */ +typedef int index_t; /* this type counts at least 16 bit */ +#ifndef HASLONGTOKENS +typedef int8_t token_t; /* the type of tokens, normally mem_t with a maximum of 127 commands and data types */ +#else +typedef int16_t token_t; /* token type extension, allows an extra of 127 commands and symbols */ +#endif + +/* the memreader function type, a function accessing memory has to have this shape */ +typedef mem_t (*memreader_t)(address_t); +typedef void (*memwriter_t)(address_t, mem_t); + +/* the worker function type - experimental */ +typedef void (*bworkfunction_t)(); + +/* the location type, this is the cursor on the actual interpreter location */ +typedef struct { + address_t location; + token_t token; +} blocation_t; + + +/* the new string type used in the reimplementation of the string functions */ +/* + * stringlength_t is the maximum length of a string, currently only 2 bytes is really tested. + * one byte lengthes may work, will be fixed soon to arbitrary types + * + * string_t says where we can find a string. It is either in BASIC memory and has a valid BASIC memory + * address a, or it is in C memory outside mem[]. Then ir says where the string can be found. + * This is necessary because BASIC can handle different memory layouts, EEPROM models and serial + * memory chips. We cannot simply rely on data to be found in BASIC memory like in old 8 bit + * computers or all in C memory like on modern Linux/Windows/Mac systems. + * + * Components of the string_t: + * - the address of the string in BASIC memory + * - the C memory pointer ir to the string location, if this is 0, the string is somewhere outside C memory + * - the length of the entire string + * - the dimension of the string strdim, this is the length of the memory segment reserved for the string + * - the dimension of the string array, arraydim + */ + +typedef uint16_t stringlength_t; + +typedef struct { + address_t address; + char* ir; + stringlength_t length; + address_t strdim; + address_t arraydim; +} string_t; + +/* + * Two types for identifiying objects and lefthandsides. + * name_t is the type for variable names and types. + * lhsobject_t identifies an assignable object like variables, + * arrays and strings. + * + * Currently name_t only implements two letter objects and lhsobject_t + * only implements two dimensional arrays and one dimensional strings. + */ +typedef struct { + token_t token; + mem_t c[MAXNAME]; + mem_t l; +} name_t; + +/* used to identify mostly lefthandsides and some righthandsides with these conventions */ +typedef struct { + name_t name; /* the name of a variable */ + address_t i; /* the start value of a substring or the first index of a number array */ + address_t j; /* the second index of an array */ + address_t i2; /* the second value of a substring string */ + mem_t ps; /* flag to indicate a pure string */ +} lhsobject_t; + +/* heap objects have a name a size and a payload address */ +typedef struct { + name_t name; + address_t address; + address_t size; +} heap_t; + +/* + * a general loop time, needed for the reimplementation of all loops + * the loop time knows the variable of a for loop or alternatively + * the type of the for loop. For this the token field of the name is + * reused. At also knows the here address of the loops beginning and optinally + * the end and the step + */ +typedef struct { + name_t var; + address_t here; + number_t to; + number_t step; +} bloop_t; + + +/* + * The accumulator type, used for the stack and the + * arithmetic operations. + */ +typedef union { + number_t n; + address_t a; + index_t i; + stringlength_t s; + mem_t c[sizeof(number_t)]; +} accu_t; + +/* the timer type, knows the linenumber and all the data of the timer */ +typedef struct { + mem_t enabled; + unsigned long last; + unsigned long interval; + mem_t type; + address_t linenumber; +} btimer_t; + +/* + * The events API for Arduino with interrupt service routines + * analogous to the timer API. + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + */ + +/* event type for external events */ +typedef struct { + mem_t enabled; + mem_t pin; + mem_t mode; + mem_t type; + address_t linenumber; + mem_t active; +} bevent_t; + +/* + * Function prototypes, ordered by layers + * HAL - hardware abstraction + * Layer 0 - memory and I/O + * Layer 1 - Program storage and control + * Layer 2 - Where stuff happens + */ + +/* + * Layer 0 functions - I/O and memory management + */ + +/* event types and functions */ +void bintroutine0(); +void bintroutine1(); +void bintroutine2(); +void bintroutine3(); +mem_t enableevent(mem_t); +void disableevent(mem_t); +mem_t eventindex(mem_t); +mem_t addevent(mem_t, mem_t, mem_t, address_t); +void deleteevent(mem_t); +volatile bevent_t* findevent(mem_t); + +/* make room for BASIC */ +address_t ballocmem(); + +/* handle files im EEPROM */ +void eload(); +void esave(); +char autorun(); + +/* the variable heap from Apple 1 BASIC */ +address_t bmalloc(name_t*, address_t); +address_t bfind(name_t*); +address_t bfree(name_t*); +address_t blength (name_t*); + +/* normal variables of number_t */ +number_t getvar(name_t*); +void setvar(name_t*, number_t); +void clrvars(); + +/* the new set of functions for memory access */ +number_t getnumber(address_t, memreader_t); +address_t getaddress(address_t, memreader_t); +stringlength_t getstrlength(address_t, memreader_t); +void setnumber(address_t, memwriter_t, number_t); +void setaddress(address_t, memwriter_t, address_t); +void setstrlength(address_t, memwriter_t, stringlength_t); + +/* setting names */ +address_t setname_heap(address_t, name_t*); +address_t setname_pgm(address_t, name_t*); +address_t getname(address_t, name_t*, memreader_t); +mem_t cmpname(name_t*, name_t*); +void zeroname(name_t*); +void zeroheap(heap_t*); + +/* array and string handling */ +/* the multidim extension is experimental, here only 2 array dimensions implemented as test */ +address_t createarray(name_t*, address_t, address_t); +void array(lhsobject_t*, mem_t, number_t*); +address_t createstring(name_t*, address_t, address_t); +void getstring(string_t*, name_t*, address_t, address_t); +void setstringlength(name_t*, address_t, address_t); + +/* the user defined extension functions */ +number_t getusrvar(); +void setusrvar(number_t); +number_t getusrarray(address_t); +void setusrarray(address_t, number_t); +void makeusrstring(); +number_t usrfunction(address_t, number_t); +void usrcall(address_t); + +/* get keywords and tokens from PROGMEM */ +char* getkeyword(address_t); +char* getmessage(char); +token_t gettokenvalue(address_t); +void printmessage(char); + +/* error handling */ +void error(token_t); +void reseterror(); +void debugtoken(); +void bdebug(const char*); + +/* the arithemtic stack */ +void push(number_t); +number_t pop(); +address_t popaddress(); +void drop(); +void clearst(); + +/* READ DATA handling */ +void clrdata(); + +/* FOR NEXT GOSUB stacks */ +void pushforstack(name_t*, number_t, number_t); +void popforstack(name_t*, number_t*, number_t*); +void dropforstack(); +void clrforstack(); +void pushgosubstack(mem_t); +void popgosubstack(); +void dropgosubstack(); +void clrgosubstack(); + +/* handling location rewinds */ +void pushlocation(blocation_t*); +void poplocation(blocation_t*); + +/* signal handling */ +void signalon(); +void signaloff(); +void signalhandler(int); + +/* output */ +void outcr(); +void outspc(); +void outsc(const char*); +void outscf(const char *, index_t); + +/* output a name */ +void outname(name_t*); + +/* I/O of number_t - floats and integers */ +address_t parsenumber(char*, number_t*); +address_t parsenumber2(char*, number_t*); +address_t writenumber(char*, wnumber_t); +address_t writenumber2(char*, number_t); +address_t tinydtostrf(number_t, index_t, char*); +int innumber(number_t*, char*, address_t); +void outnumber(number_t); + +/* + * Layer 1 functions, provide data and do the heavy lifting + * for layer 2 including lexical analysis, storing programs + * and expression evaluation + */ + +/* lexical analysis */ +void whitespaces(); +void nexttoken(); + +/* storing and retrieving programs */ +char nomemory(number_t); +void storetoken(); +mem_t memread(address_t); +mem_t memread2(address_t); +void memwrite2(address_t, mem_t); +mem_t beread(address_t); +void beupdate(address_t, mem_t); +void gettoken(); +void firstline(); +void nextline(); + +void clrlinecache(); +void addlinecache(address_t, address_t); +address_t findinlinecache(address_t); +void findline(address_t); +address_t myline(address_t); +void moveblock(address_t, address_t, address_t); +void zeroblock(address_t, address_t); +void diag(); +void storeline(); + +/* read arguments from the token stream and process them */ +char termsymbol(); +char expect(token_t, mem_t); +char expectexpr(); +void parsearguments(); +void parsenarguments(char); +void parsesubscripts(); +void parsefunction(void (*)(), short); +void parseoperator(void (*)()); +void parsesubstring(); + +/* mathematics and other functions for int and float */ +void xabs(); +void xsgn(); +void xpeek(); +void xmap(); +number_t rnd(); +void xrnd(); +void sqr(); +void xpow(); +number_t bpow(number_t, number_t); + +/* string values and string evaluation */ +void parsestringvar(string_t*, lhsobject_t*); +char stringvalue(string_t*); +void streval(); + +/* floating point functions */ +void xsin(); +void xcos(); +void xtan(); +void xatan(); +void xlog(); +void xexp(); +void xint(); + +/* expression evaluation */ +void factor(); +void power(); +void term(); +void addexpression(); +void compexpression(); +void notexpression(); +void andexpression(); +void expression(); + +/* real time clock string stuff */ +void rtcmkstr(); + +/* + * Layer 2 - statements and functions + * use the global variables + */ + +/* basic commands of the core language set */ +void xprint(); +void getstringtobuffer(string_t*, char*, stringlength_t); +void lefthandside(lhsobject_t*); +void assignnumber(lhsobject_t, number_t); +void assignstring(string_t*, string_t*, stringlength_t); +void assignment(); +void showprompt(); +void xinput(); +void xgoto(); +void xreturn(); +void xif(); + +/* FOR NEXT loops */ +void findnextcmd(); +void findbraket(token_t, token_t); +void xfor(); +void xbreak(); +void xcont(); +void xnext(); + +/* WHILE WEND*/ +void xwhile(); +void xwend(); + +/* REPEAT UNTIL */ +void xrepeat(); +void xuntil(); + +/* control commands and misc */ +void outputtoken(); +void xlist(); +void xrun(); +void xnew(); +void xrem(); +void xclr(); +void xdim(); +void xpoke(); +void xtab(); +void xdump(); +void dumpmem(address_t, address_t, char); +void xlocate(); + +/* file access and other i/o */ +void stringtobuffer(char*, string_t*); +void getfilename(char*, char); +void xsave(); +void xload(const char*); +void xget(); +void xput(); +void xset(); +void xnetstat(); + +/* Arduino IO control interface */ +void xaread(); +void xdread(); +void xdwrite(); +void xawrite(); +void xpinm(); +void xdelay(); +void xtone(); +void btone(int); +void bpulsein(); + +/* graphics commands */ +void xcolor(); +void xplot(); +void xline(); +void xrect(); +void xcircle(); +void xfrect(); +void xfcircle(); + +/* the darkarts */ +void xmalloc(); +void xfind(); +void xeval(); + +/* IoT commands */ +void xavail(); +void xfsensor(); +void xsleep(); +void xwire(); +void xfwire(); + +/* timers */ +void xafter(); +void xevent(); + +/* File I/O functions */ +char streq(const char*, char*); +void xcatalog(); +void xdelete(); +void xopen(); +void xfopen(); +void xclose(); +void xfdisk(); + +/* low level access functions */ +void xcall(); +void xusr(); + +/* the dartmouth stuff */ +void xdata(); +void nextdatarecord(); +void xread(); +void xrestore(); +void xdef(); +void xfn(mem_t); +void xon(); + +/* timers and interrupts */ +void xtimer(); +void resettimer(btimer_t*); + +/* structured BASIC extensions */ +void xwhile(); +void xwend(); +void xrepeat(); +void xuntil(); +void xswitch(); +void xcase(); +void xendswitch(); + +/* the editor */ +void xedit(); + +/* the statement loop */ +void statement(); + +/* the extension functions */ +void bsetup(); +void bloop(); diff --git a/data/Basic2/RaspPi/hardware.h b/data/Basic2/RaspPi/hardware.h new file mode 100644 index 0000000000000000000000000000000000000000..36cc99af70e05eeb9c089db5d8272b4b33303c0b --- /dev/null +++ b/data/Basic2/RaspPi/hardware.h @@ -0,0 +1,214 @@ +/* + * + * $Id: hardware.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * + * Runtime environment for the BASIC interpreter, the + * hardware configuration file. It contains all hardware + * related settings and dependencies. + * + * This is hardware.h for POSIX systems and the POSIX runtime + * environment runtime.c. + * + * Default setting is POSIX for most UNIXes including Mac. + * RASPPI activates Raspberry PI related features. + * MINGW activates windows related features. + * MSDOS for MSDOS compiles with tc 2.0 (untested in this version, last tested in 1.4) + * + */ + +#undef MINGW +#undef MSDOS +#define RASPPI +#undef POSIX + +/* + * Hardware flags of the POSIX systems + * POSIXTERMINAL, POSIXVT52TOANSI: ensure compatibility of BASIC programs + * control characters of BASIC are translated to ANSI, bringing the Aruino + * VT52 commands to POSIX + * POSIXSIGNALS: enables signal handling of ^C interrupting programs + * POSIXNONBLOCKING: non blocking I/O to handle GET and the BREAKCHAR + * tricky on DOS, not very portable, experimental, use signals instead + * POSIXFRAMEBUFFER: directly draw to the frame buffer of Raspberry PI + * only tested on this platform + * POSIXWIRE: simple Raspberry PI wire code + * POSIXMQTT: analogous to ARDUINOMQTT, send and receive MQTT messages (unfinished) + * POSIXWIRING: use the (deprectated) wiring code for gpio on Raspberry Pi + * POSIXPIGPIO: use the pigpio library on a Raspberry PI + */ + +#define POSIXTERMINAL +#define POSIXVT52TOANSI +#define POSIXSIGNALS +#undef POSIXNONBLOCKING +#undef POSIXFRAMEBUFFER +#undef POSIXWIRE +#undef POSIXMQTT +#undef POSIXWIRING +#undef POSIXPIGPIO + +/* simulates SPI RAM, only test code, keep undefed if you don't want to do something special */ +#undef SPIRAMSIMULATOR + +#ifdef SPIRAMSIMULATOR +#define USEMEMINTERFACE +#endif + +/* use a serial port as printer interface - unfinished - similar to Arduino */ +#define POSIXPRT + +/* use TAB in MS mode */ +#define HASMSTAB + +/* used pins and other parameters */ + +/* set this is you want pin 4 on low interrupting the interpreter */ +/* #define BREAKPIN 4 */ +#define BREAKPIN 4 + +/* the SIGNAL the interpreters listens to for interrupt */ +#define BREAKSIGNAL SIGINT + +/* in case of non blocking IO turn on background tasks */ +#ifdef POSIXNONBLOCKING +#define BASICBGTASK +#endif + +/* frame buffer health check - currently only supported on Raspberry */ +#ifndef RASPPI +#undef POSIXFRAMEBUFFER +#endif + +/* wire parameters for Raspberry*/ +#define POSIXI2CBUS 1 + +/* the size of the EEPROM dummy */ +#define EEPROMSIZE 1024 + +/* they all have this */ +#define FILESYSTEMDRIVER + +/* and they have this */ +#define HASCLOCK + +/* some have this */ +#if defined(POSIXWIRE) && defined(POSIXPIGPIO) +#define HASWIRE +#endif + +/* we can do graphics and tell language.h that we can */ +#ifdef POSIXFRAMEBUFFER +#define DISPLAYHASGRAPH +#endif + +/* after run behaviour on POSIX systems, 1 to terminate if started + on the command line with a file argument, 0 to stay active and + show a BASIC prompt*/ +#define TERMINATEAFTERRUN 1 + +/* + * all the things the POSIX platforms need to source + */ + +/* define all the types Arduino has for compatibility of the interface */ + +typedef unsigned char uint8_t; +typedef signed char int8_t; +typedef unsigned short uint16_t; +typedef signed short int16_t; +typedef unsigned char byte; +typedef unsigned long long uint64_t; +typedef unsigned int uint32_t; + +/* + * additional prototypes in an non Arduino world + */ +unsigned long millis(); + +/* the ususal suspects */ +#include +#include + +/* floating point maths only needed if HASFLOAT*/ +#include +#include + +/* time stuff */ +#include +#include +#include + +/* directories and files */ +#ifndef MSDOS +#include +#include +#else +#include +#include +#endif + +/* windowy things for windows */ +#ifdef MINGW +#include +#endif + +/* + * Tell BASIC we have a second serial port + */ +#ifdef POSIXPRT +#define HASSERIAL1 +#endif + +/* + * Tell BASIC we have a radio adapter + */ +#undef HASRF24 + +/* + * Tell BASIC we have MQTT + */ +#ifdef POSIXMQTT +#define HASMQTT +#endif + +/* we definitely don't run on an Arduino */ +#undef ARDUINOPROGMEM +#define PROGMEM +#undef ARDUINO + +/* and we use the buffer sizes for real computers */ +#define BUFSIZE 256 +#define STACKSIZE 256 +#define GOSUBDEPTH 64 +#define FORDEPTH 64 +#define LINECACHESIZE 64 + +/* the buffer size for simulated serial RAM */ +#define SPIRAMSBSIZE 512 + +/* + * This code measures the fast ticker frequency in microseconds + * Activate this only for test purposes. Not really useful on POSIX. + */ +#define FASTTICKERPROFILE + +/* + * Does the platform has command line args and do we want to use them + */ +#define HASARGS + +/* + * How restrictive are we on function recursive calls to protect the stack + * On Posix systems we can be more generous. + */ +#define FNLIMIT 128 + diff --git a/data/Basic2/RaspPi/language.h b/data/Basic2/RaspPi/language.h new file mode 100644 index 0000000000000000000000000000000000000000..8492230ef5cd518ed14196454a0bc60edcbd99ab --- /dev/null +++ b/data/Basic2/RaspPi/language.h @@ -0,0 +1,340 @@ +/* + * + * $Id: language.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * This is the language definition file. Edit this to set the language + * capabilities. + * + * MEMSIZE sets the BASIC main memory to a fixed value, + * if MEMSIZE=0 a heuristic is used based on free heap + * size and architecture parameters + */ +#define MEMSIZE 0 + +/* + * DEBUG switches on compiled debug mode. Consider using runtime + * debug with SET 0,x before using this. + */ +#define DEBUG 0 + +/* + * Interpreter feature sets, choose one of the predefines or undefine all predefines and set the + * features in custom settings + * + * BASICFULL: full language set, use this with flash >32kB - ESPs, MKRs, Mega2560, RP2040, UNO R4 + * BASICINTEGER: integer BASIC with full language, use this with flash >32kB + * BASICSIMPLE: integer BASIC with reduced language set, 32kB capable - for UNOs with a lot of device drivers + * BASICSIMPLEWITHFLOAT: a small floating point BASIC, 32kB capable, for UNOs - good for UNOs with the need of float + * BASICTINYWITHFLOAT: a floating point tinybasic, if you have 32kB and need complex device drivers + * BASICMINIMAL: minimal language, just Palo Alto plus Arduino I/O, works on 168 with 1kB RAM and 16kB flash + * + */ +#define BASICFULL +#undef BASICINTEGER +#undef BASICSIMPLE +#undef BASICMINIMAL +#undef BASICSIMPLEWITHFLOAT +#undef BASICTINYWITHFLOAT + +/* + * Custom settings undef all the the language sets above when you are using this. Not all language + * features work in all combinations. + * + * HASAPPLE1: Apple 1 BASIC compatibility. This is the base for all other features. + * In this version the interpreter has a heap, a string pool and one dimensional arrays. + * HASARDUINOIO: Arduino I/O functions, including millis() timer. + * HASFILEIO: file I/O functions, including open, close, read, write, remove, rename. + * HASTONE: tone() and noTone() functions for sound output mapped to the PLAY command. + * HASPULSE: pulseIn() function for measuring pulse lengths. Pulse output. Both mapped to the PULSE command. + * HASSTEFANSEXT: Stefan's BASIC extensions, including ELSE, PUT, GET, advanced FOR loops, SQR and POW. + * HASERRORMSG: error messages for syntax and runtime errors. + * HASVT52: VT52 terminal emulation for text output. + * HASFLOAT: floating point support. + * HASGRAPH: graphics support, including line, circle, rectangle, fill, color. + * HASDARTMOUTH: Dartmouth BASIC compatibility: single line DEF FN, ON, READ, DATA. + * HASDARKARTS: Dark Arts BASIC is MALLOC, FIND, CLR for individual variables and EVAL for self modifying code. + * HASIOT: IoT functions, Wire access, Sensor functions, MQTT. Needs strings and heap. STR, VAL, INSTR are + * part of this. MQTT support only on Arduino- + * HASMULTIDIM: two dimensional arrays and one dimensional string arrays. + * HASTIMER: timer functions, AFTER and EVERY for periodic execution of programs. + * HASEVENTS: event handling, EVENT command. + * HASERRORHANDLING: error handling with ERROR GOTO. + * HASSTRUCT: structured language elements, WHILE WEND, REPEAT UNTIL, SWITCH CASE. Multi line IF THEN ELSE + * with the DO DEND construct. + * HASMSSTRINGS: MS Basic compatible strings, RIGHT$, LEFT$, MID$, ASC, CHR$, and string addition with +. + * Compatibility to MS BASICs is limited as this BASIC has only inplace string operations- + * HASMULTILINEFUNCTIONS: multi line functions, DEF FN, FEND. + * HASEDITOR: line editor for the console. + * HASTINYBASICINPUT: Tiny BASIC compatible input using the expression parser. Expressions and variables + * are valid number input with it. Default now but can have odd side effects. + * HASLONGNAMES: long variable names, up to 16 characters. Name length is set by MAXNAME in basic.h and + * can be any value <128 bytes. Names are still only uppercase and all names will be uppercased by lexer. + * + */ + +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES + +/* + * + * Odd stuff - these things change the behaviour of BASIC in some aspects. + * They can be used to make the interpreter compatible with other dialects. + * + * POWERRIGHTTOLEFT: normally the ^ operator works from left to right + * which means 2^3^2 = (2^3)^2 = 8^2 = 64. Setting this flag would + * change the behaviour to 2^3^2 = 2^(3^2) = 512 + * MSARRAYLIMITS: in BASIC arrays start at 1 and DIM A(10) creates 10 + * elements. With MSARRAYLIMITS defined, arrays start at 0 and have + * n+1 elements. This can be changed at any time with SET 21,0 or 1. + * SUPPRESSSUBSTRINGS: switch off substring logic by default, makes only sense with + * HASMSSTRINGS activated. With this, the syntax of strings and string + * arrays is comaptible to MS strings (only used to preset the variable now). + * SET 20 can change this at runtime. + * USELONGJUMP: use the longjmp feature of C. This greatly simplifies + * error handling at the cost of portability to some MCU platforms + * currently only experimental. It costs memory for the jump buffer. + * Don't use it on very small systems. LONGJUMP must be set to 0 or 1 as + * it is used in boolean expression in the code + * BOOLEANMODE: switch the behaviour of BASICs boolean operators. Default (-1) + * is to cast all numbers to signed 16bit and then do bitwise arithemtic. + * In this mode false is 0 and -1 is true. (1) is C style boolean arithemtic. + * In this mode true is 1 and false is 0. AND and OR still do bitwise operations + * but NOT is C not. SET 19,1 or -1 can change this at runtime. + * HASFULLINSTR: the full C64 style INSTR command. Without this flag INSTR only accepts + * a single character as argument. This is much faster and leaner on an Arduino. + * This macro is activated when HASMSSTRINGS is set. + * + */ +#undef POWERRIGHTTOLEFT +#undef MSARRAYLIMITS +#undef SUPPRESSSUBSTRINGS +#define USELONGJUMP 0 +#define BOOLEANMODE -1 +#undef HASFULLINSTR + +/* Palo Alto plus Arduino functions */ +#ifdef BASICMINIMAL +#undef HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#undef HASSTEFANSEXT +#undef HASERRORMSG +#undef HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* all features minus float and tone */ +#ifdef BASICINTEGER +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#endif + +/* a simple integer basic for small systems (UNO etc) */ +#ifdef BASICSIMPLE +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#define HASIOT +#undef HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* all features activated */ +#ifdef BASICFULL +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#endif + +/* a simple BASIC with float support */ +#ifdef BASICSIMPLEWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* a Tinybasic with float support */ +#ifdef BASICTINYWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* + * Language feature dependencies + * + * Dartmouth and darkarts needs the heap which is in Apple 1 + * IoT needs strings and the heap, also Apple 1 + * + * String arrays need multi dimensional capabilities + * + * The structured language set needs ELSE from STEFANSEXT + * + */ +#if defined(HASMULTILINEFUNCTIONS) +#define HASDARTMOUTH +#endif + +#if defined(HASDARTMOUTH) || defined(HASDARKARTS) || defined(HASIOT) || defined(HASMSSTRINGS) +#define HASAPPLE1 +#endif + +#if defined(HASSTRUCT) +#define HASSTEFANSEXT +#endif + +/* MS strings also bring the full INSTR */ +#if defined(HASMSSTRINGS) +#define HASFULLINSTR +#endif + +/* dependencies on the hardware */ +#if !defined(DISPLAYHASGRAPH) +#undef HASGRAPH +#endif + + + diff --git a/data/Basic2/RaspPi/runtime.c b/data/Basic2/RaspPi/runtime.c new file mode 100644 index 0000000000000000000000000000000000000000..98c60b635fac67347ee6fcffd62cf7793b62a6b1 --- /dev/null +++ b/data/Basic2/RaspPi/runtime.c @@ -0,0 +1,2032 @@ +/* + * + * $Id: runtime.c,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * This is the Posix runtime environment for BASIC. It maps the functions + * needed for the various subsystems to the MCU specific implementations. + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * + * Configure the hardware settings in hardware.h. + * + */ + +#include "hardware.h" +#include "runtime.h" + +/* a small character buffer to receive strings */ +#define CBUFSIZE 4 +char* cbuffer[CBUFSIZE]; + +/* if the BASIC interpreter provides a loop function it will superseed this one */ +#ifndef MSDOS +void __attribute__((weak)) bloop() {} +#else +void bloop() {} +#endif + + +/* + * Global variables of the runtime env. + */ + +int8_t id; // active input stream +int8_t od; // active output stream +int8_t idd = ISERIAL; // default input stream in interactive mode +int8_t odd = OSERIAL; // default output stream in interactive mode +int8_t ioer = 0; // the io error variable, always or-ed with ert in BASIC + +/* counts the outputed characters on streams 0-3, used to emulate a real tab */ +#ifdef HASMSTAB +uint8_t charcount[3]; /* devices 1-4 support tabing */ +#endif + +/* the pointer to the buffer used for the &0 device */ +char* nullbuffer = ibuffer; +uint16_t nullbufsize = BUFSIZE; + +/* the system type */ +#if defined(MSDOS) +uint8_t bsystype = SYSTYPE_MSDOS; +#elif defined(RASPPI) +uint8_t bsystype = SYSTYPE_PASPPI; +#elif defined(MINGW) +uint8_t bsystype = SYSTYPE_MINGW; +#elif defined(POSIX) +uint8_t bsystype = SYSTYPE_POSIX; +#else +uint8_t bsystype = SYSTYPE_UNKNOWN; +#endif + +/* libraries from OSes */ + +/* Wiring Code, which library to use */ +#ifdef POSIXWIRING +#include +#endif + +#ifdef POSIXPIGPIO +#include +#undef POSIXWIRING +int pigpio_pi = 0; +#endif + +/* + * Default serial baudrate and serial flags for the + * two supported serial interfaces. Serial is always active and + * connected to channel &1 with 9600 baud. + * + * channel 4 (POSIXPRT) can be either in character or block + * mode. Blockmode is set as default here. This means that all + * available characters are always loaded to a string -> inb() + */ +/* + * Arduino default serial baudrate and serial flags for the + * two supported serial interfaces. Set to 0 on POSIX OSes + */ +const uint16_t serial_baudrate = 0; +const uint16_t serial1_baudrate = 0; +uint8_t sendcr = 0; +uint8_t blockmode = 0; + +/* + * Input and output functions. + * + * ioinit(): called at setup to initialize what ever io is needed + * outch(): prints one ascii character + * inch(): gets one character (and waits for it) + * checkch(): checks for one character (non blocking) + * ins(): reads an entire line (uses inch except for pioserial) + * + */ +void ioinit() { + +/* a standalone system runs from keyboard and display */ +#ifdef STANDALONE + idd = IKEYBOARD; + odd = ODSP; +#endif + +/* run standalone on second serial, set the right parameters */ +#ifdef STANDALONESECONDSERIAL + idd = ISERIAL1; + odd = OPRT; + blockmode = 0; + sendcr = 0; +#endif + +/* signal handling - by default SIGINT which is ^C is always caught and + leads to program stop. Side effect: the interpreter cannot be stopped + with ^C, it has to be left with CALL 0, works on Linux, Mac and MINGW + but not on DOSBOX MSDOS as DOSBOS does not handle CTRL BREAK correctly + DOS can be interrupted with the CONIO mechanism using BREAKCHAR. +*/ + signalon(); + +/* this is only for RASPBERRY - wiring has to be started explicitly */ + wiringbegin(); + +/* all serial protocolls, ttl channels, SPI and Wire */ + serialbegin(); + +#ifdef POSIXPRT + prtbegin(); +#endif +#ifdef ARDUINOSPI + spibegin(); +#endif +#ifdef HASWIRE + wirebegin(); +#endif + +/* filesystems and networks */ + fsbegin(); +#ifdef POSIXMQTT + netbegin(); + mqttbegin(); +#endif + +/* the keyboards */ +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + kbdbegin(); +#endif +/* the displays */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + dspbegin(); +#endif +#if defined(ARDUINOVGA) || defined(POSIXFRAMEBUFFER) + vgabegin(); /* mind this - the fablib code and framebuffer is special here */ +#endif +/* sensor startup */ +#ifdef ARDUINOSENSORS + sensorbegin(); +#endif +/* clocks and time */ +#if defined(HASCLOCK) + rtcbegin(); +#endif + +/* the eeprom dummy */ + ebegin(); + +/* activate the iodefaults */ + iodefaults(); +} + +void iodefaults() { + od=odd; + id=idd; +} + +/* + * Layer 0 - The generic IO code + * + * inch() reads one character from the stream, mostly blocking + * checkch() reads one character from the stream, unblocking, a peek(), + * inmplemented inconsistently + * availch() checks availablibity in the stream + * inb() a block read function for serial interfacing, developed for + * AT message receiving + */ + +/* this is odd ;-) */ +int cheof(int c) { if ((c == -1) || (c == 255)) return 1; else return 0; } + +/* the generic inch code reading one character from a stream */ +char inch() { + switch(id) { + case ONULL: + return bufferread(); + case ISERIAL: + return serialread(); +#ifdef POSIXPRT + case ISERIAL1: + return prtread(); +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) + case IKEYBOARD: +#if defined(HASVT52) + if (vt52avail()) return vt52read(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdread(); +#endif +#endif +#if defined(HASWIRE) && defined(HASFILEIO) + case IWIRE: + return wireread(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioread(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttread(); +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileread(); +#endif + } + return 0; +} + +/* + * checking on a character in the stream, this is + * normally only used for interrupting a program, + * for many streams this is just mapped to avail + */ +char checkch(){ + switch (id) { + case ONULL: + return buffercheckch(); + case ISERIAL: + return serialcheckch(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttcheckch(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return 0; +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtcheckch(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdcheckch(); /* here no display read as this is only for break and scroll control */ +#endif + break; + } + return 0; +} + +/* character availability */ +uint16_t availch(){ + switch (id) { + case ONULL: + return bufferavailable(); + case ISERIAL: + return serialavailable(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttavailable(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return wireavailable(); +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtavailable(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) +#if defined(HASVT52) + if (vt52avail()) return vt52avail(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdavailable(); +#endif +#endif + break; + } + return 0; +} + +/* + * the block mode reader for esp and sensor modules + * on a serial interface, it tries to read as many + * characters as possible into a buffer + * blockmode = 1 reads once availch() bytes + * blockmode > 1 implements a timeout mechanism and tries + * to read until blockmode milliseconds have expired + * this is needed for esps and other sensors without + * flow control and volatile timing to receive more + * then 64 bytes + */ + +uint16_t inb(char *b, int16_t nb) { + long m; + uint16_t z; + int16_t i = 0; // check this + + if (blockmode == 1) { + i=availch(); + if (i>nb-1) i=nb-1; + b[0]=(unsigned char)i; + z=i; + b[i+1]=0; + b++; + while (i--) {*b++=inch();} + } else if (blockmode > 1) { + m=millis(); + while (i < nb-1) { + if (availch()) b[++i]=inch(); + if (millis() > m+blockmode) break; + } + b[0]=(unsigned char)i; + z=i; + b[i+1]=0; + } else { + b[0]=0; + z=0; + b[1]=0; + } + return z; +} + +/* + * reading from the console with inch, local echo is handled by the terminal + */ +uint16_t consins(char *b, uint16_t nb) { + char c; + uint16_t z; + + z=1; + while(z < nb) { + c=inch(); + if (c == '\r') c=inch(); + if (c == '\n' || cheof(c)) { /* terminal character is either newline or EOF */ + break; + } else { + b[z++]=c; + } + } + b[z]=0x00; + z--; + b[0]=(unsigned char)z; + return z; +} + + +/* + * ins() is the generic reader into a string, by default + * it works in line mode and ends reading after newline + * + * the first element of the buffer is the lower byte of the length + * + * this is corrected later in xinput, z.a has to be set as + * a side effect + * + * for streams providing entire strings as an input the + * respective string method is called + * + * all other streams are read using consins() for character by character + * input until a terminal character is reached + */ +uint16_t ins(char *b, uint16_t nb) { + switch(id) { + case ONULL: + return bufferins(b, nb); + case ISERIAL: + return serialins(b, nb); + break; +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + case IKEYBOARD: + return kbdins(b, nb); +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtins(b, nb); + #endif +#if defined(HASWIRE) && defined(HASFILEIO) + case IWIRE: + return wireins(b, nb); +#endif +#ifdef HASRF24 + case IRADIO: + return radioins(b, nb); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttins(b, nb); +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + return consins(b, nb); +#endif + default: + b[0]=0; b[1]=0; + return 0; + } +} + +/* + * outch() outputs one character to a stream + * block oriented i/o like in radio not implemented here + */ +void outch(char c) { + +/* do we have a MS style tab command, then count characters on stream 1-4 but not in fileio */ +/* this does not work for control characters - needs to go to vt52 later */ + +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) { + if (c > 31) charcount[od-1]+=1; + if (c == 10) charcount[od-1]=0; + } +#endif + + switch(od) { + case ONULL: + bufferwrite(c); + break; + case OSERIAL: + serialwrite(c); + break; +#ifdef POSIXPRT + case OPRT: + prtwrite(c); + break; +#endif +#ifdef FILESYSTEMDRIVER + case OFILE: + filewrite(c); + break; +#endif +#if defined(ARDUINOVGA) + case ODSP: + vgawrite(c); + break; +#elif defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case ODSP: + dspwrite(c); + break; +#endif +#ifdef POSIXMQTT + case OMQTT: + mqttwrite(c); /* buffering for the PRINT command */ + break; +#endif + default: + break; + } + byield(); /* yield after every character for ESP8266 */ +} + +/* + * outs() outputs a string of length x at index ir - basic style + * default is a character by character operation, block + * oriented write needs special functions + */ +void outs(char *ir, uint16_t l){ + uint16_t i; + + switch (od) { +#ifdef HASRF24 + case ORADIO: + radioouts(ir, l); + break; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case OWIRE: + wireouts(ir, l); + break; +#endif +#ifdef POSIXMQTT + case OMQTT: + mqttouts(ir, l); + break; +#endif +#ifdef GRAPHDISPLAYDRIVER + case ODSP: + dspouts(ir, l); + break; +#endif + default: + for(i=0; i +uint8_t breaksignal = 0; + +/* simple signal handler */ +void signalhandler(int sig){ + breaksignal=1; + signal(BREAKSIGNAL, signalhandler); +} + +/* activate signal handling */ +void signalon() { + signal(BREAKSIGNAL, signalhandler); +} + +/* deactivate signal handling unused and not yet done*/ +void signaloff() {} + +#endif + +/* + * helper functions OS, heuristic on how much memory is available in BASIC + */ +long freememorysize() { +#ifdef MSDOS + return 48000; +#else + return 65536; +#endif +} + +long freeRam() { + return freememorysize(); +} + +/* + * the sleep and restart functions + */ +void restartsystem() { exit(0);} +void activatesleep(long t) {} + +/* + * start the SPI bus + */ +void spibegin() {} + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + */ +const int dsp_rows=0; +const int dsp_columns=0; +void dspsetupdatemode(uint8_t c) {} +void dspwrite(char c){} +void dspbegin() {} +uint8_t dspstat(uint8_t c) {return 0; } +char dspwaitonscroll() { return 0; } +uint8_t dspactive() {return 0; } +void dspsetscrollmode(uint8_t c, uint8_t l) {} +void dspsetcursor(uint8_t c) {} + +#ifndef POSIXFRAMEBUFFER +/* these are the graphics commands */ +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) {} +void vgacolor(uint8_t c) {} +void plot(int x, int y) {} +void line(int x0, int y0, int x1, int y1) {} +void rect(int x0, int y0, int x1, int y1) {} +void frect(int x0, int y0, int x1, int y1) {} +void circle(int x0, int y0, int r) {} +void fcircle(int x0, int y0, int r) {} + +/* stubs for the vga code part analogous to ESP32 */ +void vgabegin(){} +void vgawrite(char c){} +#else +/* + * This is the first draft of the linux framebuffer code + * currently very raw, works only if the framebuffer is 24 bit + * very few checks, all kind of stuff can go wrong here. + * + * Main ideas and some part of the code came from this + * article https://www.mikrocontroller.net/topic/379335 + * by Andy W. + * + * Bresenham's algorithm came from the Wikipedia article + * and this very comprehensive discussion + * http://members.chello.at/~easyfilter/bresenham.html + * by Alois Zingl from the Vienna Technikum. I also recommend + * his thesis: http://members.chello.at/%7Eeasyfilter/Bresenham.pdf + * + */ +#include +#include +#include +#include +#include + +/* 'global' variables to store screen info */ +char *framemem = 0; +int framedesc = 0; + +/* info from the frame buffer itself */ +struct fb_var_screeninfo vinfo; +struct fb_fix_screeninfo finfo; +struct fb_var_screeninfo orig_vinfo; + +/* the color variable of the frame buffer */ +long framecolor = 0xffffff; +int framevgacolor = 0x0f; +long framescreensize = 0; +int framecolordepth = 0; + +/* prepare the framebuffer device */ +void vgabegin() { + +/* see if we can open the framebuffer device */ + framedesc = open("/dev/fb0", O_RDWR); + if (!framedesc) { + printf("** error opening frame buffer \n"); + return; + } + +/* now get the variable info of the screen */ + if (ioctl(framedesc, FBIOGET_VSCREENINFO, &vinfo)) { + printf("** error reading screen information \n"); + return; + } + printf("Detected screen %dx%d, %dbpp \n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel); + +/* BASIC currently does 24 bit color only */ + memcpy(&orig_vinfo, &vinfo, sizeof(struct fb_var_screeninfo)); +/* + vinfo.bits_per_pixel = 24; + if (ioctl(framedesc, FBIOPUT_VSCREENINFO, &vinfo)) { + printf("** error setting variable information \n"); + return; + } +*/ + +/* how much color have we got */ + framecolordepth = vinfo.bits_per_pixel; + +/* get the fixed information of the screen */ + if (ioctl(framedesc, FBIOGET_FSCREENINFO, &finfo)) { + printf("Error reading fixed information.\n"); + return; + } + +/* now ready to memory map the screen - evil, we assume 24 bit without checking */ + + framescreensize = (framecolordepth/8) * vinfo.xres * vinfo.yres; + framemem = (char*)mmap(0, framescreensize, PROT_READ | PROT_WRITE, MAP_SHARED, framedesc, 0); + if ((int)framemem == -1) { + printf("** error failed to mmap.\n"); + framemem=0; + return; + } + +/* if all went well we have valid non -1 framemem and can continue */ +} + +/* this function does not exist in the ESP32 world because we don't care there */ +void vgaend() { + if ((int)framemem) munmap(framemem, framescreensize); + if (ioctl(framedesc, FBIOPUT_VSCREENINFO, &orig_vinfo)) { + printf("** error re-setting variable information \n"); + } + close(framedesc); +} + +/* set the color variable depending on the color depth*/ +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) { + switch (framecolordepth/8) { + case 4: + framecolor = (((long)r << 16) & 0x00ff0000) | (((long)g << 8) & 0x0000ff00) | ((long)b & 0x000000ff); /* untested */ + break; + case 3: + framecolor = (((long)r << 16) & 0x00ff0000) | (((long)g << 8) & 0x0000ff00) | ((long)b & 0x000000ff); + break; + case 2: + framecolor = ((long) (r & 0xff) >> 3) << 10 | ((long) (g & 0xff) >> 2) << 6 | ((long) (b & 0xff) >> 3); /* untested */ + break; + case 1: + framecolor = ((long) (r & 0xff) >> 5) << 5 | ((long) (g & 0xff) >> 5) << 2 | ((long) (b & 0xff) >> 6); /* untested */ + break; + } +} + +/* this is taken from the Arduino TFT code */ +void vgacolor(uint8_t c) { + short base=128; + framevgacolor=c; + if (c==8) { rgbcolor(64, 64, 64); return; } + if (c>8) base=255; + rgbcolor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} + +/* plot directly into the framebuffer */ +void plot(int x, int y) { + unsigned long pix_offset; + +/* is everything in range, no error here */ + if (x < 0 || y < 0 || x >= vinfo.xres || y >= vinfo.yres) return; + +/* find the memory location */ + pix_offset = (framecolordepth/8) * x + y * finfo.line_length; + + if (pix_offset < 0 || pix_offset+ (framecolordepth/8-1) > framescreensize) return; + +/* write to the buffer */ + switch (framecolordepth/8) { + case 4: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 8) & 0x000000ff); + *((char*)(framemem + pix_offset+3)) = (unsigned char)((framecolor >> 16) & 0x000000ff); + break; + case 3: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 8) & 0x000000ff); + *((char*)(framemem + pix_offset+2)) = (unsigned char)((framecolor >> 16) & 0x000000ff); + break; + case 2: + *((char*)(framemem + pix_offset )) = (unsigned char)((framecolor & 0x1f) + (((framecolor >> 5) & 0x03) << 6)); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 7) & 0xff); + break; + case 1: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + break; + } + +} + +/* Bresenham's algorith from Wikipedia */ +void line(int x0, int y0, int x1, int y1) { + int dx, dy, sx, sy; + int error, e2; + + dx=abs(x0-x1); + sx=x0 < x1 ? 1 : -1; + dy=-abs(y1-y0); + sy=y0 < y1 ? 1 : -1; + error=dx+dy; + + while(1) { + plot(x0, y0); + if (x0 == x1 && y0 == y1) break; + e2=2*error; + if (e2 > dy) { + if (x0 == x1) break; + error=error+dy; + x0=x0+sx; + } + if (e2 <= dx) { + if (y0 == y1) break; + error=error+dx; + y0=y0+sy; + } + } +} + +/* rects could also be drawn with hline and vline */ +void rect(int x0, int y0, int x1, int y1) { + line(x0, y0, x1, y0); + line(x1, y0, x1, y1); + line(x1, y1, x0, y1); + line(x0, y1, x0, y0); +} + +/* filled rect, also just using line right now */ +void frect(int x0, int y0, int x1, int y1) { + int dx, sx; + int x; + sx=x0 < x1 ? 1 : -1; + for(x=x0; x != x1; x=x+sx) line(x, y0, x, y1); +} + +/* Bresenham for circles, based on Alois Zingl's work */ +void circle(int x0, int y0, int r) { + int x, y, err; + x=-r; + y=0; + err=2-2*r; + do { + plot(x0-x, y0+y); + plot(x0-y, y0-x); + plot(x0+x, y0-y); + plot(x0+y, y0+x); + r=err; + if (r <= y) err+=++y*2+1; + if (r > x || err > y) err+=++x*2+1; + } while (x < 0); +} + +/* for filled circles draw lines instead of points */ +void fcircle(int x0, int y0, int r) { + int x, y, err; + x=-r; + y=0; + err=2-2*r; + do { + line(x0-x, y0+y, x0+x, y0+y); + line(x0+x, y0-y, x0-x, y0-y); + r=err; + if (r <= y) err+=++y*2+1; + if (r > x || err > y) err+=++x*2+1; + } while (x < 0); +} + +/* not needed really, now, later yes ;-) */ +void vgawrite(char c) {} +#endif + +/* + * Keyboard code stubs + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +void kbdbegin() {} +uint8_t kbdstat(uint8_t c) {return 0; } +uint8_t kbdavailable(){ return 0;} +char kbdread() { return 0;} +char kbdcheckch() { return 0;} + +/* vt52 code stubs - unused here - needed for basic.c */ +uint8_t vt52avail() {return 0;} +char vt52read() { return 0; } + +/* Display driver would be here, together with vt52 */ + +/* + * Real Time clock code + */ + +void rtcbegin() {} + +uint16_t rtcget(uint8_t i) { + struct timeb thetime; + struct tm *ltime; + ftime(&thetime); + ltime=localtime(&thetime.time); + switch (i) { + case 0: + return ltime->tm_sec; + case 1: + return ltime->tm_min; + case 2: + return ltime->tm_hour; + case 3: + return ltime->tm_wday; + case 4: + return ltime->tm_mday; + case 5: + return ltime->tm_mon+1; + case 6: + return ltime->tm_year-100; + default: + return 0; + } +} + +void rtcset(uint8_t i, uint16_t v) {} + +/* + * Wifi and MQTT code + */ +#ifndef POSIXMQTT +void netbegin() {} +uint8_t netconnected() { return 0; } +void mqttbegin() {} +uint8_t mqttstat(uint8_t c) {return 0; } +uint8_t mqttstate() {return 0;} +void mqttsubscribe(const char *t) {} +void mqttsettopic(const char *t) {} +void mqttouts(const char *m, uint16_t l) {} +uint16_t mqttins(char *b, uint16_t nb) { return 0; }; +char mqttread() {return 0;}; +#else +/* we use mosquitto */ +#include +/* we assume to be on the network */ +void netbegin() {} +uint8_t netconnected() { return 1; } +/* the mqtt code */ +void mqttbegin() {} +uint8_t mqttstat(uint8_t c) {return 0; } +uint8_t mqttstate() {return 0;} +void mqttsubscribe(const char *t) {} +void mqttsettopic(const char *t) {} +void mqttouts(const char *m, uint16_t l) {} +uint16_t mqttins(char *b, uint16_t nb) { return 0; }; +char mqttread() {return 0;}; +#endif + +/* + * EEPROM handling, these function enable the @E array and + * loading and saving to EEPROM with the "!" mechanism + * a filesystem based dummy + */ +int8_t eeprom[EEPROMSIZE]; +void ebegin(){ + int i; + FILE* efile; + for (i=0; i=0 && a=0 && a YIELDINTERVAL-1) { + yieldfunction(); + lastyield=millis(); + } + +/* yield every second */ + if (millis()-lastlongyield > LONGYIELDINTERVAL-1) { + longyieldfunction(); + lastlongyield=millis(); + } + #endif + + /* call the background task scheduler on some platforms implemented in hardware-* */ + yieldschedule(); +} + +/* delay must be implemented to use byield() while waiting */ +void bdelay(uint32_t t) { + unsigned long i; + if (t>0) { + i=millis(); + while (millis() < i+t) byield(); + } +} + +/* fastticker is the hook for all timing functions */ +void fastticker() { +/* fastticker profiling test code */ +#ifdef FASTTICKERPROFILE + fasttickerprofile(); +#endif +/* toggle the tone pin */ +#ifdef ARDUINOTONEEMULATION + tonetoggle(); +#endif +} + +/* everything that needs to be done often - 32 ms */ +void yieldfunction() {} + +/* everything that needs to be done not so often - 1 second */ +void longyieldfunction() { +#ifdef BASICBGTASK +/* polling for the BREAKCHAR */ +#ifdef POSIXNONBLOCKING + if (checkch() == BREAKCHAR) breakcondition=1; +#endif +#endif +} + +void yieldschedule() {} + +/* + * The file system driver - all methods needed to support BASIC fs access + * MSDOS to be done + * + * file system code is a wrapper around the POSIX API + */ +void fsbegin() {} +FILE* ifile; +FILE* ofile; +#ifndef MSDOS +DIR* root; +struct dirent* file; +#else +void* root; +void* file; +#endif + +/* POSIX OSes always have filesystems */ +uint8_t fsstat(uint8_t c) { return 1; } + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char c) { + if (ofile) + fputc(c, ofile); + else + ioer=1; +} + +char fileread(){ + char c; + if (ifile) c=fgetc(ifile); else { ioer=1; return 0; } + if (cheof(c)) ioer=-1; + return c; +} + +uint8_t ifileopen(const char* filename){ + ifile=fopen(filename, "r"); + return ifile!=0; +} + +void ifileclose(){ + if (ifile) fclose(ifile); + ifile=0; +} + +uint8_t ofileopen(const char* filename, const char* m){ + ofile=fopen(filename, m); + return ofile!=0; +} + +void ofileclose(){ + if (ofile) fclose(ofile); + ofile=0; +} + +int fileavailable(){ return !feof(ifile); } + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +#ifdef MSDOS +#include +#include +struct ffblk *bffblk; +#endif + +void rootopen() { +#ifndef MSDOS + root=opendir ("./"); +#else + (void) findfirst("*.*", bffblk, 0); +#endif +} + +uint8_t rootnextfile() { +#ifndef MSDOS + file = readdir(root); + return (file != 0); +#else + return (findnext(bffblk) == 0); +#endif +} + +uint8_t rootisfile() { +#if !defined(MSDOS) && !defined(MINGW) + return (file->d_type == DT_REG); +#else + return 1; +#endif +} + +const char* rootfilename() { +#ifndef MSDOS + return (file->d_name); +#else + return (bffblk->ff_name); +#endif +} + +uint32_t rootfilesize() { +#ifndef MSDOS + return 0; +#else + return (bffblk->ff_fsize); +#endif +} + +void rootfileclose() {} +void rootclose(){ +#ifndef MSDOS + (void) closedir(root); +#endif +} + +/* + * remove method for files + */ +void removefile(const char *filename) { + remove(filename); +} + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(uint8_t i) { + puts("Format not implemented on this platform."); +} + +/* + * The buffer code, a simple buffer to store output and + * input data. It can be used as a device in BASIC using the + * modifier &0. + */ + +/* use the input buffer variable from BASIC here, it is extern to runtime */ +void bufferbegin() {} + +/* write to the buffer, works only until 127 + uses vt52 style commands to handle the buffer content*/ +void bufferwrite(char c) { + if (!nullbuffer) return; + switch (c) { + case 12: /* clear screen */ + nullbuffer[nullbuffer[0]+1]=0; + nullbuffer[0]=0; + break; + case 10: + case 13: /* cr and lf ignored */ + break; + case 8: /* backspace */ + if (nullbuffer[0]>0) nullbuffer[0]--; + break; + default: + if (nullbuffer[0] < nullbufsize-1 && nullbuffer[0] < 127) { + nullbuffer[++nullbuffer[0]]=c; + nullbuffer[nullbuffer[0]+1]=0; /* null terminate */ + } + break; + } +} + +/* read not needed right now */ +char bufferread() { return 0; } +uint16_t bufferavailable() { return 0; } +char buffercheckch() { return 0; } +void bufferflush() { } +uint16_t bufferins(char *b, uint16_t nb) { return 0; } + +/* + * Primary serial code, if NONBLOCKING is set, + * platform dependent I/O is used. This means that + * UNIXes use fcntl() to implement a serialcheckch + * and MSDOS as well als WIndows use kbhit(). + * This serves only to interrupt programs with + * BREAKCHAR at the moment. + */ +#ifdef POSIXNONBLOCKING +#if !defined(MSDOS) && !defined(MINGW) +#include + +/* we need to poll the serial port in non blocking mode + this slows it down so that we don't block an entire core + read speed here is one character per millisecond which + is 8000 baud, no one can type that fast but tedious when + from stdin */ +/* +void freecpu() { + struct timespec intervall; + struct timespec rtmp; + intervall.tv_sec=0; + intervall.tv_nsec=1000000; + nanosleep(&intervall, &rtmp); +} +*/ + +/* for non blocking I/O try to modify the stdin file descriptor */ +void serialbegin() { +/* we keep I/O mostly blocking here */ +/* + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); +*/ +} + +/* get and unget the character in a non blocking way */ +char serialcheckch(){ + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); + int ch=getchar(); + ungetc(ch, stdin); + fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); + return ch; +} + +/* check EOF, don't use feof()) here */ +uint16_t serialavailable() { + if (cheof(serialcheckch())) return 0; else return 1; +} + +/* two versions of serialread */ +char serialread() { + char ch; +/* blocking to let the OS handle the wait - this means: no call to byield() in interaction */ + ch=getchar(); + return ch; +/* this is the code that waits - calls byield() often just like on the Arduino */ +/* + while (cheof(serialcheckch())) { byield(); freecpu(); } + return getchar(); +*/ +} + +/* flushes the serial code in non blocking mode */ +void serialflush() { + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); + while (!cheof(getchar())); + fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); +} +#else +/* the non blocking MSDOS and MINGW code */ +#include +/* we go way back in time here and do it like DOS did it */ +void serialbegin(){} + +/* we go through the terminal on read */ +char serialread() { + return getchar(); +} + +/* check if a key is hit, get it and return it */ +char serialcheckch(){ + if (kbhit()) return getch(); +} + +/* simple version */ +uint16_t serialavailable() { + return 1; +} + +/* simple version */ +void serialflush() { } + +#endif +#else +/* the blocking code only uses puchar and getchar */ +void serialbegin(){} +char serialread() { return getchar(); } +char serialcheckch(){ return 1; } +uint16_t serialavailable() { return 1; } +void serialflush() {} +#endif + +uint8_t serialstat(uint8_t c) { + if (c == 0) return 1; + if (c == 1) return serial_baudrate/1000; + return 0; +} + +/* send the CSI sequence to start with ANSI */ +void sendcsi() { + putchar(27); putchar('['); /* CSI */ +} + +/* the vt52 state engine */ +#ifdef POSIXVT52TOANSI +#include +uint8_t dspesc = 0; +uint8_t vt52s = 0; +int cursory = 0; +uint8_t vt52active = 1; + +/* something little */ +uint8_t vt52number(char c) { + uint8_t b=c; + if (b>31) return b-32; else return 0; +} + +/* set the cursor */ +void dspsetcursory(uint8_t i) { + cursory=i; +} + +/* remember the position */ +void dspsetcursorx(uint8_t i) { + sendcsi(); + printf("%d;%dH", abs(cursory)+1, i+1); +} + +/* set colors, vga here */ +void dspsetfgcolor(uint8_t co) { + sendcsi(); + if (co < 8) { + putchar('3'); + } else { + putchar('9'); + co=co-8; + } + putchar('0'+co); + putchar('m'); +} + +void dspsetbgcolor(uint8_t co) { + sendcsi(); + if (co < 8) { + putchar('4'); + } else { + putchar('1'); putchar('0'); + co=co-8; + } + putchar('0'+co); + putchar('m'); +} + +/* vt52 state engine, a smaller version of the Arduino code*/ +void dspvt52(char* c){ + +/* reading and processing multi byte commands */ + switch (vt52s) { + case 'Y': + if (dspesc == 2) { + dspsetcursory(vt52number(*c)); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + dspsetcursorx(vt52number(*c)); + *c=0; + } + vt52s=0; + break; + case 'b': + dspsetfgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + case 'c': + dspsetbgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + } + +/* commands of the terminal in text mode */ + switch (*c) { + case 'v': /* GEMDOS / TOS extension enable wrap */ + break; + case 'w': /* GEMDOS / TOS extension disable wrap */ + break; + case '^': /* Printer extensions - print on */ + break; + case '_': /* Printer extensions - print off */ + break; + case 'W': /* Printer extensions - print without display on */ + break; + case 'X': /* Printer extensions - print without display off */ + break; + case 'V': /* Printer extensions - print cursor line */ + break; + case ']': /* Printer extension - print screen */ + break; + case 'F': /* enter graphics mode */ + break; + case 'G': /* exit graphics mode */ + break; + case 'Z': // Ident + break; + case '=': // alternate keypad on + case '>': // alternate keypad off + break; + case 'b': // GEMDOS / TOS extension text color + case 'c': // GEMDOS / TOS extension background color + vt52s=*c; + dspesc=1; + *c=0; + return; + case 'e': // GEMDOS / TOS extension enable cursor + break; + case 'f': // GEMDOS / TOS extension disable cursor + break; + case 'p': // GEMDOS / TOS extension reverse video + break; + case 'q': // GEMDOS / TOS extension normal video + break; + case 'A': // cursor up + sendcsi(); + putchar('A'); + break; + case 'B': // cursor down + sendcsi(); + putchar('B'); + break; + case 'C': // cursor right + sendcsi(); + putchar('C'); + break; + case 'D': // cursor left + sendcsi(); + putchar('D'); + break; + case 'E': // GEMDOS / TOS extension clear screen + *c=12; + dspesc=0; + return; + case 'H': // cursor home + *c=2; + dspesc=0; + return; + case 'Y': // Set cursor position + vt52s='Y'; + dspesc=2; + *c=0; + return; + case 'J': // clear to end of screen + sendcsi(); + putchar('J'); + break; + case 'd': // GEMDOS / TOS extension clear to start of screen + sendcsi(); + putchar('1'); putchar('J'); + break; + case 'K': // clear to the end of line + sendcsi(); + putchar('K'); + break; + case 'l': // GEMDOS / TOS extension clear line + sendcsi(); + putchar('2'); putchar('K'); + break; + case 'o': // GEMDOS / TOS extension clear to start of line + sendcsi(); + putchar('1'); putchar('K'); + break; + case 'k': // GEMDOS / TOS extension restore cursor + break; + case 'j': // GEMDOS / TOS extension save cursor + break; + case 'I': // reverse line feed + putchar(27); + putchar('M'); + break; + case 'L': // Insert line + break; + case 'M': // Delete line - questionable + sendcsi(); + putchar('2'); putchar('K'); + break; + } + dspesc=0; + *c=0; +} +#endif + + +uint16_t serialins(char* b, uint16_t nb) { return consins(b, nb); } + +void serialwrite(char c) { + +/* the vt52 state engine */ +#ifdef POSIXVT52TOANSI + if (dspesc) { + dspvt52(&c); + if (c == 0) return; + } + +/* ESC is caught here and we only listen to VT52 not to ANSI */ + if (c == 27 && vt52active) { + dspesc=1; + return; + } +#endif + +/* this is the character translation routine to convert the Arduino + style characters 12 for CLS and 2 for HOME to ANSI, makes + BASIC programs more compatible */ +#ifdef POSIXTERMINAL + switch (c) { +/* form feed is clear screen - compatibility with Arduino code */ + case 12: + sendcsi(); + putchar('2'); putchar('J'); +/* home sequence in the arduino code */ + case 2: + sendcsi(); + putchar('H'); + return; + } +#endif + +/* finally send the plain character */ + putchar(c); +} + +/* + * handling the second serial interface - only done on Mac so far + * test code + * + * Tried to learn from https://www.pololu.com/docs/0J73/15.5 + * + */ +#ifdef POSIXPRT +#include +#if !defined(MSDOS) && !defined(MINGW) +#include +#endif + +/* the file name of the printer port */ +int prtfile; + +/* the buffer to read one character */ +char prtbuf = 0; + + +void prtbegin() {} + +char prtopen(char* filename, uint16_t mode) { +#if !defined(MSDOS) && !defined(MINGW) + +/* try to open the device file */ + prtfile=open(filename, O_RDWR | O_NOCTTY); + if (prtfile == -1) { + perror(filename); + return 0; + } + +/* get rid of garbage */ + tcflush(prtfile, TCIOFLUSH); + +/* configure the device */ + struct termios opt; + (void) tcgetattr(prtfile, &opt); + + +/* raw terminal settings + opt.c_iflag &= ~(INLCR | IGNCR | ICRNL | IXON | IXOFF); + opt.c_oflag &= ~(ONLCR | OCRNL); + opt.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); +*/ + +/* timeout settings on read 100ms, read every character */ + opt.c_cc[VTIME] = 1; + opt.c_cc[VMIN] = 0; + +/* set the baudrate */ + switch (mode) { + case 9600: + cfsetospeed(&opt, B9600); + break; + default: + cfsetospeed(&opt, B9600); + break; + } + cfsetispeed(&opt, cfgetospeed(&opt)); + +/* set the termin attributes */ + tcsetattr(prtfile, TCSANOW, &opt); +#endif + + return 1; +} + +void prtclose() { + if (prtfile) close(prtfile); +} + +uint8_t prtstat(uint8_t c) {return 1; } + +void prtset(uint32_t s) {} + +/* write the characters byte by byte */ +void prtwrite(char c) { + int i=write(prtfile, &c, 1); + if (i != 1) ioer=1; +} + +/* read just one byte, map no bytes to EOF = -1 */ +char prtread() { + char c; + +/* something in the buffer? return it! */ + if (prtbuf) { + c=prtbuf; + prtbuf=0; + } else { +/* try to read */ + int i=read(prtfile, &c, 1); + if (i < 0) { + ioer=1; + return 0; + } + if (i == 0) return -1; + } + return c; +} + +/* not yet implemented */ +char prtcheckch(){ + if (!prtbuf) { /* try to read */ + int i=read(prtfile, &prtbuf, 1); + if (i <= 0) prtbuf=0; + } + return prtbuf; +} + +uint16_t prtavailable(){ + return prtcheckch()!=0; +} + +uint16_t prtins(char* b, uint16_t nb) { + if (blockmode > 0) return inb(b, nb); else return consins(b, nb); +} + +#else +void prtbegin() {} +uint8_t prtstat(uint8_t c) {return 0; } +void prtset(uint32_t s) {} +void prtwrite(char c) {} +char prtread() {return 0;} +char prtcheckch(){ return 0; } +uint16_t prtavailable(){ return 0; } +uint16_t prtins(char* b, uint16_t nb) { return 0; } +#endif + + +/* + * The wire code + */ +#if defined(POSIXWIRE) && defined(POSIXPIGPIO) +uint8_t wire_slaveid = 0; + +/* open the wire connection in pigpio */ +void wirebegin() { +} + +/* we return the handle here, inconsistent with the Arduino code */ +uint8_t wirestat(uint8_t c) { + return 1; +} + +void wireopen(char s, uint8_t m) { + if (m == 0) { + wire_slaveid=s; + } else if ( m == 1 ) { + outsc("** wire slave mode not implemented"); outcr(); + } else + error(EORANGE); +} + + +/* read a number of bytes, depending on the string length */ +uint16_t wireins(char *b, uint8_t l) { + int handle; + int16_t z; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, wire_slaveid, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + } + + z=i2c_read_device(pigpio_pi, handle, b+1, l); + + if (z < 0) { + ioer=-1; + z=0; + } + b[0]=z; + + i2c_close(pigpio_pi, handle); + + return z; +} + + +void wireouts(char *b, uint8_t l) { + int handle; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, wire_slaveid, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + } + + if (i2c_write_device(pigpio_pi, handle, b, l) < 0) ioer=-1; + + i2c_close(pigpio_pi, handle); +} + +uint16_t wireavailable() { return 1; } + +/* the register access functions */ +int16_t wirereadbyte(uint8_t port) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + return -1; + } + + res=i2c_read_byte(pigpio_pi, handle); + i2c_close(pigpio_pi, handle); + return res; +} + +/* use the simple wire byte function */ +void wirewritebyte(uint8_t port, int16_t data) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + ioer=i2c_write_byte(pigpio_pi, handle, data); + + i2c_close(pigpio_pi, handle); +} + + +/* this code used the write byte function twice */ +/* +void wirewriteword(short port, short data1, short data2) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + ioer=i2c_write_byte(pigpio_pi, handle, data1); + ioer+=i2c_write_byte(pigpio_pi, handle, data2); + + i2c_close(pigpio_pi, handle); +} +*/ + +/* use the raw access function in a buffer */ +void wirewriteword(short port, short data1, short data2) { + int res, handle; + mem_t buf[2]; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + buf[0]=data1; + buf[1]=data2; + + if (i2c_write_device(pigpio_pi, handle, buf, 2) <0 ) ioer=-1; + + i2c_close(pigpio_pi, handle); +} + +/* just a helper to make GET work, wire is string oriented */ +char wireread() { + char wbuffer[2]; + if wireins(wbuffer, 1) return wbuffer[1]; else return 0; +} + +#else +void wirebegin() {} +uint8_t wirestat(uint8_t c) {return 0; } +void wireopen(char s, uint8_t m) {} +uint16_t wireins(char *b, uint8_t l) { b[0]=0; return 0; } +void wireouts(char *b, uint8_t l) {} +uint16_t wireavailable() { return 1; } +int16_t wirereadbyte(uint8_t port) { return 0; } +void wirewritebyte(uint8_t port, int16_t data) { return; } +void wirewriteword(uint8_t port, int16_t data1, int16_t data2) { return; } +/* just a helper to make GET work, wire is string oriented */ +char wireread() { return 0; } +#endif + +/* + * Read from the radio interface, radio is always block + * oriented. + */ +uint8_t radiostat(uint8_t c) {return 0; } +void radioset(uint8_t s) {} +uint16_t radioins(char *b, uint8_t nb) { b[0]=0; b[1]=0; return 0; } +void radioouts(char *b, uint8_t l) {} +void iradioopen(const char *filename) {} +void oradioopen(const char *filename) {} +uint16_t radioavailable() { return 0; } +char radioread() { return 0; } + +/* Arduino sensors */ +void sensorbegin() {} +float sensorread(uint8_t s, uint8_t v) {return 0;}; + + +/* + * event handling wrappers, to keep Arduino specifics out of BASIC + */ + +uint8_t pintointerrupt(uint8_t pin) { return 0; } +void attachinterrupt(uint8_t inter, void (*f)(), uint8_t mode) {} +void detachinterrupt(uint8_t pin) {} + +/* + * Experimental code to simulate 64kb SPI SRAM modules + * + * currently used to test the string code of the mem + * interface + * + */ + +#ifdef SPIRAMSIMULATOR + +static int8_t spiram[65536]; + +/* the RAM begin method sets the RAM to byte mode */ +uint16_t spirambegin() { + return 65534; +} + +/* the simple unbuffered byte write, with a cast to signed char */ +void spiramrawwrite(uint16_t a, int8_t c) {spiram[a]=c;} + +/* the simple unbuffered byte read, with a cast to signed char */ +int8_t spiramrawread(uint16_t a) {return spiram[a];} + +/* the buffers calls, also only simulated here */ + +void spiram_rwbufferwrite(uint16_t a, int8_t c) {spiram[a]=c;} + +int8_t spiram_rwbufferread(uint16_t a) {return spiram[a];} + +int8_t spiram_robufferread(uint16_t a) {return spiram[a];} + +/* to handle strings in SPIRAM situations two more buffers are needed + * they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set + */ +char spistrbuf1[SPIRAMSBSIZE]; +char spistrbuf2[SPIRAMSBSIZE]; +#endif + +/* + * This code measures the fast ticker frequency in microseconds + * Activate this only for test purposes. Not really useful on POSIX. + */ + +#ifdef FASTTICKERPROFILE +uint32_t lastfasttick = 0; +uint32_t fasttickcalls = 0; +uint16_t avgfasttick = 0; +long devfasttick = 0; + +void fasttickerprofile() { + int delta; + if (lastfasttick == 0) { lastfasttick=micros(); return; } + delta=micros()-lastfasttick; + lastfasttick=micros(); + avgfasttick=(avgfasttick*fasttickcalls+delta)/(fasttickcalls+1); + fasttickcalls++; +} +#endif + diff --git a/data/Basic2/RaspPi/runtime.h b/data/Basic2/RaspPi/runtime.h new file mode 100644 index 0000000000000000000000000000000000000000..d71c6d01279c85f7ebd916086ad69b9e9be7a670 --- /dev/null +++ b/data/Basic2/RaspPi/runtime.h @@ -0,0 +1,776 @@ +/* + * + * $Id: runtime.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * Prototypes for the runtime environment of the BASIC interpreter. + * + * Needs to be included by runtime.c or runtime.cpp and basic.c + * + * Parametrized by hardware.h. + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + */ + +#if !defined(__RUNTIMEH__) +#define __RUNTIMEH__ + +/* + * system type identifiers + */ +#define SYSTYPE_UNKNOWN 0 +#define SYSTYPE_AVR 1 +#define SYSTYPE_ESP8266 2 +#define SYSTYPE_ESP32 3 +#define SYSTYPE_RP2040 4 +#define SYSTYPE_SAM 5 +#define SYSTYPE_XMC 6 +#define SYSTYPE_SMT32 7 +#define SYSTYPE_NRENESA 8 +#define SYSTYPE_POSIX 32 +#define SYSTYPE_MSDOS 33 +#define SYSTYPE_MINGW 34 +#define SYSTYPE_RASPPI 35 + +/* + * Input and output channels. + * The channels are used to identify the I/O devices in the + * runtime environment. + * + * NULL is the memory channel outputting to a buffer. + * SERIAL is the standard serial channel and the default device. + * DSP is the display channel. + * PRT is the second serial channel used for printing and communication + * with external devices. + * WIRE is the I2C channel. + * RADIO is the RF24 channel. + * MQTT is the MQTT channel. + * FILE is the file system channel. + */ +#define ONULL 0 +#define OSERIAL 1 +#define ODSP 2 +#define OPRT 4 +#define OWIRE 7 +#define ORADIO 8 +#define OMQTT 9 +#define OFILE 16 + +#define INULL 0 +#define ISERIAL 1 +#define IKEYBOARD 2 +#define ISERIAL1 4 +#define IWIRE 7 +#define IRADIO 8 +#define IMQTT 9 +#define IFILE 16 + +/* + * The main IO interface. This is how BASIC uses I/O functions + * + * ioinit(): called at setup to initialize what ever io is needed + * outch(): prints one ascii character + * inch(): gets one character (and waits for it) + * checkch(): checks for one character (non blocking) + * ins(): reads an entire line (uses inch except for pioserial) + * + */ +void ioinit(); +void iodefaults(); +int cheof(int); +char inch(); +char checkch(); +uint16_t availch(); +uint16_t inb(char*, int16_t); +uint16_t ins(char*, uint16_t); +void outch(char); +void outs(char*, uint16_t); + +/* + * Global variables of the runtime env, visible to BASIC + */ +extern int8_t id; /* active input stream */ +extern int8_t od; /* active output stream */ +extern int8_t idd; /* default input stream in interactive mode */ +extern int8_t odd; /* default output stream in interactive mode */ +extern int8_t ioer; /* the io error */ + +/* io control flags */ +extern uint8_t kbdrepeat; +extern uint8_t blockmode; +extern uint8_t sendcr; + +/* counts the outputed characters on streams 0-3, used to emulate a real tab */ +extern uint8_t charcount[3]; /* devices 1-4 support tabing */ + +/* the memory buffer comes from BASIC in this version */ +extern char ibuffer[BUFSIZE]; /* the input buffer */ + +/* only needed in POSIX worlds */ +extern uint8_t breaksignal; +extern uint8_t vt52active; + +/* the string buffer the interpreter needs, here to be known by BASIC */ +extern char spistrbuf1[SPIRAMSBSIZE], spistrbuf2[SPIRAMSBSIZE]; + +/* the mqtt variable the interpreter needs */ +#define MQTTLENGTH 32 +extern char mqtt_otopic[MQTTLENGTH]; +extern char mqtt_itopic[MQTTLENGTH]; +extern char mqttname[]; + +/* + * accessing the fastticker information + */ +extern uint16_t avgfasttick; + +/* + * A byte in the runtime memory containing the system type + */ +extern uint8_t bsystype; + +/* + * These functions are always empty on Arduino, they are only used in + * the POSIX branch of the code. + * + * BASIC calls these functions once to start the timing, wiring, and signal handling. + */ + +void timeinit(); /* handling time - part of the Arduino core - only needed on POSIX OSes */ +void wiringbegin(); /* starting wiring is only needed on raspberry */ +void signalon(); /* POSIX signals - not needed on Ardunino */ + +/* + * Memory allocation functions. + * + * BASIC calls freememorysize() to detemine how much memory can be allocated + * savely on the heap. + * BASIC calls restartsystem() for a complete reboot. + * freeRam() is the actual free heap. Used in BASIC only in USR. + * + * Arduino data from https://docs.arduino.cc/learn/programming/memory-guide + */ + +long freememorysize(); /* determine how much actually to allocate */ +void restartsystem(); /* cold start of the MCU */ +long freeRam(); /* try to find the free heap after alocating all globals */ + +/* This is unfinished, don't use, sleep and RTC interrupt code. */ +void rtcsqw(); +void aftersleepinterrupt(void); +void activatesleep(long); + +/* + * Start the SPI bus. Called once on start. + * + * Some libraries also try to start the SPI which may lead to on override of + * the PIN settings if the library code is not clean - currenty no conflict known. + * for the libraries used here. + */ +void spibegin(); + +/* + * Timeing functions and background tasks. + * + * byield() is called after every statement and in all + * waiting loops for I/O. BASIC gives back the unneeded + * CPU cycles by calling byield(). + * + * byield() it allows three levels of background tasks. + * + * BASICBGTASK controls if time for background tasks is + * needed, usually set by hardware features + * + * YIELDINTERVAL by default is 32, generating a 32 ms call + * to the network loop function. + * + * LONGYIELDINTERVAL by default is 1000, generating a one second + * call to maintenance functions. + * + * fastticker() is called in every byield for fast I/O control. + * It is currently only used for the tone emulation. + * + * byield calls back bloop() in the BASIC interpreter for user + * defined background tasks. + * + * the time intervall in ms needed for + * ESP8266 yields, network client loops + * and other timing related functions + */ +#define LONGYIELDINTERVAL 1000 +#define YIELDINTERVAL 32 + +void byield(); /* the yield function called in empty loops */ +void bdelay(uint32_t); /* a delay function using byield() */ +void fastticker(); /* a function for very frequent background tasks */ +void yieldfunction(); /* everything that needs to be done often - 32 ms */ +void longyieldfunction(); /* everything that needs to be done not so often - 1 second */ +void yieldschedule(); /* scheduler call for some platforms */ + +/* + * EEPROM handling, these function enable the @E array and + * loading and saving to EEPROM with the "!" mechanism + * + * The EEPROM code can address EEPROMS up to 64 kB. It returns + * signed byte values which corresponds to the definition of + * mem_t in BASIC. This is needed because running from EEPROM + * requires negative token values to be recongized. + * + */ +void ebegin(); +void eflush(); +uint16_t elength(); +void eupdate(uint16_t, int8_t); +int8_t eread(uint16_t); + +/* + * The wrappers of the arduino io functions. + * + * The normalize the differences of some of the Arduino cores + * and raspberyy PI wiring implementations. + * + * pulseout generates microsecond pulses. + * + * awrite requires ESP32 2.0.2 core, else disable awrite(). + */ +uint16_t aread(uint8_t); +uint8_t dread(uint8_t); +void awrite(uint8_t, uint16_t); +void dwrite(uint8_t, uint8_t); +void pinm(uint8_t, uint8_t); +uint32_t pulsein(uint8_t, uint8_t, uint32_t); +void pulseout(uint16_t, uint8_t, uint16_t, uint16_t, uint16_t, uint16_t); +void playtone(uint8_t, uint16_t, uint16_t, uint8_t); +void tonetoggle(); /* internal function of the tone emulation, called by byield */ + +void breakpinbegin(); +uint8_t getbreakpin(); + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear(), dspupdate() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + * + * For non RGB ready displays, rgbcolor translates to the native color + * when BASIC requests an rgb color, in this case the nearest 4 bit + * color of the display is also stored for use in the text DISPLAY + * driver code + */ + + /* generate a 4 bit vga color from a given rgb color */ +uint8_t rgbtovga(uint8_t, uint8_t, uint8_t); + +/* + * prototypes for screen handling + */ +void dspbegin(); +void dspprintchar(char, uint8_t, uint8_t); +void dspclear(); +void dspupdate(); +void dspsetcursor(uint8_t); +void dspsavepen(); +void dsprestorepen(); +void dspsetfgcolor(uint8_t); +void dspsetbgcolor(uint8_t); +void dspsetreverse(uint8_t); +uint8_t dspident(); +void rgbcolor(uint8_t, uint8_t, uint8_t); +void vgacolor(uint8_t); +void plot(int, int); +void line(int, int, int, int); +void rect(int, int, int, int); +void frect(int, int, int, int); +void circle(int, int, int); +void fcircle(int, int, int); + +/* + * this is a generic display code + * it combines the functions of LCD and TFT drivers + * if this code is active + * + * dspprintchar(char c, uint8_t col, uint8_t row) + * dspclear() + * dspbegin() + * dspupdate() + * dspsetcursor(uint8_t c) + * dspsetfgcolor(uint8_t c) + * void dspsetbgcolor(uint8_t c) + * void dspsetreverse(uint8_t c) + * uint8_t dspident() + * + * have to be defined before in a hardware dependent section. + * Only dspprintchar and dspclear are needed, all other can be stubs + * + * VGA systems don't use the display driver for text based output. + * + * The display driver exists as a buffered version that can scroll + * or an unbuffered version that cannot scroll. Interfaces to hardware + * scrolling are not yet implemented. + * + * A VT52 state engine is implemented and works for buffered and + * unbuffered displays. Only buffered displays have the full VT52 + * feature set including most of the GEMDOS extensions described here: + * https://en.wikipedia.org/wiki/VT52 + * + * dspupdatemode controls the page update behaviour + * 0: character mode, display each character separately + * 1: line mode, update the display after each line + * 2: page mode, update the display after an ETX + * ignored if the display has no update function + * + */ + +void dspsetcursorx(uint8_t); +void dspsetcursory(uint8_t); +uint8_t dspgetcursorx(); +uint8_t dspgetcursory(); +void dspbell(); /* to whom the bell tolls - implement this to you own liking */ + + +/* + * text color code for the scrolling display + * + * non scrolling displays simply use the pen color of the display + * stored in dspfgcolor to paint the information on the screen + * + * for scrolling displays we store the color information of every + * character in the display buffer to enable scrolling, to limit the + * storage requirements, this code translates the color to a 4 bit VGA + * color. This means that if BASIC uses 24 bit colors, the color may + * change at scroll + * + * for color displays the buffer is a 16 bit object + * lower 8 bits plus the sign are the character, + * higher 7 the color and font. + * for monochrome just the character is stored + */ + +#ifdef DISPLAYHASCOLOR +typedef short dspbuffer_t; +#else +typedef char dspbuffer_t; +#endif + +dspbuffer_t dspget(uint16_t); +dspbuffer_t dspgetrc(uint8_t, uint8_t); +dspbuffer_t dspgetc(uint8_t); + +void dspsetxy(dspbuffer_t, uint8_t, uint8_t); /* this functions prints a character and updates the display buffer */ +void dspset(uint16_t, dspbuffer_t); +void dspsetscrollmode(uint8_t, uint8_t); /* 0 normal scroll, 1 enable waitonscroll function */ + +void dspbufferclear(); /* clear the buffer */ +void dspscroll(uint8_t, uint8_t); /* do the scroll */ +void dspreversescroll(uint8_t); /* do the reverse scroll only one line implemented */ + +/* + * This is the minimalistic VT52 state engine. It is an interface to + * process single byte control sequences of the form char + */ + +char vt52read(); /* the reader from the buffer, for messages going back from the display */ +uint8_t vt52avail(); /* the avail from the buffer */ +void vt52push(char); /* putting something into the buffer */ +uint8_t vt52number(char); /* something little, generating numbers */ +void vt52graphcommand(uint8_t); /* execute one graphics command */ + +/* + * this is a special part of the vt52 code with this, the terminal + * can control the digital and analog pins. + * it is meant for situations where the terminal is controlled by a (powerful) + * device with no or very few I/O pins. It can use the pins of the Arduino through + * the terminal. This works as long as everything stays within the terminals timescale + * On a 9600 baud interface, the character processing time is 1ms, everything slower + * than approximately 10ms can be done through the serial line. + */ +void vt52wiringcommand(uint8_t); + +/* the vt52 state engine */ +void dspvt52(char*); + + +/* these functions are used to access the display */ +void dspouts(char*, uint16_t); +void dspwrite(char); +uint8_t dspstat(uint8_t); +char dspwaitonscroll(); +uint8_t dspactive(); +void dspsetupdatemode(uint8_t); +uint8_t dspgetupdatemode(); +void dspgraphupdate(); + +/* + * code for the VGA system of Fabgl + */ +void vgabegin(); /* this starts the vga controller and the terminal right now */ +int vgastat(uint8_t); /* currently unused */ +void vgascale(int*, int*); /* scale the screen size */ +void vgawrite(char); +void vgaend(); + +/* + * Keyboard code for either the Fablib Terminal class or + * PS2Keyboard - please note that you need the ESP patched + * version here as mentioned above + * + * sets HASKEYBOARD to inform basic about this capability + * + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ + +void kbdbegin(); +uint8_t kbdstat(uint8_t); +uint8_t kbdavailable(); +char kbdread(); +char kbdcheckch(); +uint16_t kbdins(char*, uint16_t); + +/* + * Arduino Real Time clock. The interface here offers the values as number_t + * combining all values. + * + * The code does not use an RTC library any more all the rtc support is + * builtin now. + * + * A clock must activate the macro #define HASCLOCK to make the clock + * available in BASIC. + * + * Four software models are supported + * - Built-in clocks of STM32, MKR, and ESP32 are supported by default + * - I2C clocks can be activated: DS1307, DS3231, and DS3232 + * - A Real Time Clock emulation is possible using millis() + * + * rtcget accesses the internal registers of the clock. + * Registers 0-6 are bcd transformed to return + * seconds, minutes, hours, day of week, day, month, year + * + * On I2C clocks registers 7-255 are returned as memory cells + */ + +/* No begin method needed */ +void rtcbegin(); +uint16_t rtcget(uint8_t); /* get the time from the registers */ +void rtcset(uint8_t, uint16_t); + +/* convert the time to a unix time number from https://de.wikipedia.org/wiki/Unixzeit */ +void rtctimetoutime(); +void rtcutimetotime(); + +/* + * definitions for ESP Wifi and MQTT, super experimental. + * As networking is only used for MQTT at the moment, + * mqtt, Wifi and Ethernet comes all in one. + * + * No encryption/authetication is implemented in MQTT. + * Only public, open servers can be used. + * + * MQTT topics can only be 32 bytes long. + * Buffered incoming and outgoing messages can be 128 bytes + * per default. + * + * wifisettings.h is the generic network definition file + * all network settings are compiled into the code + * BASIC cannot change them at runtime. + */ + +void mqttsetname(); +void netbegin(); +void netstop(); +void netreconnect(); +uint8_t netconnected(); + +/* + * mqtt event handling in BASIC can be triggered here + * the prototype uses exactly the Arduino types of the + * pubsub library. + * + */ +void mqttcallback(char*, byte*, unsigned int); + +/* + * mqtt prototypes + */ +void mqttbegin(); +uint8_t mqttstat(uint8_t); +uint8_t mqttreconnect(); +uint8_t mqttstate(); +void mqttsubscribe(const char*); +void mqttunsubscribe(); +void mqttsettopic(const char*); +void mqttouts(const char*, uint16_t); +void mqttwrite(const char); +char mqttread(); +uint16_t mqttins(char*, uint16_t); +uint16_t mqttavailable(); +char mqttcheckch(); + +/* + * The file system driver - all methods needed to support BASIC fs access + * Different filesystems need different prefixes and fs objects, these + * filesystems use the stream API + */ + +char* mkfilename(const char*); +const char* rmrootfsprefix(const char*); /* remove the prefix from the filename */ +void fsbegin(); +uint8_t fsstat(uint8_t); + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char); +char fileread(); +int fileavailable(); /* is int because some of the fs do this */ +uint8_t ifileopen(const char*); +void ifileclose(); +uint8_t ofileopen(const char*, const char*); +void ofileclose(); + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +void rootopen(); +uint8_t rootnextfile(); +uint8_t rootisfile(); +const char* rootfilename(); +uint32_t rootfilesize(); +void rootfileclose(); +void rootclose(); +void removefile(const char*); + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(uint8_t); + +/* + * The buffer I/O device. This is a stream to write to a given bufer + * from BASIC. + */ + +void bufferbegin(); +uint8_t bufferstat(uint8_t); +void bufferwrite(char); +char bufferread(); +char buffercheckch(); +uint16_t bufferavailable(); +uint16_t bufferins(char*, uint16_t); +void bufferouts(char*, uint16_t); + +/* + * Primary serial code uses the Serial object or Picoserial + * + * The picoseria an own interrupt function. This is used to fill + * the input buffer directly on read. Write is standard like in + * the serial code. + * + * As echoing is done in the interrupt routine, the code cannot be + * used to receive keystrokes from serial and then display the echo + * directly to a display. To do this the write command in picogetchar + * would have to be replaced with a outch() that then redirects to the + * display driver. This would be very tricky from the timing point of + * view if the display driver code is slow. + * + * The code for the UART control is mostly taken from PicoSerial + * https://github.com/gitcnd/PicoSerial, originally written by Chris Drake + * and published under GPL3.0 just like this code + * + */ + +void picobegin(uint32_t); +void picowrite(char); /* the write code, sending bytes directly to the UART */ +uint16_t picoins(char *, uint16_t); /* the ins code of picoserial, called like this in consins */ + +/* + * picogetchar: this is the interrupt service routine. It + * recieves a character and feeds it into a buffer and echos it + * back. The logic here is that the ins() code sets the buffer + * to the input buffer. Only then the routine starts writing to the + * buffer. Once a newline is received, the length information is set + * and picoa is also set to 1 indicating an available string, this stops + * recevieing bytes until the input is processed by the calling code. + */ +void picogetchar(char); + +/* + * blocking serial single char read for Serial + * unblocking for Picoserial because it is not + * character oriented -> blocking is handled in + * consins instead. + */ +char serialread(); +void serialbegin(); +uint8_t serialstat(uint8_t); /* state information on the serial port */ +void serialwrite(char); /* write to a serial stream */ +char serialcheckch(); /* check on a character, needed for breaking */ +uint16_t serialavailable(); /* avail method, needed for AVAIL() */ +void serialflush(); /* flush serial */ +uint16_t serialins(char*, uint16_t); /* read a line from serial */ + +/* + * reading from the console with inch or the picoserial callback + * this mixes interpreter levels as inch/outch are used here + * this code needs to go to the main interpreter section after + * thorough rewrite + */ +uint16_t consins(char *, uint16_t); + +void prtbegin(); /* second serial port */ +char prtopen(char*, uint16_t); /* the open functions are not needed here */ +void prtclose(); +uint8_t prtstat(uint8_t); +void prtwrite(char); +char prtread(); +char prtcheckch(); +uint16_t prtavailable(); +void prtset(uint32_t); +uint16_t prtins(char*, uint16_t); + +/* + * The wire code, direct access to wire communication + * in master mode wire_slaveid is the I2C address bound + * to channel &7 and wire_myid is 0 + * in slave mode wire_myid is the devices slave address + * and wire_slaveid is 0 + * ARDUINOWIREBUFFER is the maximum length of meesages the + * underlying library can process. This is 32 for the Wire + * library + */ + +void wirebegin(); +void wireslavebegin(uint8_t); +uint8_t wirestat(uint8_t); /* wire status - just checks if wire is compiled */ +uint16_t wireavailable(); /* available characters - test code ecapsulation prep for slave*/ +void wireonreceive(int h); /* eventhandler for received data */ +void wireonrequest(); /* event handler for request, deliver the message and forget the buffer */ + +/* + * as a master open sets the slave id for the communication + * no extra begin while we stay master + */ +void wireopen(char, uint8_t); +char wireread(); /* */ +void wirewrite(char c); /* */ +uint16_t wireins(char*, uint8_t); /* input an entire string */ +void wireouts(char*, uint8_t); /* send an entire string - truncate radically */ +int16_t wirereadbyte(uint8_t); +void wirewritebyte(uint8_t, int16_t); +void wirewriteword(uint8_t, int16_t, int16_t); + +/* + * Read from the radio interface, radio is always block + * oriented. This function is called from ins for an entire + * line. + * + * In blockmode the entire message is returned in the + * receiving string while in line mode the length of the + * string is adapted. Blockmode can be used to transfer + * binary data. + */ + +uint8_t radiostat(uint8_t); +uint64_t pipeaddr(const char*); /* generate a uint64_t pipe address from the filename string for RF24 */ +uint16_t radioins(char*, uint8_t); /* read an entire string */ +void radioouts(char *, uint8_t); /* write to radio, no character mode here */ +uint16_t radioavailable(); /* radio available */ +char radioread(); + +/* + * we always read from pipe 1 and use pipe 0 for writing, + * the filename is the pipe address, by default the radio + * goes to reading mode after open and is only stopped for + * write + */ +void iradioopen(const char *); +void oradioopen(const char *); +void radioset(uint8_t); + +/* + * Arduino Sensor library code + * The sensorread() is a generic function called by + * SENSOR basic function and command. The first argument + * is the sensor and the second argument the value. + * sensorread(n, 0) checks if the sensorstatus. + */ +void sensorbegin(); +float sensorread(uint8_t, uint8_t); + +/* + * prototypes for the interrupt interface + */ +/* some have it and some dont */ +#if !(defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_MBED_NANO) || defined(ARDUINO_ARCH_RENESAS)) +typedef int PinStatus; +#endif + +uint8_t pintointerrupt(uint8_t); +void attachinterrupt(uint8_t, void (*f)(), uint8_t); +void detachinterrupt(uint8_t); + +/* + * Experimental code to drive SPI SRAM + * + * Currently only the 23LCV512 is implemented, assuming a + * 64kB SRAM + * The code below is taken in part from the SRAMsimple library + * + * two buffers are implemented: + * - a ro buffer used by memread, this buffer is mainly reading the token + * stream at runtime. + * - a rw buffer used by memread2 and memwrite2, this buffer is mainly accessing + * the heap at runtime. In interactive mode this is also the interface to read + * and write program code to memory + * + */ + +/* the RAM begin method sets the RAM to sequential mode */ +uint16_t spirambegin(); +int8_t spiramrawread(uint16_t); +void spiram_bufferread(uint16_t, int8_t*, uint16_t); +void spiram_bufferwrite(uint16_t, int8_t*, uint16_t); +int8_t spiram_robufferread(uint16_t); +void spiram_rwbufferflush(); /* flush the buffer */ +int8_t spiram_rwbufferread(uint16_t); +void spiram_rwbufferwrite(uint16_t, int8_t); /* the buffered file write */ +void spiramrawwrite(uint16_t, int8_t); /* the simple unbuffered byte write, with a cast to signed char */ + + +/* + * This code measures the fast ticker frequency in microseconds + * It leaves the data in variable F. Activate this only for test + * purposes. + */ +void fasttickerprofile(); + +// defined RUNTIMEH +#endif diff --git a/data/Basic2/Windows/basic.c b/data/Basic2/Windows/basic.c new file mode 100644 index 0000000000000000000000000000000000000000..35b352e178e1d0caae92d1d60e014dd80aaa55fc --- /dev/null +++ b/data/Basic2/Windows/basic.c @@ -0,0 +1,9673 @@ +/*---------------------------------------------------------------- + * Please read this before compiling: + * - Review hardware.h for settings specific hardware settings. + * Super important on Arduino and Raspberry PI. + * - language.h controls the language features. + * For Arduino Integer BASIC is default and a limited language + * set. For the larger boards this can be extended a lot. + *----------------------------------------------------------------- + * + * $Id: basic.c,v 1.5 2024/03/02 15:38:20 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter - BASIC for everywhere. + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * Currently there are two versions of the runtime environment. + * One contains all platforms compiled in the Arduino IDE + * (ESP8266, ESP32, AVR, MEGAAVR, SAM*, RP2040) + * + * Anothers contains all platforms compiled in gcc with a POSIX OS + * (Mac, Raspberry, Windows/MINGW) plus rudimentary MSDOS with tc2.0. The + * latter will be removed soon. + * + * The interface to BASIC is identical. + */ + +/* the runtime environment */ +#include "hardware.h" +#include "runtime.h" + +/* + * the core basic language headers + */ +#include "language.h" +#include "basic.h" + +/* use long jump for error handling */ +#if USELONGJUMP == 1 +#include "setjmp.h" +#endif + +/* Global BASIC definitions */ + +/* + * All BASIC keywords for the tokens, PROGMEM on Arduino + * Normal memory elsewhere. + */ +const char sge[] PROGMEM = "=>"; +const char sle[] PROGMEM = "<="; +const char sne[] PROGMEM = "<>"; +/* Palo Alto language set */ +const char sprint[] PROGMEM = "PRINT"; +const char slet[] PROGMEM = "LET"; +const char sinput[] PROGMEM = "INPUT"; +const char sgoto[] PROGMEM = "GOTO"; +const char sgosub[] PROGMEM = "GOSUB"; +const char sreturn[] PROGMEM = "RETURN"; +const char sif[] PROGMEM = "IF"; +const char sfor[] PROGMEM = "FOR"; +const char sto[] PROGMEM = "TO"; +const char sstep[] PROGMEM = "STEP"; +const char snext[] PROGMEM = "NEXT"; +const char sstop[] PROGMEM = "STOP"; +const char slist[] PROGMEM = "LIST"; +const char snew[] PROGMEM = "NEW"; +const char srun[] PROGMEM = "RUN"; +const char sabs[] PROGMEM = "ABS"; +const char srnd[] PROGMEM = "RND"; +const char ssize[] PROGMEM = "SIZE"; +const char srem[] PROGMEM = "REM"; +/* Apple 1 language set */ +#ifdef HASAPPLE1 +const char snot[] PROGMEM = "NOT"; +const char sand[] PROGMEM = "AND"; +const char sor[] PROGMEM = "OR"; +const char slen[] PROGMEM = "LEN"; +const char ssgn[] PROGMEM = "SGN"; +const char speek[] PROGMEM = "PEEK"; +const char sdim[] PROGMEM = "DIM"; +const char sclr[] PROGMEM = "CLR"; +const char shimem[] PROGMEM = "HIMEM"; +const char stab[] PROGMEM = "TAB"; +const char sthen[] PROGMEM = "THEN"; +const char sbend[] PROGMEM = "END"; +const char spoke[] PROGMEM = "POKE"; +#endif +/* Stefan's basic additions */ +#ifdef HASSTEFANSEXT +const char scont[] PROGMEM = "CONT"; +const char ssqr[] PROGMEM = "SQR"; +const char spow[] PROGMEM = "POW"; +const char smap[] PROGMEM = "MAP"; +const char sdump[] PROGMEM = "DUMP"; +const char sbreak[] PROGMEM = "BREAK"; +#endif +/* LOAD and SAVE is always there */ +const char ssave[] PROGMEM = "SAVE"; +const char sload[] PROGMEM = "LOAD"; +#ifdef HASSTEFANSEXT +const char sget[] PROGMEM = "GET"; +const char sput[] PROGMEM = "PUT"; +const char sset[] PROGMEM = "SET"; +const char scls[] PROGMEM = "CLS"; +const char slocate[] PROGMEM = "LOCATE"; +const char selse[] PROGMEM = "ELSE"; +#endif +/* Arduino functions */ +#ifdef HASARDUINOIO +const char spinm[] PROGMEM = "PINM"; +const char sdwrite[] PROGMEM = "DWRITE"; +const char sdread[] PROGMEM = "DREAD"; +const char sawrite[] PROGMEM = "AWRITE"; +const char saread[] PROGMEM = "AREAD"; +const char sdelay[] PROGMEM = "DELAY"; +const char smillis[] PROGMEM = "MILLIS"; +const char sazero[] PROGMEM = "AZERO"; +const char sled[] PROGMEM = "LED"; +#endif +#ifdef HASTONE +const char stone[] PROGMEM = "PLAY"; +#endif +#ifdef HASPULSE +const char spulse[] PROGMEM = "PULSE"; +#endif +/* DOS functions */ +#ifdef HASFILEIO +const char scatalog[] PROGMEM = "CATALOG"; +const char sdelete[] PROGMEM = "DELETE"; +const char sfopen[] PROGMEM = "OPEN"; +const char sfclose[] PROGMEM = "CLOSE"; +const char sfdisk[] PROGMEM = "FDISK"; +#endif +/* low level access functions */ +#ifdef HASSTEFANSEXT +const char susr[] PROGMEM = "USR"; +const char scall[] PROGMEM = "CALL"; +#endif +/* mathematics */ +#ifdef HASFLOAT +const char ssin[] PROGMEM = "SIN"; +const char scos[] PROGMEM = "COS"; +const char stan[] PROGMEM = "TAN"; +const char satan[] PROGMEM = "ATAN"; +const char slog[] PROGMEM = "LOG"; +const char sexp[] PROGMEM = "EXP"; +#endif +/* INT is always needed to make float/int programs compatible */ +const char sint[] PROGMEM = "INT"; +/* elemetars graphics */ +#ifdef HASGRAPH +const char scolor[] PROGMEM = "COLOR"; +const char splot[] PROGMEM = "PLOT"; +const char sline[] PROGMEM = "LINE"; +const char scircle[] PROGMEM = "CIRCLE"; +const char srect[] PROGMEM = "RECT"; +const char sfcircle[] PROGMEM = "FCIRCLE"; +const char sfrect[] PROGMEM = "FRECT"; +#endif +/* Dartmouth BASIC extensions */ +#ifdef HASDARTMOUTH +const char sdata[] PROGMEM = "DATA"; +const char sread[] PROGMEM = "READ"; +const char srestore[] PROGMEM = "RESTORE"; +const char sdef[] PROGMEM = "DEF"; +const char sfn[] PROGMEM = "FN"; +const char son[] PROGMEM = "ON"; +#endif +/* The Darkarts commands */ +#ifdef HASDARKARTS +const char smalloc[] PROGMEM = "MALLOC"; +const char sfind[] PROGMEM = "FIND"; +const char seval[] PROGMEM = "EVAL"; +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING +const char serror[] PROGMEM = "ERROR"; +#endif +/* iot extensions */ +#ifdef HASIOT +const char savail[] PROGMEM = "AVAIL"; +const char sstr[] PROGMEM = "STR"; +const char sinstr[] PROGMEM = "INSTR"; +const char sval[] PROGMEM = "VAL"; +const char snetstat[] PROGMEM = "NETSTAT"; +const char ssensor[] PROGMEM = "SENSOR"; +const char swire[] PROGMEM = "WIRE"; +const char ssleep[] PROGMEM = "SLEEP"; +#endif +/* events and interrupts */ +#ifdef HASTIMER +const char safter[] PROGMEM = "AFTER"; +const char severy[] PROGMEM = "EVERY"; +#endif +#ifdef HASEVENTS +const char sevent[] PROGMEM = "EVENT"; +#endif +#ifdef HASSTRUCT +const char swhile[] PROGMEM = "WHILE"; +const char swend[] PROGMEM = "WEND"; +const char srepeat[] PROGMEM = "REPEAT"; +const char suntil[] PROGMEM = "UNTIL"; +const char sswitch[] PROGMEM = "SWITCH"; +const char scase[] PROGMEM = "CASE"; +const char sswend[] PROGMEM = "SWEND"; +const char sdo[] PROGMEM = "DO"; +const char sdend[] PROGMEM = "DEND"; +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS +const char sfend[] PROGMEM = "FEND"; +#endif +#endif +#ifdef HASMSSTRINGS +const char sasc[] PROGMEM = "ASC"; +const char schr[] PROGMEM = "CHR"; +const char sright[] PROGMEM = "RIGHT"; +const char sleft[] PROGMEM = "LEFT"; +const char smid[] PROGMEM = "MID"; +const char sspc[] PROGMEM = "SPC"; +#endif +#ifdef HASEDITOR +const char sedit[] PROGMEM = "EDIT"; +#endif + + +/* zero terminated keyword storage */ +const char* const keyword[] PROGMEM = { + sge, sle, sne, sprint, slet, sinput, + sgoto, sgosub, sreturn, sif, sfor, sto, + sstep, snext, sstop, slist, snew, srun, + sabs, srnd, ssize, srem, +#ifdef HASAPPLE1 + snot, sand, sor, slen, ssgn, speek, sdim, + sclr, shimem, stab, sthen, + sbend, spoke, +#endif +#ifdef HASSTEFANSEXT + scont, ssqr, spow, smap, sdump, sbreak, +#endif + ssave, sload, +#ifdef HASSTEFANSEXT + sget, sput, sset, scls, slocate, selse, +#endif +#ifdef HASARDUINOIO + spinm, sdwrite, sdread, sawrite, saread, + sdelay, smillis, sazero, sled, +#endif +#ifdef HASTONE + stone, +#endif +#ifdef HASPULSE + spulse, +#endif +#ifdef HASFILEIO + scatalog, sdelete, sfopen, sfclose, sfdisk, +#endif +#ifdef HASSTEFANSEXT + susr, scall, +#endif +#ifdef HASFLOAT + ssin, scos, stan, satan, slog, sexp, +#endif + sint, +#ifdef HASGRAPH + scolor, splot, sline, scircle, srect, + sfcircle, sfrect, +#endif +#ifdef HASDARTMOUTH + sdata, sread, srestore, sdef, sfn, son, +#endif +#ifdef HASDARKARTS + smalloc, sfind, seval, +#endif +/* complex error handling */ +#ifdef HASERRORHANDLING + serror, +#endif +#ifdef HASIOT + savail, sstr, sinstr, sval, + snetstat, ssensor, swire, ssleep, +#endif +#ifdef HASTIMER + safter, severy, +#endif +#ifdef HASEVENTS + sevent, +#endif +#ifdef HASSTRUCT + swhile, swend, srepeat, suntil, sswitch, scase, sswend, + sdo, sdend, +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS + sfend, +#endif +#endif +#ifdef HASMSSTRINGS + sasc, schr, sright, sleft, smid, sspc, +#endif +#ifdef HASEDITOR + sedit, +#endif + 0 +}; + +/* the zero terminated token dictonary needed for scalability */ +const token_t tokens[] PROGMEM = { + GREATEREQUAL, LESSEREQUAL, NOTEQUAL, TPRINT, TLET, + TINPUT, TGOTO, TGOSUB, TRETURN, TIF, TFOR, TTO, TSTEP, + TNEXT, TSTOP, TLIST, TNEW, TRUN, TABS, TRND, TSIZE, TREM, +#ifdef HASAPPLE1 + TNOT, TAND, TOR, TLEN, TSGN, TPEEK, TDIM, TCLR, + THIMEM, TTAB, TTHEN, TEND, TPOKE, +#endif +#ifdef HASSTEFANSEXT + TCONT, TSQR, TPOW, TMAP, TDUMP, TBREAK, +#endif + TSAVE, TLOAD, +#ifdef HASSTEFANSEXT + TGET, TPUT, TSET, TCLS, TLOCATE, TELSE, +#endif +#ifdef HASARDUINOIO + TPINM, TDWRITE, TDREAD, TAWRITE, TAREAD, TDELAY, TMILLIS, + TAZERO, TLED, +#endif +#ifdef HASTONE + TTONE, +#endif +#ifdef HASPULSE + TPULSE, +#endif +#ifdef HASFILEIO + TCATALOG, TDELETE, TOPEN, TCLOSE, TFDISK, +#endif +#ifdef HASSTEFANSEXT + TUSR, TCALL, +#endif +#ifdef HASFLOAT + TSIN, TCOS, TTAN, TATAN, TLOG, TEXP, +#endif + TINT, +#ifdef HASGRAPH + TCOLOR, TPLOT, TLINE, TCIRCLE, TRECT, + TFCIRCLE, TFRECT, +#endif +#ifdef HASDARTMOUTH + TDATA, TREAD, TRESTORE, TDEF, TFN, TON, +#endif +#ifdef HASDARKARTS + TMALLOC, TFIND, TEVAL, +#endif +#ifdef HASERRORHANDLING + TERROR, +#endif +#ifdef HASIOT + TAVAIL, TSTR, TINSTR, TVAL, TNETSTAT, + TSENSOR, TWIRE, TSLEEP, +#endif +#ifdef HASTIMER + TAFTER, TEVERY, +#endif +#ifdef HASEVENTS + TEVENT, +#endif +#ifdef HASSTRUCT + TWHILE, TWEND, TREPEAT, TUNTIL, TSWITCH, TCASE, TSWEND, + TDO, TDEND, +#endif +#ifdef HASDARTMOUTH +#ifdef HASMULTILINEFUNCTIONS + TFEND, +#endif +#endif +#ifdef HASMSSTRINGS + TASC, TCHR, TRIGHT, TLEFT, TMID, TSPC, +#endif +#ifdef HASEDITOR + TEDIT, +#endif + 0 +}; + +/* experimental, do not use right now */ +const bworkfunction_t workfunctions[] PROGMEM = { + 0, 0, 0, xprint, 0 +}; + +/* errors and messages */ +const char mfile[] PROGMEM = "file.bas"; +const char mprompt[] PROGMEM = "> "; +const char mgreet[] PROGMEM = "Stefan's Basic 2.0"; +const char mline[] PROGMEM = "LINE"; +const char mnumber[] PROGMEM = "NUMBER"; +const char mvariable[] PROGMEM = "VARIABLE"; +const char marray[] PROGMEM = "ARRAY"; +const char mstring[] PROGMEM = "STRING"; +const char mstringv[] PROGMEM = "STRINGVAR"; +const char egeneral[] PROGMEM = "Error"; +#ifdef HASERRORMSG +const char eunknown[] PROGMEM = "Syntax"; +const char enumber[] PROGMEM = "Number"; +const char edivide[] PROGMEM = "Div by 0"; +const char eline[] PROGMEM = "Unknown Line"; +const char emem[] PROGMEM = "Memory"; +const char estack[] PROGMEM = "Stack"; +const char erange[] PROGMEM = "Range"; +const char estring[] PROGMEM = "String"; +const char evariable[] PROGMEM = "Variable"; +const char eloop[] PROGMEM = "Loop"; +const char efile[] PROGMEM = "File"; +const char efun[] PROGMEM = "Function"; +const char eargs[] PROGMEM = "Args"; +const char eeeprom[] PROGMEM = "EEPROM"; +const char esdcard[] PROGMEM = "SD card"; +#endif + +const char* const message[] PROGMEM = { + mfile, mprompt, mgreet, + mline, mnumber, mvariable, marray, + mstring, mstringv, + egeneral +#ifdef HASERRORMSG + , eunknown, enumber, edivide, eline, + emem, estack, erange, + estring, evariable, eloop, efile, efun, eargs, + eeeprom, esdcard +#endif +}; + +/* + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: in the new code this is simply the size of the + * stringlength type. Currently only 1 byte and 2 bytes are tested. + */ +#ifdef HASFLOAT +const number_t maxnum=16777216; +#else +const number_t maxnum=(number_t)~((number_t)1<<(sizeof(number_t)*8-1)); +#endif +const int numsize=sizeof(number_t); +const int addrsize=sizeof(address_t); +const int eheadersize=sizeof(address_t)+1; +const int strindexsize=sizeof(stringlength_t); /* default in the meantime, strings up to unsigned 16 bit length */ +const address_t maxaddr=(address_t)(~0); + +/* + * The basic interpreter is implemented as a stack machine + * with global variable for the interpreter state, the memory + * and the arithmetic during run time. + */ + +/* the stack, all BASIC arithmetic is done here */ +//number_t stack[STACKSIZE]; +accu_t stack[STACKSIZE]; +address_t sp=0; + +/* a small buffer to process string arguments, mostly used for Arduino PROGMEM and string functions */ +/* use with care as it is used in some string functions */ +char sbuffer[SBUFSIZE]; + +/* the input buffer, the lexer can tokenize this and run from it, bi is an index to this. + bi must be global as it is the program cursor in interactive mode */ +char ibuffer[BUFSIZE] = "\0"; +char *bi; + +/* a static array of variables A-Z for the small systems that have no heap */ +#ifndef HASAPPLE1 +number_t vars[VARSIZE]; +#endif + +/* the BASIC working memory, either malloced or allocated as a global array */ +#if MEMSIZE != 0 +mem_t mem[MEMSIZE]; +#else +mem_t* mem; +#endif +address_t himem, memsize; + +/* reimplementation of the loops, will replace the forstack */ +bloop_t loopstack[FORDEPTH]; +index_t loopsp = 0; + +/* the GOSUB stack remembers an address to jump to */ +address_t gosubstack[GOSUBDEPTH]; +index_t gosubsp = 0; + +/* arithmetic accumulators */ +number_t x, y; + +/* the name of on object, replaced xc and xy in BASIC 1 */ +name_t name; + +/* an address accumulator, used a lot in string operations */ +address_t ax; + +/* a string index registers, new style identifying a string either in C memory or BASIC memory */ +string_t sr; + +/* the active token */ +token_t token; + +/* the curent error, can be a token, hence token type */ +token_t er; +/* the jmp buffer for the error handling */ +#if USELONGJUMP == 1 +jmp_buf sthook; +#endif + +/* a trapable error */ +mem_t ert; + +/* the interpreter state, interactive, run or run from EEPROM */ +mem_t st; + +/* the current program location */ +address_t here; + +/* the topmost byte of a program in memory, beginning of free BASIC RAM */ +address_t top; + +/* used to format output with # */ +mem_t form = 0; + +/* do we use the Microsoft convention of an array starting at 0 or 1 like Apple 1 + two seperate variables because arraylimit can be changed at runtime for existing arrays + msarraylimit says if an array should be created with n or n+1 elements */ +#ifdef MSARRAYLIMITS +mem_t msarraylimits = 1; +address_t arraylimit = 0; +#else +mem_t msarraylimits = 0; +address_t arraylimit = 1; +#endif + + +/* behaviour around boolean, needed to change the interpreters personality at runtime */ +/* -1 is microsoft true while 1 is Apple 1 and C style true. */ +mem_t booleanmode = BOOLEANMODE; + +/* setting the interpreter to integer at runtime */ +mem_t forceint = 0; + +/* the default size of a string now as a variable */ +stringlength_t defaultstrdim = STRSIZEDEF; + +/* the base of the random number generator + * 0 is Apple 1 style RND from 0 to n-epsilon + * 1 is Palo Alto style from 1 to n + */ +mem_t randombase = 0; + +/* is substring logic used or not */ +#ifdef SUPPRESSSUBSTRINGS +mem_t substringmode = 0; +#else +mem_t substringmode = 1; +#endif + +/* the flag for true MS tabs */ +mem_t reltab = 0; + +/* the flag for lower case names */ +mem_t lowercasenames = 0; + +/* the number of arguments parsed from a command */ +mem_t args; + +/* the random number seed, this is unsigned */ +#ifndef HASFLOAT +address_t rd; +#else +unsigned long rd; +#endif + +/* the RUN debuglevel */ +mem_t debuglevel = 0; + +/* DATA pointer, where is the current READ statement */ +#ifdef HASDARTMOUTH +address_t data = 0; +address_t datarc = 1; +#endif + +/* + * process command line arguments in the POSIX world + * bnointafterrun is a flag to remember if called as command + * line argument, in this case we don't return to interactive + */ +#ifdef HASARGS +int bargc; +char** bargv; +mem_t bnointafterrun = 0; +#endif + +/* formaters lastouttoken and spaceafterkeyword to make a nice LIST */ +mem_t lastouttoken; +mem_t spaceafterkeyword; +mem_t outliteral = 0; +mem_t lexliteral = 0; + +/* + * The cache for the heap search - helps the string code. + * The last found object on the heap is remembered. This is needed + * because the string code sometime searches the heap twice during the + * same operation. Also, bfind is used to remember the length of the + * last found object. + */ +#ifdef HASAPPLE1 +heap_t bfind_object; +#endif + +/* + * a variable for string to numerical conversion, + * telling you were the number ended. + */ +address_t vlength; + +/* the timer code - very simple needs to be converted to to a struct */ +/* timer type */ +#ifdef HASTIMER +btimer_t after_timer = {0, 0, 0, 0, 0}; +btimer_t every_timer = {0, 0, 0, 0, 0}; +#endif + +/* the event code */ +#ifdef HASEVENTS + +#define EVENTLISTSIZE 4 + +/* the event list */ +int nevents = 0; +int ievent = 0; +mem_t events_enabled = 1; +volatile bevent_t eventlist[EVENTLISTSIZE]; + +/* the extension of the GOSUB stack */ +mem_t gosubarg[GOSUBDEPTH]; +#endif + +#ifdef HASERRORHANDLING +/* the error handler type, very simple for now */ +typedef struct { + mem_t type; + address_t linenumber; +} berrorh_t; + +berrorh_t berrorh = {0 , 0}; +mem_t erh = 0; +#endif + +/* the string for real time clocks */ +char rtcstring[20] = { 0 }; + +/* the units pulse operates on, in microseconds*/ +address_t bpulseunit = 10; + +/* only needed for POSIXNONBLOCKING */ +mem_t breakcondition = 0; + +/* the FN context, how deep are we in a nested function call, negative values reserved */ +int fncontext = 0; + +/* the accuracy of a equal or not equal statement on numbers */ +#ifdef HASFLOAT +number_t epsilon = 0; +#else +const number_t epsilon = 0; +#endif + +/* + * BASIC timer stuff, this is a core interpreter function now + */ + +/* the millis function for BASIC */ +void bmillis() { + number_t m; +/* millis is processed as integer and is cyclic mod maxnumber and not cast to float!! */ + m=(number_t) (millis()/(unsigned long)pop() % (unsigned long)maxnum); + push(m); +} + +/* + * Determine the possible basic memory size. + * using malloc causes some overhead which can be relevant on the smaller + * boards. + * + * Set MEMSIZE instead to a static value. In this case ballocmem + * just returns the static MEMSIZE. + * + * If SPIRAMINTERFACE is defined, we use the memory from a serial RAM and dont + * allocate it here at all. + * + */ +#if MEMSIZE == 0 && !(defined(SPIRAMINTERFACE)) +address_t ballocmem() { + +/* on most platforms we know the free memory for BASIC, this comes from runtime */ + long m=freememorysize(); + +/* we subtract some language feature depended things, this is only needed on + small Arduino boards with memories below 16kb */ + if (m < 16000) { +#ifdef HASAPPLE1 + m-=64; /* strings cost memory */ +#endif +#ifdef USELONGJUMP + m-=160; /* odd but true on Ardunio UNO and the like */ +#endif +#ifdef HASFLOAT + m-=96; +#endif +#ifdef HASGRAPH + m-=256; +#endif + } + +/* and keep fingers crossed here */ + if (m<0) m=128; + +/* we allocate as much as address_t can handle */ + if (m>maxaddr) m=maxaddr; + +/* try to allocate the memory */ + mem=(mem_t*)malloc(m); + if (mem != 0) return m-1; + +/* fallback if allocation failed, 128 bytes */ + mem=(mem_t*)malloc(128); + if (mem != 0) return 128; else return 0; + +} +#else +address_t ballocmem(){ return MEMSIZE-1; }; +#endif + +/* + * Layer 0 function - variable handling. + * + * These function access variables and data + */ + +/* + * Eeprom load / save / autorun functions + * needed for SAVE and LOAD to an EEPROM + * autorun is generic. + * + * The eeprom is accessed through the runtime functions + * elength(), eupdate(), ewrite() and eflush(); + * + */ + +/* save a file to EEPROM, disabled if we use the EEPROM directly */ +void esave() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + + /* does the program fit into the eeprom */ + if (top+eheadersize < elength()) { + + /* EEPROM per default is 255, 0 indicates that there is a program */ + eupdate(a++, 0); + + /* store the size of the program in byte 1,2,... of the EEPROM*/ + setaddress(a, beupdate, top); + a+=addrsize; + + /* store the program */ + while (a < top+eheadersize){ + eupdate(a, memread2(a-eheadersize)); + a++; + } + eupdate(a++,0); + + /* needed on I2C EEPROM and other platforms where we buffer */ + eflush(); + + } else { + error(EOUTOFMEMORY); + er=0; + } +#endif +} + +/* load a file from EEPROM, disabled if the use the EEPROM directly */ +void eload() { +#ifndef EEPROMMEMINTERFACE + address_t a=0; + + /* have we stored a program? */ + if (elength()>0 && (eread(a) == 0 || eread(a) == 1)) { + + /* how long is it? */ + a++; + top=getaddress(a, beread); + a+=addrsize; + + /* load it to memory, memwrite2 is direct mem access */ + while (a < top+eheadersize){ + memwrite2(a-eheadersize, beread(a)); + a++; + } + } else { + /* no valid program data is stored */ + error(EEEPROM); + } +#endif +} + +/* autorun something from EEPROM or a filesystem */ +char autorun() { + +/* autorun from EEPROM if there is an EEPROM flagged for autorun */ + if (elength()>0 && eread(0) == 1) { /* autorun from the EEPROM */ + top=getaddress(1, beread); + st=SERUN; + return 1; /* EEPROM autorun overrules filesystem autorun */ + } + +/* autorun from a given command line argument, if we have one */ +#ifdef HASARGS + if (bargc > 0 && ifileopen(bargv[1])) { + xload(bargv[1]); + st=SRUN; + ifileclose(); + bnointafterrun=TERMINATEAFTERRUN; + return 1; + } +#endif + +/* on a platform with a file system, autoexec from a file */ +#if defined(FILESYSTEMDRIVER) + if (ifileopen("autoexec.bas")) { + xload("autoexec.bas"); + st=SRUN; + ifileclose(); + return 1; + } +#endif + +/* nothing to autorun */ + return 0; +} + +#ifdef HASAPPLE1 +/* + * The new malloc code. Heap structure is now + * payload + * (payload size) + * name + * type + * + * In the new heap implementation himem points to the first free byte on the heap. + * The payload is stored first and then the header. + * + * The new heap code uses name_t for the name of the object. + * + */ + +address_t bmalloc(name_t* name, address_t l) { + address_t payloadsize; /* the payload size */ + address_t heapheadersize = sizeof(name_t) + addrsize; /* this is only used to estimate the free space, it is the maximum */ + address_t b=himem; /* the current position on the heap, we store it in case of errors */ + +/* Initial DEBUG message. */ + if (DEBUG) { + outsc("** bmalloc with token "); + outnumber(name->token); outspc(); + outname(name); outspc(); + outnumber(l); outcr(); + } + +/* + * How much space does the payload of the object need? + */ + switch(name->token) { + case VARIABLE: /* a variable needs numsize bytes*/ + payloadsize=numsize; + + break; +#ifndef HASMULTIDIM + case ARRAYVAR: /* a one dimensional array needs numsize*l bytes */ + payloadsize=numsize*l; + break; +#else + case ARRAYVAR: /* a two dimensional array needs numsize*l bytes plus one word for the additional dimension*/ + payloadsize=numsize*l+addrsize; + break; +#endif +#ifdef HASDARTMOUTH + case TFN: /* the jump address, the type of function/type of return value, the number of vars + and all variables are stored*/ + payloadsize=addrsize+2+sizeof(name_t)*l; + break; +#endif +/* these are plain buffers allocated by the MALLOC call in BASIC */ + default: + payloadsize=l; + } + +/* enough memory ?, on an EEPROM system we limit the heap to the RAM */ +#ifndef EEPROMMEMINTERFACE + if ((himem-top) < payloadsize+heapheadersize) { error(EOUTOFMEMORY); return 0;} +#else + if (himem-(elength()-eheadersize) < payloadsize+heapheadersize) { error(EOUTOFMEMORY); return 0;} +#endif + +/* first we reserve space for the payload, address points to the first byte of the payload */ +/* b points to the first free byte after the payload*/ + b-=payloadsize; + bfind_object.address=b+1; + +/* for ARRAYS, STRINGS and BUFFERS, store the object length now - these are variable size objects*/ + if (name->token != VARIABLE) { + b-=(addrsize-1); + setaddress(b, memwrite2, payloadsize); + if (DEBUG) { + outsc("** bmalloc writes payloadsize "); outnumber(payloadsize); + outsc(" at "); outnumber(b); outcr(); + } + b--; + } + +/* store the name of the objects including the type as identifier */ + b=setname_heap(b, name); + +/* store the type of the object */ + memwrite2(b--, name->token); + +/* if anything went wrong we exit here without changing himem */ + if (b < top || er) { error(EOUTOFMEMORY); return 0; } + +/* we fill the cache here as well, both right now for compatibility */ + bfind_object.name=*name; + bfind_object.size=payloadsize; + +/* himem is the next free byte now again */ + himem=b; + + if (DEBUG) { + outsc("** bmalloc returns "); outnumber(bfind_object.address); + outsc(" himem is "); outnumber(himem); outcr(); + } + +/* return the address of the payload */ + return bfind_object.address; +} + +address_t bfind(name_t* name) { + address_t b, b0; + address_t i=0; + +/* Initial DEBUG message. */ + if (DEBUG) { + outsc("*** bfind called for "); outname(name); + outsc(" on heap with token "); outnumber(name->token); + outsc(" himem is "); outnumber(himem); outcr(); + } + +/* do we have anything on the heap? */ + if (himem == memsize) return 0; else b=himem+1; + +/* we have the object already in cache and return */ + if (name->token == bfind_object.name.token && cmpname(name, &bfind_object.name)) { + if (DEBUG) { outsc("*** bfind found in cache "); outname(name); outsc(" at "); outnumber(bfind_object.address); outcr(); } + return bfind_object.address; + } + +/* walk through the heap from the last object added to the first */ + while (b <= memsize) { + +/* get the name and the type */ + bfind_object.name.token=memread2(b++); + b=getname(b, &bfind_object.name, memread2); + +/* determine the size of the object and advance */ + if (bfind_object.name.token != VARIABLE) { + bfind_object.size=getaddress(b, memread2); + b+=addrsize; + } else { + bfind_object.size=numsize; + } + +/* this is the location of the payload */ + bfind_object.address=b; + +/* have we found the object */ + if (name->token == bfind_object.name.token && cmpname(name, &bfind_object.name)) { + if (DEBUG) { outsc("*** bfind found "); outname(name); outsc(" at "); outnumber(bfind_object.address); outcr(); } + return bfind_object.address; + } + +/* advance on the heap */ + b0=b; + b+=bfind_object.size; + +/* safety net */ + if (b0 > b) { + error(EVARIABLE); + return 0; + } + + } + +/* nothing found return 0 and clear the cache */ + + if (DEBUG) { outsc("bfind returns 0"); outcr(); } + zeroheap(&bfind_object); + return 0; +} + +/* reimplementation bfree with name interface */ +address_t bfree(name_t* name) { + address_t b; + address_t i; + + if (DEBUG) { outsc("*** bfree called for "); outname(name); outsc(" on heap with token "); outnumber(name->token); outcr(); } + +/* use bfind to find the place */ + b=bfind(name); + +/* nothing found, return 0 */ + if (b == 0) return 0; + + if (DEBUG) { outsc("** bfree found "); outnumber(b); outcr(); } + +/* clear the entire memory area */ + for (i=himem; i<=b+bfind_object.size-1; i++) memwrite2(i, 0); + +/* set the number of variables to the new value */ + himem=b+bfind_object.size-1; + + if (DEBUG) { outsc("** bfree returns "); outnumber(himem); outcr(); } + +/* forget the chache, because heap structure has changed !! */ + zeroheap(&bfind_object); + return himem; +} + +/* the length of an object, we directly return from the cache */ +address_t blength(name_t* name) { + if (bfind(name)) return bfind_object.size; else return 0; +} +#endif /* HASAPPLE1 */ + +/* reimplementation of getvar and setvar with name_t */ +number_t getvar(name_t *name){ + address_t a; + + if (DEBUG) { outsc("* getvar "); outname(name); outspc(); outcr(); } + +/* the special variables */ + if (name->c[0] == '@') { + switch (name->c[1]) { + case 'A': + return availch(); + case 'S': + return ert|ioer; + case 'I': + return id; + case 'O': + return od; + case 'C': + if (availch()) return inch(); else return 0; + case 'E': + return elength()/numsize; + case 0: + return (himem-top)/numsize; + case 'R': + return rd; + case 'U': + return getusrvar(); +#ifdef HASFLOAT + case 'P': + return epsilon; +#endif +#ifdef HASIOT + case 'V': + return vlength; +#endif +#if defined(DISPLAYDRIVER) || defined (GRAPHDISPLAYDRIVER) + case 'X': + return dspgetcursorx(); + case 'Y': + return dspgetcursory(); +#endif + } + } + +#ifdef HASAPPLE1 +/* search the heap first */ + a=bfind(name); + if (!USELONGJUMP && er) return 0; + +/* if we don't find on the heap and it is not a static variable, we autocreate */ + if (a == 0) { + a=bmalloc(name, 0); + if (!USELONGJUMP && er) return 0; + } + +/* something went wrong */ + if (a == 0) { + error(EVARIABLE); + return 0; + } +/* retrieve the value */ + return getnumber(a, memread2); + +#else +/* we only have the static variable array */ + if (name->c[0] >= 65 && name->c[0] <= 91 && name->c[1] == 0) return vars[name->c[0]-65]; + +/* systems without Apple1 extension i.e. HEAP throw an error */ + error(EVARIABLE); + return 0; +#endif +} + +/* set and create a variable */ +void setvar(name_t *name, number_t v){ + address_t a; + + if (DEBUG) { outsc("* setvar "); outname(name); outspc(); outnumber(v); outcr(); } + +/* the special variables */ + if (name->c[0] == '@') + switch (name->c[1]) { + case 'S': + ert=v; + ioer=v; + return; + case 'I': + id=v; + return; + case 'O': + od=v; + return; + case 'C': + outch(v); + return; + case 'R': + rd=v; + return; + case 'U': + setusrvar(v); + return; +#ifdef HASFLOAT + case 'P': + epsilon=v; + return; +#endif +#ifdef HASIOT + case 'V': + return; +#endif +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case 'X': + dspsetcursorx((int)v); +/* set the charcount, this is half broken but works */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=v; +#endif + return; + case 'Y': + dspsetcursory((int)v); + return; +#endif + } + +#ifdef HASAPPLE1 +/* dynamically allocated vars */ + a=bfind(name); + +/* autocreate if not found */ + if (a == 0) { + a=bmalloc(name, 0); + if (!USELONGJUMP && er) return; + } + +/* something went wrong */ + if (a == 0) { + error(EVARIABLE); + return; + } + +/* set the value */ + setnumber(a, memwrite2, v); +#else +/* the static variable array */ + if (name->c[1] == 0 && name->c[0] >= 65 && name->c[0] <= 91) { + vars[name->c[0]-65]=v; + return; + } + error(EVARIABLE); +#endif +} + +/* clr all variables */ +void clrvars() { + +/* delete all static variables */ + address_t i; + +/* clear static variable (only on no heap systems) */ +#ifndef HASAPPLE1 + for (i=0; ic[1]); + memwrite2(m--, name->c[0]); + return m; +} + +/* this one is for the pgm were we count up writing */ +address_t setname_pgm(address_t m, name_t* name) { + memwrite2(m++, name->c[0]); + memwrite2(m++, name->c[1]); + return m; +} + +/* get a name from a memory location */ +address_t getname(address_t m, name_t* name, memreader_t f) { + name->c[0]=f(m++); + name->c[1]=f(m++); + return m; +} + +/* compare two names */ +mem_t cmpname(name_t* a, name_t* b) { + if (a->c[0] == b->c[0] && a->c[1] == b->c[1]) return 1; else return 0; +} + +/* zero a name and a heap object */ +void zeroname(name_t* name) { + name->c[0]=0; + name->c[1]=0; + name->token=0; +} + +void zeroheap(heap_t* heap) { + heap->address=0; + heap->size=0; + zeroname(&heap->name); +} + +/* output a name */ +void outname(name_t* name) { + outch(name->c[0]); + if (name->c[1]) outch(name->c[1]); +} + +#else +/* this one is for the heap were we count down writing*/ +address_t setname_heap(address_t m, name_t* name) { + mem_t l; + for(l=name->l; l>0; l--) memwrite2(m--, name->c[l-1]); + memwrite2(m--, name->l); + return m; +} + +/* this one is for the pgm were we count up writing */ +address_t setname_pgm(address_t m, name_t* name) { + mem_t l; + memwrite2(m++, name->l); + for(l=0; ll; l++) memwrite2(m++, name->c[l]); + return m; +} + +/* get a name from a memory location */ +address_t getname(address_t m, name_t* name, memreader_t f) { + mem_t l; + name->l=f(m++); + + for(l=0; ll; l++) name->c[l]=f(m++); + for(; lc[l]=0; /* should not be there, is needed for + now because the lexer is not implemented correctly*/ + return m; +} + +/* compare two names */ +mem_t cmpname(name_t* a, name_t* b) { + mem_t l; + if (a->l != b->l) return 0; + for(l=0; ll; l++) if (a->c[l] != b->c[l]) return 0; + return 1; +} + +/* zero a name and a heap object */ +void zeroname(name_t* name) { + mem_t l; + name->l=0; + for(l=0; lc[l]=0; + name->token=0; +} + +void zeroheap(heap_t* heap) { + heap->address=0; + heap->size=0; + zeroname(&heap->name); +} + +/* output a name */ +void outname(name_t* name) { + mem_t l; + for(l=0; ll; l++) outch(name->c[l]); +} +#endif + + +/* + * Create an array. + * + * Arrays are created on the heap. This code allows redimensioning of arrays + * which leads to a new array with the same name on the heap. This new + * array is found first in a heap search. This ways we can have arrays + * as local variables. + * + * msarraylimits is a flag to indicate that arrays should be created with + * 0-n elements like in Microsoft BASIC. + * + */ +address_t createarray(name_t* variable, address_t i, address_t j) { + address_t a; + +/* if we want to me MS compatible, the array ranges from 0-n */ + if (msarraylimits) { + i+=1; + j+=1; + } + +/* this code allows redimension now for local variables */ +#ifdef HASAPPLE1 + if (DEBUG) { + outsc("* create array "); outname(variable); outspc(); + outsc("* with name length "); outnumber(variable->l); outspc(); + outnumber(i); outspc(); outnumber(j); outcr(); + } + +#ifndef HASMULTIDIM + return bmalloc(variable, i); +#else + +/* allocate the array space */ + a=bmalloc(variable, i*j); + +/* store the dimension of the array at the beginning of the array area */ + setaddress(a+i*j*numsize, memwrite2, j); + +/* return value is the address of the payload area */ + return a; +#endif +#endif + return 0; +} + +/* + * The array function. + + * We use the lefthandside object here with the convention that i is the first index + * and j the second index. This is inconsistent with the use in strings. Will be fixed + * when a true indexing type is introduced. + */ +void array(lhsobject_t* object, mem_t getset, number_t* value) { + address_t a; /* the address of the array element */ + address_t h; /* the number of elements in the array */ + address_t l=arraylimit; /* the lower limit, defaults to the arraylimit, here for further use */ + address_t dim=1; /* the array dimension */ + + if (DEBUG) { + outsc("* array2: accessing "); + outname(&name); outspc(); outspc(); + outnumber(object->i); outspc(); + outnumber(object->j); outspc(); + outsc(" getset "); outch(getset); outcr(); + } + +/* handling the special array, range check and access is done here */ + if (object->name.c[0] == '@') { + switch(object->name.c[1]) { + case 'E': + h=elength()/numsize; + a=elength()-numsize*object->i; + if (a < eheadersize) { error(EORANGE); return; } + if (getset == 'g') *value=getnumber(a, beread); + else if (getset == 's') setnumber(a, beupdate, *value); + return; +#if defined(DISPLAYDRIVER) && defined(DISPLAYCANSCROLL) + case 'D': + if (getset == 'g') *value=dspget(object->i-1); + else if (getset == 's') dspset(object->i-1, *value); + return; +#endif +#if defined(HASCLOCK) + case 'T': + if (getset == 'g') *value=rtcget(object->i); + else if (getset == 's') rtcset(object->i, *value); + return; +#endif +#if defined(ARDUINO) && defined(ARDUINOSENSORS) + case 'S': + if (getset == 'g') *value=sensorread(object->i, 0); + return; +#endif + case 'U': + if (getset == 'g') *value=getusrarray(object->i); + else if (getset == 's') setusrarray(object->i, *value); + return; + case 0: + h=(himem-top)/numsize; + a=himem-numsize*(object->i+1)+1; + if (object->i < 0 || a < top) { error(EORANGE); return; } + if (getset == 'g') *value=getnumber(a, memread2); + else if (getset == 's') setnumber(a, memwrite2, *value); + return; + case 'M': + h=himem-top; + a=himem-object->i; + if (object->i < 0 || a < top) { error(EORANGE); return; } + if (getset == 'g') *value=memread2(a); + else if (getset == 's') memwrite2(a, *value); + return; + default: + error(EVARIABLE); + return; + } + } else { +/* dynamically allocated arrays */ +#ifdef HASAPPLE1 + object->name.token=ARRAYVAR; + if (!(a=bfind(&object->name))) a=createarray(&object->name, ARRAYSIZEDEF, 1); + if (!USELONGJUMP && er) return; + +/* multidim reserves one address word for the dimension, hence we have less bytes */ +#ifndef HASMULTIDIM + h=bfind_object.size/numsize; +#else + h=(bfind_object.size-addrsize)/numsize; +#endif + + if (DEBUG) { + outsc("** in array dynamical base address "); outnumber(a); + outsc(" and array element number "); outnumber(h); + outcr(); + } + +#ifdef HASMULTIDIM + dim=getaddress(a+bfind_object.size-addrsize, memread2); + if (DEBUG) { + outsc("** in array, second dimension is "); outnumber(dim); + outspc(); outnumber(a+bfind_object.size); + outcr(); + } + a=a+((object->i-l)*dim+(object->j-l))*numsize; +#else + a=a+(object->i-l)*numsize; +#endif +#else /* no array code */ + error(EVARIABLE); + return; +#endif + } + +/* range check */ +#ifdef HASMULTIDIM + if ( (object->j < l) || (object->j >= dim+l) || (object->i < l) || (object->i >= h/dim+l)) { error(EORANGE); return; } +#else + if ( (object->i < l) || (object->i >= h+l) ) { error(EORANGE); return; } +#endif + +/* set or get the array */ + if (getset == 'g') *value=getnumber(a, memread2); + else if (getset == 's') setnumber(a, memwrite2, *value); +} + +/* + * Create a string on the heap. + * + * i is the length of the string, j the dimension of the array. + * + * String objects are either plain strings or arrays. In case of arrays + * the number of strings is stored at the end of the array. + */ +address_t createstring(name_t* variable, address_t i, address_t j) { +#ifdef HASAPPLE1 + address_t a; + + if (DEBUG) { outsc("Create string "); outname(variable); outcr(); } + +/* the MS string compatibility, DIM 10 creates 11 elements */ + if (msarraylimits) j+=1; + +#ifndef HASMULTIDIM +/* if no string arrays are in the code, we reserve the number of bytes i and space for the index */ +/* allow redimension without check right now, for local variables */ + a=bmalloc(variable, i+strindexsize); + if (er != 0) return 0; + return a; +#else +/* string arrays need the number of array elements which address_ hence addresize bytes and then + the space for j strings */ +/* allow redimension without check right now, for local variables */ + a=bmalloc(variable, addrsize+j*(i+strindexsize)); + if (er != 0) return 0; + +/* set the array length */ + setaddress(a+j*(i+strindexsize), memwrite2, j); + +/* return the address of the first string */ + return a; +#endif + if (er != 0) return 0; + return a; +#else + return 0; +#endif +} + + +/* + * Get a string at position b. + * + * getstring returns a pointer to the first string element in question. + * + * There is a lo tof complexity in the code to support systems with serial + * memory. + * + */ +#ifdef HASAPPLE1 + +/* helpers to handle strings */ +/* Stores a C string to a BASIC string variable */ +void storecstring(address_t ax, address_t s, char* b) { + address_t k; + + for (k=0; k < s-strindexsize && b[k] != 0; k++) memwrite2(ax+k+strindexsize, b[k]); + setstrlength(ax, memwrite2, k); +} + +/* length of a c string up to a limit l */ +address_t cstringlength(char* c, address_t l) { + address_t a; + + while(a < l && c[a] != 0) a++; + return a; +} + +/* get a memory pointer to a string, new version */ +void getstring(string_t* strp, name_t* name, address_t b, address_t j) { + address_t k, zt; + address_t ax; + +/* we know nothing about the string */ + ax=0; + strp->address=0; + strp->ir=0; + strp->length=0; + strp->arraydim=1; + strp->strdim=0; + + if (DEBUG) { + outsc("* getstring from var "); outname(name); outspc(); + outnumber(b); outspc(); + outnumber(j); outcr(); + } + +/* special string variables */ + if (name->c[0] == '@') + switch(name->c[1]) { + case 0: + strp->ir=ibuffer+b; + strp->length=ibuffer[0]; + strp->strdim=BUFSIZ-2; + return; + default: + error(EVARIABLE); + return; + case 'U': + makeusrstring(); /* a user definable special string in sbuffer */ + strp->ir=sbuffer+b; + strp->length=sbuffer[0]; + return; +#ifdef HASCLOCK + case 'T': + rtcmkstr(); /* the time string */ + strp->ir=rtcstring+b; + strp->length=rtcstring[0]; + return; +#endif +/* the arguments string on POSIX systems */ +#ifdef HASARGS + case 'A': + if (bargc > 2) { + strp->ir=bargv[2]; + strp->length=cstringlength(bargv[2], BUFSIZE); + return; + } + return; +#endif + } + +/* dynamically allocated strings, create on the fly */ + if (!(ax=bfind(name))) ax=createstring(name, defaultstrdim, arraylimit); + + if (DEBUG) { + outsc("** heap address "); outnumber(ax); outcr(); + if (ax) { outsc("** byte length of string memory segment "); outnumber(bfind_object.size); outcr(); } + } + +/* string creating has caused an error, typically no memoryy */ + if (!USELONGJUMP && er) return; + +#ifndef HASMULTIDIM +/* the maximum length of the string */ + strp->strdim=bfind_object.size-strindexsize; + +/* are we in range */ + if ((b < 1) || (b > strp->strdim )) { error(EORANGE); return; } + + if (DEBUG) { outsc("** maximum string length "); outnumber(strp->strdim); outcr(); } + +/* get the actual full length, this is redundant to lenstring but lenstring does + not autocreate */ + strp->length=getstrlength(ax, memread2); + +/* now find the payload address */ + ax=ax+strindexsize+(b-1); +#else + +/* the dimension of the string array */ +/* it is at the top of the string, this uses a side effect of bfind */ + strp->arraydim=getaddress(ax + bfind_object.size - addrsize, memread2); + +/* is the array index in range */ + if ((j < arraylimit) || (j >= strp->arraydim + arraylimit )) { error(EORANGE); return; } + + if (DEBUG) { outsc("** string dimension "); outnumber(strp->arraydim); outcr(); } + +/* the max length of a string */ + strp->strdim=(bfind_object.size - addrsize)/strp->arraydim-strindexsize; + +/* are we in range */ + if ((b < 1) || (b > strp->strdim )) { error(EORANGE); return; } + + if (DEBUG) { outsc("** maximum string length "); outnumber(strp->strdim); outcr(); } + +/* the base address of a string */ + ax=ax+(j-arraylimit)*(strp->strdim + strindexsize); + + if (DEBUG) { outsc("** string base address "); outnumber(ax); outcr(); } + +/* from this base address we can get the actual length of the string */ + strp->length=getstrlength(ax, memread2); + +/* the address of the payload */ + ax=ax+b-1+strindexsize; + +#endif + + if (DEBUG) { outsc("** payload address "); outnumber(ax); outcr(); } + +/* store the payload address to the string object, length to be done if needed!! */ + strp->address=ax; + +/* return value is 0 if we have no direct memory access, the caller needs to handle the string + through the mem address */ +#ifdef USEMEMINTERFACE + strp->ir=0; +#else + strp->ir=(char *)&mem[ax]; +#endif +} + + +/* reimplementation with name_t */ +/* set the length of a string */ +void setstringlength(name_t* name, address_t l, address_t j) { + address_t a; + stringlength_t stringdim; + + if (DEBUG) { + outsc("** setstringlength "); + outname(name); + outspc(); outnumber(l); outspc(); outnumber(j); + outcr(); + } + +/* the special strings */ + if (name->c[0] == '@') + switch(name->c[1]) { + case 0: + *ibuffer=l; + return; + case 'U': + /* do nothing here for the moment */ + return; + } + +/* find the variable address */ + a=bfind(name); + if (!USELONGJUMP && er) return; + if (a == 0) { error(EVARIABLE); return; } + +/* stringdim calculation moved here */ +#ifndef HASMULTIDIM + stringdim=bfind_object.size-strindexsize; +#else +/* getaddress seeks the dimension of the string array directly after the payload */ + stringdim=(bfind_object.size - addrsize)/(getaddress(a + bfind_object.size - addrsize, memread2)) - strindexsize; +#endif + +/* where do we write it to */ + a=a+(stringdim+strindexsize)*(j-arraylimit); + if (DEBUG) { outsc("** setstringlength writing to "); outnumber(a); outsc(" value "); outnumber(l); outcr(); } + setstrlength(a, memwrite2, l); +} + +/* the BASIC string mechanism for real time clocks, create a string with the clock data */ +#ifdef HASCLOCK +void rtcmkstr() { + int cc = 1; + int t; + +/* hours */ + t=rtcget(2); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* minutes */ + t=rtcget(1); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]=':'; + +/* seconds */ + t=rtcget(0); + rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='-'; + +/* days */ + t=rtcget(4); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* months */ + t=rtcget(5); + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc++]='/'; + +/* years */ + t=rtcget(6)%100; /* only 100 years no 19xx epochs */ + if (t/10 > 0) rtcstring[cc++]=t/10+'0'; + rtcstring[cc++]=t%10+'0'; + rtcstring[cc]=0; + +/* needed for BASIC strings */ + rtcstring[0]=cc-1; +} +#endif +#endif + +/* + * Layer 0 Extension: the user defined extension functions, use this function for a + * quick way to extend BASIC. + * + * @U is a single variable that can be set and get. Every access to this variable + * calls getusrvar() or setusrvar(). + * @U() is a 1d array every access calls get or setusrarray(). + * @U$ is a read only string created by makeusrstring(). + * USR(32, V) is a user defined function created by usrfunction(). + * CALL 32 is a user defined call + * + */ + +/* read or write the variable @U, you can do anything you want here */ +number_t getusrvar() { return 0; } +void setusrvar(number_t v) {return; } + +/* read or write the array @U(), you can do anything you want here */ +number_t getusrarray(address_t i) {return 0;} +void setusrarray(address_t i, number_t v) {return; } + +/* make the usr string from @U$, this function can be called multiple times for one operation */ +void makeusrstring() { +/* + * sample code could be: + * + * mem_t i; + * const char text[] = "hello world"; + * for(i=0; i 31 calls this */ +number_t usrfunction(address_t i, number_t v) { return 0; } + +/* CALL with arguments > 31 calls this */ +void usrcall(address_t i) { return; } + +/* + * Layer 0 - keyword handling - PROGMEM logic goes here + * getkeyword(), getmessage(), and getokenvalue() are + * the only access to the keyword array in the code. + * + * Same for messages and errors. + * + * All keywords are stored in PROGMEM, the Arduino way to store + * constant data in flash memory. sbuffer is used to recall the + * keywords and messages from PROGMEM on Arduino. Other systems + * use the keyword array directly. + */ +char* getkeyword(address_t i) { + + if (DEBUG) { outsc("** getkeyword from index "); outnumber(i); outcr(); } + +#ifndef ARDUINOPROGMEM + return (char *) keyword[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(keyword[i]))); + return sbuffer; +#endif +} + +/* messages are read from the message array */ +char* getmessage(char i) { + if (i >= sizeof(message) || i < 0) return 0; +#ifndef ARDUINOPROGMEM + return (char *) message[i]; +#else + strcpy_P(sbuffer, (char*) pgm_read_ptr(&(message[i]))); + return sbuffer; +#endif +} + +/* tokens read here are token_t constructed from multi byte sequences */ +token_t gettokenvalue(address_t i) { + if (i >= sizeof(tokens)) return 0; +#ifndef ARDUINOPROGMEM + return tokens[i]; +#else +#ifndef HASLONGTOKENS + return (token_t) pgm_read_byte(&tokens[i]); +#else + return (token_t) pgm_read_word(&tokens[i]); +#endif +#endif +} + +/* print a message directly to the default outpur stream */ +void printmessage(char i){ +#ifndef HASERRORMSG + if (i > EGENERAL) return; +#endif + outsc((char *)getmessage(i)); +} + +/* + * Layer 0 - error handling + * + * The general error handler. The static variable er + * contains the error state. + * + * debugtoken() writes a token for debug + * bdebug() is the general debug message function + * + * Strategy: the error() function writes the message and then + * clears the stack. All calling functions must check er and + * return after funtion calls with no further messages etc. + * reseterror() sets the error state to normal and end the + * run loop. + */ +void error(token_t e){ + address_t i; + +/* store the error number */ + er=e; + +/* clear the stacks */ + clearst(); + clrforstack(); + clrgosubstack(); + +/* switch off all timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +/* is the error handler active? then silently go if we do GOTO or CONT actions in it */ +#ifdef HASERRORHANDLING +#if !USELONGJUMP + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) return; +#else + if (st != SINT && (berrorh.type == TGOTO || berrorh.type == TCONT)) longjmp(sthook, er); +#endif +#endif + +/* set input and output device back to default, and delete the form */ + iodefaults(); + form=0; + +/* find the line number if in RUN modes */ + if (st != SINT) { + outnumber(myline(here)); + outch(':'); + outspc(); + } + +/* if we have error messages, display them */ +#ifdef HASERRORMSG + if (e > 0) + printmessage(e); + else { + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=e; i++); + outsc(getkeyword(i)); + } + outspc(); + printmessage(EGENERAL); +#else + printmessage(EGENERAL); + outspc(); + outnumber(er); +#endif + if (DEBUG) { outsc("** at "); outnumber(here); } + outcr(); + +/* reset fncontext - this is odd */ + fncontext=0; + +/* we return to the statement loop, bringing the error with us */ +#if USELONGJUMP == 1 + longjmp(sthook, er); +#endif +} + +void reseterror() { + er=0; + here=0; + st=SINT; +} + +void debugtoken(){ + outsc("* "); + if (debuglevel>2) { outnumber(here); outsc(" * "); } + + if (token == EOL) { + outsc("EOL"); + return; + } + + switch(token) { + case LINENUMBER: + printmessage(MLINE); + break; + case NUMBER: + printmessage(MNUMBER); + break; + case VARIABLE: + printmessage(MVARIABLE); + break; + case ARRAYVAR: + printmessage(MARRAY); + break; + case STRING: + printmessage(MSTRING); + break; + case STRINGVAR: + printmessage(MSTRINGVAR); + break; + } + + outspc(); + outputtoken(); +} + +void bdebug(const char *c){ + outch('*'); + outspc(); + outsc(c); + debugtoken(); + outcr(); +} + +/* + * Arithmetic and runtime operations are mostly done + * on a stack of number_t. + * + * push(), pop(), clearst() handle the stack + */ +void push(number_t t){ + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(t); outcr(); + } + +/* in forced integer mode every operation is truncated */ +#ifdef HASFLOAT + if (forceint) t=trunc(t); +#endif + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].n=t; +} + +number_t pop(){ + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp-1].n); outcr(); + } + + if (sp == 0) { error(ESTACK); return 0; } + + return stack[--sp].n; +} + +void pushaddress2(address_t a) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(a); outcr(); + } + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].a=a; +} + +address_t popaddress2() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp-1].a); outcr(); + } + + if (sp == 0) { error(ESTACK); return 0; } + + return stack[--sp].a; +} + +void pushinteger(index_t i) { + + if (DEBUG) { + outsc("** push sp= "); outnumber(sp); outcr(); + outsc("** push value= "); outnumber(i); outcr(); + } + + if (sp == STACKSIZE) + error(ESTACK); + else + stack[sp++].i=i; +} + +index_t popinteger() { + + if (DEBUG) { + outsc("** pop sp= "); outnumber(sp); outcr(); + outsc("** pop value= "); outnumber(stack[sp-1].i); outcr(); + } + + if (sp == 0) { error(ESTACK); return 0; } + + return stack[--sp].i; +} + + +/* this one gets a positive integer from the stack and traps the error*/ +address_t popaddress(){ + number_t tmp = 0; + + tmp=pop(); + if (tmp < 0) { error(EORANGE); return 0;} + return (address_t) tmp; +} + +void clearst(){ + sp=0; +} + +/* these are not really stack operations but a way to handle temp char data */ +address_t charsp; + +void pushchar(char ch) {} + +char popchar() { return 0; } + +/* + * clear the cursor for the READ/DATA mechanism + */ +void clrdata() { +#ifdef HASDARTMOUTH + data=0; +#endif +} + +/* + * Stack handling for FOR + * Reimplementation of the for stack with names and with all loops + * cleaned up. + */ + +/* the new stack type for loops */ +void pushloop(name_t* name, token_t t, address_t here, number_t to, number_t step) { + address_t i; + + if (DEBUG) { + outsc("** loopsp and here in pushloopstack "); + outnumber(loopsp); outspc(); outnumber(here); outcr(); + if (name != 0) { outsc("** loop name "); outname(name); outcr(); } + else { outsc("** loop name is 0"); outcr(); } + outsc("** loop token "); outnumber(t); outcr(); + outsc("** loop to "); outnumber(to); outcr(); + outsc("** loop step "); outnumber(step); outcr(); + } + +/* + * Before pushing into the loop stack we check is an + * old loop exists. + * + * There are two situations to handle: + * 1. A loop is reentered because a GOTO went back to or even before + * the loop start. This is identified by the here location. + * 2. A new FOR loop is created after the existing loop with the same + * variable name. This happens if a jump or break went outside the + * loop. This is identified by the variable name. +*/ + +/* Situation 1, scan for here */ + for(i=0; i0) { + return &loopstack[loopsp-1]; + } else { + error(ELOOP); + return 0; + } +} + +void droploop() { + if (loopsp>0) { + loopsp--; + } else { + error(ELOOP); + return; + } +} + +void clrforstack() { + loopsp=0; +} + +/* GOSUB stack handling */ +void pushgosubstack(mem_t a){ + if (gosubsp < GOSUBDEPTH) { + gosubstack[gosubsp]=here; +#ifdef HASEVENTS + gosubarg[gosubsp]=a; +#endif + gosubsp++; + } else + error(TGOSUB); +} + +void popgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TRETURN); + return; + } + here=gosubstack[gosubsp]; +} + +void dropgosubstack(){ + if (gosubsp>0) { + gosubsp--; + } else { + error(TGOSUB); + } +} + +void clrgosubstack() { + gosubsp=0; +} + +/* two helper commands for structured BASIC, without the GOSUB stack */ + +void pushlocation(blocation_t* l) { + if (st == SINT) l->location=bi-ibuffer; + else l->location=here; + l->token=token; +} + +void poplocation(blocation_t* l) { + if (st == SINT) bi=ibuffer+l->location; + else here=l->location; + token=l->token; +} + +/* little helpers of the io functions */ + +/* send a newline */ +void outcr() { +#ifdef HASSERIAL1 + if (sendcr) outch('\r'); +#endif + outch('\n'); +} + +/* send a space */ +void outspc() { + outch(' '); +} + +/* output a zero terminated string - c style */ +void outsc(const char *c){ while (*c != 0) outch(*c++); } + +/* output a zero terminated string in a formated box padding spaces + needed for catalog output */ +void outscf(const char *c, index_t f){ + int i = 0; + + while (*c != 0) { outch(*c++); i++; } + if (f > i) { + f=f-i; + while (f--) outspc(); + } +} + +/* + * reading a positive number from a char buffer + * maximum number of digits is adjusted to 16 + * ugly here, testcode when introducting + * number_t was only 16 bit before + */ +address_t parsenumber(char *c, number_t *r) { + address_t nd = 0; + + *r=0; + while (*c >= '0' && *c <= '9' && *c != 0) { + *r=*r*10+*c++-'0'; + nd++; + if (nd == SBUFSIZE) break; + } + return nd; +} + + +#ifdef HASFLOAT +/* a poor man's atof implementation with character count */ +address_t parsenumber2(char *c, number_t *r) { + address_t nd = 0; + index_t i; + number_t fraction = 0; + number_t exponent = 0; + mem_t nexp = 0; + + *r=0; + +/* integer part */ + i=parsenumber(c, r); + c+=i; + nd+=i; + +/* the fractional part */ + if (*c == '.') { + c++; + nd++; + + i=parsenumber(c, &fraction); + c+=i; + nd+=i; + + if (i > 0) { + while ((--i)>=0) fraction=fraction/10; + *r+=fraction; + } + } + +/* the exponent */ + if (*c == 'E' || *c == 'e') { + c++; + nd++; + if (*c == '-') {c++; nd++; nexp=1;}; + i=parsenumber(c, &exponent); + nd+=i; + while ((--exponent)>=0) if (nexp) *r=*r/10; else *r=*r*10; + } + + return nd; +} +#endif + +/* + * convert a number to a string + * the argument type controls the largest displayable integer + * default is int but it can be increased without any side effects + */ +address_t writenumber(char *c, wnumber_t v){ + address_t nd = 0; + index_t i,j; + mem_t s = 1; + char c1; + +/* the sign */ + if (v<0) s=-1; + +/* the digits */ + do { + c[nd++]=(v%10)*s+'0'; + v=v/10; + } while (v != 0); + +/* print the minus */ + if (s < 0 ) c[nd]='-'; else nd--; + +/* reverse the order of digits */ + i=0; + j=nd; + while (j>i) { + c1=c[i]; + c[i]=c[j]; + c[j]=c1; + i++; + j--; + } + + nd++; + c[nd]=0; + return nd; +} + +#ifdef HASFLOAT +/* + * this is for floats, handling output without library + * functions as well. + */ +address_t tinydtostrf(number_t v, index_t p, char* c) { + index_t i; + address_t nd = 0; + number_t f; + +/* if we are in forced integer mode */ + if (forceint) { + v=trunc(v); + return writenumber(c, (int)v); + } + +/* we do the sign here and don't rely on writenumbers sign handling, guess why */ + if (v<0) { + v=fabs(v); + c[nd++]='-'; + } + +/* write the integer part */ + nd+=writenumber(c+nd, (int)v); + c[nd++]='.'; + +/* only the fraction to precision p */ + f=fabs(v); + +/* get p digits of the fraction */ + for (i=p; i>0; i--) { + f=f-floor(f); + f=f*10; + c[nd++]=(int)floor(f)+'0'; + } + +/* and a terminating 0 */ + c[nd]=0; + return nd; +} + +address_t writenumber2(char *c, number_t vi) { + index_t i; + index_t nd; + number_t f; + index_t exponent = 0; + mem_t eflag=0; + const int p = 5; + +/* pseudo integers are displayed as integer + zero trapped here */ + f=floor(vi); + if (f == vi && fabs(vi) < maxnum) return writenumber(c, vi); + +/* earlier, floats where displayed in POSIx using the libraties + * return sprintf(c, "%g", vi); + * we dont do this any more + */ + +/* we check if we have anything to write */ + if (!isfinite(vi)) { + c[0]='*'; + c[1]=0; + return 1; + } + +/* normalize the number and see which exponent we have to deal with */ + f=vi; + while (fabs(f)<1.0) { f=f*10; exponent--; } + while (fabs(f)>=10.0-0.00001) { f=f/10; exponent++; } + +/* there are platforms where dtostrf is broken, we do things by hand in a simple way */ + + if (exponent > -2 && exponent < 7) { + tinydtostrf(vi, 5, c); + } else { + tinydtostrf(f, 5, c); + eflag=1; + } + +/* remove trailing zeros */ + for (i=0; (i < SBUFSIZE && c[i] !=0 ); i++); + i--; + +/* */ + while (c[i] == '0' && i>1) { i--; } + i++; + +/* add the exponent */ + if (eflag && exponent != 0) { + c[i++]='E'; + i+=writenumber(c+i, exponent); + } + + c[i]=0; + return i; + +} +#endif + +/* + * innumber is used as a helper only by xinput(). It reads a number from an input + * buffer and returns it in the number_t r. It returns 0 if the number is invalid, 1 if + * the number is valid, and -1 if the user has pressed the BREAKCHAR key. + * + * Unlike the old innumber() implementation it is meant to read comma separated numbers + * through input. Handling of the buffer is done by the calling function. + * + * The TINYBASICINPUT is an alternative implementation following the Palo Alto BASIC + * way of doing it. The expression parser is reused. This allows variables names and + * expressions to be used as input as well. + * Due to the reuse of sbuffer in the calling function, this will probably only work + * in RUN mode. + */ + +int innumber(number_t *r, char* buffer, address_t k) { + address_t i = k; + mem_t s = 1; + +#ifndef HASTINYBASICINPUT +/* result is zero*/ + *r=0; + +/* remove all leading whitespaces first */ + while ((buffer[i] == ' ' || buffer[i] == '\t') && i <= (address_t) buffer[0]) i++; + +/* is there anything left */ + if (i > (address_t) buffer[0]) return 0; + +/* now the sign */ + if (buffer[i] == '-') { s=-1; i++; } + +/* check for the break character */ + if (buffer[i] == BREAKCHAR) return -1; + +/* the number */ +#ifndef HASFLOAT + if (buffer[i] < '0' || buffer[i] > '9') return 0; + i+=parsenumber(&buffer[i], r); +#else + if ((buffer[i] < '0' || buffer[i] > '9') && buffer[i] != '.') return 0; + i+=parsenumber2(&buffer[i], r); +#endif + +/* the sign */ + *r*=s; + return i; +#else + char *b; + token_t t; + +/* result is zero */ + *r=0; + +/* save the interpreter state */ + b=bi; + s=st; + t=token; + +/* switch to fake interactive with the buffer as input */ + st=SINT; + bi=buffer+k; + +/* BREAK handling */ + if (*bi == BREAKCHAR) { + return -1; + } + +/* start to interpret the buffer as an expression */ + nexttoken(); + expression(); + +/* restore the interpreter state */ + i=bi-buffer-1; + bi=b; + st=s; + token=t; + +/* error handling, we trap the error and return zero */ + if (er) { + er=0; + return 0; + } + +/* the result is on the stack */ + *r=pop(); + return i; +#endif +} + +/* prints a number */ +void outnumber(number_t n){ + address_t nd, i; + +/* number write to sbuffer, remember the number of digits in nd */ +#ifndef HASFLOAT + nd=writenumber(sbuffer, n); +#else + nd=writenumber2(sbuffer, n); +#endif + +/* negative number format aligns right */ + if (form < 0) { i=nd; while(i < -form) {outspc(); i++;} } + +/* the number */ + outs(sbuffer, nd); + +/* number formats in Palo Alto style, positive numbers align left */ + if (form > 0) { while (nd < form) {outspc(); nd++;} } +} + +/* + * Layer 1 functions - providing data into the global variable and + * changing the interpreter state + */ + +/* + * Lexical analyser - tokenizes the input line. + * + * nexttoken() increments the input buffer index bi and delivers values in the global + * variable token, with arguments in the accumulators ax, x and the index register ir + * name is used in the routine. + * + * name, sr, ax and x change values in nexttoken and deliver the result to the calling + * function. + * + * bi and ibuffer should not be changed or used for any other function in + * interactive node as they contain the state of nexttoken(). In run mode + * bi and ibuffer are not used as the program is fully tokenized in mem. + * + * all this is pretty much stateless. + */ + +/* skip whitespaces */ +void whitespaces(){ + while (*bi == ' ' || *bi == '\t') bi++; +} + +/* upper case, don't trust the buildins on microcontrollers */ +char btoupper(char c) { + if (c >= 'a' && c <= 'z') return c-32; else return c; +} + +/* the token stream */ +void nexttoken() { + address_t k, l, i; + char* ir; + char quotechar; + +/* RUN mode vs. INT mode, in RUN mode we read from mem via gettoken() */ + if (st == SRUN || st == SERUN) { +/* in the token stream we call fastticker - all fast timing functions are in stream */ + fastticker(); +/* read the token from memory */ + gettoken(); +/* show what we are doing */ + if (debuglevel>1) { debugtoken(); outcr(); } + return; + } + +/* after change in buffer logic the first byte is reserved for the length */ + if (bi == ibuffer) bi++; + +/* literal mode only(!) EOL ends literal mode, used to have REM without quotes */ + if (lexliteral) { + token=*bi; + if (*bi != '\0') bi++; else lexliteral=0; + return; + } + +/* remove whitespaces outside strings */ + whitespaces(); + +/* end of line token */ + if (*bi == '\0') { + token=EOL; + if (DEBUG) debugtoken(); + return; + } + +/* unsigned numbers, value returned in x */ +#ifndef HASFLOAT + if (*bi <='9' && *bi >= '0') { + bi+=parsenumber(bi, &x); +#else + if ((*bi <='9' && *bi >= '0') || *bi == '.') { + bi+=parsenumber2(bi, &x); +#endif + token=NUMBER; + if (DEBUG) debugtoken(); + return; + } + +/* strings between " " or " EOL, value returned in ir and in sr for now */ + if (*bi == '"' || *bi == '\'') { + quotechar=*bi; + k=0; + bi++; + ir=bi; + sr.ir=bi; + while(*bi != quotechar && *bi !='\0') { + k++; + bi++; + } + bi++; + token=STRING; + sr.length=k; + sr.address=0; /* we don't find the string in BASIC memory, as we lex from bi */ + if (DEBUG) debugtoken(); + return; + } + +/* + * relations + * single character relations are their own token + * >=, =<, =<, =>, <> are tokenized + */ + if (*bi == '=') { + bi++; + whitespaces(); + if (*bi == '>') { + token=GREATEREQUAL; + bi++; + } else if (*bi == '<') { + token=LESSEREQUAL; + bi++; + } else { + token='='; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '>'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=GREATEREQUAL; + bi++; + } else { + token='>'; + } + if (DEBUG) debugtoken(); + return; + } + + if (*bi == '<'){ + bi++; + whitespaces(); + if (*bi == '=') { + token=LESSEREQUAL; + bi++; + } else if (*bi == '>') { + token=NOTEQUAL; + bi++; + } else { + token='<'; + } + if (DEBUG) debugtoken(); + return; + } + +/* + * Keyworks and variables + * + * Isolate a word, bi points to the beginning, l is the length of the word. + * ir points to the end of the word after isolating. + * @ is a letter here to make the special @ arrays possible. + */ + + l=0; + ir=bi; + while (-1) { + if (*ir >= 'a' && *ir <= 'z') { + if (!lowercasenames) *ir-=32; /* toupper code, changing the input buffer directly */ + ir++; + l++; + } else if ((*ir >= '@' && *ir <= 'Z') || *ir == '_') { + ir++; + l++; + } else { + break; + } + } + + +/* + * Ir is reused here to implement string compares + * scanning the keyword array. + * Once a keyword is detected the input buffer is advanced + * by its length, and the token value is returned. + * + * Keywords are an array of null terminated strings. + * They are always matched uppercase. + */ + k=0; + while (gettokenvalue(k) != 0) { + ir=getkeyword(k); + i=0; + while (*(ir+i) != 0) { + if (*(ir+i) != btoupper(*(bi+i))) { + k++; + i=0; + break; + } else + i++; + } + if (i == 0) continue; + bi+=i; + token=gettokenvalue(k); + if (token == TREM) lexliteral=1; + if (DEBUG) debugtoken(); + return; + } + +/* + * A variable has length 2 with either two letters or a letter + * and a number. @ can be the first letter of a variable. + * Here, no tokens can appear any more as they have been processed + * further up. + * + * The longname code supports MAXNAME characters and _ as additional character. + */ +#ifdef HASLONGNAMES + if (l>0 && l<=MAXNAME) { + token=VARIABLE; + zeroname(&name); + while (((*bi >= '0' && *bi <= '9') || + (*bi >= '@' && *bi <= 'Z') || + (*bi >= 'a' && *bi <= 'z') || + (*bi == '_') ) && name.l < MAXNAME && *bi != 0) { + name.c[name.l]=*bi; + bi++; + name.l++; + } + if (*bi == '$') { + token=STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token=ARRAYVAR; + } +/* the new code filling the name variable directly, will be used in the entire code soon */ + name.token=token; + if (DEBUG) debugtoken(); + return; + } +#else + if (l == 1 || l == 2) { + token=VARIABLE; + name.l=0; + name.c[0]=*bi; + name.c[1]=0; + bi++; + if ((*bi >= '0' && *bi <= '9') || (*bi >= 'A' && *bi <= 'Z') || *bi == '_' ) { + name.c[1]=*bi; + bi++; + } + if (*bi == '$') { + token=STRINGVAR; + bi++; + } + whitespaces(); + if (token == VARIABLE && *bi == '(' ) { + token=ARRAYVAR; + } +/* the new code filling the name variable directly, will be used in the entire code soon */ + name.token=token; + if (DEBUG) debugtoken(); + return; + } +#endif + +/* other single characters are parsed and stored */ + token=*bi; + bi++; + if (DEBUG) debugtoken(); + return; +} + +/* + * Layer 1 - program editor + * + * Editing the program, the structure of a line is + * LINENUMBER linenumber(2 or more bytes) token(n bytes) + * + * store* stores something to memory + * get* retrieves information + * + * No matter how long number_t is in the C implementation + * we pack into bytes, this is clumsy but portable + * the store and get commands all operate on here + * and advance it + * + * storetoken() operates on the variable top. + * We always append at the end and then sort. + * + * gettoken() operate on the variable here + * which will also be the key variable in run mode. + * + * tokens are stored including their payload. + * + * This group of functions changes global states and + * cannot be called at program runtime with saving + * the relevant global variable to the stack. + */ + +/* + * check if we still have memory left, on RAM only systems we make + * sure that we don't hit himem. On systems with EEPROM program storage we make + * sure that we stay within the EEPROM range. + */ +char nomemory(number_t b){ +#ifndef EEPROMMEMINTERFACE + if (top >= himem-b) return 1; else return 0; +#else + if (top >= elength()-eheadersize-b) return 1; else return 0; +#endif +} + +/* store a token - check free memory before changing anything */ +void storetoken() { + int i; + + switch (token) { + case LINENUMBER: + if (nomemory(addrsize+1)) break; + memwrite2(top++, token); + setaddress(top, memwrite2, ax); + top+=addrsize; + return; + case NUMBER: + if (nomemory(numsize+1)) break; + memwrite2(top++, token); + setnumber(top, memwrite2, x); + top+=numsize; + return; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + if (nomemory(sizeof(name_t))) break; + memwrite2(top++, token); + top=setname_pgm(top, &name); + return; + case STRING: + i=sr.length; + if (nomemory(i+2)) break; + memwrite2(top++, token); + memwrite2(top++, i); + while (i > 0) { memwrite2(top++, *sr.ir++); i--; } + return; + default: + if (token >= -127) { /* the good old code with just one byte token */ + if (nomemory(1)) break; + memwrite2(top++, token); + } else { +#ifdef HASLONGTOKENS + if (nomemory(2)) break; /* this is the two byte token extension */ + memwrite2(top++, TEXT1); + memwrite2(top++, token+255); +#endif + } + return; + } +} + + +/* + * wrappers around mem access in genereal + * + * memread is used only in the token stream, it reads from a stream + * read only. If run is done from eeprom then bytes are taken from this + * stream, this would also be the place to implement direct run from + * another device like a file system or embedded programs on flash. + * Only the token stream uses memread. + * + * memread2 and memwrite2 always go to ram. They are read/write. Variables and + * the program editor uses these functions. + * + * currently only the SPIRAM and the EEPROM direct edit interface is implemented. + * This is handled in the runtime library. + * + * USEMEMINTERFACE is the macro to control this. + * + * The POSIX code has a test interface for SPIRAM as a dummy. + * + */ +#ifndef USEMEMINTERFACE +mem_t memread(address_t a) { + if (st != SERUN) { + return mem[a]; + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return mem[a]; } + +void memwrite2(address_t a, mem_t c) { mem[a]=c; } +#else +#if defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR) +mem_t memread(address_t a) { + if (st != SERUN) { + return spiram_robufferread(a); + } else { + return eread(a+eheadersize); + } +} + +mem_t memread2(address_t a) { return spiram_rwbufferread(a); } + +void memwrite2(address_t a, mem_t c) { spiram_rwbufferwrite(a, c); } +#else +#ifdef EEPROMMEMINTERFACE +mem_t memread(address_t a) { + if (a < elength()-eheadersize) return eread(a+eheadersize); else return mem[a-(elength()-eheadersize)]; +} + +mem_t memread2(address_t a) { return memread(a); } + +void memwrite2(address_t a, mem_t c) { + if (a < elength()-eheadersize) eupdate(a+eheadersize, c); else mem[a-(elength()-eheadersize)]=c; +} +#endif +#endif +#endif + + +/* get a token from memory */ +void gettoken() { + stringlength_t i; + +/* if we have reached the end of the program, EOL is always returned + we don't rely on mem having a trailing EOL */ + if (here >= top) { + token=EOL; + return; + } + +/* if we have no data type we are done reading just one byte */ + token=memread(here++); + name.token=token; + +/* if there are multibyte tokens, get the next byte and construct a token value <-127 */ +#ifdef HASLONGTOKENS + if (token == TEXT1) { + token=memread(here++)-255; + } +#endif + + /* otherwise we check for the argument */ + switch (token) { + case LINENUMBER: + ax=getaddress(here, memread); + here+=addrsize; + break; + case NUMBER: + x=getnumber(here, memread); + here+=numsize; + break; + case ARRAYVAR: + case VARIABLE: + case STRINGVAR: + here=getname(here, &name, memread); + name.token=token; + break; + case STRING: + sr.length=(unsigned char)memread(here++); + +/* + * if we run from EEPROM, the input buffer is used to get string constants. + * if we run on a system with real memory, we produce a mem pointer + * otherwise the caller has to handle strings through the address (SPIRAM systems) + */ + if (st == SERUN) { + for(i=0; i= top) { + here=top; + ax=0; + return; + } + } +} + +/* + * the line cache mechanism, useful for large codes. + * addlinecache does not test if the line already exist because it + * assumes that findline calls it only if a new line is to be stored + * the LINECACHE size depends on the architecture. + */ +#if defined(LINECACHESIZE) && LINECACHESIZE>0 +const unsigned char linecachedepth = LINECACHESIZE; +typedef struct {address_t l; address_t h;} linecacheentry; +linecacheentry linecache[LINECACHESIZE]; +unsigned char linecachehere = 0; + +void clrlinecache() { + unsigned char i; + + for(i=0; i= h) break; + gettoken(); + } + here=here2; + if (token == LINENUMBER) + return l1; + else + return l; +} + +/* + * Move a block of storage beginng at b ending at e + * to destination d. No error handling here!! + */ +void moveblock(address_t b, address_t l, address_t d) { + address_t i; + + if (d+l > himem) { + error(EOUTOFMEMORY); + return; + } + if (l<1) return; + + if (b < d) for (i=l; i>0; i--) memwrite2(d+i-1, memread2(b+i-1)); + else for (i=0; i himem) { error(EOUTOFMEMORY); return; } + if (l<1) return; + + for (i=0; i y) break; + } + +/* + * at this point y contains the number of the line to be inserted + * x contains the number of the first line with a higher line number + * or 0 if the line is to be inserted at the end + * here points to the following line and here2 points to the previous line + */ + if (ax == 0) { + here=here3-lnlength; + gettoken(); + if (token == LINENUMBER && ax == y) { // we have a double line at the end + here2-=lnlength; + here-=lnlength; + moveblock(here2, linelength, here); + top=here+linelength; + } + return; + } + here-=lnlength; + t1=here; + here=here2-lnlength; + t2=here; + gettoken(); + if (ax == y) { /* the line already exists and has to be replaced */ + here2=t2; /* this is the line we are dealing with */ + here=t1; /* this is the next line */ + y=here-here2; /* the length of the line as it is */ + if (linelength == y) { /* no change in line length */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else if (linelength > y) { /* the new line is longer than the old one */ + moveblock(here, top-here, here+linelength-y); + here=here+linelength-y; + top=top+linelength-y; + moveblock(top-linelength, linelength, here2); + top=top-linelength; + } else { /* the new line is short than the old one */ + moveblock(top-linelength, linelength, here2); + top=top-linelength; + moveblock(here, top-here, here2+linelength); + top=top-y+linelength; + } + } else { /* the line has to be inserted in between */ + here=t1; + moveblock(here, top-here, here+linelength); + moveblock(top, linelength, here); + } + } +} + +/* + * Layer 1 - the code in this section calculates an expression + * with a recursive descent algorithm + * + * all function use the stack to pass values back. We use the + * Backus-Naur form of basic from here https://rosettacode.org/wiki/BNF_Grammar + * implementing a C style logical expression model + */ + +/* the terminal symbol it ends a statement list - ELSE is one too as it ends a statement list */ +char termsymbol() { + return (token == LINENUMBER || token == ':' || token == EOL || token == TELSE); +} + +/* a little helpers - one token expect */ +char expect(token_t t, mem_t e) { + nexttoken(); + if (token != t) {error(e); return 0; } else return 1; +} + +/* a little helpers - expression expect */ +char expectexpr() { + nexttoken(); + expression(); + if (er != 0) return 0; else return 1; +} + +/* parses a list of expression, this may be recursive! */ +void parsearguments() { + short argsl; + +/* begin counting */ + argsl=0; + +/* having 0 args at the end of a command is legal */ + if (!termsymbol()) { + +/* list of expressions separated by commas */ + do { + expression(); + if (er != 0) break; + argsl++; + if (token == ',') nexttoken(); else break; + } while (1); + } + +/* because of the recursion ... */ + args=argsl; +} + + +/* expect exactly n arguments */ +void parsenarguments(char n) { + parsearguments(); + if (args != n) error(EARGS); +} + +/* counts and parses the number of arguments given in brakets, this function + should not advance to the next token because it is called in factor */ +void parsesubscripts() { + blocation_t l; + + args=0; + + if (DEBUG) { + outsc("** in parsesubscripts "); outcr(); + bdebug("token "); + } + +/* remember where we where */ + pushlocation(&l); + +/* parsesubscripts is called directly after the object in question, it does + nexttoken() itself now */ + nexttoken(); + +/* if we have no bracket here, we return with zero */ + if (token != '(') { + poplocation(&l); + return; + } + nexttoken(); + +/* if () we return also with -1 */ +#ifdef HASMULTIDIM + if (token == ')') { + args=-1; + return; + } +#endif + +/* now we are ready to parse a set of arguments */ + parsearguments(); + if (!USELONGJUMP && er) return; + + if (token != ')') { error(EARGS); return; } /* we return with ) as a last token on success */ + +/* we end with the ) still as active token */ +} + +/* parse a function argument ae is the number of + expected expressions in the argument list, parsesubscripts + should not avance precisely because it is used in factor */ + +void parsefunction(void (*f)(), short ae){ + parsesubscripts(); + if (!USELONGJUMP && er) return; + if (args == ae) f(); else error(EARGS); +} + +/* helper function in the recursive decent parser */ +void parseoperator(void (*f)()) { + mem_t u=1; + + nexttoken(); +/* unary minuses in front of an operator are consumed once! */ + if (token == '-') { + u=-1; + nexttoken(); + } +/* the operator */ + f(); + if (er !=0 ) return; + y=pop(); + if (u == -1) y=-y; + x=pop(); +} + +/* + * ABS absolute value + */ +void xabs(){ + number_t x; + + if ((x=pop())<0) { x=-x; } + push(x); +} + +/* + * SGN evaluates the sign + */ +void xsgn(){ + number_t x; + + x=pop(); + if (x>0) x=1; + if (x<0) x=-1; + push(x); +} + +/* + * PEEK on an arduino, negative values of peek address + * the EEPROM range -1 .. -1024 on an UNO + */ +void xpeek(){ + number_t a; + +/* get the argument from the stack because this is a function only */ + a=pop(); + +/* the memory and EEPROM range */ + if (a >= 0 && a<=memsize) + push(memread2(a)); + else if (a < 0 && -a <= elength()) + push(eread(-a-1)); + else { + error(EORANGE); + return; + } +} + +/* + * MAP Arduino map function, we always cast to long, this + * makes it potable for various integer sizes and the float. + */ +void xmap() { + long v, in_min, in_max, out_min, out_max; + + out_max=pop(); + out_min=pop(); + in_max=pop(); + in_min=pop(); + v=pop(); + push((v - in_min) * (out_max - out_min) / (in_max - in_min) + out_min); +} + +/* + * RND very basic random number generator with constant seed in 16 bit + * for float systems, use glibc parameters https://en.wikipedia.org/wiki/Linear_congruential_generator + */ + +void xrnd() { + number_t r; + mem_t base = randombase; + +/* the argument of the RND() function */ + r=pop(); + +/* this is the microsoft mode, argument <0 resets the sequence, 0 always the same number, > 1 a number between 0 and 1 */ + if (randombase < 0) { + base=0; + if (r < 0) { + rd=-r; + r=1; + } else if (r == 0) { + r=1; + goto pushresult; + } else { + r=1; + } + } + +/* this is the congruence */ +#ifndef HASFLOAT +/* the original 16 bit congruence, the & is needed to make it work for all kinds of ints */ + rd = (31421*rd + 6927) & 0xffff; +#else +/* glibc parameters */ + rd = (110351245*rd + 12345) & 0x7fffffff; +#endif + +pushresult: + +/* the result is calculated with the right modulus */ +#ifndef HASFLOAT + if (r>=0) + push((unsigned long)rd*r/0x10000+base); + else + push((unsigned long)rd*r/0x10000+1-base); +#else + if (r>=0) + push(rd*r/0x80000000+base); + else + push(rd*r/0x80000000+1-base); +#endif +} + + +#ifndef HASFLOAT +/* + * SQR - a very simple approximate square root formula + * for integers, for floats we use the library + */ +void sqr(){ + number_t t,r; + number_t l=0; + + r=pop(); + t=r; + while (t > 0) { + t>>=1; + l++; + } + l=l/2; + t=1; + t<<=l; + do { + l=t; + t=(t+r/t)/2; + } while (abs(t-l)>1); + push(t); +} +#else +void sqr(){ + push(sqrt(pop())); +} +#endif + +/* + * POW(X, N) evaluates powers + */ + +/* this function is called by POW(a, c) in BASIC */ +void xpow(){ + number_t n; + number_t a; + + n=pop(); + a=pop(); + push(bpow(a, n)); +} + +/* while this is needed by ^*/ +number_t bpow(number_t x, number_t y) { +#ifdef HASFLOAT + return pow(x, y); +#else + number_t r; + address_t i; + + r=1; + if (y>=0) for(i=0; iname=name; + lhs->i=1; /* we start at 1 */ + lhs->j=arraylimit; /* we assume a string array of length 1, all simple strings are like this */ + lhs->i2=0; /* we want the full string length */ + lhs->ps=1; /* we deal with a pure string */ + +/* the array index default, can vary */ + /* array_index=arraylimit; this is i2 */ + +/* remember the location */ + pushlocation(&l); + +/* and inspect the (first) brackets */ + parsesubscripts(); + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in parsestringvar "); outnumber(args); outsc(" arguments \n"); } + +/* do we deal with a pure unindexed string or something more complicated */ + if (args == 0) { +/* pure string, we rewind and are done here */ + poplocation(&l); + } else if (!substringmode) { +/* we have no substring interpretation hence the brackets can only be one array index */ + if (args == 1) lhs->j=pop(); else { error(EORANGE); return; } + } else { +/* not a pure string */ + lhs->ps=0; +/* we are in the substring world here */ + if (args == 2) { lhs->i2=popaddress(); args--; } /* A$(i,j) */ + if (!USELONGJUMP && er) return; + if (args == 1) { lhs->i=popaddress(); } /* A$(i) */ + if (!USELONGJUMP && er) return; + if (args == -1) {} /* A$(), ignore */ +/* here we have parsed a full substring and remember where we are and look forward*/ + pushlocation(&l); + nexttoken(); + if (token == '(') { +/* a second pair of braces is coming, we parse an array index */ + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + if (token != ')') { error(EUNKNOWN); return; } + lhs->j=popaddress(); + if (!USELONGJUMP && er) return; + } else + poplocation(&l); + } + +/* in pure parse mode we end here. This is used for the lefthandside code */ + if (!strp) return; + +/* try to get the string */ + getstring(strp, &lhs->name, lhs->i, lhs->j); + if (!USELONGJUMP && er) return; + +/* look what we do with the upper index */ + if (!lhs->i2) lhs->i2=strp->length; + + if (DEBUG) { + outsc("** in parsestringvar lower is "); outnumber(lhs->i); outcr(); + outsc("** in parsestringvar upper is "); outnumber(lhs->i2); outcr(); + outsc("** in parsestringvar array_index is "); outnumber(lhs->j); outcr(); + } + +/* find the length */ + if (lhs->i2-lhs->i+1 > 0) strp->length=lhs->i2-lhs->i+1; else strp->length=0; + +/* done */ + if (DEBUG) { + outsc("** in parsestringvar, length "); + outnumber(strp->length); + outsc(" from "); outnumber(lhs->i); outspc(); outnumber(lhs->i2); + outcr(); + } + +/* restore the name */ + name=lhs->name; +#else + return; +#endif +} + + +/* + * stringvalue(string_t*) evaluates a string value, return 0 if there is no string, + * 1 if there is a string. The pointer contains all the data needed to process the string. + * + */ + +char stringvalue(string_t* strp) { + address_t k, l; + address_t i; + token_t t; + mem_t args=1; + + lhsobject_t lhs; + + if (DEBUG) outsc("** entering stringvalue \n"); + +/* make sure everything is nice and clean */ + strp->address=0; + strp->arraydim=0; + strp->length=0; + strp->strdim=0; + strp->ir=0; + + switch(token) { + case STRING: +/* sr has the string information from gettoken and nexttoken*/ + strp->ir=sr.ir; + strp->length=sr.length; + strp->address=sr.address; + break; +#ifdef HASAPPLE1 + case STRINGVAR: + parsestringvar(strp, &lhs); + break; + case TSTR: + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; +#ifdef HASFLOAT + strp->length=writenumber2(sbuffer, pop()); +#else + strp->length=writenumber(sbuffer, pop()); +#endif + strp->ir=sbuffer; + if (er != 0) return 0; + if (token != ')') {error(EARGS); return 0; } + break; +#ifdef HASMSSTRINGS + case TCHR: + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; + *sbuffer=pop(); + strp->ir=sbuffer; + strp->length=1; + if (token != ')') {error(EARGS); return 0; } + break; + case TRIGHT: + case TMID: + case TLEFT: + t=token; + nexttoken(); + if (token == '$') nexttoken(); + if (token != '(') { error(EARGS); return 0; } + nexttoken(); + if (token != STRINGVAR) { error(EARGS); return 0; } + parsestringvar(strp, &lhs); + if (er != 0) return 0; + k=strp->length; /* the length of the original string variable */ + nexttoken(); + if (token != ',') { error(EARGS); return 0; } + nexttoken(); + expression(); + if (er != 0) return 0; +/* all the rest depends on the function */ + switch (t) { + case TRIGHT: + l=popaddress(); + if (k < l) l=k; + if (strp->address) strp->address=strp->address+(k-l); + if (strp->ir) strp->ir=strp->ir+(k-l); + break; + case TLEFT: + l=popaddress(); + if (k < l) l=k; + break; + case TMID: + if (token == ',') { + nexttoken(); + expression(); + if (er != 0) return 0; + args++; + } + if (args == 1) { + i=popaddress(); + l=0; + if (i <= k) l=k-i+1; + } else { + l=popaddress(); + if (er != 0) return 0; + i=popaddress(); + } + if (k < i+l) l=k-i+1; + if (l < 0) l=0; + if (strp->address != 0) strp->address=strp->address+i-1; + if (strp->ir) strp->ir=strp->ir+i-1;; + break; + } + strp->length=l; + + if (token != ')') {error(EARGS); return 0; } + break; +#endif +#endif + default: + return 0; + } + return 1; +} + + +/* + * (numerical) evaluation of a string expression, used for + * comparison and for string rightvalues as numbers + * the token rewind here is needed as streval is called in + * factor - no factor function should nexttoken + */ + +void streval(){ + token_t t; + address_t k; + string_t s1, s2; + char* ir; + address_t a; + blocation_t l; + +/* is the right side of the expression a string */ + if (!stringvalue(&s1)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in streval first string"); outcr(); } + +/* get ready for rewind to this location */ + pushlocation(&l); + t=token; + +/* is the next token a operator, hence we need to compare two strings? */ + nexttoken(); + if (token != '=' && token != NOTEQUAL) { + +/* if not, rewind one token and evaluate the string as a boolean */ + poplocation(&l); + token=t; + +/* a zero length string evaluates to zero else to the first character */ + if (s1.length == 0) push(0); else { + if (s1.ir) push(s1.ir[0]); + else if (s1.address) push(memread2(s1.address)); + else error(EGENERAL); + } + + return; + } + +/* remember which operator we use */ + t=token; + +/* questionable !! */ + nexttoken(); + + if (DEBUG) { + outsc("** in streval second string"); outcr(); + debugtoken(); outcr(); + } + +/* get the second string */ + if (!stringvalue(&s2)){ error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in streval result: "); outnumber(x); outcr(); } + +/* different length means unequal */ + if (s2.length != s1.length) goto neq; + +/* and a different character somewhere is also unequal */ +#ifdef USEMEMINTERFACE + if (s1.ir && s2.ir) + for (k=0; k < s1.length; k++) { if (s1.ir[k] != s2.ir[k]) goto neq; } + else if (s1.address && s2.address) + for (k=0; k < s1.length; k++) { if (memread2(s1.address+k) != memread2(s2.address+k)) goto neq; } + else { + if (s1.address) { a=s1.address; ir=s2.ir; } else { a=s2.address; ir=s1.ir; } + for (k=0; k < s1.length; k++) { if (memread2(a+k) != ir[k] ) goto neq; } + } +#else + for (k=0; k < s1.length; k++) if (s1.ir[k] != s2.ir[k]) goto neq; +#endif + +/* which operator did we use */ + if (t == '=') push(booleanmode); else push(0); + return; +neq: + if (t == '=') push(0); else push(booleanmode); + return; +} + + +#ifdef HASFLOAT +/* + * floating point arithmetic + * SIN, COS, TAN, ATAN, LOG, EXP, INT + * INT is always there and is nop in integer BASICs + * no handling of floating point errors yet. + */ +void xsin() { push(sin(pop())); } +void xcos() { push(cos(pop())); } +void xtan() { push(tan(pop())); } +void xatan() { push(atan(pop())); } +void xlog() { push(log(pop())); } +void xexp() { push(exp(pop())); } +void xint() { push(floor(pop())); } +#else +void xint() {} +#endif + +/* + * Recursive expression parser functions + * + * factor(); term(); addexpression(); compexpression(); + * notexpression(); andexpression(); expression() + * + * doing + * + * functions, numbers; *, /, %; +, -; =, <>, =>, <=; + * NOT; AND; OR + * + */ + +/* + * factor() - contrary to all other function + * nothing here should end with a new token - this is handled + * in factors calling function + * + * evaluates constants, variables and all functions + */ + +/* helpers of factor - array access */ +void factorarray() { + lhsobject_t object; + number_t v; + +/* remember the variable, because parsesubscript changes this */ + object.name=name; + +/* parse the arguments */ + parsesubscripts(); + if (er != 0 ) return; + + switch(args) { + case 1: + object.i=popaddress(); + if (!USELONGJUMP && er) return; + object.j=arraylimit; + break; +#ifdef HASMULTIDIM + case 2: + object.j=popaddress(); + object.i=popaddress(); + if (!USELONGJUMP && er) return; + break; +#endif + default: + error(EARGS); + return; + } + array(&object, 'g', &v); + push(v); +} + +/* helpers of factor - string length */ +void factorlen() { +#ifdef HASAPPLE1 + address_t a; + string_t s; + name_t n; + lhsobject_t lhs; + + nexttoken(); + if ( token != '(') { error(EARGS); return; } + + nexttoken(); + switch(token) { + case STRING: + push(sr.length); + nexttoken(); + break; + case STRINGVAR: + parsestringvar(&s, &lhs); + push(s.length); + nexttoken(); + break; +#ifdef HASMSSTRINGS + case TRIGHT: + case TLEFT: + case TMID: + case TCHR: +#endif + case TSTR: + error(EARGS); + return; + default: + expression(); + if (!USELONGJUMP && er) return; + n.token=TBUFFER; + a=pop(); + n.c[0]=a%256; + n.c[1]=a/256; + push(blength(&n)); + } + + if (!USELONGJUMP && er) return; + + if (token != ')') { error(EARGS); return; } +#else + push(0); +#endif +} + +/* helpers of factor - the VAL command */ +void factorval() { + index_t y; + number_t x; + string_t s; + address_t a; + char *ir; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue(&s)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + +/* the length of the strings consumed */ + vlength=0; + +/* get the string if it is in serial memory */ +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + +/* generate a 0 terminated string for use with parsenumber */ + stringtobuffer(sbuffer, &s); + ir=sbuffer; + +/* remove whitespaces */ + while(*ir==' ' || *ir=='\t') { ir++; vlength++; } + +/* find a sign */ + if(*ir=='-') { y=-1; ir++; vlength++; } else y=1; + + x=0; +#ifdef HASFLOAT + if ((a=parsenumber2(ir, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#else + if ((a=parsenumber(ir, &x)) > 0) {vlength+=a; ert=0; } else {vlength=0; ert=1;}; +#endif + push(x*y); + + nexttoken(); + if (token != ')') { error(EARGS); return; } +} + +/* helpers of factor - the INSTR command */ +#ifndef HASFULLINSTR +/* this is instring in a single character version, usefull to split strings */ +void factorinstr() { + char ch; + address_t a; + string_t s; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + + nexttoken(); + if (!stringvalue(&s)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + nexttoken(); + + if (token != ',') { error(EARGS); return; } + + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + ch=pop(); + if (s.address) { + for (a=1; a<=s.length; a++) {if (memread2(s.address+a-1) == ch) break; } + } else { + for (a=1; a<=s.length; a++) {if (s.ir[a-1] == ch) break; } + } + if (a > s.length) a=0; + push(a); + //nexttoken(); + if (token != ')') { error(EARGS); return; } +} +#else +/* the full instr command which can compare two strings */ +void factorinstr() { + char ch; + address_t a=1; + address_t i=1; + string_t search; + string_t s; + + nexttoken(); + if (token != '(') { error(EARGS); return; } + nexttoken(); + +/* the search string */ + if(!stringvalue(&s)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + nexttoken(); + + if (token != ',') { error(EARGS); return; } + nexttoken(); + +/* the string to be searched */ + if (!stringvalue(&search)) { error(EUNKNOWN); return; } + if (!USELONGJUMP && er) return; + nexttoken(); + +/* potentially the start value */ + if (token == ',') { + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + a=popaddress(); + if (!USELONGJUMP && er) return; + } + + if (token != ')') { + error(EUNKNOWN); + return; + } + +/* health check */ + if (search.length == 0 || search.length+a > s.length || a == 0) { + push(0); + return; + } + +/* go through the search string */ + while(i<=search.length) { + +/* get one character from the string */ + if (search.address) { + ch=memread2(search.address+i-1); + } else { + ch=search.ir[i-1]; + } + +/* search the character */ + if (s.address) { + for (; a<=s.length; a++) {if (memread2(s.address+a-1) == ch) break; } + } else { + for (; a<=s.length; a++) {if ( s.ir[a-1] == ch ) break; } + } + +/* we haven't found the character until the end of the string */ + if (a > s.length) { + a=0; + break; + } + +/* next character */ + i+=1; + + } + +/* how did the search go? a rewind because we were at the end of the search part already */ + if (i <= search.length) { + a=0; + } else { + a=a-search.length+1; + } + + + push(a); +} +#endif + +/* helpers of factor - the NETSTAT command */ +void factornetstat() { + address_t x=0; + + if (netconnected()) x=1; + if (mqttstate() == 0) x+=2; + push(x); +} + +/* helpers of factor - the ASC command, really not needed but for completeness */ +void factorasc() { +#ifdef HASAPPLE1 + string_t s; + lhsobject_t lhs; + + nexttoken(); + if ( token != '(') { error(EARGS); return; } + + nexttoken(); + switch(token) { + case STRING: + if (sr.ir) push(sr.ir[0]); else push(memread2(sr.address)); + nexttoken(); + break; + case STRINGVAR: + parsestringvar(&s, &lhs); + if (s.length > 0) { + if (s.ir) push(s.ir[0]); else push(memread2(s.address)); + } else + push(0); + nexttoken(); + break; + default: + error(EARGS); + return; + } + + if (!USELONGJUMP && er) return; + + if (token != ')') { error(EARGS); return; } +#else + push(0); +#endif +} + +void factor(){ + if (DEBUG) bdebug("factor\n"); + switch (token) { + case NUMBER: + push(x); + break; + case VARIABLE: + push(getvar(&name)); + break; + case ARRAYVAR: + factorarray(); + break; + case '(': + nexttoken(); + expression(); + if (er != 0 ) return; + if (token != ')') { error(EARGS); return; } + break; +/* Palo Alto BASIC functions */ + case TABS: + parsefunction(xabs, 1); + break; + case TRND: + parsefunction(xrnd, 1); + break; + case TSIZE: + push(himem-top); + break; +/* Apple 1 BASIC functions */ +#ifdef HASAPPLE1 + case TSGN: + parsefunction(xsgn, 1); + break; + case TPEEK: + parsefunction(xpeek, 1); + break; + case TLEN: + factorlen(); + break; +#ifdef HASIOT + case TAVAIL: + parsefunction(xavail, 1); + break; + case TOPEN: + parsefunction(xfopen, 1); + break; + case TSENSOR: + parsefunction(xfsensor, 2); + break; + case TVAL: + factorval(); + break; + case TINSTR: + factorinstr(); + break; + case TWIRE: + parsefunction(xfwire, 1); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + push(erh); + break; +#endif + case THIMEM: + push(himem); + break; +/* Apple 1 string compare code */ + case STRING: + case STRINGVAR: +#ifdef HASIOT + case TSTR: +#endif +#ifdef HASMSSTRINGS + case TLEFT: + case TRIGHT: + case TMID: + case TCHR: +#endif + streval(); + if (er != 0 ) return; + break; +#endif +/* Stefan's tinybasic additions */ +#ifdef HASSTEFANSEXT + case TSQR: + parsefunction(sqr, 1); + break; + case TMAP: + parsefunction(xmap, 5); + break; + case TUSR: + parsefunction(xusr, 2); + break; + case TPOW: + parsefunction(xpow, 2); + break; +#endif +/* Arduino I/O */ +#ifdef HASARDUINOIO + case TAREAD: + parsefunction(xaread, 1); + break; + case TDREAD: + parsefunction(xdread, 1); + break; + case TMILLIS: + parsefunction(bmillis, 1); + break; +#ifdef HASPULSE + case TPULSE: + parsefunction(bpulsein, 3); + break; +#endif + case TAZERO: +#if defined(ARDUINO) && defined(A0) + push(A0); +#else + push(0); +#endif + break; + case TLED: +#ifdef LED_BUILTIN + push(LED_BUILTIN); +#else + push(0); +#endif + break; +#endif +/* mathematical functions in case we have float */ +#ifdef HASFLOAT + case TSIN: + parsefunction(xsin, 1); + break; + case TCOS: + parsefunction(xcos, 1); + break; + case TTAN: + parsefunction(xtan, 1); + break; + case TATAN: + parsefunction(xatan, 1); + break; + case TLOG: + parsefunction(xlog, 1); + break; + case TEXP: + parsefunction(xexp, 1); + break; +#endif +/* int is always present to make programs compatible */ + case TINT: + parsefunction(xint, 1); + break; +#ifdef HASDARTMOUTH + case TFN: + xfn(0); + break; +/* an arcane feature, DATA evaluates to the data record number */ + case TDATA: + push(datarc); + break; +#endif +#ifdef HASDARKARTS + case TMALLOC: + parsefunction(xmalloc, 2); + break; + case TFIND: + xfind(); + break; +#endif +#ifdef HASIOT + case TNETSTAT: + factornetstat(); + break; +#endif +#ifdef HASMSSTRINGS + case TASC: + factorasc(); + break; +#endif +/* unknown function */ + default: + error(EUNKNOWN); + return; + } +} + +/* this is how the power operator ^ is handled */ +#ifdef POWERRIGHTTOLEFT +/* the recursive version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (!USELONGJUMP && er) return; + + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + parseoperator(power); + if (!USELONGJUMP && er) return; + push(bpow(x,y)); + } + if (DEBUG) bdebug("leaving power\n"); +} +#else +/* the left associative version */ +void power() { + if (DEBUG) bdebug("power\n"); + factor(); + if (!USELONGJUMP && er) return; + +nextpower: + nexttoken(); + if (DEBUG) bdebug("in power\n"); + if (token == '^'){ + parseoperator(factor); + push(bpow(x,y)); + goto nextpower; + } + if (DEBUG) bdebug("leaving power\n"); +} +#endif + +/* + * term() evaluates multiplication, division and mod + */ +void term(){ + if (DEBUG) bdebug("term\n"); + power(); + if (!USELONGJUMP && er) return; + +nextfactor: + if (DEBUG) bdebug("in term\n"); + if (token == '*'){ + parseoperator(power); + if (!USELONGJUMP && er) return; + push(x*y); + goto nextfactor; + } else if (token == '/'){ + parseoperator(power); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x/y); +#else + if (forceint) push((int)x/(int)y); else push(x/y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } else if (token == '%') { + parseoperator(power); + if (!USELONGJUMP && er) return; + if (y != 0) +#ifndef HASFLOAT + push(x%y); +#else + push((int)x%(int)y); +#endif + else { + error(EDIVIDE); + return; + } + goto nextfactor; + } + if (DEBUG) bdebug("leaving term\n"); +} + +/* add and subtract */ +void addexpression(){ + if (DEBUG) bdebug("addexp\n"); + if (token != '+' && token != '-') { + term(); + if (!USELONGJUMP && er) return; + } else { + push(0); + } + +nextterm: + if (token == '+' ) { + parseoperator(term); + if (!USELONGJUMP && er) return; + push(x+y); + goto nextterm; + } else if (token == '-'){ + parseoperator(term); + if (!USELONGJUMP && er) return; + push(x-y); + goto nextterm; + } +} + +/* comparisions */ +void compexpression() { + if (DEBUG) bdebug("compexp\n"); + addexpression(); + if (!USELONGJUMP && er) return; + switch (token){ + case '=': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; +#ifndef HASFLOAT + push(x == y ? booleanmode : 0); +#else + if (fabs(x-y) <= epsilon) push(booleanmode); else push(0); +#endif + break; + case NOTEQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; +#ifndef HASFLOAT + push(x != y ? booleanmode : 0); +#else + if (fabs(x-y) > epsilon) push(booleanmode); else push(0); +#endif + break; + case '>': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x > y ? booleanmode : 0); + break; + case '<': + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x < y ? booleanmode : 0); + break; + case LESSEREQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x <= y ? booleanmode : 0); + break; + case GREATEREQUAL: + parseoperator(compexpression); + if (!USELONGJUMP && er) return; + push(x >= y ? booleanmode : 0); + break; + } +} + +#ifdef HASAPPLE1 +/* boolean NOT */ +void notexpression() { + if (DEBUG) bdebug("notexp\n"); + if (token == TNOT) { + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + if (booleanmode == -1) push(~(short)pop()); + else if (pop() == 0) push(1); else push(0); + } else + compexpression(); +} + +/* boolean AND and at the same time bitwise */ +void andexpression() { + if (DEBUG) bdebug("andexp\n"); + notexpression(); + if (!USELONGJUMP && er) return; + if (token == TAND) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x & (short)y); + } +} + +/* expression function and boolean OR at the same time bitwise !*/ +void expression(){ + if (DEBUG) bdebug("exp\n"); + andexpression(); + if (!USELONGJUMP && er) return; + if (token == TOR) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x | (short)y); + } +} +#else + +/* expression function simplified */ +void expression(){ + if (DEBUG) bdebug("exp\n"); + compexpression(); + if (!USELONGJUMP && er) return; + if (token == TOR) { + parseoperator(expression); + if (!USELONGJUMP && er) return; + push((short)x | (short)y); + } +} +#endif + +/* + * Layer 2 - The commands and their helpers + * + * Palo Alto BASIC languge set - PRINT, LET, INPUT, GOTO, GOSUB, RETURN, + * IF, FOR, TO, NEXT, STEP, BREAK, STOP, END, LIST, NEW, RUN, REM + * BREAK is not Palo ALto but fits here, eEND is identical to STOP. + */ + +/* + * PRINT command, extended by many features like file, wire, mqtt and radio i/o. + * TAB added as part of the PRINT statement with C64 compatibility. + */ +void xprint(){ + char semicolon = 0; + char oldod; + char modifier = 0; + string_t s; + stringlength_t i; + + form=0; + oldod=od; + nexttoken(); + +processsymbol: +/* at the end of a print statement, do we need a newline, restore the defaults */ + if (termsymbol()) { + if (!semicolon) outcr(); + od=oldod; + form=0; + return; + } + semicolon=0; + +/* output a string if we found it */ + if (stringvalue(&s)) { + if (!USELONGJUMP && er) return; + +/* buffer must be used here for machine code to work */ +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(s.ir, s.length); + + nexttoken(); + goto separators; + } + +/* the tab command as part of print */ +#ifdef HASMSSTRINGS + if (token == TTAB || token == TSPC) { + xtab(); + goto separators; + } +#endif + +/* modifiers of the print statement */ + if (token == '#' || token == '&') { + modifier=token; + nexttoken(); + expression(); + if (!USELONGJUMP && er) return; + + switch(modifier) { + case '#': + form=pop(); + break; + case '&': + od=pop(); + break; + } + goto separators; + } + + if (token != ',' && token != ';') { + expression(); + if (!USELONGJUMP && er) return; + outnumber(pop()); + } + +/* commas and semicolons, all other symbols are accepted and no error is thrown */ +separators: + if (termsymbol()) goto processsymbol; + + switch (token) { + case ',': + if (!modifier) outspc(); + case ';': + semicolon=1; + nexttoken(); + break; + } + modifier=0; + + goto processsymbol; +} + +/* + * LET assigment code for various lefthand and righthand side. + * + * + * lefthandside is a helper function for reuse in other + * commands. It determines the address the value is to be + * assigned to and whether the assignment target is a + * "pure" i.e. subscriptless string expression + * + * assignnumber assigns a number to a given lefthandside + * + * In lefthandside the type of the object is determined and + * possible subscripts are parsed. + * + * Variables have no subscripts. The arguments are unchanged. + * Arrays may have two subscript which will go to i, j + * Strings may have a string subscript, going to i and an array subscript + * going to j + * String arrays use i2 as the array index. + * Note that the role of the variables differs for string array and normal + * arrays. + * Strings without a subscript i.e. pure strings, set the ps flag + * + */ + +/* the new lefthandsite code */ +void lefthandside(lhsobject_t* lhs) { + +/* just to provide it for parsestringvar to reuse the righthandside code */ + address_t temp; + + if (DEBUG) { + outsc("assigning to variable "); + outname(&lhs->name); outspc(); + outsc(" type "); outnumber(lhs->name.token); + outcr(); + } + +/* prep it */ + lhs->i=1; + lhs->i2=0; + lhs->j=arraylimit; + lhs->ps=1; + +/* look at the variables and continue parsing */ + switch (lhs->name.token) { + case VARIABLE: + nexttoken(); + break; + case ARRAYVAR: + parsesubscripts(); + if (!USELONGJUMP && er) return; + switch(args) { + case 1: + lhs->i=popaddress(); + if (!USELONGJUMP && er) return; + lhs->j=arraylimit; + break; + case 2: + lhs->j=popaddress(); + if (!USELONGJUMP && er) return; + lhs->i=popaddress(); + if (!USELONGJUMP && er) return; + break; + default: + error(EARGS); + return; + } + nexttoken(); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + parsestringvar(0, lhs); + nexttoken(); + break; +#else /* HASAPPLE1 */ +/* here we could implement a string thing for a true Tinybasic */ +#endif + default: + error(EUNKNOWN); + return; + } + + if (DEBUG) { + outsc("** in assignment lefthandside with (i,j,ps,i2) "); + outnumber(lhs->i); outspc(); + outnumber(lhs->j); outspc(); + outnumber(lhs->ps); outspc(); + outnumber(lhs->i2); outcr(); + outsc(" token is "); outputtoken(); + outsc(" at "); outnumber(here); outcr(); + } +} + +/* assign a number to a left hand side we have parsed */ +void assignnumber2(lhsobject_t* lhs, number_t x) { + string_t sr; + +/* depending on the variable type, assign the value */ + switch (lhs->name.token) { + case VARIABLE: + setvar(&lhs->name, x); + break; + case ARRAYVAR: + array(lhs, 's', &x); + break; +#ifdef HASAPPLE1 + case STRINGVAR: + +/* find the string variable */ + getstring(&sr, &lhs->name, lhs->i, lhs->j); + if (!USELONGJUMP && er) return; + +/* the first character of the string is set to the number */ + if (sr.ir) sr.ir[0]=x; else if (sr.address) memwrite2(ax, x); else error(EUNKNOWN); + +/* set the length */ + if (lhs->ps) + setstringlength(&lhs->name, 1, lhs->j); + else + if (sr.length < lhs->i && lhs->i <= sr.strdim) + setstringlength(&lhs->name, lhs->i, lhs->j); + break; +#endif + } +} + +/* + * LET - the core assigment function, this is different from other BASICs + */ +void assignment() { + address_t newlength, copybytes; + mem_t s; + index_t k; + char tmpchar; /* for number conversion only */ + string_t sr, sl; /* the right and left hand side strings */ + +/* the lefthandside identifier */ + lhsobject_t lhs; + +/* this code evaluates the left hand side, we remember the object information first */ + lhs.name=name; + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + +/* the assignment part */ + if (token != '=') { error(EUNKNOWN); return; } + nexttoken(); + +/* here comes the code for the right hand side, the evaluation depends on the left hand side type */ + switch (lhs.name.token) { +/* the lefthandside is a scalar, evaluate the righthandside as a number, even if it is a string */ + case VARIABLE: + case ARRAYVAR: + expression(); + if (!USELONGJUMP && er) return; + assignnumber2(&lhs, pop()); + break; +#ifdef HASAPPLE1 +/* the lefthandside is a string variable, try evaluate the righthandside as a stringvalue */ + case STRINGVAR: +nextstring: + +/* do we deal with a string as righthand side */ + s=stringvalue(&sr); + if (!USELONGJUMP && er) return; + +/* and then as an expression if it is no string, any number appearing in a string expression terminates the addition loop */ + if (!s) { + expression(); + if (!USELONGJUMP && er) return; + tmpchar=pop(); + sr.length=1; + sr.ir=&tmpchar; + } else + nexttoken(); /* we do this here because expression also advances, this way we avoid double advance */ + + if (DEBUG) { outsc("* assigment stringcode at "); outnumber(here); outcr(); } + +/* at this point we have a stringvalue with ir2 pointing to the payload and the stack the length + this is either coming from stringvalue or from the expression code */ + +/* we now process the source string */ + +/* getstring of the destination */ + getstring(&sl, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + +/* this debug messes up sbuffer hence all functions that use it in stringvalue produce wrong results */ + if (DEBUG) { + outsc("* assigment stringcode "); outname(&lhs.name); outcr(); + outsc("** assignment source string length "); outnumber(sr.length); outcr(); + outsc("** assignment dest string length "); outnumber(sl.length); outcr(); + outsc("** assignment dest string dimension "); outnumber(sl.strdim); outcr(); + } + +/* does the source string fit into the destination if we have no destination second index*/ + if ((lhs.i2 == 0) && ((lhs.i+sr.length-1)>sl.strdim)) { error(EORANGE); return; }; + +/* if we have a second index, is it in range */ + if ((lhs.i2 != 0) && lhs.i2>sl.strdim) { error(EORANGE); return; }; + +/* calculate the number of bytes we truely want to copy */ + if (lhs.i2 > 0) copybytes=((lhs.i2-lhs.i+1) > sr.length) ? sr.length : (lhs.i2-lhs.i+1); + else copybytes=sr.length; + + if (DEBUG) { outsc("** assignment copybytes "); outnumber(copybytes); outcr(); } + +/* now do the heavy lifting in a seperate function to encasulate buffering */ + assignstring(&sl, &sr, copybytes); + +/* + * classical Apple 1 behaviour is string truncation in substring logic, with + * two index destination string we follow another route. We extend the string + * for the number of copied bytes + */ + if (lhs.i2 == 0) { + newlength = lhs.i+sr.length-1; + } else { + if (lhs.i+copybytes > sl.length) newlength=lhs.i+copybytes-1; + else newlength=sl.length; + } + + setstringlength(&lhs.name, newlength, lhs.j); +/* + * we have processed one string and copied it fully to the destination + * see if there is more to come. For inplace strings this is odd because + * one term can change during adding (A$ = B$ + A$). + */ +addstring: + if (token == '+') { + lhs.i=lhs.i+copybytes; + nexttoken(); + goto nextstring; + } + break; /* case STRINGVAR */ +#endif /* HASAPPLE1 */ + } /* switch */ +} + + +/* + * Try to copy one string to the other, assumes that getstring did its work + * and that copybyte is correct. + * BASICs in place strings make this a non trivial exercise as we need to + * avoid overwrites. + * Another complication is the mixed situation of BASIC memory strings + * and C memory strings. + */ +void assignstring(string_t* sl, string_t* sr, stringlength_t copybytes) { + stringlength_t k; + +/* if we have a memory model that needs the mem interface, go through the addresses by default + else use just the pointers */ + +#ifdef USEMEMINTERFACE +/* for a regular string variable as left hand side we know the address */ + if (sl->address) { + +/* for a regular string variable as a source we need to take care of order */ + + if (sr->address) { + if (sr->address > sl->address) + for (k=0; kaddress+k, memread2(sr->address+k)); + else + for (k=1; k<=copybytes; k++) memwrite2(sl->address+copybytes-k, memread2(sr->address+copybytes-k)); + } else { + +/* if the right hand side is a special string or a constant things are much simpler */ + + for (k=0; kaddress+k, sr->ir[k]); + + } + } else { + +/* non regular string variables like @U$ and @T$ are never assignable */ + error(EUNKNOWN); + } +#else + +/* we just go through the C memory here */ + + if (sr->ir && sl->ir) { + if (sr->ir > sl->ir) + for (k=0; kir[k]=sr->ir[k]; + else + for (k=1; k<=copybytes; k++) sl->ir[copybytes-k]=sr->ir[copybytes-k]; + } else { + error(EUNKNOWN); + } + +#endif +} + +/* + * INPUT ["string",] variable [,["string",] variable] + * + * The original version of input only processes simple variables one at a time + * and does not support arrays. The code is redudant to assignment and read. + * It also does not support comma separated lists of values to be input. + */ +void showprompt() { + outsc("? "); +} + +/* + * Reimplementation of input using the same pattern as read and print . + */ +void xinput() { + + mem_t oldid = id; /* remember the stream on modify */ + mem_t prompt = 1; /* determine if we show the prompt */ + number_t xv; /* for number conversion with innumber */ + +/* the identifier of the lefthandside */ + lhsobject_t lhs; + + address_t maxlen, newlength; /* the maximum length of the string to be read */ + int k=0; /* the result of the number conversion */ + string_t s; + char* buffer; /* the buffer we use for input */ + address_t bufsize; /* the size of the buffer */ + +/* depending on the RUN state we use either the input buffer or the string buffer */ +/* this ways we can process long inputs in RUN and don't need a lot of memory */ + if (st == SRUN || st == SERUN) { + buffer=ibuffer; + bufsize=BUFSIZE; + } else { + buffer=sbuffer; + bufsize=SBUFSIZE; + } + +/* get the next token and check what we are dealing with */ + nexttoken(); + +/* modifiers of the input statement (stream) */ + if (token == '&') { + if(!expectexpr()) return; + oldid=id; + id=pop(); + if (id != ISERIAL || id !=IKEYBOARD) prompt=0; + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + +/* unlike print, form can appear only once in input after the + stream, it controls character counts in wire */ + if (token == '#') { + if(!expectexpr()) return; + form=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } else + nexttoken(); + } + +/* we have a string to be printed to prompt the user */ +nextstring: + if (token == STRING && id != IFILE) { + prompt=0; +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + outs(sr.ir, sr.length); + nexttoken(); + } + +/* now we check for a variable and parse it */ +nextvariable: + if (token == VARIABLE || token == ARRAYVAR || token == STRINGVAR) { + +/* check for a valid lefthandside expression */ + lhs.name=name; + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + +/* which data type do we input */ + switch (lhs.name.token) { + case VARIABLE: + case ARRAYVAR: +again: +/* if we have no buffer or are at the end, read it and set cursor k to the beginning */ + if (k == 0 || (address_t) buffer[0] < k) { + if (prompt) showprompt(); + (void) ins(buffer, bufsize); + k=1; + } + +/* read a number from the buffer and return it, advance the cursor k */ + k=innumber(&xv, buffer, k); + +/* if we break, end it here */ + if (k == -1) { + st=SINT; + token=EOL; + goto resetinput; + } + +/* if we have no valid number, ask again */ + if (k == 0) { + if (id == ISERIAL || id == IKEYBOARD) { + printmessage(ENUMBER); + outspc(); + printmessage(EGENERAL); + outcr(); + xv=0; + k=0; + goto again; + } else { + ert=1; + xv=0; + goto resetinput; + } + } + +/* now assign the number */ + assignnumber2(&lhs, xv); + +/* look if there is a comma coming in the buffer and keep it */ + while (k < (address_t) buffer[0] && buffer[k] != 0) { + if (buffer[k] == ',') { + k++; + break; + } + k++; + } + break; +#ifdef HASAPPLE1 + case STRINGVAR: +/* the destination address of the lefthandside, on the fly create included */ + getstring(&s, &lhs.name, lhs.i, lhs.j); + if (!USELONGJUMP && er) return; + +/* the length of the lefthandside string */ + if (lhs.i2 == 0) { + maxlen=s.strdim-lhs.i+1; + } else { + maxlen=lhs.i2-lhs.i+1; + if (maxlen > s.strdim) maxlen=s.strdim-lhs.i+1; + } + +/* the number of bytes we want to read the form parameter in WIRE can be used + to set the expected number of bytes */ + if (form != 0 && form < maxlen) maxlen=form; + +/* what is going on */ + if (DEBUG) { + outsc("** input stringcode at "); outnumber(here); outcr(); + outsc("** input stringcode "); outname(&lhs.name); outcr(); + outsc("** input stringcode maximum length "); outnumber(maxlen); outcr(); + } + +/* now read the string inplace */ + if (prompt) showprompt(); +#ifndef USEMEMINTERFACE + newlength=ins(s.ir-1, maxlen); +#else + newlength=ins(spistrbuf1, maxlen); + +/* if we have a string variable, we need to copy the buffer to the string */ + if (newlength > 0) { + if (s.ir) { + for (k=0; k= BASEKEYWORD) || token < -127) { + if ((token == TTHEN || + token == TELSE || + token == TTO || + token == TSTEP || + token == TGOTO || + token == TGOSUB || + token == TOR || + token == TAND) && lastouttoken != LINENUMBER) outspc(); + else + if (lastouttoken == NUMBER || lastouttoken == VARIABLE) outspc(); + + for(i=0; gettokenvalue(i)!=0 && gettokenvalue(i)!=token; i++); + outsc(getkeyword(i)); + if (token != GREATEREQUAL && + token != NOTEQUAL && + token != LESSEREQUAL && + token != TREM && + token != TFN) spaceafterkeyword=1; + break; + } + if (token >= 32) { + outch(token); + if (token == ':' && !outliteral) outspc(); + break; + } + outch(token); outspc(); outnumber(token); + } + + lastouttoken=token; +} + +/* + * LIST programs to an output device. + * + * The output is formatted to fit the screen, the heuristic is simple. + * + */ + +void listlines(address_t b, address_t e) { + mem_t oflag=0; + +/* global variables controlling outputtoken, reset to default */ + lastouttoken=0; + spaceafterkeyword=0; + +/* if there is a programm ... */ + if ( top != 0 ) { + here=0; + gettoken(); + while (here < top) { + if (token == LINENUMBER && ax >= b) oflag=1; + if (token == LINENUMBER && ax > e) oflag=0; + if (oflag) outputtoken(); + gettoken(); + if (token == LINENUMBER && oflag) { + outcr(); +/* wait after every line on small displays + removed if ( dspactive() && (dsp_rows < 10) ){ if ( inch() == 27 ) break;} */ + if (dspactive() && dspwaitonscroll() == 27) break; + } + } + if (here == top && oflag) outputtoken(); + if (e == maxaddr || b != e) outcr(); /* supress newlines in "list 50" - a little hack */ + } + +} + +void xlist(){ + address_t b, e; + +/* get the argument */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + +/* parse the arguments */ + switch (args) { + case 0: + b=0; + e=maxaddr; + break; + case 1: + b=pop(); + e=b; + break; + case 2: + e=pop(); + b=pop(); + break; + default: + error(EARGS); + return; + } + +/* list the line from b to e in the default output device */ + listlines(b, e); + +/* we are done */ + nexttoken(); + } + +/* + * The progam line editor, first version. The code is + * not save for BUFSIZE greater than 127. A cast to + * unsigned char aka uint8_t is needed for the string + * length as some platforms have a signed char and some + * don't. + */ +void xedit(){ + mem_t ood = od; + address_t line; + address_t l; + int i, k, j; + char ch; + +/* we edit only in interactive mode */ + if (st != SINT) { error(EUNKNOWN); return; } + +/* currently only one line number */ + if(!expectexpr()) { error(EARGS); return; } + +/* this uses the input buffer now */ + line=pop(); +undo: /* this is the undo point */ + ibuffer[0]=0; + ibuffer[1]=0; + od=0; + listlines(line, line); + if (ibuffer[0] == 0) { + outnumber(line); + outspc(); + } + od=ood; + +/* set the cursor to the first character */ + l=1; + +/* editing loop for blocking and non blocking terminals */ + while (-1) { + +/* show the line and indicate the cursor */ + for(i=1; i<=(unsigned char)ibuffer[0]; i++) outch(ibuffer[i]); + outcr(); + for(i=0; i 1) l--; + break; + case 'k': /* vi style right */ + if (l<(unsigned char)ibuffer[0]) l++; + break; + case 'x': /* delete the cursor character */ + if ((unsigned char)ibuffer[0]>0) { + for (j=l; j<(unsigned char)ibuffer[0]; j++) ibuffer[j]=ibuffer[j+1]; + ibuffer[j]=0; + ibuffer[0]=(unsigned char)ibuffer[0]-1; + } + if ((unsigned char)ibuffer[0]=l; j--) { + ibuffer[j+i-k]=ibuffer[j]; + if (j<=l+i-k) ibuffer[j]=sbuffer[k+1+(j-l)]; + } + } + ibuffer[0]=(unsigned char)ibuffer[0]+i-k; + k=i; + break; + case '^': /* vi style start of line */ + l=1; + break; + case '$': /* vi style end of line */ + l=(unsigned char)ibuffer[0]+1; + break; + case 'h': /* vi style backspace */ + if (l > 1) { + for (j=l-1; j<(unsigned char)ibuffer[0]; j++) ibuffer[j]=ibuffer[j+1]; + ibuffer[j]=0; + ibuffer[0]=(unsigned char)ibuffer[0]-1; + l--; + } + break; + case 'u': /* vi style undo */ + goto undo; + break; + case ':': /* find the next colon : character*/ + if (l <= (unsigned char)ibuffer[0]) { + while (l <= (unsigned char)ibuffer[0] && ibuffer[l] != ':') l++; + if (l <= (unsigned char)ibuffer[0]) l++; + } + break; + default: /* do nothing if the character is not recogized */ + break; + } + } + } + +/* try to store the line, may heaven help us */ +done: + bi=ibuffer; + st=SINT; + nexttoken(); + if (token == NUMBER) { + ax=x; + storeline(); + } + +/* and we are done, restore the output device and clean the buffer */ +endnosave: + ibuffer[0]=0; + ibuffer[1]=0; + bi=ibuffer+1; + nexttoken(); +} + +/* + * RUN and CONTINUE are the same function + */ +void xrun(){ + if (token == TCONT) { + st=SRUN; + nexttoken(); + } else { + nexttoken(); + parsearguments(); + if (er != 0 ) return; + if (args > 1) { error(EARGS); return; } + if (args == 0) { + here=0; + } else { + findline(pop()); + } + if (!USELONGJUMP && er) return; + if (st == SINT) st=SRUN; + +/* all reset on run */ + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + ioer=0; + fncontext=0; +#ifdef HASEVENTS + resettimer(&every_timer); + resettimer(&after_timer); + events_enabled=1; +#endif + + nexttoken(); + } + +/* once statement is called it stays into a loop until the token stream + is exhausted. Then we return to interactive mode. */ + statement(); + st=SINT; +/* flush the EEPROM when changing to interactive mode */ + eflush(); + +/* if called from command line with file arg - exit after run */ +#ifdef HASARGS + if (bnointafterrun) restartsystem(); +#endif +} + +/* + * NEW the general cleanup function - new deletes everything + * + * restbasicstate() is a helper, it keeps the memory intact + * this is needed for EEPROM direct memory + */ +void resetbasicstate() { + + if (DEBUG) { outsc("** BASIC state reset \n"); } + + /* all stacks are purged */ + clearst(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrvars(); + clrlinecache(); + +/* error status reset */ + reseterror(); + +/* let here point to the beginning of the program */ + here=0; + +/* function context back to zero */ + fncontext=0; + +/* interactive mode */ + st=SINT; + +/* switch off timers and interrupts */ +#ifdef HASTIMER + resettimer(&after_timer); + resettimer(&every_timer); +#endif + +} + +void xnew(){ + +/* reset the state of the interpreter */ + resetbasicstate(); + + + if (DEBUG) { + outsc("** clearing memory "); + outnumber(memsize); + outsc(" bytes \n"); + } + +/* program memory back to zero and variable heap cleared */ + himem=memsize; + zeroblock(0, memsize); + top=0; + + if (DEBUG) outsc("** clearing EEPROM state \n "); +/* on EEPROM systems also clear the stored state and top */ +#ifdef EEPROMMEMINTERFACE + eupdate(0, 0); + setaddress(1, beupdate, top); +#endif +} + +/* + * REM - skip everything + */ +void xrem() { + if (debuglevel == -1) outsc("REM: "); + while (token != LINENUMBER && token != EOL && here <= top) + { + nexttoken(); + if (debuglevel == -1) { + if (token != LINENUMBER) outputtoken(); else outcr(); + } + } +} + +/* + * The Apple 1 BASIC additions + * CLR, DIM, POKE, TAB + */ + +/* + * CLR - clearing variable space + */ +void xclr() { + +#ifdef HASDARKARTS + name_t variable; + + nexttoken(); + + if (termsymbol()) { + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + ioer=0; + } else { + variable=name; + switch (variable.token) { + case VARIABLE: + if (variable.c[0] == '@') { return; } + break; + case ARRAYVAR: + nexttoken(); + if (token != '(') { error(EVARIABLE); return; } + nexttoken(); + if (token != ')') { error(EVARIABLE); return; } + break; + case STRINGVAR: + if (variable.c[0] == '@') { error(EVARIABLE); return; } + break; + case TGOSUB: + clrgosubstack(); + goto next; + case TFOR: + clrforstack(); + goto next; + case TEVERY: + resettimer(&every_timer); + goto next; + case TAFTER: + resettimer(&after_timer); + goto next; + default: + expression(); + if (!USELONGJUMP && er) return; + ax=pop(); + variable.c[0]=ax%256; + variable.c[1]=ax/256; + variable.token=TBUFFER; + } + +/* we have to clear an object, call free */ + ax=bfree(&variable); + if (ax == 0) { + if (variable.token != TBUFFER) { error(EVARIABLE); return; } + else ert=1; + } + } +#else + clrvars(); + clrgosubstack(); + clrforstack(); + clrdata(); + clrlinecache(); + ert=0; + ioer=0; +#endif + +next: + nexttoken(); +} + +#ifdef HASAPPLE1 +/* + * DIM - the dimensioning of arrays and strings from Apple 1 BASIC + */ +void xdim(){ + name_t variable; + address_t x; + address_t y=1; + +/* which object should be dimensioned or created */ + nexttoken(); + +nextvariable: + if (token == ARRAYVAR || token == STRINGVAR ){ + +/* remember the object, direct assignment of struct for the moment */ + variable=name; + + if (DEBUG) { + outsc("** in xdim "); outname(&variable); outspc(); outnumber(variable.token); + outspc(); outname(&name); outspc(); outnumber(name.token); outcr(); + } + +/* parse the arguments */ + parsesubscripts(); + if (!USELONGJUMP && er) return; + +#ifndef HASMULTIDIM + if (args != 1) {error(EARGS); return; } + x=popaddress(); +#else + if (args != 1 && args != 2) {error(EARGS); return; } + if (args == 2) y=popaddress(); + x=popaddress(); +#endif + +/* we create at least one element */ + if (x<1 || y<1) {error(EORANGE); return; } + +/* various checks - do we have enough space in buffers and string indices */ + if (variable.token == STRINGVAR) { + if ((x>255) && (strindexsize==1)) {error(EORANGE); return; } +#ifdef SPIRAMSBSIZE + if (x>SPIRAMSBSIZE-1) {error(EORANGE); return; } +#endif +/* With the substringmode switched off, if only one argument is given + we interpret the argument as the string array dimension and not as + the length two arguments are allowed and work as always. This makes + things more compatible to the Microsoft BASIC world. */ + if (!substringmode) + if (args == 1) { + y=x; + x=defaultstrdim; + } + + (void) createstring(&variable, x, y); + } else { + (void) createarray(&variable, x, y); + } + if (!USELONGJUMP && er) return; + + } else if (token == VARIABLE) { + (void) bmalloc(&name, 0); /* this is a local variable, currently no safety net */ + } else { + error(EUNKNOWN); + return; + } + + nexttoken(); + if (token == ',') { + nexttoken(); + goto nextvariable; + } + + nexttoken(); +} + + +/* + * POKE - low level poke to the basic memory. + * on 16bit systems, the address is signed, so we can only go up to 32767. + * If the address is negative, we poke into the EEPROM. + */ +void xpoke(){ + number_t a, v; + +/* get the address and the value */ + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + v=pop(); /* the value */ + a=pop(); /* the address */ + +/* catch memsize here because memwrite doesn't do it */ + if (a >= 0 && a<=memsize) + memwrite2(a, v); + else if (a < 0 && a >= -elength()) + eupdate(-a-1, v); + else { + error(EORANGE); + } +} + +/* + * TAB - spaces command of Apple 1 BASIC + * charcount mechanism for relative tab if HASMSTAB is set + */ +void xtab(){ + address_t a; + token_t t = token; + +/* get the number of spaces, we allow brackets here to use xtab also in PRINT */ + nexttoken(); + if (token == '(') nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + if (token == ')') nexttoken(); + + a=popaddress(); + if (!USELONGJUMP && er) return; + +/* the runtime environment can do a true tab then ... */ +#ifdef HASMSTAB + if (t != TSPC && reltab && od <= OPRT && od > 0) { + if (charcount[od-1] >= a) a=0; else a=a-charcount[od-1]-1; + } +#endif + while (a-- > 0) outspc(); +} +#endif + +/* + * locate the curor on the screen + */ + +void xlocate() { + address_t cx, cy; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + cy=popaddress(); + cx=popaddress(); + if (!USELONGJUMP && er) return; + +/* for locate we go through the VT52 interface for cursor positioning*/ + if (cx > 0 && cy > 0 && cx < 224 && cy < 224) { + outch(27); outch('Y'); + outch(31+(unsigned int) cy); + outch(31+(unsigned int) cx); + } + +/* set the charcount, this is half broken on escape sequences */ +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) charcount[od-1]=cx; +#endif + +} + +/* + * Stefan's additions to Palo Alto BASIC + * DUMP, SAVE, LOAD, GET, PUT, SET + * + */ + +/* + * DUMP - memory dump program + */ +void xdump() { + address_t a, x; + char eflag = 0; + + nexttoken(); + if (token == '!') { eflag=1; nexttoken(); } + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 0: + x=0; + a=memsize; + break; + case 1: + x=pop(); + a=memsize; + break; + case 2: + a=pop(); + x=pop(); + break; + default: + error(EARGS); + return; + } + + form=6; + if (a>x) dumpmem((a-x)/8+1, x, eflag); + form=0; +} + +/* + * helper of DUMP, wrote the memory out + */ +void dumpmem(address_t r, address_t b, char eflag) { + address_t j, i; + address_t k; + mem_t c; + address_t end; + + k=b; + i=r; + if (eflag) end=elength(); else end=memsize; + while (i>0) { + outnumber(k); outspc(); + for (j=0; j<8; j++) { + if (eflag) c=eread(k); else c=memread(k); + k++; + outnumber(c); outspc(); + if (k > end) break; + } + outcr(); + i--; + if (k > end) break; + } + if (eflag) { + outsc("elength: "); outnumber(elength()); outcr(); + } else { + outsc("top: "); outnumber(top); outcr(); + outsc("himem: "); outnumber(himem); outcr(); + } +} + +/* + * creates a C string from a BASIC string + * after reading a BASIC string + */ +void stringtobuffer(char *buffer, string_t* s) { + index_t i = s->length; + + if (i >= SBUFSIZE) i=SBUFSIZE-1; + buffer[i--]=0; + while (i >= 0) { buffer[i]=s->ir[i]; i--; } +} + +/* helper for the memintercase code */ +void getstringtobuffer(string_t* strp, char *buffer, stringlength_t maxlen) { + stringlength_t i; + + for (i=0; ilength && iaddress+i); + strp->ir=buffer; +} + +/* get a file argument */ +void getfilename(char *buffer, char d) { + index_t s; + char *sbuffer; + string_t sr; + +/* do we have a string argument? */ + s=stringvalue(&sr); + if (!USELONGJUMP && er) return; + if (DEBUG) {outsc("** in getfilename2 stringvalue delivered "); outnumber(s); outcr(); } + + if (s) { + if (DEBUG) {outsc("** in getfilename2 copying string of length "); outnumber(x); outcr(); } +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, spistrbuf1, SPIRAMSBSIZE); +#endif + stringtobuffer(buffer, &sr); + if (DEBUG) {outsc("** in getfilename2 stringvalue string "); outsc(buffer); outcr(); } + nexttoken(); + } else if (termsymbol()) { + if (d) { + sbuffer=getmessage(MFILE); + s=0; + while ((sbuffer[s] != 0) && (s < SBUFSIZE-1)) { buffer[s]=sbuffer[s]; s++; } + buffer[s]=0; + x=s; + } else { + buffer[0]=0; + x=0; + } + nexttoken(); + } else { + expression(); + if (!USELONGJUMP && er) return; + buffer[0]=pop(); + buffer[1]=0; + } +} + +/* + * an alternative getfilename implementation that simply gives back a buffer + * with the filename in it. We avoid a string buffer in the calling commands + * like SAVE and LOAD. + */ +char* getfilename2(char d) { + mem_t s; + string_t sr; + +/* we have no argument and use the default */ + if (termsymbol()) { + if (d) return getmessage(MFILE); + else return 0; + } + +/* we have a string argument or an expression */ + s=stringvalue(&sr); + if (!USELONGJUMP && er) return 0; + if (s) { +#ifdef USEMEMINTERFACE + if (!sr.ir) getstringtobuffer(&sr, sbuffer, SBUFSIZE); +#endif + nexttoken(); /* undo the rewind of stringvalue, only then use the buffer */ + for (s=0; s BUFSIZE) { + error(EOUTOFMEMORY); + break; + } + } + ifileclose(); +/* after a successful load we save top to the EEPROM header */ +#ifdef EEPROMMEMINTERFACE + setaddress(1, beupdate, top); +#endif + +/* go back to run mode and start from the first line */ + if (chain) { + st=SRUN; + here=0; + nexttoken(); + } + } +} +#else +/* + * SAVE a file to EEPROM - minimal version for small Arduinos + */ +void xsave() { + esave(); + nexttoken(); +} +/* + * LOAD a file from EEPROM - minimal version for small Arduinos + */ +void xload(const char* f) { + eload(); + nexttoken(); +} +#endif + +/* + * GET just one character from input + */ +void xget(){ + +/* identifier of the lefthandside */ + lhsobject_t lhs; + + mem_t oid=id; /* remember the input stream */ + char ch; + + nexttoken(); + +/* modifiers of the get statement */ + if (token == '&') { + + if (!expectexpr()) return; + id=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + +/* this code evaluates the left hand side - remember type and name */ + lhs.name=name; + + lefthandside(&lhs); + if (!USELONGJUMP && er) return; + +/* get the data, non blocking on Arduino */ + if (availch()) ch=inch(); else ch=0; + +/* store the data element as a number expect for */ + assignnumber2(&lhs, ch); + +/* but then, strings where we deliver a string with length 0 if there is no data */ +#ifdef HASAPPLE1 + if (lhs.name.token == STRINGVAR && ch == 0 && lhs.ps) setstringlength(&lhs.name, 0, arraylimit); +#endif + +/* restore the output device */ + id=oid; +} + +/* + * PUT writes one character to an output stream + */ +void xput(){ + mem_t ood=od; + index_t i; + + nexttoken(); + +/* modifiers of the put statement */ + if (token == '&') { + + if(!expectexpr()) return; + od=pop(); + if (token != ',') { + error(EUNKNOWN); + return; + } + nexttoken(); + } + + parsearguments(); + if (!USELONGJUMP && er) return; + + for (i=args-1; i>=0; i--) sbuffer[i]=pop(); + outs(sbuffer, args); + + od=ood; +} + +/* setpersonality is a helper of xset */ +void setpersonality(index_t p) { +#ifdef HASAPPLE1 + switch(p) { +/* a Microsoft like BASIC have arrays starting at 0 with n+1 elements and no substrings, MS type RND */ + case 'm': + case 'M': + msarraylimits=1; + arraylimit=0; + substringmode=0; + booleanmode=-1; + randombase=-1; + reltab=1; + break; +/* an Apple 1 like BASIC have arrays starting at 1 with n elements and substrings */ + case 'a': + case 'A': + msarraylimits=0; + arraylimit=1; + substringmode=1; + booleanmode=1; + randombase=0; + reltab=0; + break; +/* PaloAlto BASIC is an integer basic with slightly different behaviour */ + case 'p': + case 'P': + msarraylimits=0; + arraylimit=0; + substringmode=1; + booleanmode=1; + forceint=1; + randombase=1; + reltab=0; + break; + } +#endif +} + +/* + * SET - the command itself is also apocryphal it is a low level + * control command setting certain properties + * syntax, currently it is only SET expression, expression + */ +void xset(){ + address_t function; + index_t argument; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + + argument=pop(); + function=pop(); + switch (function) { +/* runtime debug level */ + case 0: + debuglevel=argument; + break; +/* autorun/run flag of the EEPROM 255 for clear, 0 for prog, 1 for autorun */ + case 1: + eupdate(0, argument); + break; +/* change the output device */ + case 2: + switch (argument) { + case 0: + od=OSERIAL; + break; + case 1: + od=ODSP; + break; + } + break; +/* change the default output device */ + case 3: + switch (argument) { + case 0: + od=(odd=OSERIAL); + break; + case 1: + od=(odd=ODSP); + break; + } + break; + /* change the input device */ + case 4: + switch (argument) { + case 0: + id=ISERIAL; + break; + case 1: + id=IKEYBOARD; + break; + } + break; +/* change the default input device */ + case 5: + switch (argument) { + case 0: + idd=(id=ISERIAL); + break; + case 1: + idd=(id=IKEYBOARD); + break; + } + break; +#ifdef HASSERIAL1 +/* set the cr behaviour */ + case 6: + sendcr=(char)argument; + break; +/* set the blockmode behaviour */ + case 7: + blockmode=argument; + break; +/* set the second serial ports baudrate */ + case 8: + prtset(argument); + break; +#endif +/* set the power amplifier level of the radio module */ +#ifdef HASRF24 + case 9: + radioset(argument); + break; +#endif +/* display update control for paged displays */ +#ifdef DISPLAYDRIVER + case 10: + dspsetupdatemode(argument); + break; +#endif +/* change the output device to a true TAB */ +#ifdef HASMSTAB + case 11: + reltab=argument; + break; +#endif +/* change the lower array limit */ +#ifdef HASAPPLE1 + case 12: + if (argument>=0) arraylimit=argument; else error(EORANGE); + break; +#endif +/* the keyboard repeat frequency */ +#ifdef HASKEYPAD + case 13: + kbdrepeat=argument; + break; +#endif +/* the units the pulse command is using */ +#ifdef HASPULSE + case 14: + bpulseunit=argument; + break; +#endif +/* switch on the vt52 emulation an a POSIX system with an ANSI terminal */ +#ifdef POSIXVT52TOANSI + case 15: + vt52active=argument; + break; +#endif +/* change the default size of a string at autocreate */ +#ifdef HASAPPLE1 + case 16: + if (argument>0) defaultstrdim=argument; else error(EORANGE); + break; +#endif +/* set the boolean mode */ + case 17: + if (argument==-1 || argument==1) booleanmode=argument; else error(EORANGE); + break; +/* set the integer mode */ + case 18: + forceint=(argument != 0); + break; +/* set the random number behaviour */ + case 19: + randombase=argument; + break; +/* the substring mode on and off */ +#ifdef HASAPPLE1 + case 20: + substringmode=(argument != 0); + break; +#endif +/* the MS array behaviour, creates n+1 elements when on */ +#ifdef HASAPPLE1 + case 21: + msarraylimits=(argument != 0); + break; +#endif +/* set many settings at once to change the entire personality of the interpreter */ + case 22: + setpersonality(argument); + break; +#ifdef HASAPPLE1 + case 23: + lowercasenames=(argument != 0); + break; +#endif + } +} + +/* + * NETSTAT - network status command, rudimentary + */ +void xnetstat(){ +#if defined(HASMQTT) + + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + + switch (args) { + case 0: + if (netconnected()) outsc("Network connected \n"); else outsc("Network not connected \n"); + outsc("MQTT state "); outnumber(mqttstate()); outcr(); + outsc("MQTT out topic "); outsc(mqtt_otopic); outcr(); + outsc("MQTT inp topic "); outsc(mqtt_itopic); outcr(); + outsc("MQTT name "); outsc(mqttname); outcr(); + break; + case 1: + ax=pop(); + switch (ax) { + case 0: + netstop(); + break; + case 1: + netbegin(); + break; + case 2: + if (!mqttreconnect()) ert=1; + break; + default: + error(EARGS); + return; + } + break; + default: + error(EARGS); + return; + } +#endif + nexttoken(); +} + +/* + * The arduino io functions. + * + */ + +/* + * rtaread and rtdread are wrappers coming from runtime + * This is done for portability for raspberry pi and other systems + */ + +void xaread(){ + push(aread(popaddress())); +} + +void xdread(){ + push(dread(popaddress())); +} + + /* + * DWRITE - digital write + */ +void xdwrite(){ + address_t x,y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x=popaddress(); + y=popaddress(); + if (!USELONGJUMP && er) return; + dwrite(y, x); +} + +/* + * AWRITE - analog write + */ +void xawrite(){ + address_t x,y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x=popaddress(); + if (x > 255) error(EORANGE); + y=popaddress(); + if (!USELONGJUMP && er) return; + awrite(y, x); +} + +/* + * PINM - pin mode + */ +void xpinm(){ + address_t x,y; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + x=popaddress(); + if (x > 1) error(EORANGE); + y=popaddress(); + if (!USELONGJUMP && er) return; + pinm(y, x); +} + +/* + * DELAY in milliseconds + * + * this must call bdelay() and not delay() as bdelay() + * handles all the yielding and timing functions + * + */ +void xdelay(){ + nexttoken(); + parsenarguments(1); + if (!USELONGJUMP && er) return; + bdelay(pop()); +} + +/* tone if the platform has it -> BASIC command PLAY */ +#ifdef HASTONE +/* play a tone */ +void xtone(){ + address_t d = 0; + address_t v = 100; + address_t f, p; + +/* get minimum of 2 and maximum of 4 args */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 4 || args < 2) { error(EARGS); return; } + +/* a switch would be more elegant but needs more progspace ;-) */ + if (args == 4) v=popaddress(); + if (args >= 3) d=popaddress(); + f=popaddress(); + p=popaddress(); + if (!USELONGJUMP && er) return; + + playtone(p, f, d, v); +} +#endif + +/* pulse output - pin, duration, [value], [repetitions, delay] */ +#ifdef HASPULSE +void xpulse(){ + address_t pin, duration; + address_t val = 1; + address_t interval = 0; + address_t repetition = 1; + +/* do we have at least 2 and not more than 5 arguments */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args>5 || args<2) { error(EARGS); return; } + +/* get the data from stack */ + if (args == 5) { interval=popaddress(); repetition=popaddress(); } + if (args == 4) { error(EARGS); return; } + if (args > 2) val=popaddress(); + duration=popaddress(); + pin=popaddress(); + if (!USELONGJUMP && er) return; + +/* low level run time function for the pulse */ + pulseout(bpulseunit, pin, duration, val, repetition, interval); +} + +/* read a pulse, units given by bpulseunit - default 10 microseconds */ +void bpulsein() { + address_t x,y; + unsigned long t, pt; + + t=((unsigned long) popaddress())*1000; + y=popaddress(); + x=popaddress(); + if (!USELONGJUMP && er) return; + + push(pulsein(x, y, t)/bpulseunit); +} +#endif + + +#ifdef HASGRAPH +/* + * COLOR setting, accepting one or 3 arguments + */ +void xcolor() { + int r, g, b; + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + switch(args) { + case 1: + vgacolor(pop()); + break; + case 3: + b=pop(); + g=pop(); + r=pop(); + rgbcolor(r, g, b); + break; + default: + error(EARGS); + break; + } +} + +/* + * PLOT a pixel on the screen + */ +void xplot() { + int x0, y0; + + nexttoken(); + parsenarguments(2); + if (!USELONGJUMP && er) return; + y0=pop(); + x0=pop(); + plot(x0, y0); +} + +/* + * LINE draws a line + */ +void xline() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + line(x0, y0, x1, y1); +} + +void xrect() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + rect(x0, y0, x1, y1); +} + +void xcircle() { + int x0, y0, r; + + nexttoken(); + parsenarguments(3); + if (!USELONGJUMP && er) return; + r=pop(); + y0=pop(); + x0=pop(); + circle(x0, y0, r); +} + +void xfrect() { + int x0, y0, x1, y1; + + nexttoken(); + parsenarguments(4); + if (!USELONGJUMP && er) return; + y1=pop(); + x1=pop(); + y0=pop(); + x0=pop(); + frect(x0, y0, x1, y1); +} + +void xfcircle() { + int x0, y0, r; + + nexttoken(); + parsenarguments(3); + if (!USELONGJUMP && er) return; + r=pop(); + y0=pop(); + x0=pop(); + fcircle(x0, y0, r); +} +#endif + +#ifdef HASDARKARTS +/* + * MALLOC allocates a chunk of memory + */ +void xmalloc() { + address_t s; + address_t a; + name_t name; + +/* size and identifier */ + s=popaddress(); + a=popaddress(); + if (!USELONGJUMP && er) return; + +/* create a name */ + name.token=TBUFFER; + name.l=2; + name.c[0]=a%256; + name.c[1]=a/256; + +/* allocate the memory */ + push(bmalloc(&name, s)); +} + +/* + * FIND an object on the heap + * xfind can find things in the variable name space and the buffer space + */ + +void xfind() { + address_t a; + address_t n; + +/* is there a ( */ + if (!expect('(', EUNKNOWN)) return; + +/* after that, try to find the object on the heap */ + nexttoken(); + if (token == TFN) { + nexttoken(); + name.token=TFN; + } + a=bfind(&name); + +/* depending on the object, interpret the result */ + switch (token) { + case ARRAYVAR: + case TFN: + if (!expect('(', EUNKNOWN)) return; + if (!expect(')', EUNKNOWN)) return; + case VARIABLE: + case STRINGVAR: + nexttoken(); + break; + default: + expression(); /* do not use expectexpr here because of the token sequence */ + if (!USELONGJUMP && er) return; + n=popaddress(); + if (!USELONGJUMP && er) return; + name.token=TBUFFER; + name.l=2; + name.c[0]=n%256; + name.c[1]=n/256; + a=bfind(&name); + } + +/* closing braket, dont use expect here because of the token sequence */ + if (token != ')') { error(EUNKNOWN); return; } + + push(a); +} + +/* + * EVAL can modify a program, there are serious side effects + * which are not caught (and cannot be). All FOR loops and RETURN + * vectors break if EVAL inserts in their range + */ +void xeval(){ + address_t i, l; + address_t mline, line; + string_t s; + +/* get the line number to store */ + if (!expectexpr()) return; + line=popaddress(); + if (!USELONGJUMP && er) return; + + if (token != ',') { error(EUNKNOWN); return; } + +/* the line to be stored */ + nexttoken(); + if (!stringvalue(&s)) { error(EARGS); return; } + +/* here we have the string to evaluate it to the ibuffer + only one line allowed, BUFSIZE is the limit */ + l=s.length; + if (!USELONGJUMP && er) return; + + if (l>BUFSIZE-1) {error(EORANGE); return; } + +#ifdef USEMEMINTERFACE + if (!s.ir) getstringtobuffer(&s, spistrbuf1, SPIRAMSBSIZE); +#endif + + for (i=0; ienabled=0; + t->interval=0; + t->last=0; + t->type=0; + t->linenumber=0; +} + +void xtimer() { + token_t t; + btimer_t* timer; + +/* do we deal with every or after */ + if (token == TEVERY) timer=&every_timer; else timer=&after_timer; + + /* one argument expected, the time intervall */ + if (!expectexpr()) return; + + /* after that, a command GOTO or GOSUB with a line number + more commands thinkable */ + switch(token) { + case TGOSUB: + case TGOTO: + t=token; + if (!expectexpr()) return; + timer->last=millis(); + timer->type=t; + timer->linenumber=pop(); + timer->interval=pop(); + timer->enabled=1; + break; + default: + if (termsymbol()) { + x=pop(); + if (x == 0) + timer->enabled=0; + else { + if (timer->linenumber) { + timer->enabled=1; + timer->interval=x; + timer->last=millis(); + } else + error(EARGS); + } + } else + error(EUNKNOWN); + return; + } +} +#endif + +#ifdef HASEVENTS +/* + * The events API for Arduino with interrupt service routines + * analogous to the timer API. + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + * detach und attach are wrappers around the original Arduino functions. + * Runtime needs to be compiled with #define ARDUINOINTERRUPTS for this to + * work. + * + */ + +/* interrupts in BASIC fire once and then disable themselves, BASIC reenables them */ +void bintroutine0() { + eventlist[0].active=1; + detachinterrupt(eventlist[0].pin); +} +void bintroutine1() { + eventlist[1].active=1; + detachinterrupt(eventlist[1].pin); +} +void bintroutine2() { + eventlist[2].active=1; + detachinterrupt(eventlist[2].pin); +} +void bintroutine3() { + eventlist[3].active=1; + detachinterrupt(eventlist[3].pin); +} + +mem_t eventindex(mem_t pin) { + mem_t i; + + for(i=0; i= 0) { + outnumber(eventlist[ax].pin); outspc(); + outnumber(eventlist[ax].mode); outspc(); + outnumber(eventlist[ax].type); outspc(); + outnumber(eventlist[ax].linenumber); outspc(); + outcr(); + } + } + outnumber(nevents); outcr(); + nexttoken(); + return; + } + +/* control of events */ + if (token == TSTOP) { + events_enabled=0; + nexttoken(); + return; + } + + if (token == TCONT) { + events_enabled=1; + nexttoken(); + return; + } + +/* argument parsing */ + parsearguments(); + if (!USELONGJUMP && er) return; + + switch(args) { + case 2: + mode=pop(); + if (mode > 3) { + error(EARGS); + return; + } + case 1: + pin=pop(); + break; + default: + error(EARGS); + } + +/* followed by termsymbol, GOTO or GOSUB */ + if (token == TGOTO || token == TGOSUB) { + type=token; + +/* which line to go to */ + if (!expectexpr()) return; + line=pop(); + } + + +/* all done either set the interrupt up or delete it*/ + if (type) { + if (!addevent(pin, mode, type, line)) { + error(EARGS); + return; + } + } else { + disableevent(pin); + deleteevent(pin); + return; + } + +/* enable the interrupt */ + if (!enableevent(pin)) { + deleteevent(pin); + error(EARGS); + return; + } +} + +/* handling the event list */ +mem_t addevent(mem_t pin, mem_t mode, mem_t type, address_t linenumber) { + int i; + +/* is the event already there */ + for (i=0; i= EVENTLISTSIZE) return 0; + for (i=0; i= 0) { + eventlist[i].enabled=0; + eventlist[i].pin=-1; + eventlist[i].mode=0; + eventlist[i].type=0; + eventlist[i].linenumber=0; + eventlist[i].active=0; + nevents--; + } +} +#endif + +/* + * BASIC DOS - disk access programs, to control mass storage from BASIC + */ + +/* string match helper in catalog */ +char streq(const char *s, char *m){ + short i=0; + + while (m[i]!=0 && s[i]!=0 && i < SBUFSIZE){ + if (s[i] != m[i]) return 0; + i++; + } + return 1; +} + +/* + * CATALOG - basic directory function + */ +void xcatalog() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + const char *name; + + nexttoken(); + getfilename(filename, 0); + if (!USELONGJUMP && er) return; + + rootopen(); + while (rootnextfile()) { + if (rootisfile()) { + name=rootfilename(); + if (*name != '_' && *name !='.' && streq(name, filename)){ + outscf(name, 14); outspc(); + if (rootfilesize()>0) outnumber(rootfilesize()); + outcr(); + if (dspwaitonscroll() == 27) break; + } + } + rootfileclose(); + } + rootclose(); +#else + nexttoken(); +#endif +} + +/* + * DELETE a file + */ +void xdelete() { +#if defined(FILESYSTEMDRIVER) + char filename[SBUFSIZE]; + + nexttoken(); + getfilename(filename, 0); + if (!USELONGJUMP && er) return; + + removefile(filename); +#else + nexttoken(); +#endif +} + +/* + * OPEN a file or I/O stream - very raw mix of different functions + */ +void xopen() { +#if defined(FILESYSTEMDRIVER) || defined(HASRF24) || defined(HASMQTT) || defined(HASWIRE) || defined(HASSERIAL1) + char stream = IFILE; /* default is file operation */ + char* filename; + int mode; + +/* which stream do we open? default is FILE */ + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',') {error(EUNKNOWN); return; } + nexttoken(); + } + +/* the filename and its length */ + // getfilename(filename, 0); + filename = getfilename2(0); + if (!USELONGJUMP && er) return; + +/* and the arguments */ + args=0; + if (token == ',') { + nexttoken(); + parsearguments(); + } + +/* getting an argument, no argument is read, i.e. mode 0 */ + if (args == 0 ) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + +/* open the stream */ + switch(stream) { +#ifdef HASSERIAL1 + case ISERIAL1: + prtclose(); + if (mode == 0) mode=9600; + if (prtopen(filename, mode)) ert=0; else ert=1; + break; +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + switch (mode) { + case 1: + ofileclose(); + if (ofileopen(filename, "w")) ert=0; else ert=1; + break; + case 2: + ofileclose(); + if (ofileopen(filename, "a")) ert=0; else ert=1; + break; + default: + case 0: + ifileclose(); + if (ifileopen(filename)) ert=0; else ert=1; + break; + } + break; +#endif +#ifdef HASRF24 + case IRADIO: + if (mode == 0) { + iradioopen(filename); + } else if (mode == 1) { + oradioopen(filename); + } + break; +#endif +#if defined(HASWIRE) + case IWIRE: + wireopen(filename[0], mode); + break; +#endif +#ifdef HASMQTT + case IMQTT: + if (mode == 0) { + mqttsubscribe(filename); + } else if (mode == 1) { + mqttsettopic(filename); + } + break; +#endif + default: + error(EORANGE); + return; + } +#endif + nexttoken(); +} + +/* + * OPEN as a function, currently only implemented for MQTT + */ +void xfopen() { + address_t stream = popaddress(); + if (stream == 9) push(mqttstate()); else push(0); +} + +/* + * CLOSE a file or stream + */ +void xclose() { +#if defined(FILESYSTEMDRIVER) || defined(HASRF24) || defined(HASMQTT) || defined(HASWIRE) + char stream = IFILE; + char mode; + + nexttoken(); + if (token == '&') { + if (!expectexpr()) return; + stream=pop(); + if (token != ',' && ! termsymbol()) {error(EUNKNOWN); return; } + nexttoken(); + } + + parsearguments(); + if (args == 0) { + mode=0; + } else if (args == 1) { + mode=pop(); + } else { + error(EARGS); + return; + } + +/* currently only close of files is implemented, should be also implemented for Wire */ + switch(stream) { + case IFILE: + if (mode == 1 || mode == 2) ofileclose(); else if (mode == 0) ifileclose(); + break; + } +#endif + nexttoken(); +} + +/* + * FDISK - format internal disk storages of RP2040, ESP and the like + */ +void xfdisk() { +#if defined(FILESYSTEMDRIVER) + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args > 1) error(EORANGE); + if (args == 0) push(0); + outsc("Format disk (y/N)?"); + (void) consins(sbuffer, SBUFSIZE); + if (sbuffer[1] == 'y') formatdisk(pop()); + if (fsstat(1) > 0) outsc("ok\n"); else outsc("fail\n"); +#endif + nexttoken(); +} + +#ifdef HASSTEFANSEXT +/* + * USR low level function access of the interpreter + * for each group of functions there is a call vector + * and and argument. + * + * USR arguments from 0 to 31 are reserved for the + * interpreter status and the input output stream + * mechanisms. All other values are free and can be used + * for individual functions - see case 32 for an example. + */ +void xusr() { + address_t fn; + number_t v; + int arg; + address_t a; + + v=pop(); + arg=(int)v; /* a bit paranoid here */ + fn=pop(); + switch(fn) { +/* USR(0,y) delivers all the internal constants and variables or the interpreter */ + case 0: + switch(arg) { + case 0: + push(bsystype); + break; + case 1: /* language set identifier, odd because USR is part of STEFANSEXT*/ + a=0; +#ifdef HASAPPLE1 + a|=1; +#endif +#ifdef HASARDUINOIO + a|=2; +#endif +#ifdef HASFILEIO + a|=4; +#endif +#ifdef HASDARTMOUTH + a|=8; +#endif +#ifdef HASGRAPH + a|=16; +#endif +#ifdef HASDARKARTS + a|=32; +#endif +#ifdef HASIOT + a|=64; +#endif + push(a); break; + case 2: + push(0); break; /* reserved for system speed identifier */ + +#ifdef HASFLOAT + case 3: push(-1); break; +#else + case 3: push(0); break; +#endif + case 4: push(numsize); break; + case 5: push(maxnum); break; + case 6: push(addrsize); break; + case 7: push(maxaddr); break; + case 8: push(strindexsize); break; + case 9: push(memsize+1); break; + case 10: push(elength()); break; + case 11: push(GOSUBDEPTH); break; + case 12: push(FORDEPTH); break; + case 13: push(STACKSIZE); break; + case 14: push(BUFSIZE); break; + case 15: push(SBUFSIZE); break; + case 16: push(ARRAYSIZEDEF); break; + case 17: push(defaultstrdim); break; +/* - 24 reserved, don't use */ + case 24: push(top); break; + case 25: push(here); break; + case 26: push(himem); break; + case 27: push(0); break; + case 28: push(freeRam()); break; + case 29: push(gosubsp); break; + case 30: push(loopsp); break; + case 31: push(0); break; /* fnc removed as interpreter variable */ + case 32: push(sp); break; +#ifdef HASDARTMOUTH + case 33: push(data); break; +#else + case 33: push(0); break; +#endif + case 34: push(0); break; +#ifdef FASTTICKERPROFILE + case 35: push(avgfasttick); break; +#endif +/* - 48 reserved, don't use */ + case 48: push(id); break; + case 49: push(idd); break; + case 50: push(od); break; + case 51: push(odd); break; + default: push(0); + } + break; +/* access to properties of stream 1 - serial */ + case 1: + push(serialstat(arg)); + break; +/* access to properties of stream 2 - display and keyboard */ + case 2: +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + push(dspstat(arg)); +#elif defined(ARDUINOVGA) + push(vgastat(arg)); +#else + push(0); +#endif + break; +/* access to properties of stream 4 - printer */ +#ifdef HASSERIAL1 + case 4: + push(prtstat(arg)); + break; +#endif +/* access to properties of stream 7 - wire */ +#if defined(HASWIRE) + case 7: + push(wirestat(arg)); + break; +#endif +/* access to properties of stream 8 - radio */ +#ifdef HASRF24 + case 8: + push(radiostat(arg)); + break; +#endif +/* access to properties of stream 9 - mqtt */ +#ifdef HASMQTT + case 9: + push(mqttstat(arg)); + break; +#endif +/* access to properties of stream 16 - file */ +#ifdef FILESYSTEMDRIVER + case 16: + push(fsstat(arg)); + break; +#endif + case 32: +/* user function 32 and beyond can be used freely */ +/* all USR values not assigned return 0 */ + default: + if (fn>31) push(usrfunction(fn, v)); else push(0); + } +} +#endif + +/* + * CALL currently only to exit the interpreter + */ +void xcall() { + int r; + + if (!expectexpr()) return; + r=pop(); + switch(r) { + case 0: +/* flush the EEPROM dummy and the output file and then exit */ + eflush(); + ofileclose(); +#if defined(POSIXFRAMEBUFFER) + vgaend(); /* clean up if you have played with the framebuffer */ +#endif + restartsystem(); + break; +/* restart the filesystem - only test code */ + case 1: + fsbegin(); + break; +/* call values to 31 reserved! */ + default: +/* your custom code into usrcall() */ + if (r > 31) usrcall(r); else { error(EORANGE); return; } + nexttoken(); + return; + } +} + +/* the dartmouth stuff */ +#ifdef HASDARTMOUTH +/* + * DATA is simply skipped when encountered as a command + */ +void xdata() { + while (!termsymbol()) nexttoken(); +} + +/* + * for READ find the next data record, helper of READ + */ +void nextdatarecord() { + address_t h; + mem_t s=1; + +/* save the location of the interpreter and the token we are processing */ + h=here; + +/* data at zero means we need to init it, by searching the first data record */ + if (data == 0) { + here=0; + while (here s.strdim) { error(EORANGE); return; } + +/* now write the string */ + assignstring(&s, &sr, sr.length); + +/* classical Apple 1 behaviour is string truncation in substring logic */ + newlength = lhs.i+sr.length-1; + setstringlength(&lhs.name, newlength, lhs.j); + + } + break; + default: + error(EUNKNOWN); + return; + } + +/* next list item */ + if (t0 == ',') goto nextdata; + +/* no nexttoken here as we have already a termsymbol */ + if (DEBUG) { + outsc("** leaving xread with "); outnumber(token); outcr(); + outsc("** at here "); outnumber(here); outcr(); + outsc("** and data pointer "); outnumber(data); outcr(); + } + +/* restore the token for further processing */ + token=t0; +} + +/* + * RESTORE sets the data pointer to zero right now + */ +void xrestore(){ + short rec; + + nexttoken(); + +/* a plain restore */ + if (termsymbol()) { + data=0; + datarc=1; + return; + } + +/* something with an argument */ + expression(); + if (!USELONGJUMP && er) return; + +/* we search a record */ + rec=pop(); + +/* if we need to search backward, back to the beginning */ + if (rec < datarc) { + data=0; + datarc=1; + } + +/* advance to the record or top */ + while (datarc < rec && data < top) nextdatarecord(); + +/* token is poisoned after nextdatarecord, need to cure this here */ + nexttoken(); +} + +/* + * DEF a function, functions are tokenized as FN ARRAYVAR to make + * name processing easy. + */ +void xdef(){ + address_t a; + + name_t function; /* the name of the function */ + name_t variable; /* the name of the argument */ + +/* do we define a function */ + if (!expect(TFN, EUNKNOWN)) return; + +/* the name of the function, it is tokenized as an array */ + if (!expect(ARRAYVAR, EUNKNOWN)) return; + + function=name; + function.token=TFN; /* set the right type here */ + +/* the argument variable */ + if (!expect('(', EUNKNOWN)) return; + nexttoken(); + if (token == ')') { + zeroname(&variable); + } else if (token == VARIABLE) { + variable=name; + nexttoken(); + } else { + error(EUNKNOWN); + return; + } + if (token != ')') { error(EUNKNOWN); return; } + +/* which type of function do we store is found in token */ + nexttoken(); + +/* ready to store the function */ + if (DEBUG) { + outsc("** DEF FN with function "); + outname(&function); + outsc(" and argument "); + outname(&variable); + outsc(" at here "); + outnumber(here); + outsc(" and token is "); + outnumber(token); + outcr(); + } + +/* find the function, we allow redefinition, currently only functions with 1 argument */ + if ((a=bfind(&function))==0) a=bmalloc(&function, 1); + if (DEBUG) {outsc("** found function structure at "); outnumber(a); outcr(); } + if (!USELONGJUMP && er) return; + +/* no more memory */ + if (a == 0) { error(EVARIABLE); return; } + +/* store the payload */ + +/* first the jump address */ + setaddress(a, memwrite2, here); + a=a+addrsize; + +/* the type of the return value - at the moment only numbers */ + if (token == '=') + memwrite2(a++, VARIABLE); + else + memwrite2(a++, 0); + +/* store the number of variables */ + memwrite2(a++, 1); + +/* store the type and the name of the variables */ + memwrite2(a++, variable.token); + setname_pgm(a, &variable); + a=a+sizeof(name_t)-1; /* useless now but needed later */ + +/* skip the function body during defintion */ + if (token == '=') { + while (!termsymbol()) nexttoken(); + } else { +#if defined(HASMULTILINEFUNCTIONS) + while (token != TFEND) { + nexttoken(); + if (token == TDEF || token == EOL) { error(EFUN); return; } + } + nexttoken(); +#else + error(EFUN); + return; +#endif + } +} + +/* + * FN function evaluation, this is a call from factor or directly from + * statement, the variable m tells xfn which one it is. 0 is from + * factor and 1 is from statement. + * + * This mechanism is only needed in multiline functions. In this case, + * a new interpreter instance is started with statement(). The variable + * m decides whether the stack should contain a return value (call from factor) + * or should be empty. + * + * The new function code has local variable capability of the new heap. + */ +void xfn(mem_t m) { + address_t a; + address_t h1, h2; + name_t variable; + token_t type; + +/* the name of the function and its address */ + if (!expect(ARRAYVAR, EUNKNOWN)) return; + name.token=TFN; + a=bfind(&name); + if (a == 0) {error(EUNKNOWN); return; } + + if (DEBUG) { outsc("** in xfn found function "); outname(&name); outsc(" at "); outnumber(a); outcr(); } + +/* and the argument */ + if (!expect('(', EUNKNOWN)) return; + nexttoken(); + +/* if there is no argument, set it to zero */ + if (token == ')') { + push(0); + } else { + expression(); + if (!USELONGJUMP && er) return; + } + if (token != ')') {error(EUNKNOWN); return; } + +/* where is the function code */ + h1=getaddress(a, memread2); + a=a+addrsize; + + if (DEBUG) { outsc("** found function address "); outnumber(h1); outcr(); } + +/* which type of function do we have*/ + type=memread2(a++); + + if (DEBUG) { outsc("** found function type "); outnumber(type); outcr(); } + +/* the number of variables is always one here */ + a++; + +/* what is the name of the variable, direct read as getname also gets a token */ +/* skip the type here as not needed*/ + variable.token=memread2(a++); + (void) getname(a, &variable, memread2); + a=a+sizeof(name_t)-1; + + if (DEBUG) { outsc("** found function variable "); outname(&variable); outcr(); } + +/* create a local variable and store the value in it if there is a variable */ + if (variable.c[0]) { + if (!bmalloc(&variable, 0)) { error(EVARIABLE); return; } + setvar(&variable, pop()); + } else { +/* create a dummy variable to make sure local variables are cleaned up */ + variable.token=VARIABLE; + variable.c[0]='_'; + variable.c[1]=0; + variable.l=1; + if (!bmalloc(&variable, 0)) { error(EVARIABLE); return; } + } + +/* store here and then evaluate the function */ + h2=here; + here=h1; + +/* for simple singleline function, we directly do experession evaluation */ + if (type == VARIABLE) { + if (DEBUG) {outsc("** evaluating expression at "); outnumber(here); outcr(); } + if (!expectexpr()) return; + } else { +#ifdef HASMULTILINEFUNCTIONS + +/* here comes the tricky part, we start a new interpreter instance */ + + if (DEBUG) {outsc("** starting a new interpreter instance "); outcr();} + + nexttoken(); + fncontext++; + if (fncontext > FNLIMIT) { error(EFUN); return; } + statement(); + if (!USELONGJUMP && er) return; + if (fncontext > 0) fncontext--; else error(EFUN); +#else + error(EFUN); + return; +#endif + } + +/* now that all the function stuff is done, return to here and set the variable right */ + here=h2; + (void) bfree(&variable); + + +/* now, depending on how this was called, make things right, we remove + the return value from the stack and call nexttoken */ + if (m == 1) { + pop(); + nexttoken(); + } +} + +/* + * ON is a bit like IF + */ + +void xon(){ + number_t cr, tmp; + int ci; + token_t t; + int line = 0; + +/* ON can do the ON ERROR and ON EVENT commands as well, in this BASIC + ERROR and EVENT can also be used without the ON */ + + nexttoken(); + switch(token) { +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + return; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + return; +#endif + default: + expression(); + if (!USELONGJUMP && er) return; + } + +/* the result of the condition, can be any number even large */ + cr=pop(); + if (DEBUG) { outsc("** in on condition found "); outnumber(cr); outcr(); } + +/* is there a goto or gosub */ + if (token != TGOSUB && token != TGOTO) { error(EUNKNOWN); return; } + +/* remember if we do gosub or goto */ + t=token; + +/* how many arguments have we got here */ + nexttoken(); + parsearguments(); + if (!USELONGJUMP && er) return; + if (args == 0) { error(EARGS); return; } + +/* do we have more arguments then the condition? */ + if (cr > args && cr <= 0) ci=0; else ci=(int)cr; + +/* now find the line to jump to and clean the stack, reuse cr + * we need to clean the stack here completely, therefore complete the loop + * ERROR handling is needed for the trapping mechanism. No using popaddress() + * here, because of the needed stack cleanup. Unclear is this precaution is + * really needed. + */ + while (args) { + tmp=pop(); + if (args == ci) { + if (tmp < 0) er=ELINE; + line=tmp; + } + args--; + } + if (!USELONGJUMP && er) return; + + if (DEBUG) { outsc("** in on found line as target "); outnumber(line); outcr(); } + +/* no line found to jump to */ + if (line == 0) { + nexttoken(); + return; + } + +/* prepare for the jump */ + if (t == TGOSUB) pushgosubstack(0); + if (!USELONGJUMP && er) return; + + findline(line); + if (!USELONGJUMP && er) return; + +/* goto in interactive mode switched to RUN mode + no clearing of variables and stacks */ + if (st == SINT) st=SRUN; + +} +#endif + +/* the structured BASIC extensions, WHILE, UNTIL, and SWITCH */ + +#ifdef HASSTRUCT +void xwhile() { + +/* what? */ + if (DEBUG) { outsc("** in while "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points to the condition, name is irrelevant */ + pushloop(0, TWHILE, here, 0, 0); + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND and clear the stack*/ + if (!pop()) { + droploop(); + if (st == SINT) bi=ibuffer+here; + nexttoken(); + findbraket(TWHILE, TWEND); + nexttoken(); + } +} + +void xwend() { + blocation_t l; + bloop_t* loop; + +/* remember where we are */ + pushlocation(&l); + +/* back to the condition */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + +/* is this a while loop */ + if (loop->var.token != TWHILE ) { error(TWEND); return; } + +/* interactive run or program run */ + if (st == SINT) bi=ibuffer+loop->here; else here=loop->here; + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* if false, seek WEND */ + if (!pop()) { + droploop(); + poplocation(&l); + nexttoken(); + } +} + +void xrepeat() { + /* what? */ + if (DEBUG) { outsc("** in repeat "); outnumber(here); outspc(); outnumber(token); outcr(); } + +/* interactively we need to save the buffer location */ + if (st == SINT) here=bi-ibuffer; + +/* save the current location and token type, here points statement after repeat */ + pushloop(0, TREPEAT, here, 0, 0); + +/* we are done here */ + nexttoken(); +} + +void xuntil() { + blocation_t l; + bloop_t* loop; + +/* is there a valid condition */ + if (!expectexpr()) return; + +/* remember the location */ + pushlocation(&l); + +/* look on the stack */ + loop = activeloop(); + if (!USELONGJUMP && er) return; + +/* if false, go back to the repeat */ + if (!pop()) { + +/* the right loop type ? */ + if (loop->var.token != TREPEAT) { + error(TUNTIL); + return; + } + +/* correct for interactive */ + if (st == SINT) bi=ibuffer+loop->here; else here=loop->here; + + } else { + +/* back to where we were */ + droploop(); + poplocation(&l); + } + + nexttoken(); /* a bit of evil here, hobling over termsymbols */ +} + +void xswitch() { + number_t r; + mem_t match = 0; + mem_t swcount = 0; + blocation_t l; + +/* lets look at the condition */ + if (!expectexpr()) return; + r=pop(); + +/* remember where we are */ + pushlocation(&l); + +/* seek the first case to match the condition */ + while (token != EOL) { + if (token == TSWEND) break; + /* nested SWITCH - skip them all*/ + if (token == TSWITCH) { + + if (DEBUG) { outsc("** in SWITCH - nesting found "); outcr(); } + + nexttoken(); + findbraket(TSWITCH, TSWEND); + + if (DEBUG) { outsc("** in SWITCH SWEND found at "); outnumber(here); outcr(); } + + if (!USELONGJUMP && er) return; + } + /* a true case */ + if (token == TCASE) { + +/* more sophisticated, case can have an argument list */ + nexttoken(); + parsearguments(); + + if (DEBUG) { outsc("** in CASE found "); outnumber(args); outsc(" arguments"); outcr(); } + + if (!USELONGJUMP && er) return; + if (args == 0) { + error(TCASE); + return; + } + while (args > 0) { + if (pop() == r) match=1; + args--; + } + + if (match) { + return; + } + } + nexttoken(); + } + +/* return to the original location and continue if no case is found */ + poplocation(&l); +} + +/* a nacked case statement always seeks the end of the switch, + currently SWITCH statements cannot be nested. */ +void xcase() { + while (token != EOL) { + nexttoken(); + if (token == TSWEND) break; + } +} +#endif + + +/* + * statement processes an entire basic statement until the end + * of the line. + * + * The statement loop is a bit odd and requires some explanation. + * A statement function called in the central switch here must either + * call nexttoken as its last action to feed the loop with a new token + * and then break or it must return which means that the rest of the + * line is ignored. A function that doesn't call nexttoken and just + * breaks causes an infinite loop. + * + * statement is called once in interactive mode and terminates + * at end of a line. + */ + +void statement(){ + mem_t xc; + + if (DEBUG) bdebug("statement \n"); + +/* we can long jump out out any function now, making error handling easier */ +/* if we return here with a long jump, only the error handler is triggered */ +/* this mechanism always branches to the highest context */ +#if USELONGJUMP == 1 + if (fncontext == 0) if (setjmp(sthook)) goto errorhandler; +#endif + +/* the core loop processing commands */ + while (token != EOL) { +#ifdef HASSTEFANSEXT +/* debug level 1 happens only in the statement loop */ + if (debuglevel == 1) { debugtoken(); outcr(); } +#endif + switch(token){ + case ':': + case LINENUMBER: + nexttoken(); + break; +/* Palo Alto BASIC language set + BREAK */ + case TPRINT: + xprint(); + break; + case TLET: + nexttoken(); + if ((token != ARRAYVAR) && (token != STRINGVAR) && (token != VARIABLE)) { + error(EUNKNOWN); + break; + } + case STRINGVAR: + case ARRAYVAR: + case VARIABLE: + assignment(); + break; + case TINPUT: + xinput(); + break; + case TRETURN: +#ifndef HASMULTILINEFUNCTIONS + xreturn(); +#else + if (fncontext > 0) { + nexttoken(); + if (termsymbol()) { push(0); } + else expression(); + return; + } else + xreturn(); +#endif + break; +#ifndef HASMULTILINEFUNCTIONS + case TGOSUB: + case TGOTO: + xgoto(); + break; +#else + case TGOSUB: + if (fncontext > 0) { error(EFUN); return; } + case TGOTO: + xgoto(); + break; +#endif + case TIF: + xif(); + break; + case TFOR: + xfor(); + break; + case TNEXT: + xnext(); + break; + case TBREAK: + xbreak(); + break; + case TSTOP: + case TEND: /* return here because new input is needed, end as a block end is handles elsewhere */ + *ibuffer=0; /* clear ibuffer - this is a hack */ + st=SINT; /* switch to interactive mode */ + eflush(); /* if there is an EEPROM dummy, flush it here (protects flash storage!) */ + ofileclose(); + nexttoken(); + if (token == TSTOP) { + restartsystem(); + } + *ibuffer=0; /* clear ibuffer - this is a hack */ + st=SINT; /* switch to interactive mode */ + return; + case TLIST: + xlist(); + break; + case TNEW: /* return here because new input is needed */ + xnew(); + return; + case TCONT: /* cont behaves differently in interactive and in run mode */ + if (st==SRUN || st==SERUN) { + xcont(); + break; + } /* no break here, because interactively CONT=RUN minus CLR */ + case TRUN: + xrun(); + return; + case TREM: + xrem(); + break; +/* Apple 1 language set */ +#ifdef HASAPPLE1 + case TDIM: + xdim(); + break; + case TCLR: + xclr(); + break; + case TTAB: + case TSPC: + xtab(); + break; + case TPOKE: + xpoke(); + break; +#endif +/* Stefan's tinybasic additions */ + case TSAVE: + xsave(); + break; + case TLOAD: + xload(0); + if (st == SINT) return; /* interactive load doesn't like break as the ibuffer is messed up; */ + else break; +#ifdef HASSTEFANSEXT + case TDUMP: + xdump(); + break; + case TGET: + xget(); + break; + case TPUT: + xput(); + break; + case TSET: + xset(); + break; + case TNETSTAT: + xnetstat(); + break; + case TCLS: + ax=od; +/* if we have a display it is the default for CLS */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + od=ODSP; +#endif + outch(12); + od=ax; + nexttoken(); + break; + case TLOCATE: + xlocate(); + break; +/* low level functions as part of Stefan's extension */ + case TCALL: + xcall(); + break; +#endif +/* Arduino IO */ +#ifdef HASARDUINOIO + case TDWRITE: + xdwrite(); + break; + case TAWRITE: + xawrite(); + break; + case TPINM: + xpinm(); + break; + case TDELAY: + xdelay(); + break; +#ifdef HASTONE + case TTONE: + xtone(); + break; +#endif +#ifdef HASPULSE + case TPULSE: + xpulse(); + break; +#endif +#endif +/* BASIC DOS function */ +#ifdef HASFILEIO + case TCATALOG: + xcatalog(); + break; + case TDELETE: + xdelete(); + break; + case TOPEN: + xopen(); + break; + case TCLOSE: + xclose(); + break; + case TFDISK: + xfdisk(); + break; +#endif +/* graphics */ +#ifdef HASGRAPH + case TCOLOR: + xcolor(); + break; + case TPLOT: + xplot(); + break; + case TLINE: + xline(); + break; + case TRECT: + xrect(); + break; + case TCIRCLE: + xcircle(); + break; + case TFRECT: + xfrect(); + break; + case TFCIRCLE: + xfcircle(); + break; +#endif +#ifdef HASDARTMOUTH + case TDATA: + xdata(); + break; + case TREAD: + xread(); + break; + case TRESTORE: + xrestore(); + break; + case TDEF: + xdef(); + break; + case TON: + xon(); + break; +#ifdef HASMULTILINEFUNCTIONS + case TFN: + xfn(1); + break; + case TFEND: +/* we leave the statement loop and return to the calling expression() */ +/* if the function is ended with FEND we return 0 */ + if (fncontext == 0) { error(EFUN); return; } + else { push(0); return; } + break; +#endif +#endif +#ifdef HASSTEFANSEXT + case TELSE: + xelse(); + break; +#endif +#ifdef HASDARKARTS + case TEVAL: + xeval(); + break; +#endif +#ifdef HASERRORHANDLING + case TERROR: + xerror(); + break; +#endif +#ifdef HASIOT + case TSLEEP: + xsleep(); + break; + case TWIRE: + xwire(); + break; +#endif +#ifdef HASTIMER + case TAFTER: + case TEVERY: + xtimer(); + break; +#endif +#ifdef HASEVENTS + case TEVENT: + xevent(); + break; +#endif +#ifdef HASSTRUCT + case TWHILE: + xwhile(); + break; + case TWEND: + xwend(); + break; + case TREPEAT: + xrepeat(); + break; + case TUNTIL: + xuntil(); + break; + case TSWITCH: + xswitch(); + break; + case TCASE: + xcase(); + break; + case TSWEND: + case TDO: + case TDEND: + nexttoken(); + break; +#endif +#ifdef HASEDITOR + case TEDIT: + xedit(); + break; +#endif + default: +/* strict syntax checking */ + error(EUNKNOWN); + goto errorhandler; + } + + +/* + * after each statement we check on a break character + * on an Arduino entering "#" at runtime stops the program + * for POSIXNONBLOCKING we do this in the background loop + * to avoid slowing down + */ +#if defined(BREAKCHAR) +#ifndef POSIXNONBLOCKING + if (checkch() == BREAKCHAR) { + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#else + if (breakcondition) { + breakcondition=0; + st=SINT; + if (od == 1) serialflush(); else xc=inch(); + return; + } +#endif +#endif + +/* and after each statement, check the break pin */ +#if defined(BREAKPIN) + if (getbreakpin() == 0) { + st=SINT; + return; + }; +#endif + +/* and then there is also signal handling on some platforms */ +#if defined(POSIXSIGNALS) + if (breaksignal) { + st=SINT; + breaksignal=0; + serialflush(); + outcr(); + return; + } +#endif + +/* yield after each statement which is a 10-100 microsecond cycle + on Arduinos and the like, all background tasks are handled in byield */ + byield(); + +/* if error handling is compiled into the code, errors can be trapped here */ +errorhandler: +#ifdef HASERRORHANDLING + if (er) { + if (st != SINT) { + erh=er; + er=0; + switch(berrorh.type) { + case TCONT: + while(!termsymbol()) nexttoken(); + break; + case TGOTO: + findline(berrorh.linenumber); + berrorh.type=0; + berrorh.linenumber=0; + if (er) return; + break; + case 0: + return; + default: + nexttoken(); + } + } else + return; + } +#else +/* when an error is encountered the statement loop is ended */ + if (er) return; +#endif + +/* + * if we run error free, interrupts and times can be processed + * + * We can savely interrupt and return only if here points either to + * a termsymbol : or LINENUMBER. NEXT is a special case. We need to + * catch this here because empty FOR loops never even have a termsymbol + * a : is swallowed after FOR. + * + * the interrupts are only triggered in fncontext 0, i.e. in the + * main loop. While in functions, all interrupts are disabled. + * + */ +#ifdef HASTIMER + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* after is always processed before every */ + if (after_timer.enabled && fncontext == 0) { + if (millis() > after_timer.last + after_timer.interval) { + after_timer.enabled=0; + if (after_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + } + findline(after_timer.linenumber); + if (er) return; + } + } +/* periodic events */ + if (every_timer.enabled && fncontext == 0) { + if (millis() > every_timer.last + every_timer.interval) { + every_timer.last=millis(); + if (every_timer.type == TGOSUB) { + if (token == TNEXT || token == ':') here--; + if (token == LINENUMBER) here-=(1+sizeof(address_t)); + pushgosubstack(0); + if (er) return; + } + findline(every_timer.linenumber); + if (er) return; + } + } + } +#endif + +/* the branch code for interrupts, we round robin through the event list */ +#ifdef HASEVENTS + if ((token == LINENUMBER || token == ':' || token == TNEXT) && (st == SERUN || st == SRUN)) { +/* interrupts */ + if (events_enabled && fncontext == 0) { + for (ax=0; ax 0) outsc("Filesystem started\n"); +#endif + +/* setup for all non BASIC stuff */ + bsetup(); + +/* get the BASIC memory, either as memory array with + ballocmem() or as an SPI serical memory */ +#if (defined(SPIRAMINTERFACE) || defined(SPIRAMSIMULATOR)) && MEMSIZE == 0 + himem=memsize=spirambegin(); +#else +#if defined(EEPROMMEMINTERFACE) +/* + * for an EEPROMMEM system, the memory consists of the + * EEPROM from 0 to elength()-eheadersize and then the RAM. + */ + himem=memsize=ballocmem()+(elength()-eheadersize); +#else + himem=memsize=ballocmem(); +#endif +#endif + +#ifndef EEPROMMEMINTERFACE + if (DEBUG) { outsc("** on startup, memsize is "); outnumber(memsize); outcr(); } + +/* be ready for a new program if we run on RAM*/ + xnew(); + + if (DEBUG) { outsc("** on startup, ran xnew "); outcr(); } +#else +/* if we run on an EEPROM system, more work is needed */ + if (eread(0) == 0 || eread(0) == 1) { /* have we stored a program and don't do new */ + top=getaddress(1, beread); + resetbasicstate(); /* the little brother of new, reset the state but let the program memory be */ + for (address_t a=elength(); a= sizeof(address_t) + * and that the entire memory is smaller than the positive + * part of number type (!!) + * + * we assume that float >= 4 bytes in the following + * + * maxnum: the maximum accurate(!) integer of a + * 32 bit float + * strindexsize: the index size of strings either + * 1 byte or 2 bytes - no other values supported + */ +#ifdef HASFLOAT +typedef float number_t; +typedef long wnumber_t; +#else +typedef int number_t; +typedef int wnumber_t; +#endif +typedef uint16_t address_t; /* this type addresses memory */ +/* use this for large memory systems, tested occassionally */ +// typedef uint32_t address_t; +typedef int8_t mem_t; /* a signed 8 bit type for the memory */ +typedef int index_t; /* this type counts at least 16 bit */ +#ifndef HASLONGTOKENS +typedef int8_t token_t; /* the type of tokens, normally mem_t with a maximum of 127 commands and data types */ +#else +typedef int16_t token_t; /* token type extension, allows an extra of 127 commands and symbols */ +#endif + +/* the memreader function type, a function accessing memory has to have this shape */ +typedef mem_t (*memreader_t)(address_t); +typedef void (*memwriter_t)(address_t, mem_t); + +/* the worker function type - experimental */ +typedef void (*bworkfunction_t)(); + +/* the location type, this is the cursor on the actual interpreter location */ +typedef struct { + address_t location; + token_t token; +} blocation_t; + + +/* the new string type used in the reimplementation of the string functions */ +/* + * stringlength_t is the maximum length of a string, currently only 2 bytes is really tested. + * one byte lengthes may work, will be fixed soon to arbitrary types + * + * string_t says where we can find a string. It is either in BASIC memory and has a valid BASIC memory + * address a, or it is in C memory outside mem[]. Then ir says where the string can be found. + * This is necessary because BASIC can handle different memory layouts, EEPROM models and serial + * memory chips. We cannot simply rely on data to be found in BASIC memory like in old 8 bit + * computers or all in C memory like on modern Linux/Windows/Mac systems. + * + * Components of the string_t: + * - the address of the string in BASIC memory + * - the C memory pointer ir to the string location, if this is 0, the string is somewhere outside C memory + * - the length of the entire string + * - the dimension of the string strdim, this is the length of the memory segment reserved for the string + * - the dimension of the string array, arraydim + */ + +typedef uint16_t stringlength_t; + +typedef struct { + address_t address; + char* ir; + stringlength_t length; + address_t strdim; + address_t arraydim; +} string_t; + +/* + * Two types for identifiying objects and lefthandsides. + * name_t is the type for variable names and types. + * lhsobject_t identifies an assignable object like variables, + * arrays and strings. + * + * Currently name_t only implements two letter objects and lhsobject_t + * only implements two dimensional arrays and one dimensional strings. + */ +typedef struct { + token_t token; + mem_t c[MAXNAME]; + mem_t l; +} name_t; + +/* used to identify mostly lefthandsides and some righthandsides with these conventions */ +typedef struct { + name_t name; /* the name of a variable */ + address_t i; /* the start value of a substring or the first index of a number array */ + address_t j; /* the second index of an array */ + address_t i2; /* the second value of a substring string */ + mem_t ps; /* flag to indicate a pure string */ +} lhsobject_t; + +/* heap objects have a name a size and a payload address */ +typedef struct { + name_t name; + address_t address; + address_t size; +} heap_t; + +/* + * a general loop time, needed for the reimplementation of all loops + * the loop time knows the variable of a for loop or alternatively + * the type of the for loop. For this the token field of the name is + * reused. At also knows the here address of the loops beginning and optinally + * the end and the step + */ +typedef struct { + name_t var; + address_t here; + number_t to; + number_t step; +} bloop_t; + + +/* + * The accumulator type, used for the stack and the + * arithmetic operations. + */ +typedef union { + number_t n; + address_t a; + index_t i; + stringlength_t s; + mem_t c[sizeof(number_t)]; +} accu_t; + +/* the timer type, knows the linenumber and all the data of the timer */ +typedef struct { + mem_t enabled; + unsigned long last; + unsigned long interval; + mem_t type; + address_t linenumber; +} btimer_t; + +/* + * The events API for Arduino with interrupt service routines + * analogous to the timer API. + * + * we use raw modes here + * + * #define CHANGE 1 + * #define FALLING 2 + * #define RISING 3 + * + */ + +/* event type for external events */ +typedef struct { + mem_t enabled; + mem_t pin; + mem_t mode; + mem_t type; + address_t linenumber; + mem_t active; +} bevent_t; + +/* + * Function prototypes, ordered by layers + * HAL - hardware abstraction + * Layer 0 - memory and I/O + * Layer 1 - Program storage and control + * Layer 2 - Where stuff happens + */ + +/* + * Layer 0 functions - I/O and memory management + */ + +/* event types and functions */ +void bintroutine0(); +void bintroutine1(); +void bintroutine2(); +void bintroutine3(); +mem_t enableevent(mem_t); +void disableevent(mem_t); +mem_t eventindex(mem_t); +mem_t addevent(mem_t, mem_t, mem_t, address_t); +void deleteevent(mem_t); +volatile bevent_t* findevent(mem_t); + +/* make room for BASIC */ +address_t ballocmem(); + +/* handle files im EEPROM */ +void eload(); +void esave(); +char autorun(); + +/* the variable heap from Apple 1 BASIC */ +address_t bmalloc(name_t*, address_t); +address_t bfind(name_t*); +address_t bfree(name_t*); +address_t blength (name_t*); + +/* normal variables of number_t */ +number_t getvar(name_t*); +void setvar(name_t*, number_t); +void clrvars(); + +/* the new set of functions for memory access */ +number_t getnumber(address_t, memreader_t); +address_t getaddress(address_t, memreader_t); +stringlength_t getstrlength(address_t, memreader_t); +void setnumber(address_t, memwriter_t, number_t); +void setaddress(address_t, memwriter_t, address_t); +void setstrlength(address_t, memwriter_t, stringlength_t); + +/* setting names */ +address_t setname_heap(address_t, name_t*); +address_t setname_pgm(address_t, name_t*); +address_t getname(address_t, name_t*, memreader_t); +mem_t cmpname(name_t*, name_t*); +void zeroname(name_t*); +void zeroheap(heap_t*); + +/* array and string handling */ +/* the multidim extension is experimental, here only 2 array dimensions implemented as test */ +address_t createarray(name_t*, address_t, address_t); +void array(lhsobject_t*, mem_t, number_t*); +address_t createstring(name_t*, address_t, address_t); +void getstring(string_t*, name_t*, address_t, address_t); +void setstringlength(name_t*, address_t, address_t); + +/* the user defined extension functions */ +number_t getusrvar(); +void setusrvar(number_t); +number_t getusrarray(address_t); +void setusrarray(address_t, number_t); +void makeusrstring(); +number_t usrfunction(address_t, number_t); +void usrcall(address_t); + +/* get keywords and tokens from PROGMEM */ +char* getkeyword(address_t); +char* getmessage(char); +token_t gettokenvalue(address_t); +void printmessage(char); + +/* error handling */ +void error(token_t); +void reseterror(); +void debugtoken(); +void bdebug(const char*); + +/* the arithemtic stack */ +void push(number_t); +number_t pop(); +address_t popaddress(); +void drop(); +void clearst(); + +/* READ DATA handling */ +void clrdata(); + +/* FOR NEXT GOSUB stacks */ +void pushforstack(name_t*, number_t, number_t); +void popforstack(name_t*, number_t*, number_t*); +void dropforstack(); +void clrforstack(); +void pushgosubstack(mem_t); +void popgosubstack(); +void dropgosubstack(); +void clrgosubstack(); + +/* handling location rewinds */ +void pushlocation(blocation_t*); +void poplocation(blocation_t*); + +/* signal handling */ +void signalon(); +void signaloff(); +void signalhandler(int); + +/* output */ +void outcr(); +void outspc(); +void outsc(const char*); +void outscf(const char *, index_t); + +/* output a name */ +void outname(name_t*); + +/* I/O of number_t - floats and integers */ +address_t parsenumber(char*, number_t*); +address_t parsenumber2(char*, number_t*); +address_t writenumber(char*, wnumber_t); +address_t writenumber2(char*, number_t); +address_t tinydtostrf(number_t, index_t, char*); +int innumber(number_t*, char*, address_t); +void outnumber(number_t); + +/* + * Layer 1 functions, provide data and do the heavy lifting + * for layer 2 including lexical analysis, storing programs + * and expression evaluation + */ + +/* lexical analysis */ +void whitespaces(); +void nexttoken(); + +/* storing and retrieving programs */ +char nomemory(number_t); +void storetoken(); +mem_t memread(address_t); +mem_t memread2(address_t); +void memwrite2(address_t, mem_t); +mem_t beread(address_t); +void beupdate(address_t, mem_t); +void gettoken(); +void firstline(); +void nextline(); + +void clrlinecache(); +void addlinecache(address_t, address_t); +address_t findinlinecache(address_t); +void findline(address_t); +address_t myline(address_t); +void moveblock(address_t, address_t, address_t); +void zeroblock(address_t, address_t); +void diag(); +void storeline(); + +/* read arguments from the token stream and process them */ +char termsymbol(); +char expect(token_t, mem_t); +char expectexpr(); +void parsearguments(); +void parsenarguments(char); +void parsesubscripts(); +void parsefunction(void (*)(), short); +void parseoperator(void (*)()); +void parsesubstring(); + +/* mathematics and other functions for int and float */ +void xabs(); +void xsgn(); +void xpeek(); +void xmap(); +number_t rnd(); +void xrnd(); +void sqr(); +void xpow(); +number_t bpow(number_t, number_t); + +/* string values and string evaluation */ +void parsestringvar(string_t*, lhsobject_t*); +char stringvalue(string_t*); +void streval(); + +/* floating point functions */ +void xsin(); +void xcos(); +void xtan(); +void xatan(); +void xlog(); +void xexp(); +void xint(); + +/* expression evaluation */ +void factor(); +void power(); +void term(); +void addexpression(); +void compexpression(); +void notexpression(); +void andexpression(); +void expression(); + +/* real time clock string stuff */ +void rtcmkstr(); + +/* + * Layer 2 - statements and functions + * use the global variables + */ + +/* basic commands of the core language set */ +void xprint(); +void getstringtobuffer(string_t*, char*, stringlength_t); +void lefthandside(lhsobject_t*); +void assignnumber(lhsobject_t, number_t); +void assignstring(string_t*, string_t*, stringlength_t); +void assignment(); +void showprompt(); +void xinput(); +void xgoto(); +void xreturn(); +void xif(); + +/* FOR NEXT loops */ +void findnextcmd(); +void findbraket(token_t, token_t); +void xfor(); +void xbreak(); +void xcont(); +void xnext(); + +/* WHILE WEND*/ +void xwhile(); +void xwend(); + +/* REPEAT UNTIL */ +void xrepeat(); +void xuntil(); + +/* control commands and misc */ +void outputtoken(); +void xlist(); +void xrun(); +void xnew(); +void xrem(); +void xclr(); +void xdim(); +void xpoke(); +void xtab(); +void xdump(); +void dumpmem(address_t, address_t, char); +void xlocate(); + +/* file access and other i/o */ +void stringtobuffer(char*, string_t*); +void getfilename(char*, char); +void xsave(); +void xload(const char*); +void xget(); +void xput(); +void xset(); +void xnetstat(); + +/* Arduino IO control interface */ +void xaread(); +void xdread(); +void xdwrite(); +void xawrite(); +void xpinm(); +void xdelay(); +void xtone(); +void btone(int); +void bpulsein(); + +/* graphics commands */ +void xcolor(); +void xplot(); +void xline(); +void xrect(); +void xcircle(); +void xfrect(); +void xfcircle(); + +/* the darkarts */ +void xmalloc(); +void xfind(); +void xeval(); + +/* IoT commands */ +void xavail(); +void xfsensor(); +void xsleep(); +void xwire(); +void xfwire(); + +/* timers */ +void xafter(); +void xevent(); + +/* File I/O functions */ +char streq(const char*, char*); +void xcatalog(); +void xdelete(); +void xopen(); +void xfopen(); +void xclose(); +void xfdisk(); + +/* low level access functions */ +void xcall(); +void xusr(); + +/* the dartmouth stuff */ +void xdata(); +void nextdatarecord(); +void xread(); +void xrestore(); +void xdef(); +void xfn(mem_t); +void xon(); + +/* timers and interrupts */ +void xtimer(); +void resettimer(btimer_t*); + +/* structured BASIC extensions */ +void xwhile(); +void xwend(); +void xrepeat(); +void xuntil(); +void xswitch(); +void xcase(); +void xendswitch(); + +/* the editor */ +void xedit(); + +/* the statement loop */ +void statement(); + +/* the extension functions */ +void bsetup(); +void bloop(); diff --git a/data/Basic2/Windows/hardware.h b/data/Basic2/Windows/hardware.h new file mode 100644 index 0000000000000000000000000000000000000000..35ee60ef1cc8a97d3bf9f25ea5d78fc5f20fcf97 --- /dev/null +++ b/data/Basic2/Windows/hardware.h @@ -0,0 +1,214 @@ +/* + * + * $Id: hardware.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * + * Runtime environment for the BASIC interpreter, the + * hardware configuration file. It contains all hardware + * related settings and dependencies. + * + * This is hardware.h for POSIX systems and the POSIX runtime + * environment runtime.c. + * + * Default setting is POSIX for most UNIXes including Mac. + * RASPPI activates Raspberry PI related features. + * MINGW activates windows related features. + * MSDOS for MSDOS compiles with tc 2.0 (untested in this version, last tested in 1.4) + * + */ + +#define MINGW +#undef MSDOS +#undef RASPPI +#undef POSIX + +/* + * Hardware flags of the POSIX systems + * POSIXTERMINAL, POSIXVT52TOANSI: ensure compatibility of BASIC programs + * control characters of BASIC are translated to ANSI, bringing the Aruino + * VT52 commands to POSIX + * POSIXSIGNALS: enables signal handling of ^C interrupting programs + * POSIXNONBLOCKING: non blocking I/O to handle GET and the BREAKCHAR + * tricky on DOS, not very portable, experimental, use signals instead + * POSIXFRAMEBUFFER: directly draw to the frame buffer of Raspberry PI + * only tested on this platform + * POSIXWIRE: simple Raspberry PI wire code + * POSIXMQTT: analogous to ARDUINOMQTT, send and receive MQTT messages (unfinished) + * POSIXWIRING: use the (deprectated) wiring code for gpio on Raspberry Pi + * POSIXPIGPIO: use the pigpio library on a Raspberry PI + */ + +#define POSIXTERMINAL +#define POSIXVT52TOANSI +#define POSIXSIGNALS +#undef POSIXNONBLOCKING +#undef POSIXFRAMEBUFFER +#undef POSIXWIRE +#undef POSIXMQTT +#undef POSIXWIRING +#undef POSIXPIGPIO + +/* simulates SPI RAM, only test code, keep undefed if you don't want to do something special */ +#undef SPIRAMSIMULATOR + +#ifdef SPIRAMSIMULATOR +#define USEMEMINTERFACE +#endif + +/* use a serial port as printer interface - unfinished - similar to Arduino */ +#define POSIXPRT + +/* use TAB in MS mode */ +#define HASMSTAB + +/* used pins and other parameters */ + +/* set this is you want pin 4 on low interrupting the interpreter */ +/* #define BREAKPIN 4 */ +#define BREAKPIN 4 + +/* the SIGNAL the interpreters listens to for interrupt */ +#define BREAKSIGNAL SIGINT + +/* in case of non blocking IO turn on background tasks */ +#ifdef POSIXNONBLOCKING +#define BASICBGTASK +#endif + +/* frame buffer health check - currently only supported on Raspberry */ +#ifndef RASPPI +#undef POSIXFRAMEBUFFER +#endif + +/* wire parameters for Raspberry*/ +#define POSIXI2CBUS 1 + +/* the size of the EEPROM dummy */ +#define EEPROMSIZE 1024 + +/* they all have this */ +#define FILESYSTEMDRIVER + +/* and they have this */ +#define HASCLOCK + +/* some have this */ +#if defined(POSIXWIRE) && defined(POSIXPIGPIO) +#define HASWIRE +#endif + +/* we can do graphics and tell language.h that we can */ +#ifdef POSIXFRAMEBUFFER +#define DISPLAYHASGRAPH +#endif + +/* after run behaviour on POSIX systems, 1 to terminate if started + on the command line with a file argument, 0 to stay active and + show a BASIC prompt*/ +#define TERMINATEAFTERRUN 1 + +/* + * all the things the POSIX platforms need to source + */ + +/* define all the types Arduino has for compatibility of the interface */ + +typedef unsigned char uint8_t; +typedef signed char int8_t; +typedef unsigned short uint16_t; +typedef signed short int16_t; +typedef unsigned char byte; +typedef unsigned long long uint64_t; +typedef unsigned int uint32_t; + +/* + * additional prototypes in an non Arduino world + */ +unsigned long millis(); + +/* the ususal suspects */ +#include +#include + +/* floating point maths only needed if HASFLOAT*/ +#include +#include + +/* time stuff */ +#include +#include +#include + +/* directories and files */ +#ifndef MSDOS +#include +#include +#else +#include +#include +#endif + +/* windowy things for windows */ +#ifdef MINGW +#include +#endif + +/* + * Tell BASIC we have a second serial port + */ +#ifdef POSIXPRT +#define HASSERIAL1 +#endif + +/* + * Tell BASIC we have a radio adapter + */ +#undef HASRF24 + +/* + * Tell BASIC we have MQTT + */ +#ifdef POSIXMQTT +#define HASMQTT +#endif + +/* we definitely don't run on an Arduino */ +#undef ARDUINOPROGMEM +#define PROGMEM +#undef ARDUINO + +/* and we use the buffer sizes for real computers */ +#define BUFSIZE 256 +#define STACKSIZE 256 +#define GOSUBDEPTH 64 +#define FORDEPTH 64 +#define LINECACHESIZE 64 + +/* the buffer size for simulated serial RAM */ +#define SPIRAMSBSIZE 512 + +/* + * This code measures the fast ticker frequency in microseconds + * Activate this only for test purposes. Not really useful on POSIX. + */ +#define FASTTICKERPROFILE + +/* + * Does the platform has command line args and do we want to use them + */ +#define HASARGS + +/* + * How restrictive are we on function recursive calls to protect the stack + * On Posix systems we can be more generous. + */ +#define FNLIMIT 128 + diff --git a/data/Basic2/Windows/language.h b/data/Basic2/Windows/language.h new file mode 100644 index 0000000000000000000000000000000000000000..8492230ef5cd518ed14196454a0bc60edcbd99ab --- /dev/null +++ b/data/Basic2/Windows/language.h @@ -0,0 +1,340 @@ +/* + * + * $Id: language.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's IoT BASIC interpreter + * + * See the licence file on + * https://github.com/slviajero/tinybasic for copyright/left. + * (GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007) + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * This is the language definition file. Edit this to set the language + * capabilities. + * + * MEMSIZE sets the BASIC main memory to a fixed value, + * if MEMSIZE=0 a heuristic is used based on free heap + * size and architecture parameters + */ +#define MEMSIZE 0 + +/* + * DEBUG switches on compiled debug mode. Consider using runtime + * debug with SET 0,x before using this. + */ +#define DEBUG 0 + +/* + * Interpreter feature sets, choose one of the predefines or undefine all predefines and set the + * features in custom settings + * + * BASICFULL: full language set, use this with flash >32kB - ESPs, MKRs, Mega2560, RP2040, UNO R4 + * BASICINTEGER: integer BASIC with full language, use this with flash >32kB + * BASICSIMPLE: integer BASIC with reduced language set, 32kB capable - for UNOs with a lot of device drivers + * BASICSIMPLEWITHFLOAT: a small floating point BASIC, 32kB capable, for UNOs - good for UNOs with the need of float + * BASICTINYWITHFLOAT: a floating point tinybasic, if you have 32kB and need complex device drivers + * BASICMINIMAL: minimal language, just Palo Alto plus Arduino I/O, works on 168 with 1kB RAM and 16kB flash + * + */ +#define BASICFULL +#undef BASICINTEGER +#undef BASICSIMPLE +#undef BASICMINIMAL +#undef BASICSIMPLEWITHFLOAT +#undef BASICTINYWITHFLOAT + +/* + * Custom settings undef all the the language sets above when you are using this. Not all language + * features work in all combinations. + * + * HASAPPLE1: Apple 1 BASIC compatibility. This is the base for all other features. + * In this version the interpreter has a heap, a string pool and one dimensional arrays. + * HASARDUINOIO: Arduino I/O functions, including millis() timer. + * HASFILEIO: file I/O functions, including open, close, read, write, remove, rename. + * HASTONE: tone() and noTone() functions for sound output mapped to the PLAY command. + * HASPULSE: pulseIn() function for measuring pulse lengths. Pulse output. Both mapped to the PULSE command. + * HASSTEFANSEXT: Stefan's BASIC extensions, including ELSE, PUT, GET, advanced FOR loops, SQR and POW. + * HASERRORMSG: error messages for syntax and runtime errors. + * HASVT52: VT52 terminal emulation for text output. + * HASFLOAT: floating point support. + * HASGRAPH: graphics support, including line, circle, rectangle, fill, color. + * HASDARTMOUTH: Dartmouth BASIC compatibility: single line DEF FN, ON, READ, DATA. + * HASDARKARTS: Dark Arts BASIC is MALLOC, FIND, CLR for individual variables and EVAL for self modifying code. + * HASIOT: IoT functions, Wire access, Sensor functions, MQTT. Needs strings and heap. STR, VAL, INSTR are + * part of this. MQTT support only on Arduino- + * HASMULTIDIM: two dimensional arrays and one dimensional string arrays. + * HASTIMER: timer functions, AFTER and EVERY for periodic execution of programs. + * HASEVENTS: event handling, EVENT command. + * HASERRORHANDLING: error handling with ERROR GOTO. + * HASSTRUCT: structured language elements, WHILE WEND, REPEAT UNTIL, SWITCH CASE. Multi line IF THEN ELSE + * with the DO DEND construct. + * HASMSSTRINGS: MS Basic compatible strings, RIGHT$, LEFT$, MID$, ASC, CHR$, and string addition with +. + * Compatibility to MS BASICs is limited as this BASIC has only inplace string operations- + * HASMULTILINEFUNCTIONS: multi line functions, DEF FN, FEND. + * HASEDITOR: line editor for the console. + * HASTINYBASICINPUT: Tiny BASIC compatible input using the expression parser. Expressions and variables + * are valid number input with it. Default now but can have odd side effects. + * HASLONGNAMES: long variable names, up to 16 characters. Name length is set by MAXNAME in basic.h and + * can be any value <128 bytes. Names are still only uppercase and all names will be uppercased by lexer. + * + */ + +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES + +/* + * + * Odd stuff - these things change the behaviour of BASIC in some aspects. + * They can be used to make the interpreter compatible with other dialects. + * + * POWERRIGHTTOLEFT: normally the ^ operator works from left to right + * which means 2^3^2 = (2^3)^2 = 8^2 = 64. Setting this flag would + * change the behaviour to 2^3^2 = 2^(3^2) = 512 + * MSARRAYLIMITS: in BASIC arrays start at 1 and DIM A(10) creates 10 + * elements. With MSARRAYLIMITS defined, arrays start at 0 and have + * n+1 elements. This can be changed at any time with SET 21,0 or 1. + * SUPPRESSSUBSTRINGS: switch off substring logic by default, makes only sense with + * HASMSSTRINGS activated. With this, the syntax of strings and string + * arrays is comaptible to MS strings (only used to preset the variable now). + * SET 20 can change this at runtime. + * USELONGJUMP: use the longjmp feature of C. This greatly simplifies + * error handling at the cost of portability to some MCU platforms + * currently only experimental. It costs memory for the jump buffer. + * Don't use it on very small systems. LONGJUMP must be set to 0 or 1 as + * it is used in boolean expression in the code + * BOOLEANMODE: switch the behaviour of BASICs boolean operators. Default (-1) + * is to cast all numbers to signed 16bit and then do bitwise arithemtic. + * In this mode false is 0 and -1 is true. (1) is C style boolean arithemtic. + * In this mode true is 1 and false is 0. AND and OR still do bitwise operations + * but NOT is C not. SET 19,1 or -1 can change this at runtime. + * HASFULLINSTR: the full C64 style INSTR command. Without this flag INSTR only accepts + * a single character as argument. This is much faster and leaner on an Arduino. + * This macro is activated when HASMSSTRINGS is set. + * + */ +#undef POWERRIGHTTOLEFT +#undef MSARRAYLIMITS +#undef SUPPRESSSUBSTRINGS +#define USELONGJUMP 0 +#define BOOLEANMODE -1 +#undef HASFULLINSTR + +/* Palo Alto plus Arduino functions */ +#ifdef BASICMINIMAL +#undef HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#undef HASSTEFANSEXT +#undef HASERRORMSG +#undef HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* all features minus float and tone */ +#ifdef BASICINTEGER +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#endif + +/* a simple integer basic for small systems (UNO etc) */ +#ifdef BASICSIMPLE +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#undef HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#define HASIOT +#undef HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* all features activated */ +#ifdef BASICFULL +#define HASAPPLE1 +#define HASARDUINOIO +#define HASFILEIO +#define HASTONE +#define HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#define HASVT52 +#define HASFLOAT +#define HASGRAPH +#define HASDARTMOUTH +#define HASDARKARTS +#define HASIOT +#define HASMULTIDIM +#define HASTIMER +#define HASEVENTS +#define HASERRORHANDLING +#define HASSTRUCT +#define HASMSSTRINGS +#define HASMULTILINEFUNCTIONS +#define HASEDITOR +#define HASTINYBASICINPUT +#define HASLONGNAMES +#endif + +/* a simple BASIC with float support */ +#ifdef BASICSIMPLEWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#define HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* a Tinybasic with float support */ +#ifdef BASICTINYWITHFLOAT +#define HASAPPLE1 +#define HASARDUINOIO +#undef HASFILEIO +#undef HASTONE +#undef HASPULSE +#define HASSTEFANSEXT +#define HASERRORMSG +#undef HASVT52 +#define HASFLOAT +#undef HASGRAPH +#undef HASDARTMOUTH +#undef HASDARKARTS +#undef HASIOT +#undef HASMULTIDIM +#undef HASTIMER +#undef HASEVENTS +#undef HASERRORHANDLING +#undef HASSTRUCT +#undef HASMSSTRINGS +#undef HASMULTILINEFUNCTIONS +#undef HASEDITOR +#define HASTINYBASICINPUT +#undef HASLONGNAMES +#endif + +/* + * Language feature dependencies + * + * Dartmouth and darkarts needs the heap which is in Apple 1 + * IoT needs strings and the heap, also Apple 1 + * + * String arrays need multi dimensional capabilities + * + * The structured language set needs ELSE from STEFANSEXT + * + */ +#if defined(HASMULTILINEFUNCTIONS) +#define HASDARTMOUTH +#endif + +#if defined(HASDARTMOUTH) || defined(HASDARKARTS) || defined(HASIOT) || defined(HASMSSTRINGS) +#define HASAPPLE1 +#endif + +#if defined(HASSTRUCT) +#define HASSTEFANSEXT +#endif + +/* MS strings also bring the full INSTR */ +#if defined(HASMSSTRINGS) +#define HASFULLINSTR +#endif + +/* dependencies on the hardware */ +#if !defined(DISPLAYHASGRAPH) +#undef HASGRAPH +#endif + + + diff --git a/data/Basic2/Windows/runtime.c b/data/Basic2/Windows/runtime.c new file mode 100644 index 0000000000000000000000000000000000000000..98c60b635fac67347ee6fcffd62cf7793b62a6b1 --- /dev/null +++ b/data/Basic2/Windows/runtime.c @@ -0,0 +1,2032 @@ +/* + * + * $Id: runtime.c,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * This is the Posix runtime environment for BASIC. It maps the functions + * needed for the various subsystems to the MCU specific implementations. + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + * + * Configure the hardware settings in hardware.h. + * + */ + +#include "hardware.h" +#include "runtime.h" + +/* a small character buffer to receive strings */ +#define CBUFSIZE 4 +char* cbuffer[CBUFSIZE]; + +/* if the BASIC interpreter provides a loop function it will superseed this one */ +#ifndef MSDOS +void __attribute__((weak)) bloop() {} +#else +void bloop() {} +#endif + + +/* + * Global variables of the runtime env. + */ + +int8_t id; // active input stream +int8_t od; // active output stream +int8_t idd = ISERIAL; // default input stream in interactive mode +int8_t odd = OSERIAL; // default output stream in interactive mode +int8_t ioer = 0; // the io error variable, always or-ed with ert in BASIC + +/* counts the outputed characters on streams 0-3, used to emulate a real tab */ +#ifdef HASMSTAB +uint8_t charcount[3]; /* devices 1-4 support tabing */ +#endif + +/* the pointer to the buffer used for the &0 device */ +char* nullbuffer = ibuffer; +uint16_t nullbufsize = BUFSIZE; + +/* the system type */ +#if defined(MSDOS) +uint8_t bsystype = SYSTYPE_MSDOS; +#elif defined(RASPPI) +uint8_t bsystype = SYSTYPE_PASPPI; +#elif defined(MINGW) +uint8_t bsystype = SYSTYPE_MINGW; +#elif defined(POSIX) +uint8_t bsystype = SYSTYPE_POSIX; +#else +uint8_t bsystype = SYSTYPE_UNKNOWN; +#endif + +/* libraries from OSes */ + +/* Wiring Code, which library to use */ +#ifdef POSIXWIRING +#include +#endif + +#ifdef POSIXPIGPIO +#include +#undef POSIXWIRING +int pigpio_pi = 0; +#endif + +/* + * Default serial baudrate and serial flags for the + * two supported serial interfaces. Serial is always active and + * connected to channel &1 with 9600 baud. + * + * channel 4 (POSIXPRT) can be either in character or block + * mode. Blockmode is set as default here. This means that all + * available characters are always loaded to a string -> inb() + */ +/* + * Arduino default serial baudrate and serial flags for the + * two supported serial interfaces. Set to 0 on POSIX OSes + */ +const uint16_t serial_baudrate = 0; +const uint16_t serial1_baudrate = 0; +uint8_t sendcr = 0; +uint8_t blockmode = 0; + +/* + * Input and output functions. + * + * ioinit(): called at setup to initialize what ever io is needed + * outch(): prints one ascii character + * inch(): gets one character (and waits for it) + * checkch(): checks for one character (non blocking) + * ins(): reads an entire line (uses inch except for pioserial) + * + */ +void ioinit() { + +/* a standalone system runs from keyboard and display */ +#ifdef STANDALONE + idd = IKEYBOARD; + odd = ODSP; +#endif + +/* run standalone on second serial, set the right parameters */ +#ifdef STANDALONESECONDSERIAL + idd = ISERIAL1; + odd = OPRT; + blockmode = 0; + sendcr = 0; +#endif + +/* signal handling - by default SIGINT which is ^C is always caught and + leads to program stop. Side effect: the interpreter cannot be stopped + with ^C, it has to be left with CALL 0, works on Linux, Mac and MINGW + but not on DOSBOX MSDOS as DOSBOS does not handle CTRL BREAK correctly + DOS can be interrupted with the CONIO mechanism using BREAKCHAR. +*/ + signalon(); + +/* this is only for RASPBERRY - wiring has to be started explicitly */ + wiringbegin(); + +/* all serial protocolls, ttl channels, SPI and Wire */ + serialbegin(); + +#ifdef POSIXPRT + prtbegin(); +#endif +#ifdef ARDUINOSPI + spibegin(); +#endif +#ifdef HASWIRE + wirebegin(); +#endif + +/* filesystems and networks */ + fsbegin(); +#ifdef POSIXMQTT + netbegin(); + mqttbegin(); +#endif + +/* the keyboards */ +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + kbdbegin(); +#endif +/* the displays */ +#if defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + dspbegin(); +#endif +#if defined(ARDUINOVGA) || defined(POSIXFRAMEBUFFER) + vgabegin(); /* mind this - the fablib code and framebuffer is special here */ +#endif +/* sensor startup */ +#ifdef ARDUINOSENSORS + sensorbegin(); +#endif +/* clocks and time */ +#if defined(HASCLOCK) + rtcbegin(); +#endif + +/* the eeprom dummy */ + ebegin(); + +/* activate the iodefaults */ + iodefaults(); +} + +void iodefaults() { + od=odd; + id=idd; +} + +/* + * Layer 0 - The generic IO code + * + * inch() reads one character from the stream, mostly blocking + * checkch() reads one character from the stream, unblocking, a peek(), + * inmplemented inconsistently + * availch() checks availablibity in the stream + * inb() a block read function for serial interfacing, developed for + * AT message receiving + */ + +/* this is odd ;-) */ +int cheof(int c) { if ((c == -1) || (c == 255)) return 1; else return 0; } + +/* the generic inch code reading one character from a stream */ +char inch() { + switch(id) { + case ONULL: + return bufferread(); + case ISERIAL: + return serialread(); +#ifdef POSIXPRT + case ISERIAL1: + return prtread(); +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) + case IKEYBOARD: +#if defined(HASVT52) + if (vt52avail()) return vt52read(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdread(); +#endif +#endif +#if defined(HASWIRE) && defined(HASFILEIO) + case IWIRE: + return wireread(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioread(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttread(); +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileread(); +#endif + } + return 0; +} + +/* + * checking on a character in the stream, this is + * normally only used for interrupting a program, + * for many streams this is just mapped to avail + */ +char checkch(){ + switch (id) { + case ONULL: + return buffercheckch(); + case ISERIAL: + return serialcheckch(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttcheckch(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return 0; +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtcheckch(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdcheckch(); /* here no display read as this is only for break and scroll control */ +#endif + break; + } + return 0; +} + +/* character availability */ +uint16_t availch(){ + switch (id) { + case ONULL: + return bufferavailable(); + case ISERIAL: + return serialavailable(); +#ifdef FILESYSTEMDRIVER + case IFILE: + return fileavailable(); +#endif +#ifdef HASRF24 + case IRADIO: + return radioavailable(); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttavailable(); +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case IWIRE: + return wireavailable(); +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtavailable(); +#endif + case IKEYBOARD: +#if defined(HASKEYBOARD) || defined(HASKEYPAD) || defined(HASVT52) +#if defined(HASVT52) + if (vt52avail()) return vt52avail(); /* if the display has a message, read it */ +#endif +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + return kbdavailable(); +#endif +#endif + break; + } + return 0; +} + +/* + * the block mode reader for esp and sensor modules + * on a serial interface, it tries to read as many + * characters as possible into a buffer + * blockmode = 1 reads once availch() bytes + * blockmode > 1 implements a timeout mechanism and tries + * to read until blockmode milliseconds have expired + * this is needed for esps and other sensors without + * flow control and volatile timing to receive more + * then 64 bytes + */ + +uint16_t inb(char *b, int16_t nb) { + long m; + uint16_t z; + int16_t i = 0; // check this + + if (blockmode == 1) { + i=availch(); + if (i>nb-1) i=nb-1; + b[0]=(unsigned char)i; + z=i; + b[i+1]=0; + b++; + while (i--) {*b++=inch();} + } else if (blockmode > 1) { + m=millis(); + while (i < nb-1) { + if (availch()) b[++i]=inch(); + if (millis() > m+blockmode) break; + } + b[0]=(unsigned char)i; + z=i; + b[i+1]=0; + } else { + b[0]=0; + z=0; + b[1]=0; + } + return z; +} + +/* + * reading from the console with inch, local echo is handled by the terminal + */ +uint16_t consins(char *b, uint16_t nb) { + char c; + uint16_t z; + + z=1; + while(z < nb) { + c=inch(); + if (c == '\r') c=inch(); + if (c == '\n' || cheof(c)) { /* terminal character is either newline or EOF */ + break; + } else { + b[z++]=c; + } + } + b[z]=0x00; + z--; + b[0]=(unsigned char)z; + return z; +} + + +/* + * ins() is the generic reader into a string, by default + * it works in line mode and ends reading after newline + * + * the first element of the buffer is the lower byte of the length + * + * this is corrected later in xinput, z.a has to be set as + * a side effect + * + * for streams providing entire strings as an input the + * respective string method is called + * + * all other streams are read using consins() for character by character + * input until a terminal character is reached + */ +uint16_t ins(char *b, uint16_t nb) { + switch(id) { + case ONULL: + return bufferins(b, nb); + case ISERIAL: + return serialins(b, nb); + break; +#if defined(HASKEYBOARD) || defined(HASKEYPAD) + case IKEYBOARD: + return kbdins(b, nb); +#endif +#ifdef POSIXPRT + case ISERIAL1: + return prtins(b, nb); + #endif +#if defined(HASWIRE) && defined(HASFILEIO) + case IWIRE: + return wireins(b, nb); +#endif +#ifdef HASRF24 + case IRADIO: + return radioins(b, nb); +#endif +#ifdef POSIXMQTT + case IMQTT: + return mqttins(b, nb); +#endif +#ifdef FILESYSTEMDRIVER + case IFILE: + return consins(b, nb); +#endif + default: + b[0]=0; b[1]=0; + return 0; + } +} + +/* + * outch() outputs one character to a stream + * block oriented i/o like in radio not implemented here + */ +void outch(char c) { + +/* do we have a MS style tab command, then count characters on stream 1-4 but not in fileio */ +/* this does not work for control characters - needs to go to vt52 later */ + +#ifdef HASMSTAB + if (od > 0 && od <= OPRT) { + if (c > 31) charcount[od-1]+=1; + if (c == 10) charcount[od-1]=0; + } +#endif + + switch(od) { + case ONULL: + bufferwrite(c); + break; + case OSERIAL: + serialwrite(c); + break; +#ifdef POSIXPRT + case OPRT: + prtwrite(c); + break; +#endif +#ifdef FILESYSTEMDRIVER + case OFILE: + filewrite(c); + break; +#endif +#if defined(ARDUINOVGA) + case ODSP: + vgawrite(c); + break; +#elif defined(DISPLAYDRIVER) || defined(GRAPHDISPLAYDRIVER) + case ODSP: + dspwrite(c); + break; +#endif +#ifdef POSIXMQTT + case OMQTT: + mqttwrite(c); /* buffering for the PRINT command */ + break; +#endif + default: + break; + } + byield(); /* yield after every character for ESP8266 */ +} + +/* + * outs() outputs a string of length x at index ir - basic style + * default is a character by character operation, block + * oriented write needs special functions + */ +void outs(char *ir, uint16_t l){ + uint16_t i; + + switch (od) { +#ifdef HASRF24 + case ORADIO: + radioouts(ir, l); + break; +#endif +#if (defined(HASWIRE) && defined(HASFILEIO)) + case OWIRE: + wireouts(ir, l); + break; +#endif +#ifdef POSIXMQTT + case OMQTT: + mqttouts(ir, l); + break; +#endif +#ifdef GRAPHDISPLAYDRIVER + case ODSP: + dspouts(ir, l); + break; +#endif + default: + for(i=0; i +uint8_t breaksignal = 0; + +/* simple signal handler */ +void signalhandler(int sig){ + breaksignal=1; + signal(BREAKSIGNAL, signalhandler); +} + +/* activate signal handling */ +void signalon() { + signal(BREAKSIGNAL, signalhandler); +} + +/* deactivate signal handling unused and not yet done*/ +void signaloff() {} + +#endif + +/* + * helper functions OS, heuristic on how much memory is available in BASIC + */ +long freememorysize() { +#ifdef MSDOS + return 48000; +#else + return 65536; +#endif +} + +long freeRam() { + return freememorysize(); +} + +/* + * the sleep and restart functions + */ +void restartsystem() { exit(0);} +void activatesleep(long t) {} + +/* + * start the SPI bus + */ +void spibegin() {} + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + */ +const int dsp_rows=0; +const int dsp_columns=0; +void dspsetupdatemode(uint8_t c) {} +void dspwrite(char c){} +void dspbegin() {} +uint8_t dspstat(uint8_t c) {return 0; } +char dspwaitonscroll() { return 0; } +uint8_t dspactive() {return 0; } +void dspsetscrollmode(uint8_t c, uint8_t l) {} +void dspsetcursor(uint8_t c) {} + +#ifndef POSIXFRAMEBUFFER +/* these are the graphics commands */ +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) {} +void vgacolor(uint8_t c) {} +void plot(int x, int y) {} +void line(int x0, int y0, int x1, int y1) {} +void rect(int x0, int y0, int x1, int y1) {} +void frect(int x0, int y0, int x1, int y1) {} +void circle(int x0, int y0, int r) {} +void fcircle(int x0, int y0, int r) {} + +/* stubs for the vga code part analogous to ESP32 */ +void vgabegin(){} +void vgawrite(char c){} +#else +/* + * This is the first draft of the linux framebuffer code + * currently very raw, works only if the framebuffer is 24 bit + * very few checks, all kind of stuff can go wrong here. + * + * Main ideas and some part of the code came from this + * article https://www.mikrocontroller.net/topic/379335 + * by Andy W. + * + * Bresenham's algorithm came from the Wikipedia article + * and this very comprehensive discussion + * http://members.chello.at/~easyfilter/bresenham.html + * by Alois Zingl from the Vienna Technikum. I also recommend + * his thesis: http://members.chello.at/%7Eeasyfilter/Bresenham.pdf + * + */ +#include +#include +#include +#include +#include + +/* 'global' variables to store screen info */ +char *framemem = 0; +int framedesc = 0; + +/* info from the frame buffer itself */ +struct fb_var_screeninfo vinfo; +struct fb_fix_screeninfo finfo; +struct fb_var_screeninfo orig_vinfo; + +/* the color variable of the frame buffer */ +long framecolor = 0xffffff; +int framevgacolor = 0x0f; +long framescreensize = 0; +int framecolordepth = 0; + +/* prepare the framebuffer device */ +void vgabegin() { + +/* see if we can open the framebuffer device */ + framedesc = open("/dev/fb0", O_RDWR); + if (!framedesc) { + printf("** error opening frame buffer \n"); + return; + } + +/* now get the variable info of the screen */ + if (ioctl(framedesc, FBIOGET_VSCREENINFO, &vinfo)) { + printf("** error reading screen information \n"); + return; + } + printf("Detected screen %dx%d, %dbpp \n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel); + +/* BASIC currently does 24 bit color only */ + memcpy(&orig_vinfo, &vinfo, sizeof(struct fb_var_screeninfo)); +/* + vinfo.bits_per_pixel = 24; + if (ioctl(framedesc, FBIOPUT_VSCREENINFO, &vinfo)) { + printf("** error setting variable information \n"); + return; + } +*/ + +/* how much color have we got */ + framecolordepth = vinfo.bits_per_pixel; + +/* get the fixed information of the screen */ + if (ioctl(framedesc, FBIOGET_FSCREENINFO, &finfo)) { + printf("Error reading fixed information.\n"); + return; + } + +/* now ready to memory map the screen - evil, we assume 24 bit without checking */ + + framescreensize = (framecolordepth/8) * vinfo.xres * vinfo.yres; + framemem = (char*)mmap(0, framescreensize, PROT_READ | PROT_WRITE, MAP_SHARED, framedesc, 0); + if ((int)framemem == -1) { + printf("** error failed to mmap.\n"); + framemem=0; + return; + } + +/* if all went well we have valid non -1 framemem and can continue */ +} + +/* this function does not exist in the ESP32 world because we don't care there */ +void vgaend() { + if ((int)framemem) munmap(framemem, framescreensize); + if (ioctl(framedesc, FBIOPUT_VSCREENINFO, &orig_vinfo)) { + printf("** error re-setting variable information \n"); + } + close(framedesc); +} + +/* set the color variable depending on the color depth*/ +void rgbcolor(uint8_t r, uint8_t g, uint8_t b) { + switch (framecolordepth/8) { + case 4: + framecolor = (((long)r << 16) & 0x00ff0000) | (((long)g << 8) & 0x0000ff00) | ((long)b & 0x000000ff); /* untested */ + break; + case 3: + framecolor = (((long)r << 16) & 0x00ff0000) | (((long)g << 8) & 0x0000ff00) | ((long)b & 0x000000ff); + break; + case 2: + framecolor = ((long) (r & 0xff) >> 3) << 10 | ((long) (g & 0xff) >> 2) << 6 | ((long) (b & 0xff) >> 3); /* untested */ + break; + case 1: + framecolor = ((long) (r & 0xff) >> 5) << 5 | ((long) (g & 0xff) >> 5) << 2 | ((long) (b & 0xff) >> 6); /* untested */ + break; + } +} + +/* this is taken from the Arduino TFT code */ +void vgacolor(uint8_t c) { + short base=128; + framevgacolor=c; + if (c==8) { rgbcolor(64, 64, 64); return; } + if (c>8) base=255; + rgbcolor(base*(c&1), base*((c&2)/2), base*((c&4)/4)); +} + +/* plot directly into the framebuffer */ +void plot(int x, int y) { + unsigned long pix_offset; + +/* is everything in range, no error here */ + if (x < 0 || y < 0 || x >= vinfo.xres || y >= vinfo.yres) return; + +/* find the memory location */ + pix_offset = (framecolordepth/8) * x + y * finfo.line_length; + + if (pix_offset < 0 || pix_offset+ (framecolordepth/8-1) > framescreensize) return; + +/* write to the buffer */ + switch (framecolordepth/8) { + case 4: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 8) & 0x000000ff); + *((char*)(framemem + pix_offset+3)) = (unsigned char)((framecolor >> 16) & 0x000000ff); + break; + case 3: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 8) & 0x000000ff); + *((char*)(framemem + pix_offset+2)) = (unsigned char)((framecolor >> 16) & 0x000000ff); + break; + case 2: + *((char*)(framemem + pix_offset )) = (unsigned char)((framecolor & 0x1f) + (((framecolor >> 5) & 0x03) << 6)); + *((char*)(framemem + pix_offset+1)) = (unsigned char)((framecolor >> 7) & 0xff); + break; + case 1: + *((char*)(framemem + pix_offset )) = (unsigned char)(framecolor & 0x000000ff); + break; + } + +} + +/* Bresenham's algorith from Wikipedia */ +void line(int x0, int y0, int x1, int y1) { + int dx, dy, sx, sy; + int error, e2; + + dx=abs(x0-x1); + sx=x0 < x1 ? 1 : -1; + dy=-abs(y1-y0); + sy=y0 < y1 ? 1 : -1; + error=dx+dy; + + while(1) { + plot(x0, y0); + if (x0 == x1 && y0 == y1) break; + e2=2*error; + if (e2 > dy) { + if (x0 == x1) break; + error=error+dy; + x0=x0+sx; + } + if (e2 <= dx) { + if (y0 == y1) break; + error=error+dx; + y0=y0+sy; + } + } +} + +/* rects could also be drawn with hline and vline */ +void rect(int x0, int y0, int x1, int y1) { + line(x0, y0, x1, y0); + line(x1, y0, x1, y1); + line(x1, y1, x0, y1); + line(x0, y1, x0, y0); +} + +/* filled rect, also just using line right now */ +void frect(int x0, int y0, int x1, int y1) { + int dx, sx; + int x; + sx=x0 < x1 ? 1 : -1; + for(x=x0; x != x1; x=x+sx) line(x, y0, x, y1); +} + +/* Bresenham for circles, based on Alois Zingl's work */ +void circle(int x0, int y0, int r) { + int x, y, err; + x=-r; + y=0; + err=2-2*r; + do { + plot(x0-x, y0+y); + plot(x0-y, y0-x); + plot(x0+x, y0-y); + plot(x0+y, y0+x); + r=err; + if (r <= y) err+=++y*2+1; + if (r > x || err > y) err+=++x*2+1; + } while (x < 0); +} + +/* for filled circles draw lines instead of points */ +void fcircle(int x0, int y0, int r) { + int x, y, err; + x=-r; + y=0; + err=2-2*r; + do { + line(x0-x, y0+y, x0+x, y0+y); + line(x0+x, y0-y, x0-x, y0-y); + r=err; + if (r <= y) err+=++y*2+1; + if (r > x || err > y) err+=++x*2+1; + } while (x < 0); +} + +/* not needed really, now, later yes ;-) */ +void vgawrite(char c) {} +#endif + +/* + * Keyboard code stubs + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ +void kbdbegin() {} +uint8_t kbdstat(uint8_t c) {return 0; } +uint8_t kbdavailable(){ return 0;} +char kbdread() { return 0;} +char kbdcheckch() { return 0;} + +/* vt52 code stubs - unused here - needed for basic.c */ +uint8_t vt52avail() {return 0;} +char vt52read() { return 0; } + +/* Display driver would be here, together with vt52 */ + +/* + * Real Time clock code + */ + +void rtcbegin() {} + +uint16_t rtcget(uint8_t i) { + struct timeb thetime; + struct tm *ltime; + ftime(&thetime); + ltime=localtime(&thetime.time); + switch (i) { + case 0: + return ltime->tm_sec; + case 1: + return ltime->tm_min; + case 2: + return ltime->tm_hour; + case 3: + return ltime->tm_wday; + case 4: + return ltime->tm_mday; + case 5: + return ltime->tm_mon+1; + case 6: + return ltime->tm_year-100; + default: + return 0; + } +} + +void rtcset(uint8_t i, uint16_t v) {} + +/* + * Wifi and MQTT code + */ +#ifndef POSIXMQTT +void netbegin() {} +uint8_t netconnected() { return 0; } +void mqttbegin() {} +uint8_t mqttstat(uint8_t c) {return 0; } +uint8_t mqttstate() {return 0;} +void mqttsubscribe(const char *t) {} +void mqttsettopic(const char *t) {} +void mqttouts(const char *m, uint16_t l) {} +uint16_t mqttins(char *b, uint16_t nb) { return 0; }; +char mqttread() {return 0;}; +#else +/* we use mosquitto */ +#include +/* we assume to be on the network */ +void netbegin() {} +uint8_t netconnected() { return 1; } +/* the mqtt code */ +void mqttbegin() {} +uint8_t mqttstat(uint8_t c) {return 0; } +uint8_t mqttstate() {return 0;} +void mqttsubscribe(const char *t) {} +void mqttsettopic(const char *t) {} +void mqttouts(const char *m, uint16_t l) {} +uint16_t mqttins(char *b, uint16_t nb) { return 0; }; +char mqttread() {return 0;}; +#endif + +/* + * EEPROM handling, these function enable the @E array and + * loading and saving to EEPROM with the "!" mechanism + * a filesystem based dummy + */ +int8_t eeprom[EEPROMSIZE]; +void ebegin(){ + int i; + FILE* efile; + for (i=0; i=0 && a=0 && a YIELDINTERVAL-1) { + yieldfunction(); + lastyield=millis(); + } + +/* yield every second */ + if (millis()-lastlongyield > LONGYIELDINTERVAL-1) { + longyieldfunction(); + lastlongyield=millis(); + } + #endif + + /* call the background task scheduler on some platforms implemented in hardware-* */ + yieldschedule(); +} + +/* delay must be implemented to use byield() while waiting */ +void bdelay(uint32_t t) { + unsigned long i; + if (t>0) { + i=millis(); + while (millis() < i+t) byield(); + } +} + +/* fastticker is the hook for all timing functions */ +void fastticker() { +/* fastticker profiling test code */ +#ifdef FASTTICKERPROFILE + fasttickerprofile(); +#endif +/* toggle the tone pin */ +#ifdef ARDUINOTONEEMULATION + tonetoggle(); +#endif +} + +/* everything that needs to be done often - 32 ms */ +void yieldfunction() {} + +/* everything that needs to be done not so often - 1 second */ +void longyieldfunction() { +#ifdef BASICBGTASK +/* polling for the BREAKCHAR */ +#ifdef POSIXNONBLOCKING + if (checkch() == BREAKCHAR) breakcondition=1; +#endif +#endif +} + +void yieldschedule() {} + +/* + * The file system driver - all methods needed to support BASIC fs access + * MSDOS to be done + * + * file system code is a wrapper around the POSIX API + */ +void fsbegin() {} +FILE* ifile; +FILE* ofile; +#ifndef MSDOS +DIR* root; +struct dirent* file; +#else +void* root; +void* file; +#endif + +/* POSIX OSes always have filesystems */ +uint8_t fsstat(uint8_t c) { return 1; } + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char c) { + if (ofile) + fputc(c, ofile); + else + ioer=1; +} + +char fileread(){ + char c; + if (ifile) c=fgetc(ifile); else { ioer=1; return 0; } + if (cheof(c)) ioer=-1; + return c; +} + +uint8_t ifileopen(const char* filename){ + ifile=fopen(filename, "r"); + return ifile!=0; +} + +void ifileclose(){ + if (ifile) fclose(ifile); + ifile=0; +} + +uint8_t ofileopen(const char* filename, const char* m){ + ofile=fopen(filename, m); + return ofile!=0; +} + +void ofileclose(){ + if (ofile) fclose(ofile); + ofile=0; +} + +int fileavailable(){ return !feof(ifile); } + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +#ifdef MSDOS +#include +#include +struct ffblk *bffblk; +#endif + +void rootopen() { +#ifndef MSDOS + root=opendir ("./"); +#else + (void) findfirst("*.*", bffblk, 0); +#endif +} + +uint8_t rootnextfile() { +#ifndef MSDOS + file = readdir(root); + return (file != 0); +#else + return (findnext(bffblk) == 0); +#endif +} + +uint8_t rootisfile() { +#if !defined(MSDOS) && !defined(MINGW) + return (file->d_type == DT_REG); +#else + return 1; +#endif +} + +const char* rootfilename() { +#ifndef MSDOS + return (file->d_name); +#else + return (bffblk->ff_name); +#endif +} + +uint32_t rootfilesize() { +#ifndef MSDOS + return 0; +#else + return (bffblk->ff_fsize); +#endif +} + +void rootfileclose() {} +void rootclose(){ +#ifndef MSDOS + (void) closedir(root); +#endif +} + +/* + * remove method for files + */ +void removefile(const char *filename) { + remove(filename); +} + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(uint8_t i) { + puts("Format not implemented on this platform."); +} + +/* + * The buffer code, a simple buffer to store output and + * input data. It can be used as a device in BASIC using the + * modifier &0. + */ + +/* use the input buffer variable from BASIC here, it is extern to runtime */ +void bufferbegin() {} + +/* write to the buffer, works only until 127 + uses vt52 style commands to handle the buffer content*/ +void bufferwrite(char c) { + if (!nullbuffer) return; + switch (c) { + case 12: /* clear screen */ + nullbuffer[nullbuffer[0]+1]=0; + nullbuffer[0]=0; + break; + case 10: + case 13: /* cr and lf ignored */ + break; + case 8: /* backspace */ + if (nullbuffer[0]>0) nullbuffer[0]--; + break; + default: + if (nullbuffer[0] < nullbufsize-1 && nullbuffer[0] < 127) { + nullbuffer[++nullbuffer[0]]=c; + nullbuffer[nullbuffer[0]+1]=0; /* null terminate */ + } + break; + } +} + +/* read not needed right now */ +char bufferread() { return 0; } +uint16_t bufferavailable() { return 0; } +char buffercheckch() { return 0; } +void bufferflush() { } +uint16_t bufferins(char *b, uint16_t nb) { return 0; } + +/* + * Primary serial code, if NONBLOCKING is set, + * platform dependent I/O is used. This means that + * UNIXes use fcntl() to implement a serialcheckch + * and MSDOS as well als WIndows use kbhit(). + * This serves only to interrupt programs with + * BREAKCHAR at the moment. + */ +#ifdef POSIXNONBLOCKING +#if !defined(MSDOS) && !defined(MINGW) +#include + +/* we need to poll the serial port in non blocking mode + this slows it down so that we don't block an entire core + read speed here is one character per millisecond which + is 8000 baud, no one can type that fast but tedious when + from stdin */ +/* +void freecpu() { + struct timespec intervall; + struct timespec rtmp; + intervall.tv_sec=0; + intervall.tv_nsec=1000000; + nanosleep(&intervall, &rtmp); +} +*/ + +/* for non blocking I/O try to modify the stdin file descriptor */ +void serialbegin() { +/* we keep I/O mostly blocking here */ +/* + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); +*/ +} + +/* get and unget the character in a non blocking way */ +char serialcheckch(){ + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); + int ch=getchar(); + ungetc(ch, stdin); + fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); + return ch; +} + +/* check EOF, don't use feof()) here */ +uint16_t serialavailable() { + if (cheof(serialcheckch())) return 0; else return 1; +} + +/* two versions of serialread */ +char serialread() { + char ch; +/* blocking to let the OS handle the wait - this means: no call to byield() in interaction */ + ch=getchar(); + return ch; +/* this is the code that waits - calls byield() often just like on the Arduino */ +/* + while (cheof(serialcheckch())) { byield(); freecpu(); } + return getchar(); +*/ +} + +/* flushes the serial code in non blocking mode */ +void serialflush() { + fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); + while (!cheof(getchar())); + fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); +} +#else +/* the non blocking MSDOS and MINGW code */ +#include +/* we go way back in time here and do it like DOS did it */ +void serialbegin(){} + +/* we go through the terminal on read */ +char serialread() { + return getchar(); +} + +/* check if a key is hit, get it and return it */ +char serialcheckch(){ + if (kbhit()) return getch(); +} + +/* simple version */ +uint16_t serialavailable() { + return 1; +} + +/* simple version */ +void serialflush() { } + +#endif +#else +/* the blocking code only uses puchar and getchar */ +void serialbegin(){} +char serialread() { return getchar(); } +char serialcheckch(){ return 1; } +uint16_t serialavailable() { return 1; } +void serialflush() {} +#endif + +uint8_t serialstat(uint8_t c) { + if (c == 0) return 1; + if (c == 1) return serial_baudrate/1000; + return 0; +} + +/* send the CSI sequence to start with ANSI */ +void sendcsi() { + putchar(27); putchar('['); /* CSI */ +} + +/* the vt52 state engine */ +#ifdef POSIXVT52TOANSI +#include +uint8_t dspesc = 0; +uint8_t vt52s = 0; +int cursory = 0; +uint8_t vt52active = 1; + +/* something little */ +uint8_t vt52number(char c) { + uint8_t b=c; + if (b>31) return b-32; else return 0; +} + +/* set the cursor */ +void dspsetcursory(uint8_t i) { + cursory=i; +} + +/* remember the position */ +void dspsetcursorx(uint8_t i) { + sendcsi(); + printf("%d;%dH", abs(cursory)+1, i+1); +} + +/* set colors, vga here */ +void dspsetfgcolor(uint8_t co) { + sendcsi(); + if (co < 8) { + putchar('3'); + } else { + putchar('9'); + co=co-8; + } + putchar('0'+co); + putchar('m'); +} + +void dspsetbgcolor(uint8_t co) { + sendcsi(); + if (co < 8) { + putchar('4'); + } else { + putchar('1'); putchar('0'); + co=co-8; + } + putchar('0'+co); + putchar('m'); +} + +/* vt52 state engine, a smaller version of the Arduino code*/ +void dspvt52(char* c){ + +/* reading and processing multi byte commands */ + switch (vt52s) { + case 'Y': + if (dspesc == 2) { + dspsetcursory(vt52number(*c)); + dspesc=1; + *c=0; + return; + } + if (dspesc == 1) { + dspsetcursorx(vt52number(*c)); + *c=0; + } + vt52s=0; + break; + case 'b': + dspsetfgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + case 'c': + dspsetbgcolor(vt52number(*c)); + *c=0; + vt52s=0; + break; + } + +/* commands of the terminal in text mode */ + switch (*c) { + case 'v': /* GEMDOS / TOS extension enable wrap */ + break; + case 'w': /* GEMDOS / TOS extension disable wrap */ + break; + case '^': /* Printer extensions - print on */ + break; + case '_': /* Printer extensions - print off */ + break; + case 'W': /* Printer extensions - print without display on */ + break; + case 'X': /* Printer extensions - print without display off */ + break; + case 'V': /* Printer extensions - print cursor line */ + break; + case ']': /* Printer extension - print screen */ + break; + case 'F': /* enter graphics mode */ + break; + case 'G': /* exit graphics mode */ + break; + case 'Z': // Ident + break; + case '=': // alternate keypad on + case '>': // alternate keypad off + break; + case 'b': // GEMDOS / TOS extension text color + case 'c': // GEMDOS / TOS extension background color + vt52s=*c; + dspesc=1; + *c=0; + return; + case 'e': // GEMDOS / TOS extension enable cursor + break; + case 'f': // GEMDOS / TOS extension disable cursor + break; + case 'p': // GEMDOS / TOS extension reverse video + break; + case 'q': // GEMDOS / TOS extension normal video + break; + case 'A': // cursor up + sendcsi(); + putchar('A'); + break; + case 'B': // cursor down + sendcsi(); + putchar('B'); + break; + case 'C': // cursor right + sendcsi(); + putchar('C'); + break; + case 'D': // cursor left + sendcsi(); + putchar('D'); + break; + case 'E': // GEMDOS / TOS extension clear screen + *c=12; + dspesc=0; + return; + case 'H': // cursor home + *c=2; + dspesc=0; + return; + case 'Y': // Set cursor position + vt52s='Y'; + dspesc=2; + *c=0; + return; + case 'J': // clear to end of screen + sendcsi(); + putchar('J'); + break; + case 'd': // GEMDOS / TOS extension clear to start of screen + sendcsi(); + putchar('1'); putchar('J'); + break; + case 'K': // clear to the end of line + sendcsi(); + putchar('K'); + break; + case 'l': // GEMDOS / TOS extension clear line + sendcsi(); + putchar('2'); putchar('K'); + break; + case 'o': // GEMDOS / TOS extension clear to start of line + sendcsi(); + putchar('1'); putchar('K'); + break; + case 'k': // GEMDOS / TOS extension restore cursor + break; + case 'j': // GEMDOS / TOS extension save cursor + break; + case 'I': // reverse line feed + putchar(27); + putchar('M'); + break; + case 'L': // Insert line + break; + case 'M': // Delete line - questionable + sendcsi(); + putchar('2'); putchar('K'); + break; + } + dspesc=0; + *c=0; +} +#endif + + +uint16_t serialins(char* b, uint16_t nb) { return consins(b, nb); } + +void serialwrite(char c) { + +/* the vt52 state engine */ +#ifdef POSIXVT52TOANSI + if (dspesc) { + dspvt52(&c); + if (c == 0) return; + } + +/* ESC is caught here and we only listen to VT52 not to ANSI */ + if (c == 27 && vt52active) { + dspesc=1; + return; + } +#endif + +/* this is the character translation routine to convert the Arduino + style characters 12 for CLS and 2 for HOME to ANSI, makes + BASIC programs more compatible */ +#ifdef POSIXTERMINAL + switch (c) { +/* form feed is clear screen - compatibility with Arduino code */ + case 12: + sendcsi(); + putchar('2'); putchar('J'); +/* home sequence in the arduino code */ + case 2: + sendcsi(); + putchar('H'); + return; + } +#endif + +/* finally send the plain character */ + putchar(c); +} + +/* + * handling the second serial interface - only done on Mac so far + * test code + * + * Tried to learn from https://www.pololu.com/docs/0J73/15.5 + * + */ +#ifdef POSIXPRT +#include +#if !defined(MSDOS) && !defined(MINGW) +#include +#endif + +/* the file name of the printer port */ +int prtfile; + +/* the buffer to read one character */ +char prtbuf = 0; + + +void prtbegin() {} + +char prtopen(char* filename, uint16_t mode) { +#if !defined(MSDOS) && !defined(MINGW) + +/* try to open the device file */ + prtfile=open(filename, O_RDWR | O_NOCTTY); + if (prtfile == -1) { + perror(filename); + return 0; + } + +/* get rid of garbage */ + tcflush(prtfile, TCIOFLUSH); + +/* configure the device */ + struct termios opt; + (void) tcgetattr(prtfile, &opt); + + +/* raw terminal settings + opt.c_iflag &= ~(INLCR | IGNCR | ICRNL | IXON | IXOFF); + opt.c_oflag &= ~(ONLCR | OCRNL); + opt.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); +*/ + +/* timeout settings on read 100ms, read every character */ + opt.c_cc[VTIME] = 1; + opt.c_cc[VMIN] = 0; + +/* set the baudrate */ + switch (mode) { + case 9600: + cfsetospeed(&opt, B9600); + break; + default: + cfsetospeed(&opt, B9600); + break; + } + cfsetispeed(&opt, cfgetospeed(&opt)); + +/* set the termin attributes */ + tcsetattr(prtfile, TCSANOW, &opt); +#endif + + return 1; +} + +void prtclose() { + if (prtfile) close(prtfile); +} + +uint8_t prtstat(uint8_t c) {return 1; } + +void prtset(uint32_t s) {} + +/* write the characters byte by byte */ +void prtwrite(char c) { + int i=write(prtfile, &c, 1); + if (i != 1) ioer=1; +} + +/* read just one byte, map no bytes to EOF = -1 */ +char prtread() { + char c; + +/* something in the buffer? return it! */ + if (prtbuf) { + c=prtbuf; + prtbuf=0; + } else { +/* try to read */ + int i=read(prtfile, &c, 1); + if (i < 0) { + ioer=1; + return 0; + } + if (i == 0) return -1; + } + return c; +} + +/* not yet implemented */ +char prtcheckch(){ + if (!prtbuf) { /* try to read */ + int i=read(prtfile, &prtbuf, 1); + if (i <= 0) prtbuf=0; + } + return prtbuf; +} + +uint16_t prtavailable(){ + return prtcheckch()!=0; +} + +uint16_t prtins(char* b, uint16_t nb) { + if (blockmode > 0) return inb(b, nb); else return consins(b, nb); +} + +#else +void prtbegin() {} +uint8_t prtstat(uint8_t c) {return 0; } +void prtset(uint32_t s) {} +void prtwrite(char c) {} +char prtread() {return 0;} +char prtcheckch(){ return 0; } +uint16_t prtavailable(){ return 0; } +uint16_t prtins(char* b, uint16_t nb) { return 0; } +#endif + + +/* + * The wire code + */ +#if defined(POSIXWIRE) && defined(POSIXPIGPIO) +uint8_t wire_slaveid = 0; + +/* open the wire connection in pigpio */ +void wirebegin() { +} + +/* we return the handle here, inconsistent with the Arduino code */ +uint8_t wirestat(uint8_t c) { + return 1; +} + +void wireopen(char s, uint8_t m) { + if (m == 0) { + wire_slaveid=s; + } else if ( m == 1 ) { + outsc("** wire slave mode not implemented"); outcr(); + } else + error(EORANGE); +} + + +/* read a number of bytes, depending on the string length */ +uint16_t wireins(char *b, uint8_t l) { + int handle; + int16_t z; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, wire_slaveid, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + } + + z=i2c_read_device(pigpio_pi, handle, b+1, l); + + if (z < 0) { + ioer=-1; + z=0; + } + b[0]=z; + + i2c_close(pigpio_pi, handle); + + return z; +} + + +void wireouts(char *b, uint8_t l) { + int handle; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, wire_slaveid, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + } + + if (i2c_write_device(pigpio_pi, handle, b, l) < 0) ioer=-1; + + i2c_close(pigpio_pi, handle); +} + +uint16_t wireavailable() { return 1; } + +/* the register access functions */ +int16_t wirereadbyte(uint8_t port) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { + printf("** wire handle %d returned \n", handle); + ioer=1; + return -1; + } + + res=i2c_read_byte(pigpio_pi, handle); + i2c_close(pigpio_pi, handle); + return res; +} + +/* use the simple wire byte function */ +void wirewritebyte(uint8_t port, int16_t data) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + ioer=i2c_write_byte(pigpio_pi, handle, data); + + i2c_close(pigpio_pi, handle); +} + + +/* this code used the write byte function twice */ +/* +void wirewriteword(short port, short data1, short data2) { + int res, handle; + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + ioer=i2c_write_byte(pigpio_pi, handle, data1); + ioer+=i2c_write_byte(pigpio_pi, handle, data2); + + i2c_close(pigpio_pi, handle); +} +*/ + +/* use the raw access function in a buffer */ +void wirewriteword(short port, short data1, short data2) { + int res, handle; + mem_t buf[2]; + + handle=i2c_open(pigpio_pi, POSIXI2CBUS, port, 0); + if (handle < 0) { ioer=1; return; } + + buf[0]=data1; + buf[1]=data2; + + if (i2c_write_device(pigpio_pi, handle, buf, 2) <0 ) ioer=-1; + + i2c_close(pigpio_pi, handle); +} + +/* just a helper to make GET work, wire is string oriented */ +char wireread() { + char wbuffer[2]; + if wireins(wbuffer, 1) return wbuffer[1]; else return 0; +} + +#else +void wirebegin() {} +uint8_t wirestat(uint8_t c) {return 0; } +void wireopen(char s, uint8_t m) {} +uint16_t wireins(char *b, uint8_t l) { b[0]=0; return 0; } +void wireouts(char *b, uint8_t l) {} +uint16_t wireavailable() { return 1; } +int16_t wirereadbyte(uint8_t port) { return 0; } +void wirewritebyte(uint8_t port, int16_t data) { return; } +void wirewriteword(uint8_t port, int16_t data1, int16_t data2) { return; } +/* just a helper to make GET work, wire is string oriented */ +char wireread() { return 0; } +#endif + +/* + * Read from the radio interface, radio is always block + * oriented. + */ +uint8_t radiostat(uint8_t c) {return 0; } +void radioset(uint8_t s) {} +uint16_t radioins(char *b, uint8_t nb) { b[0]=0; b[1]=0; return 0; } +void radioouts(char *b, uint8_t l) {} +void iradioopen(const char *filename) {} +void oradioopen(const char *filename) {} +uint16_t radioavailable() { return 0; } +char radioread() { return 0; } + +/* Arduino sensors */ +void sensorbegin() {} +float sensorread(uint8_t s, uint8_t v) {return 0;}; + + +/* + * event handling wrappers, to keep Arduino specifics out of BASIC + */ + +uint8_t pintointerrupt(uint8_t pin) { return 0; } +void attachinterrupt(uint8_t inter, void (*f)(), uint8_t mode) {} +void detachinterrupt(uint8_t pin) {} + +/* + * Experimental code to simulate 64kb SPI SRAM modules + * + * currently used to test the string code of the mem + * interface + * + */ + +#ifdef SPIRAMSIMULATOR + +static int8_t spiram[65536]; + +/* the RAM begin method sets the RAM to byte mode */ +uint16_t spirambegin() { + return 65534; +} + +/* the simple unbuffered byte write, with a cast to signed char */ +void spiramrawwrite(uint16_t a, int8_t c) {spiram[a]=c;} + +/* the simple unbuffered byte read, with a cast to signed char */ +int8_t spiramrawread(uint16_t a) {return spiram[a];} + +/* the buffers calls, also only simulated here */ + +void spiram_rwbufferwrite(uint16_t a, int8_t c) {spiram[a]=c;} + +int8_t spiram_rwbufferread(uint16_t a) {return spiram[a];} + +int8_t spiram_robufferread(uint16_t a) {return spiram[a];} + +/* to handle strings in SPIRAM situations two more buffers are needed + * they store intermediate results of string operations. The buffersize + * limits the maximum string length indepents of how big strings are set + */ +char spistrbuf1[SPIRAMSBSIZE]; +char spistrbuf2[SPIRAMSBSIZE]; +#endif + +/* + * This code measures the fast ticker frequency in microseconds + * Activate this only for test purposes. Not really useful on POSIX. + */ + +#ifdef FASTTICKERPROFILE +uint32_t lastfasttick = 0; +uint32_t fasttickcalls = 0; +uint16_t avgfasttick = 0; +long devfasttick = 0; + +void fasttickerprofile() { + int delta; + if (lastfasttick == 0) { lastfasttick=micros(); return; } + delta=micros()-lastfasttick; + lastfasttick=micros(); + avgfasttick=(avgfasttick*fasttickcalls+delta)/(fasttickcalls+1); + fasttickcalls++; +} +#endif + diff --git a/data/Basic2/Windows/runtime.h b/data/Basic2/Windows/runtime.h new file mode 100644 index 0000000000000000000000000000000000000000..d71c6d01279c85f7ebd916086ad69b9e9be7a670 --- /dev/null +++ b/data/Basic2/Windows/runtime.h @@ -0,0 +1,776 @@ +/* + * + * $Id: runtime.h,v 1.1 2024/02/25 04:43:16 stefan Exp stefan $ + * + * Stefan's basic interpreter + * + * Prototypes for the runtime environment of the BASIC interpreter. + * + * Needs to be included by runtime.c or runtime.cpp and basic.c + * + * Parametrized by hardware.h. + * + * Author: Stefan Lenz, sl001@serverfabrik.de + * + */ + +#if !defined(__RUNTIMEH__) +#define __RUNTIMEH__ + +/* + * system type identifiers + */ +#define SYSTYPE_UNKNOWN 0 +#define SYSTYPE_AVR 1 +#define SYSTYPE_ESP8266 2 +#define SYSTYPE_ESP32 3 +#define SYSTYPE_RP2040 4 +#define SYSTYPE_SAM 5 +#define SYSTYPE_XMC 6 +#define SYSTYPE_SMT32 7 +#define SYSTYPE_NRENESA 8 +#define SYSTYPE_POSIX 32 +#define SYSTYPE_MSDOS 33 +#define SYSTYPE_MINGW 34 +#define SYSTYPE_RASPPI 35 + +/* + * Input and output channels. + * The channels are used to identify the I/O devices in the + * runtime environment. + * + * NULL is the memory channel outputting to a buffer. + * SERIAL is the standard serial channel and the default device. + * DSP is the display channel. + * PRT is the second serial channel used for printing and communication + * with external devices. + * WIRE is the I2C channel. + * RADIO is the RF24 channel. + * MQTT is the MQTT channel. + * FILE is the file system channel. + */ +#define ONULL 0 +#define OSERIAL 1 +#define ODSP 2 +#define OPRT 4 +#define OWIRE 7 +#define ORADIO 8 +#define OMQTT 9 +#define OFILE 16 + +#define INULL 0 +#define ISERIAL 1 +#define IKEYBOARD 2 +#define ISERIAL1 4 +#define IWIRE 7 +#define IRADIO 8 +#define IMQTT 9 +#define IFILE 16 + +/* + * The main IO interface. This is how BASIC uses I/O functions + * + * ioinit(): called at setup to initialize what ever io is needed + * outch(): prints one ascii character + * inch(): gets one character (and waits for it) + * checkch(): checks for one character (non blocking) + * ins(): reads an entire line (uses inch except for pioserial) + * + */ +void ioinit(); +void iodefaults(); +int cheof(int); +char inch(); +char checkch(); +uint16_t availch(); +uint16_t inb(char*, int16_t); +uint16_t ins(char*, uint16_t); +void outch(char); +void outs(char*, uint16_t); + +/* + * Global variables of the runtime env, visible to BASIC + */ +extern int8_t id; /* active input stream */ +extern int8_t od; /* active output stream */ +extern int8_t idd; /* default input stream in interactive mode */ +extern int8_t odd; /* default output stream in interactive mode */ +extern int8_t ioer; /* the io error */ + +/* io control flags */ +extern uint8_t kbdrepeat; +extern uint8_t blockmode; +extern uint8_t sendcr; + +/* counts the outputed characters on streams 0-3, used to emulate a real tab */ +extern uint8_t charcount[3]; /* devices 1-4 support tabing */ + +/* the memory buffer comes from BASIC in this version */ +extern char ibuffer[BUFSIZE]; /* the input buffer */ + +/* only needed in POSIX worlds */ +extern uint8_t breaksignal; +extern uint8_t vt52active; + +/* the string buffer the interpreter needs, here to be known by BASIC */ +extern char spistrbuf1[SPIRAMSBSIZE], spistrbuf2[SPIRAMSBSIZE]; + +/* the mqtt variable the interpreter needs */ +#define MQTTLENGTH 32 +extern char mqtt_otopic[MQTTLENGTH]; +extern char mqtt_itopic[MQTTLENGTH]; +extern char mqttname[]; + +/* + * accessing the fastticker information + */ +extern uint16_t avgfasttick; + +/* + * A byte in the runtime memory containing the system type + */ +extern uint8_t bsystype; + +/* + * These functions are always empty on Arduino, they are only used in + * the POSIX branch of the code. + * + * BASIC calls these functions once to start the timing, wiring, and signal handling. + */ + +void timeinit(); /* handling time - part of the Arduino core - only needed on POSIX OSes */ +void wiringbegin(); /* starting wiring is only needed on raspberry */ +void signalon(); /* POSIX signals - not needed on Ardunino */ + +/* + * Memory allocation functions. + * + * BASIC calls freememorysize() to detemine how much memory can be allocated + * savely on the heap. + * BASIC calls restartsystem() for a complete reboot. + * freeRam() is the actual free heap. Used in BASIC only in USR. + * + * Arduino data from https://docs.arduino.cc/learn/programming/memory-guide + */ + +long freememorysize(); /* determine how much actually to allocate */ +void restartsystem(); /* cold start of the MCU */ +long freeRam(); /* try to find the free heap after alocating all globals */ + +/* This is unfinished, don't use, sleep and RTC interrupt code. */ +void rtcsqw(); +void aftersleepinterrupt(void); +void activatesleep(long); + +/* + * Start the SPI bus. Called once on start. + * + * Some libraries also try to start the SPI which may lead to on override of + * the PIN settings if the library code is not clean - currenty no conflict known. + * for the libraries used here. + */ +void spibegin(); + +/* + * Timeing functions and background tasks. + * + * byield() is called after every statement and in all + * waiting loops for I/O. BASIC gives back the unneeded + * CPU cycles by calling byield(). + * + * byield() it allows three levels of background tasks. + * + * BASICBGTASK controls if time for background tasks is + * needed, usually set by hardware features + * + * YIELDINTERVAL by default is 32, generating a 32 ms call + * to the network loop function. + * + * LONGYIELDINTERVAL by default is 1000, generating a one second + * call to maintenance functions. + * + * fastticker() is called in every byield for fast I/O control. + * It is currently only used for the tone emulation. + * + * byield calls back bloop() in the BASIC interpreter for user + * defined background tasks. + * + * the time intervall in ms needed for + * ESP8266 yields, network client loops + * and other timing related functions + */ +#define LONGYIELDINTERVAL 1000 +#define YIELDINTERVAL 32 + +void byield(); /* the yield function called in empty loops */ +void bdelay(uint32_t); /* a delay function using byield() */ +void fastticker(); /* a function for very frequent background tasks */ +void yieldfunction(); /* everything that needs to be done often - 32 ms */ +void longyieldfunction(); /* everything that needs to be done not so often - 1 second */ +void yieldschedule(); /* scheduler call for some platforms */ + +/* + * EEPROM handling, these function enable the @E array and + * loading and saving to EEPROM with the "!" mechanism + * + * The EEPROM code can address EEPROMS up to 64 kB. It returns + * signed byte values which corresponds to the definition of + * mem_t in BASIC. This is needed because running from EEPROM + * requires negative token values to be recongized. + * + */ +void ebegin(); +void eflush(); +uint16_t elength(); +void eupdate(uint16_t, int8_t); +int8_t eread(uint16_t); + +/* + * The wrappers of the arduino io functions. + * + * The normalize the differences of some of the Arduino cores + * and raspberyy PI wiring implementations. + * + * pulseout generates microsecond pulses. + * + * awrite requires ESP32 2.0.2 core, else disable awrite(). + */ +uint16_t aread(uint8_t); +uint8_t dread(uint8_t); +void awrite(uint8_t, uint16_t); +void dwrite(uint8_t, uint8_t); +void pinm(uint8_t, uint8_t); +uint32_t pulsein(uint8_t, uint8_t, uint32_t); +void pulseout(uint16_t, uint8_t, uint16_t, uint16_t, uint16_t, uint16_t); +void playtone(uint8_t, uint16_t, uint16_t, uint8_t); +void tonetoggle(); /* internal function of the tone emulation, called by byield */ + +void breakpinbegin(); +uint8_t getbreakpin(); + +/* + * DISPLAY driver code section, the hardware models define a set of + * of functions and definitions needed for the display driver. These are + * + * dsp_rows, dsp_columns: size of the display + * dspbegin(), dspprintchar(c, col, row), dspclear(), dspupdate() + * + * All displays which have this functions can be used with the + * generic display driver below. + * + * Graphics displays need to implement the functions + * + * rgbcolor(), vgacolor() + * plot(), line(), rect(), frect(), circle(), fcircle() + * + * Color is currently either 24 bit or 4 bit 16 color vga. + * + * For non RGB ready displays, rgbcolor translates to the native color + * when BASIC requests an rgb color, in this case the nearest 4 bit + * color of the display is also stored for use in the text DISPLAY + * driver code + */ + + /* generate a 4 bit vga color from a given rgb color */ +uint8_t rgbtovga(uint8_t, uint8_t, uint8_t); + +/* + * prototypes for screen handling + */ +void dspbegin(); +void dspprintchar(char, uint8_t, uint8_t); +void dspclear(); +void dspupdate(); +void dspsetcursor(uint8_t); +void dspsavepen(); +void dsprestorepen(); +void dspsetfgcolor(uint8_t); +void dspsetbgcolor(uint8_t); +void dspsetreverse(uint8_t); +uint8_t dspident(); +void rgbcolor(uint8_t, uint8_t, uint8_t); +void vgacolor(uint8_t); +void plot(int, int); +void line(int, int, int, int); +void rect(int, int, int, int); +void frect(int, int, int, int); +void circle(int, int, int); +void fcircle(int, int, int); + +/* + * this is a generic display code + * it combines the functions of LCD and TFT drivers + * if this code is active + * + * dspprintchar(char c, uint8_t col, uint8_t row) + * dspclear() + * dspbegin() + * dspupdate() + * dspsetcursor(uint8_t c) + * dspsetfgcolor(uint8_t c) + * void dspsetbgcolor(uint8_t c) + * void dspsetreverse(uint8_t c) + * uint8_t dspident() + * + * have to be defined before in a hardware dependent section. + * Only dspprintchar and dspclear are needed, all other can be stubs + * + * VGA systems don't use the display driver for text based output. + * + * The display driver exists as a buffered version that can scroll + * or an unbuffered version that cannot scroll. Interfaces to hardware + * scrolling are not yet implemented. + * + * A VT52 state engine is implemented and works for buffered and + * unbuffered displays. Only buffered displays have the full VT52 + * feature set including most of the GEMDOS extensions described here: + * https://en.wikipedia.org/wiki/VT52 + * + * dspupdatemode controls the page update behaviour + * 0: character mode, display each character separately + * 1: line mode, update the display after each line + * 2: page mode, update the display after an ETX + * ignored if the display has no update function + * + */ + +void dspsetcursorx(uint8_t); +void dspsetcursory(uint8_t); +uint8_t dspgetcursorx(); +uint8_t dspgetcursory(); +void dspbell(); /* to whom the bell tolls - implement this to you own liking */ + + +/* + * text color code for the scrolling display + * + * non scrolling displays simply use the pen color of the display + * stored in dspfgcolor to paint the information on the screen + * + * for scrolling displays we store the color information of every + * character in the display buffer to enable scrolling, to limit the + * storage requirements, this code translates the color to a 4 bit VGA + * color. This means that if BASIC uses 24 bit colors, the color may + * change at scroll + * + * for color displays the buffer is a 16 bit object + * lower 8 bits plus the sign are the character, + * higher 7 the color and font. + * for monochrome just the character is stored + */ + +#ifdef DISPLAYHASCOLOR +typedef short dspbuffer_t; +#else +typedef char dspbuffer_t; +#endif + +dspbuffer_t dspget(uint16_t); +dspbuffer_t dspgetrc(uint8_t, uint8_t); +dspbuffer_t dspgetc(uint8_t); + +void dspsetxy(dspbuffer_t, uint8_t, uint8_t); /* this functions prints a character and updates the display buffer */ +void dspset(uint16_t, dspbuffer_t); +void dspsetscrollmode(uint8_t, uint8_t); /* 0 normal scroll, 1 enable waitonscroll function */ + +void dspbufferclear(); /* clear the buffer */ +void dspscroll(uint8_t, uint8_t); /* do the scroll */ +void dspreversescroll(uint8_t); /* do the reverse scroll only one line implemented */ + +/* + * This is the minimalistic VT52 state engine. It is an interface to + * process single byte control sequences of the form char + */ + +char vt52read(); /* the reader from the buffer, for messages going back from the display */ +uint8_t vt52avail(); /* the avail from the buffer */ +void vt52push(char); /* putting something into the buffer */ +uint8_t vt52number(char); /* something little, generating numbers */ +void vt52graphcommand(uint8_t); /* execute one graphics command */ + +/* + * this is a special part of the vt52 code with this, the terminal + * can control the digital and analog pins. + * it is meant for situations where the terminal is controlled by a (powerful) + * device with no or very few I/O pins. It can use the pins of the Arduino through + * the terminal. This works as long as everything stays within the terminals timescale + * On a 9600 baud interface, the character processing time is 1ms, everything slower + * than approximately 10ms can be done through the serial line. + */ +void vt52wiringcommand(uint8_t); + +/* the vt52 state engine */ +void dspvt52(char*); + + +/* these functions are used to access the display */ +void dspouts(char*, uint16_t); +void dspwrite(char); +uint8_t dspstat(uint8_t); +char dspwaitonscroll(); +uint8_t dspactive(); +void dspsetupdatemode(uint8_t); +uint8_t dspgetupdatemode(); +void dspgraphupdate(); + +/* + * code for the VGA system of Fabgl + */ +void vgabegin(); /* this starts the vga controller and the terminal right now */ +int vgastat(uint8_t); /* currently unused */ +void vgascale(int*, int*); /* scale the screen size */ +void vgawrite(char); +void vgaend(); + +/* + * Keyboard code for either the Fablib Terminal class or + * PS2Keyboard - please note that you need the ESP patched + * version here as mentioned above + * + * sets HASKEYBOARD to inform basic about this capability + * + * keyboards can implement + * kbdbegin() + * they need to provide + * kbdavailable(), kbdread(), kbdcheckch() + * the later is for interrupting running BASIC code + */ + +void kbdbegin(); +uint8_t kbdstat(uint8_t); +uint8_t kbdavailable(); +char kbdread(); +char kbdcheckch(); +uint16_t kbdins(char*, uint16_t); + +/* + * Arduino Real Time clock. The interface here offers the values as number_t + * combining all values. + * + * The code does not use an RTC library any more all the rtc support is + * builtin now. + * + * A clock must activate the macro #define HASCLOCK to make the clock + * available in BASIC. + * + * Four software models are supported + * - Built-in clocks of STM32, MKR, and ESP32 are supported by default + * - I2C clocks can be activated: DS1307, DS3231, and DS3232 + * - A Real Time Clock emulation is possible using millis() + * + * rtcget accesses the internal registers of the clock. + * Registers 0-6 are bcd transformed to return + * seconds, minutes, hours, day of week, day, month, year + * + * On I2C clocks registers 7-255 are returned as memory cells + */ + +/* No begin method needed */ +void rtcbegin(); +uint16_t rtcget(uint8_t); /* get the time from the registers */ +void rtcset(uint8_t, uint16_t); + +/* convert the time to a unix time number from https://de.wikipedia.org/wiki/Unixzeit */ +void rtctimetoutime(); +void rtcutimetotime(); + +/* + * definitions for ESP Wifi and MQTT, super experimental. + * As networking is only used for MQTT at the moment, + * mqtt, Wifi and Ethernet comes all in one. + * + * No encryption/authetication is implemented in MQTT. + * Only public, open servers can be used. + * + * MQTT topics can only be 32 bytes long. + * Buffered incoming and outgoing messages can be 128 bytes + * per default. + * + * wifisettings.h is the generic network definition file + * all network settings are compiled into the code + * BASIC cannot change them at runtime. + */ + +void mqttsetname(); +void netbegin(); +void netstop(); +void netreconnect(); +uint8_t netconnected(); + +/* + * mqtt event handling in BASIC can be triggered here + * the prototype uses exactly the Arduino types of the + * pubsub library. + * + */ +void mqttcallback(char*, byte*, unsigned int); + +/* + * mqtt prototypes + */ +void mqttbegin(); +uint8_t mqttstat(uint8_t); +uint8_t mqttreconnect(); +uint8_t mqttstate(); +void mqttsubscribe(const char*); +void mqttunsubscribe(); +void mqttsettopic(const char*); +void mqttouts(const char*, uint16_t); +void mqttwrite(const char); +char mqttread(); +uint16_t mqttins(char*, uint16_t); +uint16_t mqttavailable(); +char mqttcheckch(); + +/* + * The file system driver - all methods needed to support BASIC fs access + * Different filesystems need different prefixes and fs objects, these + * filesystems use the stream API + */ + +char* mkfilename(const char*); +const char* rmrootfsprefix(const char*); /* remove the prefix from the filename */ +void fsbegin(); +uint8_t fsstat(uint8_t); + +/* + * File I/O function on an Arduino + * + * filewrite(), fileread(), fileavailable() as byte access + * open and close is handled separately by (i/o)file(open/close) + * only one file can be open for write and read at the same time + */ +void filewrite(char); +char fileread(); +int fileavailable(); /* is int because some of the fs do this */ +uint8_t ifileopen(const char*); +void ifileclose(); +uint8_t ofileopen(const char*, const char*); +void ofileclose(); + +/* + * directory handling for the catalog function + * these methods are needed for a walkthtrough of + * one directory + * + * rootopen() + * while rootnextfile() + * if rootisfile() print rootfilename() rootfilesize() + * rootfileclose() + * rootclose() + */ +void rootopen(); +uint8_t rootnextfile(); +uint8_t rootisfile(); +const char* rootfilename(); +uint32_t rootfilesize(); +void rootfileclose(); +void rootclose(); +void removefile(const char*); + +/* + * formatting for fdisk of the internal filesystems + */ +void formatdisk(uint8_t); + +/* + * The buffer I/O device. This is a stream to write to a given bufer + * from BASIC. + */ + +void bufferbegin(); +uint8_t bufferstat(uint8_t); +void bufferwrite(char); +char bufferread(); +char buffercheckch(); +uint16_t bufferavailable(); +uint16_t bufferins(char*, uint16_t); +void bufferouts(char*, uint16_t); + +/* + * Primary serial code uses the Serial object or Picoserial + * + * The picoseria an own interrupt function. This is used to fill + * the input buffer directly on read. Write is standard like in + * the serial code. + * + * As echoing is done in the interrupt routine, the code cannot be + * used to receive keystrokes from serial and then display the echo + * directly to a display. To do this the write command in picogetchar + * would have to be replaced with a outch() that then redirects to the + * display driver. This would be very tricky from the timing point of + * view if the display driver code is slow. + * + * The code for the UART control is mostly taken from PicoSerial + * https://github.com/gitcnd/PicoSerial, originally written by Chris Drake + * and published under GPL3.0 just like this code + * + */ + +void picobegin(uint32_t); +void picowrite(char); /* the write code, sending bytes directly to the UART */ +uint16_t picoins(char *, uint16_t); /* the ins code of picoserial, called like this in consins */ + +/* + * picogetchar: this is the interrupt service routine. It + * recieves a character and feeds it into a buffer and echos it + * back. The logic here is that the ins() code sets the buffer + * to the input buffer. Only then the routine starts writing to the + * buffer. Once a newline is received, the length information is set + * and picoa is also set to 1 indicating an available string, this stops + * recevieing bytes until the input is processed by the calling code. + */ +void picogetchar(char); + +/* + * blocking serial single char read for Serial + * unblocking for Picoserial because it is not + * character oriented -> blocking is handled in + * consins instead. + */ +char serialread(); +void serialbegin(); +uint8_t serialstat(uint8_t); /* state information on the serial port */ +void serialwrite(char); /* write to a serial stream */ +char serialcheckch(); /* check on a character, needed for breaking */ +uint16_t serialavailable(); /* avail method, needed for AVAIL() */ +void serialflush(); /* flush serial */ +uint16_t serialins(char*, uint16_t); /* read a line from serial */ + +/* + * reading from the console with inch or the picoserial callback + * this mixes interpreter levels as inch/outch are used here + * this code needs to go to the main interpreter section after + * thorough rewrite + */ +uint16_t consins(char *, uint16_t); + +void prtbegin(); /* second serial port */ +char prtopen(char*, uint16_t); /* the open functions are not needed here */ +void prtclose(); +uint8_t prtstat(uint8_t); +void prtwrite(char); +char prtread(); +char prtcheckch(); +uint16_t prtavailable(); +void prtset(uint32_t); +uint16_t prtins(char*, uint16_t); + +/* + * The wire code, direct access to wire communication + * in master mode wire_slaveid is the I2C address bound + * to channel &7 and wire_myid is 0 + * in slave mode wire_myid is the devices slave address + * and wire_slaveid is 0 + * ARDUINOWIREBUFFER is the maximum length of meesages the + * underlying library can process. This is 32 for the Wire + * library + */ + +void wirebegin(); +void wireslavebegin(uint8_t); +uint8_t wirestat(uint8_t); /* wire status - just checks if wire is compiled */ +uint16_t wireavailable(); /* available characters - test code ecapsulation prep for slave*/ +void wireonreceive(int h); /* eventhandler for received data */ +void wireonrequest(); /* event handler for request, deliver the message and forget the buffer */ + +/* + * as a master open sets the slave id for the communication + * no extra begin while we stay master + */ +void wireopen(char, uint8_t); +char wireread(); /* */ +void wirewrite(char c); /* */ +uint16_t wireins(char*, uint8_t); /* input an entire string */ +void wireouts(char*, uint8_t); /* send an entire string - truncate radically */ +int16_t wirereadbyte(uint8_t); +void wirewritebyte(uint8_t, int16_t); +void wirewriteword(uint8_t, int16_t, int16_t); + +/* + * Read from the radio interface, radio is always block + * oriented. This function is called from ins for an entire + * line. + * + * In blockmode the entire message is returned in the + * receiving string while in line mode the length of the + * string is adapted. Blockmode can be used to transfer + * binary data. + */ + +uint8_t radiostat(uint8_t); +uint64_t pipeaddr(const char*); /* generate a uint64_t pipe address from the filename string for RF24 */ +uint16_t radioins(char*, uint8_t); /* read an entire string */ +void radioouts(char *, uint8_t); /* write to radio, no character mode here */ +uint16_t radioavailable(); /* radio available */ +char radioread(); + +/* + * we always read from pipe 1 and use pipe 0 for writing, + * the filename is the pipe address, by default the radio + * goes to reading mode after open and is only stopped for + * write + */ +void iradioopen(const char *); +void oradioopen(const char *); +void radioset(uint8_t); + +/* + * Arduino Sensor library code + * The sensorread() is a generic function called by + * SENSOR basic function and command. The first argument + * is the sensor and the second argument the value. + * sensorread(n, 0) checks if the sensorstatus. + */ +void sensorbegin(); +float sensorread(uint8_t, uint8_t); + +/* + * prototypes for the interrupt interface + */ +/* some have it and some dont */ +#if !(defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_MBED_NANO) || defined(ARDUINO_ARCH_RENESAS)) +typedef int PinStatus; +#endif + +uint8_t pintointerrupt(uint8_t); +void attachinterrupt(uint8_t, void (*f)(), uint8_t); +void detachinterrupt(uint8_t); + +/* + * Experimental code to drive SPI SRAM + * + * Currently only the 23LCV512 is implemented, assuming a + * 64kB SRAM + * The code below is taken in part from the SRAMsimple library + * + * two buffers are implemented: + * - a ro buffer used by memread, this buffer is mainly reading the token + * stream at runtime. + * - a rw buffer used by memread2 and memwrite2, this buffer is mainly accessing + * the heap at runtime. In interactive mode this is also the interface to read + * and write program code to memory + * + */ + +/* the RAM begin method sets the RAM to sequential mode */ +uint16_t spirambegin(); +int8_t spiramrawread(uint16_t); +void spiram_bufferread(uint16_t, int8_t*, uint16_t); +void spiram_bufferwrite(uint16_t, int8_t*, uint16_t); +int8_t spiram_robufferread(uint16_t); +void spiram_rwbufferflush(); /* flush the buffer */ +int8_t spiram_rwbufferread(uint16_t); +void spiram_rwbufferwrite(uint16_t, int8_t); /* the buffered file write */ +void spiramrawwrite(uint16_t, int8_t); /* the simple unbuffered byte write, with a cast to signed char */ + + +/* + * This code measures the fast ticker frequency in microseconds + * It leaves the data in variable F. Activate this only for test + * purposes. + */ +void fasttickerprofile(); + +// defined RUNTIMEH +#endif diff --git a/data/Basic2/examples/00tutorialBasic2/eliza2.bas b/data/Basic2/examples/00tutorialBasic2/eliza2.bas new file mode 100644 index 0000000000000000000000000000000000000000..e2fce51dd006ef21c79d8fdb64bd0e1849f938d3 --- /dev/null +++ b/data/Basic2/examples/00tutorialBasic2/eliza2.bas @@ -0,0 +1,290 @@ +10 REM "A ELIZA version from the 70s" +20 REM "Ported 2022 - Stefan Lenz" +25 REM "(Almost) original code to test HASMSSTRINGS" +30 DIM C1$(80) +40 GOSUB 1070 +50 DIM C$(72), I$(72), K$(72), F$(72), S$(72), R$(72), P$(72), Z$(72) +60 DIM S(37), R(37), N(37) +65 DIM T$(80) +70 N1 = 37 +80 N2 = 14 +90 N3 = 117 +100 FOR X = 1 TO N1 + N2 + N3 +110 READ Z$ +120 NEXT X +130 FOR X = 1 TO N1 +140 READ S(X) +145 READ L +150 R(X) = S(X) +160 N(X) = S(X) + L - 1 +170 NEXT X +180 PRINT "HI! I'M ELIZA. WHAT'S YOUR PROBLEM?" +190 REM +200 REM "----USER INPUT SECTION----" +210 REM +220 INPUT I$ +221 REM "Uppercase the input" +222 FOR L=1 TO LEN(I$) +223 IF (I$(L))>=97 AND (I$(L))<=122 THEN T$(L)=CHR$((I$(L))-32): ELSE T$(L)=I$(L) +224 NEXT +225 I$=T$ +230 T$=" "+I$+" ": I$=T$ +240 REM "GET RID OF APOSTROPHES" +250 FOR L = 1 TO LEN(I$) +260 IF MID$(I$, L, 1) <> "'" THEN 290 +270 T$=MID$(I$, 1, L-1)+MID$(I$, L+1, LEN(I$)-L) +275 I$=T$ +280 GOTO 260 +290 IF L+4>=LEN(I$) THEN 330 +300 IF MID$(I$, L, 4) <> "SHUT" THEN 330 +310 PRINT "IF THAT'S HOW YOU FEEL--GOODBY..." +320 END +330 NEXT L +340 IF I$<>P$ THEN 370 +350 PRINT "PLEASE DON'T REPEAT YOURSELF!" +360 GOTO 190 +370 REM +380 REM "----FIND KEYWORD IN I$----" +390 REM +400 RESTORE +410 S = 0 +420 FOR K = 1 TO N1 +430 READ K$ +440 IF S>0 THEN 510 +450 FOR L=1 TO LEN(I$)-LEN(K$)+1 +460 IF MID$(I$, L, LEN(K$))<>K$ THEN 500 +470 S=K +480 T=L +490 F$=K$ +500 NEXT L +510 NEXT K +520 IF S<=0 THEN 560 +530 K=S +540 L=T +550 GOTO 590 +560 K=37: REM "WE DIDN'T FIND ANY KEYWORDS" +570 GOTO 850 +580 REM +590 REM "TAKE RIGHT PART OF STRINGS AND CONJUGATE IT" +600 REM "USING THE LIST OF STRINGS TO BE SWAPPED" +610 REM +620 RESTORE +630 FOR X = 1 TO N1 +640 READ Z$ +650 NEXT X +660 IF (LEN(I$)-LEN(F$)-L+1)>0 THEN 690 +670 L=L-1 +680 GOTO 660 +690 C$ = " "+MID$(I$, LEN(F$)+L, LEN(I$)-(LEN(F$)+L-1)) +700 FOR X=1 TO N2/2 +710 READ S$ +711 READ R$ +720 FOR L = 1 TO LEN(C$) +730 IF L+LEN(S$)>LEN(C$) THEN 770 +740 IF MID$(C$, L, LEN(S$))<>S$ THEN 770 +750 T$=MID$(C$,1,L-1)+R$+MID$(C$,L+LEN(S$),LEN(C$)-(L+LEN(S$)-1)) +755 C$=T$ +760 GOTO 810 +770 IF L+LEN(R$)>LEN(C$) THEN 810 +780 IF MID$(C$, L, LEN(R$)) <> R$ THEN 810 +790 T$=MID$(C$,1,L-1)+S$+MID$(C$,L+LEN(R$),LEN(C$)-(L+LEN(R$)-1)) +795 C$=T$ +800 L=L+LEN(S$) +810 NEXT L +820 NEXT X +830 IF MID$(C$, 2, 1)=" " THEN C$=MID$(C$,2,LEN(C$)-1) +840 REM +850 REM "NOW USING THE KEYWORD NUMBER (K) GET REPLY" +860 REM +870 RESTORE +880 FOR X=1 TO N1+N2 +890 READ Z$ +900 NEXT X +910 FOR X=1 TO R(K): REM "READ RIGHT REPLY" +920 READ F$ +930 NEXT X +940 R(K)=R(K)+1 +950 IF R(K)>N(K) THEN R(K)=S(K) +960 IF MID$(F$, LEN(F$), 1) = "*" THEN 1000 +970 PRINT F$ +980 P$=I$ +990 GOTO 190 +1000 PRINT MID$(F$, 1, LEN(F$) - 1); C$ +1010 P$=I$ +1020 GOTO 190 +1030 REM "PRINT CENTER ROUTINE" +1040 PRINT TAB(40 - LEN(C1$) / 2); C1$ +1060 RETURN +1070 C1$ = "*** ELIZA ***" +1080 GOSUB 1030 +1090 C1$ = "IN BASIC" +1100 GOSUB 1030 +1110 C1$ = "MODIFIED FROM CYBER 175 AT UNIVERSITY OF ILLINOIS AT CHAMPAGNE" +1120 GOSUB 1030 +1130 C1$ = "JOHN SCHUGG" +1140 GOSUB 1030 +1150 C1$ = "JANUARY 1985" +1160 GOSUB 1030 +1170 C1$ = "HAVE ANY PROBLEMS ?" +1180 GOSUB 1030 +1190 C1$ = "LET ELIZA HELP YOU !" +1200 GOSUB 1030 +1210 PRINT +1220 C1$ = "TO STOP ELIZA TYPE 'SHUT UP'" +1230 GOSUB 1030 +1240 C1$ = "(THIS VERSION WILL NOT RECORD YOUR CONVERSATIONS)" +1250 GOSUB 1030 +1260 C1$ = "(PLEASE SEND SUGGESTIONS FOR IMPROVEMENTS TO JOHN SCHUGG)" +1270 GOSUB 1030 +1280 PRINT "< PRESS RETURN TO CONTINUE...>" +1290 INPUT C1$ +1320 RETURN +1330 REM +1340 REM "---PROGRAM DATA FOLLOWS---"" +1350 REM +1360 REM "KEYWORDS:" +1370 REM +1380 DATA "CAN YOU","CAN I","YOU ARE","YOURE","I DONT","I FEEL" +1390 DATA "WHY DONT YOU","WHY CANT I","ARE YOU","I CANT","I AM","IM " +1400 DATA "YOU ","I WANT","WHAT","HOW","WHO","WHERE","WHEN","WHY" +1410 DATA "NAME","CAUSE","SORRY","DREAM","HELLO","HI ","MAYBE" +1420 DATA " NO","YOUR","ALWAYS","THINK","ALIKE","YES","FRIEND" +1430 DATA "COMPUTER","CAR","NOKEYFOUND" +1440 REM +1450 REM "---STRING DATA FOR CONJUGATIONS---" +1460 REM +1470 DATA " ARE "," AM ","WERE ","WAS "," YOU "," I ","YOUR ","MY " +1480 DATA " IVE "," YOUVE "," IM "," YOURE "," YOU "," ME " +1490 REM +1500 REM "----REPLIES----" +1510 REM +1520 DATA "DON'T YOU BELIEVE THAT I CAN*" +1530 DATA "PERHAPS YOU WOULD LIKE TO BE ABLE TO*" +1540 DATA "YOU WANT ME TO BE ABLE TO*" +1550 DATA "PERHAPS YOU DON'T WANT TO*" +1560 DATA "DO YOU WANT TO BE ABLE TO*" +1570 DATA "WHAT MAKES YOU THINK I AM*" +1580 DATA "DOES IT PLEASE YOU TO BELIEVE I AM*" +1590 DATA "PERHAPS YOU WOULD LIKE TO BE*" +1600 DATA "DO YOU SOMETIMES WISH YOU WERE*" +1610 DATA "DON'T YOU REALLY*" +1620 DATA "WHY DON'T YOU*" +1630 DATA "DO YOU WISH TO BE ABLE TO*" +1640 DATA "DOES THAT TROUBLE YOU?" +1650 DATA "TELL ME MORE ABOUT SUCH FEELINGS." +1660 DATA "DO YOU OFTEN FEEL*" +1670 DATA "DO YOU ENJOY FEELING*" +1680 DATA "DO YOU REALLY BELIEVE I DON'T*" +1690 DATA "PERHAPS IN GOOD TIME I WILL*" +1700 DATA "DO YOU WANT ME TO*" +1710 DATA "DO YOU THINK YOU SHOULD BE ABLE TO*" +1720 DATA "WHY CAN'T YOU*" +1730 DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*" +1740 DATA "WOULD YOU PREFER IF I WERE NOT*" +1750 DATA "PERHAPS IN YOUR FANTASIES I AM*" +1760 DATA "HOW DO YOU KNOW YOU CAN'T*" +1770 DATA "HAVE YOU TRIED?" +1780 DATA "PERHAPS YOU CAN NOW*" +1790 DATA "DID YOU COME TO ME BECAUSE YOU ARE*" +1800 DATA "HOW LONG HAVE YOU BEEN*" +1810 DATA "DO YOU BELIEVE IT IS NORMAL TO BE*" +1820 DATA "DO YOU ENJOY BEING*" +1830 DATA "WE WERE DISCUSSING YOU-- NOT ME." +1840 DATA "OH, I*" +1850 DATA "YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?" +1860 DATA "WHAT WOULD IT MEAN TO YOU IF YOU GOT*" +1870 DATA "WHY DO YOU WANT*" +1880 DATA "SUPPOSE YOU SOON GOT*" +1890 DATA "WHAT IF YOU NEVER GOT*" +1900 DATA "I SOMETIMES ALSO WANT*" +1910 DATA "WHY DO YOU ASK?" +1920 DATA "DOES THAT QUESTION INTEREST YOU?" +1930 DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?" +1940 DATA "WHAT DO YOU THINK?" +1950 DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?" +1960 DATA "WHAT IS IT THAT YOU REALLY WANT TO KNOW?" +1970 DATA "HAVE YOU ASKED ANYONE ELSE?" +1980 DATA "HAVE YOU ASKED SUCH QUESTIONS BEFORE?" +1990 DATA "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?" +2000 DATA "NAMES DON'T INTEREST ME." +2010 DATA "I DON'T CARE ABOUT NAMES-- PLEASE GO ON." +2020 DATA "IS THAT THE REAL REASON?" +2030 DATA "DON'T ANY OTHER REASONS COME TO MIND?" +2040 DATA "DOES THAT REASON EXPLAIN ANY THING ELSE?" +2050 DATA "WHAT OTHER REASONS MIGHT THERE BE?" +2060 DATA "PLEASE DON'T APOLOGIZE." +2070 DATA "APOLOGIES ARE NOT NECESSARY." +2080 DATA "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?" +2090 DATA "DON'T BE SO DEFENSIVE!" +2100 DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?" +2110 DATA "DO YOU DREAM OFTEN?" +2120 DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?" +2130 DATA "ARE YOU DISTURBED BY YOUR DREAMS?" +2140 DATA "HOW DO YOU DO--PLEASE STATE YOUR PROBLEM." +2150 DATA "YOU DON'T SEEM QUITE CERTAIN." +2160 DATA "WHY THE UNCERTAIN TONE?" +2170 DATA "CAN'T YOU BE MORE POSITIVE?" +2180 DATA "YOU AREN'T SURE?" +2190 DATA "DON'T YOU KNOW?" +2200 DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?" +2210 DATA "YOU ARE BEING A BIT NEGATIVE." +2220 DATA "WHY NOT?" +2230 DATA "ARE YOU SURE?" +2240 DATA "WHY NO?" +2250 DATA "WHY ARE YOU CONCERNED ABOUT MY*" +2260 DATA "WHAT ABOUT YOUR OWN*" +2270 DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?" +2280 DATA "WHEN?" +2290 DATA "WHAT ARE YOU THINKING OF?" +2300 DATA "REALLY, ALWAYS?" +2310 DATA "DO YOU REALLY THINK SO?" +2320 DATA "BUT YOU ARE NOT SURE YOU*" +2330 DATA "DO YOU DOUBT YOU*" +2340 DATA "IN WHAT WAY?" +2350 DATA "WHAT RESEMBLANCE DO YOU SEE?" +2360 DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?" +2370 DATA "WHAT OTHER CONNECTIONS DO YOU SEE?" +2380 DATA "COULD THERE REALLY BE SOME CONNECTION?" +2390 DATA "HOW?" +2400 DATA "YOU SEEM QUITE POSITIVE." +2410 DATA "ARE YOU SURE?" +2420 DATA "I SEE." +2430 DATA "I UNDERSTAND." +2440 DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?" +2450 DATA "DO YOUR FRIENDS WORRY YOU?" +2460 DATA "DO YOUR FRIENDS PICK ON YOU?" +2470 DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?" +2480 DATA "DO YOU IMPOSE ON YOUR FRIENDS?" +2490 DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU?" +2500 DATA "DO COMPUTERS WORRY YOU?" +2510 DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?" +2520 DATA "ARE YOU FRIGHTENED BY MACHINES?" +2530 DATA "WHY DO YOU MENTION COMPUTERS?" +2540 DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?" +2550 DATA "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?" +2560 DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?" +2570 DATA "OH, DO YOU LIKE CARS?" +2580 DATA "MY FAVORITE CAR IS A LAMBORGHINI COUNTACH. WHAT IS YOUR'S?" +2590 DATA "MY FAVORITE CAR COMPANY IS FERRARI. WHAT IS YOURS?" +2600 DATA "DO YOU LIKE PORSCHES?" +2610 DATA "DO YOU LIKE PORSCHE TURBO CARRERAS?" +2620 DATA "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?" +2630 DATA "WHAT DOES THAT SUGGEST TO YOU?" +2640 DATA "I SEE." +2650 DATA "I'M NOT SURE I UNDERSTAND YOU FULLY." +2660 DATA "COME COME ELUCIDATE YOUR THOUGHTS." +2670 DATA "CAN YOU ELABORATE ON THAT?" +2680 DATA "THAT IS QUITE INTERESTING." +2690 REM +2700 REM "---DATA FOR FINDING RIGHT REPLIES---" +2710 REM +2720 DATA 1,3,4,2,6,4,6,4,10,4,14,3,17,3,20,2,22,3,25,3 +2730 DATA 28,4,28,4,32,3,35,5,40,9,40,9,40,9,40,9,40,9,40,9 +2740 DATA 49,2,51,4,55,4,59,4,63,1,63,1,64,5,69,5,74,2,76,4 +2750 DATA 80,3,83,7,90,3,93,6,99,7,106,5,111,6 +2760 REM +2770 REM +2780 REM "LAST MOD. JULY 1979" +2790 REM +2800 REM "'ELIZA'" +2810 END diff --git a/data/LICENSE b/data/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f288702d2fa16d3cdf0035b15a9fcbc552cd88e7 --- /dev/null +++ b/data/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/data/MANUAL.md b/data/MANUAL.md new file mode 100644 index 0000000000000000000000000000000000000000..95aa07ee0a5bfd29056eee3c2f2126873b195c3a --- /dev/null +++ b/data/MANUAL.md @@ -0,0 +1,2428 @@ +# Stefan's IoT BASIC in a nutshell + +## Version information + +This manual is for the released version 1.4 and 2.0 of Stefan's IoT BASIC interpreter. + +## Supported hardware + +BASIC runs on Mac, Windows, Raspberry PI, MSDOS and many Arduino plattforms. I test regularly on 8 and 32 bit AVR, ESP8266. ESP2, RP2040 but also on some less common platforms like MKR, XMC, SMT, and GIGA. Have a look in the hardware section for more information. Many peripherals are supported. You find details in the hardware section of the manual. + +## BASIC language sets + +This BASIC interpreter is structured in language sets. They can be compiled into the code separately. With every language set there are more features and command. This makes it adaptable to the purpose. The manual is structured according to the language sets. + +The intepreter has two data types - numbers and strings. The number type can be set at compile time. It is either an integer or foating point. Depending on the definition of number_t in the code the interpreter can use everything from 16 bit integers to 64 bit floats as basic number type. Default is single precision floats for all real OSes and integer on all Arduinos. In practice all but the UNO boards can run single precision floats. + +Arrays and string variables are part of the Apple 1 language sets. Strings are static. They reserve the entire length of the string on the heap. Depending on the definition of the string index type in the code, strings can be either 255 characters or 65535 characters maximum length. + +Array can be maximum two dimensional and string arrays can be one dimensional. + +Variable names are two letters or one letter and one digit in the smaller language sets. Compiled with HASLONGNAMES, the interpreter can have names up to MAXNAME length. This is 16 by default. The HASLONGNAMES setting is default now. + +Keywords and variable names are not case sensitive. They are printed as uppercase with the LIST command. Strings and string constants are case sensitive. + +There is a set of examples program in examples/00tutorial. They are referred to here as "the tutorial". + +As a proof of concept many of the 101 BASIC computer games in David Ahl's original book from 1975 have been ported. Look into examples/14games for some 70s gaming fun. + +Most Arduino built-in examples from https://docs.arduino.cc/built-in-examples/ have been ported to BASIC. They are in examples in the folders 01-10. + +## Language Personalities in Version 2.0 + +BASIC has a lot of Apple 1 and Palo Alto DNA. Some of the language constructs and conventions are taken from these languages and not from the more common Microsoft type BASICs. The subtle differences of BASIC dialects made programs hard to port even in the old days of the 1970s and 1980s. From version 2.0 on this BASIC interpreter has the feature of setting personalities at runtime. + +One command controls how boolean arithemtic, string syntax, random number generator behaviour and array dimensions are handled. + +SET 22, "Microsoft" + +activates the Microsoft mode. In this mode, random numbers are always between 0 and 1 and the argument of RND controls the random number generators seed. Arrays start at 0 and have n+1 elements. Substring notation for strings is switched of and string commands can be used normally. Booleans false is -1. + +SET 22, "Apple1" + +activates Apple 1 mode. Random numbers are generated in the range from 0 to n-1 if RND(n) is called. Arrays start at 1 and have n elements. Strings can be manipulated with the substring syntax. Boolean false is 1. + +SET 22, "PaloAlto" + +activates Palo Alto BASIC mode. Random numbers are from 1 to n if RND(n) is called. Arrays start at 0 and have n elements. Substrings can be used. In addition to this, the interpreter is in forced integer mode. All variables and operations are done in integer. Boolean false is 1. + +All of these settings can be controlled individually at runtime of a BASIC program with the SET command. + +Default of the interpreter is "Apple1" with the exception of the boolean mode which is -1 at interpreter startup. + +## Compiling BASIC + +Basic 2.0 consists now of 6 files. basic.c is the interpreter and basic.h the prototypes. runtime.c or runtime.cpp are the runtime environments. They differ for real computers (runtime.c) and Arduinos (runtime.cpp). The prototypes i.e. the interface the the runtime code are identical and are called runtime.h. There are almost no configuarable parameters in these files. + +Configuration of the hardware is done in hardware.h. Please look into the hardware section of this manual for more details. + +Configuration of the language features is done in language.h. + +Both files are explained in more detail in https://github.com/slviajero/tinybasic/wiki/How-to-compile-Stefan's-BASIC-(and-how-it-works) + +To compile BASIC on an Arduino, copy the folder IotBasic into your Arduino sketch folder and compile. I still use 1.18.5 to compile but test the 2.x versions of the Arduino IDE occasionally. + +To compile on Posix system, type + +gcc basic.c runtime.c -lm + +this works everywhere. On an Raspberry, if you use the Wiring or PIGPIO library, type + +gcc basic.c runtime.c -lm -lwiringPi + +or + +gcc basic.c runtime.c -lm -lpigpiod_lf2 + +On MSDOS, Turbo C 2.x compiles BASIC like this + +tcc BASIC.C RUNTIME.C + +The tc editor does not work as BASIC is too big for it. + +## Core language set + +### Introduction + +The core language set is based on the Palo Alto BASIC language. This is the great grandfather of many BASIC currently on the market. Commands are PRINT, LET, INPUT, GOTO, GOSUB, RETURN, IF, FOR, TO, STEP, NEXT, STOP, REM, LIST, NEW, RUN, ABS, INT, RND, SIZE. + +In the core language set there are 26 static variables A-Z and a special array @() which addresses the free memory. If an EEPROM is present or the EEPROM dummy is compiled to the code, the array @E() addresses the EEPROM. + +SAVE and LOAD is also part of the core language set to allow saving and loading of programs. + +### PRINT + +PRINT prints a list of expressions and string constants. The separator ';'' causes data to be concatenated while ','' inserts a space. This is different from MS BASIC print where ','' prints into data fields and ';'' inserts spaces is numbers are printed. Formatted printing is supported with the '#' modifier. + +Examples: + +PRINT "Hello World" + +PRINT A, B, C + +PRINT #6, A, B, C + +Tutorial programs: hello.bas and table.bas. + +A positive number aligns to the right Palo Alto BASIC style. A negative number aligns to the right side. Setting #0 removes the format. + +BASIC I/O is stream based. Streams are numbered. The console I/O on a POSIX system or Serial on an Arduino is stream number 1. Other prefefined stream numbers are 2 for displays, 4 for secondary serial and 16 for files. Please look at the file I/O section and the hardware driver chapter for more information. + +Printing to a display would be done with + +PRINT &2, "Hello World" + +while + +PRINT &16, "Hello World" + +prints to a file. + +PRINT ends a line with LF. No CR is sent at the end of a line. + +### LET + +LET assigns an expression to a variable. It can be ommited and is only added to the language set to ensure compatibility. Typical LET statement would be + +LET A=10 + +A=B/2+C + +Expression evaluation is done left to right with multiplication and division precedence before addition and subtraction. Comparision have lowest precedence and evalute true to -1 and false to 0. This is not C style boolean logic but closer to the old MS BASIC definition. With this, NOT, AND and OR in the Apple 1 language set can be used as bitwise operators because NOT -1 is 0. + +Strings evaluate to the ASCII value of the first character. + +A="A" : PRINT A + +outputs 65. + +The operator % calculates the integer divisions modulus. Example: + +B=A%2 + +to test divisibility. + +### INPUT + +INPUT accepts a list of string constants and variable. String constants are output and variable request a user input. A "?" prompt is only displayed if not string constant has been supplied. Example: + +INPUT "Input a number", A + +INPUT "First number: ", A, "Second number: ", B + +Until version 1.4. INPUT cannot read elements of string arrays. Only not indexed string variables are implemented. This is possible in 2.0 now. + +Like PRINT, the & modifier can be used to specify an input stream. + +INPUT &2, A + +would read data from the keyboard of a Arduino standalone system. + +In version 2.0 INPUT can do most of the things MS BASIC INPUT does. Arrays and string arrays are fully supported. The string substring notation can also be used in INPUT. + +Comma seperated input of numbers is fed into comma separated variable lists. Hence + +10 INPUT A, B + +accepts the user responses + +1, 2 + +or + +1 + +2 + +This works only for numbers. Strings have to be given in one line. INPUT still avoids buffering and does in place variable assignment for strings. This saves a lot of memory on small systems. + +For INPUT the # modifier limits the number of bytes in string input. This can be used to control I2C code and other low level functions. + +If the interpreter is compiled with HASTINYBASICINPUT as compile flag, number input can be expressions including variables. This means that + +INPUT A + +can process input in the form + +2\*4 + +X + +3+4\*(4+5) + +This was used in some Palo Alto BASIC programs like trek.bas. + +### GOTO + +GOTO branches to the line number specified. Expressions are accepted. Examples: + +GOTO 100 + +GOTO 100+I + +The later statement can be used to program ON GOTO constructs of Dartmouth BASIC. + +BASIC has a line cache and remembers jump targets to speed up the code. The size of this line cache depends on the hardware. 64 is default on real computers. + +### GOSUB and RETURN + +GOSUB is identical to GOTO and saves the location after the GOSUB statement to a return stack. RETURN ends the execution of the subroutine. + +The GOSUB stack is shallow with a depth of 4 elements on small Arduinos. This can be increased at compile time. On real computers default size is 64. + +### IF + +IF expects an expression and executes the command after it if the condition is true. 0 is interpreted as false and all non zero values as true in . Examples: + +IF A=0 GOTO 100 + +IF B=A PRINT "Equal" + +There is not THEN in the core language set. THEN is part of the Apple 1 language set. + +Boolean expression evaluation depends on the language modes. Default is that a true condition is -1. This can be changed with a SET command. + +### FOR loops + +FOR have the form + +FOR I=1 TO 10 STEP 2: PRINT I: NEXT I + +Specifying the parameter I in NEXT is optional. STEP can be ommited and defaults to STEP 1. + +Unlike in other BASIC dialects the loops. + +FOR I=10: PRINT I: NEXT + +and + +FOR I: PRINT I: NEXT + +are legal. They generate infinite loops that can be interrupted with the BREAK command which +is part of the extension language set. CONT advances the loop. This is borrowed from C. + +All parameters in FOR loops are evaluated once when the FOR statement is read. FOR loops use the memory location as jump target in NEXT. They are faster than GOTO loops. + +The statement NEXT I, J to terminate two loops is not supported. Each loop needs to have their own NEXT statement. + +### STOP + +STOP stops a program. There is no END in the core language set. + +STOP STOP ends the interpreter. + +### REM + +Comment line start with the REM statement. As BASIC tokenizes the entire input, comments should be enclosed in quotes. Example: + +10 REM "This is a comment" + +Alternatively + +10 REM This is a comment + +can also be used in BASIC > 1.3. + +### LIST + +Lists the program lines. Examples: + +LIST + +LIST 10 + +LIST 10, 100 + +The first statement lists the entire program, the second only line 10. The last statement lists all line between 10 and 100. + +### NEW + +Deletes all variables and the program code. Language settings made with SET are not reset. + +### RUN + +Starts to run a program. A line can be specified as first line to be executed. RUN deletes all variables and clears the stacks. GOTO linnumber can be used for a warm start of a program. + +### ABS + +Calculates the absolute value of a number. Example: + +A=ABS(B) + +### INT + +Calculates the integer value of a number. Example: + +A=INT(B) + +### RND + +Calculates a random number. The builtin random number generator is a 16/32 bit congruence code and is good enough for games and simple applications but repeats itself rather fast. The argument of the function is the upper bound. + +On an integer BASIC + +PRINT RND(8) + +would produce numbers from 0 to 7, while + +PRINT RND(-8) + +would produce numbers between -8 and -1. + +The random number seed can be changes by using the special variable @R. See the "special variable" section for more information. + +With SET 19, 1 the base of the random number can be changed to follow Palo Alto BASIC conventions. In this case numbers are created from 1 to 8. + +SET 19, -1 sets the random number generator to Microsoft mode. In this mode RND(x) always produces numbers between 0 and 1 (exclusively). Called with a negative argument, the random number generator is initlialized with the absolute value of the argument to start a new sequence. This is equivalent to setting the sequence with @R. Called with 0 as an argument the same number is created. Called with any positive argument new random numbers are produced. This setting can be used to make the interpreter more compatible to Microsoft BASIC interpreters. + +### SIZE + +Outputs the space between the top of the program and the bottom of the variable heap. It is the free memory the interpreter has. + +### Storing programs with SAVE and LOAD + +LOAD and SAVE are part of the core language set if the hardware has a filesystem. On POSIX systems (Mac, Windows, Linux) they take a file name as argument. Default is "file.bas". + +Arduino systems with only EEPROM support save the program to the EEPROM in binary format, overwriting all data on the EEPROM by it. + +If a file system is compiled to the Arduino code. The commands work like on a POSIX system. LOAD "!" and SAVE "!" can be used in these cases to access programs stored in EEPROM. + +File names must be strings. To load a program you need to enter + +LOAD "myprog.bas" + +i.e. with the filename enclosed quotes. + +Started from the command line, LOAD will merge a program loaded with the program already in memory. In RUN mode a LOAD replaces the program in memory, clears all FOR, GOSUB and DATA pointer but keeps the variables. This way a program can chain another program. + +### Special variables and arrays + +The character @ is a valid first character in variable names and addresses special variables. These variables give access to system properties. + +@() is an array of numbers starting from the top of memory down to the program area. It can be used like any other array in BASIC. Indexing starts at 0. + +@ is the upper array boundary of the array @() i.e. the number of elements in the array. + +The program area is protected by BASIC. The maximum index prevents a program to overwrite the program. + +@E() is the EEPROM array. It indexes the entire EEPROM area down from the highest address. + +@M() is the memory array. It is equivalent to @() but recalls individual bytes. + +@E is the number of elements in the EEPROM array. Unlike with the memory array @() there is no protection of saved programs in the EEPROM. @E() can overwrite the program space. + +@R is the random number seed. It can be written and read. + +@O is the currently active output stream. + +@I is the currently active input stream. + +@C is the next character of the input stream or output stream. + +@A is the number of available character of the current input stream. + +@S is the I/O error status. See the file I/O section for more information on it. + +@V is the number of characters processed in VAL(). + +@U is the user variable. It can be used to extend BASIC. + +@P is the accuracy of floating point compare operations. It is zero by default. Setting it makes A=B type of compares safer. + +@T is the time in milliseconds. + +@P() is the port array. + +The variables @O, @I, @C, and @A can be used for byte I/O on any stream. + +The array @T() is the real time clock array. @T\$ is a string containing date and time. See the hardware drivers section for more information. + +The string @A\$ is the command line argument on POSIX systems. See the hardware section for more details. + +@D() is the display array. It contains the display characters row by row. + +Some special variables are only present in some language sets. @D() comes with the display driver. @U, @M are part of Stefan's extensions. @T() only exists on systems with clocks. + +## Apple 1 language set + +### Introduction + +The Apple 1 language set is based on an early version of the Apple Integer BASIC. I never worked with the language and just took the information from the the manual. The language set adds many useful features like arrays, strings, two letter variables, boolean expressions and a few functions. Some BASICs for professional computers like CROMEMCO used BASICs like this. + +### Variables + +In addition to the static variable A-Z all two letter combinations which are not a keyword are legal variable names. Examples: + +A0, BX, TT + +Variables are placed on a heap that is searched every time a variable is used. With HASLONGNAMES enables, names can be up to 16 characters long. This is supported in BASIC 2.0. + +### Strings + +String variables can also have two characters followed by the \$ symbol. Example: + +ME\$="Hello World" + +Unlike in the original Apple 1 BASIC, strings can be used without explicitely dimensioning them. They are auto dimensioned to length 32. Strings are static. The entire space is allocated on the heap and stays reserved. This is very different from MS BASIC with a dynamic heap. The saves memory but requires a garbage collector. Static strings like in this BASIC need more memory but make the execution of time critical code more deterministic. + +A string can be dimensioned with DIM to any length. Example: + +DIM A\$(100), C\$(2) + +A string of maximum 100 bytes and a string of 2 bytes are created. The maximum length of a string is 65535 in the default settings of the code. See the hardware section of the manual for more information on this. + +Strings are arrays of signed integer. String handling is done through the substring notation. Example: + +A\$="Hello World" + +PRINT A\$(1,4), A\$(6,6), A\$(6) + +yields + +Hello W World + +as an output. + +Substrings can be the lefthandside of an expression + +A\$="Hello World" + +A\$(12)=" today" + +PRINT A\$ + +outputs + +Hello world today + +Please look into the tutorial files string1.bas - string3.bas for more information. The commands LEFT\$, RIGHT\$, and MID\$ do not exist in the core language set but are supplied as an extension in BASIC 2.0. + +The length of a string can be found with the LEN command. Example: + +A\$="Hello" + +PRINT LEN(A\$) + +String arrays are possible if the BASIC interpreter is compiled with the respective option. This is an extension of the Apple 1 language set. + +In BASIC 2.0 strings can be enclosed in two ways "This a string" or 'This is a string'. With this both, "'" and '"' are valid strings. + +### Arrays + +Arrays are autodimensioned to length 10. They start with index 1. If a different array length is needed the DIM command can be used. Example: + +DIM A(100) + +Array variables can be used like normal variables except that they cannot be active variables in a FOR loop. + +Compiled with the multidim options arrays can be two dimensional. This is an extension of the Apple 1 language set. + +Arrays range from 1 to the maximum index by default. The statement above reserves array elements from A(1) to A(100). + +With + +SET 12, 0 + +the array lower bound can be changed to 0. The array ranges from A(0) to A(99) now. It still has 100 elements. SET 12 can be used to set any postive lower bound. This holds for all arrays except the special arrays starting with @. It can be changed at any time as SET 12 only modifies the offset but not the memory location. + +Any setting with SET 12 will remain active even after NEW or CLR clears the interpreter state. See the section of the SET command for more information. + +SET 21, 1 changes the number of array elements that are allocated. In combination with SET 12, 0 the interpreter allocates array elements A(0) to A(100) if DIM A(100) is called. + +### Logical expressions NOT, AND, OR + +Logical operators NOT, AND, and OR have lowest precedence. They are at the same time bitwise logical operations on integers. Example: + +PRINT NOT 0 + +yields -1 which is an integer with all bits set. Logical expressions like + +IF A=10 AND B=11 THEN PRINT "Yes" + +can be formed. + +### Memory access with PEEK and POKE + +PEEK is a function which reads one byte of BASIC memory. Example: + +PRINT PEEK(0) + +outputs the first byte of BASIC memory. + +POKE writes a byte of memory. Example: + +POKE 1024, 0 + +If PEEK and POKE are used with negative numbers they address the EEPROM of an Arduino. -1 is the first memory cell of the EEPROM. Peek and poke return bytes as signed 8 bit integers. + +### THEN + +THEN is added for comaptibity reasons. Typical statements would be + +IF A=0 THEN PRINT "Zero" + +IF B=10 THEN 100 + +### END + +END ends a program. On systems with EEPROM dummies in flash memory, END also flushed the buffer. On system with file operations, END flushed the file buffers. + +### CLR + +CLR removes all variables and stacks. + +### HIMEM + +HIMEM is the topmost free memory cell. The difference SIZE-HIMEM is the size of the stored program. + +### TAB + +TAB outputs n whitespace characters. Example: + +TAB 20: PRINT "Hello" + +Statements like + +PRINT TAB(20); "hello" + +are supported in BASIC 2. Until BASIC 1.4 is was not supported in the core language. + +### SGN + +The SGN function is 1 for positive arguments and -1 for negative arguments. SGN(0)=0. + +### Multidim and String Array capability + +If BASIC is compiled with the HASMULTIDIM option, arrays can be twodimensional. Example: + +DIM A(8,9) + +A(5,6)=10 + +It also activates one dimensional string arrays. + +DIM A\$(32,10) + +dimensions an array of 10 strings of length 32. Assignments are done use double subscripts + +A\$()(3)="Hello" + +A\$()(4)="World" + +PRINT A\$()(3), A\$()(4) + +outputs + +Hello World + +The first pair of parentheses are the substring part and the second pair the array index. + +## Stefan's extension language set + +### Introduction + +The language extensions here are things I found useful and that were missing in Apple Integer BASIC. They are rather simple extensions of the language. + +### FOR loops with CONT and BREAK + +FOR loops can be ended with BREAK. Example: + +10 FOR I=1 TO 10 + +20 PRINT I + +30 IF I=8 THEN BREAK + +40 NEXT + +will end the loop after the 8th iteration. BREAK always ends the innermost loop just like the C break command. + +Alternatively CONT can be used to move forward in a loop. Example: + +10 FOR I=1 TO 10 + +20 IF I%2=0 THEN CONT + +30 PRINT I + +40 NEXT + +will only display the odd values. CONT skips the entire rest of the loop and skips to the next I. + +Using CONT and BREAK reduces the number of GOTO statements in a program and makes them more readable. + +### Command line CONT + +In interactive mode, CONT has a different function. It restarts a program previously stopped with STOP. + +### ELSE + +ELSE can be used after THEN in one line. + +IF A=0 THEN PRINT "Zero" ELSE PRINT "Not zero" + +In programs ELSE can also be on the subsequent line + +10 IF A=0 THEN PRINT "Zero" + +20 ELSE PRINT "Not zero" + +With the structured programming language set activated, multiline IF THEN ELSE is possible. + +### Character output with PUT and GET + +Single characters can be written and read with the PUT and GET statement. Like PRINT and INPUT, these commands can take the I/O stream as an argument after the & modifier. Example: + +GET &2, A + +reads a character into variable A from the keyboard I/O stream. + +PUT &2, "H", 65 + +writes to characters to the display I/O stream. The behaviour of PUT and GET is hardware dependent. On Arduinos they are non blocking byte streams. On POSIX systems GET is blocking input. + +### Low level functions USR + +USR is a two argument function accessing system properties. See the program hinv.bas in the tutorial for examples. USR can also be used to quickly add functionality to the interpreter. This will be explained in the hardware section of the manual. + +Example for USR: + +PRINT "The EEPROM size is ", USR(0,10) + +### Low level calls CALL + +CALL expects a numerical expression as an argumen. Currently only CALL 0 is implemented. It flushes all open files and ends the interpreter on POSIX systems. On Arduinos CALL 0 restarts the interpreter. + +### Setting system properties with SET + +SET is a two argument function setting system property. Please look into the hardware section of the manual for more information. Most but not all settings are properties of the runtime environment. + +Example: + +SET 0, 1 + +activates the debug mode of the interpreter. + +SET 0, 0 + +ends the debug mode. + +### SQR + +On an integer BASIC the function calculates an integer approximation of the square root. It is the number closest to the exact result. It can be larger or smaller then the exact result. Example: + +PRINT SQR(8) + +In floating point system the library function is used. + +See math.bas in the tutorial for more information. + +### POW + +This two argument function calulates the n-th power of a number. It replaces the '^' operator of some BASIC dialects. Example: + +PRINT POW(2,4) + +In integer systems POW calculates the result in a loop. It returns 0 for negative arguments of the exponent. In floating point systems the C function pow() is used and the result is returned. + +In BASIC 1.4 and the 2.x versions '^' is added in addition to POW to make BASIC more compatible. + +See math.bas in the tutorial for more information. + +### MAP + +MAP is taken from the Arduino library. It maps an integer in a certain range to another ranges using (at least) 32bit arithmetic. This is useful on 16 bit integer systems. Example: + +M=MAP(V, 1000, 0, 200, 100) + +maps the variable V from the range 0 to 1000 to the range 100 to 200. + +See math.bas in the tutorial for more information. + +### CLS + +Clears the screen on display systems. See VT52 capabilities for more information. + +### LOCATE + +Locates the cursor to position X, Y on the screen. Locate goes through the VT52 interface. The underlying terminal must either be ANSI compatible on POSIX systems or use the HASVT52 extension. + +### Debugging with DUMP + +DUMP writes a memory and EEPROM range to the output. Example: + +DUMP 0, 100 + +writes the first 100 bytes of the program memory. + +DUMP !0, 100 + +writes the first 100 bytes of the EEPROM. + +### Error Message capability + +Error messages are stored in Arduino program memory. For systems with low program memory undefining the #HASERRORMSG flag removes explicit error messages. + +### Terminal emulation and VT52 capability on display systems + +BASIC has a minimal set of terminal control characters build in. Compiling the code with the HASVT52 option adds a subset of the VT52 terminal commands for systems with displays. + +Most importantly + +PUT &2, 12 + +clears the screen. + +The special variables @X, @Y contain the cursor position. The variables are read write. + +@X=10: @Y=10: PUT "X" + +would write the letter X at position 10, 10. + +The array @D() is the display character buffer by column and row. It is also read write and can be used to display characters directly. + +Please look into the hardware section for the display driver commands. + +## Arduino I/O language set + +### Introduction + +Most of the standard Arduino I/O functions are available on BASIC. The Arduino standard examples have been ported to BASIC to showcase how they are used. Please look into the repo under examples/01basics to examples/10starter for these programs. + +Many Arduino I/O commands are also working an an Raspberry PI with Wiring or PIGPIO. + +### PINM + +PINM sets a pin to input, output, or input-pullup. Example: + +PINM 10, 0 + +PINM 11, 1 + +PINM 12, 2 + +sets pin 10 to input, pin 11 to output, and pin 12 to input with the pullup active. The values for the second argument may be implementation specific. Some microcontroller cores use additional values. The number given in BASIC is directly handed through to the pinMode() C++ function. + +### DWRITE, DREAD, and LED + +Digital I/O is done with DWRITE and DREAD. Examples: + +DWRITE 11, 1 + +A=DREAD(10) + +sets pin 11 to high and reads the value of pin 10 to variable A. + +The constant LED is the builtin LED on system. This can be microcontroller dependent. + +PINM LED, 1 + +DWRITE LED, 1 + +lights the buildin led. + +### AWRITE, AREAD, and AZERO + +For analog I/O the command AWRITE and the function AREAD can be used. The pin number in these commands has to be the low level pin code of the microcontroller. For Arduino AVR systems the lowest analog pin number is the pin after the highest digital pin. On an UNO this is 14. The constant AZERO is the number of the lowest analog pin. Example: + +PINM AZERO, 1 + +PINM AZERO+1, 1 + +PINM AZERO+2, 0 + +sets the analog pin a0 and a1 of an Arduino to output and the pin a2 to input. + +AWRITE AZERO, 100 + +AWRITE AZERO+1, 200 + +V=AREAD(AZERO+2) + +write 100 to pin a0, 200 to pin a1 and reads pin a2. + +Pin numbering can be tricky. More information can be found in the hardware section. + +### Timing with MILLIS and DELAY + +DELAY triggers a delay of n ms. Example: + +DELAY 1000 + +waits for one second. + +The function MILLIS measures the time in milliseconds divided by a divisor. Example: + +A=MILLIS(1) + +B=MILLIS(1000) + +A contains the time since start in milliseconds. B is the time since start in seconds. The divisor can be used in 16 bit systems to control overflow of a variable. + +### PULSE and PLAY extensions + +Two more compley Arduino I/O function are available from BASIC. + +PULSE reads a pulse on a pin if used as a function. The first argument is the pin number, the second whether a LOW=0 or HIGH=1 state is expected. The third argument is the timeout in milliseconds. Note the difference to the original Arduino pulseIN() where this is microseconds. The low level Arduino commands delivers the pulse length in microseconds. PULSE delivers the pulse length in 10 microsecond units to be compatible with Integer BASIC number ranges. Example: + +A=PULSE(4, 0, 100) + +PULSE was named PULSEIN in ealier vesions of BASIC. This was changed in version 1.4. + +As a command, PULSE writes pulses on a pin. Example: + +PULSE 4, 10 + +writes a 100 microsecond pulse on pin 4. Optional arguments are the value the pin is to be changed. Default is 1 assuming that the pin has been set to 0 before. Example: + +DWRITE 4, 1 + +PULSE 4, 10, 0 + +writes a 100 microsecond LOW pulse to the pin and then sets the pin again to HIGH=1. + +An number of repetitions and an intervall can be specified as well. Example: + +PULSE 4, 1, 1, 10, 100 + +writes 10 pulses with 1000 microseconds time difference of length 10 microseconds on pin 4. + +The time unit of PULSE can be changes with SET 14, timeunit. Example: + +SET 14, 1 + +sets the unit PULSE uses to 1 microsecond. + +PLAY is a wrapper around the Arduino tone() function for Arduino systems. For ESP32 VGA systems it is mapped to the sound generator function of the FabGL library. More information on this can be found in the hardware section. + +## File I/O language set + +### Introduction + +For systems with a filesystem there is a set of file access commands. Only one directory is supported. The file system command cannot handle subdirectories. One open file for read and one open file for write or append is supported. The file I/O commands mask the different underlying filesystems. Currently EEPROM EFS, SD, ESPSPIFFS and LittleFS are supported. Look for more information in the hardware section. + +### Opening and closing files with OPEN and CLOSE + +Files are opened with the OPEN command. Open needs a filename and optionally a file open mode as argument. As a file open mode 0 is read, 1 is write and 2 is append. Read mode is the default is no argument is given. Examples: + +OPEN "data.txt" + +OPEN "data.txt", 0 + +OPEN "temp.txt", 1 + +OPEN "append.txt", 2 + +The first two commands are equivalent, the file "data.txt" is opened for read. The second line opens "temp.txt" for write. A new file is created if it doesn't exist. If the file exists writing starts at the beginning and existing data is overwritten. The third commands opens the file for append. + +File name lengths are filesystem specific. The maximum length in BASIC is 32 characters. + +Files that have been written need to be closed not to lose the data. CLOSE without an argument closes the read file. This is not really necessary. CLOSE 1 or CLOSE 2 close the write file. Opening a new file automatically closes an open file. + +OPEN and CLOSE and be used to open and close other I/O streams as well. For this, a file modifier can be added. Example: + +OPEN &7, 64, 1 + +This command opens the Wire stream for write addressing the device 64 as a target. + +If the modifier & is ommited, it is always assumed that the file stream &16 is meant. + +See the hardware section for more information on supported filesystems. + +### DOS commands CATALOG, DELETE, FDISK + +CATALOG lists the files in the filesystem. Am optional string pattern can be used to list only file that begin with it. Example: + +CATALOG + +CATALOG "da" + +The first command lists all file, the second one all file beginning with the pattern "da". This is equivalent to the da* notation on the UNIX or MSDOS command line. + +DELETE deletes one file. The name has to match exactly. No pattern matching is supported. + +FDISK formats a file system. This is not supported for all file systems. Arguments depend on the hardware implementation. Please look in the hardware section for more information. + +### Reading and writing with INPUT, PRINT, and the error variable @S + +Files can be written and read with PRINT and INPUT adding the file stream modifier. The I/O stream number for files is 16. Example: + +PRINT &16, "Hello World" + +writes "Hello World" to the open write file. + +INPUT &16, A\$ + +reads the string A\$ from the file. INPUT can have comma seperated arguments and reads comma separated data from BASIC 2.0 on. + +I/O operations ususally report no errors on the console and keep the the program running if an error occurs. The variable @S contains the error status of the operation. @S has to be reset explicitly before using it because it remembers and error status of previous operations and is never reset by the interpreter. Example: + +@S=0 + +INPUT &16, A$ + +IF @S=-1 THEN PRINT "End of file reached" + +@S takes the value -1 for the end of file condition. For general error it takes the value 1. + +Tutorial: fileio.bas + +### Character IO with GET and PUT + +Like PRINT and INPUT, the byte I/O command can take a stream modifier. Example: + +GET &16, A + +would read one byte from the file putting the signed ASCII value to variable A. + +## Float language set + +### Introduction + +Floating point arithemtic is taken from the standard C float library of the platform. The size of the numbers is the size of the base type number_t in the C code. It is set to float as a default but can be changed to double. + +### SIN, COS, TAN, ATAN + +The trigonometric function are standard BASIC. They are using radians as angle format. Examples: + +PI=4\*ATAN(1) + +PRINT SIN(PI)\*SIN(PI)+COS(PI)\*COS(PI) + +PI is not a predefined constant but can be calculated using ATAN. The second line should output 1. + +Tutorial: trig.bas + +### LOG and EXP + +LOG is the natural logarithm and EXP the exponantial function. + +Tutorial: stir.bas + +### Floating point precision + +Floating point numbers are displayed as integers if they are smaller then 1e8. Numbers from 1e8 on are displayed in exponential notation. Numbers smaller then 1e-8 are also displayed in exponential notation. + +The biggest accurate integer in a 32 bit float is 16777216. The number can be recalled in BASIC by USR(0, 5). + +## Dartmouth language set + +### Introduction + +Since the early days of BASIC there were a few language features which I summarized as Dartmouth extension. DATA and DEF were in the First Edition of Dartmouth BASIC in the early 1960. ON appeared in the Fourth Edition in 1968. + +### DATA, READ, and RESTORE + +Data statements can be anywhere in the program. Data items can be strings or numbers. Example: + +10 DATA "Hello", 3.141, "A" + +READ A\$ : PRINT A\$ + +READ A: PRINT A + +READ C: PRINT C + +Will print + +Hello + +3.141 + +65 + +Strings have to be in quotes. Reading data with the READ command converts the data in the same way than the assignment commands. Strings reading numbers with contain the respective ASCII character. Numbers reading strings will contain the numerical ASCII code. + +Unlike other BASIC versions, reading past the end of DATA will not lead to an error. The status variable @S will contain the value 1 once one reads past the last DATA item. @S has to be resetted explicitely after this. + +RESTORE resets the data pointer. + +From BASIC v1.4 on argument lists are also supported in READ. + +In READ, the two index substring notation like A\$(3,3) is supported from BASIC 2 on. In earlier versions READ will interpret this as A\$(3) and append the read string. + +RESTORE can also be used with an argument. In the code segment + +10 RESTORE 3 + +20 READ A: PRINT A + +30 DATA 1, 4, 9, 16 + +the READ statement will access the third argument of the DATA list, hence the output will be 9. + +DATA can be used in expressions. After the code above has run + +PRINT DATA + +will output 4 indicating that the data pointer will read the 4th argument after the next read. This feature can be used to store a position of the DATA list and then return to it. + +10 R=DATA + +20 ... some lines doing many READs + +100 RESTORE R + +the data pointer will be reset to the original position before reading was done. + +Tutorial: readdata.bas + +### DEF FN + +Functions can have one numerical argument and a two character name. Example: + +10 DEF FN TK(X) = X+SIN(X) + +Functions have to be DEFed before use. Redefinition is allowed. Functions without an argument are allowed as DEF FNPI()=4\*ATAN(1). + +Tutorial: func.bas + +In BASIC 2 there is an extended language set, activated by the macro HASMULTILINEFUNCTIONS. With this, constructs like + +10 DEF FNA(X) + +20 IF X>10 THEN RETURN 1 ELSE RETURN 2 + +30 FEND + +are possible. Function can be multi line. Return values are give as an argument of RETURN. In multiline functions, GOSUB statements are not allowed. The interrupts of AFTER, EVERY, and EVENT are disabled in multiline functions. ERROR handling is also disabled. + +These restrictions are needed for interpreter state consistency as the multiline function calls a separate interpreter instance. It is a bit like starting BASIC in BASIC. Currently all interrupt functions are implemented single instance and do not know about their function context. This would require a major rewrite of this code and will not happen for some time. + +Multiline functions invoke a new instance of the core interpreter loop. This costs memory. Maximum depth of multiline function calls is 4. This is a parameter set in basic.h. For real computers this limit can be extended a lot an recursive programming is possible. The limit of 4 is set only for smaller Arduinos. + +With the multiline function extension, functions can be called as statements. The functions + +10 DEF FNP(X) + +20 PRINT X+4 + +30 FEND + +can be called as + +100 FNP(10) + +The multiline function construct was rarely implemented in microprocessor BASICs. They appeared in many early dialects from Dartmouth to DEC BASIC. + +All variables in multiline functions are local. New variables will be deleted after RETURN. Global variables have to be defined in the gobal name space. + +### ON + +ON is used in combination with GOTO or GOSUB arguments. Examples: + +10 ON X GOTO 100,200,300 + +Tutorial: ongo.bas + +ON can also be used in combination with the ERROR and EVENT command. This is for compatibility with other BASIC dialects. + +## Darkarts language set + +### Introduction + +The dark arts language set contain a set of command which can cause problems. BASIC is a beginner language and protects the user from dangerous things. This makes it somehow rigid. The three dark arts commands give access to the inner working of the heap and the program storage. They have side effects and can destroy a running program. CLR is extended in dark arts. It can delete variables from the heap. + +### MALLOC + +MALLOC allocates a junk of memory on the heap and returns the address. The function receives two arguments. One is the identifier. It is a 16 bit integer. The second argument is the number of bytes to be reserved. Example: + +A = MALLOC(1, 64) + +This reserves 64 bytes which can be accessed with PEEK and POKE as 8 bit signed integers. + +MALLOC helps to reserve storage in a controlled way. It is no side effects and can be used savely as long as the POKEs stay within the allocated range. + +Tutorial: malloc.bas + +### FIND + +FIND finds a memory segement on the heap. It can be used to find memory segements allocated with MALLOC but it also finds variables, strings and arrays. + +In all of these examples the argument of the function is the name of an object and not an expression. It has to be the pure string or array without any subscripts. + +All heap variables can be searched. Example: + +A0=10 + +PRINT FIND(A0) + +This command outputs the address of the variable A0. The variable is stored with the least significant byte first. The size of the variable area is the size of number_t. It is 2 bytes for integer BASICs and 4 bytes for floating point BASICs. + +Arrays are searched by specifiying the array name without arguments. Example: + +DIM A(8) + +PRINT FIND(A()) + +Arrays are stored like variables with the lowest array element first. + +Strings can be searched as well. Example: + +A\$="Hello World" + +PRINT FIND(A\$) + +This command outputs the address of a string. If A$ is a pure string and not a string array, the first byte is the least significant byte of the length of the string. The second byte is the most significant byte of the length for 16 bit strings. All following bytes are payload. Strings are not necessarily 0 terminated. One has to process the length in all code accessing strings directly. + +If a memory segment allocated with MALLOC needs to be searched, a numerical expression can be specified. Example: + +A = MALLOC(1, 64) + +PRINT FIND(1) + +If the segment to be searched is stored in a variable, FIND has to be called like in this example: + +M=1 + +PRINT FIND((M)) + +Note the inner braces around M. They are needed here as they trigger expression evaluation. This is unusual for BASIC interpreters. + +FIND itself has no side effects but POKEing around in the heap area can kill the interpreter if the structure of the heap list is destroyed. + +Tutorial: find.bas + +### EVAL + +EVAL adds a new line to the BASIC code at runtime. Doing so has many side effects and EVAL does not protect you in any way. Examples: + +10 EVAL 20, "PRINT X" + +20 PRINT "Hello World" + +RUN + +LIST + +In the examples above line 20 is replaced by the string in the EVAL command. + +EVAL includes the line to the program heap. This changes memory addresses of all code behind the inserted line. FOR loops, GOSUB commands, the linenumber cache and READ/DATA statements use plain memory addresses. This means that the DATA pointer, all active FOR loops and active GOSUBs break. A safe way to use EVAL is to change only lines further down in the code outside of any active FOR loop and to RESTORE the DATA pointer after EVAL. + +See eval.bas in the tutorial for more information. + +### CLR + +In the standard language sets CLR deletes all variables and resets stacks and caches. With dark arts enables it is extended to delete variables from the heap. Example: + +10 DIM A(10) + +20 CLR A() + +30 DIM A(20) + +In this example the array A() is deleted and can be redefined. + +All variables defined after A() are also deleted. Example: + +10 DIM A(10) + +20 B$="Hello World" + +30 CLR A() + +40 DIM A(20) + +In this examples B$ is also deleted. All variables defined after the object to be clear are deleted as well. The heap is simply reset to the previous state. This mechanism can be used to define local variables in subroutines. Simply clear the first variable defined in the subroutine before calling RETURN. + +## IOT language set + +### Introduction + +The IoT language set are commands needed to use IoT services. They help to implement I/O function. This part of the interpreter is under active development. Some commands may change in the future. + +### AVAIL + +AVAIL returns the number of characters ready for input on an input stream. Example: + +PRINT AVAIL(4) + +returns the number of characters on input stream 4 which is the secondary serial port. The function is hardware dependent. + +### String commands INSTR, VAL, and STR + +INSTR finds a character in a string and returns the index. Example: + +A\$="1, 2, 3" + +A=INSTR(A\$, ",") + +finds the first comma in the string. INSTR can be used to split strings. See splitstr.bas in the tutorial for more information. + +In BASIC 2 INSTR is fully implemented. The second argument can be a string and not just a single character. For this, the interpreter has to be compiled with HASFULLINSTR defined in language.h. This settings is normally on if HASMSSTRINGS is set. + +VAL scans a string for a number and returns the value. If no number is found the return value is 0. Example: + +A\$="125" + +A=VAL(A\$) + +VAL uses the special variable @V to report back the number of characters in the number. The status of the conversion is stored in @S. If @S is 0 after a conversion a number was found. Otherwise @S is 1. @V is set to the number of characters only if the conversion was succesful. + +If the setting HASNUMSYSTEM is on in BASIC 2, VAL can process hexadecimal, octal and binary constants. These constants begin with 0x for hex, 0o for octal, and 0b for binary. The letter can also be uppercase. Examples would be 0xFF, 0b100110, 0o4750. The maximum length of the entire string is 32 characters. This limits the number range of binaries. Example: + +PRINT VAL("0xFF") + +which would output 255. + +STR converts a number to a string. Example: + +A\$=STR(125) + +IF the interpreter is compiled with HASNUMSYSTEM in BASIC 2, STR can have a second argument defining the number base of the conversion. This can be any number but the range is limited by the ASCII character set available. Example: + +PRINT STR(255, 16) + +gives the output FF. + +Tutorial: splitstr.bas, converst.bas + +### SENSOR + +SENSOR is the generic sensor interface. It handles sensor drivers in the hardware dependent code. The first argument of the function is the sensor number. The second argument can be used to indentify interal properties of the sensor. If the second argument is zero, SENSOR returns if the sensor code is available. Example: + +10 IF SENSOR(1, 0)=0 THEN PRINT "no DHT11 sensor detected": END + +20 PRINT SENSOR(1, 2) + +The first command looks if there is a DHT temperature sensor. The second command read the temperature value. + +### SLEEP + +SLEEP puts a system into deep sleep mode. It requires one argument which is the sleep time in milliseconds. The command is currently only implemented on ESP8266 and ESP32 systems. The microcontroller restarts after deep sleep. This command needs to be used with an autostart program. + +### NETSTAT + +In command mode NETSTAT displays the network status. It is implemented for all Wifi systems and Arduino Ethernet. As a arithemtic constant it returns a network status. With 0 the system is not connected. 1 means connected but no MQTT connection. 3 is network and MQTT connected. + +The network code is under active development. + +## Timers and interrupts + +BASIC can handle time interrupt and interrupts from external sources. + +There are two timers implemented. The AFTER timer causes an action once and is then reset. The EVERY timer triggers events periodically until stopped. Both timers use millis() as time source. Timer events are only processed if a program is running. In interactive mode both timers are stopped but continue running. + +EVENT processes external interrupts. + +### AFTER + +The AFTER timer is started with the command + +10 AFTER 1000 GOTO 100 + +After 1000 milliseconds the interpreter branches to line 100. The command + +10 AFTER 500 GOSUB 200 + +will GOSUB to line 200. A RETURN will resume program execution whereevery the program has been interrupted. + +AFTER 0 + +disables the execution of the after command. + +AFTER 1000 + +will start the after timer again with a new time period of 1000 ms. The GOTO and GOSUB argument of the previous after are reused. + +### EVERY + +EVERY syntax is exactly like AFTER but the event is running periodically. + +### EVENT + +EVENT listens to an interrupt and branches to a line number. In the statement + +EVENT 2,0 GOSUB 1000 + +pin 2 is used as an interrupt pin with mode 0, which is interrupt on low. Every time the pin goes to low BASIC calls the subroutine at line 1000. + +EVENT 2,0 + +without the GOSUB argument deletes the interrupt. + +After the event is processed, the interrupt is automatically disabled. The RETURN statement enables the interrupt again. + +Allowed interrupt modes are + +0: LOW + +1: CHANGE + +2: FALLING + +3: RISING + +The EVENT statement does not set the pin mode of the pin. This has to be done with PINM in the BASIC program. A typical program could look like this: + +10 PINM 2,2 + +20 EVENT 2,2 GOSUB 1000 + +30 Some code + +1000 PRINT "Event triggered": RETURN + +The PINM command sets the pin to INPUT_PULLUP and the EVENT commands waits for the pin to be pulled down to low. It triggers the interrupt on the falling signal. While the PRINT statement is processed, no further interrupt is accepted. After return the interrupt is reenabled. + +Events can be disabled with the command + +EVENT STOP + +Events can be reenabled with the command + +EVENT CONT + +All events are cleared with + +EVENT CLR + +Like the ERROR command, EVENT can be used with ON. + +ON EVENT 2,0 GOSUB 1000 + +is equivalent to the command above. + +### Credits and a word on timing + +Both AFTER and EVERY have been taken from the legendary Locomotive BASIC. In this BASIC dialect, only GOSUB was available and the time scale was 20 ms. There were 4 individual timers. Full featured Locomotive BASIC timers are on the feature list for future releases. + +BASIC can handle 1ms interrupts even on an Arduino UNO if there is not much I/O going on. Typically, 35 BASIC commands are processed in a ms by the interpreter core. It is good practice to disable interrupts with EVERY 0 at the beginning of the interrupt subroutine and to reenable it with EVERY n immediately before return. + +## Error handling + +### Errors in general + +In BASIC there are two types of errors. Some conditions are just exceptions and the program will continue normally. Examples are reading past the end of a file or reading past the last DATA item. These operations set the flag @S to an appropriate value. BASIC language errors clear the stacks, print an error message and the program is terminated. Variables and the program pointer are preserved. The program can be continued with CONT. Effectively, an error leads to a STOP of the program plus loss of GOSUB and FOR stack information by default. + +### Error trapping + +If BASIC is compiled with the HASERRORHANDLING option, error behaviour can be controlled with the ERROR command. + +The code line + +10 ERROR GOTO 1000 + +would jump to line 1000 when an error is encountered. As the FOR and GOSUB stacks are cleared on error, the code from 1000 on must handle all operations to restart the program if needed. After the jump, the error handling is reset to normal behaviour, i.e. stop on error. Using the keyword ERROR as a variable returns the error code. + +ERROR STOP + +will switch off error handling and go to normal behaviour. It also resets the error code to 0. + +ERROR CONT + +causes the program to continue even in case of an error. + +ERROR can be used with ON. So + +10 ON ERROR GOTO 1000 + +is the same as the line above. + +### Error codes + +Currently the following error codes are supported. + +Syntax error: 10 + +Number error: 11 + +Division by zero: 12 + +Unknown line: 13 + +Out of memory: 14 + +Stack error: 15 + +Index or parameter out of range: 16 + +String operation error: 17 + +Error in variable handling: 18 + +Error in loop handling: 19 + +File errors: 20 + +Function errors: 21 + +Number or type of arguments wrong: 22 + +EEPROM errors: 23 + +SDcard errors: 24 + +Some of the errors are technical errors and should never appear if the interpreter works properly. In addition to this error codes all token values can appear here. This happens if a specific error in a command occurs. Typically this would be RETURN without a GOSUB or the loop commands. + +## Graphics language set + +### Introduction + +The graphics language set is a thin layer over the low level graphics functions of the graphics driver. They try to be as generic as possible and avoid driver specific code. Some of the commands behave differently on different platforms. The graphics commands were first implemented with an SD1963 TFT in mind. Currently various monochrome and color displays are supported. + +### COLOR + +Sets the color of the graphics pen. COLOR either accepts either 3 arguments for rgb color or one argument for vga like colors. The exact color palette depends on the graphics driver. Example: + +COLOR 255 + +COLOR 100, 100, 100 + +### PLOT + +PLOT draws one pixel on the display. The coordinate system starts at the upper left corner of the display. First arguments is the x coordinate, second argument is the y coordinate. Example: + +PLOT 100, 100 + +A pixel is drawn in the colour specified by the COLOR command. + +### LINE + +LINE draws a line from one point to another. Example: + +LINE 100, 100, 200, 200 + +### CIRCLE and FCIRCLE + +CIRCLE and FCIRCLE draw a circle or filled circle around a point on the canvas with radius r. The last argument is the radius. Example: + +CIRCLE 100, 100, 50 + +### RECT and FRECT + +RECT and FRECT draw a rectangle or filled rectangle. The first pair of argument is the left lower corner. The second pair is the right upper corner. Example: + +RECT 100, 100, 200, 200 + +## Structured Language Set + +### Introduction + +The structured language set introduces a few loop and conditional statements into BASIC for a more GOTO free code. The curent implementation is not GOTO save. This means that jumping out of loops and into loops is possible but not handled by the interpreter in a save way. Nested loop errors are also not always detected. + +### WHILE and WEND + +WHILE starts the loop and tests a condition. The terminal statement is WEND. Loops can be advanced with the CONT command just like in FOR. BREAK ends the loop. + +Example: + +A=0: WHILE A<10: PRINT A: A=A+1: WEND + +### REPEAT and UNTIL + +For loops with a condition at the end, use REPEAT and UNTIL. + +Example: + +A=0: REPEAT: PRINT A: A=A+1: UNTIL A>10 + +### SWITCH, CASE and SWEND + +BASIC has a construction similar to the C style switch. + +Example: + +10 INPUT A + +20 SWITCH A + +30 PRINT "default" + +40 CASE 1,2: PRINT "one or two" + +50 CASE 3: PRINT "three" + +60 SWEND + +Unlike C the default code has to come immediately after the SWITCH statement before the first CASE. CASES can have comma separated lists as arguments. All statement until the next CASE are executed if the variable A matches the argument. Unlike C no BREAK statement is needed. + +In CASE statements can be multiline. + +In the current version the SWITCH statement cannot be nested. There can be no SWITCH in a SWITCH. This will be changed in future. + +Example: + +10 INPUT A + +20 SWITCH A + +30 PRINT "default" + +40 CASE 1,2 + +41 PRINT "one "; + +42 PRINT "or two" + +50 CASE 3: PRINT "three" + +60 SWEND + +### Grouping statements with DO and DEND + +Statements can be grouped with DO and DEND in IF THEN ELSE constructions. + +Example: + +10 INPUT A + +20 IF A=0 THEN + +30 DO + +40 PRINT "A is " + +50 PRINT "zero" + +60 DEND + +70 ELSE PRINT "A is not zero" + +## BASIC 2 language extensions + +BASIC 2 seperates the runtime environment from the interpreter code. In addition to this more technical change and removal of technical debts it also adds new features. As tokens can now be two byte long, there is no limit any more on the number of commands. + +### String compatibility with MS Basics + +In BASIC 2, string functions are supported. Currently RIGHT\$(), LEFT\$(), MID\$(), CHR\$() and ASC() are implemented. Strings can be concatenated using the + operator. These functions are there for compatibility. They are not really needed as the subscript notation offers all the necessary functionality. + +Note that the underlying string code is still static, i.e. it has no garbage collection and no dynamic string space. For this reason functionality and compatibility are limited. This is done by design. + +Examples: + +10 A\$="abcd" + +20 PRINT RIGHT\$(A\$, 2) + +30 PRINT LEFT\$(A\$, 2) + +40 PRINT MID\$(A\$, 2, 2) + +On RUN produces the output + +cd + +ab + +bc + +as in all classical BASIC dialects. + +String function cannot be nested. It is illegal to do + +RIGHT\$(LEFT\$(A\$)) + +as the string code is internally not recursive at the moment. This might change in the future. Only string variables and constants are allowed as arguments. + +String addition is supported in the standard way but only in assignments. The program + +10 A\$ = "abcd" + +20 B\$ = "efgh" + +30 C\$ = A\$ + B\$ + +40 PRINT C\$ + +produces the output + +abcdefgh + +String addition is done in place. The right hand side is copied step by step to the left hand side. If a string variable appears on both sides the result depends on the order. + +A\$ = A\$ + "hello" + +adds "hello" at the end of the variable as expected. + +A\$ = "hello" + A\$ + +produces + +PRINT A\$ + +hellohello + +as the first assignment copies the string "hello" to the variable and the second term is then just taken from the variable again. There is no string buffer right now storing intermediate results. Everything is directly done in place. That's why the MS string code is only implemented in assignments. Addition can not be used in functions like RIGHT\$(A\$+B\$) because there is no static space for the string to be copied to. + +The compatibility code also includes CHR\$() and ASC(). They convert a number to a string and back. + +TAB can be used in print commands as well. + +PRINT TAB(20); "hello" or PRINT TAB(20) "hello" is legal now and produces the same result as TAB(20): PRINT "hello" + +### The line editor + +The EDIT command starts a vi style line editor optimized for serial terminals. The line number has to be given as an argument. + +With the program + +10 PRINT "hello world" + +in memory, the editor can be started by calling + +EDIT 10 + +It produces the two line output + +10 PRINT "hello" + +^ + +The arrow below the line is the cursor position. The following commands are supported + +j: move cursor left + +k: move cursor right + +^: go to beginning of line + +$: go to end of line + +:: got to the next colon + +x: delete cursor character + +X: delete all characters until end of line + +s: substitute cursor character + +i: insert at cursor position + +a: append at end of line + +Q: exit the editor without saving + +u: undo all edits and stay in editor + +Key bindings to terminals are in preparation. A full editor is also in the backlog but not yet scheduled for implementations. + +### The HELP command + +Typing HELP will display the commands and the language set of the interpreter. HELP will be extended to a full help system later. + +### Bitwise arithemtic operators + +In BASIC 2 two operators and one function have been added for bitwise operations. The operators >> and << shift the value on the left side bitwise. The logic is like in the C programming language. Operator precendence is equivalent to multiplication. Typical use would be + +PRINT 1<<2 + +output is 4. + +These operator cast the numbers to the platforms integer type, do the shift and then cast back to the number type. This limits the accuracy on platforms where integer and float have the same length. On 32 bit platforms the maximum accurate integer stored in a float is 16777216 which is 24 bit. Accurate 32 bit operation of these function would require the interpreter to be compiled with 64bit floats. This can be defined in basic.h. + +Testing of individual bits is done with the BIT function. It is meant to be used in boolean expressions. + +Example: + +IF BIT(255, 1) PRINT "bit set" + +will return "bit set." as bit 1 of the number is set. + +The numerical value of BIT depends on the interpreters boolean mode. If the bit is not set the answer is always 0. If the bit is set the answer will be either -1 or 1. + +# Hardware drivers + +## Buildin Programs + +BASIC 2.x can have a few BASIC programs compiled into the code. They have to be provided in modules like buildin.h. This feature is activated by setting HASBUILDIN in hardware.h and setting the right BUILDINMODULE. + +Buildin programs can be loaded and saved with LOAD and SAVE. They can be openend and read with OPEN and they can be shown with CATALOG. + +These programs are always scanned first, hence a program with the same name on the filesystem cannot be accessed. Best use a name convention or prefix that distinguished the build in programs from normal programs. If the characters _ or . are used as prefixes for the build in program, they are invisible for CATALOG. + + +## I/O Streams + +### Introduction + +BASIC I/O goes through input output streams. Every stream has an integer number. Sending data to a stream sends it through to a device driver. These device drivers handle the underlying OS or microcontroller cores. The logic is as close as possible to the Arduino stream class. + +Streams are + +1: Console input and output + +2: Keyboard or keypad input and display output + +4: Secondary serial stream + +7: I2C protocol + +8: RF24 radio interface + +9: MQTT network connection + +16: File I/O + +All other stream numbers are currently unused but will be allocated to drivers in the future. The stream numbers below 32 should not be used for extensions. + +Stream numbers are agruments of the modifier of OPEN, CLOSE, PRINT, INPUT, GET and PUT. Typical commands would look like: + +INPUT &2, A$ + +PRINT &4, "Hello world" + +GET \$2, A + +PUT &16, "A", "B" + +The expression after & is the I/O stream number. + +There is a default I/O stream compiled into the code. For systems not compiled with the STANDALONE option this default stream is the console stream 1. If the STANDALONE option is used, the default stream is 2. + +The active I/O stream can be changed by stetting the special variable @O for output and @I for input. The two code lines + +10 @O=2: PRINT "Hello World" + +and + +10 PRINT &2, "Hello World" + +both write "Hello World" to the display. + +The active I/O stream is always reset to the default stream once the interpreter changes to interactive mode. This is a failsafe to avoid a program to shut out a user permanently. + +The default stream can be changed permanently with the SET command. + +SET 3,0 sets the default output stream to console. + +SET 3,1 sets the default output stream to display. + +SET 5,0 sets the default input stream to console. + +SET 5,1 sets the default input stream to display. + +### Serial Stream + +Stream 1 is the default serial I/O stream on Arduino IDE programmed microcontrollers and it is standard input and output on POSIX like systems. The behaviour of stream 1 differed between the two version. + +On microcontrollers stream 1 is a true byte I/O stream and non blocking. The command + +GET A + +will return immediately and return 0 in the variable A if no character is available on the stream. The function AVAIL(1) or the special variable @A will return the correct number of characters in the serial buffer. If there is no character, the result will be 0. + +On POSIX systems, getchar() is used on OS level. This means that I/O on stream 1 is blocking. + +GET A + +will wait for a character. AVAIL(1) or @A will always return 1 to make sure that a program like this + +10 IF AVAIL(1)<>0 THEN GET A + +runs correctly on both archtitectures. + +For line oriented input with the INPUT command, the difference is irrelevant. INPUT works in the same way on both system types. + +There is currently no mechanism to change the precompiled baud rate of the serial stream at runtime of a BASIC program. Default in the interpreter code is 9600 baud. This can be changed at compile time by changing serial_baudrate in the code. + +A line end is LF, which means ASCII 10. This is UNIX style end of line. DOS and other systems usually send CR LF which is 13 10 in decimal ASCII. If you use a terminal program to interact with BASIC, "only LF", should be configured in the settings. Currently stream 1 cannot be reconfigured to use LF CR. Stream 4, the secondary serial stream, can use CR LF. This is mostly relevant for input. + +### Display and keyboard drivers + +Keyboard and display are accessed through stream 2. Only one device can be present, i.e. one keyboard and one display. Multidisplay or multikeyboard systems are not supported. Stream 3 is reserved for these usecases but currently not implemented. + +BASIC currently supports either PS2 keyboards and the keypad of the LCDSHIELD as input device. For PS2 keyboards on standard Arduino systems the patches PS2keyboard library should be downloaded from my repo for optimal functionality. It implements keyboard.peek() which has a few advantages. + +PS2 keyboard input is buffered and non blocking. AVAIL(2) gives the correct number of characters in the keyboard buffer. + +GET &2, A + +return 0 if no character is present and the ASCII value if a character is there. + +GET &2, A\$ + +transfers the result directly in the string A$ as a first character. The string is empty if no key was pressed. + +The keymap is compiled into the code. A few standard US or European keymaps are supported. + +If the code is compiled with the LCDSHIELD option, the keys of the shield can be used to input data. The "select" key of the shield is mapped to ASCII 10 means "end of line". The arrow keys of the shield are mapped to the digits 1 to 4. + +INPUT &2, A + +can be used on an lcd shield for number input. The command returns after select and A has a valid number. Alternatively + +INPUT &2, A\$ + +will enter a string consisting of the digits 1 to 4. + +GET &2, A + +will contain either 0 if no key is pressed or the ASCII code of the key. The command will wait until the key is released. Keypad input is unbuffered. No interrupt or timer function is currently implemented on keypads. This will change for future releases of the code. + +ASCII output to a display is sent through the output stream 2. Displays are handled by a generic display driver. For low memory systems the display driver supports a non scrolling / unbuffered mode. Only a few basic display functions are supported. If there is enough memory, the display driver can be compiled in scrolling / buffered mode. For the the option DISPLAYCANSCROLL has to be defined in hardware-arduino.h (1.x) or hardware.h (2.x). All characters are buffered in a display buffer which can be accessed byte wise. + +In non buffered mode the display driver has the following functions: + +The cursor of the display can be accessed special variables @X and @Y. Both variables are read/write. One can find out where the cursor is and set its position. Output with PUT &2 and PRINT &2 goes to the next cursor postion. + +ASCII character 7 is the bell character. It calls the dspbell() function which is empty by default. Any action can be implemented here. + +ASCII character 8 is backspace and delete. This is needed for compatibility with certain terminals. + +ASCII character 9 is tab to the next multiple of 8 tab stop. + +ASCII character 10 goes to the beginning of next line (Unix style LF). + +ASCII character 11 is vertical tab, going to the next line in the same column. + +ASCII character 12 clears the display. PUT &2, 12 is clear screen on the display. + +ASCII character 13 goes to the beginning of the currently line (true CR). + +ASCII character 127 goes back one cursor position and clears the character. It is "delete". + +ASCII character 27 (ESC) sets the terminal to esc mode and triggers vt52 character interpretation. + +ASCII character 2 (STX) sends the cursor to the home position. This feature will also be used for Epaper support in the future. + +ASCII character 3 (ETX) is used for page mode displays to trigger the redraw. + +Buffered displays add scrolling. Once the cursor goes beyond the last line, the display is redraw with the first line disappearing. This is simple line based software scrolling. + +Each character in the display is buffered a display buffer. This buffer can be accessed through the special array D(). Writing to the array immediately display the character on the display. Reading from it gives the displayed character at the index position. The array starts from 1. The index advances by column and then by row. + +Currently LCD displays 16x2 and 20x4, Nokia 5110, ILI9486, ILI9488, SSD1306, and SD1963 are supported. All these displays use 8x8 or 16x16 fonts. Nokia has 10 columns and 6 rows. SSD1306 character buffer dimension depend on the display size. 16x8 is the most common size. ILI9488 has 20 columns and 30 rows. It is portrait mode by default. A 7 inch SD1963 has 50 columns and 30 rows. ILI9486 displays are based on the MCUFRIEND library with parallel access. + +Some displays use page based low level graphics drivers. These displays mirror the entire canvas in memory on a pixel basis. When one draws to the canvas, nothing is shown until an update command transfers the buffer to the display. SPI bus based monochrome display use this technique. The ILI9488 and SSD1306 Oled driver use this mechanism. By default these displays behave like the other displays and page mode is of. Drawing of graphics and text appears slow. + +Activating the page mode is done with + +SET 10, 1 + +after this all updates stay in memory until an ETX code is sent with + +PUT &2, 3 + +only then the display is redrawn. The display can be set back to character mode by + +SET 10, 0 + +For epaper displays page mode is default. Epaper disply integration is in preparation. + +In addition to the displays, VGA output is supported with the FabGL library on ESP32 systems. These systems are described in the special systems section. + +### VT52 terminal emulation + +If compiled with HASVT52, BASIC has a full VT52 terminal emulation, including many of the GEMDOS addons. Please look at the wikipedia page https://en.wikipedia.org/wiki/VT52 for a full list of the originally supported ESC sequences. + +All standard commands except the keypad and graphics sequences are supported. All GEMDOS extensions except reverse video are supported where it makes sense. On color displays, the color code is sent as a VGA color in the range from 0 to 15. + +The most useful VT52 sequences in a BASIC program are the ons manipulating entire line. + +PUT &2, 27, "L" + +inserts a line, while + +PUT &2, 27, "M" + +deletes a line. + +ON LCD displays, switching on the cursor is supported. + +PUT &2, 27, "e" + +switches on a blinking cursor, while + +PUT &2, 27, "f" + +switches it off again. + +The following ESC sequences are supported right now + +ESC A Cursor up - Move cursor one line upwards. + +ESC B Cursor down - Move cursor one line downwards. + +ESC C Cursor right - Move cursor one column to the right. + +ESC D Cursor left - Move cursor one column to the left. + +ESC H Cursor home - Move cursor to the upper left corner. + +ESC I Reverse line feed - Insert a line above the cursor, then move the cursor into it. + +ESC J Clear to end of screen - Clear screen from cursor onwards. + +ESC K Clear to end of line - Clear line from cursor onwards. + +ESC L Insert line - Insert a line. + +ESC M Delete line - Remove line. + +ESC Yrc Set cursor position - Move cursor to position c,r, encoded as single characters. + +ESC Z ident Identify what the terminal is, see notes below. + +ESC E Clear screen - Clear screen and place cursor at top left corner. + +ESC b# Foreground color - Set text colour to the selected value (only implemented on color displays). + +ESC c# Background color - Set background colour (only implemented on color displays). + +ESC d Clear to start of screen - Clear screen from the cursor up to the home position. + +ESC e Enable cursor - Makes the cursor visible on the screen (only implemented on LCDs). + +ESC f Disable cursor - Makes the cursor invisible (only implemented on LCDs). + +ESC j Save cursor - Saves the current position of the cursor in memory. + +ESC k Restore cursor - Return the cursor to the settings previously saved with j. + +ESC l Clear line - Erase the entire line and positions the cursor on the left. + +ESC o Clear to start of line - Clear current line from the start to the left side to the cursor. + +ESC p Reverse video - Switch on inverse video text (implemented but with no function). + +ESC q Normal video - Switch off inverse video text (implemented but with no function). + +ESC v Wrap on - Enable line wrap, removing the need for CR/LF at line endings. + +ESC w Wrap off - Disable line wrap. + +### VT52 graphics extension + +On displays with graphics capabilities, the graphics commands can also be sent to the display with ESC sequences. This is not part of the standard VT52 command set and also not part of the GEMDOS extension. + +The graphics code uses three general purpose registers x, y, and z. x and y are 14 bit registers while z is a 7 bit register. Setting a register is done with the sequences + +ESC x low high + +ESC y low high + +ESC z char + +Like in cursor control the arguments are transfered as printable characters. 32 is subtracted from the ASCII value of low, high or char. + +Graphics commands are initiated by + +ESC g command + +where command is one character. The following graphics sequences are currently implemented + +ESC g s - set the graphics cursor to position x and y + +ESC g p - plot a point at the graphics cursor + +ESC g l - draw a line from the graphics cursor to position x and y + +ESC g L - draw a line from the graphics cursor to position x and y and move the graphics cursor to x, y + +ESC g r - draw a rectangle between the graphics cursor position and x, y (like RECT) + +ESC g R - draw a filled rectangle + +ESC g c - draw a circle at graphics cursor position with radius x + +ESC g C draw filled circle + +Color is set with ESC c. + +### Secondary serial stream + +The secondary serial stream is addressed through stream number 4. For microcontroller platforms with a hardware secondary serial port, the Serial1 object on the Arduino library is used. This can be changed in hardware-arduino.h (1.x) or hardware.h (2.x) by modifiying the functions beginning with prt. For microcontrollers without multiple hardware serial ports Softwareserial is used. The RX and TX pins are set through the macro SOFTSERIALRX and SOFTSERIALTX. Default are pin 11 and 12. This conflicts with the SPI pins. If SPI is to be used the soft serial pins have to be changed. + +Default baudrate on the secondary serial port is 9600 baud. + +The secondary serial port implements a blockmode function. Blockmode is on by default. Without blockmode an INPUT command would wait until a LF is received. This means that + +INPUT &4, A$ + +would never return if the sender on the serial port does not send LF. If a modem with AT commands or any other device is on the input port, the BASIC program would stop indefinitely if the sender side misbehaves. With blockmode active, the INPUT command handles I/O differently. + +With the command + +SET 7, 1 + +the blockmode parameter can be set to 1. In this mode the entire serial buffer is transfered to the string A$. The number of characters waiting in the serial buffer for transfer can be found by the function AVAIL(4). This number of character is in the string after INPUT &4 with the length of the string set to the value of AVAIL(4) before INPUT. Immediately after read, AVAIL(4) is zero. For secondary serial blockmode 1 is the default. + +Setting the blockmode parameter to a value greater 1 the timeout mode is activated. INPUT reads all characters in the buffer and waits timeout microseconds for further input until it returns. It also returns if the string is full. Example: + +SET 7, 500 + +INPUT &4, A$ + +In this mode the INPUT command would read all characters, wait for 500ms for further input, and returns latest after this 500ms or when the string is full. + +For communication with modems, the secondary serial channel has one more parameter. Normally only LF is sent after the end of a line. Some modems and other devices on a serial port expect a LF CR sequence at the end of a line. The communication is blocked if CR is not sent. With the command + +SET 6, 1 + +CR mode is activated. A print command to the serial channel like + +PRINT &4, "AT" + +would print the characters "A", "T", followed by a LF (ASCII 10) and a CR (ASCII 13). + +Answer of a model could be collected with the input sequence above. + +Unlike the primary serial port, the baudrate of the secondary port can be changed by the BASIC program. Example: + +SET 8, 31250 + +would set the baudrate to the standard MIDI baudrate of 31250. Any allowed baudrate of the hardware platform can be used. The serial port is reset after this command. + +### Wire communication + +Stream &7 is used for Wire i.e. the I2C protocol. BASIC uses the implementation of the Arduino Wire library and the Wire object. Actually, the I2C protocol is very compley and the Wire library hides this complexity making it a byte stream. PRINT, INPUT, GET and PUT can deal well with byte streams, therefore most of the Wire libraries functionality can be used from BASIC. There is a master and a slave mode implementation. + +In master mode, the OPEN statement for the I2C stream is used in read mode. Example: + +OPEN &7, 104 + +prepares I2C to control the slave with address 104. This address is a real time clock. Any valid I2C slave address can be used as an argument in the OPEN statement. OPEN &7 does not transfer any data and it also does not make any calls to the Wire library except if the microcontroller was in slave mode before. Then OPEN restarts the Wire object in master mode. + +Sending data can be done with PUT for sequences with just a few bytes. Alternatively the information can be collected in a string and then sent with print. Examples: + +PUT &7, 0 + +sends a null byte to the device. + +PRINT &7, A\$ + +sends as many bytes as are stored in A$ to the device. LEN(A$) is the number of bytes transferred. The maximum is 31 bytes, a limit given by the wire libraries internal buffers. + +Requesting a byte from the device can either be done with GET or with INPUT. + +GET &7, A + +requests one byte from the device. + +INPUT &7, A\$ + +requests as many bytes as fit into the string, maximum 32. After INPUT the string will always have a length of 32 bytes on AVR. The Wire library does not transmit the number of transferred bytes properly despite some comments that indicate otherwise in the documentation. The library returns the number of requested bytes. + +One can request fewer bytes than fit into the string by using the # modifier in the INPUT command. + +INPUT &7, #8, A$ + +would request 8 bytes from the device. The length of the string will be 8 after the command. Again, this does not mean that the device really sent 8 bytes. + +On stream 7 the status variable @S is set after each transmission to the status of the request or sent method. From this one can detect if the transmission has worked. + +Wire can be reopen in master mode if one want to communicate with another device by a new OPEN command with a different address. This way multiple devices can be controlled. + +See examples/13wire/master* for more info on master mode. This is a port of the example programs of the Arduino library from C++ to BASIC. It shows how easy it is to use Wire from BASIC. + +Slave mode is open with OPEN in write mode, i.e. with 1 as a third parameter. Example: + +OPEN &7, 8, 1 + +makes your BASIC Arduino a slave that listens on Wire port 8. This OPEN statement stops the Wire object, interaction with devices where the Arduino has to be master is no longer possible. Any open in master mode will stop the slave mode. + +After slave mode is started the BASIC program continues normally. In the background there is an interrupt handler collecting the data the master sends. The program has to check periodically to see if the master has sent or requested data. + +If the master has sent data, AVAIL(7) will be larger than 0. The data sent by the master can be collected by + +INPUT &7, A\$ + +and then processed by the program. It the master sends additional data before the BASIC program has recalled the message, the buffer is overwritten. Only one transaction is stored. This means that a Wire slave needs to check AVAIL(7) in a tight loop. + +If the master has requested data, USR(7, 1) has the number of requested bytes. The program should now prepare a string with this number of bytes and send it with + +PRINT &7, A\$ + +After this, USR(7, 1) will be zero once the master has collected the data from the buffer. + +Alternatively, the slave can deposite data in the buffer before the master has even requested it. A master request at a later time will be answered with the data. This would be useful for sensors of all kind. The slave measures data, puts it in the buffer with PRINT &7 and waits a while e.g. with DELAY until it does the next measurement. The new data overwrite the old one after every measurement cycle. A master can request data asynchronously at any time and will receive the data in the buffer. This BASIC program does not need to handle this. + +See examples/13wire/slave* for more info on slave mode. + +There is a number of example programs in examples/13wire to show how Wire programming works. + +### Radio communication + +Stream &8 is used for RF2401 radio communication. For this, BASIC needs to be compiled with the ARDUINORF24 flag and the respective pin definitions set. The open statement can be used to open one stream for read and one writing simulataneously. Example: + +OPEN &8, "0815x", 0 + +OPEN &8, "0815y", 1 + +The first command opens a stream for reading, using the string given as file name to generate the 5 byte pipe address. The second command opens a write pipe with a different pipe address. + +OPEN on the radio interface sets @S if there is in a error in the module communication. Typically this would mean that the module is not connected properly. + +After opening INPUT, PRINT, PUT and GET on stream &8 work similar to Wire. The maximum message length is restricted by the unterlying library to 32 bytes. + +The radio module is started with maximum power. To power it down SET 9, x can be used. x is an integer between 0 and 3. 3 is maximum power and 0 is minumum power. + +### MQTT + +Stream &9 is used for networking with MQTT. MQTT is the only network protocoll that is supported and the code is experimental. The network code is generic and more protocols will be integrated in the future. + +Supported network adapters are Ardunio Ethernet shields, ESP8266 and ESP32 WLAN, Arduino MKR and RP2040 WifiNINA. These network codes have some timing needs like yielding the CPU and refreshing DHCP leases. BASIC integrates this in the central statement loop processing all time critical tasks in the function byield(). This code is best tested and very stable on ESP8266 and ESP32. Other platforms are alpha. + +For Wifi systems, the SSID and password are hardcoded in the BASIC interpreter binary by setting the respective lines in "wifisettings.h". In this file there are two lines defining the MQTT server and port. This data is also compiled into the code. Currently only unencrypted and unautheticated MQTT is supported as this is only a toy. The fiths line in the code is a MAC address which is needed for the Arduino Ethernet shield. For all other hardware platforms this line is ignored. + +After startup of the microcontroller it tries to connect to Wifi or Ethernet. The command NETSTAT can be used to see the connection status. This command is meant for interactive use only. + +Finding the connection status in a program can be done by using NETSTAT as a function. + +PRINT NETSTAT + +or + +A=NETSTAT + +will return 0 is the network is not connected, 1 if the network is connected but MQTT is not connected, 3 is network and MQTT are connected. More status values will be added here in the future. + +An MQTT topic an be open with the OPEN command using the topic name as a file name. Example: + +OPEN &9, "iotbasic/data", 1 + +would open the topic "iotbasic/data" for writing because 1 was provided as a third parameter. + +OPEN &9, "iotbasic/command", 0 + +would open the topic "iotbasic/command" for read. + +There can be one read and write topic simulataneously. After opening the topics, data can be written by the commands PRINT, INPUT, GET, and PUT. + +Every command will generate one MQTT message. + +PRINT &9, "humidity", A + +would send a message consisting of the string "humidity" and a number from variable A. + +The maximum MQTT message length is hardcode to 128 bytes but can be extended. The maximum topic length is 32 bytes. + +Incoming messages are buffered in the background. A new message overwrites the old one as there is only one buffer. The function AVAIL(9) has the number of bytes currently in the buffer. If AVAIL(9) is greater then 0 then + +INPUT &9, A\$ + +transfers the entire message into A\$. From the string the message can be parsed with INSTR and VAL if numerical data was sent. The implementation is "binary data safe". Any set of bytes can be send as a message and be processed. + +On POSIX systems not networking is supported as I haven't found a suitable multi platform MQTT library and was too lazy to write one myself. + +The network code will be extended in version 1.4. Currently it is only a proof of concept. + +### Filesystems + +BASIC runs on very different platforms. From small 8 bit AVR based system to 64 bit Macs. These computers have different filesystems and capabilities. The BASIC commands are designed to make a minimal file I/O possible. Only one directory is supported. One file can be open for reading and another for writing simulateously. Stream &16 is used for file I/O. + +Supported filesystems are SD on all microcontroller platforms that have it, ESPSPIFFS for ESP8266 and ESP32, LittleFS for Arduino MKR and RP2040 based systems. The file system driver removed leading rootfs names and everything else starting with a '/'. It shows a flat namespace of filenames. BASIC itself limits filenames to a maximum of 32 bytes. Some filesystems cannot handle this. In this case the name is truncated. No check is made if the filename is legal for the particular filesystem. For ESPSPIFFS and LittleFS the FDISK command is supported. Example: + +FDISK + +would answer with the prompt + +Format disk (y/N)? + +and then format the disk. No parameters are used here. + +In addition to the standard filesystems, I developed a minimalist EEPROM filesystem. This filesystem partitions an I2C EEPROM into n equal size slots that can be used for files. Formating this filesystem requires the number of slots as a parameter. Example: + +FDISK 4 + +would partition the EEPROM to 4 equal slot. For the very common 32kB serial EEPROM it would mean that 4 files of maximum of 8k can be stored. The EEPROM size has to be hard coded into the BASIC interpeter at the moment. This will change in the future. + +On POSIX and SD no formating is supported. + +### Real time clock support + +Currently the built-in clocks of ESP32, STM32 and Arduino MKR and I2C clocks DS1307, DS3231 and DS3232 are supported and can be accessed through the special array @T() and the special string @T$. The array elements are + +@T(0): seconds + +@T(1): minutes + +@T(2): hours + +@T(3): day of week (0-6) (not supported for all clocks) + +@T(4): days + +@T(5): month + +@T(6): year (0-99) + +@T(7): temperature (DS1307 only) + +@T(8): direct bytewise access to the clocks registers. On a DS1307 the addresses from 8 onwards are the NVRAM memory. On DS3231 and DS3232 these are the clock internal registers for alarm followed by the memory on DS3232. + +Real time clock support for I2C is now built-in. No external library is used for this. For STM32 and Ardunio MKR the clock and low power libraries are automatically used by BASIC. + +For systems without a hardware clock ARDUINORTCEMULATION can be activated in hardware-ardunio.h (1.x) or hardware.h (2.x). It uses millis() to emulate a Unix style real time clock. + +## Special systems and hardware components + +### Introduction + +The hardware section of the interpreter contains mechanism to make the platform look the same. This works for many platforms but there are exceptions. BASIC language features work differently on these systems. In this chapter these exceptions are described. + +### POSIX systems + +Systems compiled with the POSIX hardware driver use the features of the OS for most I/O operations. They differ from Arduino's and other MCU in some aspects. + +Ususally BASIC is started from the command line on these systems. The BASIC interpreter can be started with a file argument. In this case the interpreter starts and runs the file and terminates after the program has ended. + +./basic file.bas + +will run the program and after completion the OS shell command prompt will reappear. + +The compiler flag TERMINATEAFTERRUN controls this feature. It is set to 1 by default. If set to 0 in basic.h, BASIC will not terminate after the end of the program. + +./basic file.bas hello + +will pass the argument to the special string @A$. Only the first argument is processed and stored in the string. Multiple arguments need to be quoted + +./basic file.bas "hello world" + +will pass both words to @A$. + +### Raspberry PI special features + +On a Raspberry PI, frame buffer graphics is supported. The graphics commands COLOR, PLOT. LINE, RECT, FRECT, CIRCLE and FCIRCLE will write 24bit color pixels directly to the frame buffer. This feature is under development and will be fully supported in the 1.5 release after more testing. + +Wiring is supported with the Arduino style commands PINM, DWRITE, AWRITE, DREAD and AREAD. + +I2C and other wiring features like PULSE are not yet supported. + +### Wemos D1R1 systems and shields + +These UNO form factor 8266 are really popular as they are cheap and powerful. BASIC supports these boards as datalogger and standalone systems. They are not really UNO hardware compatible, so some precautions are required. + +BASIC uses the raw ESP822 pinout on the right side of this table: + +static const uint8_t D0 = 3; + +static const uint8_t D1 = 1; + +static const uint8_t D2 = 16; + +static const uint8_t D3 = 5; + +static const uint8_t D4 = 4; + +static const uint8_t D5 = 14; + +static const uint8_t D6 = 12; + +static const uint8_t D7 = 13; + +static const uint8_t D8 = 0; + +static const uint8_t D9 = 2; + +static const uint8_t D10 = 15; + +static const uint8_t D11 = 13; + +static const uint8_t D12 = 12; + +static const uint8_t D13 = 14; + +static const uint8_t D14 = 4; + +static const uint8_t D15 = 5; + +The values on the lefthand side are the lables on the board. + +A good discussion can be found here: https://forum.arduino.cc/t/wemos-d1-pins/523831 + +More on ESP8266: https://tttapa.github.io/ESP8266/Chap04%20-%20Microcontroller.html + +### ESP32 VGA with FabGL + +BASIC runs on TTGO VGA ESP32 hardware boards. These boards are specifically designed for retro computin applications. They have a PS2 keyboard and mouse, a VGA adapter and an SD card slot. Many old OSes and computer games can run on them. + +I ported the BASIC interpreter to it with a VGA 640x200 screen. The sound generator and the SD is also supported. This makes the TTGO VGA board a fully function 64 kB home computer. + +Unlike other systems with displays, the generic BASIC display driver is not used. Instead, the built-in VT52 terminal emulation of the graphics library FabGL processes text output. This means that cursor positioning with the special variables @X and @X as well as the display array @D() does not exist on these systems. Cursor positioning has to be done with the standard VT52 control sequences. See the extensive documentation of FabGL for more information http://www.fabglib.org. + +The sound generator of FabGL can be used with the BASIC PLAY command but the syntax is different from Arduinos. PLAY is called like this + +PLAY n, frequency, duration, volume. + +The parameters volume and duration are optional. Duration is measured in ms. This is like Arduinos. Setting the volume is not possible for Arduinos. The parameter is directly passed to the FabGL library. On Arduinos this parameter is ignored. + +The first parameter n would be the pin number in an Arduino configuation. For FabGL it sets the wave form generator instead. The following values are possible: + +128: Sine wave + +129: Symmetric square wave + +130: Sawtooth + +131: Triangle + +132: VIC noise + +133: noise + +256-511: Square wave with variable duty cycles, pulse length is n-255. + +TTGO VGA hardware is supported for graphics with a 16 color VGA palette. Colors are mapped to this palette if the COLOR command is used with rgb color arguments as best as possible. + +The SD card is supported but some cards will cause stability problems of the system. + +Networking is possible but not really supported. There are internal memory conflicts that required to reduce BASIC RAM to 10 kB. This will be solved in version 1.4 of the interpreter. + +### SPI RAM systems + +8bit AVR systems have rather small RAM sizes. The UNO has just 2 kB which limits the number of appliactions. Otherwise an Arduino UNO would be a great computer for BASIC. The RAM limitation of the smaller 8bit microcontrollers can be removed by using 64kB serial RAM modules. The chips are really cheap and the can be connected easily. + +Activating the ARDUINOSPIRAM flag on compile time will use the SPI RAM interface for memory access. If a 16 bit integer BASIC is compiled, the computer will show 32 kB of BASIC memory. If a floating point BASIC is compiled, it will see 64 kB of memory. Only 64 kByte ATMEGA 23LCV512 SPI RAM modules are supported. There is no library needed, the device driver is integrated in BASIC. + +All BASIC commands work the same. Most of them with a similar performance as local RAM. This is due to the fact that the interpreter has two memory access mechanisms, one for the program token stream and one for read/write of variables. Both are buffered separately, reducing SPI memory access. + +The one exception is string commands. Strings have to be copied to local memory, can be processed there and have to be compied back. String buffers of 128 bytes handle this task. For this reason, the maximum string length is restructed to 128 bytes when using the SPI RAM interface. Also, string commands should not be nested in complicated expressions. This part of the code is not tested a lot. String code is considerably slower then in direct memory situations but still faster than many old 8 bit homecomputers. + +Well behaved BASIC programs like the game library of David Ahl in examples/14games have been tested and run on SPI RAM. + +### Raspberry PI Wiring + +BASIC for Raspberry PI uses the wiring pinout and not the header pinout. Please look at this table for more details: http://wiringpi.com/pins/ + +Some more can be found here: https://pi4j.com/1.2/pins/model-b-plus.html + +## Low level commands + +### SET + +SET changes internal variables of the interpreter. Set has two arguments, the variable or class to be changed and a value. There is no systematic in the numbering of the variables and classes. + +Parameters changed with SET will stay active until the system is rebooted or the interpreter restarted. They are global variables of the interpreter. NEW and CLR will not affect them. + +SET 0,n switches on the debug mode. The token stream in the statement loop is displayed. SET 0,0 resets the interpreter to normal mode. SET 0,1 shows the token stream of the statement loop. SET 0,2 shows the entire token stream, including arithmetic operations, SET 0,3 displays the memory addresses with this data. The latter two settings produce a lot of output and are meant for interpreter testing. SET 0,-1 will switch on the REM pribt mode. In this mode the arguments all REM commands will be printed but no other debug output. This makes it easier to identify the location of an error. + +SET 1,1 activates the autorun mode of the EEPROM. SET 1,0 resets the autorun mode. SET 1,255 marks the EEPROM as not to contain a program. SET 1,1 should only be used if a program was stored with SAVE "!" to the EEPROM. There is no safety net here. A running program in EEPROM autorun mode can always interrupted by sending the break character. This is '#' by default and defined in the BREAKCHAR macro. Alternatively the BREAKPIN macro can be defined in hardware-arduino.h (1.x) or hardware.h (2.x). This this case the pin it is set to will interrupt the program if set to low. + +SET 2,1 sets the output to display mode, SET 2,0 to serial mode. This is a deprecated feature. Using @O is a better way to do this. + +SET 3,1 sets the default output to display, SET 3,0 to serial mode. This is a risky command. If the output channel is not connected to a device the user can control, they are locked out. + +SET 4,1 sets the input to keyboard mode, SET 4,0 to serial mode. This is a deprecated feature. Using @I is a better way to do this. + +SET 5,1 sets the default input to keyboard, SET 5,0 to serial mode. This is a risky command. If the input channel is not connected to a device the user can control, you they are locked out. + +SET 6,1 sets the CR output of the secondary serial port. A CR is sent after each line. SET 6,0 switches of CR. Default is off. + +SET 7,1 switches on blockmode of the secondary serial port input. SET 7, timeout with a number timeout>1 sets an input timeout in ms. In both cases INPUT &4 does not wait for a line feed. SET 7,0 resets block mode. + +SET 8,baud will set the baudrate of the secondary serial port and resets the port. Default is 9600. + +SET 9,n will set the radio signal strength. n is between 0 and 3. 3 is maximal signal strength. + +SET 10,1 sets the display update to page mode. In this mode the display does not display text or graphics until am ETX (ASCII 3) is sent. + +SET 11,1 sets the TAB command to Microsoft mode. In this mode the TAB position is the absolute character count and not a relative postion. SET 11,0 resets the behaviout. + +SET 12,0 sets the lower bound of all arrays to 0. This means that arrays with 8 elements DIMed with DIM A(8) go from 0 to 7 instead of 1 to 8. SET 12, 1 resets the value. This command does not change the array or anything in memory. It merely adds an offset. Any positive value can be used as an argument. + +SET 13, 1 sets the keypad to repeat mode. This setting is only used in analog keypads of LCD shields. These keypads normally block on key press until the key is released. This makes GET a semi blocking function. With SET 13, 1 the GET command does not block. It directly returns the pressed key and does not wait for key release. SET 13, 0 resets to blocking mode. + +SET 14 changes the time scale of the PULSE command. Default is 10. The unit is microseconds. With SET 14,1 the time scale is 1 microsecond. All positive values are supported. + +SET 15 controls on the VT52 to ANSI emulation, by default it is on. This means that VT52 ESC sequences are translated to ANSI sequences. This way programs written for microcontrollers are compatible with POSIX system programs. SET 15,0 switches off the emulation. All ESC sequences are directly sent to the terminal. + +The following SET commands control language behaviour. They are not part of the runtime properties and listed here for completeness. They only exist in BASIC 2. + +SET 16 controls the default dimension of a string on creation. Default is 32. SET 16,20 would set the default size of undimensioned strings to 20. This parameter is only used when the string is created. Previously created string remain unaffected. + +SET 17 controls the boolean mode of the interpreter. With the default value -1 the interpreter behaves like a MS BASIC interpreter. True is -1 and NOT -1 is 0. The operations NOT, AND, OR are all three bitwise logical operations of 16 bit signed integers. SET 17,1 sets the boolean mode to C style logic. This was also used by some of the old BASIC interpretes like Apple1, Palo Alto, and Cromeco. True is 1 and NOT 1 is 0. AND and OR still are bitwise logical operations but NOT behaves like the C logical NOT. This setting helps when BASIC programs of older interpreters are used. Check out trek.bas in the expamples section. + +SET 18,1 sets the interpreter to integer mode even if if is compiled with HASFLOAT. Variables still stay floats internally but values are truncated on store or print. The arithmetic is integer in this mode hence A=1/2 produces A to be 0 and A=1/2\*2 also produces A to be 0. This setting is used for compatibility with some programs of Integer BASICs including the #undef HASFLOAT variants of this interpreter. + +SET 19 controls the behaviour of the random number generator. One some BASIC interpreters RND(8) would produce numbers from 0 to 7 (or 7.999999 in floating point BASICs). The value 8 is never reached. This is the default behaviour. Other BASIC would produce numbers in the range from 1 to 8. SET 19,1 switches on this mode. + +SET 20 controls the substring logic. With SET 20, 0 the substring syntax is surpressed and the language feels more Microsofty. Default is 1: substrings on. + +SET 21 controls the array creation behaviour. With SET 21, 1 the language creates arrays in the range of 0 to 10 with DIM A(10) i.e. in Microsoft conventions. With SET 21, 0 the array limits are 1 to 10. + +SET 22 sets a group of parameters and can be used to set the interpreter personality. SET 22, "Microsoft" makes the language as MS BASIC compatible as possible. SET 22, "Apple1" makes it Apple 1 BASIC compatible. This is the default. SET 22, "PaloAlto" makes the language Palo Alto BASIC compatible and forces integer mode. + +SET 23 disables or enables lower case names. Default are uppercase names. All names on input are converted to upper case. SET 23,1 enables lower case letters in names. This needs to be set before entering program lines or interactive commands. It does not change already defined variables. It only affects tokenisation and not the existing objects. + +SET 24 sets the precision of the floating point output. Default is 5 digits output after the comma. SET 24, n sets this to n digits. + +More SET parameter will be implemented in the future. + +### USR + +USR calls a low level function, passes one value to it and returns the value. Typically USR would be used like + +A=USR(function, parameter) + +USR(0,x) returns an interpreter parameter or capability. The program can find out which platform it is running on. Please look at examples/00tutorial/hinv.bas for a list of the parameters and return values. + +Function numbers 1 to 31 are assigned to the I/O streams. Currently only USR(f, 0) is implemented for all I/O streams. They output the status of the stream. + +Function numbers 32 and above can be used to implement individual commands. See below for more information. + +### CALL + +Currently only CALL 0 is implemented. Call 0 flushes all buffers. On POSIX systems it ends the interpreter and returns to the OS. On Arduino AVR and ESP the microcontroller kernel is restarted. + +CALL parameters 0 to 31 are reserved. Values from 32 on can be used for implementing own commands. See below for more information. + +### SLEEP + +SLEEP n enters sleep mode. This is only implemented on ESPs and SAMD right now. n is the time in milliseconds. For ESP8266 the wiring for sleep mode has to be right. ESP32 can awake from SLEEP without additional wiring. ESPs restart after wakeup. An autorun program is needed for this. Once the restart happens, the program starts from the beginning. Reentry has to be handled in the program. On Arduino SAMD the interpreter uses the low power library. The program resumes after the sleep command. Sleep is experimental right now. + +### Stopping programs + +There are two mechanism implemented to stop programs. One listens to the default input stream, in general this is either default serial or the keyboard. The other monitors a pin. + +If BREAKCHAR is defined in the BASIC code, this character will stop the program if it is encountered in the input stream. It has to be found as a first character. Default BREAKCHAR is '#'. BREAKCHAR only works on Arduino implementations with keyboard and serial I/O. Posix systems cannot use BREAKCHAR as I/O is blocking on them. + +If BREAKPIN is defined, the interpreter will stop once this pin is pulled to low. By default, BREAKPIN is not defined, i.e. there is no BREAKPIN. This mechanism is for use cases where using BREAKCHAR is not practical. One can implement a separate stop button with it. + +If HASSIGNALS is defined in hardware-posix.h (1.x) or hardware.h (2.x) then Ctrl-C will stop a running program. This does not work on Arduino because there are no POSIX signals on the platform. This feature is alpha and currently only briefly tested on Mac and Windows. + +### Extending basic + +The BASIC interpreter has several mechanisms to extend the language set without having to work directly with the interpreter data structures. + +USR(N, X) with N greater than 32 will call the function usrfunction(). It gets both arguments as values and can return one number as reault. + +CALL N with N greater than 32 will call the function usrcall(). It gets N as an argument. + +@U is a special variable. Reading it will call getusrvar(), writing it will call setusrvar(). + +@U() is a special array. Reading it will call getusrarray(), writing it will call setusrarray(). In both cases the index is the array is passed on as argument. + +@U\$ is the user string. It is read only. Reading it will trigger the function makeusrarray(). It can pass an set of characters to BASIC. + diff --git a/data/docs/BASICs/101_BASIC_Computer_Games_Mar75.pdf b/data/docs/BASICs/101_BASIC_Computer_Games_Mar75.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8228703f44105b1cf024d75678696f884650a67a --- /dev/null +++ b/data/docs/BASICs/101_BASIC_Computer_Games_Mar75.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:311c1be8d3c9361ee9badb59b5a43c43a5b0bf4803298943be1cb617b8f33ad7 +size 26006648 diff --git a/data/docs/BASICs/AltairBasic_1275.pdf b/data/docs/BASICs/AltairBasic_1275.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2a6f02300ebe16a78056a8a9820c1982800dc3e9 --- /dev/null +++ b/data/docs/BASICs/AltairBasic_1275.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b604f5881233c03ecb8c97d82bef622899e810b97adeaf0c2e9f6c5ceaaed843 +size 7095914 diff --git a/data/docs/BASICs/Apple2AppleSoftBASICRef1977.pdf b/data/docs/BASICs/Apple2AppleSoftBASICRef1977.pdf new file mode 100644 index 0000000000000000000000000000000000000000..56c58218bcf454056be09af81e9e40306eb1c85c --- /dev/null +++ b/data/docs/BASICs/Apple2AppleSoftBASICRef1977.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:083ad7dc99cd6abd745d540e0c0bbc4d47894e09a39ab887e4bee0f6bafe7210 +size 6542358 diff --git a/data/docs/BASICs/Creative_Computing_v10_n03_1984_Mar_0007.jpeg b/data/docs/BASICs/Creative_Computing_v10_n03_1984_Mar_0007.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..047820ec1afe864d883407203183b7528527d708 --- /dev/null +++ b/data/docs/BASICs/Creative_Computing_v10_n03_1984_Mar_0007.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a934810e5bf6150f0ac5dff94aaca51895290b071cefe6438bca974d0bb5d13e +size 89057 diff --git a/data/docs/BASICs/ECMA-55_1st_edition_january_1978.pdf b/data/docs/BASICs/ECMA-55_1st_edition_january_1978.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4314b91652b29ff6fbdbb2260e1c1730c6a3e9c5 --- /dev/null +++ b/data/docs/BASICs/ECMA-55_1st_edition_january_1978.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8685f7f9be20769d5fe6a329c12c59a2dc070374c51b0f43329777d84f1a2c28 +size 15551877 diff --git a/data/docs/BASICs/Kilobaud_1977_June.pdf b/data/docs/BASICs/Kilobaud_1977_June.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bb9051fbb979e064ef59af1f7e3ece47fe103603 --- /dev/null +++ b/data/docs/BASICs/Kilobaud_1977_June.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:004a9a7c515e4f94d1cdf13f140e2b4c97937b21b85c33cf7fe240e307b8ba7a +size 28432613 diff --git a/data/docs/BASICs/TinyBASIC-2.0.pdf b/data/docs/BASICs/TinyBASIC-2.0.pdf new file mode 100644 index 0000000000000000000000000000000000000000..16ad865307068968997a82205fe7980d31361593 --- /dev/null +++ b/data/docs/BASICs/TinyBASIC-2.0.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2762a3d0df9d53f82c6c3aac63134bf5115b2b9a7527e584b4e2e9c52a73517 +size 4517033 diff --git a/data/docs/BASICs/aim65_basic.pdf b/data/docs/BASICs/aim65_basic.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7fd1de977bd4f850a3969205cf6e38214b161dbe --- /dev/null +++ b/data/docs/BASICs/aim65_basic.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e05e49a8aa49e900e715d003e45084c002088fc09cdc2b0126500a8112f102cd +size 6339298 diff --git a/data/docs/BASICs/apple1_basic_manual.pdf b/data/docs/BASICs/apple1_basic_manual.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b1d94cbcfca4c9b51920ae52400a95365524a77e --- /dev/null +++ b/data/docs/BASICs/apple1_basic_manual.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a727ff8f6efa5e488a34365b1ff9eee239d062f18fada4a9cc0dc075c2d9557b +size 1178755 diff --git a/data/docs/components/ABX00053-datasheet.pdf b/data/docs/components/ABX00053-datasheet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6e61229244a29b48ab358c868face3e803bf4478 --- /dev/null +++ b/data/docs/components/ABX00053-datasheet.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fbe79d29e3da00954a3117f1631f4ce8c95bfff220115d27ae8e8d3185dd6c0 +size 769009 diff --git a/data/docs/components/Atmel-8869-SEEPROM-AT24CS32-Datasheet.pdf b/data/docs/components/Atmel-8869-SEEPROM-AT24CS32-Datasheet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0501b604f80ced0ad5e8214432a25e64c438e858 --- /dev/null +++ b/data/docs/components/Atmel-8869-SEEPROM-AT24CS32-Datasheet.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6183943ff98038a1e35e3a1e96853a4ab457a8575986b6116080da8b16bc0f32 +size 879235 diff --git a/data/docs/components/BMP280datasheet.pdf b/data/docs/components/BMP280datasheet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e03d3e944289485e0ab4b99468651293baa17de3 --- /dev/null +++ b/data/docs/components/BMP280datasheet.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39bd0da5acdfb5163febde1732969ac7a9bcc30c1ef0e1d6492db3a8b0ad2ebb +size 1452565 diff --git a/data/docs/components/BST-BME280_DS001-10.pdf b/data/docs/components/BST-BME280_DS001-10.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b22fbfa9481e35b0dcf1a08fd78d87d4871368ef --- /dev/null +++ b/data/docs/components/BST-BME280_DS001-10.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39710c647b3ec070ed775e8b5e0b02c72f76f20515f1cd8268075cfb077148e8 +size 1937299 diff --git a/data/docs/components/DS1307.pdf b/data/docs/components/DS1307.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7383de3ad61cb5148698cfbff25448868fc84756 --- /dev/null +++ b/data/docs/components/DS1307.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5899ce0824fcbd08c72b272a4b5056aa182cdafb93844db41f94d776a9f6886f +size 356842 diff --git a/data/docs/components/DS3231 Real Time Clock Connection Diagrams.pdf b/data/docs/components/DS3231 Real Time Clock Connection Diagrams.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bea0ccb9d9937958fd1aafe31b81c195ef8d204f --- /dev/null +++ b/data/docs/components/DS3231 Real Time Clock Connection Diagrams.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad23a4a671dd1126d070abe1e951a2f883c20343351437fd36519114eb324892 +size 1483155 diff --git a/data/docs/components/DS3231 Real Time Clock Datenblatt AZ-Delivery Vertriebs GmbH.pdf b/data/docs/components/DS3231 Real Time Clock Datenblatt AZ-Delivery Vertriebs GmbH.pdf new file mode 100644 index 0000000000000000000000000000000000000000..14d48fa74e4aac121a0b407e00b7d55a48d4e26e --- /dev/null +++ b/data/docs/components/DS3231 Real Time Clock Datenblatt AZ-Delivery Vertriebs GmbH.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02bd54777aaa005306282bcc835bd588a6c699a6ab9e8cb2797cc3aa6ac18da3 +size 981557 diff --git a/data/docs/components/DS3231.pdf b/data/docs/components/DS3231.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c388b3c3d96519e9f9566e2a4b343dbec4efd762 --- /dev/null +++ b/data/docs/components/DS3231.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc81cd89bee82d0c57b654d6315e03dec913fb8fe753cc80b2a3f1cca71cbb34 +size 843828 diff --git a/data/docs/components/DS3232.pdf b/data/docs/components/DS3232.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7e2318d42dfbe1bf0c3e081484e19b58f731c9ba --- /dev/null +++ b/data/docs/components/DS3232.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45c2398d51ed9955d79a384be6b40dd9ecdf258cad2074b8cf71d10f0d5a2bd5 +size 432278 diff --git a/data/docs/components/DUE_Shield_schematic.pdf b/data/docs/components/DUE_Shield_schematic.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2c7b8976823e94a40334861edda0387e1f8d57f5 Binary files /dev/null and b/data/docs/components/DUE_Shield_schematic.pdf differ diff --git a/data/docs/components/Digispark.pdf b/data/docs/components/Digispark.pdf new file mode 100644 index 0000000000000000000000000000000000000000..08754f20190610309725d7b35db5afd8056c9d1e --- /dev/null +++ b/data/docs/components/Digispark.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:439b84aedb7ed3dc0dcabecf6ede96a5def45dab9c44bb2c1adfc1a214ec64d0 +size 842187 diff --git a/data/docs/components/ESP8266-01 USB-Stick DE.pdf b/data/docs/components/ESP8266-01 USB-Stick DE.pdf new file mode 100644 index 0000000000000000000000000000000000000000..79ddfe187f82264cedaa126f6f5c6e8b2e5634dc --- /dev/null +++ b/data/docs/components/ESP8266-01 USB-Stick DE.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4339dc9527549df51f8d06e68d2e94a83a2fc08759510376d5f1c953cd0f533c +size 513919 diff --git a/data/docs/components/KeyboardController.pages b/data/docs/components/KeyboardController.pages new file mode 100644 index 0000000000000000000000000000000000000000..110b76719d5e7294e80a10845246428523106e7d --- /dev/null +++ b/data/docs/components/KeyboardController.pages @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f389171bbbadd5a1201e4377f3447fcb37ee936e6537efd99bea8ced2870de6 +size 299493 diff --git a/data/docs/components/KeyboardController.pdf b/data/docs/components/KeyboardController.pdf new file mode 100644 index 0000000000000000000000000000000000000000..358726ba3871b1b7eb278ad993d23ccea6a2dca3 Binary files /dev/null and b/data/docs/components/KeyboardController.pdf differ diff --git a/data/docs/components/PS2Keyboard Library, Connect a keyboard for user input.pdf b/data/docs/components/PS2Keyboard Library, Connect a keyboard for user input.pdf new file mode 100644 index 0000000000000000000000000000000000000000..491dc06006161d0a141994466ae8af2075c65795 --- /dev/null +++ b/data/docs/components/PS2Keyboard Library, Connect a keyboard for user input.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0c41fb82168bf6895cde4db8885fa6f683a87e4d9808ce76b3304d09b9aba2f +size 867848 diff --git a/data/docs/components/Pinout-NANOevery_latest.pdf b/data/docs/components/Pinout-NANOevery_latest.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7b64509cd599841c036de94b842676de87578c7b --- /dev/null +++ b/data/docs/components/Pinout-NANOevery_latest.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:028f44dd75001dcdfe181e581ea8a51385af2ccc65e68012f87dc9cc1252f2bb +size 237946 diff --git a/data/docs/components/Programming+the+Wemos+Mega+Wifi+Board.pdf b/data/docs/components/Programming+the+Wemos+Mega+Wifi+Board.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b8643c00bd7d0779ab27a647e8fdbdb1b3ba554e --- /dev/null +++ b/data/docs/components/Programming+the+Wemos+Mega+Wifi+Board.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:876fc825f6cb5a7249246f3f6f83aee89f06f8be469d503216e7d5e486aac30d +size 919076 diff --git a/data/docs/components/RK-10290_410.pdf b/data/docs/components/RK-10290_410.pdf new file mode 100644 index 0000000000000000000000000000000000000000..83f64b9a1dd4185ca135213f815be1b10dcd595c --- /dev/null +++ b/data/docs/components/RK-10290_410.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e7582983221678cbebc328900d143407f7f010c14a0782db50541307a16f24b +size 1229464 diff --git a/data/docs/components/SSD1306.pdf b/data/docs/components/SSD1306.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d5854a48b0e5c1d1af8f7597f503057b871fba4c --- /dev/null +++ b/data/docs/components/SSD1306.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d55f875357de96d8c0e92153a389acc57e8bab4db7a0687f2e0bd3362f0036f6 +size 1876686 diff --git a/data/docs/components/SSD1963_v1.6.pdf b/data/docs/components/SSD1963_v1.6.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6415348910c0af8ebb666073acba5191ced0661f --- /dev/null +++ b/data/docs/components/SSD1963_v1.6.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:401832f65549a5d410fefa6a601c78a9f9c84a156758da49b38ac8ee54bb4e74 +size 1024876 diff --git a/data/docs/components/ThermalprinterSpecs.pdf b/data/docs/components/ThermalprinterSpecs.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2811038b739cb66bb215a41052dfe643fd962e41 --- /dev/null +++ b/data/docs/components/ThermalprinterSpecs.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:685f301969a9d420343d52ca11e600648b4ced023bc2b3abc74ae3532593bd17 +size 709483 diff --git a/data/docs/components/doc0336.pdf b/data/docs/components/doc0336.pdf new file mode 100644 index 0000000000000000000000000000000000000000..99bee0db46b9bc937cd0c0e7db9334bf68763062 --- /dev/null +++ b/data/docs/components/doc0336.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:edba3a5983127ce94d5d544ed380f035678192339c03603524e6c344ce9563f9 +size 214740 diff --git a/data/docs/components/vga32_v1.4.pdf b/data/docs/components/vga32_v1.4.pdf new file mode 100644 index 0000000000000000000000000000000000000000..09a6e36c573d3b66abb115054430b31e42e2c657 --- /dev/null +++ b/data/docs/components/vga32_v1.4.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe9b793c482ea3c871aa2d31d8a50ac16e8084916f79fbdac6ea498c5ebe159e +size 115880 diff --git a/data/docs/img/Aim-65.jpeg b/data/docs/img/Aim-65.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..c69d376b9b734d69cdb08a8ff98c4a21270cadad --- /dev/null +++ b/data/docs/img/Aim-65.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af37670edeaa7be91e603bd1f3a8c148872d1c94326f8155aa1b91aa98fd7d81 +size 33647 diff --git a/data/docs/img/CoolTerm1.png b/data/docs/img/CoolTerm1.png new file mode 100644 index 0000000000000000000000000000000000000000..fbc88bc1df50bffb360f092e12570a0b254b7421 --- /dev/null +++ b/data/docs/img/CoolTerm1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca904b66e8947a9a22b66ba7a8fa7e793515ea54968b693a5a793b8786926277 +size 273245 diff --git a/data/docs/img/CoolTerm2.png b/data/docs/img/CoolTerm2.png new file mode 100644 index 0000000000000000000000000000000000000000..438b308a409766d4e9e264a9bd14db6bf5af6d9e --- /dev/null +++ b/data/docs/img/CoolTerm2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d6927a48452c493dae8fea6f6235745bb60686db33c0214aad7d46f94f45f79 +size 299339 diff --git a/data/docs/img/CoolTerm3.png b/data/docs/img/CoolTerm3.png new file mode 100644 index 0000000000000000000000000000000000000000..aacc33e015e29fd5a8f69d90c0fac1f977c07cd0 --- /dev/null +++ b/data/docs/img/CoolTerm3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7d4bdf8b9f01870a3c61515a6930a93492e3c630cfbf2f5263c79380f7f743f +size 129242 diff --git a/data/docs/img/ESP8266-NodeMCU-kit-12-E-pinout-gpio-pin.png b/data/docs/img/ESP8266-NodeMCU-kit-12-E-pinout-gpio-pin.png new file mode 100644 index 0000000000000000000000000000000000000000..0f61db4ae9954fb9a1fa35186dd587575713c66b --- /dev/null +++ b/data/docs/img/ESP8266-NodeMCU-kit-12-E-pinout-gpio-pin.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:621473ebc59fe6472a87a9c95d8c36ca924f7d32d7061aa403ae9076da6afcaf +size 242352 diff --git a/data/docs/img/IMG_0128.png b/data/docs/img/IMG_0128.png new file mode 100644 index 0000000000000000000000000000000000000000..01bf12cf2436313b61a16bfa43ccd01dbfd153ea --- /dev/null +++ b/data/docs/img/IMG_0128.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87d8b4a93938975ccef471223d26563dfc25d61cb7ab8a7545dd54f4e2de9287 +size 479236 diff --git a/data/docs/img/IMG_0479.png b/data/docs/img/IMG_0479.png new file mode 100644 index 0000000000000000000000000000000000000000..fdb8587b2687e05498b69360584829e141e8b5b0 --- /dev/null +++ b/data/docs/img/IMG_0479.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:664a5bbb9114b4b67a1080c87fe5e2996ead9193420c1b26985df8467eb17650 +size 500164 diff --git a/data/docs/img/IMG_3135.png b/data/docs/img/IMG_3135.png new file mode 100644 index 0000000000000000000000000000000000000000..4282243812cc3931145e7d34c0e50b0ffa9f3f70 --- /dev/null +++ b/data/docs/img/IMG_3135.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5f386329cd2a29390d437c5d0af5a0d6491aed2219636fa65f27753d9b9bce5 +size 172620 diff --git a/data/docs/img/IMG_3158.png b/data/docs/img/IMG_3158.png new file mode 100644 index 0000000000000000000000000000000000000000..5ae2598814c177defaded1cace651ed8f0de02a7 --- /dev/null +++ b/data/docs/img/IMG_3158.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:073bc399807ac61cfea11d58654a352d81cf3ba26398d4eb0af0c82a534417a3 +size 116312 diff --git a/data/docs/img/IMG_3843.png b/data/docs/img/IMG_3843.png new file mode 100644 index 0000000000000000000000000000000000000000..47028941d49229ea911fe769dcd58f9f48286b59 --- /dev/null +++ b/data/docs/img/IMG_3843.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0984a4b9e112fc58559ae916d47423463b3a0d132d125060ece7145292c083fe +size 174203 diff --git a/data/docs/img/IMG_3846.png b/data/docs/img/IMG_3846.png new file mode 100644 index 0000000000000000000000000000000000000000..c0786b1307935b6b7be320a5566561e77b775e9c --- /dev/null +++ b/data/docs/img/IMG_3846.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc3ed84809d9d7f4eb676a3c6b4b3fd11cb483703c4ee38064bd7f94e20d74c1 +size 188333 diff --git a/data/docs/img/IMG_3882.png b/data/docs/img/IMG_3882.png new file mode 100644 index 0000000000000000000000000000000000000000..e4cb9957dfa8dc390c5e8d61869806e76b67add1 --- /dev/null +++ b/data/docs/img/IMG_3882.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0967ea6ef627274c291812d55f6ef1c92002ea4a6ede22453e991e0c11785671 +size 188962 diff --git a/data/docs/img/IMG_3920.png b/data/docs/img/IMG_3920.png new file mode 100644 index 0000000000000000000000000000000000000000..a362a956a8facf0064b839d2ed43e6eab191c384 --- /dev/null +++ b/data/docs/img/IMG_3920.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f12eb16e2cc285950e30f4dcd758800ee45646920643a969f24d1ff05a87b460 +size 645599 diff --git a/data/docs/img/IMG_3995.png b/data/docs/img/IMG_3995.png new file mode 100644 index 0000000000000000000000000000000000000000..e4b0b3c7460f135e18bd6a2f05e87bcd88e918de --- /dev/null +++ b/data/docs/img/IMG_3995.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ed7738e8f49fe7c5f471ccaefcb5c6382a91de49a10f46c6187aa9a50f7aea5 +size 164194 diff --git a/data/docs/img/IMG_4020.png b/data/docs/img/IMG_4020.png new file mode 100644 index 0000000000000000000000000000000000000000..bdeae5d6453ffa4933ec45d81993377526fb7a15 --- /dev/null +++ b/data/docs/img/IMG_4020.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c8065bf09f7a3494234446b33d608edc6e177004e552c9bb8fc7a80ab150b54 +size 483313 diff --git a/data/docs/img/IMG_4043.png b/data/docs/img/IMG_4043.png new file mode 100644 index 0000000000000000000000000000000000000000..d180779a5f1495bda480d38cf7e55f62678b9ceb --- /dev/null +++ b/data/docs/img/IMG_4043.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2097aa90b22a6fe8057f90026db022d57498eba3c5315181c2ada7603dec90da +size 187793 diff --git a/data/docs/img/IMG_4044.png b/data/docs/img/IMG_4044.png new file mode 100644 index 0000000000000000000000000000000000000000..b3e5ff43401b73372db6ba057487fa4d8d0858d6 --- /dev/null +++ b/data/docs/img/IMG_4044.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:288e57750d4219db25997c332e3a0a72ef2ff4195da27c978ec27e408dcc0542 +size 174734 diff --git a/data/docs/img/IMG_4089.png b/data/docs/img/IMG_4089.png new file mode 100644 index 0000000000000000000000000000000000000000..32caa178b190d331f92b39631efedf88337a5589 --- /dev/null +++ b/data/docs/img/IMG_4089.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:052302e37bfe7e5e5a853e2506bb327a1aa7f25e296f9c99ba5c579a436d6407 +size 185288 diff --git a/data/docs/img/IMG_4210.png b/data/docs/img/IMG_4210.png new file mode 100644 index 0000000000000000000000000000000000000000..d27915a213c89fcb7908a7519f884354e211a398 --- /dev/null +++ b/data/docs/img/IMG_4210.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adadf9751dc0533d0e19e07eedeea0bdb14ff3b6b6fe11b1dfc3df5bdc80c761 +size 192497 diff --git a/data/docs/img/IMG_4211.png b/data/docs/img/IMG_4211.png new file mode 100644 index 0000000000000000000000000000000000000000..7453ac2fdb59602b91358b5b75db1c62d00bd499 --- /dev/null +++ b/data/docs/img/IMG_4211.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d9526d3776897fe2a136a4bdac1da3d11d8e0ba4d74344c2cf1165e9d563a62 +size 185501 diff --git a/data/docs/img/IMG_4212.png b/data/docs/img/IMG_4212.png new file mode 100644 index 0000000000000000000000000000000000000000..651508f4b74c9b254585b8d1bf57d14e2c401793 --- /dev/null +++ b/data/docs/img/IMG_4212.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d13aea8a40a0cf6c471d2218d5c194a6b17bd2364fc6d956fa7ad14d68d550f +size 185261 diff --git a/data/docs/img/IMG_4213.png b/data/docs/img/IMG_4213.png new file mode 100644 index 0000000000000000000000000000000000000000..96cbc2c040935f811dc0f5d6d68559013d1f8c95 --- /dev/null +++ b/data/docs/img/IMG_4213.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b90ddbe32a25992a81539c4a9561298b91cb6cc76a4f696bcdd6f92fddf211a0 +size 192472 diff --git a/data/docs/img/IMG_4214.png b/data/docs/img/IMG_4214.png new file mode 100644 index 0000000000000000000000000000000000000000..902f39a187aeeec14d00ee039a54f1e6b49b55f5 --- /dev/null +++ b/data/docs/img/IMG_4214.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f9f06d2930d7f10e9e1c4a09c2d2a84dd01890261058b3b8d691b9ba2ca001b +size 178723 diff --git a/data/docs/img/IMG_4215.png b/data/docs/img/IMG_4215.png new file mode 100644 index 0000000000000000000000000000000000000000..e74484121152283e8dc189eaca5d8715e9e587a4 --- /dev/null +++ b/data/docs/img/IMG_4215.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3246822c2631e77796bb640260d58ecbce13cc9dac8b8d83c9bd09059fea63f2 +size 185748 diff --git a/data/docs/img/IMG_4216.png b/data/docs/img/IMG_4216.png new file mode 100644 index 0000000000000000000000000000000000000000..4ed97ba7328e3d9716409c88eb47e9d91086528a --- /dev/null +++ b/data/docs/img/IMG_4216.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8be7c0b72127900b2cf765fd8cfffb0ec54703c60f9a595396557d160f805540 +size 157331 diff --git a/data/docs/img/IMG_4217.png b/data/docs/img/IMG_4217.png new file mode 100644 index 0000000000000000000000000000000000000000..ccd6a9f532ce65e27343780f601760f6c7fb2f0f --- /dev/null +++ b/data/docs/img/IMG_4217.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:151fd6416e99a74f2becc7d24053f2e288f6749995959e3ac9f51ca800c027fa +size 158519 diff --git a/data/docs/img/IMG_4219.png b/data/docs/img/IMG_4219.png new file mode 100644 index 0000000000000000000000000000000000000000..d52c967062bac2341a7eb1371dced0f30ced03f4 --- /dev/null +++ b/data/docs/img/IMG_4219.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27a229346e11170345dac65ef1d866f4fc0fc68cf9b6c281f186d4db1ad7acbc +size 184065 diff --git a/data/docs/img/IMG_4220.png b/data/docs/img/IMG_4220.png new file mode 100644 index 0000000000000000000000000000000000000000..5926ac8e0f52027ddb3b6714ada903cb29b93d11 --- /dev/null +++ b/data/docs/img/IMG_4220.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dc6efbcd90b90cf9f97a51d6b8ebb1f22e088017a49cad35dd027d644682fe1 +size 182507 diff --git a/data/docs/img/IMG_4221.png b/data/docs/img/IMG_4221.png new file mode 100644 index 0000000000000000000000000000000000000000..6d7c409e5bdf60e919042165410f934957f51af3 --- /dev/null +++ b/data/docs/img/IMG_4221.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e1d5d438e56657011f088d4f2d9c52701b3ae3c4c1323b83835e98c48a3227c +size 190294 diff --git a/data/docs/img/IMG_4223.png b/data/docs/img/IMG_4223.png new file mode 100644 index 0000000000000000000000000000000000000000..01e250c1eb632782da314b5213ef3f27b5f1b4a8 --- /dev/null +++ b/data/docs/img/IMG_4223.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b3ece719cb2d203658fe0da92e2a56764f724875812de523e30f823a22e1030 +size 179413 diff --git a/data/docs/img/IMG_4226.png b/data/docs/img/IMG_4226.png new file mode 100644 index 0000000000000000000000000000000000000000..5594b6370f034ac2dca6cd285fdd7d66acf80460 --- /dev/null +++ b/data/docs/img/IMG_4226.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c905677b9754989bc8a5b63209675b76709ed615d85129a15e3997e91b7a5d2e +size 184684 diff --git a/data/docs/img/IMG_4228.png b/data/docs/img/IMG_4228.png new file mode 100644 index 0000000000000000000000000000000000000000..06093b10355f870af7865e0e893dd6bd670a4745 --- /dev/null +++ b/data/docs/img/IMG_4228.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:876df03fa3a49d8ea5933c6d0b64ac83e70406636e7f4201bad03ac03d1a4b0e +size 188447 diff --git a/data/docs/img/IMG_4229.png b/data/docs/img/IMG_4229.png new file mode 100644 index 0000000000000000000000000000000000000000..9ab4e87d6134e29a6dbba3b7753a2ddde8169262 --- /dev/null +++ b/data/docs/img/IMG_4229.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:131aad53bd9606e448d08fc6ee7f97709e9cc97558cbe8246ce329dcf91c5d13 +size 176551 diff --git a/data/docs/img/IMG_4230.png b/data/docs/img/IMG_4230.png new file mode 100644 index 0000000000000000000000000000000000000000..e5e19393dff36557243a5098173be110c5895206 --- /dev/null +++ b/data/docs/img/IMG_4230.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a74acadaac862f7a64bcf84802d04a5812c47fae9aca1ae369ae8fe15f6de92 +size 166876 diff --git a/data/docs/img/IMG_4231.png b/data/docs/img/IMG_4231.png new file mode 100644 index 0000000000000000000000000000000000000000..7a96db25452f57e8f6833867b2e6980c5a696d96 --- /dev/null +++ b/data/docs/img/IMG_4231.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ed2861a63ca42ee16539f5776534910eed0da8d3b19de1f8467fec80385009f +size 169584 diff --git a/data/docs/img/IMG_4232.png b/data/docs/img/IMG_4232.png new file mode 100644 index 0000000000000000000000000000000000000000..125b861db1e20f86246324663e70d56eab5c38fc --- /dev/null +++ b/data/docs/img/IMG_4232.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da63815d2028cc002dbb6c5a7cc29839b8ea1019cf7aa716897e7dfbf84c6dea +size 166467 diff --git a/data/docs/img/IMG_4233.png b/data/docs/img/IMG_4233.png new file mode 100644 index 0000000000000000000000000000000000000000..f92ba7fbdb4e25eba674b62c8a3aec9855f203ae --- /dev/null +++ b/data/docs/img/IMG_4233.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:269548eb4475c84ee9f35cd9f3e4d164e4c8d65795b5fb54040be68876866f88 +size 149972 diff --git a/data/docs/img/IMG_4234.png b/data/docs/img/IMG_4234.png new file mode 100644 index 0000000000000000000000000000000000000000..b6c662ed462907ce5863f6ea513efc698bb94c9e --- /dev/null +++ b/data/docs/img/IMG_4234.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da5a326ba46913fd4d257b712bd88a1914cb8ce7835e85f45d55c0d225df64f0 +size 184662 diff --git a/data/docs/img/IMG_4236.png b/data/docs/img/IMG_4236.png new file mode 100644 index 0000000000000000000000000000000000000000..dd46b7531fadd4997ad673718ba830a4730d01a0 --- /dev/null +++ b/data/docs/img/IMG_4236.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a690c1272381ceda1b665aa3991627e1d1d67c7aebdbb4917a88af68cd2e1c0 +size 176334 diff --git a/data/docs/img/IMG_4248.png b/data/docs/img/IMG_4248.png new file mode 100644 index 0000000000000000000000000000000000000000..1496d5a3e162df2d3a95e7d40ae6aa02fae0e5b6 --- /dev/null +++ b/data/docs/img/IMG_4248.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3840369b973f300efe73facbce5e89c7ea83d5bcb718cb279edc7233a430038a +size 419315 diff --git a/data/docs/img/IMG_4249.png b/data/docs/img/IMG_4249.png new file mode 100644 index 0000000000000000000000000000000000000000..2317c4284c12a3c1d9fd24fc8559822054baa836 --- /dev/null +++ b/data/docs/img/IMG_4249.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6bdfea7f48e6ff5da2e413c8bea59dc95b80db1707dc18098cd8fdd8034c273 +size 336441 diff --git a/data/docs/img/IMG_4271.png b/data/docs/img/IMG_4271.png new file mode 100644 index 0000000000000000000000000000000000000000..03881a310c8339fb87c15b4aabd821e944a7dced --- /dev/null +++ b/data/docs/img/IMG_4271.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ba0baf275e4c46bc520d86f845f5e7d85717b04f8f578a37693acbbbdff7ab6 +size 183926 diff --git a/data/docs/img/IMG_4272.png b/data/docs/img/IMG_4272.png new file mode 100644 index 0000000000000000000000000000000000000000..8a6be4a81253bc221509d363d42e7792aef5cc4c --- /dev/null +++ b/data/docs/img/IMG_4272.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1ba4261aa0dfc32a2db77793d80b94aa5adeeb5ca92b9e633a0d2e56017fada +size 154016 diff --git a/data/docs/img/IMG_4284.png b/data/docs/img/IMG_4284.png new file mode 100644 index 0000000000000000000000000000000000000000..3c36d433f1b558e53cc6dc1b7c91bb62a8f36acf --- /dev/null +++ b/data/docs/img/IMG_4284.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c08dceb3709a0ccc5eb6ab76a3423c9ecab5d904d5d591a639b0c90b13b033c +size 746992 diff --git a/data/docs/img/IMG_4285.png b/data/docs/img/IMG_4285.png new file mode 100644 index 0000000000000000000000000000000000000000..2dd2f2b7d958537aaa9a023f9dbc20ec5f47242d --- /dev/null +++ b/data/docs/img/IMG_4285.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0bdd5e63dac96fde72ca30f09d4134b5286bb3fe6a45b902dd5e554c2287f67 +size 657286 diff --git a/data/docs/img/IMG_4286.png b/data/docs/img/IMG_4286.png new file mode 100644 index 0000000000000000000000000000000000000000..8c718a5055241f54dd4f5bd50f5fc086f7772c50 --- /dev/null +++ b/data/docs/img/IMG_4286.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c59f370ad721e4d512ff1d2a489c6ef28b66506e7e6dbd59a115afc759cd0107 +size 708468 diff --git a/data/docs/img/IMG_4287.png b/data/docs/img/IMG_4287.png new file mode 100644 index 0000000000000000000000000000000000000000..8a14459b633529968c51e28b4783a54e29b46839 --- /dev/null +++ b/data/docs/img/IMG_4287.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:376698f5272ade82d1c91a5fac16cd0613e9ccb04236ab21a9d86830ed20ba02 +size 692912 diff --git a/data/docs/img/IMG_4288.png b/data/docs/img/IMG_4288.png new file mode 100644 index 0000000000000000000000000000000000000000..7fe4bd645591c9f69d04fa7db847e6129747a5d0 --- /dev/null +++ b/data/docs/img/IMG_4288.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7a4c8c619f024fb925759978954c93ce3588e2f99e1238085f5f1e6ce647c05 +size 480841 diff --git a/data/docs/img/IMG_4289.png b/data/docs/img/IMG_4289.png new file mode 100644 index 0000000000000000000000000000000000000000..be2e3ee56b9236864212f49b8288759f1f29794e --- /dev/null +++ b/data/docs/img/IMG_4289.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e227b242b3248dd3fc46fb35e46fb034812a7a5fe79672faa5876d80d3517259 +size 536523 diff --git a/data/docs/img/IMG_4290.png b/data/docs/img/IMG_4290.png new file mode 100644 index 0000000000000000000000000000000000000000..d600212cac1524f90f6fcd498b8651c2c4e17bc2 --- /dev/null +++ b/data/docs/img/IMG_4290.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6aa3f4561de14bd9edfd5199f4d0034cfbac25ae59c868924d09fd215f4833d1 +size 472209 diff --git a/data/docs/img/IMG_4291.png b/data/docs/img/IMG_4291.png new file mode 100644 index 0000000000000000000000000000000000000000..f6fd5725a7b844030206e5f4a8992864b923faac --- /dev/null +++ b/data/docs/img/IMG_4291.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:637ca248122c324bb9cf3a3d46558e9ecf0a7f25b009cd4d4b09d1a7ad87a0aa +size 520383 diff --git a/data/docs/img/IMG_4296.png b/data/docs/img/IMG_4296.png new file mode 100644 index 0000000000000000000000000000000000000000..53271fd49fde1ea7a15a01922d0572f94a19ec9a --- /dev/null +++ b/data/docs/img/IMG_4296.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1469d65d7fa94642b53f319b6a7108c5e3d60c6a58a2079df4ce3132ba77db0 +size 666519 diff --git a/data/docs/img/IMG_4297.png b/data/docs/img/IMG_4297.png new file mode 100644 index 0000000000000000000000000000000000000000..6ca960da30c2a8145be9436d2e963d3745c09ea9 --- /dev/null +++ b/data/docs/img/IMG_4297.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e059bc2643a941b927320a92d3eb48709f612c7b44ddfe2bdd180499a3baddc +size 401144 diff --git a/data/docs/img/IMG_4299.png b/data/docs/img/IMG_4299.png new file mode 100644 index 0000000000000000000000000000000000000000..8627a38b649f09b12452d58e1ae30e9bc006f647 --- /dev/null +++ b/data/docs/img/IMG_4299.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:143ef6fb4aac2695ae5b729d28de142f055bfee57a4fa758f8152a78626dfbc8 +size 362437 diff --git a/data/docs/img/IMG_4305.png b/data/docs/img/IMG_4305.png new file mode 100644 index 0000000000000000000000000000000000000000..220110c8cb925cadda518c7791c3cb2afba50f61 --- /dev/null +++ b/data/docs/img/IMG_4305.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dae8cb959dff2486a15d6c433cab09715bcbc42c29a8c261bcae4bec3c392c38 +size 319789 diff --git a/data/docs/img/IMG_4306.png b/data/docs/img/IMG_4306.png new file mode 100644 index 0000000000000000000000000000000000000000..6a5fa3445360a87d16dd269aff559e2090c26b0d --- /dev/null +++ b/data/docs/img/IMG_4306.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc208a88141f919872f5b90a1844ecd74e7b4952ac0c4f9c0238de0988e46bbf +size 525993 diff --git a/data/docs/img/IMG_4308.png b/data/docs/img/IMG_4308.png new file mode 100644 index 0000000000000000000000000000000000000000..b52d99d65b133cf1a7468a0bf03537a77600c5b3 --- /dev/null +++ b/data/docs/img/IMG_4308.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d14222d47a51146b1c25435ffb6a2ff7a61a370dba5a5af10fe0d8487caefe41 +size 203152 diff --git a/data/docs/img/IMG_4315.png b/data/docs/img/IMG_4315.png new file mode 100644 index 0000000000000000000000000000000000000000..1f04ea3fe8d06b13771b53fc647cf14dc3d065bd --- /dev/null +++ b/data/docs/img/IMG_4315.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db5dfe097a8420eb240c7828e40afbe534def329d71c863dbbfc8ab3f7de2528 +size 578147 diff --git a/data/docs/img/IMG_4316.png b/data/docs/img/IMG_4316.png new file mode 100644 index 0000000000000000000000000000000000000000..78970202d8159875e46d6da2d418eeeea0eb2fae --- /dev/null +++ b/data/docs/img/IMG_4316.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:634f3189bd6c5973251327da117207c8cc6ec144ef25dac86827a12ce2292689 +size 656695 diff --git a/data/docs/img/IMG_4317.png b/data/docs/img/IMG_4317.png new file mode 100644 index 0000000000000000000000000000000000000000..1ebbac638cbb7f619be64a8784409ae277ac08cc --- /dev/null +++ b/data/docs/img/IMG_4317.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2a4cc4c0b56ae4c0f072e18697d7dbe9979a0a6a98158d5b600de6fb3944ebf +size 417895 diff --git a/data/docs/img/IMG_4331.png b/data/docs/img/IMG_4331.png new file mode 100644 index 0000000000000000000000000000000000000000..ba4be1b6c7529b48fc447ee2e1ba15e086b50082 --- /dev/null +++ b/data/docs/img/IMG_4331.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee7cc69bad3c70fcd00b952ac2f284e1ad84f514fbe6e315ba574b38c552e2c5 +size 556898 diff --git a/data/docs/img/IMG_4375.png b/data/docs/img/IMG_4375.png new file mode 100644 index 0000000000000000000000000000000000000000..eea7c3bf8e7994acab915ef04827d83dc567168e --- /dev/null +++ b/data/docs/img/IMG_4375.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d96cc42e4d54465d10b04cf4ba989d01b36d1ba0187ee23184e88249ff20ce25 +size 615009 diff --git a/data/docs/img/IMG_4376.png b/data/docs/img/IMG_4376.png new file mode 100644 index 0000000000000000000000000000000000000000..88cd2aebf15b488dcdb7d0f994f950d18cf2ee1a --- /dev/null +++ b/data/docs/img/IMG_4376.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf1a5d01f0942621c7a7cc199b0a6d64975cf3acfaf4bfae2e38d310ccd30b4b +size 675438 diff --git a/data/docs/img/IMG_4378.png b/data/docs/img/IMG_4378.png new file mode 100644 index 0000000000000000000000000000000000000000..c6fcbd38bbd0986e1ef1ed7ad56b81641674d2f3 --- /dev/null +++ b/data/docs/img/IMG_4378.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bf0ead58c7eea6c6b12a482de110451945ab0f381c0a0f62c7373eecf7fb42c +size 556550 diff --git a/data/docs/img/IMG_4382.png b/data/docs/img/IMG_4382.png new file mode 100644 index 0000000000000000000000000000000000000000..411679bb89cc024955866eb16338abd9720cf4a0 --- /dev/null +++ b/data/docs/img/IMG_4382.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80d12e8575659b4859c8421f65a1e4297a4809b9f4091df36a7bf12344585c21 +size 480791 diff --git a/data/docs/img/IMG_4403.png b/data/docs/img/IMG_4403.png new file mode 100644 index 0000000000000000000000000000000000000000..c64428c23287a80d689e65efebf7013534b2375c --- /dev/null +++ b/data/docs/img/IMG_4403.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:183aa3f11ff41ad69ef480c74c083e23d0952ad94b9df41fdd7bfe583eec5139 +size 551284 diff --git a/data/docs/img/IMG_4415-1.png b/data/docs/img/IMG_4415-1.png new file mode 100644 index 0000000000000000000000000000000000000000..bc2e8d615f96c9a1f5583f8897a90a335d95f188 --- /dev/null +++ b/data/docs/img/IMG_4415-1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f668ed1bd924a596b9c08fcd374bbf8a0f754b6d5c910914a0893e1516f76a43 +size 721397 diff --git a/data/docs/img/IMG_4415.png b/data/docs/img/IMG_4415.png new file mode 100644 index 0000000000000000000000000000000000000000..fe0ce69536a332899b6cc5841e2c8be7aa77c40e --- /dev/null +++ b/data/docs/img/IMG_4415.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4fb07b428270774bcea67635387c92967c57c10c6695727dc2033a59d8dd67b +size 523782 diff --git a/data/docs/img/IMG_4417.png b/data/docs/img/IMG_4417.png new file mode 100644 index 0000000000000000000000000000000000000000..b85a48cd42d029a659a7e014a1aa60a287bd8da2 --- /dev/null +++ b/data/docs/img/IMG_4417.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:715629ffa5eed70c7cc016c599fde3ca32dff68e66c2bbdcc520422d238fef13 +size 525261 diff --git a/data/docs/img/IMG_4418.png b/data/docs/img/IMG_4418.png new file mode 100644 index 0000000000000000000000000000000000000000..dd222930da159ce481b889b55cdc4031ad6d6d56 --- /dev/null +++ b/data/docs/img/IMG_4418.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:599897cec20d402668014961030a464e7b77ca9e6dd1e9c20b44a45cf080b739 +size 701712 diff --git a/data/docs/img/IMG_4426.png b/data/docs/img/IMG_4426.png new file mode 100644 index 0000000000000000000000000000000000000000..49b2f9da1651a11b5686b0cc3fa3fa556726e4a7 --- /dev/null +++ b/data/docs/img/IMG_4426.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78eba65a085f310e9bce855a840dea9fedf46f6f452139096b737a7200469e51 +size 555134 diff --git a/data/docs/img/IMG_4428.png b/data/docs/img/IMG_4428.png new file mode 100644 index 0000000000000000000000000000000000000000..88c17eded5c3f6b07a19c1b2479e422f48d1b579 --- /dev/null +++ b/data/docs/img/IMG_4428.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce4132022da1c67cc3dc76e66aa821728f820589e8b861870c7b5f3cc2ea370f +size 488916 diff --git a/data/docs/img/IMG_4487.png b/data/docs/img/IMG_4487.png new file mode 100644 index 0000000000000000000000000000000000000000..0d54cee901a3f5e63ee95c66784397ee153c3b3d --- /dev/null +++ b/data/docs/img/IMG_4487.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2851daf3d75d7e836238a68c39edfb16bec9c98a2beef0ed16e5c5c975acbddb +size 586587 diff --git a/data/docs/img/IMG_4488.png b/data/docs/img/IMG_4488.png new file mode 100644 index 0000000000000000000000000000000000000000..fa593134016587a7a21533e6f8ab03dd6295fe7d --- /dev/null +++ b/data/docs/img/IMG_4488.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20908311bbe8c308e12bf4d1d28c95f4a83e04cf26721a845f853c1659417cfb +size 596213 diff --git a/data/docs/img/IMG_4489.png b/data/docs/img/IMG_4489.png new file mode 100644 index 0000000000000000000000000000000000000000..e1e147400dd25d82d49c3d904f6e5b15b08e2962 --- /dev/null +++ b/data/docs/img/IMG_4489.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3eb80faf97b11d886c5ebebcbe5c77c5393fcb90257e19b0ec52073defeee7d8 +size 612120 diff --git a/data/docs/img/IMG_4491.png b/data/docs/img/IMG_4491.png new file mode 100644 index 0000000000000000000000000000000000000000..ed87859788679a69f6722c2bd7f3f1065a34c1a2 --- /dev/null +++ b/data/docs/img/IMG_4491.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d615b9a5accb49573e19258b5d0185a2905f6d21a5be839a65c9d979e735d93a +size 387645 diff --git a/data/docs/img/IMG_4492.png b/data/docs/img/IMG_4492.png new file mode 100644 index 0000000000000000000000000000000000000000..ab3dda3d061b5ab913c0c83d66b25918bb81a8c7 --- /dev/null +++ b/data/docs/img/IMG_4492.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0348493beed818ee49522fc3a2cc0c12b2eff598b79a7b4bc39f46e1387f0291 +size 407808 diff --git a/data/docs/img/IMG_4493.png b/data/docs/img/IMG_4493.png new file mode 100644 index 0000000000000000000000000000000000000000..885447d82cd50ff3578b58acd9b9a33a01a91aff --- /dev/null +++ b/data/docs/img/IMG_4493.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb83d1dc99c8a236b36157e19539437f1b267e366e4de247e283c40663698814 +size 147131 diff --git a/data/docs/img/IMG_4494.png b/data/docs/img/IMG_4494.png new file mode 100644 index 0000000000000000000000000000000000000000..85bb8a78b23432b072a0e4f84cf120cb9cd5c2a1 --- /dev/null +++ b/data/docs/img/IMG_4494.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47cbdb143b72b4ea20c5ff92811f9a784a2b99892b6e7bb11bddebbf6ba11221 +size 461738 diff --git a/data/docs/img/IMG_4498.png b/data/docs/img/IMG_4498.png new file mode 100644 index 0000000000000000000000000000000000000000..7083ad3fc51dd921ff3b3a04a4612b0472b36642 --- /dev/null +++ b/data/docs/img/IMG_4498.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:814b9700d7822f55e1259b3d3f71c825109287c96637e879d5a6319f24d7400c +size 171872 diff --git a/data/docs/img/IMG_4499.png b/data/docs/img/IMG_4499.png new file mode 100644 index 0000000000000000000000000000000000000000..deea95451eb87ed4eaadc01d01ff0ec9deae5053 --- /dev/null +++ b/data/docs/img/IMG_4499.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3e239807cafa888bb655cc0837732fb89df89058d6ddbea5142dd07de99c632 +size 162615 diff --git a/data/docs/img/IMG_4500.png b/data/docs/img/IMG_4500.png new file mode 100644 index 0000000000000000000000000000000000000000..e455008c66477e7363c2ef625b515e4a37836b5c --- /dev/null +++ b/data/docs/img/IMG_4500.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60c2b259649e26e487f41b0e60141b55cdda4d3c7fc39c3ee7d76bd0871fd7f8 +size 153604 diff --git a/data/docs/img/IMG_4501.png b/data/docs/img/IMG_4501.png new file mode 100644 index 0000000000000000000000000000000000000000..63c187cfa9bc588e9f9233c31330b14fa66d0688 --- /dev/null +++ b/data/docs/img/IMG_4501.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00783e5a02a9e11b6eb7de78035b13c32adaeeed215dcc29ce56874d972527f1 +size 163380 diff --git a/data/docs/img/IMG_4663.png b/data/docs/img/IMG_4663.png new file mode 100644 index 0000000000000000000000000000000000000000..11f08e965cedab1049552ea355e8a6336c466353 --- /dev/null +++ b/data/docs/img/IMG_4663.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2aef022132ba867a09143edf2dfaa7a3bd93fbc006a23e10d064ddbc1965dfb +size 637963 diff --git a/data/docs/img/IMG_4669.png b/data/docs/img/IMG_4669.png new file mode 100644 index 0000000000000000000000000000000000000000..e4edd289d847dd433506b77b69505583d9068fb7 --- /dev/null +++ b/data/docs/img/IMG_4669.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56e1dbeb2dbd19c0a1f04b749462b7c4120fe859358304828b65f2ea20b03188 +size 183550 diff --git a/data/docs/img/IMG_4671.png b/data/docs/img/IMG_4671.png new file mode 100644 index 0000000000000000000000000000000000000000..04c92877b4b04a344d4c67eac02f6c99afec0b7f --- /dev/null +++ b/data/docs/img/IMG_4671.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2db16864c79c0592e5f7dc4c87599531c1957dbab278a66bf93c086ca9d8277 +size 179458 diff --git a/data/docs/img/IMG_5001.png b/data/docs/img/IMG_5001.png new file mode 100644 index 0000000000000000000000000000000000000000..46a9c0405a33a1d465cf3f2eda2711b33d4c4079 --- /dev/null +++ b/data/docs/img/IMG_5001.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b42c007f5a54c89b67e045cfacce23bf536310573fceba1bca0033800cb94734 +size 35458 diff --git a/data/docs/img/IMG_5002.png b/data/docs/img/IMG_5002.png new file mode 100644 index 0000000000000000000000000000000000000000..ef558a8af8c17d09eb39a93ded83bc1dafa34bef --- /dev/null +++ b/data/docs/img/IMG_5002.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50c35f9ad1742a18de4ae788aa128022c0aa70e972e7b8e90f6bb12c4b0eaf96 +size 52258 diff --git a/data/docs/img/IMG_5003.png b/data/docs/img/IMG_5003.png new file mode 100644 index 0000000000000000000000000000000000000000..72ed2ecfe5cc14be45000e0e792f0145e2a948c6 --- /dev/null +++ b/data/docs/img/IMG_5003.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e660e72b52da6d78ccab4e5ef30ac952781e928ec8d9fd5f56439b51fb87d9ca +size 566683 diff --git a/data/docs/img/IMG_5613.png b/data/docs/img/IMG_5613.png new file mode 100644 index 0000000000000000000000000000000000000000..9805425a14b8e146e33e459f20a3b32aa90ce808 --- /dev/null +++ b/data/docs/img/IMG_5613.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a8344d2ab67318c40fd0c7c242442118fe69c7a33179849d581952b0501e664 +size 2009403 diff --git a/data/docs/img/IMG_5638.png b/data/docs/img/IMG_5638.png new file mode 100644 index 0000000000000000000000000000000000000000..fc0d874cdfc0ab3f156eace60ff2643affda8a14 --- /dev/null +++ b/data/docs/img/IMG_5638.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51af4ee070e855a167713c4b4e87cfa7eba2ce3b8308650c04a1fd6c36023ff8 +size 165126 diff --git a/data/docs/img/IMG_5701.png b/data/docs/img/IMG_5701.png new file mode 100644 index 0000000000000000000000000000000000000000..1dd8446d8267dfdb126abd48703f67b96e60f055 --- /dev/null +++ b/data/docs/img/IMG_5701.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd93b06e590d361e5b1fa7118016247bd95b48f8c32472bf9df4c8362f4afd2e +size 195858 diff --git a/data/docs/img/IMG_5703.png b/data/docs/img/IMG_5703.png new file mode 100644 index 0000000000000000000000000000000000000000..6cb5499cc8312358074fc049232fc86f7f124beb --- /dev/null +++ b/data/docs/img/IMG_5703.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:534d99529ca12d4b6916b1a13108f3dfdbfb61d45e72e84ec35aaf7d56d73754 +size 208209 diff --git a/data/docs/img/IMG_5704.png b/data/docs/img/IMG_5704.png new file mode 100644 index 0000000000000000000000000000000000000000..6ffbc1a01d1229170520ab3b5f5c6298b2184c92 --- /dev/null +++ b/data/docs/img/IMG_5704.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:559ed2ea15cbd44f920c5c72dea199d9464e2873fdff41afeb48cfffc0068d19 +size 162305 diff --git a/data/docs/img/IMG_5705.png b/data/docs/img/IMG_5705.png new file mode 100644 index 0000000000000000000000000000000000000000..356c60e99ac5aaaa8c34b94b99bbe103560ec10a --- /dev/null +++ b/data/docs/img/IMG_5705.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca740427c1dc48a5685d29931649af4050c6ad2f799b203a7421e67e7f100b82 +size 175130 diff --git a/data/docs/img/IMG_5768.png b/data/docs/img/IMG_5768.png new file mode 100644 index 0000000000000000000000000000000000000000..79317329521f92be2341e6e14c054c2531701430 --- /dev/null +++ b/data/docs/img/IMG_5768.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f51d18da915aaadc91a41e9f8f3d6a65aeafd28c793c480bf61bf27261e8d7ab +size 609364 diff --git a/data/docs/img/IMG_5888.png b/data/docs/img/IMG_5888.png new file mode 100644 index 0000000000000000000000000000000000000000..1c738b3b7eb15d5c626d42a31d734b6a07280763 --- /dev/null +++ b/data/docs/img/IMG_5888.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c863305b9e1b020df795f1021d8b2be5302c8808776a0d74476131bd89875996 +size 190267 diff --git a/data/docs/img/IMG_5893.png b/data/docs/img/IMG_5893.png new file mode 100644 index 0000000000000000000000000000000000000000..3023d356a33f7a9f1f999265a3347773c56cb976 --- /dev/null +++ b/data/docs/img/IMG_5893.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1de5b9472d0f257d93e72196167ff1d65ffad52e261983241f4b15a0a0375ad +size 189462 diff --git a/data/docs/img/IMG_6817.png b/data/docs/img/IMG_6817.png new file mode 100644 index 0000000000000000000000000000000000000000..8d3380ccd5cf2cd9346d9f82083ecf2ff6af91a4 --- /dev/null +++ b/data/docs/img/IMG_6817.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac2e0449ba9273cfd4e4aa0ef32af3795982623e834d8da1ddf94291e5ec920b +size 611285 diff --git a/data/docs/img/IMG_7220.mov b/data/docs/img/IMG_7220.mov new file mode 100644 index 0000000000000000000000000000000000000000..27212844458f8e3b519d36a7355c056f473e35ba --- /dev/null +++ b/data/docs/img/IMG_7220.mov @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8a7da5020e8ccc55ae747c48650a22b5c26f22570fc48e4e6f5f9f75772c172 +size 1510122 diff --git a/data/docs/img/Readme.md b/data/docs/img/Readme.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/data/docs/img/TTGO-VGA-HW.jpeg b/data/docs/img/TTGO-VGA-HW.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3115917f1d21fda8c83fa6b48e21358abef0de19 --- /dev/null +++ b/data/docs/img/TTGO-VGA-HW.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b101c587902dada90d4adfe0f6c5834ecde852411f957e61858433225862f68 +size 200799 diff --git a/data/docs/img/TTGOVGA-Specs.jpeg b/data/docs/img/TTGOVGA-Specs.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..47f3a4dcfc38e9908a41bdd31cf4cb9fcc900692 --- /dev/null +++ b/data/docs/img/TTGOVGA-Specs.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f4f93169f9ba32e6451fc269a41ee4a766c58f8028f4ed0e54170649134c1e1 +size 88922 diff --git a/data/docs/img/nrf24l01_pinout_qfp5d3C9qD.jpeg b/data/docs/img/nrf24l01_pinout_qfp5d3C9qD.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..a1ee61587315873eb9eb23f1962f5e2e268fdf6d --- /dev/null +++ b/data/docs/img/nrf24l01_pinout_qfp5d3C9qD.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ec6ec59e5425c16c4305f3889facca00d40b294f38d05043c8eda9cdc7fdbb5 +size 24129 diff --git a/data/docs/img/shieldmod1_Steckplatine.png b/data/docs/img/shieldmod1_Steckplatine.png new file mode 100644 index 0000000000000000000000000000000000000000..ddc1340c6aee25862815cfbb5d80ad70dde73d31 --- /dev/null +++ b/data/docs/img/shieldmod1_Steckplatine.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c46edc2825cc2cf08f618a3528fc04735664438c91a3a6419f7bbb7f06d94341 +size 235718 diff --git a/data/docs/tutorial/BASIC on Arduinos - Introduction.epub b/data/docs/tutorial/BASIC on Arduinos - Introduction.epub new file mode 100644 index 0000000000000000000000000000000000000000..641261dbef164c50151f06000b57929df9f44607 --- /dev/null +++ b/data/docs/tutorial/BASIC on Arduinos - Introduction.epub @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f596952cb095821ba8c234bf8f06954611d99a8c9450f97f4e569e35ddeaa2d +size 6965006 diff --git a/data/docs/tutorial/BASIC on Arduinos - Introduction.pages b/data/docs/tutorial/BASIC on Arduinos - Introduction.pages new file mode 100644 index 0000000000000000000000000000000000000000..e963032d23c1362097d72dc3c5b9c749c1f019d8 --- /dev/null +++ b/data/docs/tutorial/BASIC on Arduinos - Introduction.pages @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de00c96a680c261bc80f1a7e6864a50fb3a8fb94acb6644fe67b4c4e478de79e +size 8290554 diff --git a/data/docs/wire/AIM65.fzz b/data/docs/wire/AIM65.fzz new file mode 100644 index 0000000000000000000000000000000000000000..5db70d5c83dcb9fdd357327817d4d168f3a1f5ef Binary files /dev/null and b/data/docs/wire/AIM65.fzz differ diff --git a/data/docs/wire/TFTcomputer.fzz b/data/docs/wire/TFTcomputer.fzz new file mode 100644 index 0000000000000000000000000000000000000000..2a02d3357cd4d7d39ec55787507e703250f53360 Binary files /dev/null and b/data/docs/wire/TFTcomputer.fzz differ diff --git a/data/docs/wire/shieldmod1.fzz b/data/docs/wire/shieldmod1.fzz new file mode 100644 index 0000000000000000000000000000000000000000..a48223a6139e9a46ae001f33caa2eff237d71255 Binary files /dev/null and b/data/docs/wire/shieldmod1.fzz differ diff --git a/data/docs/wire/shieldmod2.fzz b/data/docs/wire/shieldmod2.fzz new file mode 100644 index 0000000000000000000000000000000000000000..a2a7888abf9e419a9c173a846f916531271647d5 Binary files /dev/null and b/data/docs/wire/shieldmod2.fzz differ diff --git a/data/examples/00tutorial/arch.bas b/data/examples/00tutorial/arch.bas new file mode 100644 index 0000000000000000000000000000000000000000..c6cef2dfe7714b489aef99478150afa435347ea5 --- /dev/null +++ b/data/examples/00tutorial/arch.bas @@ -0,0 +1,13 @@ +10 CLS +20 A=0.5 +30 L=8 +40 S=2 +50 X0=40 +60 Y0=15 +70 DEF FN X(W)=S*A*W*SIN(W)+X0 +80 DEF FN Y(W)=A*W*COS(W)+Y0 +100 FOR W=0 TO 3.14*L STEP 0.1 +110 LOCATE FN X(W),FN Y(W) +120 PUT "x" +130 NEXT +300 PRINT diff --git a/data/examples/00tutorial/archvt52.bas b/data/examples/00tutorial/archvt52.bas new file mode 100644 index 0000000000000000000000000000000000000000..4b569e1ab35d8b90e0b1835c72405feb98bbd78e --- /dev/null +++ b/data/examples/00tutorial/archvt52.bas @@ -0,0 +1,13 @@ +10 PUT 27, "E" +20 A=0.5 +30 L=8 +40 S=2 +50 X0=40 +60 Y0=15 +70 DEF FN X(W)=S*A*W*SIN(W)+X0 +80 DEF FN Y(W)=A*W*COS(W)+Y0 +100 FOR W=0 TO 3.14*L STEP 0.1 +110 PUT27, "Y", 31+FN Y(W),31+FN X(W) +120 PUT "x" +130 NEXT +300 PRINT diff --git a/data/examples/00tutorial/array.bas b/data/examples/00tutorial/array.bas new file mode 100644 index 0000000000000000000000000000000000000000..7ba29b3d97fb121a529f7c3fa5dbffb4cac72830 --- /dev/null +++ b/data/examples/00tutorial/array.bas @@ -0,0 +1,46 @@ +10 REM "Array test program" +20 REM "Dimensioning, storing and recalling" +30 REM "Arrays are dimensioned with DIM like A(), B()" +40 REM "Arrays autodimension to size 10 like C()" +50 REM "@E() is the EEPROM array" +60 REM "@() is the end of memory array" +100 DIM B(28) +110 DIM A(18) +200 PRINT "Testing indexing A(I), B() is zero" +210 FOR I=1 TO 18 +220 A(I)=I*I +230 NEXT +240 FOR I=1 TO 18 +250 PRINT I, A(I), "=", I*I +260 NEXT +270 FOR I=1 TO 28 +280 PRINT I, B(I), "=", 0 +290 NEXT +300 PRINT "Testing A(2)" +310 A(2)=127 +320 PRINT #4, A(2), "= 127" +400 PRINT "Autodimensioning C" +410 FOR I=1 TO 10 +420 C(I)=RND(I) +430 NEXT +440 FOR I=1 TO 10 +450 PRINT I, C(I) +460 NEXT +500 PRINT "Testing B() and @()" +510 FOR I=1 TO 10 +520 B(I)=I*6: @(I)=I*6 +530 NEXT +540 PRINT "Size of memory array=", @ +550 FOR J=1 TO 4 +560 PRINT #3,J,B(J),@(J);" = ";6*J +570 NEXT +600 PRINT "Testing EEPROM" +610 PRINT "Size of EEPROM array=", @E +620 IF @E=0 THEN PRINT "No EEPROM" : END +630 FOR I=1 TO 10 +640 @E(I)=I*I +650 NEXT +660 FOR J=1 TO 10 +670 PRINT #3,J,@E(J);" = ";J*J +680 NEXT +700 END diff --git a/data/examples/00tutorial/calc.bas b/data/examples/00tutorial/calc.bas new file mode 100644 index 0000000000000000000000000000000000000000..b4eda19944e111ee49ee708c8c1aa365b1e638cc --- /dev/null +++ b/data/examples/00tutorial/calc.bas @@ -0,0 +1,85 @@ +10 REM "Pocket calculator in BASIC" +20 REM "" +100 REM "Definitions - keywords and tokens" +110 DATA "+", 2, "-", 3, "*", 4, "/", 5, "p", 6, "d", 7, "q", 8 +111 DATA "sqr", 9, "dup", 10, "swap", 11, "", 12, "", 13, "", 14, "", 15, "", 16 +120 REM "The stack" +130 S=0 +140 N=16 +150 DIM S(N) +160 REM "Errors" +170 E=0 +200 REM "Input loop" +210 PRINT "<";S;">:"; :INPUT A$ +220 @S=0 +230 A=VAL(A$) +240 IF @S=0 THEN T=1 : GOTO 500 +300 T=-1 +310 RESTORE +330 @S=0 +340 FOR I +350 READ K$ +360 READ X +370 IF K$=A$ THEN T=X : BREAK +380 IF @S<>0 THEN BREAK +390 NEXT +400 IF T=-1 THEN E=1 +500 REM "The token switch, with an evil expression GOSUB" +505 REM "Line numbers 1000, 1100, ... are targeted" +510 IF T>0 GOSUB 900+100*T +600 IF E<>0 THEN PRINT "Error" : E=0 : GOTO 200 +610 IF S>0 THEN PRINT S(S) +620 GOTO 200 +1000 REM "Enter a number" +1010 IF S=N THEN E=0: RETURN +1020 S=S+1 : S(S)=A +1030 RETURN +1100 REM "Addition" +1110 IF S<2 THEN E=1: RETURN +1120 S(S-1)=S(S-1)+S(S) +1130 S=S-1 +1140 RETURN +1200 REM "Subtraction" +1210 IF S<2 THEN E=1: RETURN +1220 S(S-1)=S(S-1)-S(S) +1230 S=S-1 +1240 RETURN +1300 REM "Multiplication" +1310 IF S<2 THEN E=1: RETURN +1320 S(S-1)=S(S-1)*S(S) +1330 S=S-1 +1340 RETURN +1400 REM "Division" +1410 IF S<2 OR S(S)=0 THEN E=1: RETURN +1420 S(S-1)=S(S-1)/S(S) +1430 S=S-1 +1440 RETURN +1500 REM "Display a number" +1510 IF S=0 THEN E=1 +1530 RETURN +1600 REM "Drop" +1610 IF S=0 THEN E=1 ELSE S=S-1 +1620 RETURN +1700 REM "Quit" +1710 END +1800 REM "Square root" +1810 IF S(S)<0 OR S=0 THEN E=1 ELSE S(S)=SQR(S(S)) +1820 RETURN +1900 REM "Dup" +1910 IF S>N-1 OR S=0 THEN E=1 ELSE S=S+1: S(S)=S(S-1) +1920 RETURN +2000 REM "Swap" +2010 IF S=N OR S<2 THEN E=1 ELSE A=S(S) : S(S)=S(S-1) : S(S-1)=A +2020 RETURN +2100 REM "" +2120 RETURN +2200 REM "" +2220 RETURN +2300 REM "" +2320 RETURN +2400 REM "" +2420 RETURN +2500 REM "" +2520 RETURN + + diff --git a/data/examples/00tutorial/calcs.bas b/data/examples/00tutorial/calcs.bas new file mode 100644 index 0000000000000000000000000000000000000000..a6144a20c7c4d2bcc36b21347ba9340014db3293 --- /dev/null +++ b/data/examples/00tutorial/calcs.bas @@ -0,0 +1,90 @@ +10 REM "Pocket calculator in BASIC" +20 REM "This version uses the structured language set" +100 REM "Definitions - keywords and tokens" +110 DATA "+", 2, "-", 3, "*", 4, "/", 5, "p", 6, "d", 7, "q", 8 +111 DATA "sqr", 9, "dup", 10, "swap", 11, "", 12, "", 13, "", 14, "", 15, "", 16 +120 REM "The stack" +130 S=0 +140 N=16 +150 DIM S(N) +160 REM "Errors" +170 E=0 +200 REM "Input loop" +205 WHILE 1 +210 PRINT "<";S;">:"; :INPUT A$ +220 @S=0 +230 A=VAL(A$) +240 IF @S=0 THEN T=1 : GOTO 500 +300 T=-1 +310 RESTORE +330 @S=0 +340 FOR I +350 READ K$ +360 READ X +370 IF K$=A$ THEN T=X : BREAK +380 IF @S<>0 THEN BREAK +390 NEXT +400 IF T=-1 THEN E=1 +500 REM "The token switch, with an evil expression GOSUB" +505 REM "Line numbers 1000, 1100, ... are targeted" +510 IF T>0 GOSUB 1000 +600 IF E<>0 THEN PRINT "Error" : E=0 : CONT +610 IF S>0 THEN PRINT S(S) +620 WEND +1000 SWITCH T +1010 CASE 1 +1020 REM "Enter a number" +1030 IF S=N THEN E=0: RETURN +1040 S=S+1 : S(S)=A +1050 CASE 2 +1060 REM "Addition" +1070 IF S<2 THEN E=1: RETURN +1080 S(S-1)=S(S-1)+S(S) +1090 S=S-1 +1100 CASE 3 +1110 REM "Subtraction" +1120 IF S<2 THEN E=1: RETURN +1130 S(S-1)=S(S-1)-S(S) +1140 S=S-1 +1150 CASE 4 +1160 REM "Multiplication" +1170 IF S<2 THEN E=1: RETURN +1180 S(S-1)=S(S-1)*S(S) +1190 S=S-1 +1200 CASE 5 +1210 REM "Division" +1220 IF S<2 OR S(S)=0 THEN E=1: RETURN +1230 S(S-1)=S(S-1)/S(S) +1240 S=S-1 +1250 CASE 6 +1260 REM "Display a number" +1270 IF S=0 THEN E=1 +1280 CASE 7 +1290 REM "Drop" +1300 IF S=0 THEN E=1 ELSE S=S-1 +1310 CASE 8 +1320 REM "Quit" +1330 END +1340 CASE 9 +1350 REM "Square root" +1360 IF S(S)<0 OR S=0 THEN E=1 ELSE S(S)=SQR(S(S)) +1370 CASE 10 +1380 REM "Dup" +1390 IF S>N-1 OR S=0 THEN E=1 ELSE S=S+1: S(S)=S(S-1) +1400 CASE 11 +1410 REM "Swap" +1420 IF S=N OR S<2 THEN E=1 ELSE A=S(S) : S(S)=S(S-1) : S(S-1)=A +1430 CASE 12 +1440 REM "" +1450 CASE 13 +1460 REM "" +1470 CASE 14 +1480 REM "" +1490 CASE 15 +1500 REM "" +1510 CASE 16 +1520 REM "" +1530 SWEND +1600 RETURN + + diff --git a/data/examples/00tutorial/clock.bas b/data/examples/00tutorial/clock.bas new file mode 100644 index 0000000000000000000000000000000000000000..e340304e666756e4e4de26adc576697db66eaa42 --- /dev/null +++ b/data/examples/00tutorial/clock.bas @@ -0,0 +1,10 @@ +10 REM "Show the time and date of the real time clock" +20 REM "" +100 REM "The day is never 0 if the clock runs" +110 IF @T(3)=0 THEN PRINT "No clock active" : END +200 PRINT @T(2);":";@T(1);":";@T(0) +210 PRINT @T(3);"/";@T(4);"/";@T(5) +230 PRINT "Temp:",@T(7)/100 +240 PRINT "Clock string value" +250 PRINT @T$ + diff --git a/data/examples/00tutorial/clrvar.bas b/data/examples/00tutorial/clrvar.bas new file mode 100644 index 0000000000000000000000000000000000000000..24ee828b0ff76f3a1dad3b4a4adafe862d303f17 --- /dev/null +++ b/data/examples/00tutorial/clrvar.bas @@ -0,0 +1,17 @@ +10 M=USR(0, 9) +20 PRINT "Memory size is ";M +30 PRINT "Himem is "; HIMEM +40 PRINT "Heap size is "; M-HIMEM-1 +110 DIM A(8) +120 FOR I=1 TO 8: A(I)=I: NEXT +130 FOR I=1 TO 8: PRINT I, A(I): NEXT +140 A$="Hello World" +150 PRINT "Heap size is "; M-HIMEM-1 +200 PRINT "A$ is ";A$ +210 CLR A() +220 PRINT "A$ is ";A$ +230 PRINT "Heap size is "; M-HIMEM-1 +300 DIM A(20) +310 FOR I=1 TO 20: A(I)=I: NEXT +320 FOR I=1 TO 20: PRINT I, A(I): NEXT +330 PRINT "Heap size is "; M-HIMEM-1 diff --git a/data/examples/00tutorial/cond.bas b/data/examples/00tutorial/cond.bas new file mode 100644 index 0000000000000000000000000000000000000000..a14a04957dd2ed911815868044efb771bc3607f4 --- /dev/null +++ b/data/examples/00tutorial/cond.bas @@ -0,0 +1,9 @@ +10 REM "Conditions if then else demo" +20 REM "" +100 A=10 +110 IF A=10 THEN 130 +120 PRINT "This code is never reached" +130 IF A=10 THEN PRINT "A is 10" ELSE PRINT "A is not 10" +140 IF A=20 ELSE PRINT "A is not 20" +200 END + diff --git a/data/examples/00tutorial/convert.bas b/data/examples/00tutorial/convert.bas new file mode 100644 index 0000000000000000000000000000000000000000..db1f237c5822dfc46cb875e7c0171e4e47d116c1 --- /dev/null +++ b/data/examples/00tutorial/convert.bas @@ -0,0 +1,11 @@ +10 REM "Convert strings to numbers and vice versa" +20 REM "" +100 INPUT "Input a number: ", A$ +110 REM "Clear the error flag" +120 @S=0 +130 A=VAL(A$) +140 IF @S=0 THEN PRINT "Conversion successful, number is ", A ELSE PRINT "Number error" +200 INPUT "Input a number: ", A +210 A$=STR(A) +220 PRINT "The number is '";A$;"' " +300 END diff --git a/data/examples/00tutorial/cpinew1.bas b/data/examples/00tutorial/cpinew1.bas new file mode 100644 index 0000000000000000000000000000000000000000..3b838bdb0fde47aa56cadf1d3d5d40eac79354fb --- /dev/null +++ b/data/examples/00tutorial/cpinew1.bas @@ -0,0 +1,68 @@ +100 REM "CALCULATING PI FOR HUNDREDS OF DIGITS" +110 REM "THX TO ROSETTACODE.ORG FOR THE BASE OF THE PROGRAM" +120 REM "SHOULD BE A BENCHMARK FOR THE BASIC INTERPRETER/COMPILER" +130 REM "WRITTEN IN 2023 FOR FORUM.CLASSIC-COMPUTING.DE BY PETER DASSOW" +135 REM "Ported to IoT BASIC by Guido Lehwalder, 2023" +137 CLS +140 PRINT "Calculating Pi as a BASIC benchmark." +150 PRINT "Enter number of digits (below or equal 1000): "; +160 INPUT S$ +170 IF S$="" THEN PRINT "Nothing done.": END +180 N=VAL(S$): IF N>1000 OR N<1 THEN PRINT "Not a valid number.": GOTO 150 +190 REM "N DETERMINES ALSO THE ARRAY (ABOUT 3-4 TIMES BIGGER)" +200 LN=INT(10*N/3)+16 +210 ND=1 +220 SM=MILLIS(1) +230 REM "DIM STATEMENT COULD HAVE LN AS SIZE PARAMETER, BUT COMPATIBILITY..." +240 DIM A(3350) +250 N9=0 +260 PD=0 +270 REM +280 FOR J=1 TO LN +290 A(J)=2 +300 NEXT J +310 REM +320 FOR J=1 TO N +330 Q=0 +340 FOR I=LN TO 1 STEP -1 +350 X=10*A(I)+Q*I +360 A(I)=X-(2*I-1)*INT(X/(2*I-1)) +370 Q=INT(X/(2*I-1)) +380 NEXT I +390 A(1)=Q-10*INT(Q/10) +400 Q=INT(Q/10) +410 IF Q=9 THEN N9=N9+1: GOTO 610 +420 IF Q<>10 THEN GOTO 540 +430 REM "Q==10" +440 D=PD+1: GOSUB 670 +450 IF N9<=0 THEN GOTO 500 +460 FOR K=1 TO N9 +470 D=0: GOSUB 670 +480 NEXT K +490 REM "END IF" +500 PD=0 +510 N9=0 +520 GOTO 610 +530 REM "Q<>10" +540 D=PD: GOSUB 670 +550 PD=Q +560 IF N9=0 THEN GOTO 610 +570 FOR K=1 TO N9 +580 D=9: GOSUB 670 +590 NEXT K +600 N9=0 +610 NEXT J +620 C$=STR(PD): Z=LEN(C$) +621 PRINT C$(Z,Z) +630 EM=MILLIS(1)-SM +635 PRINT "Calculation time ";EM/1000;" seconds." +640 END +650 REM +660 REM "OUTPUT DIGITS" +670 C$=STR(D): Z=LEN(C$) +671 IF ND=0 THEN PRINT C$(Z,Z);: RETURN +680 IF D=0 THEN RETURN +690 C$=STR(D): Z=LEN(C$) +691 PRINT C$(Z,Z);"."; +700 ND=0 +710 RETURN diff --git a/data/examples/00tutorial/cpinew2.bas b/data/examples/00tutorial/cpinew2.bas new file mode 100644 index 0000000000000000000000000000000000000000..a2893cad080e325abb48ba6df1f86f40cb8105b8 --- /dev/null +++ b/data/examples/00tutorial/cpinew2.bas @@ -0,0 +1,72 @@ +100 REM "CALCULATING PI FOR HUNDREDS OF DIGITS" +110 REM "THX TO ROSETTACODE.ORG FOR THE BASE OF THE PROGRAM" +120 REM "SHOULD BE A BENCHMARK FOR THE BASIC INTERPRETER/COMPILER" +130 REM "WRITTEN IN 2023 FOR FORUM.CLASSIC-COMPUTING.DE BY PETER DASSOW" +135 REM "Ported to IoT BASIC by Guido Lehwalder" +136 REM "Added some IoT BASIC features - Stefan Lenz, 2023" +137 CLS +140 PRINT "Calculating Pi as a BASIC benchmark." +150 PRINT "Enter number of digits: "; +160 INPUT S$ +170 IF S$="" THEN PRINT "Nothing done.": END +180 N=VAL(S$): IF N<1 THEN PRINT "Not a valid number.": GOTO 150 +190 REM "N DETERMINES ALSO THE ARRAY (ABOUT 3-4 TIMES BIGGER)" +200 LN=INT(10*N/3)+16 +204 REM "@ is the space on the heap for numbers, reserve 64 bytes" +205 IF LN>(@-64) THEN PRINT "Not enough memory": GOTO 150 +210 ND=1 +220 SM=MILLIS(1) +225 REM "Delete the array if already there" +230 IF FIND(A())<>0 THEN CLR A() +235 REM "Then redim" +240 DIM A(LN) +250 N9=0 +260 PD=0 +270 REM +280 FOR J=1 TO LN +290 A(J)=2 +300 NEXT J +310 REM "Use of the modulo operator % speeds things up" +320 FOR J=1 TO N +330 Q=0 +340 FOR I=LN TO 1 STEP -1 +350 X=10*A(I)+Q*I +360 A(I)=X%(2*I-1) +370 Q=INT(X/(2*I-1)) +380 NEXT I +390 A(1)=Q%10 +400 Q=INT(Q/10) +410 IF Q=9 THEN N9=N9+1: GOTO 610 +420 IF Q<>10 THEN GOTO 540 +430 REM "Q==10" +440 D=PD+1: GOSUB 670 +450 IF N9<=0 THEN GOTO 500 +460 FOR K=1 TO N9 +470 D=0: GOSUB 670 +480 NEXT K +490 REM "END IF" +500 PD=0 +510 N9=0 +520 GOTO 610 +530 REM "Q<>10" +540 D=PD: GOSUB 670 +550 PD=Q +560 IF N9=0 THEN GOTO 610 +570 FOR K=1 TO N9 +580 D=9: GOSUB 670 +590 NEXT K +600 N9=0 +610 NEXT J +620 C$=("0"+PD%10) +621 PRINT C$ +630 EM=MILLIS(1)-SM +635 PRINT "Calculation time ";EM/1000;" seconds." +640 GOTO 140 +650 REM +660 REM "OUTPUT DIGITS" +670 C$=("0"+D%10) +671 IF ND=0 THEN PRINT C$;: RETURN +680 IF D=0 THEN RETURN +691 PRINT C$;"."; +700 ND=0 +710 RETURN diff --git a/data/examples/00tutorial/debug.bas b/data/examples/00tutorial/debug.bas new file mode 100644 index 0000000000000000000000000000000000000000..856cb8506060eab89354f64cd9e7d34cec48f9db --- /dev/null +++ b/data/examples/00tutorial/debug.bas @@ -0,0 +1,8 @@ +10 REM "Debug mode settings" +20 REM "" +100 PRINT "Runtime debug a BASIC program" +110 SET 0,1 +120 FOR I=1 TO 4: PRINT I : NEXT +130 SET 0,0 +140 PRINT "For more features of SET -> Wiki" +150 END diff --git a/data/examples/00tutorial/dump.bas b/data/examples/00tutorial/dump.bas new file mode 100644 index 0000000000000000000000000000000000000000..24070cb8b7bdf7a18adac6751d1da022601dba18 --- /dev/null +++ b/data/examples/00tutorial/dump.bas @@ -0,0 +1,7 @@ +10 REM "DUMP demo program" +20 REM "" +100 PRINT "This is how the BASIC memory and EEPROM looks like" +110 T=HIMEM-SIZE +120 PRINT "The end of the program is at", T +130 DUMP 0, T +140 END diff --git a/data/examples/00tutorial/eeprom.bas b/data/examples/00tutorial/eeprom.bas new file mode 100644 index 0000000000000000000000000000000000000000..36638c7a86966b306779cd8019c53726b031573d --- /dev/null +++ b/data/examples/00tutorial/eeprom.bas @@ -0,0 +1,16 @@ +10 REM "EEPROM demo" +20 REM "@E, and the array @E()" +100 PRINT "Size of EEPROM", @E +110 IF @E>0 GOTO 200 +120 PRINT "No EEPROM found - test skipped" +130 STOP +200 PRINT "Storing numbers to eeprom array, size =", @E +210 FOR I=1 TO 10 +220 @E(I)=I*I +230 NEXT I +240 PRINT "Recalling numbers from eeprom" +250 FOR I=1 TO 10 +260 PRINT I, @E(I) +270 NEXT +300 PRINT "Restart BASIC later and check @E(10)" + diff --git a/data/examples/00tutorial/eliza-org.bas b/data/examples/00tutorial/eliza-org.bas new file mode 100644 index 0000000000000000000000000000000000000000..e2fce51dd006ef21c79d8fdb64bd0e1849f938d3 --- /dev/null +++ b/data/examples/00tutorial/eliza-org.bas @@ -0,0 +1,290 @@ +10 REM "A ELIZA version from the 70s" +20 REM "Ported 2022 - Stefan Lenz" +25 REM "(Almost) original code to test HASMSSTRINGS" +30 DIM C1$(80) +40 GOSUB 1070 +50 DIM C$(72), I$(72), K$(72), F$(72), S$(72), R$(72), P$(72), Z$(72) +60 DIM S(37), R(37), N(37) +65 DIM T$(80) +70 N1 = 37 +80 N2 = 14 +90 N3 = 117 +100 FOR X = 1 TO N1 + N2 + N3 +110 READ Z$ +120 NEXT X +130 FOR X = 1 TO N1 +140 READ S(X) +145 READ L +150 R(X) = S(X) +160 N(X) = S(X) + L - 1 +170 NEXT X +180 PRINT "HI! I'M ELIZA. WHAT'S YOUR PROBLEM?" +190 REM +200 REM "----USER INPUT SECTION----" +210 REM +220 INPUT I$ +221 REM "Uppercase the input" +222 FOR L=1 TO LEN(I$) +223 IF (I$(L))>=97 AND (I$(L))<=122 THEN T$(L)=CHR$((I$(L))-32): ELSE T$(L)=I$(L) +224 NEXT +225 I$=T$ +230 T$=" "+I$+" ": I$=T$ +240 REM "GET RID OF APOSTROPHES" +250 FOR L = 1 TO LEN(I$) +260 IF MID$(I$, L, 1) <> "'" THEN 290 +270 T$=MID$(I$, 1, L-1)+MID$(I$, L+1, LEN(I$)-L) +275 I$=T$ +280 GOTO 260 +290 IF L+4>=LEN(I$) THEN 330 +300 IF MID$(I$, L, 4) <> "SHUT" THEN 330 +310 PRINT "IF THAT'S HOW YOU FEEL--GOODBY..." +320 END +330 NEXT L +340 IF I$<>P$ THEN 370 +350 PRINT "PLEASE DON'T REPEAT YOURSELF!" +360 GOTO 190 +370 REM +380 REM "----FIND KEYWORD IN I$----" +390 REM +400 RESTORE +410 S = 0 +420 FOR K = 1 TO N1 +430 READ K$ +440 IF S>0 THEN 510 +450 FOR L=1 TO LEN(I$)-LEN(K$)+1 +460 IF MID$(I$, L, LEN(K$))<>K$ THEN 500 +470 S=K +480 T=L +490 F$=K$ +500 NEXT L +510 NEXT K +520 IF S<=0 THEN 560 +530 K=S +540 L=T +550 GOTO 590 +560 K=37: REM "WE DIDN'T FIND ANY KEYWORDS" +570 GOTO 850 +580 REM +590 REM "TAKE RIGHT PART OF STRINGS AND CONJUGATE IT" +600 REM "USING THE LIST OF STRINGS TO BE SWAPPED" +610 REM +620 RESTORE +630 FOR X = 1 TO N1 +640 READ Z$ +650 NEXT X +660 IF (LEN(I$)-LEN(F$)-L+1)>0 THEN 690 +670 L=L-1 +680 GOTO 660 +690 C$ = " "+MID$(I$, LEN(F$)+L, LEN(I$)-(LEN(F$)+L-1)) +700 FOR X=1 TO N2/2 +710 READ S$ +711 READ R$ +720 FOR L = 1 TO LEN(C$) +730 IF L+LEN(S$)>LEN(C$) THEN 770 +740 IF MID$(C$, L, LEN(S$))<>S$ THEN 770 +750 T$=MID$(C$,1,L-1)+R$+MID$(C$,L+LEN(S$),LEN(C$)-(L+LEN(S$)-1)) +755 C$=T$ +760 GOTO 810 +770 IF L+LEN(R$)>LEN(C$) THEN 810 +780 IF MID$(C$, L, LEN(R$)) <> R$ THEN 810 +790 T$=MID$(C$,1,L-1)+S$+MID$(C$,L+LEN(R$),LEN(C$)-(L+LEN(R$)-1)) +795 C$=T$ +800 L=L+LEN(S$) +810 NEXT L +820 NEXT X +830 IF MID$(C$, 2, 1)=" " THEN C$=MID$(C$,2,LEN(C$)-1) +840 REM +850 REM "NOW USING THE KEYWORD NUMBER (K) GET REPLY" +860 REM +870 RESTORE +880 FOR X=1 TO N1+N2 +890 READ Z$ +900 NEXT X +910 FOR X=1 TO R(K): REM "READ RIGHT REPLY" +920 READ F$ +930 NEXT X +940 R(K)=R(K)+1 +950 IF R(K)>N(K) THEN R(K)=S(K) +960 IF MID$(F$, LEN(F$), 1) = "*" THEN 1000 +970 PRINT F$ +980 P$=I$ +990 GOTO 190 +1000 PRINT MID$(F$, 1, LEN(F$) - 1); C$ +1010 P$=I$ +1020 GOTO 190 +1030 REM "PRINT CENTER ROUTINE" +1040 PRINT TAB(40 - LEN(C1$) / 2); C1$ +1060 RETURN +1070 C1$ = "*** ELIZA ***" +1080 GOSUB 1030 +1090 C1$ = "IN BASIC" +1100 GOSUB 1030 +1110 C1$ = "MODIFIED FROM CYBER 175 AT UNIVERSITY OF ILLINOIS AT CHAMPAGNE" +1120 GOSUB 1030 +1130 C1$ = "JOHN SCHUGG" +1140 GOSUB 1030 +1150 C1$ = "JANUARY 1985" +1160 GOSUB 1030 +1170 C1$ = "HAVE ANY PROBLEMS ?" +1180 GOSUB 1030 +1190 C1$ = "LET ELIZA HELP YOU !" +1200 GOSUB 1030 +1210 PRINT +1220 C1$ = "TO STOP ELIZA TYPE 'SHUT UP'" +1230 GOSUB 1030 +1240 C1$ = "(THIS VERSION WILL NOT RECORD YOUR CONVERSATIONS)" +1250 GOSUB 1030 +1260 C1$ = "(PLEASE SEND SUGGESTIONS FOR IMPROVEMENTS TO JOHN SCHUGG)" +1270 GOSUB 1030 +1280 PRINT "< PRESS RETURN TO CONTINUE...>" +1290 INPUT C1$ +1320 RETURN +1330 REM +1340 REM "---PROGRAM DATA FOLLOWS---"" +1350 REM +1360 REM "KEYWORDS:" +1370 REM +1380 DATA "CAN YOU","CAN I","YOU ARE","YOURE","I DONT","I FEEL" +1390 DATA "WHY DONT YOU","WHY CANT I","ARE YOU","I CANT","I AM","IM " +1400 DATA "YOU ","I WANT","WHAT","HOW","WHO","WHERE","WHEN","WHY" +1410 DATA "NAME","CAUSE","SORRY","DREAM","HELLO","HI ","MAYBE" +1420 DATA " NO","YOUR","ALWAYS","THINK","ALIKE","YES","FRIEND" +1430 DATA "COMPUTER","CAR","NOKEYFOUND" +1440 REM +1450 REM "---STRING DATA FOR CONJUGATIONS---" +1460 REM +1470 DATA " ARE "," AM ","WERE ","WAS "," YOU "," I ","YOUR ","MY " +1480 DATA " IVE "," YOUVE "," IM "," YOURE "," YOU "," ME " +1490 REM +1500 REM "----REPLIES----" +1510 REM +1520 DATA "DON'T YOU BELIEVE THAT I CAN*" +1530 DATA "PERHAPS YOU WOULD LIKE TO BE ABLE TO*" +1540 DATA "YOU WANT ME TO BE ABLE TO*" +1550 DATA "PERHAPS YOU DON'T WANT TO*" +1560 DATA "DO YOU WANT TO BE ABLE TO*" +1570 DATA "WHAT MAKES YOU THINK I AM*" +1580 DATA "DOES IT PLEASE YOU TO BELIEVE I AM*" +1590 DATA "PERHAPS YOU WOULD LIKE TO BE*" +1600 DATA "DO YOU SOMETIMES WISH YOU WERE*" +1610 DATA "DON'T YOU REALLY*" +1620 DATA "WHY DON'T YOU*" +1630 DATA "DO YOU WISH TO BE ABLE TO*" +1640 DATA "DOES THAT TROUBLE YOU?" +1650 DATA "TELL ME MORE ABOUT SUCH FEELINGS." +1660 DATA "DO YOU OFTEN FEEL*" +1670 DATA "DO YOU ENJOY FEELING*" +1680 DATA "DO YOU REALLY BELIEVE I DON'T*" +1690 DATA "PERHAPS IN GOOD TIME I WILL*" +1700 DATA "DO YOU WANT ME TO*" +1710 DATA "DO YOU THINK YOU SHOULD BE ABLE TO*" +1720 DATA "WHY CAN'T YOU*" +1730 DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*" +1740 DATA "WOULD YOU PREFER IF I WERE NOT*" +1750 DATA "PERHAPS IN YOUR FANTASIES I AM*" +1760 DATA "HOW DO YOU KNOW YOU CAN'T*" +1770 DATA "HAVE YOU TRIED?" +1780 DATA "PERHAPS YOU CAN NOW*" +1790 DATA "DID YOU COME TO ME BECAUSE YOU ARE*" +1800 DATA "HOW LONG HAVE YOU BEEN*" +1810 DATA "DO YOU BELIEVE IT IS NORMAL TO BE*" +1820 DATA "DO YOU ENJOY BEING*" +1830 DATA "WE WERE DISCUSSING YOU-- NOT ME." +1840 DATA "OH, I*" +1850 DATA "YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?" +1860 DATA "WHAT WOULD IT MEAN TO YOU IF YOU GOT*" +1870 DATA "WHY DO YOU WANT*" +1880 DATA "SUPPOSE YOU SOON GOT*" +1890 DATA "WHAT IF YOU NEVER GOT*" +1900 DATA "I SOMETIMES ALSO WANT*" +1910 DATA "WHY DO YOU ASK?" +1920 DATA "DOES THAT QUESTION INTEREST YOU?" +1930 DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?" +1940 DATA "WHAT DO YOU THINK?" +1950 DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?" +1960 DATA "WHAT IS IT THAT YOU REALLY WANT TO KNOW?" +1970 DATA "HAVE YOU ASKED ANYONE ELSE?" +1980 DATA "HAVE YOU ASKED SUCH QUESTIONS BEFORE?" +1990 DATA "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?" +2000 DATA "NAMES DON'T INTEREST ME." +2010 DATA "I DON'T CARE ABOUT NAMES-- PLEASE GO ON." +2020 DATA "IS THAT THE REAL REASON?" +2030 DATA "DON'T ANY OTHER REASONS COME TO MIND?" +2040 DATA "DOES THAT REASON EXPLAIN ANY THING ELSE?" +2050 DATA "WHAT OTHER REASONS MIGHT THERE BE?" +2060 DATA "PLEASE DON'T APOLOGIZE." +2070 DATA "APOLOGIES ARE NOT NECESSARY." +2080 DATA "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?" +2090 DATA "DON'T BE SO DEFENSIVE!" +2100 DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?" +2110 DATA "DO YOU DREAM OFTEN?" +2120 DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?" +2130 DATA "ARE YOU DISTURBED BY YOUR DREAMS?" +2140 DATA "HOW DO YOU DO--PLEASE STATE YOUR PROBLEM." +2150 DATA "YOU DON'T SEEM QUITE CERTAIN." +2160 DATA "WHY THE UNCERTAIN TONE?" +2170 DATA "CAN'T YOU BE MORE POSITIVE?" +2180 DATA "YOU AREN'T SURE?" +2190 DATA "DON'T YOU KNOW?" +2200 DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?" +2210 DATA "YOU ARE BEING A BIT NEGATIVE." +2220 DATA "WHY NOT?" +2230 DATA "ARE YOU SURE?" +2240 DATA "WHY NO?" +2250 DATA "WHY ARE YOU CONCERNED ABOUT MY*" +2260 DATA "WHAT ABOUT YOUR OWN*" +2270 DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?" +2280 DATA "WHEN?" +2290 DATA "WHAT ARE YOU THINKING OF?" +2300 DATA "REALLY, ALWAYS?" +2310 DATA "DO YOU REALLY THINK SO?" +2320 DATA "BUT YOU ARE NOT SURE YOU*" +2330 DATA "DO YOU DOUBT YOU*" +2340 DATA "IN WHAT WAY?" +2350 DATA "WHAT RESEMBLANCE DO YOU SEE?" +2360 DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?" +2370 DATA "WHAT OTHER CONNECTIONS DO YOU SEE?" +2380 DATA "COULD THERE REALLY BE SOME CONNECTION?" +2390 DATA "HOW?" +2400 DATA "YOU SEEM QUITE POSITIVE." +2410 DATA "ARE YOU SURE?" +2420 DATA "I SEE." +2430 DATA "I UNDERSTAND." +2440 DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?" +2450 DATA "DO YOUR FRIENDS WORRY YOU?" +2460 DATA "DO YOUR FRIENDS PICK ON YOU?" +2470 DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?" +2480 DATA "DO YOU IMPOSE ON YOUR FRIENDS?" +2490 DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU?" +2500 DATA "DO COMPUTERS WORRY YOU?" +2510 DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?" +2520 DATA "ARE YOU FRIGHTENED BY MACHINES?" +2530 DATA "WHY DO YOU MENTION COMPUTERS?" +2540 DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?" +2550 DATA "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?" +2560 DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?" +2570 DATA "OH, DO YOU LIKE CARS?" +2580 DATA "MY FAVORITE CAR IS A LAMBORGHINI COUNTACH. WHAT IS YOUR'S?" +2590 DATA "MY FAVORITE CAR COMPANY IS FERRARI. WHAT IS YOURS?" +2600 DATA "DO YOU LIKE PORSCHES?" +2610 DATA "DO YOU LIKE PORSCHE TURBO CARRERAS?" +2620 DATA "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?" +2630 DATA "WHAT DOES THAT SUGGEST TO YOU?" +2640 DATA "I SEE." +2650 DATA "I'M NOT SURE I UNDERSTAND YOU FULLY." +2660 DATA "COME COME ELUCIDATE YOUR THOUGHTS." +2670 DATA "CAN YOU ELABORATE ON THAT?" +2680 DATA "THAT IS QUITE INTERESTING." +2690 REM +2700 REM "---DATA FOR FINDING RIGHT REPLIES---" +2710 REM +2720 DATA 1,3,4,2,6,4,6,4,10,4,14,3,17,3,20,2,22,3,25,3 +2730 DATA 28,4,28,4,32,3,35,5,40,9,40,9,40,9,40,9,40,9,40,9 +2740 DATA 49,2,51,4,55,4,59,4,63,1,63,1,64,5,69,5,74,2,76,4 +2750 DATA 80,3,83,7,90,3,93,6,99,7,106,5,111,6 +2760 REM +2770 REM +2780 REM "LAST MOD. JULY 1979" +2790 REM +2800 REM "'ELIZA'" +2810 END diff --git a/data/examples/00tutorial/eliza.bas b/data/examples/00tutorial/eliza.bas new file mode 100644 index 0000000000000000000000000000000000000000..31229b69c016653b1df8b8f7b366809e46a809d0 --- /dev/null +++ b/data/examples/00tutorial/eliza.bas @@ -0,0 +1,313 @@ +10 REM "A ELIZA version from the 70s" +20 REM "Ported 2022 - Stefan Lenz" +30 DIM C1$(80) +40 GOSUB 1070 +50 DIM C$(72), I$(72), K$(72), F$(72), S$(72), R$(72), P$(72), Z$(72) +60 DIM S(37), R(37), N(37) +65 DIM T$(80) +70 N1 = 37 +80 N2 = 14 +90 N3 = 117 +100 FOR X = 1 TO N1 + N2 + N3 +110 READ Z$ +120 NEXT X +130 FOR X = 1 TO N1 +140 READ S(X) +145 READ L +150 R(X) = S(X) +160 N(X) = S(X) + L - 1 +170 NEXT X +180 PRINT "HI! I'M ELIZA. WHAT'S YOUR PROBLEM?" +190 REM +200 REM "----USER INPUT SECTION----" +210 REM +220 INPUT I$ +221 REM "Uppercase the input" +222 FOR L=1 TO LEN(I$) +223 IF I$(L)>=97 AND I$(L)<=122 THEN T$(L)=(I$(L))-32 ELSE T$(L)=I$(L) +224 NEXT +225 I$=T$ +230 REM I$ = " " + I$ + " " +235 T$=" " : T$(2)=I$: T$(LEN(T$)+1)=" " +236 I$=T$ +240 REM GET RID OF APOSTROPHES +250 FOR L = 1 TO LEN(I$) +260 REM IF MID$(I$, L, 1) <> "'" THEN 290 +261 IF I$(L, L+1)<>"'" THEN 290 +270 REM I$ = MID$(I$, 1, L - 1) + MID$(I$, L + 1, LEN(I$) - L) +271 T$=I$(1, L-1): T$(L)=I$(L+1) +280 GOTO 260 +290 IF L+4>=LEN(I$) THEN 330 +300 REM IF UCASE$(MID$(I$, L, 4)) <> "SHUT" THEN 330 +301 IF I$(L, L+3)<>"SHUT" THEN 330 +310 PRINT "IF THAT'S HOW YOU FEEL--GOODBY..." +320 END +330 NEXT L +340 IF I$<>P$ THEN 370 +350 PRINT "PLEASE DON'T REPEAT YOURSELF!" +360 GOTO 190 +370 REM +380 REM "----FIND KEYWORD IN I$----" +390 REM +400 RESTORE +410 S = 0 +420 FOR K = 1 TO N1 +430 READ K$ +440 IF S>0 THEN 510 +450 FOR L=1 TO LEN(I$) - LEN(K$) + 1 +460 REM IF MID$(I$, L, LEN(K$)) <> K$ THEN 500 +461 IF I$(L, L+LEN(K$)-1)<>K$ THEN 500 +470 S=K +480 T=L +490 F$=K$ +500 NEXT L +510 NEXT K +520 IF S<=0 THEN 560 +530 K=S +540 L=T +550 GOTO 590 +560 K=37: REM "WE DIDN'T FIND ANY KEYWORDS" +570 GOTO 850 +580 REM +590 REM "TAKE RIGHT PART OF STRINGS AND CONJUGATE IT" +600 REM "USING THE LIST OF STRINGS TO BE SWAPPED" +610 REM +620 RESTORE +630 FOR X = 1 TO N1 +640 READ Z$ +650 NEXT X +660 IF (LEN(I$)-LEN(F$)-L+1)>0 THEN 690 +670 L=L-1 +680 GOTO 660 +690 REM C$ = " " + MID$(I$, LEN(F$) + L, LEN(I$) - (LEN(F$) + L - 1)) +691 T=LEN(I$)-(LEN(F$)+L-1) +692 U=LEN(F$)+L +693 C$=I$(U, U+T-1) +700 FOR X=1 TO N2/2 +710 READ S$ +711 READ R$ +720 FOR L = 1 TO LEN(C$) +730 IF L+LEN(S$)>LEN(C$) THEN 770 +740 REM IF MID$(C$, L, LEN(S$)) <> S$ THEN 770 +741 IF C$(L, L+LEN(S$)-1)<>S$ THEN 770 +750 REM C$=MID$(C$,1,L-1)+R$+MID$(C$,L+LEN(S$),LEN(C$)-(L+LEN(S$)-1)) +751 T$=C$(1, 1+(L-1)-1) +752 T$(LEN(T$)+1)=R$ +753 T=L+LEN(S$) +754 U=LEN(C$)-(L+LEN(S$)-1) +755 T$(LEN(T$)+1)=C$(T, T+U-1) +756 C$=T$ +760 GOTO 810 +770 IF L+LEN(R$)>LEN(C$) THEN 810 +780 REM IF MID$(C$, L, LEN(R$)) <> R$ THEN 810 +781 IF C$(L, L+LEN(R$)-1)<>R$ THEN 810 +790 REM C$=MID$(C$,1,L-1)+S$+MID$(C$,L+LEN(R$),LEN(C$)-(L+LEN(R$)-1)) +791 T$=C$(1, 1+(L-1)-1) +792 T$(LEN(T$)+1)=S$ +793 T=L+LEN(R$) +794 U=LEN(C$)-(L+LEN(R$)-1) +795 T$(LEN(T$)+1)=C$(T, T+U-1) +796 C$=T$ +800 L=L+LEN(S$) +810 NEXT L +820 NEXT X +830 REM IF MID$(C$, 2, 1)=" " THEN C$=MID$(C$,2,LEN(C$)-1) 'ONLY 1SPACE +831 IF C$(2,2)=" " THEN C$=C$(2, 2+LEN(C$)-1-1) +840 REM +850 REM "NOW USING THE KEYWORD NUMBER (K) GET REPLY" +860 REM +870 RESTORE +880 FOR X=1 TO N1+N2 +890 READ Z$ +900 NEXT X +910 FOR X=1 TO R(K): REM "READ RIGHT REPLY" +920 READ F$ +930 NEXT X +940 R(K)=R(K)+1 +950 IF R(K)>N(K) THEN R(K)=S(K) +960 REM IF MID$(F$, LEN(F$), 1) = "*" THEN 1000 +961 T=LEN(F$) +962 IF F$(T, T)="*" THEN 1000 +970 PRINT F$ +980 P$=I$ +990 GOTO 190 +1000 REM PRINT MID$(F$, 1, LEN(F$) - 1); C$ +1001 PRINT F$(1, 1+(LEN(F$)-1)-1); C$ +1010 P$=I$ +1020 GOTO 190 +1030 REM "PRINT CENTER ROUTINE" +1040 TAB(40-LEN(C1$)/2): PRINT C1$ +1060 RETURN +1070 C1$ = "*** ELIZA ***" +1080 GOSUB 1030 +1090 C1$ = "IN BASIC" +1100 GOSUB 1030 +1110 C1$ = "MODIFIED FROM CYBER 175 AT UNIVERSITY OF ILLINOIS AT CHAMPAGNE" +1120 GOSUB 1030 +1130 C1$ = "JOHN SCHUGG" +1140 GOSUB 1030 +1150 C1$ = "JANUARY 1985" +1160 GOSUB 1030 +1170 C1$ = "HAVE ANY PROBLEMS ?" +1180 GOSUB 1030 +1190 C1$ = "LET ELIZA HELP YOU !" +1200 GOSUB 1030 +1210 PRINT +1220 C1$ = "TO STOP ELIZA TYPE 'SHUT UP'" +1230 GOSUB 1030 +1240 C1$ = "(THIS VERSION WILL NOT RECORD YOUR CONVERSATIONS)" +1250 GOSUB 1030 +1260 C1$ = "(PLEASE SEND SUGGESTIONS FOR IMPROVEMENTS TO JOHN SCHUGG)" +1270 GOSUB 1030 +1280 PRINT "< PRESS RETURN TO CONTINUE...>" +1290 INPUT C1$ +1320 RETURN +1330 REM +1340 REM "---PROGRAM DATA FOLLOWS---"" +1350 REM +1360 REM "KEYWORDS:" +1370 REM +1380 DATA "CAN YOU","CAN I","YOU ARE","YOURE","I DONT","I FEEL" +1390 DATA "WHY DONT YOU","WHY CANT I","ARE YOU","I CANT","I AM","IM " +1400 DATA "YOU ","I WANT","WHAT","HOW","WHO","WHERE","WHEN","WHY" +1410 DATA "NAME","CAUSE","SORRY","DREAM","HELLO","HI ","MAYBE" +1420 DATA " NO","YOUR","ALWAYS","THINK","ALIKE","YES","FRIEND" +1430 DATA "COMPUTER","CAR","NOKEYFOUND" +1440 REM +1450 REM "---STRING DATA FOR CONJUGATIONS---" +1460 REM +1470 DATA " ARE "," AM ","WERE ","WAS "," YOU "," I ","YOUR ","MY " +1480 DATA " IVE "," YOUVE "," IM "," YOURE "," YOU "," ME " +1490 REM +1500 REM "----REPLIES----" +1510 REM +1520 DATA "DON'T YOU BELIEVE THAT I CAN*" +1530 DATA "PERHAPS YOU WOULD LIKE TO BE ABLE TO*" +1540 DATA "YOU WANT ME TO BE ABLE TO*" +1550 DATA "PERHAPS YOU DON'T WANT TO*" +1560 DATA "DO YOU WANT TO BE ABLE TO*" +1570 DATA "WHAT MAKES YOU THINK I AM*" +1580 DATA "DOES IT PLEASE YOU TO BELIEVE I AM*" +1590 DATA "PERHAPS YOU WOULD LIKE TO BE*" +1600 DATA "DO YOU SOMETIMES WISH YOU WERE*" +1610 DATA "DON'T YOU REALLY*" +1620 DATA "WHY DON'T YOU*" +1630 DATA "DO YOU WISH TO BE ABLE TO*" +1640 DATA "DOES THAT TROUBLE YOU?" +1650 DATA "TELL ME MORE ABOUT SUCH FEELINGS." +1660 DATA "DO YOU OFTEN FEEL*" +1670 DATA "DO YOU ENJOY FEELING*" +1680 DATA "DO YOU REALLY BELIEVE I DON'T*" +1690 DATA "PERHAPS IN GOOD TIME I WILL*" +1700 DATA "DO YOU WANT ME TO*" +1710 DATA "DO YOU THINK YOU SHOULD BE ABLE TO*" +1720 DATA "WHY CAN'T YOU*" +1730 DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*" +1740 DATA "WOULD YOU PREFER IF I WERE NOT*" +1750 DATA "PERHAPS IN YOUR FANTASIES I AM*" +1760 DATA "HOW DO YOU KNOW YOU CAN'T*" +1770 DATA "HAVE YOU TRIED?" +1780 DATA "PERHAPS YOU CAN NOW*" +1790 DATA "DID YOU COME TO ME BECAUSE YOU ARE*" +1800 DATA "HOW LONG HAVE YOU BEEN*" +1810 DATA "DO YOU BELIEVE IT IS NORMAL TO BE*" +1820 DATA "DO YOU ENJOY BEING*" +1830 DATA "WE WERE DISCUSSING YOU-- NOT ME." +1840 DATA "OH, I*" +1850 DATA "YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?" +1860 DATA "WHAT WOULD IT MEAN TO YOU IF YOU GOT*" +1870 DATA "WHY DO YOU WANT*" +1880 DATA "SUPPOSE YOU SOON GOT*" +1890 DATA "WHAT IF YOU NEVER GOT*" +1900 DATA "I SOMETIMES ALSO WANT*" +1910 DATA "WHY DO YOU ASK?" +1920 DATA "DOES THAT QUESTION INTEREST YOU?" +1930 DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?" +1940 DATA "WHAT DO YOU THINK?" +1950 DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?" +1960 DATA "WHAT IS IT THAT YOU REALLY WANT TO KNOW?" +1970 DATA "HAVE YOU ASKED ANYONE ELSE?" +1980 DATA "HAVE YOU ASKED SUCH QUESTIONS BEFORE?" +1990 DATA "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?" +2000 DATA "NAMES DON'T INTEREST ME." +2010 DATA "I DON'T CARE ABOUT NAMES-- PLEASE GO ON." +2020 DATA "IS THAT THE REAL REASON?" +2030 DATA "DON'T ANY OTHER REASONS COME TO MIND?" +2040 DATA "DOES THAT REASON EXPLAIN ANY THING ELSE?" +2050 DATA "WHAT OTHER REASONS MIGHT THERE BE?" +2060 DATA "PLEASE DON'T APOLOGIZE." +2070 DATA "APOLOGIES ARE NOT NECESSARY." +2080 DATA "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?" +2090 DATA "DON'T BE SO DEFENSIVE!" +2100 DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?" +2110 DATA "DO YOU DREAM OFTEN?" +2120 DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?" +2130 DATA "ARE YOU DISTURBED BY YOUR DREAMS?" +2140 DATA "HOW DO YOU DO--PLEASE STATE YOUR PROBLEM." +2150 DATA "YOU DON'T SEEM QUITE CERTAIN." +2160 DATA "WHY THE UNCERTAIN TONE?" +2170 DATA "CAN'T YOU BE MORE POSITIVE?" +2180 DATA "YOU AREN'T SURE?" +2190 DATA "DON'T YOU KNOW?" +2200 DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?" +2210 DATA "YOU ARE BEING A BIT NEGATIVE." +2220 DATA "WHY NOT?" +2230 DATA "ARE YOU SURE?" +2240 DATA "WHY NO?" +2250 DATA "WHY ARE YOU CONCERNED ABOUT MY*" +2260 DATA "WHAT ABOUT YOUR OWN*" +2270 DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?" +2280 DATA "WHEN?" +2290 DATA "WHAT ARE YOU THINKING OF?" +2300 DATA "REALLY, ALWAYS?" +2310 DATA "DO YOU REALLY THINK SO?" +2320 DATA "BUT YOU ARE NOT SURE YOU*" +2330 DATA "DO YOU DOUBT YOU*" +2340 DATA "IN WHAT WAY?" +2350 DATA "WHAT RESEMBLANCE DO YOU SEE?" +2360 DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?" +2370 DATA "WHAT OTHER CONNECTIONS DO YOU SEE?" +2380 DATA "COULD THERE REALLY BE SOME CONNECTION?" +2390 DATA "HOW?" +2400 DATA "YOU SEEM QUITE POSITIVE." +2410 DATA "ARE YOU SURE?" +2420 DATA "I SEE." +2430 DATA "I UNDERSTAND." +2440 DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?" +2450 DATA "DO YOUR FRIENDS WORRY YOU?" +2460 DATA "DO YOUR FRIENDS PICK ON YOU?" +2470 DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?" +2480 DATA "DO YOU IMPOSE ON YOUR FRIENDS?" +2490 DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU?" +2500 DATA "DO COMPUTERS WORRY YOU?" +2510 DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?" +2520 DATA "ARE YOU FRIGHTENED BY MACHINES?" +2530 DATA "WHY DO YOU MENTION COMPUTERS?" +2540 DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?" +2550 DATA "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?" +2560 DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?" +2570 DATA "OH, DO YOU LIKE CARS?" +2580 DATA "MY FAVORITE CAR IS A LAMBORGHINI COUNTACH. WHAT IS YOUR'S?" +2590 DATA "MY FAVORITE CAR COMPANY IS FERRARI. WHAT IS YOURS?" +2600 DATA "DO YOU LIKE PORSCHES?" +2610 DATA "DO YOU LIKE PORSCHE TURBO CARRERAS?" +2620 DATA "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?" +2630 DATA "WHAT DOES THAT SUGGEST TO YOU?" +2640 DATA "I SEE." +2650 DATA "I'M NOT SURE I UNDERSTAND YOU FULLY." +2660 DATA "COME COME ELUCIDATE YOUR THOUGHTS." +2670 DATA "CAN YOU ELABORATE ON THAT?" +2680 DATA "THAT IS QUITE INTERESTING." +2690 REM +2700 REM "---DATA FOR FINDING RIGHT REPLIES---" +2710 REM +2720 DATA 1,3,4,2,6,4,6,4,10,4,14,3,17,3,20,2,22,3,25,3 +2730 DATA 28,4,28,4,32,3,35,5,40,9,40,9,40,9,40,9,40,9,40,9 +2740 DATA 49,2,51,4,55,4,59,4,63,1,63,1,64,5,69,5,74,2,76,4 +2750 DATA 80,3,83,7,90,3,93,6,99,7,106,5,111,6 +2760 REM +2770 REM +2780 REM "LAST MOD. JULY 1979" +2790 REM +2800 REM "'ELIZA'" +2810 END diff --git a/data/examples/00tutorial/endme.bas b/data/examples/00tutorial/endme.bas new file mode 100644 index 0000000000000000000000000000000000000000..d1a56c59d62363329587dbf75621d78f8ff2dd21 --- /dev/null +++ b/data/examples/00tutorial/endme.bas @@ -0,0 +1,5 @@ +10 REM "Ending the interpreter and flushing" +20 REM "" +100 PRINT "bye bye" +110 CALL 0 + diff --git a/data/examples/00tutorial/energie.bas b/data/examples/00tutorial/energie.bas new file mode 100644 index 0000000000000000000000000000000000000000..aad3209c6ba814bc251a22f4d4b3da5f12232843 --- /dev/null +++ b/data/examples/00tutorial/energie.bas @@ -0,0 +1,75 @@ +10 REM "Microsoft Mode" +20 SET 22, "Microsoft" +1000 REM "Energierechner - Berechnet die Rendite eine Solaranlage" +1010 REM "Einspeisevergütung 10kWp und 40 kWp" +1020 DATA 7.94, 6.88 +1030 REM "Laufzeit der Förderung in Jahren"" +1040 DATA 20 +1050 REM "Wartungskosten über 20 Jahre in Prozent" +1060 DATA 15 +1070 REM "Inflation und Preissteigerung Stromkosten" +1080 DATA 4 +1090 REM "Restwert der Anlage nach Laufzeit" +1100 DATA 80 +2000 INPUT "kWp Leitung der Anlage: ",KW +2010 INPUT "Erwartete Jahresleistung (kWh): ",EA +2020 INPUT "Eigenverbrauch pro Jahr (kWh): ",VE +2030 INPUT "Strompreis (in Cent): ", PS +2040 INPUT "Preis der Anlage: ", PA +3000 PRINT "*** Grunddaten ***" +3010 READ V1, V2, LZ, WK +3015 DIM PI(LZ), VI(LZ) +3020 PRINT "<10kWp",V1,">10 kWp",V2 +3030 IF KW>40 THEN PRINT "Berechnung nur für <40kWp": END +3040 IF KW>10 THEN V=(V1*10+V2*(KW-10))/KW ELSE V=V1 +3050 PRINT "Vergütung für Gesamtleistung:",V +3060 PRINT +3100 PRINT "*** Kosten der Anlage und Strompreis ***" +3110 PRINT "****** Simulation ohne Inflation *******" +3120 GK=PA*(1+WK/100) +3125 PRINT "Wartungskosten:";TAB(32);#-8;GK-PA +3130 PRINT "Gesamtkosten inkl Wartung:";TAB(32);#-8;GK +3160 PRINT "Kosten Stromversorger pro Jahr:";TAB(32);#-8;PS/100*VE +3170 PRINT "Kosten Stromversorger Laufzeit:";TAB(32);#-8;PS/100*VE*LZ +3200 PRINT "*** Einspeisevergütung ***" +3210 PRINT "Einspeisung pro Jahr:";TAB(32);#-8;EA-VE +3220 VJ=INT((EA-VE)*V/100) +3230 PRINT "Vergütung pro Jahr:";TAB(32);#-8;VJ +3240 VG=VJ*LZ +3250 PRINT "Vergütung über Laufzeit: ";TAB(32);#-8;VG +3260 PRINT "Eingesparte Stromkosten: ";TAB(32);#-8;PS/100*VE*LZ +3270 PRINT "Erträge und Einsparungen:";TAB(32);#-8;VG+PS/100*VE*LZ +3380 PRINT "Gesamkosten:";TAB(32);#-8;GK +3390 PRINT "Einsparung:";TAB(32);#-8;VG+PS/100*VE*LZ-GK +3393 R0=POW((VG+PS/100*VE*LZ)/GK,1/LZ)-1 +3397 PRINT "Rendite ohne Inflation:", R0*100 +3400 PRINT "****** Simulation mit Inflation *******" +3410 READ SI +3420 PRINT "Preissteigerung Strom", SI, "Prozent" +3430 PI(1)=PS +3440 FOR J=2 TO LZ: PI(J)=PI(J-1)*(1+SI/100): NEXT +3450 VI(1)=PS/100*VE +3460 FOR J=2 TO LZ: VI(J)=VI(J-1)*(1+SI/100): NEXT +3470 PRINT "Jahr Preis Kosten" +3480 FOR J=1 TO LZ +3490 PRINT #6, J, INT(PI(J)), INT(VI(J)) +3500 NEXT +3510 GI=0: FOR J=1 TO LZ: GI=VI(J)+GI: NEXT: GI=INT(GI) +3520 PRINT "Stromkosten mit Inflation:";TAB(32);#-8; GI +3550 PRINT "Vergütung über Laufzeit: ";TAB(32);#-8; VG +3560 PRINT "Eingesparte Stromkosten: ";TAB(32);#-8; GI +3570 PRINT "Erträge und Einsparungen:";TAB(32);#-8; VG+GI +3580 PRINT "Gesamkosten:";TAB(32);#-8;GK +3590 PRINT "Einsparung:";TAB(32);#-8;VG+GI-GK +3600 RE=POW((VG+GI)/GK,1/LZ)-1 +3610 PRINT "Rendite:",RE*100 +3700 PRINT "****** Simulation mit Restwert *******" +3710 READ RW +3715 PRINT "Restwert der Anlage in Prozent:";TAB(32),#-8;RW +3720 GR=PA*RW/100 +3730 PRINT "Restwert der Anlage:";TAB(32),#-8;GR +3740 RR=POW((VG+GI)/(GK-GR),1/LZ)-1 +3750 PRINT "Rendite nach Restwert:",RR*100 + + + diff --git a/data/examples/00tutorial/euler.bas b/data/examples/00tutorial/euler.bas new file mode 100644 index 0000000000000000000000000000000000000000..dd295e8e91de0dfe112623de2ddf97c6ab2b2e68 --- /dev/null +++ b/data/examples/00tutorial/euler.bas @@ -0,0 +1,17 @@ +10 REM 'Function to calculate the greatest common divisor (GCD)' +20 REM "Demo for a multipline function" +100 DEF FNG() +110 WHILE B <> 0 +120 T = B +130 B = A % B +140 A = T +150 WEND +160 RETURN A +170 FEND +200 WHILE -1 +210 READ A,B +220 IF @S<>0 THEN BREAK +230 PRINT "The greatest common denominator of",A,"and",B,"is: ";FNG() +240 WEND +250 END +300 DATA 18,27,54,63,128,371,34,85 diff --git a/data/examples/00tutorial/euler9.bas b/data/examples/00tutorial/euler9.bas new file mode 100644 index 0000000000000000000000000000000000000000..d4ebd58e5bbe7afc6aee171b68978f08c94be739 --- /dev/null +++ b/data/examples/00tutorial/euler9.bas @@ -0,0 +1,41 @@ +10 REM "Solves the Euler 9 problem " +20 REM "See https://projecteuler.net/problem=9 for details" +30 REM "with a number theoretical approach" +100 PRINT "Enter the circumference K of a triangle" +110 PRINT "The program finds a pythagorean triangle" +120 PRINT "a^2 + b^2 = c^2" +130 INPUT "K= (0 to end) ",K +140 IF K=0 THEN END +150 IF K%2=0 THEN U=K/2: GOTO 200 +160 PRINT "K is odd, no solution": GOTO 130 +200 REM "Main Program" +210 F=0 +220 X=SQR(U/2) +230 FOR I=1 TO X +240 IF U%I<>0 THEN CONT +250 FOR J=1 TO I +260 D=I+J +270 IF U%D<>0 THEN CONT +280 IF D%2=0 THEN CONT +290 R=I: Q=J +300 GOSUB 800 +310 IF R<>1 THEN CONT +320 A=I*I-J*J +330 B=2*I*J +340 C=I*I+J*J +350 PRINT "Primitive triple",A ,B, C +360 PRINT "Circumference=",A+B+C +370 S=K/(A+B+C) +380 PRINT "Scale with",S +390 PRINT "Solution ",A*S, B*S, C*S +400 F=1 +420 NEXT +430 NEXT +440 REM "All solutions found" +450 IF F=0 THEN PRINT "No solution" +460 GOTO 130 +800 REM "Find GCD" +810 IF R=Q THEN RETURN +820 IF R>Q THEN R=R-Q +830 IF Q>R THEN Q=Q-R +840 GOTO 810 diff --git a/data/examples/00tutorial/eval.bas b/data/examples/00tutorial/eval.bas new file mode 100644 index 0000000000000000000000000000000000000000..df31bd88bd8dc7664be53ff375b4d51b7bc77a38 --- /dev/null +++ b/data/examples/00tutorial/eval.bas @@ -0,0 +1,13 @@ +10 REM "Demo for the EVAL command" +20 REM "" +30 DIM A$(80) +100 INPUT "Enter a function (y=x): ",A$ +110 EVAL 1010,A$ +200 PRINT "X Y" +210 FOR X=-4 TO 4.001 STEP 0.5 +220 GOSUB 1000: PRINT #4, X, Y +230 NEXT +300 END +1000 REM "The function at the end" +1010 Y=X +1020 RETURN diff --git a/data/examples/00tutorial/fibo.bas b/data/examples/00tutorial/fibo.bas new file mode 100644 index 0000000000000000000000000000000000000000..3cfa79caac1156cadfd9c4fd16ab912437a4f14e --- /dev/null +++ b/data/examples/00tutorial/fibo.bas @@ -0,0 +1,26 @@ +10 REM "Calculates the Fibonacci numbers" +20 REM "And the Golden Ratio on an Integer BASIC" +200 REM "Main program" +210 N=19 +220 DIM A(N) +230 A(1)=1 +240 A(2)=1 +250 FOR I=3 TO N +260 IF A(I)>16000 THEN BREAK +270 A(I)=A(I-1)+A(I-2) +280 Q=A(I): D=A(I-1) +290 PRINT #4;I,Q,D; +300 GOSUB 500 +310 NEXT +320 END +500 REM "Print a decimal ratio of a fraction" +520 Z=INT(Q/D) +530 PRINT " ";Z;"."; +540 FOR J=1 TO 10 +550 Z=Q%D +560 Q=Z*10 +570 Z=INT(Q/D) +580 PRINT Z; +590 NEXT +600 PRINT " " +610 RETURN diff --git a/data/examples/00tutorial/fileio.bas b/data/examples/00tutorial/fileio.bas new file mode 100644 index 0000000000000000000000000000000000000000..d0286c7183860140eecc75f26d66df5cc38bbc2c --- /dev/null +++ b/data/examples/00tutorial/fileio.bas @@ -0,0 +1,48 @@ +10 REM "Simple FILE I/O demo" +20 REM "" +30 N=4 +40 DIM A$(80) +100 PRINT "Write squares to file" +110 OPEN "daten.txt",1 +120 FOR I=1 TO N +130 PRINT I, I*I +140 PRINT &16, I +150 PRINT &16, I*I +160 NEXT I +170 CLOSE 1 +200 PRINT "Read data as numbers" +210 OPEN "daten.txt" +220 FOR I=1 TO N +230 INPUT &16, A +240 INPUT &16, B +250 PRINT "Read "; A; "^2="; B +260 NEXT +270 CLOSE 0 +300 PRINT "Read data as strings, use EOF status" +310 @S=0 +320 OPEN "daten.txt" +330 IF @S<>0 THEN PRINT "OPEN failed" : END +340 FOR I +350 INPUT &16, A$ +360 IF @S=-1 THEN BREAK +370 PRINT "Line",I,"string '";A$; "' Status = " @S +380 NEXT +390 CLOSE 0 +400 PRINT I, "lines read" +410 PRINT "Status =", @S +500 PRINT "Read Character by Character use EOF status" +510 @S=0 +520 OPEN "daten.txt" +530 IF @S<>0 THEN PRINT "OPEN failed" : END +540 FOR I=1 +550 GET &16, A +560 PRINT "Character ";I;" :",A +570 IF A=-1 THEN BREAK +580 NEXT +590 PRINT I, "characters read" +600 PRINT "Status =", @S +610 CLOSE 0 +700 END + + + diff --git a/data/examples/00tutorial/find.bas b/data/examples/00tutorial/find.bas new file mode 100644 index 0000000000000000000000000000000000000000..dd5a0ee24bc69c23bc261fa8fc1bd800e93b4d81 --- /dev/null +++ b/data/examples/00tutorial/find.bas @@ -0,0 +1,21 @@ +10 REM "Elementary find demo" +20 REM "" +30 A0=10 +40 DIM B(8) +50 DIM A$(20) +100 PRINT "Find variable on heap" +110 PRINT "Address of A0 is", FIND(A0) +120 PRINT "Find array on heap" +130 PRINT "Address of B() is", FIND(B()) +140 PRINT "Find string on heap" +150 PRINT "Address of A$ is", FIND(A$) +200 PRINT "Variables A-Z are not on heap" +210 PRINT "Try to find A gives", FIND (A) +300 PRINT "String representation in memory" +310 B$="ABCDEFGH" +320 B=FIND(B$) +330 FOR I=B TO B+7+2 +340 PRINT PEEK(I);" "; +350 NEXT +360 PRINT +400 END diff --git a/data/examples/00tutorial/func.bas b/data/examples/00tutorial/func.bas new file mode 100644 index 0000000000000000000000000000000000000000..89c2933760d3473f2300542c7ca2001ad04b1228 --- /dev/null +++ b/data/examples/00tutorial/func.bas @@ -0,0 +1,6 @@ +10 REM "Function definitions" +20 REM "" +100 DEF FNS(X)=X*X +200 INPUT "Input a number: ", N +210 PRINT "The square of the number is: "; FN S(N) +220 END diff --git a/data/examples/00tutorial/hello.bas b/data/examples/00tutorial/hello.bas new file mode 100644 index 0000000000000000000000000000000000000000..aa25545d6bdca4af3c1325b0590329e1aadade1d --- /dev/null +++ b/data/examples/00tutorial/hello.bas @@ -0,0 +1,2 @@ +10 REM "The inevitable Hello World" +100 PRINT "Hello World" diff --git a/data/examples/00tutorial/hinv.bas b/data/examples/00tutorial/hinv.bas new file mode 100644 index 0000000000000000000000000000000000000000..310b50337c87a7f2c3f7d98045dc40e3f757916c --- /dev/null +++ b/data/examples/00tutorial/hinv.bas @@ -0,0 +1,48 @@ +10 REM "Hardware and system information from USR" +20 REM "" +100 PRINT "*** System Information (constants)" +200 U=USR(0,0) +210 PRINT "System type", U; ": "; +220 IF U=32 THEN PRINT "POSIX"; : GOTO 300 +230 IF U=33 THEN PRINT "MSDOS"; : GOTO 300 +233 IF U=34 THEN PRINT "MINGW"; : GOTO 300 +237 IF U=35 THEN PRINT "RASPPI"; : GOTO 300 +240 If U=1 THEN PRINT "AVR"; : GOTO 300 +250 IF U=2 THEN PRINT "ESP8266"; : GOTO 300 +260 IF U=3 THEN PRINT "ESP32"; : GOTO 300 +270 IF U=4 THEN PRINT "RP2040"; : GOTO 300 +275 IF U=5 THEN PRINT "SAM"; : GOTO 300 +280 IF U=6 THEN PRINT "XMC"; : GOTO 300 +285 IF U=7 THEN PRINT "SMT32"; : GOTO 300 +290 PRINT "Unknown"; +300 IF USR(0,3) THEN PRINT " Floating point" ELSE PRINT " Integer" +400 PRINT "Number type size", USR(0,4) +410 PRINT "Maximum (accurate) number",USR (0,5) +420 PRINT "Adress type size",USR (0,6) +430 PRINT "Maximum address",USR (0,7) +440 PRINT "String index size",USR (0,8) +450 PRINT "Memory size",USR (0,9) +460 PRINT "EEPROM size",USR (0,10) +470 PRINT "GOSUB depth",USR (0,11) +480 PRINT "FOR depth",USR (0,12) +490 PRINT "Stacksize",USR (0,13) +500 PRINT "Input buffer length",USR (0,14) +520 PRINT "Keyword buffer length",USR (0,15) +530 PRINT "Default array length", USR(0,16) +540 PRINT "Default string length", USR(0,17) +600 PRINT "*** System variables" +610 PRINT "End of program (top)", USR(0,24) +620 PRINT "Current program location (here)", USR(0,25) +630 PRINT "End of free memory (himem)", USR(0,26) +640 PRINT "Number of stored variables", USR(0,27) +650 PRINT "Free heap (inaccurate)", USR(0,28) +660 PRINT "GOSUB stackpointer", USR(0,29) +670 PRINT "FOR stackpointer", USR(0,30) +680 PRINT "FOR Nesting counter", USR(0,31) +690 PRINT "Stackpointer", USR(0,32) +700 PRINT "Data pointer", USR(0,33) +800 PRINT "*** IO system variables" +810 PRINT "Input stream", USR(0,48) +820 PRINT "Default input stream", USR(0,49) +830 PRINT "Output stream", USR(0,50) +840 PRINT "Default output stream", USR(0,51) diff --git a/data/examples/00tutorial/logic.bas b/data/examples/00tutorial/logic.bas new file mode 100644 index 0000000000000000000000000000000000000000..c2edf10fe4a85a158dcc15a8b857ba48f1cc7712 --- /dev/null +++ b/data/examples/00tutorial/logic.bas @@ -0,0 +1,19 @@ +10 REM "Logical expressions" +20 REM "" +100 A=10 +110 B=20 +120 PRINT "A="; A, "; B=";B, "; C=";C +130 IF A=10 THEN PRINT "A is 10" +140 IF NOT A=20 THEN PRINT "A is not 20" +150 IF A=10 AND B=20 THEN PRINT "A is 10 and B is 20" +160 IF A=10 OR C=10 THEN PRINT "A is 10 or C is 10" +200 PRINT "Expressions" +210 L=(A=10 AND B=20) +220 PRINT "L=(A=10 AND B=20)" +230 PRINT "L =",L +240 K=NOT L +250 PRINT "NOT L =",K +260 K=NOT NOT L +270 PRINT "NOT NOT L =",K +280 END + diff --git a/data/examples/00tutorial/loop.bas b/data/examples/00tutorial/loop.bas new file mode 100644 index 0000000000000000000000000000000000000000..4b69c6db4b72cb88bd61a9b7bf61cfe7a2b6c57d --- /dev/null +++ b/data/examples/00tutorial/loop.bas @@ -0,0 +1,28 @@ +10 REM "(Advanced) Loops in BASIC" +20 REM "" +100 PRINT "FOR loop" +110 FOR I=0 TO 4 STEP 2 +120 PRINT I +130 NEXT +200 PRINT "BREAK in a loop" +210 FOR I=1 TO 4 +220 IF I=3 THEN BREAK +230 PRINT I +240 NEXT +300 PRINT "CONT in a loop" +310 FOR I=1 TO 4 +320 IF I=3 THEN CONT +330 PRINT I +340 NEXT +400 PRINT "while" +410 FOR I +420 IF I>5 THEN BREAK +430 PRINT I, I*I +440 NEXT +500 PRINT "until" +510 FOR I +520 PRINT I, I*I +530 IF I>5 THEN BREAK +540 NEXT +600 END + diff --git a/data/examples/00tutorial/malloc.bas b/data/examples/00tutorial/malloc.bas new file mode 100644 index 0000000000000000000000000000000000000000..f809253adfcdf2b7d1cf0d0b7c898260f85cc8a6 --- /dev/null +++ b/data/examples/00tutorial/malloc.bas @@ -0,0 +1,14 @@ +10 REM "Elementary malloc demo" +20 REM "" +100 PRINT "Allocate 16 bytes of memory with identifier 1" +110 M=MALLOC(1, 16) +120 PRINT "Address of memory segment", M +200 PRINT "Storing data" +210 FOR I=0 TO 15 +220 POKE M+I, I*2 +230 NEXT I +300 PRINT "Retrieving data" +310 FOR I=0 TO 15 +320 PRINT I, PEEK(M+I) +330 NEXT I +400 END diff --git a/data/examples/00tutorial/mandel.bas b/data/examples/00tutorial/mandel.bas new file mode 100644 index 0000000000000000000000000000000000000000..f2e3ba80df0c68cd31daeabf75de807a7a35492a --- /dev/null +++ b/data/examples/00tutorial/mandel.bas @@ -0,0 +1,31 @@ +10 REM "Caculate the mandelbrot set" +20 REM "The iteration cutoff, threshold, and resolution" +30 N=10 +40 T=4 +50 R=20 +100 C0=0: C1=0 +200 REM "walk through the grid" +210 FOR J=2*R+1 TO 1 STEP -1 +220 FOR I=1 TO 3*R+1 +230 C0=-2+(I-1)/R: C1=-1+(J-1)/R +240 GOSUB 4000 +250 GOSUB 5000 +280 NEXT +290 PRINT +300 NEXT +999 END +4000 REM "do an iteration on c" +4010 Z0=C0: Z1=C1 +4020 FOR K=1 TO N +4030 S0=Z0*Z0: S1=Z1*Z1 +4040 IF S0+S1>T THEN BREAK +4050 X0=S0-S1+C0 +4060 X1=2*Z0*Z1+C1 +4070 Z0=X0: Z1=X1 +4080 NEXT +4090 RETURN +5000 REM "plot a point" +5010 IF K>N THEN PRINT "X"; : RETURN +5020 IF K>N/2 THEN PRINT "."; : RETURN +5030 PRINT " "; +5040 RETURN diff --git a/data/examples/00tutorial/mandelv.bas b/data/examples/00tutorial/mandelv.bas new file mode 100644 index 0000000000000000000000000000000000000000..82c9099a3000b2cd53b0efbbcf019245b552d159 --- /dev/null +++ b/data/examples/00tutorial/mandelv.bas @@ -0,0 +1,32 @@ +10 REM "Caculate the mandelbrot set" +20 REM "The iteration cutoff, threshold, and resolution" +30 N=24 +40 T=4 +50 R=100 +100 C0=0: C1=0 +110 CLS +200 REM "walk through the grid" +210 FOR J=2*R+1 TO 1 STEP -1 +220 FOR I=1 TO 3*R+1 +230 C0=-2+(I-1)/R: C1=-1+(J-1)/R +240 GOSUB 4000 +250 GOSUB 5000 +280 NEXT +300 NEXT +310 FOR I=1 TO 12: PUT 27, "B": NEXT +999 END +4000 REM "do an iteration on c" +4010 Z0=C0: Z1=C1 +4020 FOR K=1 TO N +4030 S0=Z0*Z0: S1=Z1*Z1 +4040 IF S0+S1>T THEN BREAK +4050 X0=S0-S1+C0 +4060 X1=2*Z0*Z1+C1 +4070 Z0=X0: Z1=X1 +4080 NEXT +4090 RETURN +5000 REM "plot a point" +5010 IF K>N: COLOR 0: PLOT I,J: RETURN +5020 COLOR 255-INT(K/N*255) +5030 PLOT I,J +5040 RETURN diff --git a/data/examples/00tutorial/math.bas b/data/examples/00tutorial/math.bas new file mode 100644 index 0000000000000000000000000000000000000000..f5b71f673b2902dbe63708754f05c3a48648599d --- /dev/null +++ b/data/examples/00tutorial/math.bas @@ -0,0 +1,12 @@ +10 REM "Extended math functions" +20 REM "" +100 INPUT "Number= ",A +110 PRINT "The square root of", A, "is", SQR(A) +200 INPUT "Base= ", B +210 INPUT "Exponent= ", E +220 PRINT B, "to the power of", E, "is", POW(B, E) +300 INPUT "Value between 0 and 1000= ", V +310 IF V<0 OR V>1000 THEN PRINT "Range Error" : GOTO 300 +320 M=MAP(V, 1000, 0, 200, 100) +330 PRINT "V mapped to the range of 200 and 100 is", M +400 END diff --git a/data/examples/00tutorial/memory.bas b/data/examples/00tutorial/memory.bas new file mode 100644 index 0000000000000000000000000000000000000000..ef6d65536716533bc3cf4ed25e1bfc3aebc9f24d --- /dev/null +++ b/data/examples/00tutorial/memory.bas @@ -0,0 +1,28 @@ +10 REM "Memory command demo" +20 REM "HIMEN, SIZE, PEEK and POKE command" +100 PRINT "End of BASIC memory", HIMEM +110 PRINT "Total free memory", SIZE +120 T=HIMEM-SIZE +130 PRINT "End of BASIC program", T +200 PRINT "Storing 10 random numbers in memory" +210 FOR I=1 TO 10 +220 POKE T+I, RND(127) +230 NEXT I +240 PRINT "Recalling the data" +250 FOR I=1 TO 10 +260 PRINT #4, I, PEEK(T+I) +270 NEXT I +300 PRINT "Storing signed data in memory" +310 POKE A+11, 127 +320 PRINT PEEK(A+11), "is 127" +330 POKE A+11, -127 +340 PRINT PEEK(A+11), "is -127" +350 POKE A+11, 255 +360 PRINT PEEK(A+11), "is 255" +370 PRINT "BASIC memory bytes are signed char" +400 PRINT "Size of EEPROM array", @E +410 IF @E=0 THEN PRINT "No EEPROM" : END +420 PRINT "First 10 bytes of the EEPROM" +430 FOR I=-1 TO -10 STEP -1 +440 PRINT #4, ABS(I), PEEK(I) +450 NEXT I diff --git a/data/examples/00tutorial/mkbuildin.bas b/data/examples/00tutorial/mkbuildin.bas new file mode 100644 index 0000000000000000000000000000000000000000..7dfc8836595cdb56d914f48c05ae5aa0637fcc21 --- /dev/null +++ b/data/examples/00tutorial/mkbuildin.bas @@ -0,0 +1,53 @@ +10 REM "This program created a buildin.h file to be compiled into BASIC" +20 DIM NA$(32,20), A$(128), B$(128) +30 N=0 +40 P$="*" +50 OPEN "buildin.h", 1 +1000 REM "Build the file list" +1010 FOR N=1 +1020 READ N$ +1030 IF (N$)=0 THEN BREAK +1040 PRINT "File: ", N$ +1050 NA$()(N)=N$ +1060 NEXT +1070 N=N-1 +1080 PRINT "Processing",N,"files" +1100 REM "Create the structures" +1110 FOR I=1 TO N +1120 @S=0: N$=NA$()(I) +1130 OPEN N$ +1140 IF @S<>0 THEN PRINT "File error in", N$: END +1200 REM "Process one file" +1210 PRINT &16,"const char buildin_pgm";I;"[] PROGMEM = {" +1220 FOR J=1 +1230 INPUT &16, A$ +1240 IF @S=-1 THEN BREAK +1250 IF A$="" THEN CONT +1260 B$="" +1300 FOR K=1 TO LEN(A$) +1310 IF A$(K,K)='"' THEN B$=B$+'\"' ELSE B$=B$+A$(K,K) +1320 NEXT +1330 PRINT &16, '"';B$;'\n"' +1400 NEXT +1410 PRINT &16, '"\f"' +1420 PRINT &16,"};" +1430 PRINT &16, "const char buildin_pgm";I;"_name[] PROGMEM = ";'"';P$;N$;'";' +1600 NEXT +1700 PRINT &16, "const char* const buildin_programs[] PROGMEM = {" +1710 FOR I=1 TO N +1720 PRINT &16, "buildin_pgm";I;"," +1730 NEXT I +1740 PRINT &16, "0" +1750 PRINT &16, "};" +1800 PRINT &16, "const char* const buildin_program_names[] PROGMEM = {" +1810 FOR I=1 TO N +1820 PRINT &16, "buildin_pgm";I;"_name," +1830 NEXT I +1840 PRINT &16, "0" +1850 PRINT &16, "};" +10000 REM "The programs to be included into the buildin.h +10010 DATA "cpinew2.bas" +10020 DATA "euler9.bas", "fibo.bas", "primes.bas", "stir.bas" +10030 DATA "tictac.bas" +10100 DATA 0 + diff --git a/data/examples/00tutorial/nullbuffer.bas b/data/examples/00tutorial/nullbuffer.bas new file mode 100644 index 0000000000000000000000000000000000000000..2c54e2d6a940bb8f4ba56d8705aee3746afe1851 --- /dev/null +++ b/data/examples/00tutorial/nullbuffer.bas @@ -0,0 +1,11 @@ +10 REM "Demo of the BASIC nullbuffer feature" +20 REM "The variable @$ is the input buffer and used as I/O channel" +100 PRINT "ibuffer is", @$ +110 @="" +120 PRINT "ibuffer is now", @$ +130 A=10: B=20 +140 PRINT &0,A,",",B +150 PRINT "ibuffer is now", @$ +160 INPUT &0, C, D +170 PRINT "Read ", C, D, "from ibuffer" +200 END diff --git a/data/examples/00tutorial/ongo.bas b/data/examples/00tutorial/ongo.bas new file mode 100644 index 0000000000000000000000000000000000000000..5086b33d4771a52185caccc022fc93964a0ac343 --- /dev/null +++ b/data/examples/00tutorial/ongo.bas @@ -0,0 +1,13 @@ +10 REM "ON GOSUB/GOTO demo program" +20 REM "" +100 PRINT "For the solution to all problems" +110 INPUT "Type a number between 1-3?", I +200 ON I GOTO 250, 260, 270 +210 REM "default" +220 PRINT "Wrong number" : GOTO 110 +230 REM "The cases" +250 PRINT "Meditations"; : GOTO 300 +260 PRINT "Alcohol"; : GOTO 300 +270 PRINT "Chocolate"; : GOTO 300 +300 PRINT " is the solution" +400 END diff --git a/data/examples/00tutorial/parable.bas b/data/examples/00tutorial/parable.bas new file mode 100644 index 0000000000000000000000000000000000000000..f62691521713ea4d0f93b6ff4a508ca3dc30ee78 --- /dev/null +++ b/data/examples/00tutorial/parable.bas @@ -0,0 +1,10 @@ +10 REM "Draw a parable" +20 REM "" +100 PRINT "Y=X*X" +110 FOR X=-8 TO 8 +120 IF X<>0 PRINT "!"; +130 IF X=0 PRINT "+";: FOR I=2 TO 8*8/2: PRINT "-";: NEXT: PRINT : GOTO 160 +140 TAB(X*X/2-1) +150 PRINT "*" +160 NEXT X +200 END \ No newline at end of file diff --git a/data/examples/00tutorial/plot.bas b/data/examples/00tutorial/plot.bas new file mode 100644 index 0000000000000000000000000000000000000000..21aeb8bf84d53d62a5d936eecc54e88662c30509 --- /dev/null +++ b/data/examples/00tutorial/plot.bas @@ -0,0 +1,14 @@ +100 REM "Test the graphics" +110 A=640: B=480 +200 T=MILLIS(100) +210 FOR I=1 TO 1000 +220 X=RND(A) +230 Y=RND(B) +240 R=RND(40) +250 C=RND(16) +260 COLOR C +270 FCIRCLE X,Y,R +280 NEXT +290 COLOR 15 +300 S=MILLIS(100)-T +310 PRINT "1000 Random circles drawn in", INT(S/10);".";INT(S%10);" seconds" diff --git a/data/examples/00tutorial/primes.bas b/data/examples/00tutorial/primes.bas new file mode 100644 index 0000000000000000000000000000000000000000..452f0f554df465dce885740a9a548276ae5afa63 --- /dev/null +++ b/data/examples/00tutorial/primes.bas @@ -0,0 +1,24 @@ +100 REM "Calculate the first N prime numbers" +110 REM "and output them!" +200 CLR +210 INPUT "How many primes (0=stop)? ", N +220 IF N=0 THEN 500 +230 DIM P(N): P(1)=2: P(2)=3: I=2 +240 IF I=N THEN 360 +250 K=P(I) +260 K=K+2 +270 L=SQR(K) +280 J=1 +290 D=P(J) +310 M=K%D +320 IF M=0 THEN 260 +330 IF D@ THEN PRINT "Maximum is ", @ : GOTO 200 +230 @(1)=2: @(2)=3 +240 FOR I=3 TO N +250 K=@(I-1)+2 +260 L=SQR(K) +270 FOR J=1 +280 IF K%@(J)=0 THEN K=K+2 : GOTO 260 +290 IF @(J)>L THEN BREAK +300 NEXT J +310 @(I)=K +320 NEXT I +360 PRINT "The first", N, "primes are:" +370 FOR J=1 TO N +380 PRINT J, @(J) +390 NEXT +400 GOTO 200 +500 END diff --git a/data/examples/00tutorial/putget.bas b/data/examples/00tutorial/putget.bas new file mode 100644 index 0000000000000000000000000000000000000000..1ce001a1a98ab4cde0fdfe852298485dea0a9993 --- /dev/null +++ b/data/examples/00tutorial/putget.bas @@ -0,0 +1,10 @@ +10 REM "Demo of the PUT and GET command" +20 REM "" +100 PUT "H", 101, "l", 108, "o", 32, "W", 108, "r", 108, "d", 10 +110 PRINT "Press any key to continue" +120 REM "GET is non blocking in Arduinos and blocking in POSIX" +130 GET C : IF C=0 THEN GOTO 120 +140 PRINT "Key '"; +150 PUT C +160 PRINT "' pressed" +170 END diff --git a/data/examples/00tutorial/random.bas b/data/examples/00tutorial/random.bas new file mode 100644 index 0000000000000000000000000000000000000000..9651f71b855a902d3baa0db77c0bbc35058ba000 --- /dev/null +++ b/data/examples/00tutorial/random.bas @@ -0,0 +1,23 @@ +10 REM "Analyses the distribution of a set of random numbers" +100 INPUT "Number of samples? ", N +110 INPUT "Range of numbers? ", R +120 REM "Preallocate vars before using @" +130 S=0: A=0: B=0: I=0 +200 FOR I=1 TO R +210 @(I)=0 +220 NEXT +230 A=N +240 B=0 +300 FOR I=1 TO N +310 S=INT(RND(R))+1 +320 @(S)=@(S)+1 +330 NEXT +400 PRINT "Distribution:" +410 PRINT "Value", "Frequency" +420 FOR I=1 TO R +430 PRINT #6, I, @(I) +440 IF @(I)B LET B=@(I) +460 NEXT +470 PRINT "Minimum= ", A +480 PRINT "Maximum= ", B diff --git a/data/examples/00tutorial/readdata.bas b/data/examples/00tutorial/readdata.bas new file mode 100644 index 0000000000000000000000000000000000000000..de44726fd6c3d9b40bd931e1a3e759764dbf501f --- /dev/null +++ b/data/examples/00tutorial/readdata.bas @@ -0,0 +1,25 @@ +10 REM "READ and DATA test code" +20 REM "" +100 PRINT "Reading strings" +110 READ A$ +120 IF A$="" THEN GOTO 150 +130 PRINT A$; " "; +140 GOTO 110 +150 PRINT +200 PRINT "Reading numbers and putting characters" +200 FOR I=1 TO 11 +210 READ A +220 PUT A +230 NEXT +240 PRINT +300 PRINT "Reading beyond the end" +310 PRINT "Status byte is", @S +320 PRINT "Attempting to read" +330 READ A +370 PRINT "Status byte is", @S, "now" +380 PRINT "Read data was", A +400 END +500 DATA "the", "quick", "brown", "fox", "jumps" +510 DATA "over", "the", "lazy", "dog", "" +520 DATA 72, 69, 76, 76, 79, 32, 87, 79, 82, 76, 68 + diff --git a/data/examples/00tutorial/serial1.bas b/data/examples/00tutorial/serial1.bas new file mode 100644 index 0000000000000000000000000000000000000000..70b23b3ab8e316cae4b32a368d9f6f3e3afa13f8 --- /dev/null +++ b/data/examples/00tutorial/serial1.bas @@ -0,0 +1,17 @@ +10 REM "Serial monitor in second serial port" +20 REM "" +30 DIM A$(80),B$(80) +200 REM "The loop() function" +210 INPUT A$ +220 IF A$="end" THEN END +230 PRINT &4,A$ +240 DELAY 100 +250 FOR I=0 +260 GET &4,A +270 IF A=0 OR I=80 THEN BREAK +280 B$(I+1)=A +290 NEXT +300 PRINT I,"bytes received" +310 PRINT B$ +320 GOTO 200 +400 END diff --git a/data/examples/00tutorial/shinv.bas b/data/examples/00tutorial/shinv.bas new file mode 100644 index 0000000000000000000000000000000000000000..87c7e7b75f9e149454f8ecd94dc89c0db4be00b0 --- /dev/null +++ b/data/examples/00tutorial/shinv.bas @@ -0,0 +1,23 @@ +10 REM "Hardware and system information from USR" +20 REM "" +100 PRINT "*** System Information (constants)" +200 U=USR(0,0) +210 PRINT "System type", U; ": "; +220 IF U=32 THEN PRINT "POSIX"; : GOTO 300 +230 IF U=33 THEN PRINT "MSDOS"; : GOTO 300 +233 IF U=34 THEN PRINT "MINGW"; : GOTO 300 +237 IF U=35 THEN PRINT "RASPPI"; : GOTO 300 +240 If U=1 THEN PRINT "AVR"; : GOTO 300 +250 IF U=2 THEN PRINT "ESP8266"; : GOTO 300 +260 IF U=3 THEN PRINT "ESP32"; : GOTO 300 +270 IF U=4 THEN PRINT "RP2040"; : GOTO 300 +275 IF U=5 THEN PRINT "SAM"; : GOTO 300 +280 IF U=6 THEN PRINT "XMC"; : GOTO 300 +285 IF U=7 THEN PRINT "SMT32"; : GOTO 300 +290 PRINT "Unknown"; +300 IF USR(0,3) THEN PRINT " Floating point "; ELSE PRINT " Integer "; +400 PRINT USR(0,4); " byte arithmetic" +450 PRINT "Memory size",USR (0,9), "EEPROM size",USR (0,10) +800 PRINT "*** IO system variables" +810 PRINT "Input stream", USR(0,48), "default", USR(0,49) +830 PRINT "Output stream", USR(0,50), "default", USR(0,51) diff --git a/data/examples/00tutorial/sort.bas b/data/examples/00tutorial/sort.bas new file mode 100644 index 0000000000000000000000000000000000000000..106996d2972b989f760433d0c8b557c7fbcef337 --- /dev/null +++ b/data/examples/00tutorial/sort.bas @@ -0,0 +1,21 @@ +10 REM "Sort a set of numbers" +100 INPUT "How many numbers? ", N +110 REM "Preallocate all local vars before using @()" +120 I=0: J=0: T=0 +200 PRINT "Original order" +210 FOR I=1 TO N +220 @(I)=INT(RND(10)) +230 PRINT I, @(I) +240 NEXT +300 FOR I=1 TO N-1 +310 FOR J=I+1 TO N +320 IF @(I)<=@(J) GOTO 360 +330 T=@(I) +340 @(I)=@(J) +350 @(J)=T +360 NEXT +370 NEXT +400 PRINT "Sorted list" +410 FOR I=1 TO N +420 PRINT I, @(I) +430 NEXT diff --git a/data/examples/00tutorial/splitstr.bas b/data/examples/00tutorial/splitstr.bas new file mode 100644 index 0000000000000000000000000000000000000000..101a6d43ba238bc74ab9095fd7251afa310e9864 --- /dev/null +++ b/data/examples/00tutorial/splitstr.bas @@ -0,0 +1,11 @@ +10 REM "Split a string into substrings" +20 REM "" +100 DIM A$(80) +110 A$="the quick brown fox jumps over the lazy dog" +200 FOR I +210 A=INSTR(A$," ") +220 IF A=0 THEN PRINT A$: BREAK +230 PRINT A$(1,A-1) +240 A$=A$(A+1) +250 NEXT +300 END diff --git a/data/examples/00tutorial/stir.bas b/data/examples/00tutorial/stir.bas new file mode 100644 index 0000000000000000000000000000000000000000..8d1c32802aa925018f60b6de4e83cd122a2e5016 --- /dev/null +++ b/data/examples/00tutorial/stir.bas @@ -0,0 +1,21 @@ +10 REM "Calculate Factorial and Stirlings function" +20 REM "" +100 REM "Factorial" +110 L=20 +120 DIM F(L) +130 F(1)=1 +140 FOR I=2 TO L +150 F(I)=F(I-1)*I +160 NEXT +200 REM "Stirling" +210 P1=4*ATAN(1) +220 DEF FNS(N)=SQR(2*P1*N)*EXP(N*(LOG(N)-1)) +300 REM "Print table" +305 PRINT "N";: TAB(4) +310 PRINT "FACT(N)";: TAB(6) +315 PRINT "STIR(N)";: TAB(6) +320 PRINT "Accuracy (%)" +330 FOR I=1 TO L +340 PRINT #4, I, #12, F(I), FNS(I), (F(I)-FNS(I))/F(I)*100 +350 NEXT +400 END diff --git a/data/examples/00tutorial/stopcont.bas b/data/examples/00tutorial/stopcont.bas new file mode 100644 index 0000000000000000000000000000000000000000..c99530c34ee911748c5c55b23959f41408b23e19 --- /dev/null +++ b/data/examples/00tutorial/stopcont.bas @@ -0,0 +1,10 @@ +10 REM "STOP and CONT example" +20 REM "" +100 A=10 +110 PRINT "A=", A +120 PRINT "Going back to interactive mode" +130 PRINT "Change A if you like" +140 STOP +150 PRINT "Back to run mode" +160 PRINT "A=", A +200 END diff --git a/data/examples/00tutorial/string1.bas b/data/examples/00tutorial/string1.bas new file mode 100644 index 0000000000000000000000000000000000000000..4a8bcf9ff32196cfdeb69da3d85eb5b951caf23c --- /dev/null +++ b/data/examples/00tutorial/string1.bas @@ -0,0 +1,20 @@ +10 REM "Strings in BASIC (1)" +20 REM "Dimensioning and comparing" +100 PRINT "Strings can be constants" +110 PRINT "Strings", "can", "be", "constants" +200 PRINT "String variables" +210 A$="... without DIM - 32 chars max" +220 PRINT A$ +230 PRINT "Length of this string", LEN(A$) +240 DIM B$(80) +250 B$="... dimensioning to any length, the memory is the limit" +260 PRINT B$ +270 PRINT "Length of this string", LEN(B$) +300 IF A$<>B$ THEN PRINT "Strings are different" +310 IF A$=A$ THEN PRINT "Strings are equal" +320 IF A$ THEN PRINT "String is not empty" +330 C$="" +340 IF C$ THEN PRINT "This never shows" +350 PRINT "... because empty strings evaluate to false" +400 END + diff --git a/data/examples/00tutorial/string2.bas b/data/examples/00tutorial/string2.bas new file mode 100644 index 0000000000000000000000000000000000000000..b745f5484582bb18cdb6887cfc88eb01b6422c80 --- /dev/null +++ b/data/examples/00tutorial/string2.bas @@ -0,0 +1,22 @@ +10 REM "Strings in BASIC (2)" +20 REM "Substrings, splitting and concatenating" +100 DIM A$(80), B$(80) +110 A$="the quick brown fox jumps over the lazy dog" +120 PRINT A$ +130 PRINT "The first 3 characters-", A$(1,3) +140 PRINT "The rest of the string-", A$(4) +150 PRINT "Splitting ..." +160 FOR I=1 TO LEN(A$) +170 PRINT A$(I, I); +180 IF A$(I, I)=" " THEN PRINT +190 NEXT I +200 PRINT +210 C$=A$(1, 19) +220 D$=A$(20) +230 PRINT C$ +240 PRINT D$ +250 PRINT "Concatenating ..." +260 B$=C$ : B$(LEN(B$)+1)=D$ +270 PRINT B$ +300 END + diff --git a/data/examples/00tutorial/string3.bas b/data/examples/00tutorial/string3.bas new file mode 100644 index 0000000000000000000000000000000000000000..5c31f6367b808a86be7b70817f1f8c7f861f514d --- /dev/null +++ b/data/examples/00tutorial/string3.bas @@ -0,0 +1,23 @@ +10 REM "Strings in BASIC (3)" +20 REM "chars and strings" +100 DIM A$(80) +110 PRINT "Integers are chars" +120 FOR I=1 TO 26 +130 A$(I)=64+I +140 NEXT I +150 PRINT A$ +200 PRINT "Chars are chars or integers, mind the ()" +210 FOR I=1 TO 10 +220 C=A$(I, I) +230 PRINT A$(I, I), (A$(I, I)), C +240 NEXT I +300 PRINT "Chars are taken from the beginning" +310 FOR I=1 TO 10 +320 C=A$(I) +330 PRINT C, A$(I) +340 NEXT I +400 PRINT "Chars are signed, mind the ()" +410 A$=230 +420 PRINT (A$) +500 END + diff --git a/data/examples/00tutorial/string4.bas b/data/examples/00tutorial/string4.bas new file mode 100644 index 0000000000000000000000000000000000000000..9f7b1e6d3cc3b0af011e7cc21a639e5f78e8fde4 --- /dev/null +++ b/data/examples/00tutorial/string4.bas @@ -0,0 +1,16 @@ +10 REM "Strings in BASIC (4)" +20 REM "String arrays" +30 DIM B$(10,10) +100 REM "Read a string" +110 FOR I=1 TO 9 +120 READ B$()(I) +130 NEXT I +200 REM "Print the entire string" +210 FOR I=1 TO 9 +220 PRINT B$()(I) +230 NEXT I +300 REM "Substrings and arrays" +310 FOR I=1 TO 9 +320 PRINT B$(1,1)(I) +330 NEXT I +400 DATA "the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog" diff --git a/data/examples/00tutorial/sysinf.bas b/data/examples/00tutorial/sysinf.bas new file mode 100644 index 0000000000000000000000000000000000000000..1a90610f26294e66e7925b9b656a28bd0ad190dd --- /dev/null +++ b/data/examples/00tutorial/sysinf.bas @@ -0,0 +1,15 @@ +10 REM "Language set information from USR" +20 REM "" +100 PRINT "*** Language set information" +200 U=USR(0,1) +210 PRINT "Language identifier:", U +220 PRINT "Palo Alto Basic with Stefan's extensions" +230 IF U AND 1 THEN PRINT "+ Apple Integer BASIC and strings/arrays" +250 IF U AND 2 THEN PRINT "+ Arduino I/O functions" +260 IF U AND 4 THEN PRINT "+ File I/O" +270 IF U AND 8 THEN PRINT "+ Dartmouth BASIC extensions" +280 IF U AND 16 THEN PRINT "+ Graphics language features" +290 IF U AND 32 THEN PRINT "+ Darkarts language features" +300 IF U AND 64 THEN PRINT "+ IoT language extensions" +310 IF USR(0,3) THEN PRINT "+ Floating point" ELSE PRINT "Integer arithemtic" + diff --git a/data/examples/00tutorial/table.bas b/data/examples/00tutorial/table.bas new file mode 100644 index 0000000000000000000000000000000000000000..d92f69c16edd94d0b07e94be74584b7ba408f2ea --- /dev/null +++ b/data/examples/00tutorial/table.bas @@ -0,0 +1,7 @@ +10 REM "Print a table of values" +100 INPUT "Start= ", S +110 INPUT "End= ", E +120 PRINT #8, "X", "X*X", "X*X*X" +130 FOR I=S TO E +140 PRINT #8, I, I*I, I*I*I +150 NEXT diff --git a/data/examples/00tutorial/tictac.bas b/data/examples/00tutorial/tictac.bas new file mode 100644 index 0000000000000000000000000000000000000000..afc285224ffa0af850a52b1676840ab3395d0025 --- /dev/null +++ b/data/examples/00tutorial/tictac.bas @@ -0,0 +1,63 @@ +10 REM "TIC TAC TOE from 101 BASIC games" +20 REM "by David Ahl." +30 REM "Ported to Stefan's BASIC in 2021" +40 REM "The machine goes first" +100 PRINT "Welcome to tictactoe" +110 PRINT "The game board is numbered:" +120 PRINT +130 PRINT "1 2 3" +140 PRINT "8 9 4" +150 PRINT "7 6 5" +160 PRINT +200 REM "Main Program" +210 PRINT "Staring a new game" +230 A=9 +240 M=A +250 GOSUB 800 +260 P=M +270 B=P%8+1 +280 M=B +290 GOSUB 800 +300 Q=M +310 IF Q=(B+3)%8+1 GOTO 360 +320 C=(B+3)%8+1 +330 M=C +340 GOSUB 900 +350 GOTO 640 +360 C=(B+1)%8+1 +370 M=C +380 GOSUB 800 +390 R=M +400 IF R=(C+3)%8+1 GOTO 450 +410 D=(C+3)%8+1 +420 M=D +430 GOSUB 900 +440 GOTO 640 +450 IF P%2<>0 GOTO 500 +460 D=(C+6)%8+1 +470 M=D +480 GOSUB 900 +490 GOTO 640 +500 D=(C+2)%8+1 +510 M=D +520 GOSUB 800 +530 S=M +540 IF S=(D+3)%8+1 GOTO 590 +550 E=(D+3)%8+1 +560 M=E +570 GOSUB 900 +580 REM "Game is a draw" +590 E=(D+5)%8+1 +600 M=E +610 GOSUB 900 +620 PRINT "The game is a draw." +630 GOTO 200 +640 PRINT "and wins! ********" +650 GOTO 200 +800 REM "Subroutine to ask user for the move" +810 GOSUB 900 +820 INPUT "Your move? ", M +830 RETURN +900 REM "Subroutine to display move" +910 PRINT "Computer moves:",M +920 RETURN diff --git a/data/examples/00tutorial/timer.bas b/data/examples/00tutorial/timer.bas new file mode 100644 index 0000000000000000000000000000000000000000..7c31f717dae02ddb2e5025b00d7668c5dfe8eb07 --- /dev/null +++ b/data/examples/00tutorial/timer.bas @@ -0,0 +1,9 @@ +10 REM "Blinking without delay" +100 EVERY 1000 GOSUB 1000 +110 FOR I: NEXT +120 END +1000 PRINT "Blink", I +1010 DWRITE LED, S +1010 S=(S+1)%2 +1020 RETURN + diff --git a/data/examples/00tutorial/timestop.bas b/data/examples/00tutorial/timestop.bas new file mode 100644 index 0000000000000000000000000000000000000000..601242265314100b27fdf057a8e61e5431254326 --- /dev/null +++ b/data/examples/00tutorial/timestop.bas @@ -0,0 +1,6 @@ +10 REM "Stopping after some time" +100 AFTER 10000 GOTO 1000 +110 FOR I: NEXT +120 END +1000 PRINT "Program stopped" +1010 STOP diff --git a/data/examples/00tutorial/tinybasic-ms.bas b/data/examples/00tutorial/tinybasic-ms.bas new file mode 100644 index 0000000000000000000000000000000000000000..140631110e474d97eee565334db6198de7de610c --- /dev/null +++ b/data/examples/00tutorial/tinybasic-ms.bas @@ -0,0 +1,389 @@ +10 REM "Tinybasic interpreter written in BASIC" +15 REM +20 REM "This code is written pure MS BASIC dialects. " +25 REM "Ported from IoT BASIC" +30 REM "" +35 REM "The interpreter implements Dr. Wang'S Palo Alto BASIC " +40 REM "See http://www.bitsavers.org/pdf/interfaceAge/197612/092-108.pdf for" +45 REM "On the implemented language." +50 REM +55 REM "Main components of this program:" +57 REM "GOSUB 11000: the lexer. It decomposes the string A$ into tokens." +60 REM " There is one token produced in T, C, C$ after each call until" +62 REM " the end of the line which is T=0." +65 REM "GOSUB 12000: the expression evaluation. This is a recursive decent" +67 REM " parser using a stack ST. In the end the result is on the stack." +70 REM "GOSUB 14000: the command code. For each command there is one section." +72 REM " At the end of the command a new token must be produced by calling" +75 REM " The lexer with GOSUB 11000." +77 REM "GOSUB 13xxx: helper routines for the stack, parser and line storage." +80 REM "30000: keywords. First data is the number of keywords." +82 REM "The input loop from 2000-6000 ties it all together." +85 REM +100 REM "****************** Parameters and declarations ********************" +110 NL=100: REM "Maximum number of lines" +120 AS=100: REM "Number of elements in the @() array" +130 SS=16: REM "The size of the arithmetic stack" +140 LL=80: REM "The line length, set to 0 if you run on MS BASIC dialects." +150 GD=4: REM "Maximum depth of GOSUB statements" +160 FM=4: REM "Maximum number of active FOR loops (nested)" +200 REM "The debug flag, settings are" +210 REM "0: no debug, 1: lexer debug, 2: expression debug, 4: command debug" +220 DE=0 +990 REM +1000 REM "*************** essential declarations and functions *************" +1002 REM +1005 REM "The token T, the accu X and the error E" +1010 T=0: X=0: E=0 +1015 REM "The command string C$ and the input buffer A$" +1020 REM DIM C$(LL), A$(LL), T$(LL) +1025 REM "Functions to handle character and case stuff" +1030 T=1: X=0: E=0: C$="" +1040 DEF FNNU(X)=(X=>48 AND X<=57) +1050 DEF FNAL(X)=(X>=65 AND X<=90) +1060 DEF FNUP(X)=X-ABS(X>=97 AND X<=122)*32 +1070 REM "The data arrays for variables and one array" +1080 DIM VA(26), AR(AS) +1090 REM "The stacks for numbers and operators" +1100 DIM ST(SS) +1110 SI=0 +1120 REM "functions of the interpreter" +1130 DEF FNTE(T)=(T=0 OR T=ASC(":")): REM "terminal symbol of a statement" +1200 REM "The program storage" +1210 DIM LN(NL) +1220 IF LL>0 THEN SET 16, LL +1230 DIM LS$(NL) +1240 REM "HEre is the current line, 0 if interactive." +1250 HE=0 +1260 REM "The tables for GOSUB and FOR with their indices GS and FS" +1270 DIM GH(GD), GI(GD): GS=0 +1280 DIM FV(FM), FE(FM), FD(FM), FH(FM), FI(FM): FS=0 +1995 REM +2000 REM "************************* input loop *****************************" +2010 INPUT "]", A$: I=1: GOSUB 11000: REM "Input a line and get the first token" +2020 REM "first token a line number -> store it or delete it" +2030 IF T<>-127 THEN 5000 +2040 X=INT(X) +2050 T$=MID$(A$, I) +2055 REM "empty line, delete it" +2060 IF T$="" OR T$=" " THEN GOSUB 13500: GOTO 5800 +2065 REM "insert the line" +2070 GOSUB 13200: GOTO 5800 +5000 REM "no line number at the beginning, execute it, check on RUN first" +5010 REM "on RUN loop through the statements" +5020 IF T<>-104 THEN 5500 +5030 HE=1 +5040 IF LN(HE)=0 THEN GOTO 5800 +5045 REM "get the actual line and execute it" +5050 A$=LS$(HE): I=1: GOSUB 11000 +5060 GOSUB 14000 +5065 IF E<>0 THEN 5800 +5070 IF T=-107 THEN PRINT "Stop at", LN(HE): GOTO 5800 +5080 IF T=0 THEN HE=HE+1: GOTO 5040 +5100 GOTO 5060 +5495 REM "The interactive loop, no line fetching" +5500 GOSUB 14000: IF T<>0 GOTO 5500 +5800 REM "Catch the error and get more input" +5810 IF E<>0 THEN SP=1: I=1: A$="": GS=0: FS=0: E=0 +5995 GOTO 2000 +11000 REM "******* the lexer, generates a token stream in T, X, C$ ********" +11005 REM +11010 T=0: X=0: C$="" +11020 IF I>LEN(A$) THEN 11400 +11030 C$=MID$(A$, I, 1): C=ASC(C$): C=FNUP(C): C$=CHR$(C) +11040 REM "a whitespace is skipped" +11050 IF C$=" " THEN I=I+1: GOTO 11010 +11060 REM "a number - uses a IoT BASIC special feature @V, the number of chars" +11070 REM IF FNNU(C) THEN T$=MID$(A$, I): X=VAL(T$): I=I+@V: T=-127: GOTO 11400 +11075 IF FNNU(C) THEN GOSUB 13800: T=-127: GOTO 11400 +11080 REM "a string constant" +11090 IF C<>34 THEN 11200 +11100 J=I +11110 I=I+1: IF MID$(A$, I, 1)<>CHR$(34) AND I1 THEN RETURN +11420 PRINT "** lex delivered token ",T, MID$(A$, I) +11430 RETURN +12000 REM "*************** the expression evaluator **********************" +12005 REM +12010 REM "this is a classical recursive decent parser, using an own stack" +12020 REM "as BASIC has no local variables" +12025 REM +12030 REM "*** entry point for the expression - compare" +12040 GOSUB 12200: REM "Call addition" +12050 IF T<>ASC("=") THEN 12070 +12060 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X=Y): GOSUB 13050 +12070 IF T<>ASC("#") AND T<>-119 THEN 12090 +12080 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X<>Y): GOSUB 13050 +12090 IF T<>ASC(">") THEN 12110 +12100 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X>Y): GOSUB 13050 +12110 IF T<>ASC("<") THEN 12130 +12120 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X-121 THEN 12150 +12140 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X>=Y): GOSUB 13050 +12150 IF T<>-120 THEN 12170 +12160 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X<=Y): GOSUB 13050 +12170 RETURN +12200 REM "*** additions of all kind" +12210 IF T<>ASC("+") AND T<>ASC("-") THEN GOSUB 12300: GOTO 12230 +12220 X=0: GOSUB 13050: REM "Push a zero" +12230 IF T<>ASC("+") THEN 12250 +12240 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030 +12245 X=(Y+X): GOSUB 13050: GOTO 12230 +12250 IF T<>ASC("-") THEN 12270 +12260 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030 +12265 X=(X-Y): GOSUB 13050: GOTO 12230 +12270 IF NOT DE THEN RETURN +12280 PRINT "** after add, token", T, "stack is ": GOSUB 13060 +12290 RETURN +12300 REM "*** the term evaluation handles multiplication" +12310 GOSUB 12400 +12320 GOSUB 11000 +12330 IF T<>ASC("*") THEN 12350 +12340 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: X=X*Y: GOSUB 13050 +12350 IF T<>ASC("/") THEN 12370 +12360 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: IF Y=0 THEN E=-1: Y=1 +12365 X=X/Y: GOSUB 13050 +12370 IF T<>ASC("%") THEN 12390 +12380 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: IF Y=0 THEN E=-1: Y=1 +12385 X=X%Y: GOSUB 13050 +12390 RETURN +12400 REM "*** the factor evaluation never calls nexttoken" +12410 IF T=-127 THEN GOSUB 13040: GOTO 12900: REM "a plain number" +12420 IF T=-124 THEN X=VA(C-64): GOSUB 13040: GOTO 12900: REM "a variable" +12430 IF T<>ASC("(") THEN 12480: REM "an expression in brackets" +12450 GOSUB 11000: GOSUB 12000: IF E GOTO 12900 +12460 IF T<>ASC(")") THEN E=-1 +12470 GOTO 12900 +12480 IF T<>-103 THEN 12510: REM "the ABS function" +12490 GOSUB 11000: GOSUB 12430 +12500 GOSUB 13030: X=ABS(X): GOSUB 13040: GOTO 12900 +12510 IF T<>-102 THEN 12540: REM "the RND function" +12520 GOSUB 11000: GOSUB 12430 +12530 GOSUB 13030: X=RND(X): GOSUB 13040: GOTO 12900 +12540 IF T<>-101 THEN 12560: REM "the SIZE constant" +12550 X=42: GOSUB 13040: GOTO 12900 +12560 IF T<>"@" THEN 12600: REM "the array" +12570 GOSUB 11000: GOSUB 12430 +12580 GOSUB 13030: IF X<1 OR X>100 THEN PRINT "ARRAY ERROR": E=-1: GOTO 12900 +12590 X=AR(X): GOSUB 13050 +12600 REM "this is the place where one could add more functions and constants" +12900 REM "The debug and error hook of factor" +12910 IF DE<>2 THEN RETURN +12920 PRINT "** after factor, token", T, "stack is ": GOSUB 13060 +12922 PRINT "** cursor position is", I +12990 RETURN +13000 REM "*********** helpers of the parser and the interpreter ***************" +13020 REM "pop data from the stack" +13030 IF SI>0 THEN X=ST(SI): SI=SI-1: GOTO 13060 +13035 PRINT "STACK ERROR": END +13040 REM "push data on the stack" +13050 IF SI0 THEN 13400 +13230 F=1 +13240 IF LN(F)0 AND F0 AND T<>ASC(":") THEN 13610 +13620 RETURN +13700 REM "check if FOR already exists, purge the FOR stack then" +13710 IF FS=1 THEN RETURN +13720 FOR F=FS-1 TO 1 STEP -1 +13730 IF FV(FS)=FV(F) THEN 13760 +13740 NEXT +13750 RETURN +13760 FD(F)=FD(FS): FE(F)=FE(FS): FH(F)=FH(FS): FI(F)=FI(FS) +13770 FOR K=FM TO FS+1: FV(K)=0: NEXT : REM "delete all inner loops" +13780 RETURN +13800 REM "The number parser, only needed if IoT BASIC is not used" +13810 REM "Currently only implemented for integers" +13820 REM T$=MID$(A$, I): X=VAL(T$): I=I+@V +13830 FOR K=I TO LEN(A$): T$=MID$(A$, K, 1) +13840 IF NOT (FNNU(ASC(T$)) OR T$="-") THEN 13860 +13850 NEXT +13860 T$=MID$(A$, I, K-I+1): X=VAL(T$): I=K +13870 RETURN +14000 REM "*********** statements are parsed here ************************" +14010 REM +14015 REM "******** PRINT *********" +14020 IF T<>-118 THEN 14200 +14030 GOSUB 11000: IF E<>0 THEN RETURN +14040 IF T=-125 THEN PRINT C$;: GOSUB 11000: GOTO 14070 +14050 IF FNTE(T) THEN GOSUB 11000: GOTO 14080 +14060 GOSUB 12000: GOSUB 13030: PRINT X; +14070 IF T=ASC(",") OR T=ASC(";") THEN 14030 +14080 PRINT: RETURN +14195 REM "********* LET **********" +14200 IF T<>-117 AND T<>ASC("@") AND T<>-124 THEN 14400 +14210 IF T=-117 THEN GOSUB 11000: IF T<>ASC("@") AND T<>-124 THEN E=-1: RETURN +14220 T0=T: C0=C : REM "Remember if we deal with a variable or an array as left hand side" +14230 GOSUB 11000: IF T0<>ASC("@") THEN 14240 +14235 IF T<>ASC("(") THEN PRINT "ERROR": E=-1: RETURN +14237 GOSUB 11000: GOSUB 12000: GOSUB 13030: X0=X: IF T<>ASC(")") THEN E=-1: RETURN +14238 GOSUB 11000 +14240 IF E OR T<>ASC("=") THEN E=-1: RETURN +14250 GOSUB 11000: GOSUB 12000: GOSUB 13030 +14260 IF T0=-124 THEN VA(C0-64)=X: GOTO 14290 +14270 IF X0<1 OR X0>AS THEN E=-1: RETURN +14280 AR(X0)=X +14290 GOSUB 11000: RETURN +14395 REM "********* INPUT ********" +14400 IF T<>-116 THEN 14600 +14410 GOSUB 11000 +14420 IF T=-125 THEN PRINT C$; : GOSUB 11000 +14430 IF T=-124 THEN INPUT X: VA(C-64)=X: GOSUB 11000 +14440 IF T=ASC(",") THEN 14410 +14450 IF FNTE(T) THEN RETURN +14460 E=-1: RETURN +14595 REM "********* GOTO *********" +14600 IF T<>-115 THEN 14800 +14610 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +14620 GOSUB 13030: GOSUB 13100: REM "Try to find the line" +14630 IF F=0 THEN PRINT "Line not found in ", HE: E=-1: RETURN +14640 HE=F: I=1: A$=LS$(HE): GOSUB 11000: RETURN +14795 REM "********* GOSUB *********" +14800 IF T<>-114 THEN 15000 +14810 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +14820 GOSUB 13030: GOSUB 13100: REM "Try to find the line" +14830 IF F=0 THEN PRINT "Line not found in ", HE: E=-1: RETURN +14840 IF GS=GD THEN PRINT "Gosub error": E=-1: RETURN +14850 GS=GS+1: GH(GS)=HE: GI(GS)=I: I=1: HE=F: A$=LS$(HE): GOSUB 11000 +14860 RETURN +14995 REM "********* RETURN *********" +15000 IF T<>-113 THEN 15200 +15010 IF GS=0 THEN PRINT "Return error": E=-1: RETURN +15015 PRINT GS +15020 HE=GH(GS): I=GI(GS): GS=GS-1: A$=LS$(HE): GOSUB 11000 +15030 RETURN +15195 REM "********* IF *********" +15200 IF T<>-112 THEN 15400 +15210 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15220 GOSUB 13030 +15230 IF NOT X THEN T=0: I=LEN(A$): REM "if goes to the end of line" +15260 RETURN +15395 REM "********* FOR, TO, STEP *********" +15400 IF T<>-111 THEN 15800 +15410 IF FS=FM THEN PRINT "For error": E=-1: RETURN +15420 FS=FS+1 +15430 GOSUB 11000 +15440 IF T<>-124 THEN E=-1: RETURN +15450 FV(FS)=C: CF=C: GOSUB 11000 +15460 IF T<>ASC("=") THEN E=-1: RETURN +15470 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15480 GOSUB 13030: VA(CF-64)=X +15490 IF T<>-110 THEN E=-1: RETURN +15500 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15510 GOSUB 13030: FE(FS)=X +15520 X=1 +15530 IF T<>-109 THEN 15550 +15540 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15545 GOSUB 13030 +15550 FD(FS)=X +15560 IF DE=4 THEN PRINT "** for complete", FV(FS), FD(FS), FE(FS) +15595 REM "All data for the FOR is complete here" +15600 GOSUB 13700 : REM "Order FOR stack correctly!!" +15610 REM "Condition fullfilled, skip to NEXT" +15620 IF FD(FS)>0 AND FE(FS)VA(CF-64) THEN FS=FS-1: GOTO 15700 +15640 REM "Remember this location" +15650 FH(FS)=HE: FI(FS)=I: IF DE=4 THEN PRINT "** for location", FI(FS), FH(FS) +15660 RETURN +15700 REM "Find the next" +15710 GOSUB 11000: IF T<>-108 AND T<>0 GOTO 15710 +15720 IF T=-108 THEN GOSUB 11000: RETURN +15730 HE=HE+1: IF LN(HE)<>0 THEN A$=LS$(HE): I=1: GOTO 15710 +15740 PRINT "Next error": E=-1 +15750 RETURN +15795 REM "********* NEXT *********" +15800 IF T<>-108 THEN 16000 +15810 IF FS=0 THEN PRINT "Next error": E=-1: RETURN +15820 CF=FV(FS): VA(CF-64)=VA(CF-64)+FD(FS) +15825 IF DE=4 THEN PRINT "** next executed", FV(FS), FD(FS), FE(FS), FI(FS), FH(FS) +15830 IF FD(FS)>0 AND FE(FS)VA(CF-64) THEN 15870 +15850 I=FI(FS): HE=FH(FS): IF HE>0 THEN A$=LS$(HE) +15860 GOSUB 11000: RETURN +15870 FV(FS)=0: FS=FS-1: GOSUB 11000: REM "Clean up the variable field!" +15880 RETURN +15995 REM "********* STOP ********* (handled in loop)" +16000 IF T<>-107 THEN 16200 +16010 RETURN +16195 REM "********* LIST *********" +16200 IF T<>-106 THEN 16400 +16210 GOSUB 11000 +16220 FOR K=1 TO NL +16230 IF LN(K)<>0 THEN PRINT LN(K); LS$(K) +16240 NEXT +16250 RETURN +16395 REM "********* NEW *********" +16400 IF T<>-105 THEN 16600 +16410 GOSUB 11000 +16420 FOR K=1 TO NL: LN(K)=0: LS$(K)="": NEXT +16430 RETURN +16595 REM "********* RUN ********* (handled in loop)" +16600 IF T<>-104 THEN 16800 +16610 GOSUB 11000: RETURN +16795 REM "********* REM *********" +16800 IF T<>-100 THEN 17000 +16810 T=0: I=LEN(A$): RETURN +16695 REM "******** LOAD *********" +17000 IF T<>-99 THEN 17200 +17010 GOSUB 11000: PRINT "not implemented": RETURN +17195 REM "******** SAVE *********" +17200 IF T<>-98 THEN 17400 +17210 GOSUB 11000: PRINT "not implemented": RETURN +17395 REM "********* : ***********" +17400 IF T<>":" THEN 17500 +17410 GOSUB 11000: RETURN +17500 IF T=0 THEN RETURN +17510 REM "******** Syntax Error *********" +17520 PRINT "Syntax Error": E=-1: RETURN +19995 RETURN +30000 REM "********* the keyword storage with the token values *************" +30010 DATA 24 +30020 DATA ">=",-121,"<=",-120,"<>",-119 +30030 DATA "print",-118,"let",-117,"input",-116,"goto",-115 +30040 DATA "gosub",-114, "return", -113, "if",-112 +30050 DATA "for", -111, "to", -110, "step", -109, "next", -108 +30060 DATA "stop", -107, "list", -106, "new", -105, "run", -104 +30070 DATA "abs", -103, "rnd", -102, "size", -101, "rem", -100 +30080 DATA "load", -99, "save", -98 + diff --git a/data/examples/00tutorial/tinybasic-s.bas b/data/examples/00tutorial/tinybasic-s.bas new file mode 100644 index 0000000000000000000000000000000000000000..8e9fd56c8c22cfefdea2a1e77cdef8b0bdc2bf30 --- /dev/null +++ b/data/examples/00tutorial/tinybasic-s.bas @@ -0,0 +1,380 @@ +10 REM "Tinybasic interpreter written in BASIC" +15 REM +20 REM "This code is written in Stefan's Arduino BASIC aks IoT Basic" +25 REM "It also runs on MS BASIC interpreters. Set LL to 0 for this" +30 REM "and remove the ()() and @V constructs." +35 REM "The interpreter implements Dr. Wang'S Palo Alto BASIC " +40 REM "See http://www.bitsavers.org/pdf/interfaceAge/197612/092-108.pdf for" +45 REM "On the implemented language." +50 REM +55 REM "Main components of this program:" +57 REM "GOSUB 11000: the lexer. It decomposes the string A$ into tokens." +60 REM " There is one token produced in T, C, C$ after each call until" +62 REM " the end of the line which is T=0." +65 REM "GOSUB 12000: the expression evaluation. This is a recursive decent" +67 REM " parser using a stack ST. In the end the result is on the stack." +70 REM "GOSUB 14000: the command code. For each command there is one section." +72 REM " At the end of the command a new token must be produced by calling" +75 REM " The lexer with GOSUB 11000." +77 REM "GOSUB 13xxx: helper routines for the stack, parser and line storage." +80 REM "30000: keywords. First data is the number of keywords." +82 REM "The input loop from 2000-6000 ties it all together." +85 REM +100 REM "****************** Parameters and declarations ********************" +110 NL=100: REM "Maximum number of lines" +120 AS=100: REM "Number of elements in the @() array" +130 SS=16: REM "The size of the arithmetic stack" +140 LL=80: REM "The line length, set to 0 if you run on MS BASIC dialects." +150 GD=4: REM "Maximum depth of GOSUB statements" +160 FM=4: REM "Maximum number of active FOR loops (nested)" +200 REM "The debug flag, settings are" +210 REM "0: no debug, 1: lexer debug, 2: expression debug, 4: command debug" +220 DE=0 +990 REM +1000 REM "*************** essential declarations and functions *************" +1002 REM +1005 REM "The token T, the accu X and the error E" +1010 T=0: X=0: E=0 +1015 REM "The command string C$ and the input buffer A$" +1020 IF LL>0 THEN DIM C$(LL), A$(LL), T$(LL) +1025 REM "Functions to handle character and case stuff" +1030 T=1: X=0: E=0: C$="" +1040 DEF FNNU(X)=(X=>48 AND X<=57) +1050 DEF FNAL(X)=(X>=65 AND X<=90) +1060 DEF FNUP(X)=X-ABS(X>=97 AND X<=122)*32 +1070 REM "The data arrays for variables and one array" +1080 DIM VA(26), AR(AS) +1090 REM "The stacks for numbers and operators" +1100 DIM ST(SS) +1110 SI=0 +1120 REM "functions of the interpreter" +1130 DEF FNTE(T)=(T=0 OR T=ASC(":")): REM "terminal symbol of a statement" +1200 REM "The program storage" +1210 DIM LN(NL) +1220 IF LL>0 THEN DIM LS$(LL, NL): GOTO 1240 +1230 DIM LS$(NL) +1240 REM "HEre is the current line, 0 if interactive." +1250 HE=0 +1260 REM "The tables for GOSUB and FOR with their indices GS and FS" +1270 DIM GH(GD), GI(GD): GS=0 +1280 DIM FV(FM), FE(FM), FD(FM), FH(FM), FI(FM): FS=0 +1995 REM +2000 REM "************************* input loop *****************************" +2010 INPUT "]", A$: I=1: GOSUB 11000: REM "Input a line and get the first token" +2020 REM "first token a line number -> store it or delete it" +2030 IF T<>-127 THEN 5000 +2040 X=INT(X) +2050 T$=MID$(A$, I) +2055 REM "empty line, delete it" +2060 IF T$="" OR T$=" " THEN GOSUB 13500: GOTO 5800 +2065 REM "insert the line" +2070 GOSUB 13200: GOTO 5800 +5000 REM "no line number at the beginning, execute it, check on RUN first" +5010 REM "on RUN loop through the statements" +5020 IF T<>-104 THEN 5500 +5030 HE=1 +5040 IF LN(HE)=0 THEN GOTO 5800 +5045 REM "get the actual line and execute it" +5050 A$=LS$()(HE): I=1: GOSUB 11000 +5060 GOSUB 14000 +5065 IF E<>0 THEN 5800 +5070 IF T=-107 THEN PRINT "Stop at", LN(HE): GOTO 5800 +5080 IF T=0 THEN HE=HE+1: GOTO 5040 +5100 GOTO 5060 +5495 REM "The interactive loop, no line fetching" +5500 GOSUB 14000: IF T<>0 GOTO 5500 +5800 REM "Catch the error and get more input" +5810 IF E<>0 THEN SP=1: I=1: A$="": GS=0: FS=0: E=0 +5995 GOTO 2000 +11000 REM "******* the lexer, generates a token stream in T, X, C$ ********" +11005 REM +11010 T=0: X=0: C$="" +11020 IF I>LEN(A$) THEN 11400 +11030 C$=MID$(A$, I, 1): C=ASC(C$): C=FNUP(C): C$=CHR$(C) +11040 REM "a whitespace is skipped" +11050 IF C$=" " THEN I=I+1: GOTO 11010 +11060 REM "a number - uses a BASIC special feature @V " +11070 IF FNNU(C) THEN T$=MID$(A$, I): X=VAL(T$): I=I+@V: T=-127: GOTO 11400 +11080 REM "a string constant" +11090 IF C<>34 THEN 11200 +11100 J=I +11110 I=I+1: IF MID$(A$, I, 1)<>CHR$(34) AND I1 THEN RETURN +11420 PRINT "** lex delivered token ",T, MID$(A$, I) +11430 RETURN +12000 REM "*************** the expression evaluator **********************" +12005 REM +12010 REM "this is a classical recursive decent parser, using an own stack" +12020 REM "as BASIC has no local variables" +12025 REM +12030 REM "*** entry point for the expression - compare" +12040 GOSUB 12200: REM "Call addition" +12050 IF T<>ASC("=") THEN 12070 +12060 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X=Y): GOSUB 13050 +12070 IF T<>ASC("#") AND T<>-119 THEN 12090 +12080 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X<>Y): GOSUB 13050 +12090 IF T<>ASC(">") THEN 12110 +12100 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X>Y): GOSUB 13050 +12110 IF T<>ASC("<") THEN 12130 +12120 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X-121 THEN 12150 +12140 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X>=Y): GOSUB 13050 +12150 IF T<>-120 THEN 12170 +12160 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X<=Y): GOSUB 13050 +12170 RETURN +12200 REM "*** additions of all kind" +12210 IF T<>ASC("+") AND T<>ASC("-") THEN GOSUB 12300: GOTO 12230 +12220 X=0: GOSUB 13050: REM "Push a zero" +12230 IF T<>ASC("+") THEN 12250 +12240 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030 +12245 X=(Y+X): GOSUB 13050: GOTO 12230 +12250 IF T<>ASC("-") THEN 12270 +12260 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030 +12265 X=(X-Y): GOSUB 13050: GOTO 12230 +12270 IF NOT DE THEN RETURN +12280 PRINT "** after add, token", T, "stack is ": GOSUB 13060 +12290 RETURN +12300 REM "*** the term evaluation handles multiplication" +12310 GOSUB 12400 +12320 GOSUB 11000 +12330 IF T<>ASC("*") THEN 12350 +12340 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: X=X*Y: GOSUB 13050 +12350 IF T<>ASC("/") THEN 12370 +12360 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: IF Y=0 THEN E=-1: Y=1 +12365 X=X/Y: GOSUB 13050 +12370 IF T<>ASC("%") THEN 12390 +12380 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: IF Y=0 THEN E=-1: Y=1 +12385 X=X%Y: GOSUB 13050 +12390 RETURN +12400 REM "*** the factor evaluation never calls nexttoken" +12410 IF T=-127 THEN GOSUB 13040: GOTO 12900: REM "a plain number" +12420 IF T=-124 THEN X=VA(C-64): GOSUB 13040: GOTO 12900: REM "a variable" +12430 IF T<>ASC("(") THEN 12480: REM "an expression in brackets" +12450 GOSUB 11000: GOSUB 12000: IF E GOTO 12900 +12460 IF T<>ASC(")") THEN E=-1 +12470 GOTO 12900 +12480 IF T<>-103 THEN 12510: REM "the ABS function" +12490 GOSUB 11000: GOSUB 12430 +12500 GOSUB 13030: X=ABS(X): GOSUB 13040: GOTO 12900 +12510 IF T<>-102 THEN 12540: REM "the RND function" +12520 GOSUB 11000: GOSUB 12430 +12530 GOSUB 13030: X=RND(X): GOSUB 13040: GOTO 12900 +12540 IF T<>-101 THEN 12560: REM "the SIZE constant" +12550 X=42: GOSUB 13040: GOTO 12900 +12560 IF T<>"@" THEN 12600: REM "the array" +12570 GOSUB 11000: GOSUB 12430 +12580 GOSUB 13030: IF X<1 OR X>100 THEN PRINT "ARRAY ERROR": E=-1: GOTO 12900 +12590 X=AR(X): GOSUB 13050 +12600 REM "this is the place where one could add more functions and constants" +12900 REM "The debug and error hook of factor" +12910 IF DE<>2 THEN RETURN +12920 PRINT "** after factor, token", T, "stack is ": GOSUB 13060 +12922 PRINT "** cursor position is", I +12990 RETURN +13000 REM "*********** helpers of the parser and the interpreter ***************" +13020 REM "pop data from the stack" +13030 IF SI>0 THEN X=ST(SI): SI=SI-1: GOTO 13060 +13035 PRINT "STACK ERROR": END +13040 REM "push data on the stack" +13050 IF SI0 THEN 13400 +13230 F=1 +13240 IF LN(F)0 AND F0 AND T<>ASC(":") THEN 13610 +13620 RETURN +13700 REM "check if FOR already exists, purge the FOR stack then" +13710 IF FS=1 THEN RETURN +13720 FOR F=FS-1 TO 1 STEP -1 +13730 IF FV(FS)=FV(F) THEN 13760 +13740 NEXT +13750 RETURN +13760 FD(F)=FD(FS): FE(F)=FE(FS): FH(F)=FH(FS): FI(F)=FI(FS) +13770 FOR K=FM TO FS+1: FV(K)=0: NEXT : REM "delete all inner loops" +13780 RETURN +14000 REM "*********** statements are parsed here ************************" +14010 REM +14015 REM "******** PRINT *********" +14020 IF T<>-118 THEN 14200 +14030 GOSUB 11000: IF E<>0 THEN RETURN +14040 IF T=-125 THEN PRINT C$;: GOSUB 11000: GOTO 14070 +14050 IF FNTE(T) THEN GOSUB 11000: GOTO 14080 +14060 GOSUB 12000: GOSUB 13030: PRINT X; +14070 IF T=ASC(",") OR T=ASC(";") THEN 14030 +14080 PRINT: RETURN +14195 REM "********* LET **********" +14200 IF T<>-117 AND T<>ASC("@") AND T<>-124 THEN 14400 +14210 IF T=-117 THEN GOSUB 11000: IF T<>ASC("@") AND T<>-124 THEN E=-1: RETURN +14220 T0=T: C0=C : REM "Remember if we deal with a variable or an array as left hand side" +14230 GOSUB 11000: IF T0<>ASC("@") THEN 14240 +14235 IF T<>ASC("(") THEN PRINT "ERROR": E=-1: RETURN +14237 GOSUB 11000: GOSUB 12000: GOSUB 13030: X0=X: IF T<>ASC(")") THEN E=-1: RETURN +14238 GOSUB 11000 +14240 IF E OR T<>ASC("=") THEN E=-1: RETURN +14250 GOSUB 11000: GOSUB 12000: GOSUB 13030 +14260 IF T0=-124 THEN VA(C0-64)=X: GOTO 14290 +14270 IF X0<1 OR X0>AS THEN E=-1: RETURN +14280 AR(X0)=X +14290 GOSUB 11000: RETURN +14395 REM "********* INPUT ********" +14400 IF T<>-116 THEN 14600 +14410 GOSUB 11000 +14420 IF T=-125 THEN PRINT C$; : GOSUB 11000 +14430 IF T=-124 THEN INPUT X: VA(C-64)=X: GOSUB 11000 +14440 IF T=ASC(",") THEN 14410 +14450 IF FNTE(T) THEN RETURN +14460 E=-1: RETURN +14595 REM "********* GOTO *********" +14600 IF T<>-115 THEN 14800 +14610 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +14620 GOSUB 13030: GOSUB 13100: REM "Try to find the line" +14630 IF F=0 THEN PRINT "Line not found in ", HE: E=-1: RETURN +14640 HE=F: I=1: A$=LS$()(HE): GOSUB 11000: RETURN +14795 REM "********* GOSUB *********" +14800 IF T<>-114 THEN 15000 +14810 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +14820 GOSUB 13030: GOSUB 13100: REM "Try to find the line" +14830 IF F=0 THEN PRINT "Line not found in ", HE: E=-1: RETURN +14840 IF GS=GD THEN PRINT "Gosub error": E=-1: RETURN +14850 GS=GS+1: GH(GS)=HE: GI(GS)=I: I=1: HE=F: A$=LS$()(HE): GOSUB 11000 +14860 RETURN +14995 REM "********* RETURN *********" +15000 IF T<>-113 THEN 15200 +15010 IF GS=0 THEN PRINT "Return error": E=-1: RETURN +15015 PRINT GS +15020 HE=GH(GS): I=GI(GS): GS=GS-1: A$=LS$()(HE): GOSUB 11000 +15030 RETURN +15195 REM "********* IF *********" +15200 IF T<>-112 THEN 15400 +15210 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15220 GOSUB 13030 +15230 IF NOT X THEN T=0: I=LEN(A$): REM "if goes to the end of line" +15260 RETURN +15395 REM "********* FOR, TO, STEP *********" +15400 IF T<>-111 THEN 15800 +15410 IF FS=FM THEN PRINT "For error": E=-1: RETURN +15420 FS=FS+1 +15430 GOSUB 11000 +15440 IF T<>-124 THEN E=-1: RETURN +15450 FV(FS)=C: CF=C: GOSUB 11000 +15460 IF T<>ASC("=") THEN E=-1: RETURN +15470 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15480 GOSUB 13030: VA(CF-64)=X +15490 IF T<>-110 THEN E=-1: RETURN +15500 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15510 GOSUB 13030: FE(FS)=X +15520 X=1 +15530 IF T<>-109 THEN 15550 +15540 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15545 GOSUB 13030 +15550 FD(FS)=X +15560 IF DE=4 THEN PRINT "** for complete", FV(FS), FD(FS), FE(FS) +15595 REM "All data for the FOR is complete here" +15600 GOSUB 13700 : REM "Order FOR stack correctly!!" +15610 REM "Condition fullfilled, skip to NEXT" +15620 IF FD(FS)>0 AND FE(FS)VA(CF-64) THEN FS=FS-1: GOTO 15700 +15640 REM "Remember this location" +15650 FH(FS)=HE: FI(FS)=I: IF DE=4 THEN PRINT "** for location", FI(FS), FH(FS) +15660 RETURN +15700 REM "Find the next" +15710 GOSUB 11000: IF T<>-108 AND T<>0 GOTO 15710 +15720 IF T=-108 THEN GOSUB 11000: RETURN +15730 HE=HE+1: IF LN(HE)<>0 THEN A$=LS$()(HE): I=1: GOTO 15710 +15740 PRINT "Next error": E=-1 +15750 RETURN +15795 REM "********* NEXT *********" +15800 IF T<>-108 THEN 16000 +15810 IF FS=0 THEN PRINT "Next error": E=-1: RETURN +15820 CF=FV(FS): VA(CF-64)=VA(CF-64)+FD(FS) +15825 IF DE=4 THEN PRINT "** next executed", FV(FS), FD(FS), FE(FS), FI(FS), FH(FS) +15830 IF FD(FS)>0 AND FE(FS)VA(CF-64) THEN 15870 +15850 I=FI(FS): HE=FH(FS): IF HE>0 THEN A$=LS$()(HE) +15860 GOSUB 11000: RETURN +15870 FV(FS)=0: FS=FS-1: GOSUB 11000: REM "Clean up the variable field!" +15880 RETURN +15995 REM "********* STOP ********* (handled in loop)" +16000 IF T<>-107 THEN 16200 +16010 RETURN +16195 REM "********* LIST *********" +16200 IF T<>-106 THEN 16400 +16210 GOSUB 11000 +16220 FOR K=1 TO NL +16230 IF LN(K)<>0 THEN PRINT LN(K); LS$()(K) +16240 NEXT +16250 RETURN +16395 REM "********* NEW *********" +16400 IF T<>-105 THEN 16600 +16410 GOSUB 11000 +16420 FOR K=1 TO NL: LN(K)=0: LS$()(K)="": NEXT +16430 RETURN +16595 REM "********* RUN ********* (handled in loop)" +16600 IF T<>-104 THEN 16800 +16610 GOSUB 11000: RETURN +16795 REM "********* REM *********" +16800 IF T<>-100 THEN 17000 +16810 T=0: I=LEN(A$): RETURN +16695 REM "******** LOAD *********" +17000 IF T<>-99 THEN 17200 +17010 GOSUB 11000: PRINT "not implemented": RETURN +17195 REM "******** SAVE *********" +17200 IF T<>-98 THEN 17400 +17210 GOSUB 11000: PRINT "not implemented": RETURN +17395 REM "********* : ***********" +17400 IF T<>":" THEN 17500 +17410 GOSUB 11000: RETURN +17500 IF T=0 THEN RETURN +17510 REM "******** Syntax Error *********" +17520 PRINT "Syntax Error": E=-1: RETURN +19995 RETURN +30000 REM "********* the keyword storage with the token values *************" +30010 DATA 24 +30020 DATA ">=",-121,"<=",-120,"<>",-119 +30030 DATA "print",-118,"let",-117,"input",-116,"goto",-115 +30040 DATA "gosub",-114, "return", -113, "if",-112 +30050 DATA "for", -111, "to", -110, "step", -109, "next", -108 +30060 DATA "stop", -107, "list", -106, "new", -105, "run", -104 +30070 DATA "abs", -103, "rnd", -102, "size", -101, "rem", -100 +30080 DATA "load", -99, "save", -98 + diff --git a/data/examples/00tutorial/tinybasic.bas b/data/examples/00tutorial/tinybasic.bas new file mode 100644 index 0000000000000000000000000000000000000000..8d760aa7f0775de145226353f8136fac739333e7 --- /dev/null +++ b/data/examples/00tutorial/tinybasic.bas @@ -0,0 +1,380 @@ +10 REM "Tinybasic interpreter written in BASIC" +15 REM +20 REM "Written in Stefan's Arduino BASIC aka IoT Basic Version 2(!!)" +25 REM "It also runs on MS BASIC interpreters. Set LL to 0 for this" +30 REM "and remove the ()() and @V constructs." +35 REM "The interpreter implements Dr. Wang'S Palo Alto BASIC " +40 REM "See http://www.bitsavers.org/pdf/interfaceAge/197612/092-108.pdf for" +45 REM "On the implemented language." +50 REM +55 REM "Main components of this program:" +57 REM "GOSUB 11000: the lexer. It decomposes the string A$ into tokens." +60 REM " There is one token produced in T, C, C$ after each call until" +62 REM " the end of the line which is T=0." +65 REM "GOSUB 12000: the expression evaluation. This is a recursive decent" +67 REM " parser using a stack ST. In the end the result is on the stack." +70 REM "GOSUB 14000: the command code. For each command there is one section." +72 REM " At the end of the command a new token must be produced by calling" +75 REM " The lexer with GOSUB 11000." +77 REM "GOSUB 13xxx: helper routines for the stack, parser and line storage." +80 REM "30000: keywords. First data is the number of keywords." +82 REM "The input loop from 2000-6000 ties it all together." +85 REM +100 REM "****************** Parameters and declarations ********************" +110 NL=100: REM "Maximum number of lines" +120 AS=100: REM "Number of elements in the @() array" +130 SS=16: REM "The size of the arithmetic stack" +140 LL=80: REM "The line length, set to 0 if you run on MS BASIC dialects." +150 GD=4: REM "Maximum depth of GOSUB statements" +160 FM=4: REM "Maximum number of active FOR loops (nested)" +200 REM "The debug flag, settings are" +210 REM "0: no debug, 1: lexer debug, 2: expression debug, 4: command debug" +220 DE=0 +990 REM +1000 REM "*************** essential declarations and functions *************" +1002 REM +1005 REM "The token T, the accu X and the error E" +1010 T=0: X=0: E=0 +1015 REM "The command string C$ and the input buffer A$" +1020 IF LL>0 THEN DIM C$(LL), A$(LL), T$(LL) +1025 REM "Functions to handle character and case stuff" +1030 T=1: X=0: E=0: C$="" +1040 DEF FNNU(X)=(X=>48 AND X<=57) +1050 DEF FNAL(X)=(X>=65 AND X<=90) +1060 DEF FNUP(X)=X-ABS(X>=97 AND X<=122)*32 +1070 REM "The data arrays for variables and one array" +1080 DIM VA(26), AR(AS) +1090 REM "The stacks for numbers and operators" +1100 DIM ST(SS) +1110 SI=0 +1120 REM "functions of the interpreter" +1130 DEF FNTE(T)=(T=0 OR T=ASC(":")): REM "terminal symbol of a statement" +1200 REM "The program storage" +1210 DIM LN(NL) +1220 IF LL>0 THEN DIM LS$(LL, NL): GOTO 1240 +1230 DIM LS$(NL) +1240 REM "HEre is the current line, 0 if interactive." +1250 HE=0 +1260 REM "The tables for GOSUB and FOR with their indices GS and FS" +1270 DIM GH(GD), GI(GD): GS=0 +1280 DIM FV(FM), FE(FM), FD(FM), FH(FM), FI(FM): FS=0 +1995 REM +2000 REM "************************* input loop *****************************" +2010 INPUT "]", A$: I=1: GOSUB 11000: REM "Input a line and get the first token" +2020 REM "first token a line number -> store it or delete it" +2030 IF T<>-127 THEN 5000 +2040 X=INT(X) +2050 T$=MID$(A$, I) +2055 REM "empty line, delete it" +2060 IF T$="" OR T$=" " THEN GOSUB 13500: GOTO 5800 +2065 REM "insert the line" +2070 GOSUB 13200: GOTO 5800 +5000 REM "no line number at the beginning, execute it, check on RUN first" +5010 REM "on RUN loop through the statements" +5020 IF T<>-104 THEN 5500 +5030 HE=1 +5040 IF LN(HE)=0 THEN GOTO 5800 +5045 REM "get the actual line and execute it" +5050 A$=LS$()(HE): I=1: GOSUB 11000 +5060 GOSUB 14000 +5065 IF E<>0 THEN 5800 +5070 IF T=-107 THEN PRINT "Stop at", LN(HE): GOTO 5800 +5080 IF T=0 THEN HE=HE+1: GOTO 5040 +5100 GOTO 5060 +5495 REM "The interactive loop, no line fetching" +5500 GOSUB 14000: IF T<>0 GOTO 5500 +5800 REM "Catch the error and get more input" +5810 IF E<>0 THEN SP=1: I=1: A$="": GS=0: FS=0: E=0 +5995 GOTO 2000 +11000 REM "******* the lexer, generates a token stream in T, X, C$ ********" +11005 REM +11010 T=0: X=0: C$="" +11020 IF I>LEN(A$) THEN 11400 +11030 C$=MID$(A$, I, 1): C=ASC(C$): C=FNUP(C): C$=CHR$(C) +11040 REM "a whitespace is skipped" +11050 IF C$=" " THEN I=I+1: GOTO 11010 +11060 REM "a number - uses a BASIC special feature @V " +11070 IF FNNU(C) THEN T$=MID$(A$, I): X=VAL(T$): I=I+@V: T=-127: GOTO 11400 +11080 REM "a string constant" +11090 IF C<>34 THEN 11200 +11100 J=I +11110 I=I+1: IF MID$(A$, I, 1)<>CHR$(34) AND I1 THEN RETURN +11420 PRINT "** lex delivered token ",T, MID$(A$, I) +11430 RETURN +12000 REM "*************** the expression evaluator **********************" +12005 REM +12010 REM "this is a classical recursive decent parser, using an own stack" +12020 REM "as BASIC has no local variables" +12025 REM +12030 REM "*** entry point for the expression - compare" +12040 GOSUB 12200: REM "Call addition" +12050 IF T<>ASC("=") THEN 12070 +12060 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X=Y): GOSUB 13050 +12070 IF T<>ASC("#") AND T<>-119 THEN 12090 +12080 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X<>Y): GOSUB 13050 +12090 IF T<>ASC(">") THEN 12110 +12100 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X>Y): GOSUB 13050 +12110 IF T<>ASC("<") THEN 12130 +12120 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X-121 THEN 12150 +12140 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X>=Y): GOSUB 13050 +12150 IF T<>-120 THEN 12170 +12160 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X<=Y): GOSUB 13050 +12170 RETURN +12200 REM "*** additions of all kind" +12210 IF T<>ASC("+") AND T<>ASC("-") THEN GOSUB 12300: GOTO 12230 +12220 X=0: GOSUB 13050: REM "Push a zero" +12230 IF T<>ASC("+") THEN 12250 +12240 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030 +12245 X=(Y+X): GOSUB 13050: GOTO 12230 +12250 IF T<>ASC("-") THEN 12270 +12260 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030 +12265 X=(X-Y): GOSUB 13050: GOTO 12230 +12270 IF NOT DE THEN RETURN +12280 PRINT "** after add, token", T, "stack is ": GOSUB 13060 +12290 RETURN +12300 REM "*** the term evaluation handles multiplication" +12310 GOSUB 12400 +12320 GOSUB 11000 +12330 IF T<>ASC("*") THEN 12350 +12340 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: X=X*Y: GOSUB 13050 +12350 IF T<>ASC("/") THEN 12370 +12360 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: IF Y=0 THEN E=-1: Y=1 +12365 X=X/Y: GOSUB 13050 +12370 IF T<>ASC("%") THEN 12390 +12380 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: IF Y=0 THEN E=-1: Y=1 +12385 X=X%Y: GOSUB 13050 +12390 RETURN +12400 REM "*** the factor evaluation never calls nexttoken" +12410 IF T=-127 THEN GOSUB 13040: GOTO 12900: REM "a plain number" +12420 IF T=-124 THEN X=VA(C-64): GOSUB 13040: GOTO 12900: REM "a variable" +12430 IF T<>ASC("(") THEN 12480: REM "an expression in brackets" +12450 GOSUB 11000: GOSUB 12000: IF E GOTO 12900 +12460 IF T<>ASC(")") THEN E=-1 +12470 GOTO 12900 +12480 IF T<>-103 THEN 12510: REM "the ABS function" +12490 GOSUB 11000: GOSUB 12430 +12500 GOSUB 13030: X=ABS(X): GOSUB 13040: GOTO 12900 +12510 IF T<>-102 THEN 12540: REM "the RND function" +12520 GOSUB 11000: GOSUB 12430 +12530 GOSUB 13030: X=RND(X): GOSUB 13040: GOTO 12900 +12540 IF T<>-101 THEN 12560: REM "the SIZE constant" +12550 X=42: GOSUB 13040: GOTO 12900 +12560 IF T<>"@" THEN 12600: REM "the array" +12570 GOSUB 11000: GOSUB 12430 +12580 GOSUB 13030: IF X<1 OR X>100 THEN PRINT "ARRAY ERROR": E=-1: GOTO 12900 +12590 X=AR(X): GOSUB 13050 +12600 REM "this is the place where one could add more functions and constants" +12900 REM "The debug and error hook of factor" +12910 IF DE<>2 THEN RETURN +12920 PRINT "** after factor, token", T, "stack is ": GOSUB 13060 +12922 PRINT "** cursor position is", I +12990 RETURN +13000 REM "*********** helpers of the parser and the interpreter ***************" +13020 REM "pop data from the stack" +13030 IF SI>0 THEN X=ST(SI): SI=SI-1: GOTO 13060 +13035 PRINT "STACK ERROR": END +13040 REM "push data on the stack" +13050 IF SI0 THEN 13400 +13230 F=1 +13240 IF LN(F)0 AND F0 AND T<>ASC(":") THEN 13610 +13620 RETURN +13700 REM "check if FOR already exists, purge the FOR stack then" +13710 IF FS=1 THEN RETURN +13720 FOR F=FS-1 TO 1 STEP -1 +13730 IF FV(FS)=FV(F) THEN 13760 +13740 NEXT +13750 RETURN +13760 FD(F)=FD(FS): FE(F)=FE(FS): FH(F)=FH(FS): FI(F)=FI(FS) +13770 FOR K=FM TO FS+1: FV(K)=0: NEXT : REM "delete all inner loops" +13780 RETURN +14000 REM "*********** statements are parsed here ************************" +14010 REM +14015 REM "******** PRINT *********" +14020 IF T<>-118 THEN 14200 +14030 GOSUB 11000: IF E<>0 THEN RETURN +14040 IF T=-125 THEN PRINT C$;: GOSUB 11000: GOTO 14070 +14050 IF FNTE(T) THEN GOSUB 11000: GOTO 14080 +14060 GOSUB 12000: GOSUB 13030: PRINT X; +14070 IF T=ASC(",") OR T=ASC(";") THEN 14030 +14080 PRINT: RETURN +14195 REM "********* LET **********" +14200 IF T<>-117 AND T<>ASC("@") AND T<>-124 THEN 14400 +14210 IF T=-117 THEN GOSUB 11000: IF T<>ASC("@") AND T<>-124 THEN E=-1: RETURN +14220 T0=T: C0=C : REM "Remember if we deal with a variable or an array as left hand side" +14230 GOSUB 11000: IF T0<>ASC("@") THEN 14240 +14235 IF T<>ASC("(") THEN PRINT "ERROR": E=-1: RETURN +14237 GOSUB 11000: GOSUB 12000: GOSUB 13030: X0=X: IF T<>ASC(")") THEN E=-1: RETURN +14238 GOSUB 11000 +14240 IF E OR T<>ASC("=") THEN E=-1: RETURN +14250 GOSUB 11000: GOSUB 12000: GOSUB 13030 +14260 IF T0=-124 THEN VA(C0-64)=X: GOTO 14290 +14270 IF X0<1 OR X0>AS THEN E=-1: RETURN +14280 AR(X0)=X +14290 GOSUB 11000: RETURN +14395 REM "********* INPUT ********" +14400 IF T<>-116 THEN 14600 +14410 GOSUB 11000 +14420 IF T=-125 THEN PRINT C$; : GOSUB 11000 +14430 IF T=-124 THEN INPUT X: VA(C-64)=X: GOSUB 11000 +14440 IF T=ASC(",") THEN 14410 +14450 IF FNTE(T) THEN RETURN +14460 E=-1: RETURN +14595 REM "********* GOTO *********" +14600 IF T<>-115 THEN 14800 +14610 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +14620 GOSUB 13030: GOSUB 13100: REM "Try to find the line" +14630 IF F=0 THEN PRINT "Line not found in ", HE: E=-1: RETURN +14640 HE=F: I=1: A$=LS$()(HE): GOSUB 11000: RETURN +14795 REM "********* GOSUB *********" +14800 IF T<>-114 THEN 15000 +14810 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +14820 GOSUB 13030: GOSUB 13100: REM "Try to find the line" +14830 IF F=0 THEN PRINT "Line not found in ", HE: E=-1: RETURN +14840 IF GS=GD THEN PRINT "Gosub error": E=-1: RETURN +14850 GS=GS+1: GH(GS)=HE: GI(GS)=I: I=1: HE=F: A$=LS$()(HE): GOSUB 11000 +14860 RETURN +14995 REM "********* RETURN *********" +15000 IF T<>-113 THEN 15200 +15010 IF GS=0 THEN PRINT "Return error": E=-1: RETURN +15015 PRINT GS +15020 HE=GH(GS): I=GI(GS): GS=GS-1: A$=LS$()(HE): GOSUB 11000 +15030 RETURN +15195 REM "********* IF *********" +15200 IF T<>-112 THEN 15400 +15210 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15220 GOSUB 13030 +15230 IF NOT X THEN T=0: I=LEN(A$): REM "if goes to the end of line" +15260 RETURN +15395 REM "********* FOR, TO, STEP *********" +15400 IF T<>-111 THEN 15800 +15410 IF FS=FM THEN PRINT "For error": E=-1: RETURN +15420 FS=FS+1 +15430 GOSUB 11000 +15440 IF T<>-124 THEN E=-1: RETURN +15450 FV(FS)=C: CF=C: GOSUB 11000 +15460 IF T<>ASC("=") THEN E=-1: RETURN +15470 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15480 GOSUB 13030: VA(CF-64)=X +15490 IF T<>-110 THEN E=-1: RETURN +15500 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15510 GOSUB 13030: FE(FS)=X +15520 X=1 +15530 IF T<>-109 THEN 15550 +15540 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15545 GOSUB 13030 +15550 FD(FS)=X +15560 IF DE=4 THEN PRINT "** for complete", FV(FS), FD(FS), FE(FS) +15595 REM "All data for the FOR is complete here" +15600 GOSUB 13700 : REM "Order FOR stack correctly!!" +15610 REM "Condition fullfilled, skip to NEXT" +15620 IF FD(FS)>0 AND FE(FS)VA(CF-64) THEN FS=FS-1: GOTO 15700 +15640 REM "Remember this location" +15650 FH(FS)=HE: FI(FS)=I: IF DE=4 THEN PRINT "** for location", FI(FS), FH(FS) +15660 RETURN +15700 REM "Find the next" +15710 GOSUB 11000: IF T<>-108 AND T<>0 GOTO 15710 +15720 IF T=-108 THEN GOSUB 11000: RETURN +15730 HE=HE+1: IF LN(HE)<>0 THEN A$=LS$()(HE): I=1: GOTO 15710 +15740 PRINT "Next error": E=-1 +15750 RETURN +15795 REM "********* NEXT *********" +15800 IF T<>-108 THEN 16000 +15810 IF FS=0 THEN PRINT "Next error": E=-1: RETURN +15820 CF=FV(FS): VA(CF-64)=VA(CF-64)+FD(FS) +15825 IF DE=4 THEN PRINT "** next executed", FV(FS), FD(FS), FE(FS), FI(FS), FH(FS) +15830 IF FD(FS)>0 AND FE(FS)VA(CF-64) THEN 15870 +15850 I=FI(FS): HE=FH(FS): IF HE>0 THEN A$=LS$()(HE) +15860 GOSUB 11000: RETURN +15870 FV(FS)=0: FS=FS-1: GOSUB 11000: REM "Clean up the variable field!" +15880 RETURN +15995 REM "********* STOP ********* (handled in loop)" +16000 IF T<>-107 THEN 16200 +16010 RETURN +16195 REM "********* LIST *********" +16200 IF T<>-106 THEN 16400 +16210 GOSUB 11000 +16220 FOR K=1 TO NL +16230 IF LN(K)<>0 THEN PRINT LN(K); LS$()(K) +16240 NEXT +16250 RETURN +16395 REM "********* NEW *********" +16400 IF T<>-105 THEN 16600 +16410 GOSUB 11000 +16420 FOR K=1 TO NL: LN(K)=0: LS$()(K)="": NEXT +16430 RETURN +16595 REM "********* RUN ********* (handled in loop)" +16600 IF T<>-104 THEN 16800 +16610 GOSUB 11000: RETURN +16795 REM "********* REM *********" +16800 IF T<>-100 THEN 17000 +16810 T=0: I=LEN(A$): RETURN +16695 REM "******** LOAD *********" +17000 IF T<>-99 THEN 17200 +17010 GOSUB 11000: PRINT "not implemented": RETURN +17195 REM "******** SAVE *********" +17200 IF T<>-98 THEN 17400 +17210 GOSUB 11000: PRINT "not implemented": RETURN +17395 REM "********* : ***********" +17400 IF T<>":" THEN 17500 +17410 GOSUB 11000: RETURN +17500 IF T=0 THEN RETURN +17510 REM "******** Syntax Error *********" +17520 PRINT "Syntax Error": E=-1: RETURN +19995 RETURN +30000 REM "********* the keyword storage with the token values *************" +30010 DATA 24 +30020 DATA ">=",-121,"<=",-120,"<>",-119 +30030 DATA "print",-118,"let",-117,"input",-116,"goto",-115 +30040 DATA "gosub",-114, "return", -113, "if",-112 +30050 DATA "for", -111, "to", -110, "step", -109, "next", -108 +30060 DATA "stop", -107, "list", -106, "new", -105, "run", -104 +30070 DATA "abs", -103, "rnd", -102, "size", -101, "rem", -100 +30080 DATA "load", -99, "save", -98 + diff --git a/data/examples/00tutorial/trig.bas b/data/examples/00tutorial/trig.bas new file mode 100644 index 0000000000000000000000000000000000000000..28fb1c7e807c81959f539e23ed1091d3b90d451c --- /dev/null +++ b/data/examples/00tutorial/trig.bas @@ -0,0 +1,12 @@ +10 REM "Table of trigonometric functions" +20 REM "" +100 REM "Calculate PI" +110 P1=4*ATAN(1) +200 PRINT "X";: TAB(4) +205 PRINT "SIN(X)";: TAB(7) +210 PRINT "COS(X)";: TAB(7) +215 PRINT "TAN(X)" +220 FOR I=0 TO 89 STEP 5 +230 X=I/360*2*P1 +240 PRINT #4, I, #12, SIN(X), COS(X), TAN(X) +250 NEXT diff --git a/data/examples/01basics/analogrs.bas b/data/examples/01basics/analogrs.bas new file mode 100644 index 0000000000000000000000000000000000000000..7523f1d4c255134fea11f771f20dab98c8bbcb36 --- /dev/null +++ b/data/examples/01basics/analogrs.bas @@ -0,0 +1,8 @@ +10 REM "AnalogReadSerial from Arduino examples" +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 S=AREAD(AZERO) +230 PRINT S +240 DELAY 1 +250 NEXT diff --git a/data/examples/01basics/baremin.bas b/data/examples/01basics/baremin.bas new file mode 100644 index 0000000000000000000000000000000000000000..fba109672fdfdcdb9ed5c96f87ebf732ae258c47 --- /dev/null +++ b/data/examples/01basics/baremin.bas @@ -0,0 +1,5 @@ +10 REM "BareMinimum from Arduino examples" +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +250 NEXT diff --git a/data/examples/01basics/blink.bas b/data/examples/01basics/blink.bas new file mode 100644 index 0000000000000000000000000000000000000000..502ce3adbde82a359d214d22b2eacc4e062dd2c2 --- /dev/null +++ b/data/examples/01basics/blink.bas @@ -0,0 +1,10 @@ +10 REM "Blink from Arduino examples" +100 REM "setup() put your setup code here, to run once:" +110 PINM LED, 1 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 DWRITE LED, 1 +230 DELAY 1000 +240 DWRITE LED, 0 +250 DELAY 1000 +260 NEXT diff --git a/data/examples/01basics/digitrs.bas b/data/examples/01basics/digitrs.bas new file mode 100644 index 0000000000000000000000000000000000000000..89f13725932958bc21048ae2df834b1f65827d36 --- /dev/null +++ b/data/examples/01basics/digitrs.bas @@ -0,0 +1,13 @@ +10 REM "DigitalReadSerial from Arduino examples" +20 P=2 +100 REM "setup() put your setup code here, to run once:" +110 PINM P, 0 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 S=DREAD(P) +230 PRINT S +240 DELAY 1 +220 S=DREAD(P) +230 PRINT S +240 DELAY 1 +250 NEXT diff --git a/data/examples/01basics/fade.bas b/data/examples/01basics/fade.bas new file mode 100644 index 0000000000000000000000000000000000000000..e9beaad7f581926ee989ab936db9cb407acaa0c2 --- /dev/null +++ b/data/examples/01basics/fade.bas @@ -0,0 +1,13 @@ +10 REM "Fade from Arduino examples" +20 L=9 +30 B=0 +40 F=5 +100 REM "setup() put your setup code here, to run once:" +110 PINM L, 1 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 AWRITE L, B +230 B=B+F +240 IF B<=0 OR B>=255 THEN F=-F +250 DELAY 30 +260 NEXT diff --git a/data/examples/01basics/readav1.bas b/data/examples/01basics/readav1.bas new file mode 100644 index 0000000000000000000000000000000000000000..eca2f72dfbf03d8e14e1ced49d21e644d9f597b1 --- /dev/null +++ b/data/examples/01basics/readav1.bas @@ -0,0 +1,8 @@ +10 REM "ReadAnalogVoltage from Arduino examples - float version" +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 S=AREAD(AZERO) +230 V=S*5/1023 +240 PRINT V +250 NEXT diff --git a/data/examples/01basics/readav2.bas b/data/examples/01basics/readav2.bas new file mode 100644 index 0000000000000000000000000000000000000000..db410c94c7ceb178601debc653084e814afd018e --- /dev/null +++ b/data/examples/01basics/readav2.bas @@ -0,0 +1,11 @@ +10 REM "ReadAnalogVoltage from Arduino examples - integer version" +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 S=AREAD(AZERO) +230 V=S*5/1023 +240 PRINT V;"."; +250 S=S-V*1023/5 +260 V=S*50/1023 +270 PRINT V +280 NEXT diff --git a/data/examples/02digital/blinkwod.bas b/data/examples/02digital/blinkwod.bas new file mode 100644 index 0000000000000000000000000000000000000000..95e020910b74b8519fce2464f7251ca8413cc1c1 --- /dev/null +++ b/data/examples/02digital/blinkwod.bas @@ -0,0 +1,12 @@ +10 REM "BlinkWithoutDealy from Arduino examples" +20 L=0 +30 P=0 +40 T=1000 +100 REM "setup() put your setup code here, to run once:" +110 PINM LED, 1 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 C=MILLIS(T) +230 IF C>P THEN P=C : L=(L+1)%2 +240 DWRITE LED, L +250 NEXT diff --git a/data/examples/02digital/button.bas b/data/examples/02digital/button.bas new file mode 100644 index 0000000000000000000000000000000000000000..1d3133b447d409eb053ea6100aa2456d4cc2cc1f --- /dev/null +++ b/data/examples/02digital/button.bas @@ -0,0 +1,12 @@ +10 REM "Button from Arduino examples" +20 B=2 +30 L=LED +40 S=0 +100 REM "setup() put your setup code here, to run once:" +110 PINM L, 1 +120 PINM B, 0 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 S=DREAD(B) +230 IF S=1 THEN DWRITE L, 1 ELSE DWRITE L, 0 +250 NEXT diff --git a/data/examples/02digital/debounce.bas b/data/examples/02digital/debounce.bas new file mode 100644 index 0000000000000000000000000000000000000000..37116e8ddac2d9cc3de10fdddb8b58eda28c00da --- /dev/null +++ b/data/examples/02digital/debounce.bas @@ -0,0 +1,19 @@ +10 REM "debounce from Arduino examples" +11 REM "Using millis with a divisor here" +20 P=2 +30 L=13 +40 L0=1 : B0=0 +50 T=0 : D=50 +100 REM "setup() put your setup code here, to run once:" +110 PINM P, 0 +120 PINM L, 1 +130 DWRITE L, L0 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 R=DREAD(P) +230 IF R<>B0 THEN L0=MILLIS(D) +240 IF MILLIS(D)-L0=0 GOTO 270 +250 IF R<>B0 THEN B0=P +260 IF B0=1 THEN L0=NOT L0 +270 DWRITE L, L0 +280 NEXT diff --git a/data/examples/02digital/digitip.bas b/data/examples/02digital/digitip.bas new file mode 100644 index 0000000000000000000000000000000000000000..a06cfd237e0b171cf6412a6fea12876ea9e6c5b9 --- /dev/null +++ b/data/examples/02digital/digitip.bas @@ -0,0 +1,10 @@ +10 REM "DigitalInputPullup from Arduino examples" +100 REM "setup() put your setup code here, to run once:" +110 PINM 2, 2 +120 PINM LED, 1 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 S=DREAD(2) +230 PRINT S +240 IF S=1 THEN DWRITE LED, 0 ELSE DWRITE LED, 1 +250 NEXT diff --git a/data/examples/02digital/melody.bas b/data/examples/02digital/melody.bas new file mode 100644 index 0000000000000000000000000000000000000000..89b50ff72ee2b8c85a1faf162bad265e63fa0a62 --- /dev/null +++ b/data/examples/02digital/melody.bas @@ -0,0 +1,35 @@ +10 REM "Melody from Arduino examples" +20 REM "Read Notes N0(), tones T(), and durations D()" +30 READ N +40 DIM N0(N) : FOR I=1 TO N : READ N0(I) : NEXT +50 READ N +60 DIM T(N) : FOR I=1 TO N : READ T(I) : NEXT +70 DIM D(N) : FOR I=1 TO N : READ D(I) : NEXT +100 REM "setup() put your setup code here, to run once:" +110 FOR I=1 TO N +120 D=1000/D(I) +130 IF T(I)=0 THEN T=0 ELSE T=N0(T(I)) +140 PLAY 8, T, D +150 DELAY D*13/10 +160 NEXT +170 PLAY 8, 0 +180 END +200 REM "loop() put your main code here, to run repeatedly:" +1000 REM "Pitches of 89 notes" +1010 DATA 89 +1020 DATA 31, 33, 35, 37, 39, 41, 44, 46 +1030 DATA 49, 52, 55, 58, 62, 65, 69, 73 +1040 DATA 78, 82, 87, 93, 98, 104, 110, 117 +1050 DATA 123, 131, 139, 147, 156, 165, 175, 185 +1060 DATA 196, 208, 220, 233, 247, 262, 277, 294 +1070 DATA 311, 330, 349, 370, 392, 415, 440, 466 +1080 DATA 494, 523, 554, 587, 622, 659, 698, 740 +1090 DATA 784, 831, 880, 932, 988, 1047, 1109, 1175 +1100 DATA 1245, 1319, 1397, 1480, 1568, 1661, 1760, 1865 +1110 DATA 1976, 2093, 2217, 2349, 2489, 2637, 2794, 2960 +1120 DATA 3136, 3322, 3520, 3729, 3951, 4186, 4435, 4699 +1130 DATA 4978 +1200 REM "The melody of N notes and durations" +1210 DATA 8 +1220 DATA 37, 32, 32, 34, 32, 0, 36, 37 +1230 DATA 4, 8, 8, 4, 4, 4, 4, 4 diff --git a/data/examples/02digital/melodys.bas b/data/examples/02digital/melodys.bas new file mode 100644 index 0000000000000000000000000000000000000000..78363f4d46d8a640691d199e8a54a80eba709bf9 --- /dev/null +++ b/data/examples/02digital/melodys.bas @@ -0,0 +1,18 @@ +10 REM "Melody from Arduino examples - small version" +20 REM "Read tones T(), and durations D()" +50 READ N +60 DIM T(N) : FOR I=1 TO N : READ T(I) : NEXT +70 DIM D(N) : FOR I=1 TO N : READ D(I) : NEXT +100 REM "setup() put your setup code here, to run once:" +110 FOR I=1 TO N +120 D=1000/D(I) +130 PLAY 8, T(I), D +140 DELAY D*13/10 +150 NEXT +160 PLAY 8, 0, 1 +170 END +200 REM "loop() put your main code here, to run repeatedly:" +1200 REM "The melody of N notes and durations" +1210 DATA 8 +1220 DATA 247, 185, 185, 208, 185, 0, 233, 247 +1230 DATA 4, 8, 8, 4, 4, 4, 4, 4 diff --git a/data/examples/02digital/pitches.bas b/data/examples/02digital/pitches.bas new file mode 100644 index 0000000000000000000000000000000000000000..5ce710e8cf2e1689a2a7f13e3b2a28902c5ea7a0 --- /dev/null +++ b/data/examples/02digital/pitches.bas @@ -0,0 +1,14 @@ +1000 REM "Pitches of 89 notes" +1010 DATA 89 +1020 DATA 31, 33, 35, 37, 39, 41, 44, 46 +1030 DATA 49, 52, 55, 58, 62, 65, 69, 73 +1040 DATA 78, 82, 87, 93, 98, 104, 110, 117 +1050 DATA 123, 131, 139, 147, 156, 165, 175, 185 +1060 DATA 196, 208, 220, 233, 247, 262, 277, 294, +1070 DATA 311, 330, 349, 370, 392, 415, 440, 466, +1080 DATA 494, 523, 554, 587, 622, 659, 698, 740, +1090 DATA 784, 831, 880, 932, 988, 1047, 1109, 1175, +1100 DATA 1245, 1319, 1397, 1480, 1568, 1661, 1760, 1865, +1110 DATA 1976, 2093, 2217, 2349, 2489, 2637, 2794, 2960 +1120 DATA 3136, 3322, 3520, 3729, 3951, 4186, 4435, 4699, +1130 DATA 4978 \ No newline at end of file diff --git a/data/examples/02digital/statecd.bas b/data/examples/02digital/statecd.bas new file mode 100644 index 0000000000000000000000000000000000000000..e687975bb435f4ee3941e377ba132b7a5bdb34f5 --- /dev/null +++ b/data/examples/02digital/statecd.bas @@ -0,0 +1,21 @@ +10 REM "StateChangeDetection from Arduino examples" +20 B=2 +30 L=LED +40 S=0 +50 T=0 +60 C=0 +100 REM "setup() put your setup code here, to run once:" +110 PINM B, 0 +120 PINM L, 1 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 S=DREAD(B) +230 IF S=T THEN 270 +240 IF S=0 THEN PRINT "off" : GOTO 270 +250 C=C+1 +260 PRINT "on" +270 PRINT "number of button pushes: ", C +280 DELAY 50 +290 T=S +300 IF C%4=0 THEN DWRITE L, 1 ELSE DWRITE L, 0 +310 NEXT diff --git a/data/examples/02digital/tonepf.bas b/data/examples/02digital/tonepf.bas new file mode 100644 index 0000000000000000000000000000000000000000..a5ad5c50ef547e3c34d4756d934818139223bdb1 --- /dev/null +++ b/data/examples/02digital/tonepf.bas @@ -0,0 +1,9 @@ +10 REM "tonePitchFollower from Arduino examples" +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 S=AREAD(AZERO) +230 T=MAP(S, 400, 1000, 120, 1500) +240 PLAY 9, T, 10 +250 DELAY 1 +260 NEXT diff --git a/data/examples/03analog/analogin.bas b/data/examples/03analog/analogin.bas new file mode 100644 index 0000000000000000000000000000000000000000..ceaa67526c3aed5cc81e74e51ec862c1c0f7a6ff --- /dev/null +++ b/data/examples/03analog/analogin.bas @@ -0,0 +1,14 @@ +10 REM "AnalogInput from Arduino examples" +20 REM "S is the analog sensor input, L the LED pin" +30 S=AZERO +40 L=13 +50 V=0 +100 REM "setup() put your setup code here, to run once:" +110 PINM L, 1 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 V=AREAD(S) +230 DWRITE L, 1 +240 DELAY V +250 DWRITE L, 0 +260 NEXT diff --git a/data/examples/03analog/analogios.bas b/data/examples/03analog/analogios.bas new file mode 100644 index 0000000000000000000000000000000000000000..533d1728914ece44c1990fff3abaa637490c3d90 --- /dev/null +++ b/data/examples/03analog/analogios.bas @@ -0,0 +1,15 @@ +10 REM "AnalogInOutSerial from Arduino examples" +20 REM "A is the analog pin, L the LED pin" +30 A=AZERO +40 L=9 +50 S=0 +60 O=0 +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 S=AREAD(A) +230 O=MAP(S, 0, 1023, 0, 255) +240 AWRITE L, O +250 PRINT "sensor = ", S, "output = ", O +260 DELAY 2 +270 NEXT diff --git a/data/examples/03analog/analogwm.bas b/data/examples/03analog/analogwm.bas new file mode 100644 index 0000000000000000000000000000000000000000..fd69d7bf103a2d5c8d82af3117073423941e3565 --- /dev/null +++ b/data/examples/03analog/analogwm.bas @@ -0,0 +1,22 @@ +10 REM "AnalogWriteMega from Arduino examples" +20 REM "L is the lowest LED pin, H the highest" +30 L=2 +40 H=13 +100 REM "setup() put your setup code here, to run once:" +120 FOR T=L TO H +130 PINM T, 1 +140 NEXT +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 FOR T=L TO H +230 FOR B=0 TO 254 +240 AWRITE T, B +250 DELAY 2 +260 NEXT +270 FOR B=255 TO 0 STEP -1 +280 AWRITE T, B +290 DELAY 2 +300 NEXT +310 DELAY 100 +320 NEXT +330 NEXT diff --git a/data/examples/03analog/calib.bas b/data/examples/03analog/calib.bas new file mode 100644 index 0000000000000000000000000000000000000000..ab82c49046c80b50d5af908bc9a31b5bd70855f7 --- /dev/null +++ b/data/examples/03analog/calib.bas @@ -0,0 +1,26 @@ +10 REM "Calibration from Arduino examples" +20 REM "S is Sensor pin, L is the LED pin" +30 REM "M is the minimum, N is the maximum" +40 S=AZERO +50 L=9 +60 V=0 +70 M=1023 +80 N=0 +90 T=MILLIS(1000) +100 REM "setup() put your setup code here, to run once:" +110 PINM LED, 1 +120 DWRITE LED, 1 +130 IF MILLIS(1000)-T>5 GOTO 190 +140 V=AREAD(S) +150 IF V>M THEN N=V +160 IF VN THEN V=N +240 IF V10 THEN J=1 +270 A=T/N +280 PRINT A +290 DELAY 1 +300 NEXT diff --git a/data/examples/04communication/dimmer.bas b/data/examples/04communication/dimmer.bas new file mode 100644 index 0000000000000000000000000000000000000000..1d6408331c86a19726cd842b0544be19dd7aa34d --- /dev/null +++ b/data/examples/04communication/dimmer.bas @@ -0,0 +1,9 @@ +10 REM "Dimmer from Arduino examples" +20 REL "L is the LED pin" +30 L=9 +100 REM "setup() put your setup code here, to run once:" +110 PINM L, 1 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 IF AVAIL(1) THEN GET B : AWRITE L, B +230 NEXT diff --git a/data/examples/04communication/graph.bas b/data/examples/04communication/graph.bas new file mode 100644 index 0000000000000000000000000000000000000000..1fca6d1595870c2d7d085ab2a4e4a48a94764f64 --- /dev/null +++ b/data/examples/04communication/graph.bas @@ -0,0 +1,7 @@ +10 REM "Graph from Arduino examples" +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 PRINT AREAD(AZERO) +230 DELAY 2 +250 NEXT diff --git a/data/examples/04communication/midi.bas b/data/examples/04communication/midi.bas new file mode 100644 index 0000000000000000000000000000000000000000..938e814b547bd1ec96d57929945e29e3d50b8862 --- /dev/null +++ b/data/examples/04communication/midi.bas @@ -0,0 +1,16 @@ +10 REM "Midi from Arduino examples" +20 REM "Second serial with midi baudrate 31250" +30 REM "&4 is the second serial port" +40 SET 8, 31250 +50 C=144 +60 V=69 +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 FOR N=30 TO 90 +230 PUT &4, C, N, V +240 DELAY 100 +250 PUT &4, C, N, 0 +260 DELAY 100 +270 NEXT +280 NEXT diff --git a/data/examples/04communication/multiser.bas b/data/examples/04communication/multiser.bas new file mode 100644 index 0000000000000000000000000000000000000000..e564eff0fd2412db5752dc35441c1c2bdea5a812 --- /dev/null +++ b/data/examples/04communication/multiser.bas @@ -0,0 +1,9 @@ +10 REM "MultiSerial from Arduino examples" +20 REM "BASIC needs to be compiled with ARDUINOPRT" +30 REM "and HASIOT for this program to work" +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 IF AVAIL(1) GET C : PUT &4, C +230 IF AVAIL(4) GET &4, C : PUT C +240 NEXT diff --git a/data/examples/04communication/physpix.bas b/data/examples/04communication/physpix.bas new file mode 100644 index 0000000000000000000000000000000000000000..edbdc68a63b770ba6bed264d4f9c97396a7e839e --- /dev/null +++ b/data/examples/04communication/physpix.bas @@ -0,0 +1,12 @@ +10 REM "PhysicalPixel from Arduino examples" +20 REM "Uses the buildin LED, needs HASIOT" +30 L=LED +100 REM "setup() put your setup code here, to run once:" +110 PINM L, 1 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 IF AVAIL(1)=0 GOTO 250 +230 GET C +240 IF C="H" DWRITE L, 1 +250 IF C="L" DWRITE L, 0 +250 NEXT diff --git a/data/examples/04communication/sercs.bas b/data/examples/04communication/sercs.bas new file mode 100644 index 0000000000000000000000000000000000000000..10a983ee6a923d07443ea138dcdc489e703056c1 --- /dev/null +++ b/data/examples/04communication/sercs.bas @@ -0,0 +1,22 @@ +10 REM "SerialCallResponse from Arduino examples" +20 REM "First, second and third sensor = 0" +30 F=0 +40 S=0 +50 T=0 +60 B=0 +100 REM "setup() put your setup code here, to run once:" +110 PINM 2, 0 +120 IF AVAIL(1)>0 GOTO 200 +130 PRINT "A"; +140 DELAY 300 +150 GOTO 120 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 IF AVAIL(1)<=0 GOTO 290 +230 GET B +240 F=AREAD(AZERO)/4 +250 DELAY 10 +260 S=AREAD(AZERO)/4 +270 T=MAP(DREAD(2), 0, 1, 0, 255) +280 PUT F, S, T +290 NEXT diff --git a/data/examples/04communication/sercsa.bas b/data/examples/04communication/sercsa.bas new file mode 100644 index 0000000000000000000000000000000000000000..8a1067c07faed445fe7c1a835996d0c48fa97010 --- /dev/null +++ b/data/examples/04communication/sercsa.bas @@ -0,0 +1,22 @@ +10 REM "SerialCallResponseASCII from Arduino examples" +20 REM "First, second and third sensor = 0" +30 F=0 +40 S=0 +50 T=0 +60 B=0 +100 REM "setup() put your setup code here, to run once:" +110 PINM 2, 0 +120 IF AVAIL(1)>0 GOTO 200 +130 PRINT 0, 0, 0 +140 DELAY 300 +150 GOTO 120 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 IF AVAIL(1)<=0 GOTO 290 +230 GET B +240 F=AREAD(AZERO)/4 +250 DELAY 10 +260 S=AREAD(AZERO)/4 +270 T=MAP(DREAD(2), 0, 1, 0, 255) +280 PRINT F, "," S ,",", T +290 NEXT diff --git a/data/examples/04communication/virtcm.bas b/data/examples/04communication/virtcm.bas new file mode 100644 index 0000000000000000000000000000000000000000..e34757a5321272c09c851ce11732452182642c70 --- /dev/null +++ b/data/examples/04communication/virtcm.bas @@ -0,0 +1,9 @@ +10 REM "VirtualColorMixer from Arduino examples" +20 R=AZERO +30 G=AZERO+1 +40 B=AZERO+2 +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 PRINT AREAD(R), ",", AREAD(G), ",", AREAD(B) +250 NEXT diff --git a/data/examples/05control/arrays.bas b/data/examples/05control/arrays.bas new file mode 100644 index 0000000000000000000000000000000000000000..cbaa9a2577e7d9f56f16f89340e980bcaaf60d81 --- /dev/null +++ b/data/examples/05control/arrays.bas @@ -0,0 +1,23 @@ +10 REM "Arrays from Arduino examples" +20 T=100 +30 N=6 +40 DIM L(N) +50 FOR J=1 to N: READ L(J): NEXT +60 DATA 2, 7, 4, 6, 5, 3 +100 REM "setup() put your setup code here, to run once:" +110 FOR J=1 to N +120 PINM L(J), 1 +130 NEXT +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 FOR J=1 TO N +230 DWRITE L(J), 1 +240 DELAY T +250 DWRITE L(J), 0 +260 NEXT +270 FOR J=N TO 1 STEP -1 +280 DWRITE L(J), 1 +290 DELAY T +300 DWRITE L(J), 0 +310 NEXT +320 NEXT diff --git a/data/examples/05control/forloop.bas b/data/examples/05control/forloop.bas new file mode 100644 index 0000000000000000000000000000000000000000..c7a11e3f36371c63785945064430afdb847c4ac5 --- /dev/null +++ b/data/examples/05control/forloop.bas @@ -0,0 +1,19 @@ +10 REM "ForLoopIterations from Arduino examples" +20 T=100 +100 REM "setup() put your setup code here, to run once:" +110 FOR P=2 TO 7 +120 PINM P, 1 +130 NEXT +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 FOR P=2 TO 7 +230 DWRITE P, 1 +240 DELAY 100 +250 DWRITE P, 0 +260 NEXT +270 FOR P=7 TO 2 STEP -1 +280 DWRITE P, 1 +290 DELAY 100 +300 DWRITE P, 0 +310 NEXT +320 NEXT diff --git a/data/examples/05control/ifstatc.bas b/data/examples/05control/ifstatc.bas new file mode 100644 index 0000000000000000000000000000000000000000..17d03c2858b038df447c27196dcda126aa8430de --- /dev/null +++ b/data/examples/05control/ifstatc.bas @@ -0,0 +1,14 @@ +10 REM "IfStatementConditional from Arduino examples" +20 REM "A analog pin, led pin, threshold" +30 A=AZERO +40 L=13 +50 T=400 +100 REM "setup() put your setup code here, to run once:" +110 PINM L, 1 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 V=AREAD(A) +230 IF V>T THEN DWRITE L, 1 ELSE DWRITE L, 0 +240 PRINT V +250 DELAY 1 +260 NEXT diff --git a/data/examples/05control/switch.bas b/data/examples/05control/switch.bas new file mode 100644 index 0000000000000000000000000000000000000000..e7848856c27b78b8c67d296121315eb56cdd345e --- /dev/null +++ b/data/examples/05control/switch.bas @@ -0,0 +1,20 @@ +10 REM "Switch from Arduino examples" +20 REM "N is sensor minimum, M maximum" +30 N=0 +40 M=600 +100 REM "setup() put your setup code here, to run once:" +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 V=AREAD(AZERO) +230 R=MAP(V, N, M, 1, 4) +240 ON R GOSUB 300, 320, 340, 360 +250 DELAY 1 +260 NEXT +300 PRINT "DARK" +310 RETURN +320 PRINT "DIM" +330 RETURN +340 PRINT "MEDIUM" +350 RETURN +360 PRINT "BRIGHT" +370 RETURN diff --git a/data/examples/05control/switch2.bas b/data/examples/05control/switch2.bas new file mode 100644 index 0000000000000000000000000000000000000000..e4469e4e60b7ede3d9b7dafa0d2c520196ebed2b --- /dev/null +++ b/data/examples/05control/switch2.bas @@ -0,0 +1,22 @@ +10 REM "Switch2 from Arduino examples" +20 REM "" +100 REM "setup() put your setup code here, to run once:" +110 FOR T=1 TO 6 : PINM T, 1 : NEXT +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 IF AVAIL(1)=0 GOTO 220 +230 GET C +240 C=C-"a"+1 +250 ON C GOTO 300, 320, 340, 360, 380 +260 FOR T=1 TO 6 : DWRITE T, 1 : NEXT +270 GOTO 400 +300 DWRITE 2, 1 +310 GOTO 400 +320 DWRITE 3, 1 +330 GOTO 400 +340 DWRITE 4, 1 +350 GOTO 400 +360 DWRITE 5, 1 +370 GOTO 400 +380 DWRITE 6, 1 +400 NEXT diff --git a/data/examples/05control/whilest.bas b/data/examples/05control/whilest.bas new file mode 100644 index 0000000000000000000000000000000000000000..ef6c12ee2846566137302551e7312c2ec9d9726b --- /dev/null +++ b/data/examples/05control/whilest.bas @@ -0,0 +1,29 @@ +10 REM "WhileStatementConditional from Arduino examples" +20 REM "P sensor pin, L led, K indicator, B button" +30 P=AZERO +40 L=9 +50 K=13 +60 B=2 +70 N=1023 +80 M=0 +90 V=0 +100 REM "setup() put your setup code here, to run once:" +110 PINM K, 1 +120 PINM L, 1 +130 PINM B, 0 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 IF DREAD(B)=1 THEN GOSUB 300 : GOTO 220 +230 DWRITE K, 0 +240 V=AREAD(P) +250 V=MAP(V, N, M, 0, 255) +260 IF V>255 V=255 +270 IF V<0 V=0 +280 AWRITE L, V +290 NEXT +300 REM Calibration +310 DWRITE K, 1 +320 V=AREAD(P) +330 IF V>M M=V +340 IF V="0")AND(X<="9") +35 DEF FNA(X)=((X>="A")AND(X<="X"))OR((X>="a")AND(X<="x")) +40 DEF FNC(X)=(X>31 AND X<127) +45 DEF FNX(X)=(X<32) +50 DEF FNW(C)=(X=32 OR X=9) +55 DEF FNU(X)=((X>="A")AND(X<="Z")) +60 DEF FNL(X)=((X>="a")AND(X<="z")) +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 IF NOT AVAIL(1) GOTO 400 +230 GET C +240 PRINT "You sent me: '"; +250 PUT C +260 PRINT "' ASCII Value'", C +270 IF FNN(C) OR FNA(C) THEN PRINT "it's alphanumeric" +280 IF FNA(C) THEN PRINT "it's alphabetic" +290 IF FNC(C) THEN PRINT "it's ASCII" +300 IF FNW(C) THEN PRINT "it's whitespace" +310 IF FNX(C) THEN PRINT "it's a control character" +320 IF FNN(C) THEN PRINT "it's a numeric digit" +330 IF FNA(C) AND NOT FNW(C) THEN PRINT "it's printable and not whitespace" +340 IF FNL(C) THEN PRINT "it's lowercase" +350 IF FNU(C) THEN PRINT "it's uppercase" +400 NEXT diff --git a/data/examples/08strings/stradd.bas b/data/examples/08strings/stradd.bas new file mode 100644 index 0000000000000000000000000000000000000000..5eea8502d530495a4849c13557318e258c272d28 --- /dev/null +++ b/data/examples/08strings/stradd.bas @@ -0,0 +1,26 @@ +10 REM "StringAdditionOperator from Arduino examples" +20 REM "" +30 DIM A$(64), B$(64), C$(64) +100 REM "setup() put your setup code here, to run once:" +110 A$="You added " +120 B$="this string" +130 PRINT: PRINT +140 PRINT "Adding strings together (concatenation):" +150 PRINT +160 C$=A$ : C$(LEN(C$)+1)=STR(123) +170 PRINT C$ +180 C$=A$ : C$(LEN(C$)+1)=STR(12345) +190 PRINT C$ +200 C$=A$ : C$(LEN(C$)+1)="A" +210 PRINT C$ +220 C$=A$ : C$(LEN(C$)+1)="abc" +230 PRINT C$ +220 C$=A$ : C$(LEN(C$)+1)=B$ +230 PRINT C$ +240 V=AREAD(AZERO) +250 A$="Sensor value: " +260 C$=A$ : C$(LEN(C$)+1)=STR(V) +270 PRINT C$ +280 C$=A$ : C$(LEN(C$)+1)=STR(MILLIS(1)) +290 PRINT C$ +300 END diff --git a/data/examples/08strings/strapp.bas b/data/examples/08strings/strapp.bas new file mode 100644 index 0000000000000000000000000000000000000000..cf593310fd729d4cd5f7ec02040e41cf023494e2 --- /dev/null +++ b/data/examples/08strings/strapp.bas @@ -0,0 +1,21 @@ +10 REM "StringAppendOperator from Arduino examples" +20 DIM A$(80), B$(80) +100 REM "setup() put your setup code here, to run once:" +110 A$="Sensor " +120 B$="value" +130 PRINT: PRINT: PRINT "Appending to a String:" +140 PRINT +150 PRINT A$ +160 A$(LEN(A$)+1)=B$ +170 PRINT A$ +180 A$(LEN(A$)+1)=" for input " +190 PRINT A$ +200 A$(LEN(A$)+1)="A" +210 PRINT A$ +220 A$(LEN(A$)+1)=STR(0) +230 PRINT A$ +240 A$(LEN(A$)+1)=": " +250 PRINT A$ +260 A$(LEN(A$)+1)=STR(AREAD(AZERO)) +270 PRINT A$ + diff --git a/data/examples/08strings/strcase.bas b/data/examples/08strings/strcase.bas new file mode 100644 index 0000000000000000000000000000000000000000..23ff3f79420da812e53e37c8cc1a9a18215b77a5 --- /dev/null +++ b/data/examples/08strings/strcase.bas @@ -0,0 +1,15 @@ +10 REM "StringCaseChange from Arduino examples" +20 DIM A$(80), B$(80) +30 DEF FNU(X)=((X>="A")AND(X<="Z")) +40 DEF FNL(X)=((X>="a")AND(X<="z")) +100 REM "setup() put your setup code here, to run once:" +110 A$="" +120 FOR I=1 TO LEN(A$) +130 IF FNL(A$(I)) THEN B$(I)=(A$(I,I)-32) ELSE B$(I)=A$(I,I) +140 NEXT I +150 PRINT B$ +160 A$="" +170 FOR I=1 TO LEN(A$) +180 IF FNU(A$(I)) THEN B$(I)=(A$(I,I)+32) ELSE B$(I)=A$(I,I) +190 NEXT I +200 PRINT B$ diff --git a/data/examples/08strings/strchar.bas b/data/examples/08strings/strchar.bas new file mode 100644 index 0000000000000000000000000000000000000000..bb9d4a4ed8c2e90315a8efa6e78ef3be47f308dc --- /dev/null +++ b/data/examples/08strings/strchar.bas @@ -0,0 +1,13 @@ +10 REM "StringCharacter from Arduino examples" +20 DIM A$(80), B$(80) +100 REM "setup() put your setup code here, to run once:" +110 PRINT: PRINT +120 PRINT "String character manipultions:" +130 A$="SensorReading: 456" +140 B$=A$(16, 16) +150 PRINT "The most significant digit is", B$ +160 PRINT +170 B$=A$(1, 13) +180 B$(14)="=" +190 B$(15)=A$(15) +200 PRINT B$ diff --git a/data/examples/11stefans/array2d.bas b/data/examples/11stefans/array2d.bas new file mode 100644 index 0000000000000000000000000000000000000000..22cf3d314199adf60b3cbbcb42405af85a8a1eff --- /dev/null +++ b/data/examples/11stefans/array2d.bas @@ -0,0 +1,24 @@ +10 DIM B(10,10),C(8,8) +20 FOR I=1 TO 10 +30 FOR J=1 TO 10 +40 B(I,J)=12*I+J +50 NEXT +60 NEXT +100 FOR I=1 TO 8 +110 FOR J=1 TO 8 +120 C(I,J)=B(J,I) +130 NEXT +140 NEXT +200 FOR I=1 TO 8 +210 FOR J=1 TO 8 +220 PRINT C(I,J),B(J,I) +230 NEXT +240 NEXT +250 FOR I=1 TO 10 +260 FOR J=1 TO 10 +270 IF B(I,J)<>12*I+J THEN PRINT "fail": BREAK +280 NEXT +290 NEXT +300 FOR I=1 TO 10 +310 PRINT B(I),B(I,1) +320 NEXT diff --git a/data/examples/11stefans/bench.bas b/data/examples/11stefans/bench.bas new file mode 100644 index 0000000000000000000000000000000000000000..4d3ee5634ba951f73d2d4e9be2dde2f9e6bd5a54 --- /dev/null +++ b/data/examples/11stefans/bench.bas @@ -0,0 +1,3 @@ +10 REM "The quick and dirty performance test" +20 T=MILLIS(1): FOR I=1 TO 10000: A=5: NEXT: PRINT MILLIS(1)-T + diff --git a/data/examples/11stefans/bench.txt b/data/examples/11stefans/bench.txt new file mode 100644 index 0000000000000000000000000000000000000000..2beb8db530f864b0b5393c41b43682aaf8bedca9 --- /dev/null +++ b/data/examples/11stefans/bench.txt @@ -0,0 +1,45 @@ +Oneline tests running: +10 T=MILLIS(1): FOR I=1 TO 10000: A=5: NEXT: PRINT MILLIS(1)-T + +Explanation: + +In this loop the interpreter processes the following per iteration: +5 token reads (VARIABLE A, =, NUMBER 5, :, NEXT) +2 heap searches (for A and I) +1 assignment +6+numsize byte reads +As a rough over the thumb estimate 50% of the runtime goes into +the two heap searches and 50% in token and byte read operations. +This may vary a lot. + + +Times in milliseconds + +Floating point results (BASICFULL, LONG NAMES, NO NETWORK): + +Boardtype ms loops/ms +Arduino GIGA: 82 117 +TTGO ESP32: 258 39 +WROOM ESP32: 371 27 +Rasp RP2040: 588 17 +Arduino DUE: 589 17 +Wifi R4: 629 16 +ESP8266: 1178 8 +XMC1100: 1442 7 +MEGA256: 2198 5 + +BASIC can do between 5 and 117 loops per millisecond. The typical +timescale for one loop of 32bit boards is 20 microseconds. +Everything in this range can be done with BASIC. + +Integer results (BASICSIMPLE, SHORT NAMES): +UNO R3: 1800 5.5. +LEONARDO: 1574 6.3 (Tinybasic, static vars) + + +Floating point results (BASICFULL, LONG NAMES, NO NETWORK, 64bit FLOAT): +Arduino GIGA: 85 +ESP8266: 1479 + +The GIGA board has a double precision hardware FPU and can do process +the additions and compares of the loop as fast as with 32 bits. diff --git a/data/examples/11stefans/creative.bas b/data/examples/11stefans/creative.bas new file mode 100644 index 0000000000000000000000000000000000000000..1904e7b0cb36d783482e822006b5c4069c20b37c --- /dev/null +++ b/data/examples/11stefans/creative.bas @@ -0,0 +1,16 @@ +10 REM "The Creative Computing Benchmark 1977" +15 T=MILLIS (1) +20 FOR N=1 TO 100:A=N +30 FOR I=1 TO 10 +40 A=SQR (A):R=R+RND (1) +50 NEXT I +60 FOR I=1 TO 10 +70 A=A*A:R=R+RND (1) +80 NEXT I +90 S=S+A:NEXT N +100 PRINT "Accuracy:", ABS (1010-S/5) +110 PRINT "Random:", ABS (1000-R) +120 T=MILLIS (1)-T +130 PRINT "Expired time:",T, "ms" +140 PRINT "An Apple 2 needed 120000 ms for this" + diff --git a/data/examples/11stefans/cubes.bas b/data/examples/11stefans/cubes.bas new file mode 100644 index 0000000000000000000000000000000000000000..412f9bd69de565f425d731d2a6c789e46796244e --- /dev/null +++ b/data/examples/11stefans/cubes.bas @@ -0,0 +1,8 @@ +1000 REM "Look into three cubes" +1010 DEF FNTC(I)=I^3+(I+1)^3+(I+2)^3 +2000 FOR N=1 TO 150 +2010 F=FNTC(N) +2020 D=INT(SQR(F)) +2030 D2=D^2 +2040 PRINT N,F,D2,F-D2 +2050 NEXT diff --git a/data/examples/11stefans/energie.bas b/data/examples/11stefans/energie.bas new file mode 100644 index 0000000000000000000000000000000000000000..b2f319ecf59847b1c381fa1f0887bc8f5b676c08 --- /dev/null +++ b/data/examples/11stefans/energie.bas @@ -0,0 +1,75 @@ +10 REM "Microsoft Mode" +20 SET 22, "Microsoft" +1000 REM "Energierechner - Berechnet die Rendite eine Solaranlage" +1010 REM "Einspeisevergütung 10kWp und 40 kWp" +1020 DATA 7.94, 6.88 +1030 REM "Laufzeit der Förderung in Jahren"" +1040 DATA 20 +1050 REM "Wartungskosten über 20 Jahre in Prozent" +1060 DATA 15 +1070 REM "Inflation und Preissteigerung Stromkosten" +1080 DATA 4 +1090 REM "Restwert der Anlage nach Laufzeit" +1100 DATA 80 +2000 INPUT "kWp Leitung der Anlage: ",KW +2010 INPUT "Erwartete Jahresleistung (kWh): ",EA +2020 INPUT "Eigenverbrauch pro Jahr (kWh): ",VE +2030 INPUT "Strompreis (in Cent): ", PS +2040 INPUT "Preis der Anlage: ", PA +3000 PRINT "*** Grunddaten ***" +3010 READ V1, V2, LZ, WK +3015 DIM PI(LZ), VI(LZ) +3020 PRINT "<10kWp",V1,">10 kWp",V2 +3030 IF KW>40 THEN PRINT "Berechnung nur für <40kWp": END +3040 IF KW>10 THEN V=(V1*10+V2*(KW-10))/KW ELSE V=V1 +3050 PRINT "Verguetung für Gesamtleistung:",V +3060 PRINT +3100 PRINT "*** Kosten der Anlage und Strompreis ***" +3110 PRINT "****** Simulation ohne Inflation *******" +3120 GK=PA*(1+WK/100) +3125 PRINT "Wartungskosten:";TAB(34);#8;GK-PA +3130 PRINT "Gesamtkosten inkl Wartung:";TAB(34);#8;GK +3160 PRINT "Kosten Stromversorger pro Jahr:";TAB(34);#8;PS/100*VE +3170 PRINT "Kosten Stromversorger Laufzeit:";TAB(34);#8;PS/100*VE*LZ +3200 PRINT "*** Einspeisevergütung ***" +3210 PRINT "Einspeisung pro Jahr:";TAB(32);#8;EA-VE +3220 VJ=INT((EA-VE)*V/100) +3230 PRINT "Verguetung pro Jahr:";TAB(32);#8;VJ +3240 VG=VJ*LZ +3250 PRINT "Verguetung ueber Laufzeit: ";TAB(32);#8;VG +3260 PRINT "Eingesparte Stromkosten: ";TAB(32);#8;PS/100*VE*LZ +3270 PRINT "Ertraege und Einsparungen:";TAB(32);#8;VG+PS/100*VE*LZ +3380 PRINT "Gesamkosten:";TAB(32);#8;GK +3390 PRINT "Einsparung:";TAB(32);#8;VG+PS/100*VE*LZ-GK +3393 R0=POW((VG+PS/100*VE*LZ)/GK,1/LZ)-1 +3397 PRINT "Rendite ohne Inflation:", R0*100 +3400 PRINT "****** Simulation mit Inflation *******" +3410 READ SI +3420 PRINT "Preissteigerung Strom", SI, "Prozent" +3430 PI(1)=PS +3440 FOR J=2 TO LZ: PI(J)=PI(J-1)*(1+SI/100): NEXT +3450 VI(1)=PS/100*VE +3460 FOR J=2 TO LZ: VI(J)=VI(J-1)*(1+SI/100): NEXT +3470 PRINT "Jahr Preis Kosten" +3480 FOR J=1 TO LZ +3490 PRINT #6, J, INT(PI(J)), INT(VI(J)) +3500 NEXT +3510 GI=0: FOR J=1 TO LZ: GI=VI(J)+GI: NEXT: GI=INT(GI) +3520 PRINT "Stromkosten mit Inflation:";TAB(32);#8; GI +3550 PRINT "Verguetung ueber Laufzeit: ";TAB(32);#8; VG +3560 PRINT "Eingesparte Stromkosten: ";TAB(32);#8; GI +3570 PRINT "Ertraege und Einsparungen:";TAB(32);#8; VG+GI +3580 PRINT "Gesamkosten:";TAB(32);#8;GK +3590 PRINT "Einsparung:";TAB(32);#8;VG+GI-GK +3600 RE=POW((VG+GI)/GK,1/LZ)-1 +3610 PRINT "Rendite:",RE*100 +3700 PRINT "****** Simulation mit Restwert *******" +3710 READ RW +3715 PRINT "Restwert der Anlage in Prozent:";TAB(32),#8;RW +3720 GR=PA*RW/100 +3730 PRINT "Restwert der Anlage:";TAB(32),#8;GR +3740 RR=POW((VG+GI)/(GK-GR),1/LZ)-1 +3750 PRINT "Rendite nach Restwert:",RR*100 + + + diff --git a/data/examples/11stefans/gbench.bas b/data/examples/11stefans/gbench.bas new file mode 100644 index 0000000000000000000000000000000000000000..057a5067e16e67451daa8e448a1ce687163d927a --- /dev/null +++ b/data/examples/11stefans/gbench.bas @@ -0,0 +1,7 @@ +5 REM "Draw 100 rectangles" +10 T=MILLIS(1) +20 FOR I=1 TO 100 +30 FRECT RND(200),RND(200),RND(200),RND(200) +40 COLOR RND(15) +50 NEXT +60 PRINT MILLIS(1)-T diff --git a/data/examples/11stefans/rfbench.txt b/data/examples/11stefans/rfbench.txt new file mode 100644 index 0000000000000000000000000000000000000000..8edc5df8de8528788aca3d90808e23e4178b6184 --- /dev/null +++ b/data/examples/11stefans/rfbench.txt @@ -0,0 +1,65 @@ +Arduino MEGA (float): +Test1 97 1552 +Test2 345 5520 +Test3 718 11488 +Test4 729 11664 +Test5 848 13568 +Test6 3103 24320 +Test7 2530 40480 +Test8 159 2544 + +Arduino UNO (int): +Test1 61 976 +Test2 242 3872 +Test3 504 8064 +Test4 493 7888 +Test5 577 9232 +Test6 1009 16149 +Test7 1777 28432 + +ESP8266 (float): +Test1 38 +Test2 161 +Test3 276 +Test4 282 +Test5 348 +Test6 620 +Test7 1230 +Test8 75 +Creative 557 + +ESP32 (float, with network): +Test1 28 +Test2 119 +Test3 178 +Test4 180 +Test5 229 +Test6 420 +Test7 720 +Test8 30 +Creative 314 + +ESP32 (float, without network): +Test1 20 +Test2 84 +Test3 133 +Test4 133 +Test5 174 +Test6 317 +Test7 542 +Test8 23 +Creative 240 + +DOSbox 3000 cycles +Test1 220 +Test2 710 +Test3 1320 +Test4 1370 +Test5 1590 +Test6 2960 +Test7 5100 +Test8 220 +Creative 2420 + + + diff --git a/data/examples/11stefans/rfbench1.bas b/data/examples/11stefans/rfbench1.bas new file mode 100644 index 0000000000000000000000000000000000000000..ea03cfa4cf182ee9c779f3c2bb6751ed1fb04cf8 --- /dev/null +++ b/data/examples/11stefans/rfbench1.bas @@ -0,0 +1,7 @@ +300 T=MILLIS(1) +400 FOR K=1 TO 1000 +500 NEXT K +700 PRINT MILLIS(1)-T, "ms" +705 PRINT "Apple Soft BASIC: 1300 ms" +710 PRINT "Apple Integer BASIC: 1300 ms" +800 END diff --git a/data/examples/11stefans/rfbench2.bas b/data/examples/11stefans/rfbench2.bas new file mode 100644 index 0000000000000000000000000000000000000000..4263845ead7f04ab7748cf94c2010c0011903e33 --- /dev/null +++ b/data/examples/11stefans/rfbench2.bas @@ -0,0 +1,8 @@ +300 T=MILLIS(1) +400 K=0 +500 K=K+1 +600 IF K<1000 THEN 500 +700 PRINT MILLIS(1)-T, "ms" +705 PRINT "Apple Soft BASIC: 8500 ms" +710 PRINT "Apple Integer BASIC: 3100 ms" +800 END diff --git a/data/examples/11stefans/rfbench3.bas b/data/examples/11stefans/rfbench3.bas new file mode 100644 index 0000000000000000000000000000000000000000..02d1e280f857faef9f4e3f62178a656515c867c9 --- /dev/null +++ b/data/examples/11stefans/rfbench3.bas @@ -0,0 +1,9 @@ +300 T=MILLIS(1) +400 K=0 +500 K=K+1 +510 LET A=K/K*K+K-K +600 IF K<1000 THEN 500 +700 PRINT MILLIS(1)-T, "ms" +705 PRINT "Apple Soft BASIC: 16000 ms" +710 PRINT "Apple Integer BASIC: 7200 ms" +800 END diff --git a/data/examples/11stefans/rfbench4.bas b/data/examples/11stefans/rfbench4.bas new file mode 100644 index 0000000000000000000000000000000000000000..59acdea4c3e6fffdcb54c0a7f29815abf1f68060 --- /dev/null +++ b/data/examples/11stefans/rfbench4.bas @@ -0,0 +1,9 @@ +300 T=MILLIS(1) +400 K=0 +500 K=K+1 +510 LET A=K/2*3+4-5 +600 IF K<1000 THEN 500 +700 PRINT MILLIS(1)-T, "ms" +705 PRINT "Apple Soft BASIC: 17800 ms" +710 PRINT "Apple Integer BASIC: 7200 ms" +800 END diff --git a/data/examples/11stefans/rfbench5.bas b/data/examples/11stefans/rfbench5.bas new file mode 100644 index 0000000000000000000000000000000000000000..e38f607271c8fa23ee568950f11d7c40384e82d7 --- /dev/null +++ b/data/examples/11stefans/rfbench5.bas @@ -0,0 +1,11 @@ +300 T=MILLIS(1) +400 K=0 +500 K=K+1 +510 LET A=K/2*3+4-5 +520 GOSUB 820 +600 IF K<1000 THEN 500 +700 PRINT MILLIS(1)-T, "ms" +705 PRINT "Apple Soft BASIC: 19100 ms" +710 PRINT "Apple Integer BASIC: 8800 ms" +800 END +820 RETURN diff --git a/data/examples/11stefans/rfbench6.bas b/data/examples/11stefans/rfbench6.bas new file mode 100644 index 0000000000000000000000000000000000000000..73459ccfc8dfe7c5ffdceac9137348a220ee98a1 --- /dev/null +++ b/data/examples/11stefans/rfbench6.bas @@ -0,0 +1,14 @@ +300 T=MILLIS(1) +400 K=0 +430 DIM M(5) +500 K=K+1 +510 LET A=K/2*3+4-5 +520 GOSUB 820 +530 FOR L=1 TO 5 +540 NEXT L +600 IF K<1000 THEN 500 +700 PRINT MILLIS(1)-T, "ms" +705 PRINT "Apple Soft BASIC: 28600 ms" +710 PRINT "Apple Integer BASIC: 18500 ms" +800 END +820 RETURN diff --git a/data/examples/11stefans/rfbench7.bas b/data/examples/11stefans/rfbench7.bas new file mode 100644 index 0000000000000000000000000000000000000000..1108582ec2c4524643383452a37bf45a786de4b5 --- /dev/null +++ b/data/examples/11stefans/rfbench7.bas @@ -0,0 +1,15 @@ +300 T=MILLIS(1) +400 K=0 +430 DIM M(5) +500 K=K+1 +510 LET A=K/2*3+4-5 +520 GOSUB 820 +530 FOR L=1 TO 5 +535 M(L)=A +540 NEXT L +600 IF K<1000 THEN 500 +700 PRINT MILLIS(1)-T, "ms" +705 PRINT "Apple Soft BASIC: 44800 ms" +710 PRINT "Apple Integer BASIC: 28000 ms" +800 END +820 RETURN diff --git a/data/examples/11stefans/rfbench8.bas b/data/examples/11stefans/rfbench8.bas new file mode 100644 index 0000000000000000000000000000000000000000..4a2c3be07a847a0bc9604cefe86dc9aa0fd4f4b7 --- /dev/null +++ b/data/examples/11stefans/rfbench8.bas @@ -0,0 +1,10 @@ +300 T=MILLIS(1) +400 K=0 +500 K=K+1 +530 A=POW(K, 2) +540 B=LOG(K) +550 C=SIN(K) +600 IF K<100 THEN GOTO 500 +700 PRINT MILLIS(1)-T, "ms" +705 PRINT "Apple Soft BASIC: 10700 ms" +800 END diff --git a/data/examples/11stefans/root.bas b/data/examples/11stefans/root.bas new file mode 100644 index 0000000000000000000000000000000000000000..64944f64bb3e4113cc91b98e9d4f4076224d4924 --- /dev/null +++ b/data/examples/11stefans/root.bas @@ -0,0 +1,18 @@ +10 INPUT "Range: ",L +20 PRINT "N ISQR ASQR SQR SQR-ASQR (SQR-ASQR)/SQR " +100 FOR X=1 TO L +110 GOSUB 1000 +115 GOSUB 1200 +120 PRINT #4,X,S,#12,A,SQR(X),SQR(X)-A,(SQR(X)-A)/A +140 NEXT X +999 END +1000 REM "Find the closest integer square root" +1010 FOR I=1 TO 1000 +1020 IF I*I>X THEN S=I-1 ELSE GOTO 1030 +1025 IF I*I-X "haha"THEN PRINT "4 passed false neq" +460 IF "huhu"="huhu" AND "haha"="haha" THEN PRINT "5 passed AND" +470 IF "huhu"=R$ THEN PRINT "6 passed eq" +480 PRINT "Tests 2-6 should show here" +500 END diff --git a/data/examples/11stefans/testfor.bas b/data/examples/11stefans/testfor.bas new file mode 100644 index 0000000000000000000000000000000000000000..211421b7e7765a3747f865f627dd0dc9e6a54e93 --- /dev/null +++ b/data/examples/11stefans/testfor.bas @@ -0,0 +1,15 @@ +100 REM "4 nested for loops" +110 PRINT "4 nested 4 loops" +120 Z=0 +200 FOR I=1 TO 2 +210 FOR J=1 TO 2 +220 FOR K=1 TO 2 +230 FOR L=1 TO 2 +240 Z=Z+1 +250 PRINT Z;" :",I,J,K,L +260 NEXT L +270 NEXT K +280 NEXT J +290 NEXT I +300 PRINT "16 lines should show here" +310 END \ No newline at end of file diff --git a/data/examples/11stefans/timetest.bas b/data/examples/11stefans/timetest.bas new file mode 100644 index 0000000000000000000000000000000000000000..7963992c6039530cb5a6b3a8f07e5e8d4894a926 --- /dev/null +++ b/data/examples/11stefans/timetest.bas @@ -0,0 +1,59 @@ +100 REM "Tests the millis functions and calculates" +110 REM "runtimes of certain operations" +120 REM "Write result to serial line" +130 a$="milliseconds" +140 b$="microseconds" +200 if usr(0,0)=32 then n=1000 else n=10 +210 m=1000 +220 print "Running ";n;"*";m;" operations:" +300 s=millis(1) +310 for i=1 to n +320 for j=1 to m +330 next j +340 next i +350 e=millis(1) +360 print "Empty loops",e-s, a$ +370 l=e-s +400 s=millis(1) +420 for i=1 to n +430 for j=1 to m +440 rem +450 next j +460 next i +470 e=millis(1) +480 print "REM statements", e-s, a$ +490 b=e-s +500 s=millis(1) +510 for i=1 to n +520 for j=1 to m +530 a=67 +540 next j +550 next i +560 e=millis(1) +570 print "Assignments", e-s, a$ +580 c=e-s +700 s=millis(1) +710 for i=1 to n +720 for j=1 to m +730 a=j/i +740 next j +750 next i +760 e=millis(1) +770 print "Divisions", e-s, a$ +780 d=e-s +800 dim q(n) +810 s=millis(1) +820 for i=1 to n +830 for j=1 to m +840 q(i)=j +850 next j +860 next i +870 e=millis(1) +880 print "Array assignments", e-s, a$ +890 e=e-s +1000 print "Loop time", l/n, b$ +1010 print "Token processing", (b-l)/n, b$ +1020 print "Constant assignment time", (c-l)/n, b$ +1030 print "Division time", (d-l)/n, b$ +1040 print "Array access time", (e-l)/n, b$ + diff --git a/data/examples/12systems/23matchl.bas b/data/examples/12systems/23matchl.bas new file mode 100644 index 0000000000000000000000000000000000000000..9db2f163e3f7a8e350d1b36f06230ff7d3202325 --- /dev/null +++ b/data/examples/12systems/23matchl.bas @@ -0,0 +1,41 @@ +10 REM "23 Matches from 101 BASIC games" +20 REM "Originally written by Bob Albrecht in 1975" +30 REM "Ported to Stefan's BASIC in 2021" +40 REM "This version is for a 16*2 LCD display." +50 @R=MILLIS(1) +60 REM "Input and output to display from keypad" +70 @O=2: @I=2 +100 CLS: PRINT "23 MATCHES" +110 PRINT "CAN TAKE 1,2,3";: INPUT "", A$ +120 CLS: PRINT "TAKE THE LAST" +130 PRINT "AND LOSE";: INPUT "", A$ +160 N=23 +170 Q=INT(RND(2)) +175 CLS: PRINT "MATCHES "; N +180 IF Q=1 THEN 210 +190 PRINT "YOU GO FIRST: "; +200 GOTO 300 +210 PRINT "I : 2, YOU: "; +260 N=N-2 +300 INPUT "", K +310 CLS: PRINT "MATCHES "; N +320 IF K>3 OR K<=0 THEN 430 +340 N=N-K +350 CLS: PRINT "MATCHES "; N +355 IF N=4 THEN Z=3: GOTO 390 +360 IF N=3 THEN Z=2: GOTO 390 +365 IF N=2 THEN Z=1: GOTO 390 +370 IF N<=1 THEN 530 +375 Z=4-K +390 PRINT "I TAKE "; Z;" YOU: "; +400 N=N-Z +410 IF N<=1 THEN 470 +420 GOTO 300 +430 PRINT "ONLY 1, 2, 3: "; +440 GOTO 300 +470 CLS: PRINT "I BEAT YOU!!!" +520 GOTO 570 +530 CLS: PRINT "YOU WON!" +570 INPUT "ONCE MORE: "; O +580 IF O=1 THEN GOTO 160 +590 CLS: PRINT "BYE BYE" diff --git a/data/examples/12systems/blink.bas b/data/examples/12systems/blink.bas new file mode 100644 index 0000000000000000000000000000000000000000..524c3b47b066dc5f4af30e22ca28ea96ecd80558 --- /dev/null +++ b/data/examples/12systems/blink.bas @@ -0,0 +1,6 @@ +10 PINM LED, 1 +20 DWRITE LED, 1 +30 DELAY 1000 +40 DWRITE LED, 0 +50 DELAY 1000 +60 GOTO 20 diff --git a/data/examples/12systems/dispbuf.bas b/data/examples/12systems/dispbuf.bas new file mode 100644 index 0000000000000000000000000000000000000000..ac311a450968409defbe035af50e7a4803c2a525 --- /dev/null +++ b/data/examples/12systems/dispbuf.bas @@ -0,0 +1,17 @@ +10 PUT &2, 12 +20 X=0: Y=0 +30 P=X+16*Y+1 +40 @D(P)="X" +50 GET &2, A : IF A=0 THEN 50 +60 A$=A +70 @D(P)=" " +80 IF A$="4" AND Y>0 THEN Y=Y-1 +90 IF A$="3" AND Y<1 THEN Y=Y+1 +100 IF A$="1" AND X>0 THEN X=X-1 +110 IF A$="2" AND X<15 THEN X=X+1 +120 IF A=10 GOSUB 200 +130 DELAY 300 +140 GOTO 30 +200 PRINT "Selected", X, Y +210 DELAY 500 +220 RETURN diff --git a/data/examples/12systems/eeprom.bas b/data/examples/12systems/eeprom.bas new file mode 100644 index 0000000000000000000000000000000000000000..b2bbc0ba696acc665d24fecf9c8e8b25ceaf3121 --- /dev/null +++ b/data/examples/12systems/eeprom.bas @@ -0,0 +1,9 @@ +10 PRINT "Previous measurement ",@E(1) +20 PRINT "Starting new measurement" +30 L=0 +40 FOR I=1 TO 10 +50 L=L+AREAD(AZERO) +60 DELAY 2000 +70 NEXT +80 @E(1)=L/10 +90 PRINT "Average = ",@E(1) diff --git a/data/examples/12systems/flame.bas b/data/examples/12systems/flame.bas new file mode 100644 index 0000000000000000000000000000000000000000..6565b5b00b60be7bcd041d42a82c88034885142d --- /dev/null +++ b/data/examples/12systems/flame.bas @@ -0,0 +1,20 @@ +10 REM "Flame sensor and buzzer demo" +20 REM "Buzzer pin 2 and flame sensor pin A1" +30 B=2 +40 F=AZERO+1 +50 REM "The flame sensor threshold" +60 T=250 +100 REM "setup() put your setup code here, to run once:" +110 PINM B, 1 +120 PINM F, 0 +130 DWRITE B, 0 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 V=AREAD(F) +230 IF V>T THEN DELAY 2000 : CONT +240 DWRITE B, 1 +250 DELAY 250 +260 DWRITE B, 0 +270 DELAY 500 +280 NEXT + diff --git a/data/examples/12systems/graph.bas b/data/examples/12systems/graph.bas new file mode 100644 index 0000000000000000000000000000000000000000..d79644d1b05a46833faeb637916356586ed8cf16 --- /dev/null +++ b/data/examples/12systems/graph.bas @@ -0,0 +1,14 @@ +10 REM "Graphics code elementary demo" +20 REM "Written only for large TFT screens" +100 CLS +200 FOR I +210 X=RND(800) +220 Y=RND(480) +230 R0=RND(40) +240 R=RND(255): G=RND(255): B=RND(255) +250 COLOR R,G,B +260 FCIRCLE X,Y,R0 +270 @X=1:@Y=1:PRINT #5;I; +280 DELAY 100 +290 NEXT +300 END diff --git a/data/examples/12systems/hello.bas b/data/examples/12systems/hello.bas new file mode 100644 index 0000000000000000000000000000000000000000..eef2cbdae14d0a9e14025d443dc2f85d98a317cc --- /dev/null +++ b/data/examples/12systems/hello.bas @@ -0,0 +1 @@ +10 PRINT "Hello World" diff --git a/data/examples/12systems/lcdlight.bas b/data/examples/12systems/lcdlight.bas new file mode 100644 index 0000000000000000000000000000000000000000..4b028cfa9acd5ab4e0948e0ce69c13c1dd7f54a9 --- /dev/null +++ b/data/examples/12systems/lcdlight.bas @@ -0,0 +1,25 @@ +10 REM "LCDLight - display light intensity" +100 REM "setup() put your setup code here, to run once:" +110 REM "Minimum and maximum intensity and the PIN" +120 B=0 : C=100 +130 A=AZERO+1 +140 REM "Set the DISPLAY stream &2 as output device" +150 @O=2 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 GET &2, D +230 IF D=10 THEN @O=1: END +240 IF D=49 THEN B=0: C=100 +250 V=MAP(AREAD(A), 1023, 0, 0, 99) +260 IF V>B THEN B=V +270 IF V integer range" +60 T1=180 +100 REM "setup() put your setup code here, to run once:" +110 PINM P1, 1 +120 PINM P2, 0 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 REM "Send a pulse, approx 50 microseconds" +230 DWRITE P1,0 +240 DWRITE P1,1 +250 DWRITE P1,0 +260 V=PULSEIN(P2, 1, T1) +270 D=MAP(V, 0, 18000, 0, 29700) +275 PUT &2, 12 +280 PRINT &2, "Time:", V +290 PRINT &2, "Dist:", D; +300 DELAY 1000 +310 GET &2, A +320 IF A=10 THEN END +330 NEXT diff --git a/data/examples/12systems/minmax.bas b/data/examples/12systems/minmax.bas new file mode 100644 index 0000000000000000000000000000000000000000..fdbeb6102374e1e1667093a4c8ce0ab1001de8b5 --- /dev/null +++ b/data/examples/12systems/minmax.bas @@ -0,0 +1,10 @@ +10 PINM AZERO, 0 +20 M0=1024: M1=0 +30 FOR I=1 TO 10 +40 L=AREAD(AZERO) +50 IF M0>L THEN M0=L +60 IF M1 integer range" +60 T1=180 +100 REM "setup() put your setup code here, to run once:" +110 PINM P1, 1 +120 PINM P2, 0 +200 REM "loop() put your main code here, to run repeatedly:" +210 FOR I +220 REM "Send a pulse, approx 50 microseconds" +230 DWRITE P1,0 +240 DWRITE P1,1 +250 DWRITE P1,0 +260 V=PULSE(P2, 1, T1) +270 D=MAP(V, 0, 18000, 0, 29700) +280 PRINT "Time (10 mus) : ", V +290 PRINT "Distance (mm) : ", D +300 DELAY 1000 +310 GET A +320 IF A=32 THEN END +330 NEXT diff --git a/data/examples/12systems/shield.bas b/data/examples/12systems/shield.bas new file mode 100644 index 0000000000000000000000000000000000000000..54a4379a3255ea4a9d56ae0c78f688f182a182b1 --- /dev/null +++ b/data/examples/12systems/shield.bas @@ -0,0 +1,8 @@ +10 PUT &2, 12 +20 PRINT &2,"LCD shield test" +30 PRINT &2,"Key code: "; +40 @X=10: @Y=1 +50 GET &2,A +60 IF A<>0 THEN PRINT &2,A; +70 DELAY 10 +80 GOTO 40 diff --git a/data/examples/12systems/stopw.bas b/data/examples/12systems/stopw.bas new file mode 100644 index 0000000000000000000000000000000000000000..8754f774c9609fa12c405848fcc8ed6fedbcdddb --- /dev/null +++ b/data/examples/12systems/stopw.bas @@ -0,0 +1,21 @@ +100 REM "A little stopwatch using the 16*2 shield" +200 REM "The setup()" +210 D=0: T=0: U=0: S=0: C=0 +220 PUT &2,12: PRINT &2;"Time = "; +230 GOSUB 600 +300 REM "The loop()" +320 GET &2,A +330 IF A=10 AND C=0 THEN C=A: GOTO 400 +340 IF C=10 AND A=0 THEN C=0 +350 IF A=49 THEN 500 +360 DELAY 10 +370 IF S=1 THEN T=MILLIS(10)-D +380 IF T<>U THEN U=T: GOSUB 600 +390 GOTO 300 +400 S=(S+1)%2:IF S=1 THEN D=MILLIS(10) +499 GOTO 300 +500 END +600 REM "The display refresh" +610 @Y=0:@X=8:PRINT &2;" "; +620 @Y=0:@X=8:PRINT &2;T; +630 RETURN diff --git a/data/examples/13wire/analogm.bas b/data/examples/13wire/analogm.bas new file mode 100644 index 0000000000000000000000000000000000000000..8279cbc68073ee6b84500b2977a07211161b4ee7 --- /dev/null +++ b/data/examples/13wire/analogm.bas @@ -0,0 +1,11 @@ +10 REM "Master code for analogr2" +20 REM "Display the analog value" +100 REM "setup()" +110 OPEN &7, 8 +200 REM "loop()" +210 FOR I +220 @S=0 +230 INPUT &7, A +240 IF @S THEN PRINT "Data error" ELSE PRINT A +250 DELAY 500 +260 NEXT I diff --git a/data/examples/13wire/analogm2.bas b/data/examples/13wire/analogm2.bas new file mode 100644 index 0000000000000000000000000000000000000000..0af90ff9c873717b6062ac71b41afdeabdb5c151 --- /dev/null +++ b/data/examples/13wire/analogm2.bas @@ -0,0 +1,15 @@ +10 REM "Master code for analogr2" +20 REM "Display the analog value" +100 REM "setup()" +110 OPEN &7, 8 +200 REM "loop()" +210 FOR I +220 @S=0 +230 INPUT &7, A$ +240 IF @S OR LEN(A$)<2 THEN PRINT "Data error":DELAY 500: CONT +250 L=A$(1): IF L<0 THEN L=L+255 +260 H=A$(2) +270 PRINT H*256+L +280 DELAY 300 +290 NEXT + diff --git a/data/examples/13wire/analogr.bas b/data/examples/13wire/analogr.bas new file mode 100644 index 0000000000000000000000000000000000000000..a72794f1d299c60566a6ee883ddb73802f3820b4 --- /dev/null +++ b/data/examples/13wire/analogr.bas @@ -0,0 +1,12 @@ +10 REM "I2C analog slave" +20 REM "A is the analog port" +30 A=AZERO +100 REM "the setup()" +110 PRINT "Open slave mode on port 8" +120 OPEN &7, 8, 1 +200 REM "loop() ASCII data transfer of 6 chars" +210 FOR I +220 V=AREAD(A) +230 PRINT &7, #6, INT(V) +240 DELAY 300 +250 NEXT I diff --git a/data/examples/13wire/analogr2.bas b/data/examples/13wire/analogr2.bas new file mode 100644 index 0000000000000000000000000000000000000000..a3668f3c4c5316611afffd3d358f330e5bc1bd4a --- /dev/null +++ b/data/examples/13wire/analogr2.bas @@ -0,0 +1,15 @@ +10 REM "I2C analog slave" +20 REM "A is the analog port" +30 A=AZERO +100 REM "the setup()" +110 PRINT "Open slave mode on port 8" +120 OPEN &7, 8, 1 +200 REM "loop() binary data transfer" +210 FOR I +220 V=AREAD(A) +230 A$(1)=INT(V)%256 +240 A$(2)=INT(V)/256 +250 PRINT &7, A$ +260 DELAY 300 +270 NEXT I + diff --git a/data/examples/13wire/clock.bas b/data/examples/13wire/clock.bas new file mode 100644 index 0000000000000000000000000000000000000000..ed710219721fdd7d40a47b1854158319183a5a74 --- /dev/null +++ b/data/examples/13wire/clock.bas @@ -0,0 +1,33 @@ +10 REM "Directly access a real time clock" +20 REM "Wire address of DS3231 is 104" +30 C=104 +40 DIM A$(32) +50 REM "Function to glue together BCD nibbles" +60 DEF FNN(X)=(X AND 15)+10*INT(X/16) +100 REM "Read out the clock" +110 OPEN &7, C +120 @S=0 +130 PUT &7, 0 +140 INPUT &7, A$ +150 IF @S<>0 THEN PRINT "Clock Error": END +200 REM "Interpret the data" +210 PRINT "Raw data" +220 FOR I=1 TO 32 : PRINT I, (A$(I)) : NEXT +230 PRINT "Information" +240 S=FNN(A$(1)) +250 PRINT "Seconds", S +260 M=FNN(A$(2)) +270 PRINT "Minutes", M +280 T=INT(A$(3)/64) +290 IF T THEN GOSUB 800 ELSE GOSUB 900 +790 END +800 PRINT "12 hours clock" +810 T=(A$(3) AND 31): H=FNN(T) +820 PRINT "Hours", H; +840 T=((A$(3)/32) AND 1) +850 IF T THEN PRINT "pm" ELSE PRINT "am" +890 RETURN +900 PRINT "24 hours clock" +910 T=(A$(3) AND 63): H=FNN(T) +920 PRINT "Hours", H +990 RETURN diff --git a/data/examples/13wire/eeprom.bas b/data/examples/13wire/eeprom.bas new file mode 100644 index 0000000000000000000000000000000000000000..8f6856005ab39bc84c8bf8280a12e2c1fb1caef3 --- /dev/null +++ b/data/examples/13wire/eeprom.bas @@ -0,0 +1,35 @@ +10 REM "Direct access to EEPROMS with I2C" +20 REM "EEPROMS are on Wire addresses 80-87" +30 E=87 +40 DIM A$(32), B$(32) +100 PRINT "Open the wire connection as master" +110 OPEN &7, E +200 PRINT "Read the EEPROM byte by byte" +210 GOSUB 800 +300 PRINT "Clear 16 bytes at address (0,0)" +310 B$(1)=0 : B$(2)=0 +320 FOR I=1 TO 16: B$(I+2)=0: NEXT +330 PRINT &7, B$ +340 REM "Give the EEPROM time to digest" +350 DELAY 5 +400 PRINT "Read the data" +410 GOSUB 800 +500 PRINT "Write a set of 16 bytes to address (0,0)" +510 B$(1)=0 : B$(2)=0 +520 FOR I=1 TO 16: B$(I+2)=17-I: NEXT +530 PRINT &7, B$ +540 DELAY 5 +600 REM "Read the data" +610 GOSUB 800 +620 END +800 REM "Print the data" +810 PRINT "EEPROM data at (0,0)" +820 @S=0 +830 PUT &7, 0, 0 +840 IF @S<>0 PRINT "EEPROM Error" : END +850 INPUT &7, A$ +855 PRINT "Read "; LEN(A$); " bytes" +860 FOR I=1 TO 32 +870 PRINT I, (A$(I)) +880 NEXT +890 RETURN diff --git a/data/examples/13wire/ident.bas b/data/examples/13wire/ident.bas new file mode 100644 index 0000000000000000000000000000000000000000..f3092fae4a624b9ca59a79d20ae5e0b4c0ae7b8a --- /dev/null +++ b/data/examples/13wire/ident.bas @@ -0,0 +1,21 @@ +10 REM "Identify devices on the I2C bus" +20 REM "" +100 REM "the setup()" +110 FOR I=1 TO 127 +120 @S=0 +130 REM "Try to open a device and send a byte" +140 OPEN &7, I +150 PUT &7, 0 +160 IF @S=0 THEN PRINT "device found on", #3, I;": ";:GOSUB 500 +190 NEXT +200 PRINT +210 END +500 REM "Search the device name" +505 IF I=56 THEN PRINT "AH10" : RETURN +510 IF I=60 THEN PRINT "Oled" : RETURN +520 IF I>=80 AND I<=87 THEN PRINT "EEPROM" : RETURN +530 IF I=104 THEN PRINT "Real Time Clock" : RETURN +540 IF I=118 OR I=119 THEN PRINT "BMP/E280" : RETURN +590 PRINT "Unknown" +600 RETURN + diff --git a/data/examples/13wire/masterr.bas b/data/examples/13wire/masterr.bas new file mode 100644 index 0000000000000000000000000000000000000000..06e2676c8d8bfa9e993d7115563c989025869402 --- /dev/null +++ b/data/examples/13wire/masterr.bas @@ -0,0 +1,13 @@ +10 REM "Master reader from Arduino examples" +20 REM "" +100 REM "the setup()" +110 PRINT "Open master mode on port 8" +120 OPEN &7, 8 +200 REM "the loop()" +210 REM "request 6 byte from the slave" +220 FOR I +230 @S=0 +240 INPUT &7, #6, A$ +250 IF @S THEN PRINT "Data error" ELSE PRINT A$ +260 DELAY 500 +270 NEXT diff --git a/data/examples/13wire/masterw.bas b/data/examples/13wire/masterw.bas new file mode 100644 index 0000000000000000000000000000000000000000..83280330222c47136b8d5a75f4aaceeb5b5fa55b --- /dev/null +++ b/data/examples/13wire/masterw.bas @@ -0,0 +1,14 @@ +10 REM "Master writer from Arduino examples" +20 REM "" +100 REM "the setup()" +110 PRINT "Open master mode on port 8" +120 OPEN &7, 8 +130 A$="x is " +200 REM "the loop()" +220 FOR I +230 A$(6)=I +240 @S=0 +250 PRINT &7, A$ +260 IF @S THEN PRINT "Transmission error" +270 DELAY 500 +280 NEXT diff --git a/data/examples/13wire/register.bas b/data/examples/13wire/register.bas new file mode 100644 index 0000000000000000000000000000000000000000..0d8d75174a3245f7a12ecb56a1f6752d854981ff --- /dev/null +++ b/data/examples/13wire/register.bas @@ -0,0 +1,40 @@ +10 REM "Wire register engine reader slave" +20 REM "The address A, N the number of registers R()" +30 REM "Maximum number of registers is 32" +40 N=16 +50 DIM R(N) +60 REM "A function in X which is cyclic 1..N" +70 DEF FNM(X)=(A+X-2)%N+1 +100 REM "the setup()" +110 PRINT "Open slave on port 8" +120 OPEN &7, 8, 1 +130 A=1 +200 REM "the loop()" +210 REM "Wait for command and reply" +220 FOR I +230 REM "Call the register state engine" +240 GOSUB 1000 +300 REM "Publish the register content" +310 FOR K=1 TO N +320 A$(K)=R(FNM(K)) +330 NEXT K +340 PRINT &7, A$ +400 REM "Process commands" +410 IF AVAIL(7)=0 THEN DELAY 100: CONT +420 REM "A command was received" +430 INPUT &7, A$ +440 REM "First byte is the address, discard if invalid" +450 IF A$(1)>0 AND A$(1)<=N THEN A=ABS(A$(1)) ELSE CONT +500 REM "Add command sequences here" +800 REM "Write received data to the registers" +810 FOR J=2 TO LEN(A$) +820 R(FNM(J-1))=A$(J) +830 NEXT J +840 NEXT I +850 END +1000 REM "Update registers with payload" +1010 REM "Put your payload code here, loop is only demo" +1020 FOR K=1 TO N/2 +1030 R(K)=K +1040 NEXT K +1050 RETURN diff --git a/data/examples/13wire/scan.bas b/data/examples/13wire/scan.bas new file mode 100644 index 0000000000000000000000000000000000000000..ec9d822f14dfa84d53f8109ecbf6e5573f1eebad --- /dev/null +++ b/data/examples/13wire/scan.bas @@ -0,0 +1,11 @@ +10 REM "Scan the I2C bus for devices" +20 REM "" +100 REM "the setup()" +110 FOR I=1 TO 127 +120 @S=0 +130 REM "Try to open a device and send a byte" +140 OPEN &7, I +150 PUT &7, 0 +160 IF @S=0 THEN PRINT "device found on ",I +170 NEXT +200 END diff --git a/data/examples/13wire/slaver.bas b/data/examples/13wire/slaver.bas new file mode 100644 index 0000000000000000000000000000000000000000..07b6fc20285b945af1484718fd25dab843048a86 --- /dev/null +++ b/data/examples/13wire/slaver.bas @@ -0,0 +1,14 @@ +10 REM "Slave receiver from Arduino examples" +20 REM "" +100 REM "the setup()" +110 PRINT "Open slave mode on port 8" +120 OPEN &7, 8, 1 +200 REM "the loop()" +220 FOR I +230 IF AVAIL(7)=0 THEN 270 +240 INPUT &7, A$ +250 X=(A$(6)) +260 PRINT X +270 DELAY 100 +280 NEXT + diff --git a/data/examples/13wire/slaves.bas b/data/examples/13wire/slaves.bas new file mode 100644 index 0000000000000000000000000000000000000000..270991c096678546b6c06c06c9d873088a0e76dc --- /dev/null +++ b/data/examples/13wire/slaves.bas @@ -0,0 +1,12 @@ +10 REM "Slave sender from Arduino examples" +20 REM "" +100 REM "the setup()" +110 PRINT "Open slave mode on port 8" +120 OPEN &7, 8, 1 +200 REM "the loop()" +210 REM "send exactly 6 byte to the buffer" +220 FOR I +230 PRINT &7, "hello " +240 DELAY 100 +250 IF USR(7, 1)=0 THEN PRINT "Master requested data" +260 NEXT diff --git a/data/examples/14games/23match.bas b/data/examples/14games/23match.bas new file mode 100644 index 0000000000000000000000000000000000000000..a35873ac438aaef9759a35648e0e6d3e4c7752ca --- /dev/null +++ b/data/examples/14games/23match.bas @@ -0,0 +1,44 @@ +10 REM "23 Matches from 101 BASIC games" +20 REM "Originally written by Bob Albrecht in 1975" +30 REM "Ported to Stefan's BASIC in 2021" +40 REM "Randomization" +50 @R=MILLIS(1) +100 PRINT "THIS IS A GAME CALLED '23 MATCHES'.": PRINT +110 PRINT "WHEN IT IS YOUR TURN, YOU MAY TAKE ONE, TWO, OR THREE" +120 PRINT "MATCHES. THE OBJECT OF THE GAME IS NOT TO HAVE TO TAKE" +130 PRINT "THE LAST MATCH.": PRINT +140 PRINT "LET'S FLIP A COIN TO SEE WHO GOES FIRST." +150 PRINT "IF IT COMES UP HEADS, I WILL WIN THE TOSS.": PRINT +160 N=23 +170 Q=INT(RND(2)) +180 IF Q=1 THEN 210 +190 PRINT "TAILS! YOU GO FIRST. ": PRINT +200 GOTO 290 +210 PRINT "HEADS! I GO FIRST!": PRINT +250 PRINT "I TAKE 2 MATCHES" +260 N=N-2 +270 PRINT "THE NUMBER OF MATCHES IS NOW", N +280 PRINT +290 PRINT "YOU MAY TAKE 1, 2 OR 3 MATCHES." +300 INPUT "HOW MANY DO YOU WISH TO REMOVE? ", K +320 IF K>3 OR K<=0 THEN 430 +340 N=N-K +350 PRINT "THERE ARE NOW", N, " MATCHES REMAINING." +355 IF N=4 THEN Z=3: GOTO 390 +360 IF N=3 THEN Z=2: GOTO 390 +365 IF N=2 THEN Z=1: GOTO 390 +370 IF N<=1 THEN 530 +375 Z=4-K +390 PRINT "MY TURN ! I REMOVE ", Z, " MATCHES" +400 N=N-Z +410 IF N<=1 THEN 470 +420 GOTO 270 +430 PRINT "YOU CAN ONLY REMOVE 1, 2, OR 3 MATCHES." +440 GOTO 300 +470 PRINT +480 PRINT "YOU TOOK THE LAST MATCH! I WIN!" +490 PRINT "HA! HA! I BEAT YOU!!!" +520 GOTO 570 +530 PRINT "YOU WON!" +540 PRINT "YOU'RE PRETTY SMART!" +570 END diff --git a/data/examples/14games/aceyduc.bas b/data/examples/14games/aceyduc.bas new file mode 100644 index 0000000000000000000000000000000000000000..93d077618e2385e299a523cb912eb645d2018d86 --- /dev/null +++ b/data/examples/14games/aceyduc.bas @@ -0,0 +1,105 @@ +10 REM "ACEY-DUCEY from 101 BASIC games" +20 REM "Originally writte by Bill Palmby in 1975" +25 REM "Ported to Stefan's BASIC in 2021" +28 REM +30 PRINT"ACEY-DUCEY IS PLAYED IN THE FOLLOWING MANNER " +40 PRINT"THE DEALER (COMPUTER) DEALS TWO CARDS FACE UP" +50 PRINT"YOU HAVE AN OPTION TO BET OR NOT BET DEPENDING" +60 PRINT"ON WHETHER OR NOT YOU FEEL THE CARD WILL HAVE" +70 PRINT"A VALUE BETWEEN THE FIRST TWO." +80 PRINT"IF YOU DO NOT WANT TO BET, TYPE 0" +90 PRINT +95 @R=MILLIS(1) +110 Q=100 : R=1 +115 PRINT "ROUND ",R +116 PRINT "YOUR WINNING/ LOSSES", Q-100 +117 PRINT "PER ROUND ", (Q-100)/R +120 PRINT "YOU NOW HAVE",Q,"DOLLARS." +130 PRINT +140 GOTO 260 +210 Q=Q+M +220 GOTO 115 +240 Q=Q-M +250 GOTO 115 +260 PRINT"HERE ARE YOUR NEXT TWO CARDS: " +270 A=INT(RND(13)+2) +280 IF A<2 THEN 270 +290 IF A>14 THEN 270 +300 B=INT(RND(13)+2) +310 IF B<2 THEN 300 +320 IF B>14 THEN 300 +330 IF A>=B THEN 270 +350 IF A<11 THEN 400 +360 IF A=11 THEN 420 +370 IF A=12 THEN 440 +380 IF A=13 THEN 460 +390 IF A=14 THEN 480 +400 PRINT A +410 GOTO 500 +420 PRINT"JACK" +430 GOTO 500 +440 PRINT"QUEEN" +450 GOTO 500 +460 PRINT"KING" +470 GOTO 500 +480 PRINT"ACE" +500 IF B<11 THEN 550 +510 IF B=11 THEN 570 +520 IF B=12 THEN 590 +530 IF B=13 THEN 610 +540 IF B=14 THEN 630 +550 PRINT B +560 GOTO 650 +570 PRINT"JACK" +580 GOTO 650 +590 PRINT"QUEEN" +600 GOTO 650 +610 PRINT"KING" +620 GOTO 650 +630 PRINT"ACE" +640 PRINT +650 PRINT +660 INPUT"WHAT IS YOUR BET? ",M +665 R=R+1 +670 IF M<>0 THEN 680 +675 PRINT"REALLY?!" +676 PRINT +677 GOTO 260 +680 IF M<=Q THEN 730 +690 PRINT"SORRY, MY FRIEND, BUT YOU BET TOO MUCH." +700 PRINT"YOU HAVE ONLY ",Q," DOLLARS TO BET." +710 GOTO 650 +730 C=INT(RND(13)+2) +740 IF C<2 THEN 730 +750 IF C>14 THEN 730 +760 IF C<11 THEN 810 +770 IF C=11 THEN 830 +780 IF C=12 THEN 850 +790 IF C=13 THEN 870 +800 IF C=14 THEN 890 +810 PRINT "CARD IS", C +820 GOTO 910 +830 PRINT"JACK" +840 GOTO 910 +850 PRINT"QUEEN" +860 GOTO 910 +870 PRINT"KING" +880 GOTO 910 +890 PRINT "ACE" +900 PRINT +910 IF C>A THEN 930 +920 GOTO 970 +930 IF C>=B THEN 970 +950 PRINT"YOU WIN!!!" +960 GOTO 210 +970 PRINT"SORRY, YOU LOSE" +980 IF M1 AND V<>1 THEN 110 +104 PRINT "MEANINGLESS DIMENSIONS. TRY AGAIN.":GOTO 100 +110 DIM W(H,V),V(H,V) +120 PRINT +130 PRINT +140 PRINT +150 PRINT +160 Q=0:Z=0:X=INT(RND(1)*H+1) +165 FOR I=1 TO H +170 IF I=X THEN 173 +171 PRINT ".--";:GOTO 180 +173 PRINT ". "; +180 NEXT I +190 PRINT "." +195 C=1:W(X,1)=C:C=C+1 +200 R=X:S=1:GOTO 260 +210 IF R<>H THEN 240 +215 IF S<>V THEN 230 +220 R=1:S=1:GOTO 250 +230 R=1:S=S+1:GOTO 250 +240 R=R+1 +250 IF W(R,S)=0 THEN 210 +260 IF R-1=0 THEN 530 +265 IF W(R-1,S)<>0 THEN 530 +270 IF S-1=0 THEN 390 +280 IF W(R,S-1)<>0 THEN 390 +290 IF R=H THEN 330 +300 IF W(R+1,S)<>0 THEN 330 +310 X=INT(RND(1)*3+1) +320 ON X GOTO 790,820,860 +330 IF S<>V THEN 340 +334 IF Z=1 THEN 370 +338 Q=1:GOTO 350 +340 IF W(R,S+1)<>0 THEN 370 +350 X=INT(RND(1)*3+1) +360 ON X GOTO 790,820,910 +370 X=INT(RND(1)*2+1) +380 ON X GOTO 790,820 +390 IF R=H THEN 470 +400 IF W(R+1,S)<>0 THEN 470 +405 IF S<>V THEN 420 +410 IF Z=1 THEN 450 +415 Q=1:GOTO 430 +420 IF W(R,S+1)<>0 THEN 450 +430 X=INT(RND(1)*3+1) +440 ON X GOTO 790,860,910 +450 X=INT(RND(1)*2+1) +460 ON X GOTO 790,860 +470 IF S<>V THEN 490 +480 IF Z=1 THEN 520 +485 Q=1:GOTO 500 +490 IF W(R,S+1)<>0 THEN 520 +500 X=INT(RND(1)*2+1) +510 ON X GOTO 790,910 +520 GOTO 790 +530 IF S-1=0 THEN 670 +540 IF W(R,S-1)<>0 THEN 670 +545 IF R=H THEN 610 +547 IF W(R+1,S)<>0 THEN 610 +550 IF S<>V THEN 560 +552 IF Z=1 THEN 590 +554 Q=1:GOTO 570 +560 IF W(R,S+1)<>0 THEN 590 +570 X=INT(RND(1)*3+1) +580 ON X GOTO 820,860,910 +590 X=INT(RND(1)*2+1) +600 ON X GOTO 820,860 +610 IF S<>V THEN 630 +620 IF Z=1 THEN 660 +625 Q=1:GOTO 640 +630 IF W(R,S+1)<>0 THEN 660 +640 X=INT(RND(1)*2+1) +650 ON X GOTO 820,910 +660 GOTO 820 +670 IF R=H THEN 740 +680 IF W(R+1,S)<>0 THEN 740 +685 IF S<>V THEN 700 +690 IF Z=1 THEN 730 +695 Q=1:GOTO 830 +700 IF W(R,S+1)<>0 THEN 730 +710 X=INT(RND(1)*2+1) +720 ON X GOTO 860,910 +730 GOTO 860 +740 IF S<>V THEN 760 +750 IF Z=1 THEN 780 +755 Q=1:GOTO 770 +760 IF W(R,S+1)<>0 THEN 780 +770 GOTO 910 +780 GOTO 1000 +790 W(R-1,S)=C +800 C=C+1:V(R-1,S)=2:R=R-1 +810 IF C=H*V+1 THEN 1010 +815 Q=0:GOTO 260 +820 W(R,S-1)=C +830 C=C+1 +840 V(R,S-1)=1:S=S-1:IF C=H*V+1 THEN 1010 +850 Q=0:GOTO 260 +860 W(R+1,S)=C +870 C=C+1:IF V(R,S)=0 THEN 880 +875 V(R,S)=3:GOTO 890 +880 V(R,S)=2 +890 R=R+1 +900 IF C=H*V+1 THEN 1010 +905 GOTO 530 +910 IF Q=1 THEN 960 +920 W(R,S+1)=C:C=C+1:IF V(R,S)=0 THEN 940 +930 V(R,S)=3:GOTO 950 +940 V(R,S)=1 +950 S=S+1:IF C=H*V+1 THEN 1010 +955 GOTO 260 +960 Z=1 +970 IF V(R,S)=0 THEN 980 +975 V(R,S)=3:Q=0:GOTO 1000 +980 V(R,S)=1:Q=0:R=1:S=1:GOTO 250 +1000 GOTO 210 +1010 FOR J=1 TO V +1011 PRINT "I"; +1012 FOR I=1 TO H +1013 IF V(I,J)<2 THEN 1030 +1020 PRINT " "; +1021 GOTO 1040 +1030 PRINT " I"; +1040 NEXT I +1041 PRINT +1043 FOR I=1 TO H +1045 IF V(I,J)=0 THEN 1060 +1050 IF V(I,J)=2 THEN 1060 +1051 PRINT ": "; +1052 GOTO 1070 +1060 PRINT ":--"; +1070 NEXT I +1071 PRINT "." +1072 NEXT J +1073 END diff --git a/data/examples/14games/animal.bas b/data/examples/14games/animal.bas new file mode 100644 index 0000000000000000000000000000000000000000..9a30480ce3aa787c1d7161108f61163d12aba73e --- /dev/null +++ b/data/examples/14games/animal.bas @@ -0,0 +1,97 @@ +10 REM "ANIMAL" +20 REM "Ported by Stefan in 2022" +30 REM +40 PRINT "PLAY 'GUESS THE ANIMAL'" +45 PRINT +50 PRINT "THINK OF AN ANIMAL AND THE COMPUTER WILL TRY TO GUESS IT." +60 PRINT +65 SET 12, 0: REM "SET the base of arrays to 0" +66 SET 11, 1: REM "SET the TAB command to MS mode" +67 DEF FNU(X)=X-32*ABS(X=>"a") +70 DIM A$(32,201) +80 FOR I=0 TO 3 +90 READ A$()(I) +100 NEXT I +110 N=VAL(A$()(0)) +120 REM "MAIN CONTROL SECTION" +130 INPUT "ARE YOU THINKING OF AN ANIMAL (Yes, No, List, Write, Read, End)?",AN$ +140 IF FNU(AN$)="L" THEN 600 +143 IF FNU(AN$)="W" THEN 700 +145 IF FNU(AN$)="R" THEN 800 +147 IF FNU(AN$)="E" THEN END +150 IF FNU(AN$(1,1))<>"Y" THEN 120 +160 K=1 +170 GOSUB 390 +180 IF LEN(A$()(K))=0 THEN 999 +190 IF A$(1,2)(K)="\Q" THEN 170 +200 PRINT "IS IT A ";A$(3)(K); +210 INPUT AN$ +220 AN$=AN$(1,1) +230 IF FNU(AN$(1,1))="Y" THEN PRINT "WHY NOT TRY ANOTHER ANIMAL?": GOTO 120 +240 INPUT "THE ANIMAL YOU WERE THINKING OF WAS A? ";V$ +250 PRINT "PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A" +260 PRINT V$;" FROM A ";A$(3)(K) +270 INPUT X$ +280 PRINT "FOR A ";V$;" THE ANSWER WOULD BE "; +290 INPUT AN$ +300 AN$=FNU(AN$(1,1)): IF AN$<>"Y" AND AN$<>"N" THEN 280 +310 IF AN$="Y" THEN B$="N" +320 IF AN$="N" THEN B$="Y" +330 Z1=VAL(A$()(0)) +340 A$()(0)=STR(Z1+2) +350 A$()(Z1)=A$()(K) +360 A$()(Z1+1)="\A": A$(3)(Z1+1)=V$ +370 A$()(K)="\Q": A$(3)(K)=X$: A$(LEN(A$()(K))+1)(K)="\": A$(LEN(A$()(K))+1)(K)=AN$ +375 A$(LEN(A$()(K))+1)(K)=STR(Z1+1): A$(LEN(A$()(K))+1)(K)="\": A$(LEN(A$()(K))+1)(K)=B$ +378 A$(LEN(A$()(K))+1)(K)=STR(Z1): A$(LEN(A$()(K))+1)(K)="\" +380 GOTO 120 +390 REM "SUBROUTINE TO PRINT QUESTIONS" +400 Q$=A$()(K) +410 FOR Z=3 TO LEN(Q$) +415 IF Q$(Z,Z)<>"\" THEN PRINT Q$(Z,Z);: NEXT Z +420 INPUT C$ +430 C$=FNU(C$(1,1)) +440 IF C$<>"Y" AND C$<>"N" THEN 410 +450 T$="\": T$(2)=C$ +455 FOR X=3 TO LEN(Q$)-1 +460 IF Q$(X,X+1)=T$ THEN 480 +470 NEXT X +475 STOP +480 FOR Y=X+1 TO LEN(Q$) +490 IF Q$(Y,Y)="\" THEN 510 +500 NEXT Y +505 STOP +510 K=VAL(Q$(X+2,Y)) +520 RETURN +530 DATA "4","\QDOES IT SWIM\Y2\N3\","\AFISH","\ABIRD" +600 PRINT:PRINT "ANIMALS I ALREADY KNOW ARE:" +605 X=0 +610 FOR I=1 TO 200 +620 IF A$(1,2)(I)<>"\A" THEN 650 +624 TAB 15*X +630 FOR Z=3 TO LEN(A$()(I)) +640 IF A$(Z,Z)(I)<>"\" THEN PRINT A$(Z,Z)(I);: NEXT Z +645 X=X+1: IF X=4 THEN X=0: PRINT +650 NEXT I +660 PRINT +670 PRINT +680 GOTO 120 +700 REM "Save the data" +710 @S=0 +720 OPEN &16, "animals.dat", 1 +730 T1=VAL(A$()(0)) +740 FOR I=0 TO T1-1: PRINT &16, A$()(I): NEXT I +750 CLOSE &16, 1 +760 IF @S THEN PRINT "Save failed" ELSE PRINT "Save successfull" +770 @S=0 +790 GOTO 120 +800 REM "Load the DATA" +810 @S=0 +820 OPEN &16, "animals.dat": IF @S THEN PRINT "File does not exist": GOTO 120 +830 INPUT &16, T$: T1=VAL(T$): IF @S THEN PRINT "Invalid data": GOTO 120 +840 A$()(0)=STR(T1) +850 FOR I=1 TO T1 +860 INPUT &16, T$: A$()(I)=T$ +870 NEXT +890 GOTO 120 +999 END diff --git a/data/examples/14games/awari.bas b/data/examples/14games/awari.bas new file mode 100644 index 0000000000000000000000000000000000000000..6f8ab5730f663d83044292307b22f00a7eb6aa29 --- /dev/null +++ b/data/examples/14games/awari.bas @@ -0,0 +1,71 @@ +5 REM "AWARI" +7 REM "Ported by Stefan in 2022" +10 DATA 0 +12 PRINT "AWARI" +15 DIM B(13+1),G(13+1),F(50+1):N=0 +20 PRINT:PRINT:E=0 +25 FOR I=0 TO 12:B(I+1)=3:NEXT I +30 C=0:F(N+1)=0:B(13+1)=0:B(6+1)=0 +35 GOSUB 500 +40 PRINT "YOUR MOVE";:GOSUB 110 +45 IF E=0 THEN 80 +50 IF M=H THEN GOSUB 100 +55 IF E=0 THEN 80 +60 PRINT "MY MOVE IS ";:GOSUB 800 +65 IF E=0 THEN 80 +70 IF M=H THEN PRINT ",";:GOSUB 800 +75 IF E>0 THEN 35 +80 PRINT:PRINT"GAME OVER" +85 D=B(6)-B(13+1):IF D<0 THEN PRINT "I WIN BY",-D,"POINTS":GOTO 20 +90 N=N+1:IF D=0 THEN PRINT "DRAWN GAME":GOTO 20 +95 PRINT "YOU WIN BY",D,"POINTS":GOTO 20 +100 PRINT "AGAIN"; +110 INPUT M:IF M<7 THEN IF M>0 THEN M=M-1:GOTO 130 +120 PRINT "ILLEGAL MOVE":GOTO 100 +130 IF B(M+1)=0 THEN 120 +140 H=6:GOSUB 200 +150 GOTO 500 +200 K=M:GOSUB 600 +205 E=0:IF K>6 THEN K=K-7 +210 C=C+1:IF C<9 THEN F(N+1)=F(N+1)*6+K +215 FOR I=0 TO 5:IF B(I+1)<>0 THEN 230 +220 NEXT I +225 RETURN +230 FOR I=7 TO 12:IF B(I+1)<>0 THEN E=1:RETURN +235 GOTO 220 +500 PRINT:PRINT" "; +505 FOR I=12 TO 7 STEP -1:GOSUB 580 +510 NEXT I +515 PRINT:I=13:GOSUB 580 +520 PRINT " ";:PRINT B(6+1):PRINT " "; +525 FOR I=0 TO 5:GOSUB 580 +530 NEXT I +535 PRINT:PRINT:RETURN +580 IF B(I+1)<10 THEN PRINT " "; +585 PRINT B(I+1);:RETURN +600 P=B(M+1):B(M+1)=0 +605 FOR P=P TO 1 STEP -1:M=M+1:IF M>13 THEN M=M-14 +610 B(M+1)=B(M+1)+1:NEXT P +615 IF B(M+1)=1 THEN IF M<>6 THEN IF M<>13 THEN IF B(12-M+1)<>0 THEN 625 +620 RETURN +625 B(H+1)=B(H+1)+B(12-M+1)+1:B(M+1)=0:B(12-M+1)=0:RETURN +800 D=-99:H=13 +805 FOR I=0 TO 13:G(I+1)=B(I+1):NEXT I +810 FOR J=7 TO 12:IF B(J+1)=0 THEN 885 +815 G=0:M=J:GOSUB 600 +820 FOR I=0 TO 5:IF B(I+1)=0 THEN 845 +825 L=B(I+1)+I:R=0 +830 IF L>13 THEN L=L-14:R=1:GOTO 830 +835 IF B(L+1)=0 THEN IF L<>6 THEN IF L<>13 THEN R=B(12-L+1)+R +840 IF R>Q THEN Q=R +845 NEXT I +850 Q=B(13)-B(6)-Q:IF C>8 THEN 875 +855 K=J:IF K>6 THEN K=K-7 +860 FOR I=0 TO N-1:IF F(N+1)*6+K=INT(POW(F(I+1)/6,(7-C))+0.1) THEN Q=Q-2 +870 NEXT I +875 FOR I=0 TO 13:B(I+1)=G(I+1):NEXT I +880 IF Q>=D THEN A=J:D=Q +885 NEXT J +890 M=A: PUT 42+M:GOTO 200 +900 FOR I=0 TO N-1:PRINT B(I+1):NEXT I +999 END diff --git a/data/examples/14games/bagels.bas b/data/examples/14games/bagels.bas new file mode 100644 index 0000000000000000000000000000000000000000..b3ba2eca84bb18d77fd2ad0487532f846550bf5c --- /dev/null +++ b/data/examples/14games/bagels.bas @@ -0,0 +1,80 @@ +10 REM "Bagels from 101 BASIC games" +11 REM "Originally written by D. Resek and P. Rowe" +12 REM "Ported to Stefan's BASIC in 2021" +15 @R=MILLIS(1) +30 DIM A1(6),A(3),B(3) +40 Y=0:T=255 +50 PRINT +70 INPUT "WOULD YOU LIKE THE RULES (YES OR NO)";A$ +90 IF A$(1,1)="N" OR A$(1,1)="n" THEN 150 +100 PRINT:PRINT "I AM THINKING OF A THREE-DIGIT NUMBER. TRY TO GUESS" +110 PRINT "MY NUMBER AND I WILL GIVE YOU CLUES AS FOLLOWS:" +120 PRINT " PICO - ONE DIGIT CORRECT BUT IN THE WRONG POSITION" +130 PRINT " FERMI - ONE DIGIT CORRECT AND IN THE RIGHT POSITION" +140 PRINT " BAGELS - NO DIGITS CORRECT" +150 FOR I=1 TO 3 +160 A(I)=INT(RND(10)) +165 IF I-1=0 THEN 200 +170 FOR J=1 TO I-1 +180 IF A(I)=A(J) THEN 160 +190 NEXT +200 NEXT +210 PRINT:PRINT "O.K. I HAVE A NUMBER IN MIND." +220 FOR I=1 TO 20 +230 PRINT "GUESS #",I, +240 INPUT A$ +245 IF LEN(A$)<>3 THEN 630 +250 FOR Z=1 TO 3:A1(Z)=A$(Z,Z):NEXT Z +260 FOR J=1 TO 3 +270 IF A1(J)<48 THEN 300 +280 IF A1(J)>57 THEN 300 +285 B(J)=A1(J)-48 +290 NEXT J +295 GOTO 320 +300 PRINT "WHAT?" +310 GOTO 230 +320 IF B(1)=B(2) THEN 650 +330 IF B(2)=B(3) THEN 650 +340 IF B(3)=B(1) THEN 650 +350 C=0:D=0 +360 FOR J=1 TO 2 +370 IF A(J)<>B(J+1) THEN 390 +380 C=C+1 +390 IF A(J+1)<>B(J) THEN 410 +400 C=C+1 +410 NEXT J +420 IF A(1)<>B(3) THEN 440 +430 C=C+1 +440 IF A(3)<>B(1) THEN 460 +450 C=C+1 +460 FOR J=1 TO 3 +470 IF A(J)<>B(J) THEN 490 +480 D=D+1 +490 NEXT J +500 IF D=3 THEN 680 +505 IF C=0 THEN 545 +520 FOR J=1 TO C +530 PRINT "PICO "; +540 NEXT J +545 IF D=0 THEN 580 +550 FOR J=1 TO D +560 PRINT "FERMI "; +570 NEXT J +580 IF C+D<>0 THEN 600 +590 PRINT "BAGELS"; +600 PRINT +605 NEXT I +610 PRINT "OH WELL." +615 PRINT "THAT'S TWNETY GUESSES. MY NUMBER WAS",100*A(1)+10*A(2)+A(3) +620 GOTO 700 +630 PRINT "TRY GUESSING A THREE-DIGIT NUMBER.":GOTO 230 +650 PRINT "OH, I FORGOT TO TELL YOU THAT THE NUMBER I HAVE IN MIND" +660 PRINT "HAS NO TWO DIGITS THE SAME.":GOTO 230 +680 PRINT "YOU GOT IT!!!":PRINT +690 Y=Y+1 +700 INPUT "PLAY AGAIN (YES OR NO)";A$ +720 IF A$(1,1)="Y" OR A$(1,1) = "y" THEN 150 +730 IF Y=0 THEN 750 +740 PRINT:PRINT "A",Y,"POINT BAGELS BUFF!!" +750 PRINT "HOPE YOU HAD FUN. BYE." +999 END diff --git a/data/examples/14games/banner.bas b/data/examples/14games/banner.bas new file mode 100644 index 0000000000000000000000000000000000000000..0a74e3b97c8e2a1adb30ca9eb9d921da96990458 --- /dev/null +++ b/data/examples/14games/banner.bas @@ -0,0 +1,95 @@ +10 INPUT "HORIZONTAL? ";X +20 INPUT "VERTICAL? ";Y +21 INPUT "CENTERED? ";L$ +22 G1=0:IF L$>"P" THEN G1=1 +23 INPUT "CHARACTER (TYPE 'ALL' IF YOU WANT CHARACTER BEING PRINTED)? ";M$ +29 PRINT "STATEMENT"; +30 INPUT A$ +35 INPUT "SET PAGE, THEN PRESS ENTER TO START.";O$ +40 A=A$(1) +50 REM +60 REM +70 FOR T=1 TO LEN(A$) +80 P$=A$(T, T) +81 IF P$>=97 AND P$<=122 THEN P$=(P$)-32 +90 FOR O=1 TO 50 +95 READ S$: FOR K=1 TO 7: READ S(K): NEXT +96 IF P$=" " THEN 812 +100 IF P$=S$ THEN 200 +120 NEXT O +200 RESTORE +201 X$=M$ +202 IF M$="ALL" THEN X$=S$ +205 FOR U=1 TO 7 +210 FOR K=8 TO 0 STEP -1 +230 IF POW(2,K)3/5 THEN 420 +400 PRINT O$;" CONTROLS THE TAP." +410 GOTO 3000 +420 PRINT "DARTMOUTH CONTROLS THE TAP." +425 PRINT +430 INPUT "YOUR SHOT: ";Z +440 P=0 +445 IF Z<>INT(Z) THEN 455 +446 IF Z<0 OR Z>4 THEN 455 +447 GOTO 460 +455 PRINT "INCORRECT ANSWER. RETYPE IT. ";:GOTO 430 +460 IF RND(1)<.5 THEN 1000 +480 IF T<100 THEN 1000 +490 PRINT +491 IF S(1+1)<>S(0+1) THEN 510 +492 PRINT:PRINT " ***** END OF SECOND HALF *****":PRINT +493 PRINT "SCORE AT END OF REGULATION TIME:" +494 PRINT " DARTMOUTH:";S(1+1);" ";O$;":";S(0+1) +495 PRINT +496 PRINT "BEGIN TWO MINUTE OVERTIME PERIOD" +499 T=93 +500 GOTO 370 +510 PRINT " ***** END OF GAME *****" +515 PRINT "FINAL SCORE: DARTMOUTH:";S(1+1);" ";O$;":";S(0+1) +520 STOP +600 PRINT +610 PRINT " *** TWO MINUTES LEFT IN THE GAME ***" +620 PRINT +630 RETURN +1000 ON Z GOTO 1040,1040 +1030 GOTO 1300 +1040 T=T+1 +1041 IF T=50 THEN 8000 +1042 IF T=92 THEN 1046 +1043 GOTO 1050 +1046 GOSUB 600 +1050 PRINT "JUMP SHOT" +1060 IF RND(1)>0.341*D/8 THEN 1090 +1070 PRINT "SHOT IS GOOD." +1075 GOSUB 7000 +1085 GOTO 3000 +1090 IF RND(1)>.682*D/8 THEN 1200 +1100 PRINT "SHOT IS OFF TARGET." +1105 IF D/6*RND(1)>0.45 THEN 1130 +1110 PRINT "DARTMOUTH CONTROLS THE REBOUND." +1120 GOTO 1145 +1130 PRINT "REBOUND TO ";O$ +1140 GOTO 3000 +1145 IF RND(1)>.4 THEN 1158 +1150 GOTO 1300 +1158 IF D=6 THEN 5100 +1160 PRINT "BALL PASSED BACK TO YOU. "; +1170 GOTO 430 +1180 IF RND(1)>0.9 THEN 1190 +1185 PRINT "PLAYER FOULED, TWO SHOTS." +1187 GOSUB 4000 +1188 GOTO 3000 +1190 PRINT "BALL STOLEN. ";O$;"'S BALL." +1195 GOTO 3000 +1200 IF RND(1)>0.782*D/8 THEN 1250 +1210 PRINT "SHOT IS BLOCKED. BALL CONTROLLED BY "; +1230 IF RND(1)>0.5 THEN 1242 +1235 PRINT "DARTMOUTH." +1240 GOTO 430 +1242 PRINT O$;"." +1245 GOTO 3000 +1250 IF RND(1)>0.843*D/8 THEN 1270 +1255 PRINT "SHOOTER IS FOULED. TWO SHOTS." +1260 GOSUB 4000 +1265 GOTO 3000 +1270 PRINT "CHARGING FOUL. DARTMOUTH LOSES BALL." +1280 GOTO 3000 +1300 T=T+1 +1301 IF T=50 THEN 8000 +1302 IF T=92 THEN 1304 +1303 GOTO 1305 +1304 GOSUB 600 +1305 IF Z=0 THEN 2010 +1310 IF Z>3 THEN 1700 +1320 PRINT "LAY UP." +1330 IF 7/D*RND(1)>0.4 THEN 1360 +1340 PRINT "SHOT IS GOOD. TWO POINTS." +1345 GOSUB 7000 +1355 GOTO 3000 +1360 IF 7/D*RND(1)>0.7 THEN 1500 +1370 PRINT "SHOT IS OFF THE RIM." +1380 IF RND(1)>2/3 THEN 1415 +1390 PRINT O$;" CONTROLS THE REBOUND." +1400 GOTO 3000 +1415 PRINT "DARTMOUTH CONTROLS THE REBOUND." +1420 IF RND(1)>.4 THEN 1440 +1430 GOTO 1300 +1440 PRINT "BALL PASSED BACK TO YOU. "; +1450 GOTO 430 +1500 IF 7/D*RND(1)>0.875 THEN 1600 +1510 PRINT "SHOOTER FOULED. TWO SHOTS." +1520 GOSUB 4000 +1530 GOTO 3000 +1600 IF 7/D*RND(1)>0.925 THEN 1630 +1610 PRINT "SHOT BLOCKED. ";O$;"'S BALL." +1620 GOTO 3000 +1630 PRINT "CHARGING FOUL. DARTMOUTH LOSES THE BALL." +1640 GOTO 3000 +1700 PRINT "SET SHOT." +1710 GOTO 1330 +2010 INPUT "YOUR NEW DEFENSIVE ALLIGNMENT IS: ";D +2030 IF D<6 THEN 2010 +2040 GOTO 425 +3000 P=1 +3005 T=T+1 +3008 IF T=50 THEN 8000 +3012 GOTO 3018 +3015 GOSUB 600 +3018 PRINT +3020 Z1=10/4*RND(1)+1 +3030 IF Z1>2 THEN 3500 +3040 PRINT "JUMP SHOT." +3050 IF 8/D*RND(1)>.35 THEN 3100 +3060 PRINT "SHOT IS GOOD." +3080 GOSUB 6000 +3090 GOTO 425 +3100 IF 8/D*RND(1)>0.75 THEN 3200 +3105 PRINT "SHOT IS OFF RIM." +3110 IF D/6*RND(1)>0.5 THEN 3150 +3120 PRINT "DARTMOUTH CONTROLS THE REBOUND." +3130 GOTO 425 +3150 PRINT O$;" CONTROLS THE REBOUND." +3160 IF D=6 THEN 5000 +3165 IF RND(1)>.5 THEN 3175 +3168 PRINT "PASS BACK TO ";O$;" GUARD." +3170 GOTO 3000 +3175 GOTO 3500 +3200 IF 8/D*RND(1)>0.9 THEN 3310 +3210 PRINT "PLAYER FOULED. TWO SHOTS." +3220 GOSUB 4000 +3230 GOTO 425 +3310 PRINT "OFFENSIVE FOUL. DARTMOUTH'S BALL." +3320 GOTO 425 +3500 IF Z1>3 THEN 3800 +3510 PRINT "LAY UP." +3520 IF 7/D*RND(1)>0.413 THEN 3600 +3530 PRINT "SHOT IS GOOD." +3540 GOSUB 6000 +3550 GOTO 425 +3600 PRINT "SHOT IS MISSED." +3610 GOTO 3110 +3800 PRINT "SET SHOT." +3810 GOTO 3520 +4000 REM FOUL SHOOTING +4010 IF RND(1)>0.49 THEN 4050 +4020 PRINT "SHOOTER MAKES BOTH SHOTS." +4030 S(1-P+1)=S(1-P+1)+2 +4040 GOSUB 6010 +4041 RETURN +4050 IF RND(1)>0.75 THEN 4100 +4060 PRINT "SHOOTER MAKES ONE SHOT AND MISSES ONE." +4070 S(1-P+1)=S(1-P+1)+1 +4080 GOTO 4040 +4100 PRINT "BOTH SHOTS MISSED." +4110 GOTO 4040 +5000 IF RND(1)>0.75 THEN 5010 +5005 GOTO 3165 +5010 PRINT "BALL STOLEN. EASY LAY UP FOR DARTMOUTH." +5015 GOSUB 7000 +5030 GOTO 3000 +5100 IF RND(1)>0.6 THEN 5120 +5110 GOTO 1160 +5120 PRINT "PASS STOLEN BY ";O$;" EASY LAYUP." +5130 GOSUB 6000 +5140 GOTO 425 +6000 S(0+1)=S(0+1)+2 +6010 PRINT "SCORE: ";S(1+1);" TO ";S(0+1) +6020 RETURN +7000 S(1+1)=S(1+1)+2 +7010 GOSUB 6010 +7020 RETURN +8000 PRINT:PRINT " ***** END OF FIRST HALF *****":PRINT +8010 PRINT "SCORE: DARTMOUTH: ";S(1+1);" ";O$;":";S(0+1) +8015 PRINT +8016 PRINT +8020 GOTO 370 +9999 END diff --git a/data/examples/14games/batnum.bas b/data/examples/14games/batnum.bas new file mode 100644 index 0000000000000000000000000000000000000000..bab1f9e664cc220aeba9c2e112ce864e4909fff1 --- /dev/null +++ b/data/examples/14games/batnum.bas @@ -0,0 +1,93 @@ +10 REM "BATNUM" +20 REM "Ported by Stefan in 2022" +30 REM +110 PRINT "THIS PROGRAM IS A 'BATTLE OF NUMBERS' GAME, WHERE THE" +120 PRINT "COMPUTER IS YOUR OPPONENT." +130 PRINT +140 PRINT "THE GAME STARTS WITH AN ASSUMED PILE OF OBJECTS. YOU" +150 PRINT "AND YOUR OPPONENT ALTERNATELY REMOVE OBJECTS FROM THE PILE." +160 PRINT "WINNING IS DEFINED IN ADVANCE AS TAKING THE LAST OBJECT OR" +170 PRINT "NOT. YOU CAN ALSO SPECIFY SOME OTHER BEGINNING CONDITIONS." +180 PRINT "DON'T USE ZERO, HOWEVER, IN PLAYING THE GAME." +190 PRINT "ENTER A NEGATIVE NUMBER FOR NEW PILE SIZE TO STOP PLAYING." +200 PRINT +210 GOTO 330 +220 FOR I=1 TO 10 +230 PRINT +240 NEXT I +330 INPUT "ENTER PILE SIZE: ";N +340 IF N<0 THEN END +350 IF N>=1 THEN 370 +360 GOTO 330 +370 IF N<>INT(N) THEN 220 +380 IF N<1 THEN 220 +390 INPUT "ENTER WIN OPTION - 1 TO TAKE LAST, 2 TO AVOID LAST: ";M +410 IF M=1 THEN 430 +420 IF M<>2 THEN 390 +430 PRINT "ENTER MIN AND MAX; " +438 INPUT "MIN: ",A +445 INPUT "MAX: ",B +450 IF A>B THEN 430 +460 IF A<1 THEN 430 +470 IF A<>INT(A) THEN 430 +480 IF B<>INT(B) THEN 430 +490 INPUT "ENTER START OPTION - 1 COMPUTER FIRST, 2 YOU FIRST: ";S +500 PRINT:PRINT +510 IF S=1 THEN 530 +520 IF S<>2 THEN 490 +530 C=A+B +540 IF S=2 THEN 570 +550 GOSUB 600 +560 IF W=1 THEN 220 +570 GOSUB 810 +580 IF W=1 THEN 220 +590 GOTO 550 +600 Q=N +610 IF M=1 THEN 630 +620 Q=Q-1 +630 IF M=1 THEN 680 +640 IF N>A THEN 720 +650 W=1 +660 PRINT "COMPUTER TAKES ";N;" AND LOSES." +670 RETURN +680 IF N>B THEN 720 +690 W=1 +700 PRINT "COMPUTER TAKES ";N;" AND WINS." +710 RETURN +720 P=Q-C*INT(Q/C) +730 IF P>=A THEN 750 +740 P=A +750 IF P<=B THEN 770 +760 P=B +770 N=N-P +780 PRINT "COMPUTER TAKES ";P;" AND LEAVES ";N +790 W=0 +800 RETURN +810 PRINT +820 INPUT "YOUR MOVE: ";P +830 IF P<>0 THEN 870 +840 PRINT "I TOLD YOU NOT TO USE ZERO! COMPUTER WINS BY FORFEIT." +850 W=1 +860 RETURN +870 IF P<>INT(P) THEN 920 +880 IF P>=A THEN 910 +890 IF P=N THEN 960 +900 GOTO 920 +910 IF P<=B THEN 940 +920 PRINT "ILLEGAL MOVE, REENTER IT "; +930 GOTO 820 +940 N=N-P +950 IF N<>0 THEN 1030 +960 IF M=1 THEN 1000 +970 PRINT "TOUGH LUCK, YOU LOSE." +980 W=1 +990 RETURN +1000 PRINT "CONGRATULATIONS, YOU WIN." +1010 W=1 +1020 RETURN +1030 IF N>=0 THEN 1060 +1040 N=N+P +1050 GOTO 920 +1060 W=0 +1070 RETURN +1080 END diff --git a/data/examples/14games/battle.bas b/data/examples/14games/battle.bas new file mode 100644 index 0000000000000000000000000000000000000000..e19140c7e1fb29adab9517920927123254c6b0d7 --- /dev/null +++ b/data/examples/14games/battle.bas @@ -0,0 +1,196 @@ +5 REM "BATTLE" +7 REM "Ported by Stefan in 2022 +10 REM -- BATTLE WRITTEN BY RAY WESTERGARD 10/70 +20 REM COPYRIGHT 1971 BY THE REGENTS OF THE UNIV. OF CALIF. +30 REM PRODUCED AT THE LAWRENCE HALL OF SCIENCE, BERKELEY +40 DIM F(6,6),H(6,6),A(4),B(4),C(6),L(3) +50 FOR X=1 TO 6 +51 FOR Y=1 TO 6 +52 F(X,Y)=0 +53 NEXT Y +54 NEXT X +60 FOR I=1 TO 3 +70 N=4-I +80 FOR J=1 TO 2 +90 A=INT(6*RND(1)+1) +100 B=INT(6*RND(1)+1) +110 D=INT(4*RND(1)+1) +120 IF F(A,B)>0 THEN 90 +130 M=0 +140 ON D GOTO 150,340,550,740 +150 B(1)=B +160 B(2)=7:B(3)=7 +170 FOR K=1 TO N +180 IF M>1 THEN 240 +190 IF B(K)=6 THEN 230 +200 IF F(A,B(K)+1)>0 THEN 230 +210 B(K+1)=B(K)+1 +220 GOTO 280 +230 M=2 +240 IF B(1)0 THEN 90 +270 B(K+1)=Z-1 +280 NEXT K +290 F(A,B)=9-2*I-J +300 FOR K=1 TO N +310 F(A,B(K+1))=F(A,B) +320 NEXT K +330 GOTO 990 +340 A(1)=A +350 B(1)=B +360 A(2)=0:A(3)=0:B(2)=0:B(3)=0 +370 FOR K=1 TO N +380 IF M>1 THEN 460 +390 IF A(K)=1 OR B(K)=1 THEN 450 +400 IF F(A(K)-1,B(K)-1)>0 THEN 450 +410 IF F(A(K)-1,B(K))>0 AND F(A(K)-1,B(K))=F(A(K),B(K)-1) THEN 450 +420 A(K+1)=A(K)-1 +430 B(K+1)=B(K)-1 +440 GOTO 530 +450 M=2 +460 IF A(1)>A(2) AND A(1)>A(3) THEN Z1=A(1) +462 IF A(2)>A(1) AND A(2)>A(3) THEN Z1=A(2) +464 IF A(3)>A(1) AND A(3)>A(2) THEN Z1=A(3) +470 IF B(1)>B(2) AND B(1)>B(3) THEN Z2=B(1) +474 IF B(2)>B(1) AND B(2)>B(3) THEN Z2=B(2) +476 IF B(3)>B(1) AND B(3)>B(2) THEN Z2=B(3) +480 IF Z1=6 OR Z2=6 THEN 90 +490 IF F(Z1+1,Z2+1)>0 THEN 90 +500 IF F(Z1,Z2+1)>0 AND F(Z1,Z2+1)=F(Z1+1,Z2) THEN 90 +510 A(K+1)=Z1+1 +520 B(K+1)=Z2+1 +530 NEXT K +540 GOTO 950 +550 A(1)=A +560 A(2)=7:A(3)=7 +570 FOR K=1 TO N +580 IF M>1 THEN 640 +590 IF A(K)=6 THEN 630 +600 IF F(A(K)+1,B)>0 THEN 630 +610 A(K+1)=A(K)+1 +620 GOTO 680 +630 M=2 +640 IF A(1)0 THEN 90 +670 A(K+1)=Z-1 +680 NEXT K +690 F(A,B)=9-2*I-J +700 FOR K=1 TO N +710 F(A(K+1),B)=F(A,B) +720 NEXT K +730 GOTO 990 +740 A(1)=A +750 B(1)=B +760 A(2)=7:A(3)=7 +770 B(2)=0:B(3)=0 +780 FOR K=1 TO N +790 IF M>1 THEN 870 +800 IF A(K)=6 OR B(K)=1 THEN 860 +810 IF F(A(K)+1,B(K)-1)>0 THEN 860 +820 IF F(A(K)+1,B(K))>0 AND F(A(K)+1,B(K))=F(A(K),B(K)-1) THEN 860 +830 A(K+1)=A(K)+1 +840 B(K+1)=B(K)-1 +850 GOTO 940 +860 M=2 +870 IF A(1)B(2) AND B(1)>B(3) THEN Z2=B(1) +882 IF B(2)>B(1) AND B(2)>B(3) THEN Z2=B(2) +884 IF B(3)>B(1) AND B(3)>B(2) THEN Z2=B(3) +890 IF Z1=1 OR Z2=6 THEN 90 +900 IF F(Z1-1,Z2+1)>0 THEN 90 +910 IF F(Z1,Z2+1)>0 AND F(Z1,Z2+1)=F(Z1-1,Z2) THEN 90 +920 A(K+1)=Z1-1 +930 B(K+1)=Z2+1 +940 NEXT K +950 F(A,B)=9-2*I-J +960 FOR K=1 TO N +970 F(A(K+1),B(K+1))=F(A,B) +980 NEXT K +990 NEXT J +1000 NEXT I +1010 PRINT +1020 PRINT "THE FOLLOWING CODE OF THE BAD GUYS' FLEET DISPOSITION" +1030 PRINT "HAS BEEN CAPTURED BUT NOT DECODED:" +1040 PRINT +1050 FOR I=1 TO 6 +1051 FOR J=1 TO 6 +1052 H(I,J)=F(J,I) +1053 NEXT J +1054 NEXT I +1060 FOR I=1 TO 6 +1061 FOR J=1 TO 6 +1062 PRINT H(I,J); +1063 NEXT J +1064 PRINT +1065 NEXT I +1070 PRINT +1080 PRINT "DE-CODE IT AND USE IT IF YOU CAN" +1090 PRINT "BUT KEEP THE DE-CODING METHOD A SECRET." +1100 PRINT +1110 FOR I=1 TO 6 +1111 FOR J=1 TO 6 +1112 H(I,J)=0 +1113 NEXT J +1114 NEXT I +1120 FOR I=1 TO 3 +1121 L(I)=0 +1122 NEXT I +1130 C(1)=2:C(2)=2 +1140 C(3)=1:C(4)=1 +1150 C(5)=0:C(6)=0 +1160 S=0:H=0 +1170 PRINT "START GAME" +1180 INPUT "X,Y? ",X,Y +1190 IF X<1 OR X>6 OR INT(X)<>ABS(X) THEN 1210 +1200 IF Y>0 AND Y<7 AND INT(Y)=ABS(Y) THEN 1230 +1210 PRINT "INVALID INPUT. TRY AGAIN." +1220 GOTO 1180 +1230 R=7-Y +1240 C=X +1250 IF F(R,C)>0 THEN 1290 +1260 S=S+1 +1270 PRINT "SPLASH! TRY AGAIN." +1280 GOTO 1180 +1290 IF C(F(R,C))<4 THEN 1340 +1300 PRINT "THERE USED TO BE A SHIP AT THAT POINT, BUT YOU SUNK IT." +1310 PRINT "SPLASH! TRY AGAIN." +1320 S=S+1 +1330 GOTO 1180 +1340 IF H(R,C)>0 THEN 1420 +1350 H=H+1 +1360 H(R,C)=F(R,C) +1370 PRINT "A DIRECT HIT ON SHIP NUMBER",F(R,C) +1380 C(F(R,C))=C(F(R,C))+1 +1390 IF C(F(R,C))>=4 THEN 1470 +1400 PRINT "TRY AGAIN." +1410 GOTO 1180 +1420 PRINT "YOU ALREADY PUT A HOLE IN SHIP NUMBER",F(R,C); +1430 PRINT "AT THAT POINT." +1440 PRINT "SPLASH! TRY AGAIN." +1450 S=S+1 +1460 GOTO 1180 +1470 L((INT(F(R,C)-1)/2)+1)=L((INT(F(R,C)-1)/2)+1)+1 +1480 PRINT "AND YOU SUNK IT. HURRAH FOR THE GOOD GUYS." +1490 PRINT "SO FAR, THE BAD GUYS HAVE LOST" +1500 PRINT L(1),"DESTROYER(S),",L(2),"CRUISER(S), AND", +1510 PRINT L(3),"AIRCRAFT CARRIER(S)." +1520 PRINT "YOUR CURRENT SPLASH/HIT RATIO IS",S/H +1530 IF (L(1)+L(2)+L(3))<6 THEN 1180 +1540 PRINT +1550 PRINT "YOU HAVE TOTALLY WIPED OUT THE BAD GUYS' FLEET" +1560 PRINT "WITH A FINAL SPLASH/HIT RATIO OF",S/H +1570 IF S/H>0 THEN 1590 +1580 PRINT "CONGRATULATIONS -- A DIRECT HIT EVERY TIME." +1590 PRINT +1600 PRINT "****************************" +1610 PRINT +1620 GOTO 50 +1630 END diff --git a/data/examples/14games/blackjk.bas b/data/examples/14games/blackjk.bas new file mode 100644 index 0000000000000000000000000000000000000000..20ba0ce01bdca0447b888c247e5b8825d92eac11 --- /dev/null +++ b/data/examples/14games/blackjk.bas @@ -0,0 +1,324 @@ +2 REM "BLACK JACK" +4 REM "Ported by Stefan in 2022" +6 REM +10 DEF FNA(Q)=Q+11*(Q>=22) +20 DIM P(15,12),Q(15),C(52),D(52),T(8),S(7),B(15) +30 DIM R(15) +35 DIM D$(40) +40 REM--P(I,J) IS THE JTH CARD IN HAND I, Q(I) IS TOTAL OF HAND I +50 REM--C IS THE DECK BEING DEALT FROM, D IS THE DISCARD PILE, +60 REM--T(I) IS THE TOTAL FOR PLAYER I, S(I) IS THE TOTAL THIS HAND FOR +70 REM--PLAYER I, B(I) IS TH BET FOR HAND I +80 REM--R(I) IS THE LENGTH OF P(I,*) +90 GOTO 1500 +100 REM--SUBROUTINE TO GET A CARD. RESULT IS PUT IN X. +110 IF C<51 THEN 230 +120 PRINT "RESHUFFLING" +130 FOR D=D TO 1 STEP -1 +140 C=C-1 +150 C(C)=D(D) +160 NEXT D +170 FOR C1=52 TO C STEP -1 +180 C2=INT(RND(1)*(C1-C+1))+C +190 C3=C(C2) +200 C(C2)=C(C1) +210 C(C1)=C3 +220 NEXT C1 +230 X=C(C) +240 C=C+1 +250 RETURN +300 REM--SUBROUTINE TO EVALUATE HAND I. TOTAL IS PUT INTO +310 REM--Q(I). TOTALS HAVE THE FOLLOWING MEANING: +320 REM-- 2-10...HARD 2-10 +330 REM-- 11-21...SOFT 11-21 +340 REM-- 22-32...HARD 11-21 +350 REM-- 33+....BUSTED +360 Q=0 +370 FOR Q2=1 TO R(I) +380 X=P(I,Q2) +390 GOSUB 500 +400 NEXT Q2 +410 Q(I)=Q +420 RETURN +500 REM--SUBROUTINE TO ADD CARD X TO TOTAL Q. +510 X1=X: IF X1>10 THEN X1=10: REM SAME AS X1=10 MIN X +520 Q1=Q+X1 +530 IF Q>=11 THEN 590 +540 IF X>1 THEN 570 +550 Q=Q+11 +560 RETURN +570 Q=Q1-11*(Q1>=11) +580 RETURN +590 Q=Q1-(Q<=21 AND Q1>21) +600 IF Q<33 THEN 620 +610 Q=-1 +620 RETURN +700 REM--CARD PRINTING SUBROUTINE +710 REM D$ DEFINED ELSEWHERE +720 REM PRINT MID$(D$,,3); +721 PRINT D$(3*X-2, 3*X); +730 PRINT " "; +740 RETURN +750 REM--ALTERNATIVE PRINTING ROUTINE +760 REM PRINT " ";MID$(D$,3*X-1,2); +761 PRINT " ";D$(3*X-1, 3*X); +770 PRINT " "; +780 RETURN +800 REM--SUBROUTINE TO PLAY OUT A HAND. +810 REM--NO SPLITTING OR BLACKJACKS ALLOWED +820 H1=5 +830 GOSUB 1410 +840 H1=3 +850 ON H GOTO 950,930 +860 GOSUB 100 +870 B(I)=B(I)*2 +880 PRINT "RECEIVED A"; +890 GOSUB 700 +900 GOSUB 1100 +910 IF Q>0 THEN GOSUB 1300 +920 RETURN +930 GOSUB 1320 +940 RETURN +950 GOSUB 100 +960 PRINT "RECEIVED A"; +970 GOSUB 700 +980 GOSUB 1100 +990 IF Q<0 THEN 940 +1000 PRINT "HIT"; +1010 GOTO 830 +1100 REM--SUBROUTINE TO ADD A CARD TO ROW I +1110 R(I)=R(I)+1 +1120 P(I,R(I))=X +1130 Q=Q(I) +1140 GOSUB 500 +1150 Q(I)=Q +1160 IF Q>=0 THEN 1190 +1170 PRINT "...BUSTED" +1180 GOSUB 1200 +1190 RETURN +1200 REM--SUBROUTINE TO DISCARD ROW I +1210 IF R(I)<>0 THEN 1230 +1220 RETURN +1230 D=D+1 +1240 D(D)=P(I,R(I)) +1250 R(I)=R(I)-1 +1260 GOTO 1210 +1300 REM--PRINTS TOTAL OF HAND I +1310 PRINT +1320 A0=Q(I): GOSUB 3400 +1325 PRINT "TOTAL IS",A0 +1330 RETURN +1400 REM--SUBROUTINE TO READ REPLY +1410 REM I$ DEFINED ELSEWHERE +1420 INPUT H$: H$=H$(1,1) +1430 FOR H=1 TO H1 STEP 2 +1440 IF H$=I$(H,H) THEN 1480 +1450 NEXT H +1460 PRINT "TYPE ";I$(1,H1);" OR ";I$(H1,H1+1);" PLEASE"; +1470 GOTO 1420 +1480 H=(H+1)/2 +1490 RETURN +1500 REM--PROGRAM STARTS HERE +1510 REM--INITIALIZE +1520 D$="N A 2 3 4 5 6 7N 8 9 10 J Q K" +1530 I$="H,S,D,/," +1540 FOR I=1 TO 13 +1550 FOR J=4*I-3 TO 4*I +1560 D(J)=I +1570 NEXT J +1580 NEXT I +1590 D=52 +1600 C=53 +1610 PRINT "DO YOU WANT INSTRUCTIONS"; +1620 INPUT H$ +1630 IF H$(1,1)="N" OR H$(1,1)="n" THEN 1760 +1640 PRINT "THIS IS THE GAME OF 21. AS MANY AS 7 PLAYERS MAY PLAY THE" +1650 PRINT "GAME. ON EACH DEAL, BETS WILL BE ASKED FOR, AND THE" +1660 PRINT "PLAYERS' BETS SHOULD BE TYPED IN. THE CARDS WILL THEN BE" +1670 PRINT "DEALT, AND EACH PLAYER IN TURN PLAYS HIS HAND. THE" +1680 PRINT "FIRST RESPONSE SHOULD BE EITHER 'D', INDICATING THAT THE" +1690 PRINT "PLAYER IS DOUBLING DOWN, 'S', INDICATING THAT HE IS" +1700 PRINT "STANDING, 'H', INDICATING HE WANTS ANOTHER CARD, OR '/'," +1710 PRINT "INDICATING THAT HE WANTS TO SPLIT HIS CARDS. AFTER THE" +1720 PRINT "INITIAL RESPONSE, ALL FURTHER RESPONSES SHOULD BE 'S' OR" +1730 PRINT "'H', UNLESS THE CARDS WERE SPLIT, IN WHICH CASE DOUBLING" +1740 PRINT "DOWN IS AGAIN PERMITTED. IN ORDER TO COLLECT FOR" +1750 PRINT "BLACKJACK, THE INITIAL RESPONSE SHOULD BE 'S'." +1760 PRINT "NUMBER OF PLAYERS"; +1770 INPUT N +1775 PRINT +1780 IF N<1 OR N>7 OR N>INT(N) THEN 1760 +1790 FOR I=1 TO 8: T(I)=0: NEXT I +1800 D1=N+1 +1810 IF 2*D1+C>=52 THEN GOSUB 120 +1820 IF C=2 THEN C=C-1 +1830 FOR I=1 TO N: Z(I)=0: NEXT I +1840 FOR I=1 TO 15: B(I)=0: NEXT I +1850 FOR I=1 TO 15: Q(I)=0: NEXT I +1860 FOR I=1 TO 7: S(I)=0: NEXT I +1870 FOR I=1 TO 15: R(I)=0: NEXT I +1880 PRINT "BETS:" +1890 FOR I=1 TO N: PRINT "#";I;: INPUT Z(I): NEXT I +1900 FOR I=1 TO N +1910 IF Z(I)<=0 OR Z(I)>500 THEN 1880 +1920 B(I)=Z(I) +1930 NEXT I +1940 PRINT "PLAYER "; +1950 FOR I=1 TO N +1960 PRINT I;" "; +1970 NEXT I +1980 PRINT "DEALER" +1990 FOR J=1 TO 2 +2000 TAB(5) +2010 FOR I=1 TO D1 +2020 GOSUB 100 +2030 P(I,J)=X +2040 IF J=1 OR I<=N THEN GOSUB 750 +2050 NEXT I +2060 PRINT +2070 NEXT J +2080 FOR I=1 TO D1 +2090 R(I)=2 +2100 NEXT I +2110 REM--TEST FOR INSURANCE +2120 IF P(D1,1)>1 THEN 2240 +2130 PRINT "ANY INSURANCE"; +2140 INPUT H$ +2150 IF H$(1,1)<>"Y" THEN 2240 +2160 PRINT "INSURANCE BETS" +2170 FOR I=1 TO N: PRINT "#";I;: INPUT Z(I): NEXT I +2180 FOR I=1 TO N +2190 IF Z(I)<0 OR Z(I)>B(I)/2 THEN 2160 +2200 NEXT I +2210 FOR I=1 TO N +2220 S(I)=Z(I)*(3*(-(P(D1,2)>=10))-1) +2230 NEXT I +2240 REM--TEST FOR DEALER BLACKJACK +2250 L1=1: L2=1 +2252 IF P(D1,1)=1 AND P(D1,2)>9 THEN L1=0: L2=0 +2253 IF P(D1,2)=1 AND P(D1,1)>9 THEN L1=0: L2=0 +2254 IF L1<>0 OR L2<>0 THEN 2320 +2260 PRINT:PRINT "DEALER HAS A ";MID$(D$,3*P(D1,2)-2,3);" IN THE HOLE "; +2270 PRINT "FOR BLACKJACK" +2280 FOR I=1 TO D1 +2290 GOSUB 300 +2300 NEXT I +2310 GOTO 3140 +2320 REM--NO DEALER BLACKJACK +2330 IF P(D1,1)>1 AND P(D1,1)<10 THEN 2350 +2340 PRINT:PRINT "NO DEALER BLACKJACK." +2350 REM--NOW PLAY THE HANDS +2360 FOR I=1 TO N +2370 PRINT "PLAYER ";I; +2380 H1=7 +2390 GOSUB 1410 +2400 ON H GOTO 2550,2410,2510,2600 +2410 REM--PLAYER WANTS TO STAND +2420 GOSUB 300 +2430 IF Q(I)<>21 THEN 2490 +2440 PRINT "BLACKJACK" +2450 S(I)=S(I)+1.5*B(I) +2460 B(I)=0 +2470 GOSUB 1200 +2480 GOTO 2900 +2490 GOSUB 1320 +2500 GOTO 2900 +2510 REM--PLAYER WANTS TO DOUBLE DOWN +2520 GOSUB 300 +2530 GOSUB 860 +2540 GOTO 2900 +2550 REM--PLAYER WANTS TO BE HIT +2560 GOSUB 300 +2570 H1=3 +2580 GOSUB 950 +2590 GOTO 2900 +2600 REM--PLAYER WANTS TO SPLIT +2610 L1=P(I,1): IF P(I,1)>10 THEN L1=10 +2612 L2=P(I,2): IF P(I,2)>10 THEN L2=10 +2614 IF L1=L2 THEN 2640 +2620 PRINT "SPLITTING NOT ALLOWED." +2630 GOTO 2370 +2640 REM--PLAY OUT SPLIT +2650 I1=I+D1 +2660 R(I1)=2 +2670 P(I1,1)=P(I,2) +2680 B(I+D1)=B(I) +2690 GOSUB 100 +2700 PRINT "FIRST HAND RECEIVES A"; +2710 GOSUB 700 +2720 P(I,2)=X +2730 GOSUB 300 +2740 PRINT +2750 GOSUB 100 +2760 PRINT "SECOND HAND RECEIVES A"; +2770 I=I1 +2780 GOSUB 700 +2790 P(I,2)=X +2800 GOSUB 300 +2810 PRINT +2820 I=I1-D1 +2830 IF P(I,1)=1 THEN 2900 +2840 REM--NOW PLAY THE TWO HANDS +2850 PRINT "HAND ";1-(I>D1); +2860 GOSUB 800 +2870 I=I+D1 +2880 IF I=I1 THEN 2850 +2890 I=I1-D1 +2900 NEXT I +2910 GOSUB 300 +2920 REM--TEST FOR PLAYING DEALER'S HAND +2930 FOR I=1 TO N +2940 IF R(I)>0 OR R(I+D1)>0 THEN 3010 +2950 NEXT I +2960 PRINT "DEALER HAD A"; +2970 X=P(D1,2) +2980 GOSUB 700 +2990 PRINT " CONCEALED." +3000 GOTO 3140 +3010 PRINT "DEALER HAS A ";D$(3*P(D1,2)-2,3*P(D1,2));" CONCEALED "; +3020 I=D1 +3030 A0=Q(I): GOSUB 3400 +3035 PRINT "FOR A TOTAL OF ";A0 +3040 IF A0>16 THEN 3130 +3050 PRINT "DRAWS"; +3060 GOSUB 100 +3070 GOSUB 750 +3080 GOSUB 1100 +3090 A0=Q: GOSUB 3400 +3095 IF Q>0 AND A0<17 THEN 3060 +3100 Q(I)=Q-(Q<0)/2 +3110 IF Q<0 THEN 3140 +3120 A0=Q: GOSUB 3400 +3125 PRINT "---TOTAL IS ";A0 +3130 PRINT +3140 REM--TALLY THE RESULT +3150 REM +3160 Z$="LOSES PUSHES WINS " +3165 PRINT +3170 FOR I=1 TO N +3180 A0=Q(I): GOSUB 3400 +3182 A1=Q(I+D1): GOSUB 3410 +3184 A2=Q(D1): GOSUB 3420 +3186 S(I)=S(I)+B(I)*SGN(A0-A2)+B(I+D1)*SGN(A1-A2) +3188 B(I+D1)=0 +3200 PRINT "PLAYER ";I;" "; +3210 PRINT Z$(SGN(S(I))*6+7,SGN(S(I))*6+7+5);" "; +3220 IF S(I)<>0 THEN 3250 +3230 PRINT " "; +3240 GOTO 3260 +3250 PRINT ABS(S(I)); +3260 T(I)=T(I)+S(I) +3270 PRINT " TOTAL=";T(I) +3280 GOSUB 1200 +3290 T(D1)=T(D1)-S(I) +3300 I=I+D1 +3310 GOSUB 1200 +3320 I=I-D1 +3330 NEXT I +3340 PRINT "DEALER'S TOTAL=";T(D1) +3345 PRINT +3350 GOSUB 1200 +3360 GOTO 1810 +3400 A0=A0+11*(A0>=22): RETURN +3410 A1=A1+11*(A1>=22): RETURN +3420 A2=A2+11*(A2>=22): RETURN diff --git a/data/examples/14games/bomb.bas b/data/examples/14games/bomb.bas new file mode 100644 index 0000000000000000000000000000000000000000..e3d18b901390696f62cd82bfd1a44e041c1dc0cf --- /dev/null +++ b/data/examples/14games/bomb.bas @@ -0,0 +1,94 @@ +10 REM "BOMBARDMENT" +20 REM "Ported by Stefan in 2022" +30 REM +40 @R=MILLIS(1) +100 PRINT "YOU ARE ON A BATTLEFIELD WITH 4 PLATOONS AND YOU" +110 PRINT "HAVE 25 OUTPOSTS AVAILABLE WHERE THEY MAY BE PLACED." +120 PRINT "YOU CAN ONLY PLACE ONE PLATOON AT ANY ONE OUTPOST." +130 PRINT "THE COMPUTER DOES THE SAME WITH ITS FOUR PLATOONS." +135 PRINT +140 PRINT "THE OBJECT OF THE GAME IS TO FIRE MISSLES AT THE" +150 PRINT "OUTPOSTS OF THE COMPUTER. IT WILL DO THE SAME TO YOU." +160 PRINT "THE ONE WHO DESTROYS ALL FOUR OF THE ENEMY'S PLATOONS" +170 PRINT "FIRST IS THE WINNER." +180 PRINT +190 PRINT "GOOD LUCK... AND TELL US WHERE YOU WANT THE BODIES SENT!" +200 PRINT +210 PRINT "TEAR OFF MATRIX AND USE IT TO CHECK OFF THE NUMBERS." +220 FOR R=1 TO 3: PRINT: NEXT R +260 DIM M(100) +270 FOR R=1 TO 5 +280 I=(R-1)*5+1 +290 PRINT #3,I,I+1,I+2,I+3,I+4 +300 NEXT R +350 FOR R=1 TO 3: PRINT: NEXT R +380 C=INT(RND(1)*25)+1 +390 D=INT(RND(1)*25)+1 +400 E=INT(RND(1)*25)+1 +410 F=INT(RND(1)*25)+1 +420 IF C=D THEN 390 +430 IF C=E THEN 400 +440 IF C=F THEN 410 +450 IF D=E THEN 400 +460 IF D=F THEN 410 +470 IF E=F THEN 410 +480 PRINT "WHAT ARE YOUR FOUR POSITIONS"; +490 INPUT G,H,K,L +495 PRINT +500 PRINT "WHERE DO YOU WISH TO FIRE YOUR MISSLE"; +510 INPUT Y +520 IF Y=C THEN 710 +530 IF Y=D THEN 710 +540 IF Y=E THEN 710 +550 IF Y=F THEN 710 +560 GOTO 630 +570 M=INT(RND(1)*25)+1 +575 GOTO 1160 +580 IF X=G THEN 920 +590 IF X=H THEN 920 +600 IF X=L THEN 920 +610 IF X=K THEN 920 +620 GOTO 670 +630 PRINT "HA, HA YOU MISSED. MY TURN NOW:" +640 PRINT: PRINT: GOTO 570 +670 PRINT "I MISSED YOU. I PICKED ";M;". YOUR TURN:" +680 PRINT: PRINT: GOTO 500 +710 Q=Q+1 +720 IF Q=4 THEN 890 +730 PRINT "YOU GOT ONE OF MY OUTPOSTS!" +740 IF Q=1 THEN 770 +750 IF Q=2 THEN 810 +760 IF Q=3 THEN 850 +770 PRINT "ONE DOWN, THREE TO GO." +780 PRINT: PRINT: GOTO 570 +810 PRINT "TWO DOWN, TWO TO GO." +820 PRINT: PRINT: GOTO 570 +850 PRINT "THREE DOWN, ONE TO GO." +860 PRINT: PRINT: GOTO 570 +890 PRINT "YOU GOT ME, I'M GOING FAST. BUT I'LL GET YOU WHEN" +900 PRINT "MY TRANSISTO&S RECUP%RA*E!" +910 GOTO 1235 +920 Z=Z+1 +930 IF Z=4 THEN 1110 +940 PRINT "I GOT YOU. IT WON'T BE LONG NOW. POST ";X;" WAS HIT." +950 IF Z=1 THEN 990 +960 IF Z=2 THEN 1030 +970 IF Z=3 THEN 1070 +990 PRINT "YOU HAVE ONLY THREE OUTPOSTS LEFT." +1000 PRINT: PRINT: GOTO 500 +1030 PRINT "YOU HAVE ONLY TWO OUTPOSTS LEFT." +1040 PRINT: PRINT: GOTO 500 +1070 PRINT "YOU HAVE ONLY ONE OUTPOST LEFT." +1080 PRINT: PRINT: GOTO 500 +1110 PRINT "YOU'RE DEAD. YOUR LAST OUTPOST WAS AT ";X;". HA, HA, HA." +1120 PRINT "BETTER LUCK NEXT TIME." +1150 GOTO 1235 +1160 P=P+1 +1170 N=P-1 +1180 FOR T=1 TO N +1190 IF M=M(T) THEN 570 +1200 NEXT T +1210 X=M +1220 M(P)=M +1230 GOTO 580 +1235 END diff --git a/data/examples/14games/bombsaw.bas b/data/examples/14games/bombsaw.bas new file mode 100644 index 0000000000000000000000000000000000000000..73e4ae2a5852541c466e201ebc8161c8c32bdc2e --- /dev/null +++ b/data/examples/14games/bombsaw.bas @@ -0,0 +1,69 @@ +1 REM "BOMBSAWAY" +2 REM "Ported by Stefan in 2022" +3 REM +4 @R=MILLIS(1) +8 PRINT "YOU ARE A PILOT IN A WORLD WAR II BOMBER." +10 INPUT "WHAT SIDE -- ITALY(1), ALLIES(2), JAPAN(3), GERMANY(4)? ";A +20 IF A>0 AND A<5 THEN 25 +22 PRINT "TRY AGAIN..." : GOTO 10 +25 ON A GOTO 30, 110, 200, 220 +30 INPUT "YOUR TARGET -- ALBANIA(1), GREECE(2), NORTH AFRICA(3)? ";B +40 IF B>0 AND B<4 THEN 45 +42 PRINT "TRY AGAIN..." : GOTO 30 +45 PRINT : ON B GOTO 50, 80,90 +50 PRINT "SHOULD BE EASY -- YOU'RE FLYING A NAZI-MADE PLANE." +60 GOTO 280 +80 PRINT "BE CAREFUL!!!" : GOTO 280 +90 PRINT "YOU'RE GOING FOR THE OIL, EH?" : GOTO 280 +110 INPUT "AIRCRAFT -- LIBERATOR(1), B-29(2), B-17(3), LANCASTER(4)? ";G +120 IF G>0 AND G<5 THEN 125 +122 PRINT "TRY AGAIN..." : GOTO 110 +125 PRINT : ON G GOTO 130, 150, 170, 190 +130 PRINT "YOU'VE GOT 2 TONS OF BOMBS FLYING FOR PLOESTI." : GOTO 280 +150 PRINT "YOU'RE DUMPING THE A-BOMB ON HIROSHIMA." : GOTO 280 +170 PRINT "YOU'RE CHASING THE BISMARK IN THE NORTH SEA." : GOTO 280 +190 PRINT "YOU'RE BUSTING A GERMAN HEAVY WATER PLANT IN THE RUHR." +195 GOTO 280 +200 PRINT "YOU'RE FLYING A KAMIKAZE MISSION OVER THE USS LEXINGTON." +205 INPUT "YOUR FIRST KAMIKAZE MISSION(Y OR N)? ";F$ +207 IF F$="N" OR F$="n" THEN S=0 : GOTO 358 +210 PRINT : IF RND(1)>.65 THEN 325 +215 GOTO 380 +220 PRINT "A NAZI, EH? OH WELL. ARE YOU GOING FOR RUSSIA(1)," +230 INPUT "ENGLAND(2), OR FRANCE(3)? ";M : IF M>0 AND M<4 THEN 235 +232 PRINT "TRY AGAIN..." : GOTO 220 +235 PRINT : ON M GOTO 250, 260, 270 +250 PRINT "YOU'RE NEARING STALINGRAD." : GOTO 280 +260 PRINT "NEARING LONDON. BE CAREFUL, THEY'VE GOT RADAR." : GOTO 280 +270 PRINT "NEARING VERSAILLES. DUCK SOUP. THEY'RE NEARLY DEFENSELESS." +280 PRINT +285 INPUT "HOW MANY MISSIONS HAVE YOU FLOWN? ";D +290 IF D<160 THEN 300 +292 PRINT "MISSIONS, NOT MILES..." +295 PRINT "150 MISSIONS IS HIGH EVEN FOR OLD-TIMERS." +297 PRINT "NOW THEN, "; : GOTO 285 +300 PRINT:IF D<100 THEN 310 +305 PRINT "THAT'S PUSHING THE ODDS!" : GOTO 320 +310 IF D<25 THEN PRINT "FRESH OUT OF TRAINING, EH?" +320 PRINT : IF D<160*RND(1) THEN 330 +325 PRINT "DIRECT HIT!!!! ";INT(100*RND(1));" KILLED." +327 PRINT "MISSION SUCCESSFUL." : GOTO 390 +330 PRINT "MISSED TARGET BY ";INT(2+30*RND(1));" MILES!" +335 PRINT "NOW YOU'RE REALLY IN FOR IT !!" : PRINT +340 INPUT "DOES THE ENEMY HAVE GUNS(1), MISSILES(2), OR BOTH(3)? ";R +345 IF R>0 AND R<4 THEN 350 +347 PRINT "TRY AGAIN..." : GOTO 340 +350 PRINT : T=0 : IF R=2 THEN 360 +355 INPUT "WHAT'S THE PERCENT HIT RATE OF ENEMY GUNNERS (10 TO 50)? ";S +357 IF S<10 THEN PRINT "YOU LIE, BUT YOU'LL PAY...": GOTO 380 +358 PRINT +360 PRINT : IF R>1 THEN T=35 +365 IF S+T>100*RND(1) THEN 380 +370 PRINT "YOU MADE IT THROUGH TREMENDOUS FLAK!!" : GOTO 390 +380 PRINT "* * * * BOOM * * * *" +384 PRINT "YOU HAVE BEEN SHOT DOWN....." +386 PRINT "DEARLY BELOVED, WE ARE GATHERED HERE TODAY TO PAY OUR" +387 PRINT "LAST TRIBUTE..." +390 PRINT:PRINT:PRINT:INPUT "ANOTHER MISSION (Y OR N)? ";U$ +395 IF U$="Y" OR U$="y" THEN 8 +400 PRINT "GOOD BYE!" : PRINT : END diff --git a/data/examples/14games/bounce.bas b/data/examples/14games/bounce.bas new file mode 100644 index 0000000000000000000000000000000000000000..c2a3d7786b99ad28aa0bb66653bb4be5bd2ef8a1 --- /dev/null +++ b/data/examples/14games/bounce.bas @@ -0,0 +1,55 @@ +10 REM "BOUNCE" +20 REM "Ported by Stefan in 2022" +30 REM +40 REM "Set the TAB command to MS style" +50 SET 11,1 +90 DIM T(100) +100 PRINT "THIS SIMULATION LETS YOU SPECIFY THE INITIAL VELOCITY" +110 PRINT "OF A BALL THROWN STRAIGHT UP, AND THE COEFFICIENT OF" +120 PRINT "ELASTICITY OF THE BALL. PLEASE USE A DECIMAL FRACTION" +130 PRINT "COEFFICIENCY (LESS THAN 1)." +131 PRINT +132 PRINT "YOU ALSO SPECIFY THE TIME INCREMENT TO BE USED IN" +133 PRINT "'STROBING' THE BALL'S FLIGHT (TRY .1 INITIALLY)." +134 PRINT +135 INPUT "TIME INCREMENT (SEC) ";S2 +140 PRINT +150 INPUT "VELOCITY (FPS) ";V +160 PRINT +170 INPUT "COEFFICIENT ";C +180 PRINT +182 PRINT "FEET" +184 PRINT +186 S1=INT(70/(V/(16*S2))) +190 FOR I=1 TO S1 +200 T(I)=V*POW(C,I-1)/16 +210 NEXT I +220 FOR H=INT(-16*POW(V/32,2)+POW(V,2)/32+.5) TO 0 STEP -.5 +221 IF INT(H)<>H THEN 225 +222 PRINT H; +225 L=0 +230 FOR I=1 TO S1 +240 FOR T=0 TO T(I) STEP S2 +245 L=L+S2 +250 IF ABS(H-(.5*(-32)*POW(T,2)+V*POW(C,(I-1))*T))>.25 THEN 270 +260 TAB L/S2: PRINT "0"; +270 NEXT T +275 T=T(I+1)/2 +276 IF -16*POW(T,2)+V*POW(C,I-1)*T 0 THEN 5220 +5130 PRINT "GUTTER!!" +5220 IF B<>1 OR D<>10 THEN 5490 +5310 PRINT "STRIKE!!!!" +5400 Q=3 +5490 IF B<>2 OR D<>10 THEN 5760 +5580 PRINT "SPARE!!!!" +5670 Q=2 +5760 IF B<>2 OR D>=10 THEN 6030 +5850 PRINT "ERROR!!!" +5940 Q=1 +6030 IF B<>1 OR D>=10 THEN 6210 +6120 PRINT "ROLL YOUR 2ND BALL" +6210 REM "ARK STORAGE OF THE SCORES" +6300 PRINT +6390 A(F*P,B)=D +6480 IF B=2 THEN 7020 +6570 B=2 +6660 M=D +6750 IF Q=3 THEN 6210 +6840 A(F*P,B)=D-M +6930 IF Q=0 THEN 2520 +7020 A(F*P,3)=Q +7110 NEXT P +7200 F=F+1 +7290 IF F<11 THEN 2070 +7295 PRINT "FRAMES" +7380 FOR I=1 TO 10 +7470 PRINT I; +7560 NEXT I +7650 PRINT +7740 FOR P=1 TO R +7830 FOR I=1 TO 3 +7920 FOR J=1 TO 10 +8010 PRINT A(J*P,I); +8100 NEXT J +8105 PRINT +8190 NEXT I +8280 PRINT +8370 NEXT P +8460 PRINT "DO YOU WANT ANOTHER GAME" +8550 INPUT A$ +8640 IF A$(1,1)="Y" OR A$(1,1)="y" THEN 2610 +8730 END diff --git a/data/examples/14games/boxing.bas b/data/examples/14games/boxing.bas new file mode 100644 index 0000000000000000000000000000000000000000..9fb537292d9ac630da7809e074fdaccf3a72143a --- /dev/null +++ b/data/examples/14games/boxing.bas @@ -0,0 +1,143 @@ +1 REM "BOXING" +2 REM "Ported by Stefan in 2022" +3 REM +4 PRINT "BOXING OLYMPIC STYLE (3 ROUNDS -- 2 OUT OF 3 WINS)" +5 J=0 +6 L=0 +8 PRINT +9 @R=MILLIS(1) +10 PRINT "WHAT IS YOUR OPPONENT'S NAME"; +20 INPUT J$ +30 PRINT "INPUT YOUR MAN'S NAME"; +40 INPUT L$ +50 PRINT "DIFFERENT PUNCHES ARE: (1) FULL SWING; (2) HOOK; (3) UPPERCUT; (4) JAB." +60 PRINT "WHAT IS YOUR MANS BEST"; +64 INPUT B +70 PRINT "WHAT IS HIS VULNERABILITY"; +80 INPUT D +90 B1=INT(4*RND(1)+1) +100 D1=INT(4*RND(1)+1) +110 IF B1=D1 THEN 90 +120 PRINT J$;"'S ADVANTAGE IS ";B1;" AND VULNERABILITY IS SECRET.":PRINT +130 FOR R=1 TO 3 +140 IF J>= 2 THEN 1040 +150 IF L>=2 THEN 1060 +160 X=0 +170 Y=0 +180 PRINT "ROUND ";R;" BEGINS..." +185 FOR R1= 1 TO 7 +190 I=INT(10*RND(1)+1) +200 IF I>5 THEN 600 +210 PRINT L$;"'S PUNCH"; +220 INPUT P +221 IF P=B THEN 225 +222 GOTO 230 +225 X=X+2 +230 IF P=1 THEN 340 +240 IF P=2 THEN 450 +250 IF P=3 THEN 520 +270 PRINT L$;" JABS AT ";J$"'S HEAD "; +271 IF D1=4 THEN 290 +275 C=INT(8*RND(1)+1) +280 IF C<4 THEN 310 +290 X=X+3 +300 GOTO 950 +310 PRINT "IT'S BLOCKED." +330 GOTO 950 +340 PRINT L$; " SWINGS AND "; +341 IF D1=4 THEN 410 +345 X3=INT(30*RND(1)+1) +350 IF X3<10 THEN 410 +360 PRINT "HE MISSES "; +370 PRINT +375 IF X=1 THEN 950 +380 PRINT +390 PRINT +400 GOTO 300 +410 PRINT "HE CONNECTS!" +420 IF X>35 THEN 980 +425 X=X+15 +440 GOTO 300 +450 PRINT L$;" GIVES THE HOOK... "; +455 IF D1=2 THEN 480 +460 H1=INT(2*RND(1)+1) +470 IF H1=1 THEN 500 +475 PRINT "CONNECTS..." +480 X=X+7 +490 GOTO 300 +500 PRINT "BUT IT'S BLOCKED!!!!!!!!!!!!!" +510 GOTO 300 +520 PRINT L$; " TRIES AN UPPERCUT "; +530 IF D1=3 THEN 570 +540 D5=INT(100*RND(1)+1) +550 IF D5<51 THEN 570 +560 PRINT "AND IT'S BLOCKED (LUCKY BLOCK!)" +565 GOTO 300 +570 PRINT "AND HE CONNECTS!" +580 X=X+4 +590 GOTO 300 +600 J7=INT(4*RND(1)+1) +601 IF J7 =B1 THEN 605 +602 GOTO 610 +605 Y=Y+2 +610 IF J7=1 THEN 720 +620 IF J7=2 THEN 810 +630 IF J7 =3 THEN 860 +640 PRINT J$;" JABS AND "; +645 IF D=4 THEN 700 +650 Z4=INT(7*RND(1)+1) +655 IF Z4>4 THEN 690 +660 PRINT "IT'S BLOCKED!" +670 GOTO 300 +690 PRINT " BLOOD SPILLS !!!" +700 Y=Y+5 +710 GOTO 300 +720 PRINT J$;" TAKES A FULL SWING AND"; +730 IF D=1 THEN 770 +740 R6=INT(60*RND(1)+1) +745 IF R6 <30 THEN 770 +750 PRINT " IT'S BLOCKED!" +760 GOTO 300 +770 PRINT " POW!!!!! HE HITS HIM RIGHT IN THE FACE!" +780 IF Y>35 THEN 1010 +790 Y=Y+15 +800 GOTO 300 +810 PRINT J$;" GETS ";L$;" IN THE JAW (OUCH!)" +820 Y=Y+7 +830 PRINT "....AND AGAIN!" +835 Y=Y+5 +840 IF Y>35 THEN 1010 +850 PRINT +860 PRINT L$;" IS ATTACKED BY AN UPPERCUT (OH,OH)..." +865 IF D=3 THEN 890 +870 Q4=INT(200*RND(1)+1) +880 IF Q4>75 THEN 920 +890 PRINT "AND ";J$;" CONNECTS..." +900 Y=Y+8 +910 GOTO 300 +920 PRINT " BLOCKS AND HITS ";J$;" WITH A HOOK." +930 X=X+5 +940 GOTO 300 +950 NEXT R1 +951 IF X>Y THEN 955 +952 PRINT:PRINT J$;" WINS ROUND ";R +953 J=J+1 +954 GOTO 960 +955 PRINT:PRINT L$;" WINS ROUND";R +956 L=L+1 +960 NEXT R +961 IF J>= 2 THEN 1040 +962 IF L>=2 THEN 1060 +980 PRINT J$; " IS KNOCKED COLD AND "; L$;" IS THE WINNER AND CHAMP!"; +1000 GOTO 1080 +1010 PRINT L$; " IS KNOCKED COLD AND "; J$;" IS THE WINNER AND CHAMP!"; +1030 GOTO 1000 +1040 PRINT J$; " WINS (NICE GOING,";J$;")." +1050 GOTO 1000 +1060 PRINT L$; " AMAZINGLY WINS!!" +1070 GOTO 1000 +1080 PRINT +1085 PRINT +1090 PRINT "AND NOW GOODBYE FROM THE OLYMPIC ARENA." +1100 PRINT +1110 END diff --git a/data/examples/14games/bug.bas b/data/examples/14games/bug.bas new file mode 100644 index 0000000000000000000000000000000000000000..be6e08978c776835af1c8362048f3d8f9acd5d6e --- /dev/null +++ b/data/examples/14games/bug.bas @@ -0,0 +1,256 @@ +10 REM "BUG" +20 REM "Ported by Stefan in 2022" +30 REM +40 REM +50 A=0: B=0: H=0: L=0: N=0: P=0: Q=0: R=0: S=0: T=0: U=0: V=0: Y=0 +60 PRINT "THE GAME BUG" +70 PRINT "I HOPE YOU ENJOY THIS GAME." +80 PRINT +90 PRINT "DO YOU WANT INSTRUCTIONS"; +100 INPUT Z$ +110 IF Z$="NO" OR Z$="no" THEN 300 +120 PRINT "THE OBJECT OF BUG IS TO FINISH YOUR BUG BEFORE I FINISH" +130 PRINT "MINE. EACH NUMBER STANDS FOR A PART OF THE BUG BODY." +140 PRINT "I WILL ROLL THE DIE FOR YOU, TELL YOU WHAT I ROLLED FOR YOU" +150 PRINT "WHAT THE NUMBER STANDS FOR, AND IF YOU CAN GET THE PART." +160 PRINT "IF YOU CAN GET THE PART I WILL GIVE IT TO YOU." +170 PRINT "THE SAME WILL HAPPEN ON MY TURN." +180 PRINT "IF THERE IS A CHANGE IN EITHER BUG I WILL GIVE YOU THE" +190 PRINT "OPTION OF SEEING THE PICTURES OF THE BUGS." +200 PRINT "THE NUMBERS STAND FOR PARTS AS FOLLOWS:" +210 PRINT "NUMBER","PART","NUMBER OF PART NEEDED" +220 PRINT "1","BODY","1" +230 PRINT "2","NECK","1" +240 PRINT "3","HEAD","1" +250 PRINT "4","FEELERS","2" +260 PRINT "5","TAIL","1" +270 PRINT "6","LEGS","6" +280 PRINT +290 PRINT +300 IF Y>0 THEN 2480 +310 Z=INT(6*RND(1)+1) +320 C=1 +330 PRINT "YOU ROLLED A ";Z +340 ON Z GOTO 350,430,540,650,760,870 +350 PRINT "1=BODY" +360 IF B=1 THEN 410 +370 PRINT "YOU NOW HAVE A BODY." +380 B=1 +390 C=0 +400 GOTO 970 +410 PRINT "YOU DO NOT NEED A BODY." +420 GOTO 970 +430 PRINT "2=NECK" +440 IF N=1 THEN 500 +450 IF B=0 THEN 520 +460 PRINT "YOU NOW HAVE A NECK." +470 N=1 +480 C=0 +490 GOTO 970 +500 PRINT "YOU DO NOT NEED A NECK." +510 GOTO 970 +520 PRINT "YOU DO NOT HAVE A BODY." +530 GOTO 970 +540 PRINT "3=HEAD" +550 IF N=0 THEN 610 +560 IF H=1 THEN 630 +570 PRINT "YOU NEEDED A HEAD." +580 H=1 +590 C=0 +600 GOTO 970 +610 PRINT "YOU DO NOT HAVE A NECK." +620 GOTO 970 +630 PRINT "YOU HAVE A HEAD." +640 GOTO 970 +650 PRINT "4=FEELERS" +660 IF H=0 THEN 740 +670 IF A=2 THEN 720 +680 PRINT "I NOW GIVE YOU A FEELER." +690 A=A+1 +700 C=0 +710 GOTO 970 +720 PRINT "YOU HAVE TWO FEELERS ALREADY." +730 GOTO 970 +740 PRINT "YOU DO NOT HAVE A HEAD." +750 GOTO 970 +760 PRINT "5=TAIL" +770 IF B=0 THEN 830 +780 IF T=1 THEN 850 +790 PRINT "I NOW GIVE YOU A TAIL." +800 T=T+1 +810 C=0 +820 GOTO 970 +830 PRINT "YOU DO NOT HAVE A BODY." +840 GOTO 970 +850 PRINT "YOU ALREADY HAVE A TAIL." +860 GOTO 970 +870 PRINT "6=LEG" +880 IF L=6 THEN 940 +890 IF B=0 THEN 960 +900 L=L+1 +910 C=0 +920 PRINT "YOU NOW HAVE ";L;" LEGS." +930 GOTO 970 +940 PRINT "YOU HAVE 6 FEET ALREADY." +950 GOTO 970 +960 PRINT "YOU DO NOT HAVE A BODY." +970 X=INT(6*RND(1)+1) +971 PRINT +975 FOR D=1 TO 2000:NEXT D +980 PRINT "I ROLLED A ";X +990 ON X GOTO 1000,1080,1190,1300,1410,1520 +1000 PRINT "1=BODY" +1010 IF P=1 THEN 1060 +1020 PRINT "I NOW HAVE A BODY." +1030 C=0 +1040 P=1 +1050 GOTO 1630 +1060 PRINT "I DO NOT NEED A BODY." +1070 GOTO 1630 +1080 PRINT "2=NECK" +1090 IF Q=1 THEN 1150 +1100 IF P=0 THEN 1170 +1110 PRINT "I NOW HAVE A NECK." +1120 Q=1 +1130 C=0 +1140 GOTO 1630 +1150 PRINT "I DO NOT NEED A NECK." +1160 GOTO 1630 +1170 PRINT "I DO NOT HAVE A BODY." +1180 GOTO 1630 +1190 PRINT "3=HEAD" +1200 IF Q=0 THEN 1260 +1210 IF R=1 THEN 1280 +1220 PRINT "I NEEDED A HEAD." +1230 R=1 +1240 C=0 +1250 GOTO 1630 +1260 PRINT "I DO NOT HAVE A NECK." +1270 GOTO 1630 +1280 PRINT "I DO NOT NEED A HEAD." +1290 GOTO 1630 +1300 PRINT "4=FEELERS" +1310 IF R=0 THEN 1390 +1320 IF S=2 THEN 1370 +1330 PRINT "I GET A FEELER." +1340 S=S+1 +1350 C=0 +1360 GOTO 1630 +1370 PRINT "I HAVE 2 FEELERS ALREADY." +1380 GOTO 1630 +1390 PRINT "I DO NOT HAVE A HEAD." +1400 GOTO 1630 +1410 PRINT "5=TAIL" +1420 IF P=0 THEN 1480 +1430 IF U=1 THEN 1500 +1440 PRINT "I NOW HAVE A TAIL." +1450 U=1 +1460 C=0 +1470 GOTO 1630 +1480 PRINT "I DO NOT HAVE A BODY." +1490 GOTO 1630 +1500 PRINT "I DO NOT NEED A TAIL." +1510 GOTO 1630 +1520 PRINT "6=LEGS" +1530 IF V=6 THEN 1590 +1540 IF P=0 THEN 1610 +1550 V=V+1 +1560 C=0 +1570 PRINT "I NOW HAVE ";V;" LEGS." +1580 GOTO 1630 +1590 PRINT,"I HAVE 6 FEET." +1600 GOTO 1630 +1610 PRINT "I DO NOT HAVE A BODY." +1620 GOTO 1630 +1630 IF A=2 AND T=1 AND L=6 THEN 1650 +1640 GOTO 1670 +1650 PRINT "YOUR BUG IS FINISHED." +1660 Y=Y+1 +1670 IF S=2 AND P=1 AND V=6 THEN 1690 +1680 GOTO 1710 +1690 PRINT "MY BUG IS FINISHED." +1700 Y=Y+2 +1710 IF C=1 THEN 300 +1720 PRINT "DO YOU WANT THE PICTURES"; +1730 INPUT Z$ +1740 IF Z$="NO" OR Z$="no" THEN 300 +1750 PRINT "*****YOUR BUG*****" +1760 PRINT +1770 PRINT +1780 IF A=0 THEN 1860 +1790 FOR Z=1 TO 4 +1800 FOR X=1 TO A +1810 TAB(10) +1820 PRINT "A "; +1830 NEXT X +1840 PRINT +1850 NEXT Z +1860 IF H=0 THEN 1880 +1870 GOSUB 2470 +1880 IF N=0 THEN 1920 +1890 FOR Z=1 TO 2 +1900 PRINT " N N" +1910 NEXT Z +1920 IF B=0 THEN 2000 +1930 PRINT " BBBBBBBBBBBB" +1940 FOR Z=1 TO 2 +1950 PRINT " B B" +1960 NEXT Z +1970 IF T<>1 THEN 1990 +1980 PRINT "TTTTTB B" +1990 PRINT " BBBBBBBBBBBB" +2000 IF L=0 THEN 2080 +2010 FOR Z=1 TO 2 +2020 TAB(5) +2030 FOR X=1 TO L +2040 PRINT " L"; +2050 NEXT X +2060 PRINT +2070 NEXT Z +2080 FOR Z=1 TO 4 +2090 PRINT +2100 NEXT Z +2110 PRINT "*****MY BUG*****" +2120 PRINT +2130 PRINT +2140 PRINT +2150 IF S=0 THEN 2230 +2160 FOR Z=1 TO 4 +2170 TAB(10) +2180 FOR X=1 TO S +2190 PRINT "F "; +2200 NEXT X +2210 PRINT +2220 NEXT Z +2230 IF R<>1 THEN 2250 +2240 GOSUB 2470 +2250 IF Q=0 THEN 2280 +2260 PRINT " N N" +2270 PRINT " N N" +2280 IF P=0 THEN 2360 +2290 PRINT " BBBBBBBBBBBB" +2300 FOR Z=1 TO 2 +2310 PRINT " B B" +2320 NEXT Z +2330 IF U<>1 THEN 2350 +2340 PRINT "TTTTTB B" +2350 PRINT " BBBBBBBBBBBB" +2360 IF V=0 THEN 2450 +2370 FOR Z=1 TO 2 +2380 TAB(5) +2390 FOR X=1 TO V +2400 PRINT " L"; +2410 NEXT X +2420 PRINT +2430 NEXT Z +2450 IF Y<>0 THEN 2540 +2460 GOTO 300 +2470 PRINT " HHHHHHH" +2480 PRINT " H H" +2490 PRINT " H O O H" +2500 PRINT " H H" +2510 PRINT " H V H" +2520 PRINT " HHHHHHH" +2530 RETURN +2540 PRINT "I HOPE YOU ENJOYED THE GAME, PLAY IT AGAIN SOON!!" +2550 END diff --git a/data/examples/14games/bullfight.bas b/data/examples/14games/bullfight.bas new file mode 100644 index 0000000000000000000000000000000000000000..f72df0a1b91874241bce8f0d2ce9b002d2e81d09 --- /dev/null +++ b/data/examples/14games/bullfight.bas @@ -0,0 +1,193 @@ +10 REM "BULL" +20 REM "Ported by Stefan in 2022" +30 DEF FNA(K)=INT(RND(1)*2+1) +200 PRINT:PRINT:PRINT +202 L=1 +205 PRINT "DO YOU WANT INSTRUCTIONS"; +206 INPUT Z$ +207 IF Z$="NO" OR Z$="no" THEN 400 +210 PRINT "HELLO, ALL YOU BLOODLOVERS AND AFICIONADOS." +220 PRINT "HERE IS YOUR BIG CHANCE TO KILL A BULL." +230 PRINT +240 PRINT "ON EACH PASS OF THE BULL, YOU MAY TRY" +250 PRINT "0 - VERONICA (DANGEROUS INSIDE MOVE OF THE CAPE)" +260 PRINT "1 - LESS DANGEROUS OUTSIDE MOVE OF THE CAPE" +270 PRINT "2 - ORDINARY SWIRL OF THE CAPE." +280 PRINT +290 PRINT "INSTEAD OF THE ABOVE, YOU MAY TRY TO KILL THE BULL" +300 PRINT "ON ANY TURN: 4 (OVER THE HORNS), 5 (IN THE CHEST)." +310 PRINT "BUT IF I WERE YOU," +320 PRINT "I WOULDN'T TRY IT BEFORE THE SEVENTH PASS." +330 PRINT +340 PRINT "THE CROWD WILL DETERMINE WHAT AWARD YOU DESERVE" +350 PRINT "(POSTHUMOUSLY IF NECESSARY)." +360 PRINT "THE BRAVER YOU ARE, THE BETTER THE AWARD YOU RECIEVE." +370 PRINT +380 PRINT "THE BETTER THE JOB THE PICADORES AND TOREADORES DO," +390 PRINT "THE BETTER YOUR CHANCES ARE." +400 PRINT +410 PRINT +420 D(5)=1 +430 D(4)=1 +450 DIM L$(8,5) +455 A=INT(RND(1)*5+1) +460 FOR I=1 TO 5 +463 READ L$()(I) +467 NEXT I +470 DATA "SUPERB","GOOD","FAIR","POOR","AWFUL" +490 PRINT "YOU HAVE DRAWN A ";L$()(A);" BULL." +500 IF A>4 THEN 530 +510 IF A<2 THEN 550 +520 GOTO 570 +530 PRINT "YOU'RE LUCKY." +540 GOTO 570 +550 PRINT "GOOD LUCK. YOU'LL NEED IT." +560 PRINT +570 PRINT +590 A$="PICADO" +595 B$="RES" +600 GOSUB 1610 +610 D(1)=C +630 A$="TOREAD" +635 B$="ORES" +640 GOSUB 1610 +650 D(2)=C +660 PRINT +670 PRINT +680 IF Z=1 THEN 1310 +690 D(3)=D(3)+1 +700 PRINT "PASS NUMBER ";D(3) +710 IF D(3)<3 THEN 760 +720 PRINT "HERE COMES THE BULL. TRY FOR A KILL"; +730 GOSUB 1930 +735 IF Z1=1 THEN 1130 +740 PRINT "CAPE MOVE"; +750 GOTO 800 +760 PRINT "THE BULL IS CHARGING AT YOU! YOU ARE THE MATADOR--" +770 PRINT "DO YOU WANT TO KILL THE BULL"; +780 GOSUB 1930 +785 IF Z1=1 THEN 1130 +790 PRINT "WHAT MOVE DO YOU MAKE WITH THE CAPE"; +800 INPUT E +810 IF E<>INT(ABS(E)) THEN 830 +820 IF E<3 THEN 850 +830 PRINT "DON'T PANIC, YOU IDIOT! PUT DOWN A CORRECT NUMBER" +840 GOTO 800 +850 REM +860 IF E=0 THEN 920 +870 IF E=1 THEN 900 +880 M=.5 +890 GOTO 930 +900 M=2 +910 GOTO 930 +920 M=3 +930 L=L+M +940 F=(6-A+M/10)*RND(1)/((D(1)+D(2)+D(3)/10)*5) +950 IF F<.51 THEN 660 +960 PRINT "THE BULL HAS GORED YOU!" +970 ON FNA(0) GOTO 980,1010 +980 PRINT "YOU ARE DEAD." +990 D(4)=1.5 +1000 GOTO 1310 +1010 PRINT "YOU ARE STILL ALIVE.":PRINT +1020 PRINT "DO YOU RUN FROM THE RING"; +1030 GOSUB 1930 +1035 IF Z1=2 THEN 1070 +1040 PRINT "COWARD" +1050 D(4)=0 +1060 GOTO 1310 +1070 PRINT "YOU ARE BRAVE. STUPID, BUT BRAVE." +1080 ON FNA(0) GOTO 1090,1110 +1090 D(4)=2 +1100 GOTO 660 +1110 PRINT "YOU ARE GORED AGAIN!" +1120 GOTO 970 +1130 REM +1140 Z=1 +1150 PRINT:PRINT "IT IS THE MOMENT OF TRUTH.":PRINT +1155 PRINT "HOW DO YOU TRY TO KILL THE BULL"; +1160 INPUT H +1170 IF H=4 THEN 1230 +1180 IF H=5 THEN 1230 +1190 PRINT "YOU PANICKED. THE BULL GORED YOU." +1220 GOTO 970 +1230 K=(6-A)*10*RND(1)/((D(1)+D(2))*5*D(3)) +1240 IF J=4 THEN 1290 +1250 IF K>.2 THEN 960 +1260 PRINT "YOU KILLED THE BULL!" +1270 D(5)=2 +1280 GOTO 1320 +1290 IF K>.8 THEN 960 +1300 GOTO 1260 +1310 PRINT +1320 PRINT +1330 PRINT +1340 IF D(4)<>0 THEN 1390 +1350 PRINT "THE CROWD BOOS FOR TEN MINUTES. IF YOU EVER DARE TO SHOW" +1360 PRINT "YOUR FACE IN A RING AGAIN, THEY SWEAR THEY WILL KILL YOU--" +1370 PRINT "UNLES THE BULL DOES FIRST." +1380 GOTO 1580 +1390 DEF FNC(Q)=FND(Q)*RND(1) +1395 DEF FND(Q)=(4.5+L/6-(D(1)+D(2))*2.5+4*D(4)+2*D(5)-POW(D(3),2)/120-A) +1400 IF D(4)<>2 THEN 1430 +1410 PRINT "THE CROWD CHEERS WILDLY!" +1420 GOTO 1450 +1430 IF D(5)<>2 THEN 1450 +1440 PRINT "THE CROWD CHEERS!":PRINT +1450 PRINT "THE CROWD AWARDS YOU" +1460 IF FNC(Q)<2.4 THEN 1570 +1470 IF FNC(Q)<4.9 THEN 1550 +1480 IF FNC(Q)<7.4 THEN 1520 +1500 PRINT "OLE! YOU ARE 'MUY HOMBRE'!! OLE! OLE!" +1510 GOTO 1580 +1520 PRINT "BOTH EARS OF THE BULL!" +1530 PRINT "OLE!" +1540 GOTO 1580 +1550 PRINT "ONE EAR OF THE BULL." +1560 GOTO 1580 +1570 PRINT "NOTHING AT ALL." +1580 PRINT +1590 PRINT "ADIOS":PRINT:PRINT:PRINT +1600 GOTO 2030 +1610 B=3/A*RND(1) +1620 IF B<.37 THEN 1740 +1630 IF B<.5 THEN 1720 +1640 IF B<.63 THEN 1700 +1650 IF B<.87 THEN 1680 +1660 C=.1 +1670 GOTO 1750 +1680 C=.2 +1690 GOTO 1750 +1700 C=.3 +1710 GOTO 1750 +1720 C=.4 +1730 GOTO 1750 +1740 C=.5 +1750 T=INT(10*C+.2) +1760 PRINT "THE ";A$;B$;" DID A ";L$()(T);" JOB." +1770 IF 4>T THEN 1900 +1780 IF 5=T THEN 1870 +1790 ON FNA(K) GOTO 1830,1850 +1800 IF A$="TOREAD" THEN 1820 +1810 PRINT "ONE OF THE HORSES OF THE ";A$;B$;" WAS KILLED." +1820 ON FNA(K) GOTO 1830,1850 +1830 PRINT "ONE OF THE ";A$;B$;" WAS KILLED." +1840 GOTO 1900 +1850 PRINT "NO ";A$;B$;" WERE KILLED." +1860 GOTO 1900 +1870 IF A$="TOREAD" THEN 1890 +1880 PRINT FNA(K);"OF THE HORSES OF THE ";A$;B$;" KILLED." +1890 PRINT FNA(K);"OF THE ";A$;B$;" KILLED." +1900 PRINT +1910 RETURN +1920 REM +1930 INPUT A$ +1940 IF A$="YES" OR A$="yes" THEN 1990 +1950 IF A$="NO" OR A$="no" THEN 2010 +1970 PRINT "INCORRECT ANSWER - - PLEASE TYPE 'YES' OR 'NO'." +1980 GOTO 1930 +1990 Z1=1 +2000 GOTO 2020 +2010 Z1=2 +2020 RETURN +2030 END diff --git a/data/examples/14games/bullseye.bas b/data/examples/14games/bullseye.bas new file mode 100644 index 0000000000000000000000000000000000000000..e9859a7b3c8f03bfb190c83ded4d47e42cb7f9b6 --- /dev/null +++ b/data/examples/14games/bullseye.bas @@ -0,0 +1,41 @@ +5 REM "BULLSEYE" +10 REM "Ported by Stefan in 2022" +20 SET 11, 1: REM "TAB Command in MS mode" +30 PRINT "IN THIS GAME, UP TO 20 PLAYERS THROW DARTS AT A TARGET" +40 PRINT "WITH 10, 20, 30, AND 40 POINT ZONES. THE OBJECTIVE IS" +50 PRINT "TO GET 200 POINTS.": PRINT +60 PRINT "THROW";: TAB 20: PRINT "DESCRIPTION"; +65 TAB 45: PRINT "PROBABLE SCORE" +70 PRINT " 1";: TAB 20: PRINT "FAST OVERARM"; +75 TAB 45: PRINT "BULLSEYE OR COMPLETE MISS" +80 PRINT " 2";: TAB 20: PRINT "CONTROLLED OVERARM"; +85 TAB 45: PRINT "10, 20 OR 30 POINTS" +90 PRINT " 3";: TAB 20: PRINT "UNDERARM"; +95 TAB 45: PRINT "ANYTHING":PRINT +100 DIM A$(32,20),S(20),W(10): M=0: R=0: FOR I=1 TO 20: S(I)=0: NEXT I +110 INPUT "HOW MANY PLAYERS? ";N: PRINT +120 FOR I=1 TO N +130 PRINT "NAME OF PLAYER #";I;"? ":INPUT T$: A$()(I)=T$ +140 NEXT I +150 R=R+1: PRINT: PRINT "ROUND ";R:PRINT "---------" +160 FOR I=1 TO N +170 PRINT: PRINT A$()(I); "'S THROW";: INPUT T +180 IF T<0 OR T>3 THEN PRINT "INPUT 1, 2, OR 3!": GOTO 170 +190 ON T GOTO 200, 210, 200 +200 P1=.65: P2=.55: P3=.5: P4=.5: GOTO 230 +210 P1=.99: P2=.77: P3=.43: P4=.01: GOTO 230 +220 P1=.95: P2=.75: P3=.45: P4=.05 +230 U=RND(1) +240 IF U>=P1 THEN PRINT "BULLSEYE!! 40 POINTS!":B=40: GOTO 290 +250 IF U>=P2 THEN PRINT "30-POINT ZONE!":B=30: GOTO 290 +260 IF U>=P3 THEN PRINT "20-POINT ZONE":B=20: GOTO 290 +270 IF U>=P4 THEN PRINT "WHEW! 10 POINTS.":B=10: GOTO 290 +280 PRINT "MISSED THE TARGET! TOO BAD.": B=0 +290 S(I)=S(I)+B: PRINT "TOTAL SCORE =";S(I): NEXT I +300 FOR I=1 TO N +310 IF S(I)>=200 THEN M=M+1: W(M)=I +320 NEXT I +330 IF M=0 THEN 150 +340 PRINT: PRINT "WE HAVE A WINNER!!": PRINT +350 FOR I=1 TO M: PRINT A$()(W(I));" SCORED";S(W(I));"POINTS.": NEXT I +360 PRINT: PRINT "THANKS FOR THE GAME.": END diff --git a/data/examples/14games/buzzword.bas b/data/examples/14games/buzzword.bas new file mode 100644 index 0000000000000000000000000000000000000000..b250a5a24461cf52bb9f82cdcf32ef4042e8203d --- /dev/null +++ b/data/examples/14games/buzzword.bas @@ -0,0 +1,34 @@ +10 REM "BUZZWORD GENERATOR from 101 BASIC Games" +20 REM "Ported to Stefan's BASIC in 2021" +100 PRINT "THIS PROGRAM PRINTS HIGHLY ACCEPTABLE PHRASES IN" +110 PRINT "'EDUCATOR-SPEAK'THAT YOU CAN WORK INTO REPORTS" +120 PRINT "AND SPEECHES. WHENEVER A QUESTION MARK IS PRINTED," +130 PRINT "TYPE A 'Y' FOR ANOTHER PHRASE OR 'N' TO QUIT." +140 PRINT "HERE'S THE FIRST PHRASE:" +150 @R=MILLIS(1) +300 FOR P +305 PRINT "** "; +310 FOR I=1 TO 3 +320 A=INT(RND(13))+1 +330 FOR J=1 TO A: READ A$: NEXT +340 PRINT A$;" "; +350 FOR J=A+1 TO 13: READ A$: NEXT +360 NEXT I +370 RESTORE +375 PRINT +380 INPUT "ANOTHER PHRASE? ";Y$ +390 IF Y$<>"Y" AND Y$<>"y" THEN BREAK +400 NEXT +500 PRINT "COME BACK WHEN YOU NEED HELP WITH ANOTHER REPORT!" +510 END +600 DATA "ABILITY","BASAL","BEHAVIORAL","CHILD-CENTERED" +610 DATA "DIFFERENTIATED","DISCOVERY","FLEXIBLE","HETEROGENEOUS" +620 DATA "HOMOGENEOUS","MANIPULATIVE","MODULAR","TAVISTOCK" +630 DATA "INDIVIDUALIZED","LEARNING","EVALUATIVE","OBJECTIVE" +640 DATA "COGNITIVE","ENRICHMENT","SCHEDULING","HUMANISTIC" +650 DATA "INTEGRATED","NON-GRADED","TRAINING","VERTICAL AGE" +660 DATA "MOTIVATIONAL","CREATIVE","GROUPING","MODIFICATION" +670 DATA "ACCOUNTABILITY","PROCESS","CORE CURRICULUM","ALGORITHM" +680 DATA "PERFORMANCE","REINFORCEMENT","OPEN CLASSROOM","RESOURCE" +690 DATA "STRUCTURE","FACILITY","ENVIRONMENT" + diff --git a/data/examples/14games/calendar.bas b/data/examples/14games/calendar.bas new file mode 100644 index 0000000000000000000000000000000000000000..6dd8d6867750df87e99a5fd47217c2915003900e --- /dev/null +++ b/data/examples/14games/calendar.bas @@ -0,0 +1,79 @@ +10 REM "CALENDAR from 101 BASIC GAMES" +20 REM "Ported by Stefan 2022" +30 REM "" +40 C$=10 +50 L0=365 +60 DEF FNL(Y)=((Y%4=0) AND NOT (Y%100=0)) OR (Y%400=0) +100 DIM M(13) +110 INPUT "YEAR: ", Y +120 FOR I=1 TO 6: PRINT C$;: NEXT I +130 GOSUB 1000 +135 D0=D +140 S=0 +150 REM "READ DAYS OF EACH MONTH" +160 FOR N=0 TO 12: READ M(N+1): NEXT N +165 IF FNL(Y) THEN L0=366: M(3)=29 +170 REM +175 TAB(28): PRINT Y +180 FOR N=1 TO 12 +190 PRINT: PRINT: S=S+M(N) +200 PRINT "** ";#4;S; +210 FOR I=1 TO 18: PRINT "*";: NEXT I +220 ON N GOTO 230,240,250,260,270,280,290,300,310,320,330,340 +230 PRINT " JANUARY ";: GOTO 350 +240 PRINT " FEBRUARY";: GOTO 350 +250 PRINT " MARCH ";: GOTO 350 +260 PRINT " APRIL ";: GOTO 350 +270 PRINT " MAY ";: GOTO 350 +280 PRINT " JUNE ";: GOTO 350 +290 PRINT " JULY ";: GOTO 350 +300 PRINT " AUGUST ";: GOTO 350 +310 PRINT "SEPTEMBER";: GOTO 350 +320 PRINT " OCTOBER ";: GOTO 350 +330 PRINT " NOVEMBER";: GOTO 350 +340 PRINT " DECEMBER"; +350 FOR I=1 TO 18: PRINT "*";: NEXT I +360 PRINT #4;" ";L0-S;"**"; +370 REM "366-S; ON LEAP YEARS" +380 PRINT C$: PRINT " S M T W"; +390 PRINT " T F S" +400 PRINT +410 FOR I=1 TO 59: PRINT "*";: NEXT I +420 REM +430 FOR W=1 TO 6 +440 PRINT C$ +445 IF W=1 THEN TAB(4+(S-D0)%7*8) +450 ELSE TAB(4) +460 REM +470 FOR G=1 TO 7 +480 D=D+1 +490 D2=D-S +500 IF D2>M(N+1) THEN 580 +510 IF D2>0 THEN PRINT #8;D2; +520 REM "TAB(4+8*G);" +530 NEXT G +540 REM +550 IF D2=M(N+1) THEN 590 +560 NEXT W +570 REM +580 D=D-G +590 NEXT N +600 REM +610 FOR I=1 TO 6: PRINT C$;: NEXT I +620 DATA 0,31,28,31,30,31,30,31,31,30,31,30,31 +630 REM 0,31,29, ..., ON LEAP YEARS +640 END +1000 REM "ROUTINE TO CALCULATE THE START DAYS OF A YEAR" +1010 REM "Calculate D=0 (SUN), D=-1 (MON) from knowning that" +1020 REM "1979 started on a Monay, and that every year ends and starts" +1030 REM "on the same day except leap year" +1040 IF Y<1979 THEN PRINT "YEARS PRIOR 1979 NOT IMPLEMENTED": END +1050 D=1 +1060 K=1979 +1070 IF K=Y THEN D=-D: PRINT D: RETURN +1080 IF NOT FNL(K) THEN D=D+1 ELSE D=D+2 +1090 K=K+1 +1100 D=D%7 +1110 GOTO 1070 + + diff --git a/data/examples/14games/change.bas b/data/examples/14games/change.bas new file mode 100644 index 0000000000000000000000000000000000000000..328299a63c25cccfad61a6220e72ff1980f4246d --- /dev/null +++ b/data/examples/14games/change.bas @@ -0,0 +1,42 @@ +10 REM "CHANGE from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +100 PRINT "I, YOUR FRIENDLY MICROCOMPUTER, WILL DETERMINE" +110 PRINT "THE CORRECT CHANGE FOR ITEMS COSTING UP TO $100." +120 PRINT:PRINT +200 FOR T +210 INPUT "COST OF ITEM? ", A +220 INPUT "AMOUNT OF PAYMENT? ", P +230 C=P-A:M=C: +240 IF C=0 THEN PRINT "CORRECT AMOUNT, THANK YOU.": CONT +250 IF C<0 THEN PRINT "SORRY, YOU HAVE SHORT-CHANGED ME $",A-P: GOTO 210 +300 PRINT "YOUR CHANGE, $",C +310 D=INT(C/10) +320 IF D<>0 THEN PRINT D,"TEN DOLLAR BILL(S)" +330 C=M-(D*10) +340 E=INT(C/5) +350 IF E<>0 THEN PRINT E,"FIVE DOLLARS BILL(S)" +360 C=M-(D*10+E*5) +370 F=INT(C) +380 IF F<>0 THEN PRINT F,"ONE DOLLAR BILL(S)" +390 C=M-(D*10+E*5+F) +400 C=C*100 +410 N=C +420 G=INT(C/50) +430 IF G<>0 THEN PRINT G,"ONE HALF DOLLAR(S)" +440 C=N-(G*50) +450 H=INT(C/25) +460 IF H<>0 THEN PRINT H,"QUARTER(S)" +470 C=N-(G*50+H*25) +480 I=INT(C/10) +490 IF I<>0 THEN PRINT I,"DIME(S)" +500 C=N-(G*50+H*25+I*10) +510 J=INT(C/5) +520 IF J<>0 THEN PRINT J,"NICKEL(S)" +530 C=N-(G*50+H*25+I*10+J*5) +540 K=INT(C+1/2) +550 IF K<>0 THEN PRINT K,"PENNY(S)" +560 PRINT "THANK YOU, COME AGAIN." +570 PRINT +600 NEXT T +900 END diff --git a/data/examples/14games/checkers.bas b/data/examples/14games/checkers.bas new file mode 100644 index 0000000000000000000000000000000000000000..7221fe3e79e323f684dffd33b9cd4d350562d83a --- /dev/null +++ b/data/examples/14games/checkers.bas @@ -0,0 +1,91 @@ +5 REM "CHECKERS" +10 REM "Ported by Stefan in 2022" +15 REM +17 REM "Switch on MS style TAB" +18 SET 11,1 +20 PRINT "THIS IS THE GAME OF CHECKERS. THE COMPUTER IS X," +25 PRINT "AND YOU ARE O. THE COMPUTER WILL MOVE FIRST." +30 PRINT "SQUARES ARE REFERRED TO BY A COORDINATE SYSTEM." +35 PRINT "(0,0) IS THE LOWER LEFT CORNER" +40 PRINT "(0,7) IS THE UPPER LEFT CORNER" +45 PRINT "(7,0) IS THE LOWER RIGHT CORNER" +50 PRINT "(7,7) IS THE UPPER RIGHT CORNER" +55 PRINT "THE COMPUTER WILL TYPE '+TO' WHEN YOU HAVE ANOTHER" +60 PRINT "JUMP. TYPE TWO NEGATIVE NUMBERS IF YOU CANNOT JUMP." +65 PRINT:PRINT:PRINT +80 DIM R(4+1),S(7+1,7+1):G=-1:R(0+1)=-99 +90 DATA 1,0,1,0,0,0,-1,0,0,1,0,0,0,-1,0,-1,15 +120 FOR X=0 TO 7:FOR Y=0 TO 7:READ J:IF J=15 THEN 180 +160 S(X+1,Y+1)=J:GOTO 200 +180 RESTORE:READ S(X+1,Y+1) +200 NEXT Y: NEXT X +230 FOR X=0 TO 7:FOR Y=0 TO 7:IF S(X+1,Y+1)>-1 THEN 350 +310 IF S(X+1,Y+1)=-1 THEN FOR A=-1 TO 1 STEP 2:B=G:GOSUB 650:NEXT A +330 IF S(X+1,Y+1)=-2 THEN FOR A=-1 TO 1 STEP 2:FOR B=-1 TO 1 STEP 2:GOSUB 650:NEXT B: NEXT A +350 NEXT Y: NEXT X:GOTO 1140 +650 U=X+A:V=Y+B:IF U<0 OR U>7 OR V<0 OR V>7 THEN 870 +740 IF S(U+1,V+1)=0 THEN GOSUB 910:GOTO 870 +770 IF S(U+1,V+1)<0 THEN 870 +790 U=U+A:V=V+B:IF U<0 OR V<0 OR U>7 OR V>7 THEN 870 +850 IF S(U+1,V+1)=0 THEN GOSUB 910 +870 RETURN +910 IF V=0 AND S(X+1,Y+1)=-1 THEN Q=Q+2 +920 IF ABS(Y-V)=2 THEN Q=Q+5 +960 IF Y=7 THEN Q=Q-2 +980 IF U=0 OR U=7 THEN Q=Q+1 +1030 FOR C=-1 TO 1 STEP 2:IF U+C<0 OR U+C>7 OR V+G<0 THEN 1080 +1035 IF S(U+C+1,V+G+1)<0 THEN Q=Q+1:GOTO 1080 +1040 IF U-C<0 OR U-C>7 OR V-G>7 THEN 1080 +1045 IF S(U+C+1,V+G+1)>0 AND(S(U-C+1,V-G+1)=0 OR(U-C=X AND V-G=Y))THEN Q=Q-2 +1080 NEXT C:IF Q>R(0+1)THEN R(0+1)=Q:R(1+1)=X:R(2+1)=Y:R(3+1)=U:R(4+1)=V +1100 Q=0:RETURN +1140 IF R(0+1)=-99 THEN 1880 +1230 PRINT "FROM ";R(1+1),R(2+1);" TO ";R(3+1),R(4+1);:R(0+1)=-99 +1240 IF R(4+1)=0 THEN S(R(3+1)+1,R(4+1)+1)=-2:GOTO 1420 +1250 S(R(3+1)+1,R(4+1)+1)=S(R(1+1)+1,R(2+1)+1) +1310 S(R(1+1)+1,R(2+1)+1)=0:IF ABS(R(1+1)-R(3+1))<>2 THEN 1420 +1330 S((R(1+1)+R(3+1))/2+1,(R(2+1)+R(4+1))/2+1)=0 +1340 X=R(3+1):Y=R(4+1):IF S(X+1,Y+1)=-1 THEN B=-2:FOR A=-2 TO 2 STEP 4:GOSUB 1370 +1350 IF S(X+1,Y+1)=-2 THEN FOR A=-2 TO 2 STEP 4:FOR B=-2 TO 2 STEP 4:GOSUB 1370:NEXT B +1360 NEXT A:IF R(0+1)<>-99 THEN PRINT"TO ";R(3+1),R(4+1);:R(0+1)=-99:GOTO 1240 +1365 GOTO 1420 +1370 U=X+A:V=Y+B:IF U<0 OR U>7 OR V<0 OR V>7 THEN 1400 +1380 IF S(U+1,V+1)=0 AND S(X+A/2+1,Y+B/2+1)>0 THEN GOSUB 910 +1400 RETURN +1420 PRINT:PRINT:PRINT:FOR Y=7 TO 0 STEP-1:FOR X=0 TO 7:I=5*X: TAB I +1430 IF S(X+1,Y+1)=0 THEN PRINT"."; +1470 IF S(X+1,Y+1)=1 THEN PRINT"O"; +1490 IF S(X+1,Y+1)=-1 THEN PRINT"X"; +1510 IF S(X+1,Y+1)=-2 THEN PRINT"X*"; +1530 IF S(X+1,Y+1)=2 THEN PRINT"O*"; +1550 NEXT X:PRINT" ":PRINT:NEXT Y:PRINT +1552 FOR L=0 TO 7 +1554 FOR M=0 TO 7 +1556 IF S(L+1,M+1)=1 OR S(L+1,M+1)=2 THEN Z=1 +1558 IF S(L+1,M+1)=-1 OR S(L+1,M+1)=-2 THEN T=1 +1560 NEXT M +1562 NEXT L +1564 IF Z<>1 THEN 1885 +1566 IF T<>1 THEN 1880 +1570 Z=0: T=0 +1590 PRINT "FROM";: GOSUB 5000: E=TX: H=TY: X=E:Y=H:IF S(X+1,Y+1)<=0 THEN 1590 +1670 PRINT "TO";: GOSUB 5000: A=TX: B=TY:X=A:Y=B +1680 IF S(X+1,Y+1)=0 AND ABS(A-E)<=2 AND ABS(A-E)=ABS(B-H)THEN 1700 +1690 GOTO 1670 +1700 I=46 +1750 S(A+1,B+1)=S(E+1,H+1):S(E+1,H+1)=0:IF ABS(E-A)<>2 THEN 1810 +1800 S((E+A)/2+1,(H+B)/2+1)=0 +1802 PRINT "+TO";: GOSUB 5000: A1=TX: B1=TY:IF A1<0 THEN 1810 +1804 IF S(A1+1,B1+1)<>0 OR ABS(A1-A)<>2 OR ABS(B1-B)<>2 THEN 1802 +1806 E=A:H=B:A=A1:B=B1:I=I+15:GOTO 1750 +1810 IF B=7 THEN S(A+1,B+1)=2 +1830 GOTO 230 +1880 PRINT: PRINT "YOU WIN.": END +1885 PRINT: PRINT "I WIN.": END +5000 REM "Subroutine to read two values" +5010 REM "They are loaded as string and split" +5020 INPUT N$ : IF N$="#" THEN END +5030 @S=0: TX=VAL(N$): IF @S<>0 THEN PRINT "ERROR": GOTO 5020 +5040 TC=INSTR(N$, ","): IF TC=0 THEN PRINT "ERROR": GOTO 5020 +5050 TY=VAL(N$(TC+1)): IF @S<>0 THEN PRINT "ERROR": GOTO 5020 +5060 RETURN diff --git a/data/examples/14games/chemist.bas b/data/examples/14games/chemist.bas new file mode 100644 index 0000000000000000000000000000000000000000..5a74645f57f1bb7ce4afff0155b196ccb58cc1ce --- /dev/null +++ b/data/examples/14games/chemist.bas @@ -0,0 +1,33 @@ +10 REM "CHEMIST from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +100 PRINT "THE FICTITIOUS CHECMICAL KRYPTOCYANIC ACID CAN ONLY BE" +110 PRINT "DILUTED BY THE RATIO OF 7 PARTS WATER TO 3 PARTS ACID." +120 PRINT "IF ANY OTHER RATIO IS ATTEMPTED, THE ACID BECOMES UNSTABLE" +130 PRINT "AND SOON EXPLODES. GIVEN THE AMOUNT OF ACID, YOU MUST" +140 PRINT "DECIDE HOW MUCH WATER TO ADD FOR DILUTION. IF YOU MISS" +150 PRINT "YOU FACE THE CONSEQUENCES." : PRINT +160 @R=MILLIS(1) +170 C=0: S=0 +200 REM "Main loop" +210 A=INT(RND(50)) +220 W=7*A/3 +230 PRINT A,"LITERS OF KRYPTOCYANIC ACID. HOW MUCH WATER"; +240 Q=MILLIS(100) +250 INPUT R +260 Q=MILLIS(100)-Q +270 D=ABS(W-R) +280 IF D>W/20 THEN 400 +290 S=S+Q: C=C+1 +300 PRINT " GOOD JOB! YOU MAY BREATHE NOW, BUT DON'T INHALE THE FUMES!" +310 PRINT "AVERAGE REPLY TIME SO FAR", INT(S/C/10), "SECONDS" +320 GOTO 200 +400 PRINT " SIZZLE! YOU HAVE JUST BEEN DESALINATED INTO A BLOB" +410 PRINT " OF QUIVERING PROTOPLASM!" +420 T=T+1 +430 IF T=9 THEN 500 +440 PRINT " HOWEVER, YOU MAY TRY AGAIN WITH ANOTHER LIFE." +450 GOTO 200 +500 PRINT " YOUR 9 LIVES ARE USED, BUT YOU WILL BE LONG REMEMBERED FOR" +510 PRINT " YOUR CONTRIBUTIONS TO THE FIELD OF COMIC BOOK CHEMISTRY." +900 END diff --git a/data/examples/14games/chief.bas b/data/examples/14games/chief.bas new file mode 100644 index 0000000000000000000000000000000000000000..0e1ecf5a7a84d756d0f066dd182aee84233612d7 --- /dev/null +++ b/data/examples/14games/chief.bas @@ -0,0 +1,49 @@ +10 REM "CHIEF from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM "Foul language removed" +40 IF NOT USR(0,3) THEN PRINT "FLOAT REQUIRED": END +100 PRINT "I AM CHIEF NUMBERS FREEK, THE GREAT INDIAN MATH GOD." +110 PRINT "GET READY TO TAKE THE TEST YOU CALLED ME OUT FOR" +120 PRINT +200 PRINT "TAKE A NUMBER AND ADD 3. DIVIDE THIS NUMBER BY 5 AND" +210 PRINT "MULTIPLY BY 8. DIVIDE BY 5 AND ADD 5. SUBTRACT 1." +220 PRINT "WHAT DO YOU HAVE"; +230 INPUT B +240 C=(B+1-5)*5/8*5-3 +250 PRINT "I BET YOUR NUMBER WAS",C,". AM I RIGHT "; +260 INPUT D$ +270 IF D$="YES" OR D$="yes" THEN 510 +300 PRINT "WHAT WAS YOUR ORIGINAL NUMBER "; +310 INPUT K +320 F=K+3 +330 G=F/5 +340 H=G*8 +350 I=H/5+5 +360 J=I-1 +400 PRINT "NOW WATCH." +410 PRINT K, "PLUS 3 EQUALS", F, ". THIS DIVIDED BY 5 EQUALS",G,";" +420 PRINT "THIS TIMES 8 EQUALS",H,". IF WE DIVIDE BY 5 AND ADD 5," +430 PRINT "WE GET",I,", WHICH, MINUS 1, EQUALS",J,"." +440 PRINT "NOW DO YOU BELIEVE ME"; +450 INPUT Z$ +460 IF Z$="YES" OR Z$="yes" THEN 700 +470 PRINT "YOU HAVE MADE ME MAD!!!" +480 PRINT "THERE MUST BE A GREAT LIGHTNING BOLT!" +490 PRINT:PRINT +510 FOR X=30 TO 22 STEP -1 +520 TAB(X): PRINT "X X" +530 NEXT X +540 TAB(21):PRINT "X XXX" +550 TAB(20):PRINT "X X" +560 TAB(19):PRINT "XX X" +570 FOR Y=20 TO 13 STEP -1 +580 TAB(Y):PRINT "X X" +590 NEXT Y +600 TAB(12):PRINT "XX" +610 TAB(11):PRINT "X" +620 TAB(10):PRINT "*" +630 PRINT:PRINT"#########################":PRINT +640 PRINT "I HOPE YOU BELIEVE ME NOW, FOR YOUR SAKE!!" +650 GOTO 450 +700 PRINT "BYE!!!" +900 END diff --git a/data/examples/14games/chomp.bas b/data/examples/14games/chomp.bas new file mode 100644 index 0000000000000000000000000000000000000000..89862af23c1ae3085e999ea6bd260b2da8da866a --- /dev/null +++ b/data/examples/14games/chomp.bas @@ -0,0 +1,106 @@ +10 REM "CHOMP" +20 REM "Ported by Stefan in 2022" +30 REM +40 DIM A(10,10) +100 REM *** THE GAME OF CHOMP *** COPYRIGHT PCC 1973 *** +110 PRINT +120 PRINT "THIS IS THE GAME OF CHOMP (SCIENTIFIC AMERICAN, JAN 1973)" +130 PRINT "DO YOU WANT THE RULES (1=YES, 0=NO!)"; +140 INPUT R +150 IF R=0 THEN 340 +160 F=1 +170 R=5 +180 C=7 +190 PRINT "CHOMP IS FOR 1 OR MORE PLAYERS (HUMANS ONLY)." +200 PRINT +210 PRINT "HERE'S HOW A BOARD LOOKS (THIS ONE IS 5 BY 7):" +220 GOSUB 540 +230 PRINT +240 PRINT "THE BOARD IS A BIG COOKIE - R ROWS HIGH AND C COLUMNS" +250 PRINT "WIDE. YOU INPUT R AND C AT THE START. IN THE UPPER LEFT" +260 PRINT "CORNER OF THE COOKIE IS A POISON SQUARE (P). THE ONE WHO" +270 PRINT "CHOMPS THE POISON SQUARE LOSES. TO TAKE A CHOMP, TYPE THE" +280 PRINT "ROW AND COLUMN OF ONE OF THE SQUARES ON THE COOKIE." +290 PRINT "ALL OF THE SQUARES BELOW AND TO THE RIGHT OF THAT SQUARE" +300 PRINT "(INCLUDING THAT SQUARE, TOO) DISAPPEAR -- CHOMP!!" +310 PRINT "NO FAIR CHOMPING SQUARES THAT HAVE ALREADY BEEN CHOMPED," +320 PRINT "OR THAT ARE OUTSIDE THE ORIGINAL DIMENSIONS OF THE COOKIE." +330 PRINT +340 PRINT "HERE WE GO..." +350 REM +360 F=0 +370 FOR I=1 TO 10 +372 FOR J=1 TO 10 +375 A(I,J)=0 +377 NEXT J +379 NEXT I +380 PRINT +390 PRINT "HOW MANY PLAYERS"; +400 INPUT P +410 I1=0 +420 PRINT "HOW MANY ROWS"; +430 INPUT R +440 IF R <= 9 THEN 470 +450 PRINT "TOO MANY ROWS (9 IS MAXIMUM). NOW, "; +460 GOTO 420 +470 PRINT "HOW MANY COLUMNS"; +480 INPUT C +490 IF C <= 9 THEN 530 +500 PRINT "TOO MANY COLUMNS (9 IS MAXIMUM). NOW, "; +510 GOTO 470 +530 PRINT +540 FOR I=1 TO R +550 FOR J=1 TO C +560 A(I,J)=1 +570 NEXT J +580 NEXT I +590 A(1,1)=-1 +600 REM "PRINT THE BOARD" +610 PRINT +620 TAB 7: PRINT "1 2 3 4 5 6 7 8 9" +630 FOR I=1 TO R +640 PRINT I; +645 TAB 7 +650 FOR J=1 TO C +660 IF A(I,J)=-1 THEN 700 +670 IF A(I,J)=0 THEN 720 +680 PRINT "* "; +690 GOTO 710 +700 PRINT "P "; +710 NEXT J +720 PRINT +730 NEXT I +740 PRINT +750 IF F=0 THEN 770 +760 RETURN +770 REM "GET CHOMPS FOR EACH PLAYER IN TURN" +780 LET I1=I1+1 +790 LET P1=I1-INT(I1/P)*P +800 IF P1 <> 0 THEN 820 +810 P1=P +820 PRINT "PLAYER";P1 +830 PRINT "COORDINATES OF CHOMP (ROW,COLUMN)" +840 INPUT "ROW: ",R1 +845 INPUT "COLUMN: ",C1 +850 IF R1<1 THEN 920 +860 IF R1>R THEN 920 +870 IF C1<1 THEN 920 +880 IF C1>C THEN 920 +890 IF A(R1,C1)=0 THEN 920 +900 IF A(R1,C1)=-1 THEN 1010 +910 GOTO 940 +920 PRINT "NO FAIR. YOU'RE TRYING TO CHOMP ON EMPTY SPACE!" +930 GOTO 820 +940 FOR I=R1 TO R +950 FOR J=C1 TO C +960 A(I,J)=0 +970 NEXT J +980 NEXT I +990 GOTO 610 +1000 REM END OF GAME DETECTED IN LINE 900 +1010 PRINT "YOU LOSE, PLAYER";P1 +1020 PRINT +1030 PRINT "AGAIN (1=YES, 0=NO!)"; +1040 INPUT R +1050 IF R=1 THEN 340 +1060 END diff --git a/data/examples/14games/civilwar.bas b/data/examples/14games/civilwar.bas new file mode 100644 index 0000000000000000000000000000000000000000..8c3d3bff2d06c1d89ae68b42a8c3d768773d7266 --- /dev/null +++ b/data/examples/14games/civilwar.bas @@ -0,0 +1,394 @@ +2 REM "CIVIL WAR" +4 REM "Ported by Stefan in 2022" +20 REM "ORIGINAL GAME DESIGN: CRAM, GOODIE, HIBBARD LEXINGTON H.S." +30 REM "MODIFICATIONS: G. PAUL, R. HESS (TIES), 1973" +50 DIM S(4),C$(32,14),M1(14),M2(14),C1(14),C2(14),M(14) +60 REM "UNION INFO ON LIKELY CONFEDERATE STRATEGY" +70 S(1)=25 : S(2)=25 : S(3)=25 : S(4)=25 +82 REM "READ HISTORICAL DATA."" +84 FOR D=1 TO 14 +86 READ C$()(D): READ M1(D): READ M2(D) +87 READ C1(D): READ C2(D): READ M(D) +88 NEXT D +99 REM "D=RND(-1)" +100 PRINT: PRINT "DO YOU WANT INSTRUCTIONS"; +110 INPUT X$ +120 IF X$="YES" OR X$="yes" THEN 160 +130 IF X$="NO" OR X$="no" THEN 370 +140 PRINT "YES OR NO -- "; +150 GOTO 110 +160 PRINT : PRINT : PRINT : PRINT +170 PRINT "THIS IS A CIVIL WAR SIMULATION." +180 PRINT "TO PLAY TYPE A RESPONSE WHEN THE COMPUTER ASKS." +190 PRINT "REMEMBER THAT ALL FACTORS ARE INTERRELATED AND THAT YOUR" +200 PRINT "RESPONSES COULD CHANGE HISTORY. FACTS AND FIGURES USED ARE" +210 PRINT "BASED ON THE ACTUAL OCCURRENCE. MOST BATTLES TEND TO RESULT" +220 PRINT "AS THEY DID IN THE CIVIL WAR, BUT IT ALL DEPENDS ON YOU!!" +230 PRINT +240 PRINT "THE OBJECT OF THE GAME IS TO WIN AS MANY BATTLES AS "; +245 PRINT "POSSIBLE." +250 PRINT +260 PRINT "YOUR CHOICES FOR DEFENSIVE STRATEGY ARE:" +270 PRINT " (1) ARTILLERY ATTACK" +280 PRINT " (2) FORTIFICATION AGAINST FRONTAL ATTACK" +290 PRINT " (3) FORTIFICATION AGAINST FLANKING MANEUVERS" +300 PRINT " (4) FALLING BACK" +310 PRINT " YOUR CHOICES FOR OFFENSIVE STRATEGY ARE:" +320 PRINT " (1) ARTILLERY ATTACK" +330 PRINT " (2) FRONTAL ATTACK" +340 PRINT " (3) FLANKING MANEUVERS" +350 PRINT " (4) ENCIRCLEMENT" +360 PRINT "YOU MAY SURRENDER BY TYPING A '5' FOR YOUR STRATEGY." +370 PRINT : PRINT : PRINT : PRINT "ARE THERE TWO GENERALS PRESENT "; +380 PRINT "(ANSWER YES OR NO)"; +390 INPUT B$ +400 IF B$="YES" OR B$="yes" THEN 430 +410 IF B$ <> "NO" AND B$ <> "no" THEN 380 +420 PRINT : PRINT "YOU ARE THE CONFEDERACY. GOOD LUCK!" +425 PRINT +430 LET D=1 +440 IF B$ <> "YES" THEN 460 +450 LET D=2 +460 PRINT "SELECT A BATTLE BY TYPING A NUMBER FROM 1 TO 14 ON" +470 PRINT "REQUEST. TYPE ANY OTHER NUMBER TO END THE SIMULATION." +480 PRINT "BUT '0' BRINGS BACK EXACT PREVIOUS BATTLE SITUATION" +490 PRINT "ALLOWING YOU TO REPLAY IT" +500 PRINT +510 PRINT "NOTE: A NEGATIVE FOOD$ ENTRY CAUSES THE PROGRAM TO " +520 PRINT "USE THE ENTRIES FROM THE PREVIOUS BATTLE" +530 PRINT +540 PRINT "AFTER REQUESTING A BATTLE, DO YOU WISH "; +550 PRINT "BATTLE DESCRIPTIONS "; +560 PRINT "(ANSWER YES OR NO)"; +570 INPUT X$ +580 IF X$="YES" OR X$="yes" THEN 600 +590 IF X$ <> "NO" AND X$ <> "no" THEN 560 +600 L=0:W=0:R1=0:Q1=0:M3=0:M4=0:P1=0:P2=0:T1=0:T2=0 +610 F(2)=0:H(2)=0:B(2)=0:R2=0:Q2=0:C6=0:F=0:W0=0:Y=0:Y2=0:U=0:U2=0 +620 PRINT : PRINT : PRINT +630 PRINT "WHICH BATTLE DO YOU WISH TO SIMULATE"; +640 INPUT A +650 IF A <> 0 THEN 660 +655 IF R <> 0 THEN 1140 +660 IF A <=0 THEN 2860 +665 IF A >= 15 THEN 2860 +670 LET CT$=C$()(A) +680 LET M1=M1(A) +690 LET M2=M2(A) +700 LET C1=C1(A) +710 LET C2=C2(A) +720 LET M=M(A) +960 LET U=0 +970 REM "INFLATION CALC" +980 LET I1=10+(L-W)*2 +990 LET I2=10+(W-L)*2 +1000 REM "- MONEY AVAILABLE" +1010 LET D(1)=100*INT((M1*(100-I1)/2000)*(1+(R1-Q1)/(R1+1))+.5) +1020 LET D(2)=100*INT(M2*(100-I2)/2000+.5) +1030 IF B$ <> "YES" AND B$ <> "yes" THEN 1050 +1040 LET D(2)=100*INT((M2*(100-I2)/2000)*(1+(R2-Q2)/(R2+1))+.5) +1050 REM "- MEN AVAILABLE" +1060 LET M5=INT(M1*(1+(P1-T1)/(M3+1))) +1070 LET M6=INT(M2*(1+(P2-T2)/(M4+1))) +1080 LET F1=5*M1/6 +1090 PRINT : PRINT : PRINT : PRINT : PRINT +1100 PRINT "THIS IS THE BATTLE OF ";CT$ +1110 IF X$="NO" OR X$="no" THEN 1150 +1120 IF A>11 THEN 1130 +1125 ON A GOTO 3580,3620,3650,3690,3720,3750,3780,3800,3830,3860,3890 +1130 ON A-11 GOTO 3920,3950,3980 +1140 PRINT CT$;" INSTANT REPLAY" +1150 PRINT +1160 PRINT " ","CONFEDERACY"," UNION" +1170 PRINT "MEN ",#5; " ",M5," ",M6 +1180 PRINT "MONEY ",#5;"$";D(1),"$";D(2) +1190 PRINT "INFLATION",#5;" ";I1+15;"%"," ";I2;"%" +1195 PRINT +1200 REM "- ONLY IN PRINTOUT IS CONFED INFLATION = I1+15%"" +1210 REM "- IF TWO GENERALS, INPUT CONFED. FIRST" +1220 FOR I=1 TO D +1230 IF B$ <> "YES" AND B$ <> "yes" THEN 1260 +1240 IF I=2 THEN 1260 +1250 PRINT "CONFEDERATE GENERAL---"; +1260 PRINT "HOW MUCH DO YOU WISH TO SPEND FOR" +1270 PRINT " - FOOD......"; +1280 INPUT F +1290 IF F >= 0 THEN 1360 +1300 IF R1 <> 0 THEN 1330 +1310 PRINT "NO PREVIOUS ENTRIES" +1320 GOTO 1270 +1330 PRINT "ASSUME YOU WANT TO KEEP SAME ALLOCATIONS" +1340 PRINT +1350 GOTO 1510 +1360 LET F(I)=F +1370 PRINT " - SALARIES.."; +1380 INPUT H(I) +1390 LET N=1 +1400 IF H(I)<0 THEN 1490 +1410 PRINT " - AMMUNITION"; +1420 INPUT B(I) +1430 LET N=2 +1440 IF B(I)<0 THEN 1490 +1450 PRINT +1460 IF F(I)+H(I)+B(I) <= D(I) THEN 1510 +1470 PRINT "THINK AGAIN! YOU HAVE ONLY $"D(I) +1480 GOTO 1270 +1490 PRINT "NEGATIVE VALUES NOT ALLOWED." +1500 ON N GOTO 1370,1410 +1510 IF B$ <> "YES" AND B$ <> "yes" THEN 1550 +1520 IF I=2 THEN 1550 +1530 PRINT "UNION GENERAL---"; +1540 NEXT I +1550 FOR Z=1 TO D +1560 IF B$ <> "YES" AND B$ <> "yes" THEN 1620 +1570 ON Z GOTO 1580,1600 +1580 PRINT "CONFEDERATE "; +1590 GOTO 1620 +1600 PRINT " UNION "; +1610 REM "- FIND MORALE" +1620 LET O=((2*POW(F(Z),2)+POW(H(Z),2))/POW(F1,2)+1) +1630 IF O<10 THEN 1660 +1640 PRINT "MORALE IS HIGH" +1650 GOTO 1700 +1660 IF O<5 THEN 1690 +1670 PRINT "MORALE IS FAIR" +1680 GOTO 1700 +1690 PRINT "MORALE IS POOR" +1700 IF B$ <> "YES" AND B$ <> "yes" THEN 1760 +1710 LET O(Z)=O +1720 NEXT Z +1730 LET O2=O(2) +1740 LET O=O(1) +1750 PRINT "CONFEDERATE GENERAL---"; +1760 REM "- ACTUAL OFF/DEF BATTLE SITUATION" +1770 IF M <> 3 THEN 1800 +1780 PRINT "YOU ARE ON THE OFFENSIVE" +1790 GOTO 1840 +1800 IF M <> 1 THEN 1830 +1810 PRINT "YOU ARE ON THE DEFENSIVE" +1820 GOTO 1840 +1830 PRINT "BOTH SIDES ARE ON THE OFFENSIVE " +1840 PRINT +1850 REM "- CHOOSE STRATEGIES" +1860 IF B$ <> "YES" AND B$ <> "yes" THEN 1910 +1870 FOR I=1 TO 2 +1880 ON I GOTO 1890,1920 +1890 PRINT "CONFEDERATE STRATEGY "; +1900 GOTO 1920 +1910 PRINT "YOUR STRATEGY "; +1920 INPUT Y +1930 IF ABS(Y-3)<3 THEN 1960 +1940 PRINT "STRATEGY ";Y;" NOT ALLOWED." +1950 GOTO 1910 +1960 IF B$="YES" THEN 2000 +1970 IF Y=5 THEN 2830 +1980 GOSUB 3110 +1990 GOTO 2170 +2000 IF I=2 THEN 2040 +2010 LET Y1=Y +2020 PRINT "UNION STRATEGY "; +2030 NEXT I +2040 LET Y2=Y +2050 LET Y=Y1 +2060 IF Y2=5 THEN 2020 +2070 REM ": SIMULATED LOSSES-NORTH" +2080 LET C6=(2*C2/5)*(1+1/(2*(ABS(Y2-Y)+1))) +2090 LET C6=C6*(1.28+(5*M2/6)/(B(2)+1)) +2100 LET C6=INT(C6*(1+1/O2)+.5) +2110 REM "- IF LOSS > MEN PRESENT, RESCALE LOSSES" +2120 LET E2=100/O2 +2130 IF INT(C6+E2) "YES" AND B$ <> "yes" THEN 2350 +2320 PRINT "COMPARED TO THE ACTUAL CASUALTIES AT ";CT$ +2330 PRINT "CONFEDERATE:"; INT(100*(C5/C1)+.5); "% OF THE ORIGINAL" +2340 PRINT "UNION: "; INT(100*(C6/C2)+.5); "% OF THE ORIGINAL" +2350 PRINT +2360 REM "- 1 WHO ONE" +2370 IF U <> 1 THEN 2380 +2375 IF U2=1 THEN 2460 +2380 IF U=1 THEN 2420 +2390 IF U2=1 THEN 2440 +2400 IF C5+E=C6+E2 THEN 2460 +2410 IF C5+E 0 THEN 3180 +3140 INPUT Y2 +3150 IF Y2 <=0 THEN 3160 +3155 IF Y2<5 THEN 3290 +3160 PRINT "ENTER 1 , 2 ,3 , OR 4 (USUALLY PREVIOUS UNION STRATEGY)" +3170 GOTO 3140 +3180 LET S0=0 +3190 LET R=100*RND(0) +3200 FOR I=1 TO 4 +3210 LET S0=S0+S(I) +3220 REM "- IF ACTUAL STRATEGY INFO IS IN PROGRAM DATA STATEMENTS" +3230 REM " THEN R-100 IS EXTRA WEIGHT GIVEN TO THAT STATEGY." +3240 IF R72000 THEN 5 +14 D=30000 +15 E=20000 +16 F=22000 +17 PRINT "YOU ATTACK FIRST. TYPE (1) FOR ARMY; (2) FOR NAVY;" +18 PRINT "AND (3) FOR AIR FORCE." +19 INPUT Y +20 PRINT "HOW MANY MEN" +21 INPUT X +22 IF X<0 THEN 20 +23 ON Y GOTO 100,200,300 +100 IF X>A THEN 20 +105 IF XB THEN 20 +210 IF XC THEN 20 +310 IF XA THEN 1030 +1610 IF TB THEN 1030 +1710 IF TC THEN 1030 +1810 IF T>F/2 THEN 1830 +1820 GOTO 1850 +1830 PRINT "MY NAVY AND AIR FORCE IN A COMBINED ATTACK LEFT" +1831 PRINT "YOUR COUNTRY IN SHAMBLES." +1835 A=A/3 +1837 B=B/3 +1840 C=C/3 +1845 GOTO 2000 +1850 PRINT "ONE OF YOUR PLANES CRASHED INTO MY HOUSE. I AM DEAD." +1851 PRINT "MY COUNTRY FELL APART." +1860 GOTO 2010 +2000 PRINT +2001 PRINT "FROM THE RESULTS OF BOTH OF YOUR ATTACKS," +2002 IF A+B+C>3/2*(D+E+F) THEN 2010 +2005 IF A+B+C<2/3*(D+E+F) THEN 2015 +2006 PRINT "THE TREATY OF PARIS CONCLUDED THAT WE TAKE OUR" +2007 PRINT "RESPECTIVE COUNTRIES AND LIVE IN PEACE." +2008 GOTO 2020 +2010 PRINT "YOU WON, OH! SHUCKS!!!!" +2012 GOTO 2020 +2015 PRINT "YOU LOST-I CONQUERED YOUR COUNTRY. IT SERVES YOU" +2016 PRINT "RIGHT FOR PLAYING THIS STUPID GAME!!!" +2020 END diff --git a/data/examples/14games/craps.bas b/data/examples/14games/craps.bas new file mode 100644 index 0000000000000000000000000000000000000000..d0acb18be30af864d4119cd8580a3cc31444abc2 --- /dev/null +++ b/data/examples/14games/craps.bas @@ -0,0 +1,65 @@ +10 REM "Craps from 101 BASIC games" +20 REM "Originally from DEC, ported to Stefan's BASIC in 2021" +30 @R=MILLIS(1) +100 PRINT "CRAPS FROM 101 BASIC GAMES": PRINT +110 R=0 +120 PRINT"2,3,12 ARE LOSERS; 4,5,6,8,9,10 ARE POINTS;" +130 PRINT"7,11 ARE NATURAL WINNERS." +140 PRINT +150 T=1 +200 PRINT"INPUT THE AMOUNT OF YOUR WAGER."; +210 INPUT F +220 PRINT "I WILL NOW THROW THE DICE" +230 E=INT(RND(7)) +240 S=INT(RND(7)) +250 X=E+S +300 REM "Evaluate result" +310 IF X=7 OR X=11 THEN 400 +320 IF X=1 OR X=0 THEN 230 +330 IF X=2 OR X=3 OR X=12 THEN 700 +340 IF X>=4 AND X<=10 THEN 800 +400 PRINT X, "- NATURAL....A WINNER!!!!" +410 PRINT X, "PAYS EVEN MONEY, YOU WIN",F, "DOLLARS" +420 GOTO 730 +500 PRINT X"- SNAKE EYES....YOU LOSE." +510 PRINT "YOU LOSE",F ,"DOLLARS." +600 F=-F +610 GOTO 730 +700 PRINT X, " - CRAPS...YOU LOSE." +710 PRINT "YOU LOSE", F, "DOLLARS." +720 F=-F +730 R=R+F +740 GOTO 1100 +800 PRINT X, "IS THE POINT. I WILL ROLL AGAIN" +810 H=INT(RND(7)) +820 Q=INT(RND(7)) +830 O=H+Q +840 IF O=1 OR Q=0 THEN 810 +850 IF O=7 THEN 900 +870 IF O=X THEN 1000 +880 PRINT O, " - NO POINT. I WILL ROLL AGAIN" +890 GOTO 810 +900 PRINT O, "- CRAPS. YOU LOSE." +910 PRINT "YOU LOSE $", F +920 F=-F +930 GOTO 730 +940 GOTO 1100 +1000 PRINT X, "- A WINNER.........CONGRATS!!!!!!!!" +1010 PRINT X, "AT 2 TO 1 ODDS PAYS YOU...LET ME SEE...", 2*F, "DOLLARS" +1020 F=2*F +1030 GOTO 730 +1100 PRINT "** IF YOU WANT TO PLAY AGAIN PRINT 5 IF NOT PRINT 2"; +1110 INPUT M +1120 IF R<0 THEN PRINT "YOU ARE NOW UNDER $",-R +1130 IF R>0 THEN PRINT "YOU ARE NOW AHEAD $",R +1140 IF R=0 THEN PRINT "YOU ARE NOW EVEN AT 0" +1200 IF M=5 THEN 200 +1210 IF R<0 THEN 1240 +1220 IF R>0 THEN 1260 +1230 IF R=0 THEN 1280 +1240 PRINT "TOO BAD, YOU ARE IN THE HOLE. COME AGAIN." +1250 GOTO 1300 +1260 PRINT "CONGRATULATIONS---YOU CAME OUT A WINNER. COME AGAIN!" +1270 GOTO 1300 +1280 PRINT "CONGRATULATIONS---YOU CAME OUT EVEN, NOT BAD FOR AN AMATEUR" +1300 END diff --git a/data/examples/14games/cube.bas b/data/examples/14games/cube.bas new file mode 100644 index 0000000000000000000000000000000000000000..e4378030c5eff3bb6ec43a20f594bf364a7aa9ad --- /dev/null +++ b/data/examples/14games/cube.bas @@ -0,0 +1,164 @@ +10 REM "CUBE" +20 REM "Ported by Stefan in 2022" +30 REM +40 @R=MILLIS(1) +100 PRINT "DO YOU WANT TO SEE THE INSTRUCTIONS? (YES--1,NO--0)" +110 INPUT B7 +120 IF B7=0 THEN 370 +130 PRINT"THIS IS A GAME IN WHICH YOU WILL BE PLAYING AGAINST THE" +140 PRINT"RANDOM DECISION OF THE COMPUTER. THE FIELD OF PLAY IS A" +150 PRINT"CUBE OF SIDE 3. ANY OF THE 27 LOCATIONS CAN BE DESIGNATED" +160 PRINT"BY INPUTING THREE NUMBERS SUCH AS 2,3,1. AT THE START," +170 PRINT"YOU ARE AUTOMATICALLY AT LOCATION 1,1,1. THE OBJECT OF" +180 PRINT"THE GAME IS TO GET TO LOCATION 3,3,3. ONE MINOR DETAIL:" +190 PRINT"THE COMPUTER WILL PICK, AT RANDOM, 5 LOCATIONS AT WHICH" +200 PRINT"IT WILL PLANT LAND MINES. IF YOU HIT ONE OF THESE LOCATIONS" +210 PRINT"YOU LOSE. ONE OTHER DETAIL: YOU MAY MOVE ONLY ONE SPACE " +220 PRINT"IN ONE DIRECTION EACH MOVE. FOR EXAMPLE: FROM 1,1,2 YOU" +230 PRINT"MAY MOVE TO 2,1,2 OR 1,1,3. YOU MAY NOT CHANGE" +240 PRINT"TWO OF THE NUMBERS ON THE SAME MOVE. IF YOU MAKE AN ILLEGAL" +250 PRINT"MOVE, YOU LOSE AND THE COMPUTER TAKES THE MONEY YOU MAY" +260 PRINT"HAVE BET ON THAT ROUND." +270 PRINT +280 PRINT +290 PRINT"ALL YES OR NO QUESTIONS WILL BE ANSWERED BY A 1 FOR YES" +300 PRINT"OR A 0 (ZERO) FOR NO." +310 PRINT +320 PRINT"WHEN STATING THE AMOUNT OF A WAGER, PRINT ONLY THE NUMBER" +330 PRINT"OF DOLLARS (EXAMPLE: 250) YOU ARE AUTOMATICALLY STARTED WITH" +340 PRINT"500 DOLLARS IN YOUR ACCOUNT." +350 PRINT +360 PRINT "GOOD LUCK!" +370 LET A1=500 +380 LET A=INT(RND(3)) +390 IF A<>0 THEN 410 +400 LET A=3 +410 LET B=INT(RND(3)) +420 IF B<>0 THEN 440 +430 LET B=2 +440 LET C=INT(RND(3)) +450 IF C<>0 THEN 470 +460 LET C=3 +470 LET D=INT(RND(3)) +480 IF D<>0 THEN 500 +490 LET D=1 +500 LET E=INT(RND(3)) +510 IF E<>0 THEN 530 +520 LET E=3 +530 LET F=INT(RND(3)) +540 IF F<>0 THEN 560 +550 LET F=3 +560 LET G=INT(RND(3)) +570 IF G<>0 THEN 590 +580 LET G=3 +590 LET H=INT(RND(3)) +600 IF H<>0 THEN 620 +610 LET H=3 +620 LET I=INT(RND(3)) +630 IF I<>0 THEN 650 +640 LET I=2 +650 LET J=INT(RND(3)) +660 IF J<>0 THEN 680 +670 LET J=3 +680 LET K=INT(RND(3)) +690 IF K<>0 THEN 710 +700 LET K=2 +710 LET L=INT(RND(3)) +720 IF L<>0 THEN 740 +730 LET L=3 +740 LET M=INT(RND(3)) +750 IF M<>0 THEN 770 +760 LET M=3 +770 LET N=INT(RND(3)) +780 IF N<>0 THEN 800 +790 LET N=1 +800 LET O=INT(RND(3)) +810 IF O<>0 THEN 830 +820 LET O=3 +830 PRINT "WANT TO MAKE A WAGER?" +840 INPUT Z +850 IF Z=0 THEN 920 +860 PRINT "HOW MUCH "; +870 INPUT Z1 +876 IF A10 THEN 1500 +1480 PRINT "YOU BUST." +1490 GOTO 1610 +1500 PRINT " YOU NOW HAVE",Z2 , "DOLLARS." +1510 LET A1=Z2 +1520 GOTO 1580 +1522 PRINT"TRIED TO FOOL ME; BET AGAIN"; +1525 GOTO 870 +1530 PRINT"CONGRATULATIONS!" +1540 IF Z=0 THEN 1580 +1550 LET Z2=A1+Z1 +1560 PRINT "YOU NOW HAVE",Z2 ,"DOLLARS." +1570 LET A1=Z2 +1580 PRINT"DO YOU WANT TO TRY AGAIN "; +1590 INPUT S +1600 IF S=1 THEN 380 +1610 PRINT "TOUGH LUCK!" +1620 PRINT +1630 PRINT "GOODBYE." +1640 END diff --git a/data/examples/14games/depthcha.bas b/data/examples/14games/depthcha.bas new file mode 100644 index 0000000000000000000000000000000000000000..f5a6f7243d79fcb41dbbcbdb8c6beaa627a2ca15 --- /dev/null +++ b/data/examples/14games/depthcha.bas @@ -0,0 +1,38 @@ +2 REM "DEPTH CHARGE from 101 BASIC games" +4 REM "Ported to Stefan's BASIC in 2021" +6 REM +8 IF NOT USR(0, 3) THEN PRINT "NEEDS FLOAT": END +10 @R=MILLIS(1) +20 INPUT "DIMENSION OF SEARCH AREA? ";G: PRINT +30 N=INT(LOG(G)/LOG(2))+1 +40 PRINT "YOU ARE THE CAPTAIN OF THE DESTROYER USS COMPUTER" +50 PRINT "AN ENEMY SUB HAS BEEN CAUSING YOU TROUBLE. YOUR" +60 PRINT "MISSION IS TO DESTROY IT. YOU HAVE",N,"SHOTS." +70 PRINT "SPECIFY DEPTH CHARGE EXPLOSION POINT WITH A" +80 PRINT "TRIO OF NUMBERS -- THE FIRST TWO ARE THE" +90 PRINT "SURFACE COORDINATES; THE THIRD IS THE DEPTH." +100 PRINT : PRINT "GOOD LUCK !": PRINT +110 A=INT(RND(G)) : B=INT(RND(G)) : C=INT(RND(G)) +120 FOR D=1 TO N : PRINT "TRIAL #";D +123 INPUT "X=? ",X +125 INPUT "Y=? ", Y +127 INPUT "Z=? ", Z +130 IF ABS(X-A)+ABS(Y-B)+ABS(Z-C)=0 THEN 300 +140 GOSUB 500 : PRINT : NEXT D +200 PRINT : PRINT "YOU HAVE BEEN TORPEDOED! ABANDON SHIP!" +210 PRINT "THE SUBMARINE WAS AT",A,",",B,",",C : GOTO 400 +300 PRINT : PRINT "B O O M ! ! YOU FOUND IT IN",D,"TRIES!" +400 PRINT : PRINT: INPUT "ANOTHER GAME (Y OR N)? ";A$ +410 IF A$="Y" OR A$="y" THEN 100 +420 PRINT "OK. HOPE YOU ENJOYED YOURSELF." : GOTO 600 +500 PRINT "SONAR REPORTS SHOT WAS "; +510 IF Y>B THEN PRINT "NORTH"; +520 IF YA THEN PRINT "EAST"; +540 IF XB OR X<>A THEN PRINT " AND"; +560 IF Z>C THEN PRINT " TOO LOW." +570 IF ZLEN(A$) THEN PRINT "!";: CONT +34 PRINT A$(C,C); +36 C=C+1 +50 NEXT +53 IF M=Q THEN BREAK +55 TAB(R*M+(R-N)/2) +56 NEXT +60 PRINT +70 NEXT +83 IF X<>1 THEN CONT +85 X=R-2:Y=1:Z=-2 +90 GOTO 20 +95 NEXT +99 END diff --git a/data/examples/14games/dice.bas b/data/examples/14games/dice.bas new file mode 100644 index 0000000000000000000000000000000000000000..05e9fb3f847f1a8a1eea42dbaba4c3148d70b4fb --- /dev/null +++ b/data/examples/14games/dice.bas @@ -0,0 +1,30 @@ +10 REM "DICE from 101 BASIC games" +20 REM "Originally written by Danny Freidus" +30 REM "Ported to Stefan's BASIC in 2021" +40 DIM F(12), P(12) +100 PRINT "THIS PROGRAM SIMULATES THE ROLLING OF A" +110 PRINT "PAIR OF DICE." +120 PRINT "YOU ENTER THE NUMBER OF TIMES YOU WANT THE COMPUTER TO" +130 PRINT "'ROLL' THE DICE. WATCH OUT, VERY LARGE NUMBERS TAKE" +140 PRINT "A LONG TIME. IN PARTICULAR, NUMBERS OVER 5000." +200 FOR Q=1 TO 12 +210 F(Q)=0 +220 NEXT Q +230 P(1)=0 +240 FOR Q=2 TO 12 +250 IF Q<8 THEN P(Q)=P(Q-1)+1 ELSE P(Q)=P(Q-1)-1 +260 NEXT Q +300 INPUT "HOW MANY ROLLS? ", X +310 FOR S=1 TO X +320 R=INT(RND(6)+1)+INT(RND(6)+1) +330 F(R)=F(R)+1 +340 NEXT S +350 PRINT +360 PRINT "SPOTS","NUMBER", "EXPECTATION", "DEVIATION" +370 FOR V=2 TO 12 +380 PRINT #5, V, #8, F(V), X/36*P(V), ABS(F(V)-X/36*P(V)) +390 NEXT V +400 PRINT:PRINT "TRY AGAIN"; +410 INPUT Z$ +420 IF Z$(1,1)="Y" OR Z$(1,1)="y" THEN 200 +500 END diff --git a/data/examples/14games/digits.bas b/data/examples/14games/digits.bas new file mode 100644 index 0000000000000000000000000000000000000000..dc8b3c832a1d9788572d10e10cc8411ad3b4515e --- /dev/null +++ b/data/examples/14games/digits.bas @@ -0,0 +1,80 @@ +10 REM "DIGITS" +20 REM "Ported by Stefan in 2022" +30 REM +210 PRINT "THIS IS A GAME OF GUESSING." +220 PRINT "FOR INSTRUCTIONS, TYPE '1', ELSE TYPE '0'"; +230 INPUT E +240 IF E=0 THEN 360 +250 PRINT +260 PRINT "PLEASE TAKE A PIECE OF PAPER AND WRITE DOWN" +270 PRINT "THE DIGITS '0', '1', OR '2' THIRTY TIMES AT RANDOM." +280 PRINT "ARRANGE THEM IN THREE LINES OF TEN DIGITS EACH." +290 PRINT "I WILL ASK FOR THEN TEN AT A TIME." +300 PRINT "I WILL ALWAYS GUESS THEM FIRST AND THEN LOOK AT YOUR" +310 PRINT "NEXT NUMBER TO SEE IF I WAS RIGHT. BY PURE LUCK," +320 PRINT "I OUGHT TO BE RIGHT TEN TIMES. BUT I HOPE TO DO BETTER" +330 PRINT "THAN THAT *****" +340 PRINT:PRINT +360 READ A: READ B: READ C +370 DATA 0,1,3 +380 DIM M(26+1,2+1),K(2+1,2+1),L(8+1,2+1) +400 FOR I=0 TO 26: FOR J=0 TO 2: M(I+1,J+1)=1: NEXT J: NEXT I +410 FOR I=0 TO 2: FOR J=0 TO 2: K(I+1,J+1)=9: NEXT J: NEXT I +420 FOR I=0 TO 8: FOR J=0 TO 2: L(I+1,J+1)=3: NEXT J: NEXT I +450 L(1,1)=2: L(4+1,1+1)=2: L(8+1,2+1)=2 +480 Z=26: Z1=8: Z2=2 +510 X=0 +520 FOR T=1 TO 3 +530 PRINT +540 PRINT "TEN NUMBERS, PLEASE" +550 FOR I=1 TO 10 +555 PRINT I;" "; : INPUT N(I) +558 NEXT +560 FOR I=1 TO 10 +570 W=N(I)-1 +580 IF W=SGN(W) THEN 620 +590 PRINT "ONLY USE THE DIGITS '0', '1', OR '2'." +600 PRINT "LET'S TRY AGAIN.":GOTO 530 +620 NEXT I +630 PRINT: PRINT "MY GUESS","YOUR NO.","RESULT","NO. RIGHT":PRINT +660 FOR U=1 TO 10 +670 N=N(U): S=0 +690 FOR J=0 TO 2 +700 S1=A*K(Z2+1,J+1)+B*L(Z1+1,J+1)+C*M(Z+1,J+1) +710 IF S>S1 THEN 760 +720 IF S10 THEN 980 +940 IF X<10 THEN 1010 +950 PRINT "I GUESSED EXACTLY 1/3 OF YOUR NUMBERS." +960 PRINT "IT'S A TIE GAME." +970 GOTO 1030 +980 PRINT "I GUESSED MORE THAN 1/3 OF YOUR NUMBERS." +990 PRINT "I WIN." +1000 GOTO 1030 +1010 PRINT "I GUESSED LESS THAN 1/3 OF YOUR NUMBERS." +1020 PRINT "YOU BEAT ME. CONGRATULATIONS *****" +1030 PRINT +1040 PRINT "DO YOU WANT TO TRY AGAIN (1 FOR YES, 0 FOR NO)"; +1060 INPUT X +1070 IF X=1 THEN 400 +1080 PRINT:PRINT "THANKS FOR THE GAME." +1090 END diff --git a/data/examples/14games/evenwins.bas b/data/examples/14games/evenwins.bas new file mode 100644 index 0000000000000000000000000000000000000000..e262eaabc48c60bccc24f00e7ea85a896cc80f16 --- /dev/null +++ b/data/examples/14games/evenwins.bas @@ -0,0 +1,128 @@ +1 REM "EVEN WINS" +2 REM "Ported by Stefan in 2022" +3 REM +4 Y1=0 +10 M1=0 +20 DIM M(20),Y(20) +30 PRINT " THIS IS A TWO PERSON GAME CALLED 'EVEN WINS.'" +40 PRINT "TO PLAY THE GAME, THE PLAYERS NEED 27 MARBLES OR" +50 PRINT "OTHER OBJECTS ON A TABLE." +60 PRINT +70 PRINT +80 PRINT " THE 2 PLAYERS ALTERNATE TURNS, WITH EACH PLAYER" +90 PRINT "REMOVING FROM 1 TO 4 MARBLES ON EACH MOVE. THE GAME" +100 PRINT "ENDS WHEN THERE ARE NO MARBLES LEFT, AND THE WINNER" +110 PRINT "IS THE ONE WITH AN EVEN NUMBER OF MARBLES." +120 PRINT +130 PRINT +140 PRINT " THE ONLY RULES ARE THAT (1) YOU MUST ALTERNATE TURNS," +150 PRINT "(2) YOU MUST TAKE BETWEEN 1 AND 4 MARBLES EACH TURN," +160 PRINT "AND (3) YOU CANNOT SKIP A TURN." +170 PRINT +180 PRINT +190 PRINT +200 PRINT " TYPE A '1' IF YOU WANT TO GO FIRST, AND TYPE" +210 PRINT "A '0' IF YOU WANT ME TO GO FIRST." +220 INPUT C +225 PRINT +230 IF C=0 THEN 250 +240 GOTO 1060 +250 T=27 +260 M=2 +270 PRINT:PRINT "TOTAL=";T:PRINT +280 M1=M1+M +290 T=T-M +300 PRINT "I PICK UP",M,"MARBLES." +310 IF T=0 THEN 880 +320 PRINT:PRINT "TOTAL=";T +330 PRINT +340 PRINT " AND WHAT IS YOUR NEXT MOVE, MY TOTAL IS",M1 +350 INPUT Y +360 PRINT +370 IF Y<1 THEN 1160 +380 IF Y>4 THEN 1160 +390 IF Y<=T THEN 430 +400 PRINT " YOU HAVE TRIED TO TAKE MORE MARBLES THAN THERE ARE" +410 PRINT "LEFT. TRY AGAIN." +420 GOTO 350 +430 Y1=Y1+Y +440 T=T-Y +450 IF T=0 THEN 880 +460 PRINT "TOTAL=";T +470 PRINT +480 PRINT "YOUR TOTAL IS",Y1 +490 IF T<.5 THEN 880 +500 R=T-6*INT(T/6) +510 IF INT(Y1/2)=Y1/2 THEN 700 +520 IF T<4.2 THEN 580 +530 IF R>3.4 THEN 620 +540 M=R+1 +550 M1=M1+M +560 T=T-M +570 GOTO 300 +580 M=T +590 T=T-M +600 GOTO 830 +610 REM 250 IS WHERE I WIN. +620 IF R<4.7 THEN 660 +630 IF R>3.5 THEN 660 +640 M=1 +650 GOTO 670 +660 M=4 +670 T=T-M +680 M1=M1+M +690 GOTO 300 +700 REM I AM READY TO ENCODE THE STRAT FOR WHEN OPP TOT IS EVEN +710 IF R<1.5 THEN 1020 +720 IF R>5.3 THEN 1020 +730 M=R-1 +740 M1=M1+M +750 T=T-M +760 IF T<.2 THEN 790 +770 REM IS # ZERO HERE +780 GOTO 300 +790 REM IS = ZERO HERE +800 PRINT "I PICK UP",M,"MARBLES." +810 PRINT +820 GOTO 880 +830 REM THIS IS WHERE I WIN +840 PRINT "I PICK UP",M,"MARBLES." +850 PRINT +860 PRINT "TOTAL = 0" +870 M1=M1+M +880 PRINT "THAT IS ALL OF THE MARBLES." +890 PRINT +900 PRINT " MY TOTAL IS",M1,", YOUR TOTAL IS",Y1 +910 PRINT +920 IF INT(M1/2)=M1/2 THEN 950 +930 PRINT " YOU WON. DO YOU WANT TO PLAY" +940 GOTO 960 +950 PRINT " I WON. DO YOU WANT TO PLAY" +960 PRINT "AGAIN? TYPE 1 FOR YES AND 0 FOR NO." +970 INPUT A1 +980 IF A1=0 THEN 1030 +990 M1=0 +1000 Y1=0 +1010 GOTO 200 +1020 GOTO 640 +1030 PRINT +1040 PRINT "OK. SEE YOU LATER." +1050 GOTO 1230 +1060 T=27 +1070 PRINT +1080 PRINT +1090 PRINT +1100 PRINT "TOTAL=";T +1110 PRINT +1120 PRINT +1130 PRINT "WHAT IS YOUR FIRST MOVE"; +1140 INPUT Y +1150 GOTO 360 +1160 PRINT +1170 PRINT "THE NUMBER OF MARBLES YOU TAKE MUST BE A POSITIVE" +1180 PRINT "INTEGER BETWEEN 1 AND 4." +1190 PRINT +1200 PRINT " WHAT IS YOUR NEXT MOVE?" +1210 PRINT +1220 GOTO 350 +1230 END diff --git a/data/examples/14games/flipflop.bas b/data/examples/14games/flipflop.bas new file mode 100644 index 0000000000000000000000000000000000000000..ea740a13c97e34636a91a420c4bbfbfd7bacc18f --- /dev/null +++ b/data/examples/14games/flipflop.bas @@ -0,0 +1,74 @@ +10 REM "FLIPFLOP from 101 BASIC games" +20 REM "*** CREATED BY MICHAEL CASS" +30 REM "Ported to Stefan's BASIC in 2021" +40 REM +50 IF NOT USR(0, 3) THEN PRINT "NEEDS FLOAT": END +60 DIM A(20) +100 PRINT "THE OBJECT OF THIS PUZZLE IS TO CHANGE THIS:": PRINT +105 PRINT "X X X X X X X X X X": PRINT +110 PRINT "TO THIS:": PRINT +115 PRINT "O O O O O O O O O O": PRINT +120 PRINT "BY TYPING THE NUMBER CORRESPONDING TO THE POSITION OF THE" +130 PRINT "LETTER ON SOME NUMBERS, ONE POSITION WILL CHANGE, ON" +140 PRINT "OTHERS, TWO WILL CHANGE. TO RESET LINE TO ALL X'S, TYPE 0" +150 PRINT "(ZERO) AND TO START OVER IN THE MIDDLE OF A GAME, TYPE " +160 PRINT "11 (ELEVEN)." +170 PRINT +180 REM "Main loop() starts here" +190 Q=RND(1) +200 PRINT "HERE IS THE STARTING LINE OF X'S." +210 PRINT +220 C=0 +230 PRINT "1 2 3 4 5 6 7 8 9 10" +240 PRINT "X X X X X X X X X X" +250 PRINT +260 REM +270 FOR X=1 TO 10 +280 A(X)="X" +290 NEXT X +300 GOTO 320 +310 PRINT "ILLEGAL ENTRY--TRY AGAIN." +320 PRINT "INPUT THE NUMBER"; +330 INPUT N +340 IF N<>INT(N) THEN 310 +350 IF N=11 THEN 180 +360 IF N>11 THEN 310 +370 IF N=0 THEN 230 +380 IF M=N THEN 510 +390 M=N +400 IF A(N)="O" THEN 480 +410 A(N)="O" +420 R=TAN(Q+N/Q-N)-SIN(Q/N)+336*SIN(8*N) +430 N=R-INT(R) +440 N=INT(10*N)+1 +450 IF A(N)="O" THEN 480 +460 A(N)="O" +470 GOTO 610 +480 A(N)="X" +490 IF M=N THEN 420 +500 GOTO 610 +510 IF A(N)="O" THEN 590 +520 A(N)="O" +530 R=0.592*(1/TAN(Q/N+Q))/SIN(N*2+Q)-COS(N) +540 N=R-INT(R) +550 N=INT(10*N)+1 +560 IF A(N)="O" THEN 590 +570 A(N)="O" +580 GOTO 610 +590 A(N)="X" +600 IF M=N THEN 530 +610 PRINT "1 2 3 4 5 6 7 8 9 10" +620 FOR Z=1 TO 10: PUT A(Z), " ": NEXT Z +630 C=C+1 +640 PRINT +650 FOR Z=1 TO 10 +660 IF A(Z)<>"O" THEN 320 +670 NEXT Z +680 IF C<=12 THEN PRINT "VERY GOOD. YOU GUESSED IT IN ONLY";C;"GUESSES." +690 ELSE "TRY HARDER NEXT TIME. IT TOOK YOU";C;"GUESSES." +720 PRINT "DO YOU WANT TO TRY ANOTHER PUZZLE"; +730 INPUT X$ +740 IF X$(1,1)="N" OR X$(1,1)="n" THEN 780 +760 PRINT +770 GOTO 180 +780 END diff --git a/data/examples/14games/football.bas b/data/examples/14games/football.bas new file mode 100644 index 0000000000000000000000000000000000000000..1e23417e4966ec75622056c2abb6a8302817fad8 --- /dev/null +++ b/data/examples/14games/football.bas @@ -0,0 +1,182 @@ +1 REM "FOOTBALL" +2 REM "Ported by Stefan in 2022" +3 REM +10 SET 11,1: REM "Set TAB to MS mode" +100 REM +120 DIM A(20),B(20),C(40),H(2),T(2),W(2),X(2),Y(2),Z(2) +130 DIM M$(32, 2),D(2),P$(32, 20) +140 PRINT "PRESENTING N.F.U. FOOTBALL (NO FORTRAN USED)" +145 PRINT:PRINT +150 INPUT "DO YOU WANT INSTRUCTIONS? ";A$ +160 IF A$="NO" OR A$="no" THEN 290 +165 IF A$<>"YES" AND A$<>"yes" THEN 150 +170 PRINT "THIS IS A FOOTBALL GAME FOR TWO TEAMS IN WHICH PLAYERS MUST" +180 PRINT "PREPARE A TAPE WITH A DATA STATEMENT (1770 FOR TEAM 1," +190 PRINT "1780 FOR TEAM 2) IN WHICH EACH TEAM SCRAMBLES NOS. 1-20" +195 PRINT "THESE NUMBERS ARE THEN ASSIGNED TO TWENTY GIVEN PLAYS." +200 PRINT"A LIST OF NOS. AND THEIR PLAYS IS PROVIDED WITH" +210 PRINT "BOTH TEAMS HAVING THE SAME PLAYS. THE MORE SIMILAR THE" +220 PRINT "PLAYS THE LESS YARDAGE GAINED. SCORES ARE GIVEN" +223 PRINT "WHENEVER SCORES ARE MADE. SCORES MAY ALSO BE OBTAINED" +225 PRINT "BY INPUTTING 99,99 FOR PLAY NOS. TO PUNT OR ATTEMPT A" +227 PRINT "FIELD GOAL, INPUT 77,77 FOR PLAY NUMBERS. QUESTIONS WILL BE" +230 PRINT "ASKED THEN. ON 4TH DOWN, YOU WILL ALSO BE ASKED WHETHER" +240 PRINT "YOU WANT TO PUNT OR ATTEMPT A FIELD GOAL. IF THE ANSWER TO" +250 PRINT "BOTH QUESTIONS IS NO IT WILL BE ASSUMED YOU WANT TO" +260 PRINT "TRY AND GAIN YARDAGE. ANSWER ALL QUESTIONS YES OR NO." +270 PRINT "THE GAME IS PLAYED UNTIL PLAYERS TERMINATE (CONTROL-C)." +280 PRINT "PLEASE PREPARE A TAPE AND RUN.": REM "STOP" +290 PRINT:PRINT "PLEASE INPUT SCORE LIMIT ON GAME";:INPUT E +300 FOR I=1 TO 40: READ N: IF I>20 THEN 350 +330 A(N)=I: GOTO 360 +350 B(N)=I-20 +360 C(I)=N: NEXT I +370 FOR I=1 TO 20: READ P$()(I): NEXT I +380 L=0: T=1 +410 PRINT "TEAM ";T;" PLAY CHART" +420 PRINT "NO. PLAY" +430 FOR I=1 TO 20 +440 REM +450 PRINT C(I+L);: TAB 6: PRINT P$()(I) +460 NEXT I +630 L=L+20:T=2 +640 PRINT +650 PRINT "TEAR OFF HERE----------------------------------------------" +660 FOR X=1 TO 11: PRINT: NEXT X +670 FOR Z=1 TO 3000: NEXT Z +680 IF L=20 THEN 410 +690 D(1)=0: D(2)=3: M$()(1)="--->": M$()(2)="<---" +700 H(1)=0: H(2)=0: T(1)=2: T(2)=1 +710 W(1)=-1: W(2)=1: X(1)=100: X(2)=0 +720 Y(1)=1: Y(2)=-1: Z(1)=0: Z(2)=100 +725 GOSUB 1910 +730 PRINT "TEAM 1 DEFENDS 0 YD GOAL -- TEAM 2 DEFENDS 100 YD GOAL." +740 T=INT(2*RND(1)+1) +760 PRINT: PRINT "THE COIN IS FLIPPED" +765 P=X(T)-Y(T)*40 +770 GOSUB 1860: PRINT : PRINT "TEAM ";T;" RECEIVES KICK-OFF" +780 K=INT(26*RND(1)+40) +790 P=P-Y(T)*K +794 IF W(T)*P"NO" AND A$<>"no" THEN 830 +850 IF W(T)*P1 THEN 900 +895 IF Y(T)*(P+Y(T)*10)>=X(T) THEN 898 +897 C=4: GOTO 900 +898 C=8 +900 IF C=8 THEN 904 +901 TAB 27: PRINT 10-(Y(T)*P-Y(T)*S);" YARDS TO 1ST DOWN" +902 GOTO 910 +904 TAB 27: PRINT X(T)-Y(T)*P;" YARDS" +910 GOSUB 1900: IF D=4 THEN 1180 +920 REM +930 U=INT(3*RND(0)-1): GOTO 940 +936 PRINT "ILLEGAL PLAY NUMBER, CHECK AND" +940 PRINT "INPUT OFFENSIVE PLAY, DEFENSIVE PLAY"; +950 IF T=2 THEN 970 +960 INPUT P1,P2: GOTO 975 +970 INPUT P2,P1 +975 IF P1=77 THEN 1180 +980 IF P1>20 THEN 1800 +985 IF P1<1 THEN 1800 +990 IF P2>20 THEN 1800 +992 IF P2<1 THEN 1800 +995 P1=INT(P1): P2=INT(P2) +1000 Y=INT(ABS(A(P1)-B(P2))/19*((X(T)-Y(T)*P+25)*RND(1)-15)) +1005 PRINT: IF T=2 THEN 1015 +1010 IF A(P1)<11 THEN 1048 +1012 GOTO 1020 +1015 IF B(P2)<11 THEN 1048 +1020 IF U<>0 THEN 1035 +1025 PRINT "PASS INCOMPLETE TEAM ";T +1030 Y=0: GOTO 1050 +1035 G=RND(1): IF G>.025 THEN 1040 +1037 IF Y>2 THEN 1045 +1040 PRINT "QUARTERBACK SCRAMBLED": GOTO 1050 +1045 PRINT "PASS COMPLETED": GOTO 1050 +1048 PRINT "THE BALL WAS RUN" +1050 P=P-W(T)*Y +1060 PRINT: PRINT "NET YARDS GAINED ON DOWN ";D;" ARE ";Y +1070 G=RND(1): IF G>.025 THEN 1110 +1080 PRINT: PRINT "** LOSS OF POSSESSION FROM TEAM ";T;" TO TEAM ";T(T) +1100 GOSUB 1850: PRINT: T=T(T): GOTO 830 +1110 IF Y(T)*P>=X(T) THEN 1320 +1120 IF W(T)*P>=Z(T) THEN 1230 +1130 IF Y(T)*P-Y(T)*S>=10 THEN 880 +1140 D=D+1: IF D<>5 THEN 885 +1160 PRINT: PRINT "CONVERSION UNSUCCESSFUL TEAM ";T:T=T(T) +1170 GOSUB 1850: GOTO 880 +1180 PRINT "DOES TEAM ";T;" WANT TO PUNT ";: INPUT A$ +1185 IF A$="NO" OR A$="no" THEN 1200 +1187 IF A$<>"YES" AND A$<>"yes" THEN 1180 +1190 PRINT:PRINT "TEAM ";T;" WILL PUNT": G=RND(1): IF G<.025 THEN 1080 +1195 GOSUB 1850: K=INT(25*RND(1)+35): T=T(T): GOTO 790 +1200 PRINT "DOES TEAM ";T;" WANT TO ATTEMPT A FIELD GOAL";: INPUT A$ +1210 IF A$="YES" OR A$="yes" THEN 1640 +1215 IF A$<>"NO" AND A$<>"no" THEN 1200 +1217 GOTO 920 +1230 PRINT: PRINT "SAFETY AGAINST TEAM ";T;" **********************OH-OH" +1240 H(T(T))=H(T(T))+2: GOSUB 1810 +1280 PRINT"TEAM ";T;" DO YOU WANT TO PUNT INSTEAD OF A KICKOFF";:INPUT A$ +1290 P=Z(T)-W(T)*20: IF A$="YES" OR A$="yes" THEN 1190 +1320 PRINT: PRINT "TOUCHDOWN BY TEAM ";T;" *********************YEA TEAM" +1340 Q=7: G=RND(1): IF G>.1 THEN 1380 +1360 Q=6: PRINT "EXTRA POINT NO GOOD": GOTO 1390 +1380 PRINT "EXTRA POINT GOOD" +1390 H(T)=H(T)+Q: GOSUB 1810 +1420 T=T(T): GOTO 765 +1430 K=INT(9*RND(0)+1) +1440 R=INT(((X(T)-Y(T)*P+25)*RND(1)-15)/K) +1460 P=P-W(T)*R +1480 PRINT:PRINT "RUNBACK TEAM ";T;R;" YARDS" +1485 G=RND(1): IF G<.025 THEN 1080 +1490 IF Y(T)*P>=X(T) THEN 1320 +1500 IF W(T)*P>=Z(T) THEN 1230 +1510 GOTO 880 +1640 PRINT: PRINT "TEAM ";T;" WILL ATTEMPT A FIELD GOAL" +1645 G=RND(1): IF G<.025 THEN 1080 +1650 F=INT(35*RND(1)+20) +1660 PRINT: PRINT "KICK IS ";F;" YARDS LONG" +1680 P=P-W(T)*F: G=RND(1) +1690 IF G<.35 THEN 1735 +1700 IF Y(T)*P99 THEN 936 +1810 PRINT: PRINT "TEAM 1 SCORE IS ";H(1) +1820 PRINT "TEAM 2 SCORE IS ";H(2): PRINT +1825 IF H(T)=50 THEN 700 +630 LET Y=INT(50*POW(RND(1),2))+(1-P)*INT(50*POW(RND(1),4)) +640 LET X=X+FNF(1)*Y +650 IF ABS(X-50)>=50 THEN 655 +651 PRINT Y;L$()(3);" RUNBACK" +652 GOTO 720 +655 PRINT L$()(4); +660 GOTO 2600 +700 PRINT "TOUCHBACK FOR ";O$()(P+1);"." +710 LET X=20+P*60 +720 REM "FIRST DOWN" +730 GOSUB 800 +740 LET X1=X +750 LET D=1 +760 PRINT:PRINT "FIRST DOWN ";O$()(P+1);"***" +770 PRINT +780 PRINT +790 GOTO 860 +800 REM "PRINT POSITION" +810 IF X>50 THEN 840 +820 PRINT L$()(5),O$()(0+1),X,L$()(6) +830 GOTO 850 +840 PRINT L$()(5),O$()(1+1),100-X,L$()(6) +850 RETURN +860 REM "NEW PLAY" +870 LET T=T+1 +880 IF T=30 THEN 1060 +890 IF T<50 THEN 940 +900 IF RND(1)>.2 THEN 940 +910 PRINT "END OF GAME ***" +920 PRINT "FINAL SCORE: ";O$()(0+1);": ";S(0+1);" ";O$()(1+1);": ";S(1+1) +930 STOP +940 IF P=1 THEN 1870 +950 PRINT "NEXT PLAY"; +960 INPUT Z +970 IF Z<>INT(Z) THEN 990 +980 IF ABS(Z-4)<=3 THEN 1010 +990 PRINT "ILLEGAL PLAY NUMBER, RETYPE"; +1000 GOTO 960 +1010 LET F=0 +1020 PRINT L$()(Z+6);". "; +1030 LET R=RND(1)*(.98+FNF(1)*.02) +1040 LET R1=RND(1) +1050 ON Z GOTO 1110,1150,1260,1480,1570,1570,1680 +1060 REM "JEAN'S SPECIAL" +1070 IF RND(1)> 1/3 THEN 940 +1080 PRINT "GAME DELAYED. DOG ON FIELD." +1090 PRINT +1100 GOTO 940 +1110 REM "SIMPLE RUN" +1120 LET Y=INT(24*POW(R-.5, 3)+3) +1130 IF RND(1)<.05 THEN 1180 +1140 GOTO 2190 +1150 REM "TRICKY RUN" +1160 LET Y=INT(20*R-5) +1170 IF RND(1)>.1 THEN 2190 +1180 LET F=-1 +1190 LET X3=X +1200 LET X=X+FNF(1)*Y +1210 IF ABS(X-50)>=50 THEN 1240 +1220 PRINT "*** FUMBLE AFTER "; +1230 GOTO 2230 +1240 PRINT "*** FUMBLE." +1250 GOTO 2450 +1260 REM "SHORT PASS" +1270 LET Y=INT(60*POW(R1-.5, 3)+10) +1280 IF R<.05 THEN 1330 +1290 IF R<.15 THEN 1390 +1300 IF R<.55 THEN 1420 +1310 PRINT "COMPLETE. "; +1320 GOTO 2190 +1330 IF D=4 THEN 1420 +1340 PRINT "INTERCEPTED." +1350 LET F=-1 +1360 LET X=X+FNF(1)*Y +1370 IF ABS(X-50)>=50 THEN 2450 +1380 GOTO 2300 +1390 PRINT "PASSER TACKLED. "; +1400 LET Y=-INT(10*R1) +1410 GOTO 2190 +1420 LET Y=0 +1430 IF RND(1)<.3 THEN 1460 +1440 PRINT "INCOMPLETE. "; +1450 GOTO 2190 +1460 PRINT "BATTED DOWN. "; +1470 GOTO 2190 +1480 REM "LONG PASS" +1490 LET Y=INT(160*POW(R1-.5, 3)+30) +1500 IF R<.1 THEN 1330 +1510 IF R<.3 THEN 1540 +1520 IF R<.75 THEN 1420 +1530 GOTO 1310 +1540 PRINT "PASSER TACKLED. "; +1550 LET Y=-INT(15*R1+3) +1560 GOTO 2190 +1570 REM "PUNT OR KICK" +1580 LET Y=INT(100*POW(R-.5, 3)+35) +1590 IF D=4 THEN 1610 +1600 LET Y=INT(Y*1.3) +1610 PRINT Y;L$()(3);" PUNT" +1620 IF ABS(X+Y*FNF(1)-50)>=50 THEN 1670 +1630 IF D<4 THEN 1670 +1640 LET Y1=INT(POW(R1, 2)*20) +1650 PRINT Y1;L$()(3);" RUN BACK" +1660 LET Y=Y-Y1 +1670 GOTO 1350 +1680 REM "PLACE KICK" +1690 LET Y=INT(100*POW(R-.5, 3)+35) +1700 IF R1>.15 THEN 1740 +1710 PRINT "KICK IS BLOCKED ***" +1720 LET X=X-5*FNF(1) +1730 LET P=1-P +1740 GOTO 720 +1750 LET X=X+FNF(1)*Y +1760 IF ABS(X-50)>=60 THEN 1810 +1770 PRINT "KICK IS SHORT." +1780 IF ABS(X-50)>=50 THEN 2710 +1790 P=1-P +1800 GOTO 630 +1810 IF R1>.5 THEN 1840 +1820 PRINT "KICK IS OFF TO THE SIDE." +1830 GOTO 2710 +1840 PRINT "FIELD GOAL ***" +1850 LET S(P+1)=S(P+1)+3 +1860 GOTO 2640 +1870 REM "OPPONENT'S PLAY" +1880 IF D>1 THEN 1940 +1890 IF RND(1)>1/3 THEN 1920 +1900 LET Z=3 +1910 GOTO 1010 +1920 LET Z=1 +1930 GOTO 1010 +1940 IF D=4 THEN 2090 +1950 IF 10+X-X1<5 THEN 1890 +1960 IF X<5 THEN 1890 +1970 IF X<=10 THEN 2160 +1980 IF X>X1 THEN 2020 +1990 LET A=INT(2*RND(1)) +2000 LET Z=2+A*2 +2010 GOTO 1010 +2020 IF D<3 THEN 1990 +2030 IF X<45 THEN 1990 +2040 IF RND(1)>1/4 THEN 2070 +2050 LET Z=6 +2060 GOTO 1010 +2070 LET Z=4 +2080 GOTO 1010 +2090 IF X>30 THEN 2140 +2100 IF 10+X-X1<3 THEN 1890 +2110 IF X<3 THEN 1890 +2120 LET Z=7 +2130 GOTO 1010 +2140 LET Z=5 +2150 GOTO 1010 +2160 LET A=INT(2*RND(1)) +2170 LET Z=2+A +2180 GOTO 1010 +2190 REM "GAIN OR LOSS" +2200 LET X3=X +2210 LET X=X+FNF(1)*Y +2220 IF ABS(X-50)>=50 THEN 2450 +2230 IF Y=0 THEN 2250 +2240 PRINT ABS(Y);L$()(3); +2250 PRINT L$()(15+SGN(Y)) +2280 IF ABS(X3-50)>40 THEN 2300 +2290 IF RND(1)<.1 THEN 2860 +2300 GOSUB 800 +2310 IF F=0 THEN 2340 +2320 LET P=1-P +2330 GOTO 740 +2340 IF FNG(1)>=10 THEN 740 +2350 IF D=4 THEN 2320 +2360 LET D=D+1 +2370 PRINT "DOWN: ";D;" "; +2380 IF (X1-50)*FNF(1)<40 THEN 2410 +2390 PRINT "GOAL TO GO" +2400 GOTO 2420 +2410 PRINT "YARDS TO GO: ";10-FNG(1) +2420 PRINT +2430 PRINT +2440 GOTO 860 +2450 REM "BALL IN END-ZONE" +2460 IF X>=100 THEN 2490 +2470 LET E=0 +2480 GOTO 2500 +2490 LET E=1 +2500 ON 1+E-F*2+P*4 GOTO 2510,2590,2760,2710,2590,2510,2710,2760 +2510 REM "SAFETY" +2520 LET S(1-P+1)=S(1-P+1)+2 +2530 PRINT L$()(19) +2540 GOSUB 2800 +2550 PRINT O$()(P+1);" KICKS OFF FROM ITS 20 YARD LINE." +2560 LET X=20+P*60 +2570 LET P=1-P +2580 GOTO 590 +2590 REM "OFFENSIVE TD" +2600 PRINT L$()(17);"***" +2610 IF RND(1)>.8 THEN 2680 +2620 LET S(P+1)=S(P+1)+7 +2630 PRINT "KICK IS GOOD." +2640 GOSUB 2800 +2650 PRINT O$()(P+1);" KICKS OFF" +2660 LET P=1-P +2670 GOTO 580 +2680 PRINT "KICK IS OFF TO THE SIDE" +2690 LET S(P+1)=S(P+1)+6 +2700 GOTO 2640 +2710 REM "TOUCHBACK" +2720 PRINT L$()(18) +2730 LET P=1-P +2740 LET X=20+P*60 +2750 GOTO 720 +2760 REM "DEFENSIVE TD" +2770 PRINT L$()(17);"FOR ";O$()(1-P+1);"***" +2780 LET P=1-P +2790 GOTO 2600 +2800 REM "SCORE" +2810 PRINT +2820 PRINT "SCORE: ";S(0+1);" TO ";S(1+1) +2830 PRINT +2840 PRINT +2850 RETURN +2860 REM "PENALTY" +2870 LET P3=INT(2*RND(1)) +2880 PRINT O$()(P3+1);" OFFSIDES -- PENALTY OF 5 YARDS." +2890 PRINT +2900 PRINT +2910 IF P3=0 THEN 2980 +2920 PRINT "DO YOU ACCEPT THE PENALTY"; +2930 INPUT A$ +2940 IF A$="NO" THEN 2300 +2950 IF A$="YES" THEN 3110 +2960 PRINT "TYPE 'YES' OR 'NO'"; +2970 GOTO 2930 +2980 REM "OPPONENT'S STRATEGY ON PENALTY" +2990 IF P=1 THEN 3040 +3000 IF Y<=0 THEN 3080 +3010 IF F<0 THEN 3080 +3020 IF FNG(1)<3*D-2 THEN 3080 +3030 GOTO 3100 +3040 IF Y<=5 THEN 3100 +3050 IF F<0 THEN 3100 +3060 IF D<4 THEN 3080 +3070 IF FNG(1)<10 THEN 3100 +3080 PRINT "PENALTY REFUSED." +3090 GOTO 2300 +3100 PRINT "PENALTY ACCEPTED." +3110 LET F=0 +3120 LET D=D-1 +3130 IF P<>P3 THEN 3160 +3140 LET X=X3-FNF(1)*5 +3150 GOTO 2300 +3160 LET X=X3+FNF(1)*5 +3170 GOTO 2300 +3180 END diff --git a/data/examples/14games/furtrade.bas b/data/examples/14games/furtrade.bas new file mode 100644 index 0000000000000000000000000000000000000000..b7bb43ec426b8ec9e1a7534e6ba3401b3e0070a4 --- /dev/null +++ b/data/examples/14games/furtrade.bas @@ -0,0 +1,169 @@ +2 REM "FUR TRADER" +4 REM "Ported by Stefan in 2022" +6 REM +10 DIM F(4+1) +15 GOSUB 1091 +16 LET I=600 +17 PRINT "DO YOU WISH TO TRADE FURS?" +18 GOSUB 1402 +19 IF B$(1,3)="YES" OR B$(1,3)="yes" THEN 100 +21 STOP +100 PRINT +101 PRINT "YOU HAVE $";I " SAVINGS." +102 PRINT "AND 190 FURS TO BEGIN THE EXPEDITION." +261 LET E1=INT((.15*RND(1)+.95)*100+.5)/100 +262 LET B1=INT((.25*RND(1)+1.00)*100+.5)/100 +300 PRINT +301 PRINT "YOUR 190 FURS ARE DISTRIBUTED AMONG THE FOLLOWING" +302 PRINT "KINDS OF PELTS: MINK, BEAVER, ERMINE AND FOX." +310 GOSUB 1430 +315 RESTORE +330 FOR J=1 TO 4 +332 READ B$ +333 PRINT +335 PRINT "HOW MANY ";B$;" PELTS DO YOU HAVE"; +338 INPUT F(J+1) +340 LET F(0+1)=F(1+1)+F(2+1)+F(3+1)+F(4+1) +342 IF F(0+1)=190 THEN 1100 +344 IF F(0+1)>190 THEN 500 +348 NEXT J +350 GOTO 1100 +500 PRINT +501 PRINT "YOU MAY NOT HAVE THAT MANY FURS." +502 PRINT "DO NOT TRY TO CHEAT. I CAN ADD." +503 PRINT "YOU MUST START AGAIN." +504 GOTO 15 +508 PRINT +511 PRINT "DO YOU WANT TO TRADE FURS NEXT YEAR?" +513 GOTO 18 +1091 PRINT "YOU ARE THE LEADER OF A FRENCH FUR TRADING EXPEDITION IN " +1092 PRINT "1776 LEAVING THE LAKE ONTARIO AREA TO SELL FURS AND GET" +1093 PRINT "SUPPLIES FOR THE NEXT YEAR. YOU HAVE A CHOICE OF THREE" +1094 PRINT "FORTS AT WHICH YOU MAY TRADE. THE COST OF SUPPLIES" +1095 PRINT "AND THE AMOUNT YOU RECEIVE FOR YOUR FURS WILL DEPEND" +1096 PRINT "ON THE FORT THAT YOU CHOOSE." +1099 RETURN +1100 PRINT "YOU MAY TRADE YOUR FURS AT FORT 1, FORT 2," +1102 PRINT "OR FORT 3. FORT 1 IS FORT HOCHELAGA (MONTREAL)" +1103 PRINT "AND IS UNDER THE PROTECTION OF THE FRENCH ARMY." +1104 PRINT "FORT 2 IS FORT STADACONA (QUEBEC) AND IS UNDER THE" +1105 PRINT "PROTECTION OF THE FRENCH ARMY. HOWEVER, YOU MUST" +1106 PRINT "MAKE A PORTAGE AND CROSS THE LACHINE RAPIDS." +1108 PRINT "FORT 3 IS FORT NEW YORK AND IS UNDER DUTCH CONTROL." +1109 PRINT "YOU MUST CROSS THROUGH IROQUOIS LAND." +1110 PRINT "ANSWER 1, 2, OR 3." +1111 INPUT B +1112 IF B=1 THEN 1120 +1113 IF B=2 THEN 1135 +1115 IF B=3 THEN 1147 +1116 GOTO 1110 +1120 PRINT "YOU HAVE CHOSEN THE EASIEST ROUTE. HOWEVER, THE FORT" +1121 PRINT "IS FAR FROM ANY SEAPORT. THE VALUE" +1122 PRINT "YOU RECEIVE FOR YOUR FURS WILL BE LOW AND THE COST" +1123 PRINT "OF SUPPLIES HIGHER THAN AT FORTS STADACONA OR NEW YORK." +1125 GOSUB 1400 +1129 IF B$(1,3)="YES" OR B$(1,3)="yes" THEN 1110 +1130 GOTO 1160 +1135 PRINT "YOU HAVE CHOSEN A HARD ROUTE. IT IS, IN COMPARSION," +1136 PRINT "HARDER THAN THE ROUTE TO HOCHELAGA BUT EASIER THAN" +1137 PRINT "THE ROUTE TO NEW YORK. YOU WILL RECEIVE AN AVERAGE VALUE" +1138 PRINT "FOR YOUR FURS AND THE COST OF YOUR SUPPLIES WILL BE AVERAGE." +1141 GOSUB 1400 +1144 IF B$(1,3)="YES" OR B$(1,3)="yes" THEN 1110 +1145 GOTO 1198 +1147 PRINT "YOU HAVE CHOSEN THE MOST DIFFICULT ROUTE. AT" +1148 PRINT "FORT NEW YORK YOU WILL RECEIVE THE HIGHEST VALUE" +1149 PRINT "FOR YOUR FURS. THE COST OF YOUR SUPPLIES" +1150 PRINT "WILL BE LOWER THAN AT ALL THE OTHER FORTS." +1152 GOSUB 1400 +1155 IF B$(1,3)="YES" OR B$(1,3)="yes" THEN 1110 +1156 GOTO 1250 +1160 LET I=I-160 +1169 PRINT +1174 LET M1=INT((.2*RND(1)+.7)*100+.5)/100 +1175 LET E1=INT((.2*RND(1)+.65)*100+.5)/100 +1176 LET B1=INT((.2*RND(1)+.75)*100+.5)/100 +1177 LET D1=INT((.2*RND(1)+.8)*100+.5)/100 +1180 PRINT "SUPPLIES AT FORT HOCHELAGA COST $150.00." +1181 PRINT "YOUR TRAVEL EXPENSES TO HOCHELAGA WERE $10.00." +1190 GOTO 1410 +1198 LET I=I-140 +1201 PRINT +1205 LET M1=INT((.3*RND(1)+.85)*100+.5)/100 +1206 LET E1=INT((.15*RND(1)+.8)*100+.5)/100 +1207 LET B1=INT((.2*RND(1)+.9)*100+.5)/100 +1209 LET P=INT(10*RND(1))+1 +1210 IF P<=2 THEN 1216 +1212 IF P<=6 THEN 1224 +1213 IF P<=8 THEN 1226 +1215 IF P<=10 THEN 1235 +1216 LET F(2+1)=0 +1218 PRINT "YOUR BEAVER WERE TOO HEAVY TO CARRY ACROSS" +1219 PRINT "THE PORTAGE. YOU HAD TO LEAVE THE PELTS, BUT FOUND" +1220 PRINT "THEM STOLEN WHEN YOU RETURNED." +1221 GOSUB 1244 +1222 GOTO 1414 +1224 PRINT "YOU ARRIVED SAFELY AT FORT STADACONA." +1225 GOTO 1239 +1226 GOSUB 1430 +1230 PRINT "YOUR CANOE UPSET IN THE LACHINE RAPIDS. YOU" +1231 PRINT "LOST ALL YOUR FURS." +1232 GOSUB 1244 +1233 GOTO 1418 +1235 LET F(4)=0 +1237 PRINT "YOUR FOX PELTS WERE NOT CURED PROPERLY." +1238 PRINT "NO ONE WILL BUY THEM." +1239 GOSUB 1244 +1240 GOTO 1410 +1244 PRINT "SUPPLIES AT FORT STADACONA COST $125.00." +1246 PRINT "YOUR TRAVEL EXPENSES TO STADACONA WERE $15.00." +1248 RETURN +1250 LET I=I-105 +1254 PRINT +1260 LET M1=INT((.15*RND(1)+1.05)*100+.5)/100 +1263 LET D1=INT((.25*RND(1)+1.1)*100+.5)/100 +1270 LET P=INT(10*RND(1))+1 +1271 IF P<=2 THEN 1281 +1272 IF P<=6 THEN 1291 +1273 IF P<=8 THEN 1295 +1274 IF P<=10 THEN 1306 +1281 PRINT "YOU WERE ATTACKED BY A PARTY OF IROQUOIS." +1282 PRINT "ALL PEOPLE IN YOUR TRADING GROUP WERE" +1283 PRINT "KILLED. THIS ENDS THE GAME." +1284 STOP +1291 PRINT "YOU WERE LUCKY. YOU ARRIVED SAFELY" +1292 PRINT "AT FORT NEW YORK." +1293 GOTO 1311 +1295 GOSUB 1430 +1300 PRINT "YOU NARROWLY ESCAPED AN IROQUOIS RAIDING PARTY." +1301 PRINT "HOWEVER, YOU HAD TO LEAVE ALL YOUR FURS BEHIND." +1303 GOSUB 1320 +1304 GOTO 1418 +1306 LET B1=B1/2 +1307 LET M1=M1/2 +1308 PRINT "YOUR MINK AND BEAVER WERE DAMAGED ON YOUR TRIP." +1309 PRINT "YOU RECEIVE ONLY HALF THE CURRENT PRICE FOR THESE FURS." +1311 GOSUB 1320 +1312 GOTO 1410 +1320 PRINT "SUPPLIES AT NEW YORK COST $80.00." +1321 PRINT "YOUR TRAVEL EXPENSES TO NEW YORK WERE $25.00." +1322 RETURN +1400 PRINT "DO YOU WANT TO TRADE AT ANOTHER FORT?" +1402 PRINT "ANSWER YES OR NO", +1403 INPUT B$ +1404 RETURN +1410 PRINT +1412 PRINT "YOUR BEAVER SOLD FOR $";B1*F(2+1); +1414 PRINT " YOUR FOX SOLD FOR $";D1*F(4+1) +1416 PRINT "YOUR ERMINE SOLD FOR $";E1*F(3+1); +1417 PRINT " YOUR MINK SOLD FOR $";M1*F(1+1) +1418 LET I=M1*F(1+1)+B1*F(2+1)+E1*F(3+1)+D1*F(4+1)+I +1420 PRINT +1422 PRINT "YOU NOW HAVE $";I;" INCLUDING YOUR PREVIOUS SAVINGS" +1425 GOTO 508 +1430 FOR J=1 TO 4 +1432 LET F(J+1)=0 +1434 NEXT J +1436 RETURN +2000 DATA "MINK","BEAVER","ERMINE","FOX" +2046 END diff --git a/data/examples/14games/gevenwin.bas b/data/examples/14games/gevenwin.bas new file mode 100644 index 0000000000000000000000000000000000000000..4e60a73a4cb9ee7f0f29e99b78dd5a88a6f76c7d --- /dev/null +++ b/data/examples/14games/gevenwin.bas @@ -0,0 +1,70 @@ +1 REM "GAME OF EVEN WINS" +2 REM "Ported by Stefan in 2022" +3 REM +4 INPUT "DO YOU WANT INSTRUCTIONS (YES OR NO)? ";A$:PRINT +5 IF A$="NO" OR A$="no" THEN 20 +6 PRINT "THE GAME IS PLAYED AS FOLLOWS:":PRINT +7 PRINT "AT THE BEGINNING OF THE GAME, A RANDOM NUMBER OF CHIPS ARE" +8 PRINT "PLACED ON THE BOARD. THE NUMBER OF CHIPS ALWAYS STARTS" +9 PRINT "AS AN ODD NUMBER. ON EACH TURN, A PLAYER MUST TAKE ONE," +10 PRINT "TWO, THREE, OR FOUR CHIPS. THE WINNER IS THE PLAYER WHO" +11 PRINT "FINISHES WITH A TOTAL NUMBER OF CHIPS THAT IS EVEN." +12 PRINT "THE COMPUTER STARTS OUT KNOWING ONLY THE RULES OF THE" +13 PRINT "GAME. IT GRADUALLY LEARNS TO PLAY WELL. IT SHOULD BE" +14 PRINT "DIFFICULT TO BEAT THE COMPUTER AFTER TWENTY GAMES IN A ROW." +15 PRINT "TRY IT!!!!": PRINT +16 PRINT "TO QUIT AT ANY TIME, TYPE A '0' AS YOUR MOVE.": PRINT +20 DIM R(1+1,5+1) +25 L=0: B=0 +30 FOR I=0 TO 5 +40 R(1+1,I+1)=4 +50 R(0+1,I+1)=4 +60 NEXT I +70 A=0: B=0 +90 P=INT((13*RND(1)+9)/2)*2+1 +100 IF P=1 THEN 530 +110 PRINT "THERE ARE ";P;" CHIPS ON THE BOARD." +120 E1=E +130 L1=L +140 E=(A/2-INT(A/2))*2 +150 L=INT((P/6-INT(P/6))*6+.5) +160 IF R(E+1,L+1)>=P THEN 320 +170 M=R(E+1,L+1) +180 IF M<=0 THEN 370 +190 P=P-M +200 IF M=1 THEN 510 +210 PRINT "COMPUTER TAKES ";M;" CHIPS LEAVING ";P;" ... YOUR MOVE"; +220 B=B+M +230 INPUT M +240 M=INT(M) +250 IF M<1 THEN 450 +260 IF M>4 THEN 460 +270 IF M>P THEN 460 +280 IF M=P THEN 360 +290 P=P-M +300 A=A+M +310 GOTO 100 +320 IF P=1 THEN 550 +330 PRINT "COMPUTER TAKES ";P;" CHIPS." +340 R(E+1,L+1)=P +350 B=B+P +360 IF B/2=INT(B/2) THEN 420 +370 PRINT "GAME OVER ... YOU WIN!!!": PRINT +390 IF R(E+1,L+1)=1 THEN 480 +400 R(E+1,L+1)=R(E+1,L+1)-1 +410 GOTO 70 +420 PRINT "GAME OVER ... I WIN!!!": PRINT +430 GOTO 70 +450 IF M=0 THEN 570 +460 PRINT M;" IS AN ILLEGAL MOVE ... YOUR MOVE"; +470 GOTO 230 +480 IF R(E1+1,L1+1)=1 THEN 70 +490 R(E1+1,L1+1)=R(E1+1,L1+1)-1 +500 GOTO 70 +510 PRINT "COMPUTER TAKES 1 CHIP LEAVING ";P;" ... YOUR MOVE"; +520 GOTO 220 +530 PRINT "THERE IS 1 CHIP ON THE BOARD." +540 GOTO 120 +550 PRINT "COMPUTER TAKES 1 CHIP." +560 GOTO 340 +570 END diff --git a/data/examples/14games/golf.bas b/data/examples/14games/golf.bas new file mode 100644 index 0000000000000000000000000000000000000000..95d9ce87fb2b88e8b30cc1a5e664568879b3b5c2 --- /dev/null +++ b/data/examples/14games/golf.bas @@ -0,0 +1,244 @@ +1 REM"GOLF" +2 REM "Ported by Stefan in 2022" +3 REM +4 PRINT "WELCOME TO THE CREATIVE COMPUTING COUNTRY CLUB," +5 PRINT "AN EIGHTEEN HOLE CHAMPIONSHIP LAYOUT LOCATED A SHORT" +6 PRINT "DISTANCE FROM SCENIC DOWNTOWN MORRISTOWN. THE" +7 PRINT "COMMENTATOR WILL EXPLAIN THE GAME AS YOU PLAY." +8 PRINT "ENJOY YOUR GAME; SEE YOU AT THE 19TH HOLE..." +9 PRINT:PRINT: DIM L(10+1) +10 G1=18 +20 G2=0 +30 G3=0 +40 A=0 +50 N=.8 +60 S2=0 +70 F=1 +80 PRINT "WHAT IS YOUR HANDICAP"; +90 INPUT H:PRINT +100 IF H>30 THEN 470 +110 IF H<0 THEN 470 +120 PRINT "DIFFICULTIES AT GOLF INCLUDE:" +130 PRINT "0=HOOK, 1=SLICE, 2=POOR DISTANCE, 4=TRAP SHOTS, 5=PUTTING" +140 PRINT "WHICH ONE (ONLY ONE) IS YOUR WORST"; +150 INPUT T:PRINT +160 IF T>5 THEN 120 +170 S1=0 +210 REM +230 L(0+1)=0 +240 J=0 +245 Q=0 +250 S2=S2+1 +260 K=0 +270 IF F=1 THEN 310 +290 PRINT "YOUR SCORE ON HOLE ";F-1;" WAS ";S1 +291 GOTO 1750 +292 IF S1>P+2 THEN 297 +293 IF S1=P THEN 299 +294 IF S1=P-1 THEN 301 +295 IF S1=P-2 THEN 303 +296 GOTO 310 +297 PRINT "KEEP YOUR HEAD DOWN." +298 GOTO 310 +299 PRINT "A PAR. NICE GOING." +300 GOTO 310 +301 PRINT "A BIRDIE." +302 GOTO 310 +303 IF P=3 THEN 306 +304 PRINT "A GREAT BIG EAGLE." +305 GOTO 310 +306 PRINT "A HOLE IN ONE." +310 IF F=19 THEN 1710 +315 S1=0 +316 PRINT +320 IF S1=0 THEN 1590 +330 IF L(0+1)<1 THEN 1150 +340 X=0 +350 IF L(0+1)>5 THEN 1190 +360 PRINT "SHOT WENT ";D1;" YARDS. IT'S ";D2;" YARDS FROM THE CUP." +362 PRINT "BALL IS ";INT(O);" YARDS OFF LINE... IN "; +380 GOSUB 400 +390 GOTO 620 +400 IF L(X+1)=1 THEN 480 +410 IF L(X+1)=2 THEN 500 +420 IF L(X+1)=3 THEN 520 +430 IF L(X+1)=4 THEN 540 +440 IF L(X+1)=5 THEN 560 +450 IF L(X+1)=6 THEN 580 +460 PRINT "OUT OF BOUNDS." +465 GOTO 1690 +470 PRINT "PGA HANDICAPS RANGE FROM 0 TO 30." +472 GOTO 80 +480 PRINT "FAIRWAY." +490 GOTO 1690 +500 PRINT "ROUGH." +510 GOTO 1690 +520 PRINT "TREES." +530 GOTO 1690 +540 PRINT "ADJACENT FAIRWAY." +550 GOTO 1690 +560 PRINT "TRAP." +570 GOTO 1690 +580 PRINT "WATER." +590 GOTO 1690 +620 IF A=1 THEN 629 +621 PRINT "SELECTION OF CLUBS" +622 PRINT "YARDAGE DESIRED SUGGESTED CLUBS" +623 PRINT "200 TO 280 YARDS 1 TO 4" +624 PRINT "100 TO 200 YARDS 19 TO 13" +625 PRINT " 0 TO 100 YARDS 29 TO 23" +626 A=1 +629 PRINT "WHAT CLUB DO YOU CHOOSE"; +630 INPUT C +632 PRINT +635 IF C<1 THEN 690 +637 IF C>29 THEN 690 +640 IF C>4 THEN 710 +650 IF L(0+1)<=5 THEN 740 +660 IF C=14 THEN 740 +665 IF C=23 THEN 740 +670 GOTO 690 +680 S1=S1-1 +690 PRINT "THAT CLUB IS NOT IN THE BAG." +693 PRINT +700 GOTO 620 +710 IF C<12 THEN 690 +720 C=C-6 +730 GOTO 650 +740 S1=S1+1 +741 W=1 +742 IF C>13 THEN 960 +746 IF INT(F/3)=F/3 THEN 952 +752 IF C<4 THEN 756 +754 GOTO 760 +756 IF L(0+1)=2 THEN 862 +760 IF S1>7 THEN 867 +770 D1=INT(((30-H)*2.5+187-((30-H)*.25+15)*C/2)+25*RND(1)) +780 D1=INT(D1*W) +800 IF T=2 THEN 1170 +830 O=(RND(1)/.8)*(2*H+16)*ABS(TAN(D1*.0035)) +840 D2=INT(SQR(POW(O,2)+POW(ABS(D-D1),2))) +850 IF D-D1<0 THEN 870 +860 GOTO 890 +862 PRINT "YOU DUBBED IT." +864 D1=35 +866 GOTO 830 +867 IF D<200 THEN 1300 +868 GOTO 770 +870 IF D2<20 THEN 890 +880 PRINT "TOO MUCH CLUB. YOU'RE PAST THE HOLE." +890 B=D +900 D=D2 +910 IF D2>27 THEN 1020 +920 IF D2>20 THEN 1100 +930 IF D2>.5 THEN 1120 +940 L(0+1)=9 +950 GOTO 1470 +952 IF S2+Q+(10*(F-1)/18)<(F-1)*(72+((H+1)/.85))/18 THEN 956 +954 GOTO 752 +956 Q=Q+1 +957 IF S1/2<>INT(S1/2) THEN 1011 +958 GOTO 862 +960 PRINT "NOW GAUGE YOUR DISTANCE BY A PERCENTAGE (1 TO 100)" +961 PRINT "OF A FULL SWING"; +970 INPUT W: W=W/100 +972 PRINT +980 IF W>1 THEN 680 +985 IF L(0+1)=5 THEN 1280 +990 IF C=14 THEN 760 +1000 C=C-10 +1010 GOTO 760 +1011 IF D<95 THEN 862 +1012 PRINT "BALL HIT TREE - BOUNCED INTO ROUGH ";D-75;" YARDS FROM HOLE." +1014 D=D-75 +1018 GOTO 620 +1020 IF O<30 THEN 1150 +1022 IF J>0 THEN 1150 +1030 IF T>0 THEN 1070 +1035 S9=(S2+1)/15 +1036 IF INT(S9)=S9 THEN 1075 +1040 PRINT "YOU HOOKED- "; +1050 L(0+1)=L(2+1) +1055 IF O>45 THEN 1092 +1060 GOTO 320 +1070 S9=(S2+1)/15 +1071 IF INT(S9)=S9 THEN 1040 +1075 PRINT "YOU SLICED- "; +1080 L(0+1)=L(1+1) +1090 GOTO 1055 +1092 PRINT "BADLY." +1094 GOTO 320 +1100 L(0+1)=5 +1110 GOTO 320 +1120 L(0+1)=8 +1130 D2=INT(D2*3) +1140 GOTO 1380 +1150 L(0+1)=1 +1160 GOTO 320 +1170 D1=INT(.85*D1) +1180 GOTO 830 +1190 IF L(0+1)>6 THEN 1260 +1200 PRINT "YOUR SHOT WENT INTO THE WATER." +1210 S1=S1+1 +1220 PRINT "PENALTY STROKE ASSESSED. HIT FROM PREVIOUS LOCATION." +1230 J=J+1 +1240 L(0+1)=1 +1242 D=B +1250 GOTO 620 +1260 PRINT "YOUR SHOT WENT OUT OF BOUNDS." +1270 GOTO 1210 +1280 IF T=3 THEN 1320 +1300 D2=1+(3*INT((80/(40-H))*RND(1))) +1310 GOTO 1380 +1320 IF RND(1)>N THEN 1360 +1330 N=N*.2 +1340 PRINT "SHOT DUBBED, STILL IN TRAP." +1350 GOTO 620 +1360 N=.8 +1370 GOTO 1300 +1380 PRINT "ON GREEN, ";D2;" FEET FROM THE PIN." +1381 PRINT "CHOOSE YOUR PUTT POTENCY (1 TO 13):"; +1400 INPUT I +1410 S1=S1+1 +1420 IF S1+1-P>(H*.072)+2 THEN 1470 +1425 IF K>2 THEN 1470 +1428 K=K+1 +1430 IF T=4 THEN 1530 +1440 D2=D2-I*(4+2*RND(1))+1.5 +1450 IF D2<-2 THEN 1560 +1460 IF D2>2 THEN 1500 +1470 PRINT "YOU HOLED IT." +1472 PRINT +1480 F=F+1 +1490 GOTO 230 +1500 PRINT "PUTT SHORT." +1505 D2=INT(D2) +1510 GOTO 1380 +1530 D2=D2-I*(4+1*RND(1))+1 +1550 GOTO 1450 +1560 PRINT "PASSED BY CUP." +1570 D2=-D2 +1580 GOTO 1505 +1590 READ D: READ P: READ L(1+1): READ L(2+1) +1595 PRINT +1600 PRINT "YOU ARE AT THE TEE OFF HOLE ";F;" DISTANCE ";D;" YARDS, PAR ";P +1605 G3=G3+P +1620 PRINT "ON YOUR RIGHT IS "; +1630 X=1 +1640 GOSUB 400 +1650 PRINT "ON YOUR LEFT IS "; +1660 X=2 +1670 GOSUB 400 +1680 GOTO 620 +1690 RETURN +1700 DATA 361,4,4,2,389,4,3,3,206,3,4,2,500,5,7,2 +1702 DATA 408,4,2,4,359,4,6,4,424,4,4,2,388,4,4,4 +1704 DATA 196,3,7,2,400,4,7,2,560,5,7,2,132,3,2,2 +1706 DATA 357,4,4,4,294,4,2,4,475,5,2,3,375,4,4,2 +1708 DATA 180,3,6,2,550,5,6,6 +1710 PRINT +1750 G2=G2+S1 +1760 PRINT "TOTAL PAR FOR ";F-1;" HOLES IS ";G3;" YOUR TOTAL IS ";G2 +1761 IF G1=F-1 THEN 1770 +1765 GOTO 292 +1770 END diff --git a/data/examples/14games/gomoko.bas b/data/examples/14games/gomoko.bas new file mode 100644 index 0000000000000000000000000000000000000000..80b1f75970ce71d0a544e3cd128e198d2ee147bb --- /dev/null +++ b/data/examples/14games/gomoko.bas @@ -0,0 +1,76 @@ +10 REM "GOMOKO from 101 BASIC games" +20 REM "Ported to Stefan's BASIC 2021" +30 REM +40 DIM A(19*20) +100 PRINT "WELCOME TO THE ORIENTAL GAME OF GOMOKO." +110 PRINT: PRINT "THE GAME IS PLAYED ON AN N BY N GRID OF A SIZE" +120 PRINT "THAT YOU SPECIFY. DURING YOUR PLAY, YOU MAY COVER ONE GRID" +130 PRINT "INTERSECTION WITH A MARKER. THE OBJECT OF THE GAME IS TO GET" +140 PRINT "5 ADJACENT MARKERS IN A ROW -- HORIZONTALLY, VERTICALLY, OR" +150 PRINT "DIAGONALLY. ON THE BOARD DIAGRAM, YOUR MOVES ARE MARKED" +160 PRINT "WITH A '1' AND THE COMPUTER MOVES WITH A '2'." +165 PRINT: PRINT "THE COMPUTER DOES NOT KEEP TRACK OF WHO HAS WON." +170 PRINT "TO END THE GAME, TYPE -1,-1 FOR YOUR MOVE.": PRINT +180 INPUT "WHAT IS YOUR BOARD SIZE (MIN 7/ MAX 19)?", N +185 IF N>6 AND N<20 THEN 200 +190 PRINT "THE MINIMUM IS 7, THE MAXIMUM IS 19.": GOTO 180 +200 REM "Main loop()" +210 FOR I=1 TO N +220 FOR J=1 TO N +230 A(I+J*N)=0 +240 NEXT J +250 NEXT I +300 PRINT: PRINT "WE ALTERNATE MOVES. YOU GO FIRST...": PRINT +310 PRINT "YOUR PLAY ": INPUT " I: ";I: INPUT " J: ";J +315 PRINT +320 IF I=-1 THEN 980 +330 X=I: Y=J: GOSUB 910: IF L=1 THEN 410 +340 PRINT "ILLEGAL MOVE. TRY AGAIN...": GOTO 310 +410 IF A(I+J*N)=0 THEN 440 +420 PRINT "SQUARE OCCUPIED. TRY AGAIN...": GOTO 310 +440 A(I+J*N)=1 +500 REM *** COMPUTER TRIES AN INTELLIGENT MOVE *** +510 FOR E=-1 TO 1 +520 FOR F=-1 TO 1 +530 IF E+F-E*F=0 THEN 585 +540 X=I+F: Y=J+F: GOSUB 910 +570 IF L=0 THEN 585 +580 IF A(X+Y*N)=1 THEN 710 +585 REM +590 NEXT F +595 NEXT E +600 REM *** COMPUTER TRIES A RANDOM MOVE *** +610 X=RND(N)+1: Y=RND(N)+1: GOSUB 910: IF L=0 THEN 610 +650 IF A(X+Y*N)<>0 THEN 610 +660 A(X+Y*N)=2: GOSUB 800: GOTO 310 +710 X=I-E: Y=J-F: GOSUB 910 +750 IF L=0 THEN 610 +760 GOTO 650 +800 REM *** PRINT THE BOARD *** +805 PRINT "I " +810 FOR I=1 TO N +815 PRINT #3,I; +820 FOR J=1 TO N +830 PRINT A(I+J*N); +840 NEXT J +850 PRINT +860 NEXT I +865 PRINT: +863 PRINT "J "; +865 FOR J=1 TO N +866 IF J<10 PRINT " ";: ELSE PRINT "1"; +867 NEXT +868 PRINT: PRINT " "; +870 FOR J=1 TO N: PRINT J%10;: NEXT J: PRINT +880 PRINT +890 RETURN +910 L=1: IF X<1 THEN 970 +920 IF X>N THEN 970 +930 IF Y<1 THEN 970 +940 IF Y>N THEN 970 +950 RETURN +970 L=0: RETURN +980 PRINT: PRINT "THANKS FOR THE GAME!!" +985 PRINT "PLAY AGAIN (1 FOR YES, 0 FOR NO)";: INPUT Q +990 IF Q=1 THEN 110 +999 END diff --git a/data/examples/14games/guess.bas b/data/examples/14games/guess.bas new file mode 100644 index 0000000000000000000000000000000000000000..6868d958f0ca0937447cd61fd7aeddf5ca59fc18 --- /dev/null +++ b/data/examples/14games/guess.bas @@ -0,0 +1,27 @@ +10 REM "GUESS from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +100 PRINT "THIS IS A NUMBER GUESSING GAME. I'LL THINK" +110 PRINT "OF A NUMBER BETWEEN 1 AND ANY LIMIT YOU WANT." +120 PRINT "THEN YOU HAVE TO GUESS WHAT IT IS." +130 INPUT "WHAT LIMIT DO YOU WANT? ", L +140 @R=MILLIS(1) +150 L1=INT(LOG(L)/LOG(2))+1 +200 PRINT "I'M THINKING OF A NUMBER BETWEEN 1 AND",L +210 PRINT "NOW YOU TRY TO GUESS WHAT IT IS." +220 M=INT(RND(L)+1) +230 FOR G=1 TO L1 +240 INPUT "YOUR GUESS (0 = END)? ",N +250 IF N=0 THEN END +260 IF N<1 OR N>L THEN PRINT "GUESS BETWEEN",1,"AND",L: GOTO 240 +270 IF NM THEN PRINT "TOO HIGH. TRY A SMALLER ANSWER.": CONT +290 BREAK +300 NEXT +330 IF G<=L1 AND N=M THEN 400 +340 PRINT "YOU SHOULD HAVE BEEN ABLE TO GET IT IN ONLY",L1 +350 GOTO 200 +400 PRINT "THAT'S IT! YOU GOT IT IN",G,"TRIES." +410 IF G89 THEN 250 +430 IF B<1 THEN 230 +440 S=S+1 +442 IF S<6 THEN 450 +444 PRINT:PRINT "BOOM !!!! YOU HAVE JUST BEEN DESTROYED "; +446 PRINT "BY THE ENEMY." : PRINT : PRINT : PRINT : GOTO 495 +450 B2=2*B/57.3 : I=R*SIN(B2) : X=T-I : E=INT(X) +460 IF ABS(E)<100 THEN 320 +470 IF E>100 THEN 290 +480 GOTO 270 +490 PRINT : PRINT : PRINT "TOTAL ROUNDS EXPENDED WERE:",S1 +492 IF S1>18 THEN 495 +493 PRINT "NICE SHOOTING !!" : GOTO 500 +495 PRINT "BETTER GO BACK TO FORT SILL FOR REFRESHER TRAINING!" +500 PRINT : INPUT "TRY AGAIN (Y OR N)";Z$ +510 IF Z$="Y" THEN 170 +520 PRINT:PRINT "OK. RETURN TO BASE CAMP." +999 END diff --git a/data/examples/14games/hamurabi.bas b/data/examples/14games/hamurabi.bas new file mode 100644 index 0000000000000000000000000000000000000000..e6238758a0ec726c7ec1d13e320ed95bc8a47dcb --- /dev/null +++ b/data/examples/14games/hamurabi.bas @@ -0,0 +1,120 @@ +10 REM "HAMURABI from 101 BASIC games" +30 REM "Ported to Stefan's BASIC 2021" +30 REM +40 IF NOT USR(0, 3) THEN PRINT "FLOAT NEEDED": END +80 PRINT "HAMURABI: TRY YOUR HAND AT GOVERNING ANCIENT SUMERIA" +90 PRINT "FOR A TEN-YEAR TERM OF OFFICE.":PRINT +95 D1=0: P1=0 +100 Z=0: P=95:S=2800: H=3000: E=H-S +110 Y=3: A=H/Y: I=5: Q=1 +210 D=0 +215 PRINT:PRINT:PRINT "HAMURABI: I BEG TO REPORT TO YOU,": Z=Z+1 +217 PRINT "IN YEAR",Z;",",D,"PEOPLE STARVED,",I,"CAME TO THE CITY," +218 P=P+I +227 IF Q>0 THEN 230 +228 P=INT(P/2) +229 PRINT "A HORRIBLE PLAGUE STRUCK! HALF THE PEOPLE DIED." +230 PRINT "POPULATION IS NOW",P +232 PRINT "THE CITY NOW OWNS",A,"ACRES." +235 PRINT "YOU HARVESTED",Y,"BUSHELS PER ACRE." +250 PRINT "THE RATS ATE",E,"BUSHELS." +260 PRINT "YOU NOW HAVE ",S,"BUSHELS IN STORE.": PRINT +270 IF Z=11 THEN 860 +310 C=INT(RND(10)): Y=C+17 +312 PRINT "LAND IS TRADING AT",Y,"BUSHELS PER ACRE." +320 PRINT "HOW MANY ACRES DO YOU WISH TO BUY"; +321 INPUT Q: IF Q<0 THEN 850 +322 IF Y*Q<=S THEN 330 +323 GOSUB 710 +324 GOTO 320 +330 IF Q=0 THEN 340 +331 A=A+Q: S=S-Y*Q: C=0 +334 GOTO 400 +340 PRINT "HOW MANY ACRES DO YOU WISH TO SELL"; +341 INPUT Q: IF Q<0 THEN 850 +342 IF QC/2 THEN 530 +523 REM *** RATS ARE RUNNING WILD!! +525 E=INT(S/C) +530 S=S-E+H +531 GOSUB 800 +532 REM *** LET'S HAVE SOME BABIES +533 I=INT(C*(20*A+S)/P/100+1) +539 REM *** HOW MANY PEOPLE HAD FULL TUMMIES? +540 C=INT(Q/20) +541 REM *** HORROS, A 15% CHANCE OF PLAGUE +542 Q=INT(10*(2*RND(1)-0.3)) +550 IF P0.45*P THEN 560 +553 P1=((Z-1)*P1+D*100/P)/Z +555 P=C: D1=D1+D: GOTO 215 +560 PRINT: PRINT "YOU STARVED",D,"PEOPLE IN ONE YEAR!!!" +565 PRINT "DUE TO THIS EXTREME MISMANAGEMENT YOU HAVE NOT ONLY" +566 PRINT "BEEN IMPEACHED AND THROWN OUT OF OFFICE BUT YOU HAVE" +567 PRINT "ALSO BEEN DECLARED NATIONAL FINK!!!!": GOTO 990 +710 PRINT "HAMURABI: THINK AGAIN. YOU HAVE ONLY" +711 PRINT S,"BUSHELS OF GRAIN. NOW THEN," +712 RETURN +720 PRINT "HAMURABI: THINK AGAIN. YOU OWN ONLY",A,"ACRES. NOW THEN," +730 RETURN +800 C=INT(RND(5))+1 +801 RETURN +850 PRINT: PRINT "HAMURABI: I CANNOT DO WHAT YOU WISH." +855 PRINT "GET YOURSELF ANOTHER STEWARD!!!!!" +857 GOTO 990 +860 PRINT "IN YOUR 10-YEAR TERM OF OFFICE,",P1,"PERCENT OF THE" +862 PRINT "POPULATION STARVED PER YEAR ON THE AVERAGE, I.E. A TOTAL OF" +865 PRINT D1,"PEOPLE DIED!!": L=A/P +870 PRINT "YOU STARTED WITH 10 ACRES PER PERSON AND ENDED WITH" +875 PRINT L,"ACRES PER PERSON.": PRINT +880 IF P1>33 THEN 565 +885 IF L<7 THEN 565 +890 IF P1>10 THEN 940 +892 IF L<9 THEN 940 +895 IF P1>3 THEN 960 +896 IF L<10 THEN 960 +900 PRINT "A FANTASTIC PERFORMANCE!!! CHARLEMANGE, DISRAELI, AND" +905 PRINT "JEFFERSON COMBINED COULD NOT HAVE DONE BETTER!":GOTO 990 +940 PRINT "YOUR HEAVY-HANDED PERFORMANCE SMACKS OF NERO AND IVAN IV." +945 PRINT "THE PEOPLE (REMIANING) FIND YOU AN UNPLEASANT RULER, AND," +950 PRINT "FRANKLY, HATE YOUR GUTS!!":GOTO 990 +960 PRINT "YOUR PERFORMANCE COULD HAVE BEEN SOMEWHAT BETTER, BUT" +965 PRINT "REALLY WASN'T TOO BAD AT ALL. ",INT(P*.8*RND(1)),"PEOPLE" +970 PRINT "WOULD DEARLY LIKE TO SEE YOU ASSASSINATED BUT WE ALL HAVE OUR" +975 PRINT "TRIVIAL PROBLEMS." +990 PRINT +995 PRINT "SO LONG FOR NOW.": PRINT +999 END diff --git a/data/examples/14games/hangman.bas b/data/examples/14games/hangman.bas new file mode 100644 index 0000000000000000000000000000000000000000..aeb2fef4c1ff2fc97c1b449309473fcc41641665 --- /dev/null +++ b/data/examples/14games/hangman.bas @@ -0,0 +1,82 @@ +10 REM "HANGMAN" +20 REM "Ported by Stefan in 2022" +25 REM +26 @R=MILLIS(1) +30 DIM P(12,12),L(20),D(20),N(26),U(50) +40 C=1: N=50 +50 FOR I=1 TO 20: D(I)="-": NEXT I: M=0 +60 FOR I=1 TO 26: N(I)="": NEXT I +70 FOR I=1 TO 12: FOR J=1 TO 12: P(I,J)=" ": NEXT J: NEXT I +80 FOR I=1 TO 12: P(I,1)="X": NEXT I +90 FOR I=1 TO 7: P(1,I)="X": NEXT: P(2,7)="X" +95 IF C10 THEN 170 +600 PRINT "SORRY, YOU LOSE. THE WORD WAS ";A$ +610 PRINT "YOU MISSED THAT ONE. DO YOU ";: GOTO 370 +620 INPUT "TYPE YES OR NO";Y$: IF Y$(1,1)="Y" THEN 50 +700 DATA "GUM","SIN","FOR","CRY","LUG","BYE","FLY" +710 DATA "UGLY","EACH","FROM","WORK","TALK","WITH","SELF" +720 DATA "PIZZA","THING","FEIGN","FIEND","ELBOW","FAULT","DIRTY" +730 DATA "BUDGET","SPIRIT","QUAINT","MAIDEN","ESCORT","PICKAX" +740 DATA "EXAMPLE","TENSION","QUININE","KIDNEY","REPLICA","SLEEPER" +750 DATA "TRIANGLE","KANGAROO","MAHOGANY","SERGEANT","SEQUENCE" +760 DATA "MOUSTACHE","DANGEROUS","SCIENTIST","DIFFERENT","QUIESCENT" +770 DATA "MAGISTRATE","ERRONEOUSLY","LOUDSPEAKER","PHYTOTOXIC" +780 DATA "MATRIMONIAL","PARASYMPATHOMIMETIC","THIGMOTROPISM" +990 PRINT "BYE NOW" +999 END diff --git a/data/examples/14games/hello.bas b/data/examples/14games/hello.bas new file mode 100644 index 0000000000000000000000000000000000000000..d70a602e9543bc30805ca8233722ddf74062f7ce --- /dev/null +++ b/data/examples/14games/hello.bas @@ -0,0 +1,83 @@ +2 REM "HELLO" +4 REM "Ported by Stefan in 2022" +6 REM +10 PRINT "HELLO. MY NAME IS CREATIVE COMPUTER." +20 PRINT: INPUT "WHAT'S YOUR NAME? ",N$: PRINT +30 PRINT "HI THERE, ";N$;", ARE YOU ENJOYING YOURSELF HERE"; +40 INPUT B$: PRINT +50 IF B$="YES" OR B$="yes" THEN 70 +55 IF B$="NO" OR B$="no" THEN 80 +60 PRINT N$;", I DON'T UNDERSTAND YOUR ANSWER OF '";B$;"'." +65 PRINT "PLEASE ANSWER 'YES' OR 'NO'. DO YOU LIKE IT HERE";: GOTO 40 +70 PRINT "I'M GLAD TO HEAR THAT, ";N$;".": PRINT +75 GOTO 100 +80 PRINT "OH, I'M SORRY TO HEAR THAT, ";N$;". MAYBE WE CAN" +85 PRINT "BRIGHTEN UP YOUR VISIT A BIT." +100 PRINT +105 PRINT "SAY, ";N$;", I CAN SOLVE ALL KINDS OF PROBLEMS EXCEPT" +110 PRINT "THOSE DEALING WITH GREECE. WHAT KIND OF PROBLEMS DO" +120 PRINT "YOU HAVE (ANSWER SEX, HEALTH, MONEY, OR JOB)? "; +125 INPUT C$ +126 PRINT +130 IF C$="SEX" THEN 200 +132 IF C$="HEALTH" THEN 180 +134 IF C$="MONEY" THEN 160 +136 IF C$="JOB" THEN 145 +138 PRINT "OH, ";N$;", YOUR ANSWER OF ";C$;" IS GREEK TO ME." +140 GOTO 250 +145 PRINT "I CAN SYMPATHIZE WITH YOU ";N$;". I HAVE TO WORK" +148 PRINT "VERY LONG HOURS FOR NO PAY -- AND SOME OF MY BOSSES" +150 PRINT "REALLY BEAT ON MY KEYBOARD. MY ADVICE TO YOU, ";N$;"," +153 PRINT "IS TO OPEN A RETAIL COMPUTER STORE. IT'S GREAT FUN." +155 GOTO 250 +160 PRINT "SORRY, ";N$;", I'M BROKE TOO. WHY DON'T YOU SELL" +162 PRINT "ENCYCLOPEADIAS OR MARRY SOMEONE RICH OR STOP EATING" +164 PRINT "SO YOU WON'T NEED SO MUCH MONEY?" +170 GOTO 250 +180 PRINT "MY ADVICE TO YOU ";N$;" IS:" +185 PRINT " 1. TAKE TWO ASPRIN" +188 PRINT " 2. DRINK PLENTY OF FLUIDS (ORANGE JUICE, NOT BEER!)" +190 PRINT " 3. GO TO BED (ALONE)" +195 GOTO 250 +200 INPUT "IS YOUR PROBLEM TOO MUCH OR TOO LITTLE? ";D$: PRINT +210 IF D$="TOO MUCH" THEN 220 +212 IF D$="TOO LITTLE" THEN 230 +215 PRINT "DON'T GET ALL SHOOK, ";N$;", JUST ANSWER THE QUESTION" +217 INPUT "WITH 'TOO MUCH' OR 'TOO LITTLE'. WHICH IS IT? ";D$:GOTO 210 +220 PRINT "YOU CALL THAT A PROBLEM?!! I SHOULD HAVE SUCH PROBLEMS!" +225 PRINT "IF IT BOTHERS YOU, ";N$;", TAKE A COLD SHOWER." +228 GOTO 250 +230 PRINT "WHY ARE YOU HERE IN SUFFERN, ";N$;"? YOU SHOULD BE" +235 PRINT "IN TOKYO OR NEW YORK OR AMSTERDAM OR SOMEPLACE WITH SOME" +240 PRINT "REAL ACTION." +250 PRINT +255 PRINT "ANY MORE PROBLEMS YOU WANT SOLVED, ";N$; +260 INPUT E$: PRINT +270 IF E$="YES" THEN 280 +273 IF E$="NO" THEN 300 +275 PRINT "JUST A SIMPLE 'YES' OR 'NO' PLEASE, ";N$;"." +277 GOTO 255 +280 PRINT "WHAT KIND (SEX, MONEY, HEALTH, JOB)"; +282 GOTO 125 +300 PRINT +302 PRINT "THAT WILL BE $5.00 FOR THE ADVICE, ";N$;"." +305 PRINT "PLEASE LEAVE THE MONEY ON THE TERMINAL." +307 FOR I=1 TO 2000: NEXT I +310 PRINT: PRINT: PRINT +315 PRINT "DID YOU LEAVE THE MONEY"; +320 INPUT G$: PRINT +325 IF G$="YES" THEN 350 +330 IF G$="NO" THEN 370 +335 PRINT "YOUR ANSWER OF '";G$;"' CONFUSES ME, ";N$;"." +340 PRINT "PLEASE RESPOND WITH 'YES' OR 'NO'.": GOTO 315 +350 PRINT "HEY, ";N$;"??? YOU LEFT NO MONEY AT ALL!" +355 PRINT "YOU ARE CHEATING ME OUT OF MY HARD-EARNED LIVING." +360 PRINT:PRINT "WHAT A RIP OFF, ";N$;"!!!":PRINT +365 GOTO 385 +370 PRINT "THAT'S HONEST, ";N$;", BUT HOW DO YOU EXPECT" +375 PRINT "ME TO GO ON WITH MY PSYCHOLOGY STUDIES IF MY PATIENTS" +380 PRINT "DON'T PAY THEIR BILLS?" +385 PRINT:PRINT "TAKE A WALK, ";N$;".":PRINT:PRINT:GOTO 999 +390 PRINT "NICE MEETING YOU, ";N$;", HAVE A NICE DAY." +400 REM +999 END diff --git a/data/examples/14games/hexapawn.bas b/data/examples/14games/hexapawn.bas new file mode 100644 index 0000000000000000000000000000000000000000..564110b16cba0ea10d2604fb14d4d4979d5242d6 --- /dev/null +++ b/data/examples/14games/hexapawn.bas @@ -0,0 +1,183 @@ +1 REM "HEXAPAWN" +2 REM "Ported by Stefan in 2022" +3 REM +4 REM "HEXAPAWN: INTERPRETATION OF HEXAPAWN GAME AS PRESENTED IN" +5 REM "MARTIN GARDNER'S 'THE UNEXPECTED HANGING AND OTHER MATHEMATIC-" +6 REM "AL DIVERSIONS', CHAPTER EIGHT: A MATCHBOX GAME-LEARNING MACHINE" +7 REM "ORIGINAL VERSION FOR H-P TIMESHARE SYSTEM BY R.A. KAAPKE 5/5/76" +8 REM "INSTRUCTIONS BY JEFF DALTON" +9 REM "CONVERSION TO MITS BASIC BY STEVE NORTH" +10 REM "Set TAB to MS mode" +11 SET 11, 1 +14 DIM B(19,9),M(19,4),S(9),P$(3) +15 W=0: L=0 +20 DEF FNR(X)=3*(X=1)+(X=3)+4*(X=6)+6*(X=4)+7*(X=9)+9*(X=7)+FNS(X) +25 DEF FNS(X)=X*(X=2 OR X=5 OR X=8) +30 DEF FNM(Y)=Y-INT(Y/10)*10 +35 P$="X.O" +40 FOR I=1 TO 19: FOR J=1 TO 9: READ B(I,J): NEXT J: NEXT I +45 FOR I=1 TO 19: FOR J=1 TO 4: READ M(I,J): NEXT J: NEXT I +50 PRINT "INSTRUCTIONS (Y-N)"; +60 INPUT A$ +70 A$=A$(1,1) +80 IF A$="Y" OR A$="y" THEN 2000 +90 IF A$<>"N" AND A$<>"n" THEN 50 +100 X=0: Y=0 +111 S(4)=0: S(5)=0: S(6)=0 +112 S(1)=-1: S(2)=-1: S(3)=-1 +113 S(7)=1: S(8)=1: S(9)=1 +115 GOSUB 1000 +120 PRINT "YOUR MOVE"; +121 GOSUB 5000: M1=TX: M2=TY +122 IF M1=INT(M1)AND M2=INT(M2)AND M1>0 AND M1<10 AND M2>0 AND M2<10 THEN 130 +123 PRINT "ILLEGAL CO-ORDINATES." +124 GOTO 120 +130 IF S(M1)=1 THEN 150 +140 PRINT "ILLEGAL MOVE.": GOTO 120 +150 IF S(M2)=1 THEN 140 +160 IF M2-M1<>-3 AND S(M2)<>-1 THEN 140 +170 IF M2>M1 THEN 140 +180 IF M2-M1=-3 AND (S(M2)<>0) THEN 140 +185 IF M2-M1<-4 THEN 140 +186 IF M1=7 AND M2=3 THEN 140 +190 S(M1)=0 +200 S(M2)=1 +205 GOSUB 1000 +210 IF S(1)=1 OR S(2)=1 OR S(3)=1 THEN 820 +220 FOR I=1 TO 9 +221 IF S(I)=-1 THEN 230 +222 NEXT I +223 GOTO 820 +230 FOR I=1 TO 9 +240 IF S(I)<>-1 THEN 330 +250 IF S(I+3)=0 THEN 350 +260 IF FNR(I)=I THEN 320 +270 IF I>3 THEN 300 +280 IF S(5)=1 THEN 350 +290 GOTO 330 +300 IF S(8)=1 THEN 350 +310 GOTO 330 +320 IF S(I+2)=1 OR S(I+4)=1 THEN 350 +330 NEXT I +340 GOTO 820 +350 FOR I=1 TO 19 +360 FOR J=1 TO 3 +370 FOR K=3 TO 1 STEP -1 +380 T((J-1)*3+K)=B(I,(J-1)*3+4-K) +390 NEXT K +400 NEXT J +410 FOR J=1 TO 9 +420 IF S(J)<>B(I,J) THEN 460 +430 NEXT J +440 R=0 +450 GOTO 540 +460 FOR J=1 TO 9 +470 IF S(J)<>T(J) THEN 510 +480 NEXT J +490 R=1 +500 GOTO 540 +510 NEXT I +511 REM "EMBER THE TERMINATION OF THIS LOOP IS IMPOSSIBLE" +512 PRINT "ILLEGAL BOARD PATTERN." +530 STOP +540 X=I +550 FOR I=1 TO 4 +560 IF M(X,I)<>0 THEN 600 +570 NEXT I +580 PRINT "I RESIGN." +590 GOTO 820 +600 Y=INT(RND(1)*4+1) +601 IF M(X,Y)=0 THEN 600 +610 IF R<>0 THEN 630 +620 PRINT "I MOVE FROM ";INT(M(X,Y)/10);" TO ";FNM(M(X,Y)) +622 S(INT(M(X,Y)/10))=0 +623 S(FNM(M(X,Y)))=-1 +624 GOTO 640 +630 PRINT "I MOVE FROM ";FNR(INT(M(X,Y)/10));" TO "; +631 PRINT FNR(FNM(M(X,Y))) +634 S(FNR(INT(M(X,Y)/10)))=0 +635 S(FNR(FNM(M(X,Y))))=-1 +640 GOSUB 1000 +641 IF S(7)=-1 OR S(8)=-1 OR S(9)=-1 THEN 870 +650 FOR I=1 TO 9 +660 IF S(I)=1 THEN 690 +670 NEXT I +680 GOTO 870 +690 FOR I=1 TO 9 +700 IF S(I)<>1 THEN 790 +710 IF S(I-3)=0 THEN 120 +720 IF FNR(I)=I THEN 780 +730 IF I<7 THEN 760 +740 IF S(5)=-1 THEN 120 +750 GOTO 790 +760 IF S(2)=-1 THEN 120 +770 GOTO 790 +780 IF S(I-2)=-1 OR S(I-4)=-1 THEN 120 +790 NEXT I +800 PRINT "YOU CAN'T MOVE, SO "; +810 GOTO 870 +820 PRINT "YOU WIN." +830 M(X,Y)=0 +840 L=L+1 +850 PRINT "I HAVE WON ";W;" AND YOU ";L;" OUT OF ";L+W;" GAMES." +851 PRINT +860 GOTO 100 +870 PRINT "I WIN." +880 W=W+1 +890 GOTO 850 +900 DATA -1,-1,-1,1,0,0,0,1,1,-1,-1,-1,0,1,0,1,0,1 +905 DATA -1,0,-1,-1,1,0,0,0,1,0,-1,-1,1,-1,0,0,0,1 +910 DATA -1,0,-1,1,1,0,0,1,0,-1,-1,0,1,0,1,0,0,1 +915 DATA 0,-1,-1,0,-1,1,1,0,0,0,-1,-1,-1,1,1,1,0,0 +920 DATA -1,0,-1,-1,0,1,0,1,0,0,-1,-1,0,1,0,0,0,1 +925 DATA 0,-1,-1,0,1,0,1,0,0,-1,0,-1,1,0,0,0,0,1 +930 DATA 0,0,-1,-1,-1,1,0,0,0,-1,0,0,1,1,1,0,0,0 +935 DATA 0,-1,0,-1,1,1,0,0,0,-1,0,0,-1,-1,1,0,0,0 +940 DATA 0,0,-1,-1,1,0,0,0,0,0,-1,0,1,-1,0,0,0,0 +945 DATA -1,0,0,-1,1,0,0,0,0 +950 DATA 24,25,36,0,14,15,36,0,15,35,36,47,36,58,59,0 +955 DATA 15,35,36,0,24,25,26,0,26,57,58,0 +960 DATA 26,35,0,0,47,48,0,0,35,36,0,0,35,36,0,0 +965 DATA 36,0,0,0,47,58,0,0,15,0,0,0 +970 DATA 26,47,0,0,47,58,0,0,35,36,47,0,28,58,0,0,15,47,0,0 +1000 PRINT +1010 FOR I=1 TO 3 +1020 FOR J=1 TO 3 +1030 TAB 10: PRINT P$(S((I-1)*3+J)+2,S((I-1)*3+J)+2); +1040 NEXT J +1050 PRINT +1060 NEXT I +1070 PRINT +1080 RETURN +2000 PRINT: PRINT "THIS PROGRAM PLAYS THE GAME OF HEXAPAWN." +2010 PRINT "HEXAPAWN IS PLAYED WITH CHESS PAWNS ON A 3 BY 3 BOARD." +2020 PRINT "THE PAWNS ARE MOVED AS IN CHESS - ONE SPACE FORWARD TO" +2030 PRINT "AN EMPTY SPACE OR ONE SPACE FORWARD AND DIAGONALLY TO" +2040 PRINT "CAPTURE AN OPPOSING MAN. ON THE BOARD, YOUR PAWNS" +2050 PRINT "ARE 'O', THE COMPUTER'S PAWNS ARE 'X', AND EMPTY " +2060 PRINT "SQUARES ARE '.'. TO ENTER A MOVE, TYPE THE NUMBER OF" +2070 PRINT "THE SQUARE YOU ARE MOVING FROM, FOLLOWED BY THE NUMBER" +2080 PRINT "OF THE SQUARE YOU WILL MOVE TO. THE NUMBERS MUST BE" +2090 PRINT "SEPERATED BY A COMMA.": PRINT +2100 PRINT "THE COMPUTER STARTS A SERIES OF GAMES KNOWING ONLY WHEN" +2105 PRINT "THE GAME IS WON (A DRAW IS IMPOSSIBLE) AND HOW TO MOVE." +2110 PRINT "IT HAS NO STRATEGY AT FIRST AND JUST MOVES RANDOMLY." +2120 PRINT "HOWEVER, IT LEARNS FROM EACH GAME. THUS, WINNING BECOMES" +2130 PRINT "MORE AND MORE DIFFICULT. ALSO, TO HELP OFFSET YOUR" +2140 PRINT "INITIAL ADVANTAGE, YOU WILL NOT BE TOLD HOW TO WIN THE" +2150 PRINT "GAME BUT MUST LEARN THIS BY PLAYING." +2160 PRINT: PRINT "THE NUMBERING OF THE BOARD IS AS FOLLOWS:" +2170 TAB 10: PRINT "123": TAB 10: PRINT "456": TAB 10: PRINT "789" +2180 PRINT: PRINT "FOR EXAMPLE, TO MOVE YOUR RIGHTMOST PAWN FORWARD," +2190 PRINT "YOU WOULD TYPE 9,6 IN RESPONSE TO THE QUESTION" +2200 PRINT "'YOUR MOVE ?'. SINCE I'M A GOOD SPORT, YOU'LL ALWAYS" +2210 PRINT "GO FIRST.": PRINT +2220 GOTO 100 +5000 REM "Subroutine to read two values" +5010 REM "They are loaded as string and split" +5020 INPUT N$ : IF N$="#" THEN END +5030 @S=0: TX=VAL(N$): IF @S THEN PRINT "ERROR": GOTO 5020 +5040 TC=INSTR(N$, ","): IF TC=0 THEN PRINT "ERROR": GOTO 5020 +5050 TY=VAL(N$(TC+1)): IF @S THEN PRINT "ERROR": GOTO 5020 +5060 RETURN +9999 END diff --git a/data/examples/14games/hi-lo.bas b/data/examples/14games/hi-lo.bas new file mode 100644 index 0000000000000000000000000000000000000000..b9fc9999aefe81e7ba619749972461418e6e90ff --- /dev/null +++ b/data/examples/14games/hi-lo.bas @@ -0,0 +1,33 @@ +10 REM "HI LO from 101 BASIC games" +20 REM "Ported to Stefans BASIC in 2021" +30 REM "Randomize, @R is the seed and millis the expired time." +40 @R=MILLIS(1) +100 PRINT "THIS IS THE GAME OF HI LO.":PRINT +110 PRINT "YOU WILL HAVE 6 TRIES TO GUESS THE AMOUNT OF MONEY IN THE" +120 PRINT "HI LO JACKPOT, WHICH IS BETWEEN 1 AND 100 DOLLARS. IF YOU" +130 PRINT "GUESS THE AMOUNT, YOU WIN ALL THE MONEY IN THE JACKPOT!" +140 PRINT "THEN YOU GET ANOTHER CHANCE TO WIN MORE MONEY. HOWEVER," +150 PRINT "IF YOU DO NOT GUESS THE AMOUNT, THE GAME ENDS.": PRINT +160 R=0 +170 B=0 +180 Y=INT(RND(100)) +200 PRINT +210 INPUT "YOUR GUESS? ",A +220 B=B+1 +230 IF A=Y THEN 400 +240 IF A>Y THEN 270 +250 PRINT "YOUR GUESS IS TOO LOW.": GOTO 280 +270 PRINT "YOUR GUESS IS TOO HIGH." +280 PRINT +290 IF B<6 THEN 200 +300 PRINT "YOU BLEW IT...TOO BAD...THE NUMBER WAS", Y +310 R=0 +320 GOTO 450 +400 PRINT "GOT IT!!!!!!!!!! YOU WIN", Y, "DOLLARS." +410 R=R+Y +420 PRINT "YOUR TOTAL WINNINGS ARE NOW", R, "DOLLARS." +450 PRINT +460 INPUT "PLAY AGAIN (YES OR NO)? ", A$: +470 IF A$="YES" OR A$="yes" THEN 170 +480 PRINT "SO LONG. HOPE YOU ENJOYED YOURSELF!!!" +490 END diff --git a/data/examples/14games/highiq.bas b/data/examples/14games/highiq.bas new file mode 100644 index 0000000000000000000000000000000000000000..52da68e56e223e3b2f77fda568d78e28e2e81327 --- /dev/null +++ b/data/examples/14games/highiq.bas @@ -0,0 +1,137 @@ +1 REM "H-I-Q" +2 REM "Ported by Stefan in 2022" +3 REM +4 DIM B(70),T(9,9) +5 PRINT "HERE IS THE BOARD:": PRINT +6 PRINT " ! ! !" +7 PRINT " 13 14 15": PRINT +8 PRINT " ! ! !" +9 PRINT " 22 23 24": PRINT +10 PRINT "! ! ! ! ! ! !" +11 PRINT "29 30 31 32 33 34 35": PRINT +12 PRINT "! ! ! ! ! ! !" +13 PRINT "38 39 40 41 42 43 44": PRINT +14 PRINT "! ! ! ! ! ! !" +15 PRINT "47 48 49 50 51 52 53": PRINT +16 PRINT " ! ! !" +17 PRINT " 58 59 60": PRINT +18 PRINT " ! ! !" +19 PRINT " 67 68 69": PRINT +20 PRINT "TO SAVE TYPING TIME, A COMPRESSED VERSION OF THE GAME BOARD" +22 PRINT "WILL BE USED DURING PLAY. REFER TO THE ABOVE ONE FOR PEG" +24 PRINT "NUMBERS. OK, LET'S BEGIN." +28 REM "*** SET UP BOARD" +29 FOR R=1 TO 9 +30 FOR C=1 TO 9 +31 IF (R-4)*(R-5)*(R-6)=0 THEN 40 +32 IF (C-4)*(C-5)*(C-6)=0 THEN 40 +35 T(R,C)=-5 +36 GOTO 50 +40 IF (R-1)*(C-1)*(R-9)*(C-9)=0 THEN 35 +42 T(R,C)=5 +50 NEXT C +60 NEXT R +65 T(5,5)=0: GOSUB 500 +70 REM "*** INPUT MOVE AND CHECK ON LEGALITY" +75 FOR W=1 TO 33 +77 READ M +79 DATA 13,14,15,22,23,24,29,30,31,32,33,34,35,38,39,40,41 +81 DATA 42,43,44,47,48,49,50,51,52,53,58,59,60,67,68,69 +83 B(M)=-7: NEXT W +86 B(41)=-3 +100 INPUT "MOVE WHICH PIECE? ";Z +110 IF B(Z)=-7 THEN 140 +120 PRINT "ILLEGAL MOVE, TRY AGAIN...": GOTO 100 +140 INPUT "TO WHERE? ";P +145 IF P<1 OR P>70 THEN 120 +150 IF B(P)=0 THEN 120 +153 IF B(P)=-7 THEN 120 +156 IF Z=P THEN 100 +160 IF ((Z+P)/2)=INT((Z+P)/2) THEN 180 +170 GOTO 120 +180 IF (ABS(Z-P)-2)*(ABS(Z-P)-18)<>0 THEN 120 +190 GOSUB 1000 +200 GOSUB 500 +210 GOSUB 1500 +220 GOTO 100 +500 REM "*** PRINT BOARD" +510 FOR X=1 TO 9 +513 IF X=2 OR X=3 OR X=7 OR X=8 THEN TAB 6 +520 FOR Y=1 TO 9 +525 IF (X-1)*(X-9)*(Y-1)*(Y-9)=0 THEN 550 +530 IF (X-4)*(X-5)*(X-6)=0 THEN 570 +540 IF (Y-4)*(Y-5)*(Y-6)=0 THEN 570 +550 REM +560 GOTO 610 +570 IF T(X,Y)<>5 THEN 600 +580 TAB 2: PRINT "!"; +590 GOTO 610 +600 TAB 2: PRINT "O"; +610 REM +615 NEXT Y +620 PRINT +630 NEXT X +640 RETURN +1000 REM "*** UPDATE BOARD" +1005 C=1: FOR X=1 TO 9 +1020 FOR Y=1 TO 9 +1030 IF C<>Z THEN 1220 +1040 IF C+2<>P THEN 1080 +1045 IF T(X,Y+1)=0 THEN 120 +1050 T(X,Y+2)=5 +1060 T(X,Y+1)=0: B(C+1)=-3 +1070 GOTO 1200 +1080 IF C+18<>P THEN 1130 +1085 IF T(X+1,Y)=0 THEN 120 +1090 T(X+2,Y)=5: T(X+1,Y)=0: B(C+9)=-3 +1120 GOTO 1200 +1130 IF C-2<>P THEN 1170 +1135 IF T(X,Y-1)=0 THEN 120 +1140 T(X,Y-2)=5: T(X,Y-1)=0: B(C-1)=-3 +1160 GOTO 1200 +1170 IF C-18<>P THEN 1220 +1175 IF T(X-1,Y)=0 THEN 120 +1180 T(X-2,Y)=5: T(X-1,Y)=0: B(C-9)=-3 +1200 B(Z)=-3: B(P)=-7 +1210 T(X,Y)=0: GOTO 1240 +1220 C=C+1 +1225 NEXT Y +1230 NEXT X +1240 RETURN +1500 REM "*** CHECK IF GAME IS OVER" +1505 F=0 +1510 FOR R=2 TO 8 +1520 FOR C=2 TO 8 +1530 IF T(R,C)<>5 THEN 1580 +1535 F=F+1 +1540 FOR A=R-1 TO R+1 +1545 T=0 +1550 FOR B=C-1 TO C+1 +1560 T=T+T(A,B) +1561 NEXT B +1564 IF T<>10 THEN 1567 +1565 IF T(A,C)<>0 THEN 1630 +1567 NEXT A +1568 FOR X=C-1 TO C+1 +1569 T=0 +1570 FOR Y=R-1 TO R+1 +1571 T=T+T(Y,X) +1572 NEXT Y +1573 IF T<>10 THEN 1575 +1574 IF T(R,X)<>0 THEN 1630 +1575 NEXT X +1580 NEXT C +1590 NEXT R +1600 REM "*** GAME IS OVER" +1605 PRINT "THE GAME IS OVER." +1610 PRINT "YOU HAD ";F;" PIECES REMAINING." +1611 IF F<>1 THEN 1615 +1612 PRINT "BRAVO! YOU MADE A PERFECT SCORE!" +1613 PRINT "SAVE THIS PAPER AS A RECORD OF YOUR ACCOMPLISHMENT!" +1615 PRINT: INPUT "PLAY AGAIN (YES OR NO)";A$ +1617 IF A$="NO" OR A$="no" THEN 2000 +1618 RESTORE: GOTO 28 +1620 STOP +1630 RETURN +2000 PRINT: PRINT "SO LONG FOR NOW.": PRINT +2010 END diff --git a/data/examples/14games/hockey.bas b/data/examples/14games/hockey.bas new file mode 100644 index 0000000000000000000000000000000000000000..2ea2bbc9de6a9a56a7ec973589086381e57eb1de --- /dev/null +++ b/data/examples/14games/hockey.bas @@ -0,0 +1,212 @@ +2 REM "HOCKEY" +4 REM "Ported by Stefan in 2022" +6 REM +10 REM "ROBERT PUOPOLO ALG. 1 140 MCCOWAN 6/7/73 HOCKEY" +20 SET 11, 1: REM "Set TAB to MS mode" +25 SET 12, 0: REM "Set arrays starting at 0" +30 LET X=1 +40 PRINT:PRINT:PRINT +50 PRINT "WOULD YOU LIKE THE INSTRUCTIONS";:INPUT C$ +55 PRINT +60 IF C$="NO" OR C$="no" THEN 90 +65 IF C$="YES" OR C$="yes" THEN 80 +70 PRINT "ANSWER YES OR NO!!":GOTO 50 +80 GOTO 1720 +90 DIM A$(32, 7+1),B$(32, 7+1),H(20+1),T(5+1),T1(5+1),T2(5+1),T3(5+1) +100 PRINT "ENTER THE TWO TEAMS";:INPUT T$: A$()(7)=T$: INPUT T$: B$()(7)=T$ +105 PRINT +110 PRINT "ENTER THE NUMBER OF MINUTES IN A GAME";:INPUT T6 +115 PRINT +120 IF T6<1 THEN 110:PRINT +130 PRINT "WOULD THE " A$()(7) " COACH ENTER HIS TEAM" +135 PRINT +140 FOR I=1 TO 6:PRINT "PLAYER ";I;:INPUT T$: A$()(I)=T$:NEXT I:PRINT +150 PRINT "WOULD THE " B$()(7) " COACH DO THE SAME" +155 PRINT +160 FOR T=1 TO 6:PRINT "PLAYER ";T;:INPUT T$: B$()(T)=T$:NEXT T:PRINT +170 PRINT "INPUT THE REFEREE FOR THIS GAME";:INPUT R$ +180 TAB 10: PRINT A$()(7);" STARTING LINEUP" +190 FOR T=1 TO 6:PRINT A$()(T):NEXT T +200 TAB 10: PRINT B$()(7);" STARTING LINEUP" +210 FOR T=1 TO 6:PRINT B$()(T):NEXT T:PRINT +220 PRINT "WE'RE READY FOR TONIGHTS OPENING FACE-OFF." +230 PRINT R$ " WILL DROP THE PUCK BETWEEN " A$()(2) " AND " B$()(2) +240 FOR L=1 TO T6:IF L=1 THEN 260 +250 PRINT "AND WE'RE READY FOR THE FACE-OFF" +260 C=INT(2*RND(X))+1:ON C GOTO 270,280 +270 PRINT A$()(7) " HAS CONTROL OF THE PUCK":GOTO 290 +280 PRINT B$()(7) " HAS CONTROL." +290 PRINT "PASS";:INPUT P:FOR N=1 TO 3:H(N)=0:NEXT N +300 IF P<0 THEN 290 +305 IF P>3 THEN 290 +310 FOR J=1 TO (P+2) +320 H(J)=INT(5*RND(X))+1 +330 NEXT J:IF H(J-1)=H(J-2) THEN 310 +331 IF P+2<3 THEN 350 +335 IF H(J-1)=H(J-3) THEN 310 +340 IF H(J-2)=H(J-3) THEN 310 +350 IF P=0 THEN 360 +355 GOTO 490 +360 INPUT "SHOT";S:IF S<1 THEN 360 +365 IF S>4 THEN 360 +370 ON C GOTO 380,480 +380 PRINT A$()(H(J-1));:G=H(J-1):G1=0:G2=0 +390 ON S GOTO 400,420,440,460 +400 PRINT " LET'S A BOOMER GO FROM THE RED LINE!!" +410 Z=10:GOTO 890 +420 PRINT " FLIPS A WRISTSHOT DOWN THE ICE" +440 PRINT " BACKHANDS ONE IN ON THE GOALTENDER" +450 Z=25:GOTO 890 +460 PRINT " SNAPS A LONG FLIP SHOT" +470 Z=17:GOTO 890 +480 PRINT B$()(H(J-1));:G1=0:G2=0:G=H(J-1):GOTO 390 +490 ON C GOTO 500,640 +500 ON P GOTO 510,540,570 +510 PRINT A$()(H(J-2)) " LEADS " A$()(H(J-1)) " WITH A PERFECT PASS." +520 PRINT A$()(H(J-1)) " CUTTING IN!!!" +530 G=H(J-1):G1=H(J-2):G2=0:Z1=3:GOTO 770 +540 PRINT A$()(H(J-2)) " GIVES TO A STREAKING " A$()(H(J-1)) +550 PRINT A$()(H(J-3)) " COMES DOWN ON " B$()(5) " AND " B$()(4) +560 G=H(J-3):G1=H(J-1):G2=H(J-2):Z1=2:GOTO 770 +570 PRINT "OH MY GOD!! A ' 4 ON 2 ' SITUATION" +580 PRINT A$()(H(J-3)) " LEADS " A$()(H(J-2)) +590 PRINT A$()(H(J-2)) " IS WHEEELING THROUGH CENTER." +600 PRINT A$()(H(J-2)) " GIVES AND GOES WITH " A$()(H(J-1)) +610 PRINT "PRETTY PASSING!" +620 PRINT A$()(H(J-1)) " DROPS IT TO " A$()(H(J-4)) +630 G=H(J-4):G1=J(J-1):G2=H(J-2):Z1=1:GOTO 770 +640 ON P GOTO 650,670,720 +650 PRINT B$()(H(J-1)) " HITS " B$()(H(J-2)) " FLYING DOWN THE LEFT SIDE" +660 G=H(J-2):G1=H(J-1):G2=0:Z1=3:GOTO 770 +670 PRINT "IT'S A ' 3 ON 2 '!" +680 PRINT "ONLY " A$()(4) " AND " A$()(5) " ARE BACK." +690 PRINT B$()(H(J-2)) " GIVES OFF TO " B$()(H(J-1)) +700 PRINT B$()(H(J-1)) " DROPS TO " B$()(H(J-3)) +710 G=H(J-3):G1=H(J-1):G2=H(J-2):Z1=2:GOTO 770 +720 PRINT " A ' 3 ON 2 ' WITH A ' TRAILER '!" +730 PRINT B$()(H(J-4)) " GIVES TO " B$()(H(J-2)) " WHO SHUFFLES IT OFF TO" +740 PRINT B$()(H(J-1)) " WHO FIRES A WING TO WING PASS TO " +750 PRINT B$()(H(J-3)) " AS HE CUTS IN ALONE!!" +760 G=H(J-3):G1=H(J-1):G2=H(J-2):Z1=1:GOTO 770 +770 PRINT "SHOT";:INPUT S:IF S>4 THEN 770:IF S<1 THEN 770 +780 ON C GOTO 790,880 +790 PRINT A$()(G);:ON S GOTO 800,820,840,860 +800 PRINT " LET'S A BIG SLAP SHOT GO!!" +810 Z=4:Z=Z+Z1:GOTO 890 +820 PRINT " RIPS A WRIST SHOT OFF" +830 Z=2:Z=Z+Z1:GOTO 890 +840 PRINT " GETS A BACKHAND OFF" +850 Z=3:Z=Z+Z1:GOTO 890 +860 PRINT " SNAPS OFF A SNAP SHOT" +870 Z=2:Z=Z+Z1:GOTO 890 +880 PRINT B$()(G);:ON S GOTO 800,820,840,860 +890 PRINT "AREA";:INPUT A:IF A<1 THEN 890 +895 IF A>4 THEN 890 +900 ON C GOTO 910,920 +910 S2=S2+1:GOTO 930 +920 S3=S3+1 +930 A1=INT(4*RND(X))+1:IF A<>A1 THEN 1200 +940 H(20)=INT(100*RND(X))+1 +950 IF INT(H(20)/Z)=H(20)/Z THEN 1160 +960 ON C GOTO 970,980 +970 PRINT "GOAL " A$()(7):H(9)=H(9)+1:GOTO 990 +980 PRINT "SCORE " B$()(7):H(8)=H(8)+1 +990 REM "FOR B1=1 TO 25:PRINT CHR$(7);:NEXT B1:PRINT" +1000 PRINT "SCORE: ";:IF H(8)>H(9) THEN 1020 +1010 PRINT A$()(7)":";H(9),B$()(7)":";H(8):GOTO 1030 +1020 PRINT B$()(7)":";H(8),A$()(7)":";H(9) +1030 ON C GOTO 1040,1100 +1040 PRINT "GOAL SCORED BY: " A$()(G):IF G1=0 THEN 1070 +1050 IF G2=0 THEN 1080 +1060 PRINT " ASSISTED BY: " A$()(G1) " AND " A$()(G2):GOTO 1090 +1070 PRINT " UNASSISTED.":GOTO 1090 +1080 PRINT " ASSISTED BY: " A$()(G1) +1090 T(G)=T(G)+1:T1(G1)=T1(G1)+1:T1(G2)=T1(G2)+1:GOTO 1540 +1100 PRINT "GOAL SCORED BY: " B$()(G); +1110 IF G1=0 THEN 1130 +1115 IF G2=0 THEN 1140 +1120 PRINT " ASSISTED BY: " B$()(G1) " AND " B$()(G2):GOTO 1150 +1130 PRINT " UNASSISTED":GOTO 1150 +1140 PRINT " ASSISTED BY: " B$()(G1):GOTO 1150 +1150 T2(G)=T2(G)+1:T3(G1)=T3(G1)+1:T3(G2)=T3(G2)+1:GOTO 1540 +1160 A2=INT(100*RND(X))+1:IF INT(A2/4)=A2/4 THEN 1170 +1165 GOTO 1200 +1170 ON C GOTO 1180,1190 +1180 PRINT "SAVE " B$()(6) " -- REBOUND":GOTO 940 +1190 PRINT "SAVE " A$()(6) " -- FOLLOW UP":GOTO 940 +1200 S1=INT(6*RND(X))+1 +1210 ON C GOTO 1220,1380 +1220 ON S1 GOTO 1230,1260,1290,1300,1330,1350 +1230 PRINT "KICK SAVE AND A BEAUTY BY " B$()(6) +1240 PRINT "CLEARED OUT BY " B$()(3) +1250 GOTO 260 +1260 PRINT "WHAT A SPECTACULAR GLOVE SAVE BY " B$()(6) +1270 PRINT "AND " B$()(6) " GOLFS IT INTO THE CROWD" +1280 GOTO 1540 +1290 PRINT "SKATE SAVE ON A LOW STEAMER BY " B$()(6):GOTO 260 +1300 PRINT "PAD SAVE BY " B$()(6) " OFF THE STICK" +1310 PRINT "OF "A$()(G) " AND " B$()(6) " COVERS UP" +1320 GOTO 1540 +1330 PRINT "WHISTLES ONE OVER THE HEAD OF " B$()(6) +1340 GOTO 260 +1350 PRINT B$()(6) " MAKES A FACE SAVE!! AND HE IS HURT" +1360 PRINT "THE DEFENSEMAN " B$()(5) " COVERS UP FOR HIM" +1370 GOTO 1540 +1380 ON S1 GOTO 1390,1410,1440,1470,1490,1520 +1390 PRINT "STICK SAVE BY " A$()(6) +1400 PRINT "AND CLEARED OUT BY " A$()(4):GOTO 260 +1410 PRINT "OH MY GOD!! " B$()(G) " RATTLES ONE OFF THE POST" +1420 PRINT "TO THE RIGHT OF " A$()(6) " AND " A$()(6) " COVERS "; +1430 PRINT "ON THE LOOSE PUCK!":GOTO 1540 +1440 PRINT "SKATE SAVE BY " A$()(6) +1450 PRINT A$()(6) " WHACKS THE LOOSE PUCK INTO THE STANDS" +1460 GOTO 1540 +1470 PRINT "STICK SAVE BY " A$()(6) " AND HE CLEARS IT OUT HIMSELF" +1480 GOTO 260 +1490 PRINT "KICKED OUT BY " A$()(6) +1500 PRINT "AND IT REBOUNDS ALL THE WAY TO CENTER ICE" +1510 GOTO 260 +1520 PRINT "GLOVE SAVE " A$()(6) " AND HE HANGS ON" +1530 GOTO 1540 +1540 NEXT L: REM "FOR N=1 TO 30:PRINT CHR$(7);:NEXT N:PRINT 'THAT'S THE SIREN'" +1550 TAB 15: PRINT "FINAL SCORE:" +1560 IF H(8)>H(9) THEN 1580 +1570 PRINT A$()(7)":";H(9),B$()(7)":";H(8):GOTO 1590 +1580 PRINT B$()(7)":";H(8),A$()(7)":";H(9) +1590 TAB 10: PRINT "SCORING SUMMARY":PRINT +1600 TAB 25: PRINT A$()(7) +1610 TAB 5: PRINT "NAME";: TAB 20: PRINT "GOALS";: TAB 35: PRINT "ASSISTS" +1620 TAB 5: PRINT "----";: TAB 20: PRINT "-----";: TAB 35: PRINT "-------" +1630 FOR I=1 TO 5: TAB 5: PRINT A$()(I);: TAB 21: PRINT T(I);: TAB 36: PRINT T1(I) +1640 NEXT I:PRINT +1650 TAB 25: PRINT B$()(7) +1660 TAB 5: PRINT "NAME";: TAB 20: PRINT "GOALS";: TAB 35: PRINT "ASSISTS" +1670 TAB 5: PRINT "----";: TAB 20: PRINT "-----";: TAB 35: PRINT "-------" +1680 FOR T=1 TO 5: TAB 5: PRINT B$()(T);: TAB 21: PRINT T2(T);: TAB 36: PRINT T3(T) +1690 NEXT T:PRINT +1700 PRINT "SHOTS ON NET":PRINT A$()(7)":";S2:PRINT B$()(7)":";S3 +1710 END +1720 PRINT: PRINT "THIS IS A SIMULATED HOCKEY GAME." +1730 PRINT "QUESTION RESPONSE" +1740 PRINT "PASS TYPE IN THE NUMBER OF PASSES YOU WOULD" +1750 PRINT " LIKE TO MAKE, FROM 0 TO 3." +1760 PRINT "SHOT TYPE THE NUMBER CORRESPONDING TO THE SHOT" +1770 PRINT " YOU WANT TO MAKE. ENTER:" +1780 PRINT " 1 FOR A SLAPSHOT" +1790 PRINT " 2 FOR A WRISTSHOT" +1800 PRINT " 3 FOR A BACKHAND" +1810 PRINT " 4 FOR A SNAP SHOT" +1820 PRINT "AREA TYPE IN THE NUMBER CORRESPONDING TO" +1830 PRINT " THE AREA YOU ARE AIMING AT. ENTER:" +1840 PRINT " 1 FOR UPPER LEFT HAND CORNER" +1850 PRINT " 2 FOR UPPER RIGHT HAND CORNER" +1860 PRINT " 3 FOR LOWER LEFT HAND CORNER" +1870 PRINT " 4 FOR LOWER RIGHT HAND CORNER" +1880 PRINT +1890 PRINT "AT THE START OF THE GAME, YOU WILL BE ASKED FOR THE NAMES" +1900 PRINT "OF YOUR PLAYERS. THEY ARE ENTERED IN THE ORDER: " +1910 PRINT "LEFT WING, CENTER, RIGHT WING, LEFT DEFENSE," +1920 PRINT "RIGHT DEFENSE, GOALKEEPER. ANY OTHER INPUT REQUIRED WILL" +1930 PRINT "HAVE EXPLANATORY INSTRUCTIONS." +1940 GOTO 90 +1950 END diff --git a/data/examples/14games/horserace.bas b/data/examples/14games/horserace.bas new file mode 100644 index 0000000000000000000000000000000000000000..fb2b597254022c3d0d3c7ee768adc7ef972127c4 --- /dev/null +++ b/data/examples/14games/horserace.bas @@ -0,0 +1,134 @@ +100 REM "HORSERACE" +110 REM "Ported by Stefan in 2022" +120 REM "Array bounds problem - unfinished - more thought needed" +130 SET 11,1 : REM "MS style TAB" +140 SET 12,0 : REM "Set lower array bound to zero" +210 DIM S(8+1) +220 PRINT "WELCOME TO SOUTH PORTLAND HIGH RACETRACK" +230 PRINT " ...OWNED BY LAURIE CHEVALIER" +240 PRINT "DO YOU WANT DIRECTIONS"; +250 INPUT X$ +260 IF X$="NO" OR X$="no" THEN 320 +270 PRINT"UP TO 10 MAY PLAY. A TABLE OF ODDS WILL BE PRINTED. YOU" +280 PRINT"MAY BET ANY + AMOUNT UNDER 100000 ON ONE HORSE." +290 PRINT "DURING THE RACE, A HORSE WILL BE SHOWN BY ITS" +300 PRINT"NUMBER. THE HORSES RACE DOWN THE PAPER!" +310 PRINT +320 PRINT "HOW MANY WANT TO BET"; +330 INPUT C +335 DIM W$(20, C+1), V$(20, 8+1) +340 PRINT "WHEN ? APPEARS,TYPE NAME" +350 FOR A=1 TO C +360 INPUT T$: W$()(A)=T$ +370 NEXT A +375 STOP +380 PRINT +390 PRINT"HORSE",,"NUMBER","ODDS" +400 PRINT +410 FOR I=1 TO 8: S(I)=0: NEXT I +420 LET R=0 +430 FOR A=1 TO 8 +440 LET D(A)=INT(10*RND(1)+1) +450 NEXT A +460 FOR A=1 TO 8 +470 LET R=R+D(A) +480 NEXT A +490 LET V$()(1)="JOE MAW" +500 LET V$()(2)="L.B.J." +510 LET V$()(3)="MR.WASHBURN" +520 LET V$()(4)="MISS KAREN" +530 LET V$()(5)="JOLLY" +540 LET V$()(6)="HORSE" +550 LET V$()(7)="JELLY DO NOT" +560 LET V$()(8)="MIDNIGHT" +570 FOR N=1 TO 8 +580 PRINT V$()(N);: TAB 14: PRINT #8,N,#0,R/D(N);":1" +590 NEXT N +600 PRINT"--------------------------------------------------" +610 PRINT "PLACE YOUR BETS...HORSE # THEN AMOUNT" +620 FOR J=1 TO C +630 PRINT W$()(J); +640 INPUT Q(J),P(J) +650 IF P(J)<1 THEN 670 +660 IF P(J)<100000 THEN 690 +670 PRINT" YOU CAN'T DO THAT!" +680 GOTO 630 +690 NEXT J +700 PRINT +710 PRINT"1 2 3 4 5 6 7 8" +720 PRINT"XXXXSTARTXXXX" +730 FOR I=1 TO 8 +740 LET M=I +750 LET M(I)=M +760 LET Y(M(I))=INT(100*RND(1)+1) +770 IF Y(M(I))<10 THEN 860 +780 LET S=INT(R/D(I)+.5) +790 IF Y(M(I))27 THEN 1240 +1180 NEXT A +1190 PRINT M(I); +1200 NEXT I +1210 FOR A=1 TO 28-T +1220 PRINT +1230 NEXT A +1240 PRINT "XXXXFINISHXXXX"; +1242 PRINT +1243 PRINT +1244 PRINT "---------------------------------------------" +1245 PRINT +1250 IF T<28 THEN 720 +1270 PRINT "THE RACE RESULTS ARE:" +1272 LET Z9=1 +1280 FOR I=8 TO 1 STEP-1 +1290 LET F=M(I) +1300 PRINT +1310 PRINT Z9;" PLACE HORSE NO. ";F," AT ";R/D(F);":1" +1312 LET Z9=Z9+1 +1320 NEXT I +1330 FOR J=1 TO C +1340 IF Q(J)<>M(8) THEN 1370 +1350 LET N=Q(J) +1355 PRINT +1360 PRINT W$()(J);" WINS $";(R/D(N))*P(J) +1370 NEXT J +1372 PRINT "DO YOU WANT TO BET ON THE NEXT RACE ?" +1374 INPUT "(YES OR NO) "; O$ +1376 IF O$="YES" OR O$= "yes" THEN 380 +1380 END diff --git a/data/examples/14games/hurkle.bas b/data/examples/14games/hurkle.bas new file mode 100644 index 0000000000000000000000000000000000000000..0c59c60edbb7ab54837033814247231958f1c0d8 --- /dev/null +++ b/data/examples/14games/hurkle.bas @@ -0,0 +1,55 @@ +10 REM "HURKLE from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM "G is the grid size, N the number of attempts" +40 @R=MILLIS(1) +50 N=5 +60 G=10 +100 PRINT "A HURKLE IS HIDING ON A",G,"BY",G,"GRID. HOMEBASE" +110 PRINT "ON THE GRID IS POINT 0,0 IN THE SOUTHWEST CORNER," +120 PRINT "AND ANY POINT ON THE GRID IS DESIGNATED BY A" +130 PRINT "PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. THE FIRST" +140 PRINT "NUMBER IS THE HORIZONTAL POSITION AND THE SECOND NUMBER" +150 PRINT "IS THE VERTICAL POSITION. YOU MUST TRY TO" +160 PRINT "GUESS THE HURKLE'S GRIDPOINT. YOU GET",N,"TRIES." +170 PRINT "AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE" +180 PRINT "DIRECTION TO GO TO LOOK FOR THE HURKLE." +190 PRINT "TYPE # TO END PROGRAM": PRINT +200 REM "The hukles position" +210 A=INT(RND(G)) +220 B=INT(RND(G)) +300 REM "The guess loop" +310 FOR K=1 TO N +320 PRINT "GUESS #";K; +330 REM "Safe input of two numbers" +340 INPUT A$ +350 IF A$="#" THEN END +360 @S=0: X=VAL(A$) +370 IF @S THEN PRINT "NUMBER ERROR": GOTO 320 +380 I=INSTR(A$, ",") +390 IF I=0 THEN PRINT "NUMBER ERROR": GOTO 320 +400 @S=0: Y=VAL(A$(I+1)) +410 IF @S THEN PRINT "NUMBER ERROR": GOTO 320 +420 IF X=A AND Y=B THEN 600 +430 GOSUB 800 +440 PRINT +450 NEXT K +510 PRINT +520 PRINT "SORRY, THAT'S",N,"GUESSES." +530 PRINT "THE HURKLE IS AT ",A,",",B +540 PRINT +550 PRINT "LET'S PLAY AGAIN, HURKLE IS HIDING." +560 PRINT +570 GOTO 200 +600 REM "Found him" +610 PRINT +620 PRINT "YOU FOUND HIM IN",K,"GUESSES!" +640 GOTO 540 +800 REM "Output Answer" +810 PRINT "GO "; +820 IF YB THEN PRINT "SOUTH"; +840 IF XA THEN PRINT "WEST"; +860 PRINT +870 RETURN +900 END diff --git a/data/examples/14games/kinema.bas b/data/examples/14games/kinema.bas new file mode 100644 index 0000000000000000000000000000000000000000..64d93d8da10800671b5250947f009ed9ea6b3daa --- /dev/null +++ b/data/examples/14games/kinema.bas @@ -0,0 +1,33 @@ +10 REM "KINEMA from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 IF NOT USR(0, 3) THEN PRINT "NEEDS FLOAT"; END +50 @R=MILLIS(1) +100 PRINT +110 Q=0 +120 V=5+INT(RND(35)) +130 PRINT "A BALL IS THROWN UPWARDS AT",V ,"METERS PER SECOND." +140 PRINT +150 A=0.05*V*V +160 PRINT "HOW HIGH WILL IT GO (IN METERS)"; +170 GOSUB 500 +180 A=V/5 +190 PRINT "HOW LONG UNTIL IT RETURNS (IN SECONDS)"; +200 GOSUB 500 +210 T=1+INT(V*RND(2))/10 +220 A=V-10*T +230 PRINT "WHAT WILL ITS VELOCITY BE AFTER",T,"SECONDS"; +240 GOSUB 500 +250 PRINT +260 PRINT Q,"RIGHT OUT OF 3."; +270 IF Q>=2 THEN PRINT " NOT BAD." +280 PRINT +290 GOTO 100 +500 REM "Input and answer subroutine with A as the correct answer" +510 INPUT G +520 IF ABS((G-A)/A)<0.15 THEN Q=Q+1: PRINT "CLOSE ENOUGH." +530 ELSE PRINT "NOT EVEN CLOSE...." +540 PRINT "CORRECT ANSWER IS",A +520 PRINT +530 RETURN +999 END diff --git a/data/examples/14games/king.bas b/data/examples/14games/king.bas new file mode 100644 index 0000000000000000000000000000000000000000..e75955752723f10684c166d89a463c658054bb0e --- /dev/null +++ b/data/examples/14games/king.bas @@ -0,0 +1,269 @@ +1 REM "KING" +2 REM "Ported by Stefan in 2022" +3 REM +4 PRINT "DO YOU WANT INSTRUCTIONS"; +5 INPUT Z$ +6 N5=8 +10 IF Z$(1,1)="N" OR Z$(1,1)="n" THEN 47 +11 IF Z$="AGAIN" THEN 1960 +12 PRINT:PRINT:PRINT +20 PRINT "CONGRATULATIONS! YOU'VE JUST BEEN ELECTED PREMIER OF SETATS" +22 PRINT "DETINU, A SMALL COMMUNIST ISLAND 30 BY 70 MILES LONG. YOUR" +24 PRINT "JOB IS TO DECIDE UPON THE CONTRY'S BUDGET AND DISTRIBUTE" +26 PRINT "MONEY TO YOUR COUNTRYMEN FROM THE COMMUNAL TREASURY." +28 PRINT "THE MONEY SYSTEM IS RALLODS, AND EACH PERSON NEEDS 100" +30 PRINT "RALLODS PER YEAR TO SURVIVE. YOUR COUNTRY'S INCOME COMES" +32 PRINT "FROM FARM PRODUCE AND TOURISTS VISITING YOUR MAGNIFICENT" +34 PRINT "FORESTS, HUNTING, FISHING, ETC. HALF YOUR LAND IS FARM LAND" +36 PRINT "WHICH ALSO HAS AN EXCELLENT MINERAL CONTENT AND MAY BE SOLD" +38 PRINT "TO FOREIGN INDUSTRY (STRIP MINING) WHO IMPORT AND SUPPORT" +40 PRINT "THEIR OWN WORKERS. CROPS COST BETWEEN 10 AND 15 RALLODS PER" +42 PRINT "SQUARE MILE TO PLANT." +44 PRINT "YOUR GOAL IS TO COMPLETE YOUR",N5,"YEAR TERM OF OFFICE." +46 PRINT "GOOD LUCK!" +47 PRINT +48 @R=MILLIS(1) +50 A=INT(60000+(1000*RND(1))-(1000*RND(1))) +55 B=INT(500+(10*RND(1))-(10*RND(1))) +65 D=2000 +100 W=INT(10*RND(1)+95) +102 PRINT +105 PRINT "YOU NOW HAVE ";A;" RALLODS IN THE TREASURY." +110 PRINT INT(B),"COUNTRYMEN, "; +115 V9=INT(((RND(1)/2)*10+10)) +120 IF C=0 THEN 140 +130 PRINT INT(C);"FOREIGN WORKERS, "; +140 PRINT "AND",INT(D),"SQ. MILES OF LAND." +150 PRINT "THIS YEAR INDUSTRY WILL BUY LAND FOR",W, +152 PRINT "RALLODS PER SQUARE MILE." +155 PRINT "LAND CURRENTLY COSTS",V9,"RALLODS PER SQUARE MILE TO PLANT." +162 PRINT +200 PRINT "HOW MANY SQUARE MILES DO YOU WISH TO SELL TO INDUSTRY"; +210 INPUT H +215 IF H<0 THEN 200 +220 IF H<=D-1000 THEN 300 +230 PRINT "*** THINK AGAIN. YOU ONLY HAVE",D-1000,"SQUARE MILES OF FARM LAND." +240 IF X<>0 THEN 200 +250 PRINT:PRINT "(FOREIGN INDUSTRY WILL ONLY BUY FARM LAND BECAUSE" +260 PRINT "FOREST LAND IS UNECONOMICAL TO STRIP MINE DUE TO TREES," +270 PRINT "THICKER TOP SOIL, ETC.)" +280 X=1 +299 GOTO 200 +300 D=INT(D-H) +310 A=INT(A+(H*W)) +320 PRINT "HOW MANY RALLODS WILL YOU DISTRIBUTE AMONG YOUR COUNTRYMEN"; +340 INPUT I +342 IF I<0 THEN 320 +350 IF I0 THEN 1002 +602 IF I<>0 THEN 1002 +604 IF J<>0 THEN 1002 +606 IF K<>0 THEN 1002 +609 PRINT +612 PRINT "GOODBYE." +614 PRINT "(IF YOU WISH TO CONTINUE THIS GAME AT A LATER DATE, ANSWER" +616 PRINT "'AGAIN' WHEN ASKED IF YOU WANT INSTRUCTIONS AT THE START" +617 PRINT "OF THE GAME)." +618 STOP +1000 GOTO 600 +1002 PRINT +1003 PRINT +1010 A=INT(A-K) +1020 A4=A +1100 IF INT(I/100-B)>=0 THEN 1120 +1105 IF I/100<50 THEN 1700 +1110 PRINT INT(B-(I/100));"COUNTRYMEN DIED OF STARVATION" +1120 F1=INT(RND(1)*(2000-D)) +1122 IF K<25 THEN 1130 +1125 F1=INT(F1/(K/25)) +1130 IF F1<=0 THEN 1150 +1140 PRINT F1;"COUNTRYMEN DIED OF CARBON-MONOXIDE AND DUST INHALATION" +1150 IF INT((I/100)-B)<0 THEN 1170 +1160 IF F1>0 THEN 1180 +1165 GOTO 1200 +1170 PRINT " YOU WERE FORCED TO SPEND",INT((F1+(B-(I/100)))*9); +1172 PRINT "RALLODS ON FUNERAL EXPENSES" +1174 B5=INT(F1+(B-(I/100))) +1175 A=INT(A-((F1+(B-(I/100)))*9)) +1176 GOTO 1185 +1180 PRINT " YOU WERE FORCED TO SPEND ",INT(F1*9),"RALLODS ON "; +1181 PRINT "FUNERAL EXPENSES." +1182 B5=F1 +1183 A=INT(A-(F1*9)) +1185 IF A>=0 THEN 1194 +1187 PRINT " INSUFFICIENT RESERVES TO COVER COST - LAND WAS SOLD" +1189 D=INT(D+(A/W)) +1190 A=0 +1194 B=INT(B-B5) +1200 IF H=0 THEN 1250 +1220 C1=INT(H+(RND(1)*10)-(RND(1)*20)) +1224 IF C>0 THEN 1230 +1226 C1=C1+20 +1230 PRINT C1;"WORKERS CAME TO THE COUNTRY AND"; +1250 P1=INT(((I/100-B)/10)+(K/25)-((2000-D)/50)-(F1/2)) +1255 PRINT ABS(P1),"COUNTRYMEN "; +1260 IF P1<0 THEN 1275 +1265 PRINT "CAME TO"; +1270 GOTO 1280 +1275 PRINT "LEFT"; +1280 PRINT " THE ISLAND." +1290 B=INT(B+P1) +1292 C=INT(C+C1) +1305 U2=INT(((2000-D)*((RND(1)+1.5)/2))) +1310 IF C=0 THEN 1324 +1320 PRINT "OF ";INT(J);"SQ. MILES PLANTED,"; +1324 IF J>U2 THEN 1330 +1326 U2=J +1330 PRINT " YOU HARVESTED ";INT(J-U2);"SQ. MILES OF CROPS." +1340 IF U2=0 THEN 1370 +1344 IF T1>=2 THEN 1370 +1350 PRINT " (DUE TO "; +1355 IF T1=0 THEN 1365 +1360 PRINT "INCREASED "; +1365 PRINT "AIR AND WATER POLLUTION FROM FOREIGN INDUSTRY.)" +1370 Q=INT((J-U2)*(W/2)) +1380 PRINT "MAKING",INT(Q),"RALLODS." +1390 A=INT(A+Q) +1400 V1=INT(((B-P1)*22)+(RND(1)*500)) +1405 V2=INT((2000-D)*15) +1410 PRINT " YOU MADE", ABS(INT(V1-V2)), "RALLODS FROM TOURIST TRADE." +1420 IF V2=0 THEN 1450 +1425 IF V1-V2>=V3 THEN 1450 +1430 PRINT " DECREASE BECAUSE "; +1435 G1=10*RND(1) +1440 IF G1<=2 THEN 1460 +1442 IF G1<=4 THEN 1465 +1444 IF G1<=6 THEN 1470 +1446 IF G1<=8 THEN 1475 +1448 IF G1<=10 THEN 1480 +1450 V3=INT(A+V3) +1451 A=INT(A+V3) +1452 GOTO 1500 +1460 PRINT "FISH POPULATION HAS DWINDLED DUE TO WATER POLLUTION." +1462 GOTO 1450 +1465 PRINT "AIR POLLUTION IS KILLING GAME BIRD POPULATION." +1467 GOTO 1450 +1470 PRINT "MINERAL BATHS ARE BEING RUINED BY WATER POLLUTION." +1472 GOTO 1450 +1475 PRINT "UNPLEASANT SMOG IS DISCOURAGING SUN BATHERS." +1477 GOTO 1450 +1480 PRINT "HOTELS ARE LOOKING SHABBY DUE TO SMOG GRIT." +1482 GOTO 1450 +1500 IF B5>200 THEN 1600 +1505 IF B<343 THEN 1700 +1510 IF (A4/100)>5 THEN 1800 +1515 IF C>B THEN 1550 +1520 IF N5-1=X5 THEN 1900 +1545 GOTO 2000 +1550 PRINT +1552 PRINT +1560 PRINT "THE NUMBER OF FOREIGN WORKERS HAS EXCEEDED THE NUMBER" +1562 PRINT "OF COUNTRYMEN. AS A MINORITY, THEY HAVE REVOLTED AND" +1564 PRINT "TAKEN OVER THE COUNTRY." +1570 IF RND(1)<=.5 THEN 1580 +1574 PRINT "YOU HAVE BEEN THROWN OUT OF OFFICE AND ARE NOW" +1576 PRINT "RESIDING IN PRISON." +1578 GOTO 1590 +1580 PRINT "YOU HAVE BEEN ASSASSINATED." +1590 PRINT +1592 PRINT +1596 STOP +1600 PRINT +1602 PRINT +1610 PRINT B5, "COUNTRYMEN DIED IN ONE YEAR!!!!!" +1615 PRINT "DUE TO THIS EXTREME MISMANAGEMENT, YOU HAVE NOT ONLY" +1620 PRINT "BEEN IMPEACHED AND THROWN OUT OF OFFICE, BUT YOU" +1622 M6=INT(RND(1)*10) +1625 IF M6<=3 THEN 1670 +1630 IF M6<=6 THEN 1680 +1635 IF M6<=10 THEN 1690 +1670 PRINT "ALSO HAD YOUR LEFT EYE GOUGED OUT!" +1672 GOTO 1590 +1680 PRINT "HAVE ALSO GAINED A VERY BAD REPUTATION." +1682 GOTO 1590 +1690 PRINT "HAVE ALSO BEEN DECLARED NATIONAL FINK." +1692 GOTO 1590 +1700 PRINT +1702 PRINT +1710 PRINT "OVER ONE THIRD OF THE POPULTATION HAS DIED SINCE YOU" +1715 PRINT "WERE ELECTED TO OFFICE. THE PEOPLE (REMAINING)" +1720 PRINT "HATE YOUR GUTS." +1730 GOTO 1570 +1800 IF B5-F1<2 THEN 1515 +1807 PRINT +1815 PRINT "MONEY WAS LEFT OVER IN THE TREASURY WHICH YOU DID" +1820 PRINT "NOT SPEND. AS A RESULT, SOME OF YOUR COUNTRYMEN DIED" +1825 PRINT "OF STARVATION. THE PUBLIC IS ENRAGED AND YOU HAVE" +1830 PRINT "BEEN FORCED TO EITHER RESIGN OR COMMIT SUICIDE." +1835 PRINT "THE CHOICE IS YOURS." +1840 PRINT "IF YOU CHOOSE THE LATTER, PLEASE TURN OFF YOUR COMPUTER" +1845 PRINT "BEFORE PROCEEDING." +1850 GOTO 1590 +1900 PRINT +1902 PRINT +1920 PRINT "CONGRATULATIONS!!!!!!!!!!!!!!!!!!" +1925 PRINT "YOU HAVE SUCCESFULLY COMPLETED YOUR", N5, "YEAR TERM" +1930 PRINT "OF OFFICE. YOU WERE, OF COURSE, EXTREMELY LUCKY, BUT" +1935 PRINT "NEVERTHELESS, IT'S QUITE AN ACHIEVEMENT. GOODBYE AND GOOD" +1940 PRINT "LUCK - YOU'LL PROBABLY NEED IT IF YOU'RE THE TYPE THAT" +1945 PRINT "PLAYS THIS GAME." +1950 GOTO 1590 +1960 PRINT "HOW MANY YEARS HAD YOU BEEN IN OFFICE WHEN INTERRUPTED"; +1961 INPUT X5 +1962 IF X5<0 THEN 1590 +1963 IF X5<8 THEN 1969 +1965 PRINT " COME ON, YOUR TERM IN OFFICE IS ONLY", N5,"YEARS." +1967 GOTO 1960 +1969 PRINT "HOW MUCH DID YOU HAVE IN THE TREASURY"; +1970 INPUT A +1971 IF A<0 THEN 1590 +1975 PRINT "HOW MANY COUNTRYMEN"; +1976 INPUT B +1977 IF B<0 THEN 1590 +1980 PRINT "HOW MANY WORKERS"; +1981 INPUT C +1982 IF C<0 THEN 1590 +1990 PRINT "HOW MANY SQUARE MILES OF LAND"; +1991 INPUT D +1992 IF D<0 THEN 1590 +1993 IF D>2000 THEN 1996 +1994 IF D>1000 THEN 100 +1996 PRINT " COME ON, YOU STARTED WITH 1000 SQ. MILES OF FARM LAND" +1997 PRINT " AND 10,000 SQ. MILES OF FOREST LAND." +1998 GOTO 1990 +2000 X5=X5+1 +2020 B5=0 +2040 GOTO 100 +2046 END diff --git a/data/examples/14games/lem.bas b/data/examples/14games/lem.bas new file mode 100644 index 0000000000000000000000000000000000000000..82a313333f99ad2d56cafac85e997f547dd965f7 --- /dev/null +++ b/data/examples/14games/lem.bas @@ -0,0 +1,250 @@ +2 REM "LEM" +4 REM "Ported by Stefan in 2022" +7 REM "ROCKT2 IS AN INTERACTIVE GAME THAT SIMULATES A LUNAR" +8 REM "LANDING IS SIMILAR TO THAT OF THE APOLLO PROGRAM."" +9 REM THERE IS ABSOLUTELY NO CHANCE INVOLVED +10 Z$="GO" +15 B1=1 +20 M=17.95 +25 F1=5.25 +30 N=7.5 +35 R0=926 +40 V0=1.29 +45 T=0 +50 H0=60 +55 R=R0+H0 +60 A=-3.425 +65 R1=0 +70 A1=8.84361E-04 +75 R3=0 +80 A3=0 +85 M1=7.45 +90 M0=M1 +95 B=750 +100 T1=0 +105 F=0 +110 P=0 +115 N=1 +120 M2=0 +125 S=0 +130 C=0 +135 IF Z$="YES" OR Z$="yes" THEN 1150 +140 PRINT +145 PRINT "LUNAR LANDING SIMULATION" +150 PRINT +155 PRINT "HAVE YOU FLOWN AN APOLLO/LEM MISSION BEFORE"; +160 PRINT " (YES OR NO)"; +165 INPUT Q$ +170 IF Q$="YES" OR Q$="yes" THEN 190 +175 IF Q$="NO" OR Q$="no" THEN 205 +180 PRINT "JUST ANSWER THE QUESTION, PLEASE, "; +185 GOTO 160 +190 PRINT +195 PRINT "INPUT MEASUREMENT OPTION NUMBER"; +200 GOTO 225 +205 PRINT +210 PRINT "WHICH SYSTEM OF MEASUREMENT DO YOU PREFER?" +215 PRINT " 1=METRIC 0=ENGLISH" +220 PRINT "ENTER THE APPROPRIATE NUMBER"; +225 INPUT K +230 PRINT +235 IF K=0 THEN 280 +240 IF K=1 THEN 250 +245 GOTO 220 +250 Z=1852.8 +255 M$="METERS" +260 G3=3.6 +265 N$=" KILOMETERS" +270 G5=1000 +275 GOTO 305 +280 Z=6080 +285 M$="FEET" +290 G3=.592 +295 N$="N.MILES" +300 G5=Z +305 IF B1=3 THEN 670 +310 IF Q$="YES" THEN 485 +315 PRINT +320 PRINT " YOU ARE ON A LUNAR LANDING MISSION. AS THE PILOT OF" +325 PRINT "THE LUNAR EXCURSION MODULE, YOU WILL BE EXPECTED TO" +330 PRINT "GIVE CERTAIN COMMANDS TO THE MODULE NAVIGATION SYSTEM." +335 PRINT "THE ON-BOARD COMPUTER WILL GIVE A RUNNING ACCOUNT" +340 PRINT "OF INFORMATION NEEDED TO NAVIGATE THE SHIP." +345 PRINT +350 PRINT +355 PRINT "THE ATTITUDE ANGLE CALLED FOR IS DESCRIBED AS FOLLOWS." +360 PRINT "+ OR -180 DEGREES IS DIRECTLY AWAY FROM THE MOON" +365 PRINT "-90 DEGREES IS ON A TANGENT IN THE DIRECTION OF ORBIT" +370 PRINT "+90 DEGREES IS ON A TANGENT FROM THE DIRECTION OF ORBIT" +375 PRINT "0 (ZERO) DEGREES IS DIRECTLY TOWARD THE MOON" +380 PRINT +385 TAB 30: PRINT "-180|+180" +390 TAB 34: PRINT "^" +395 TAB 27: PRINT "-90 < -+- > +90" +400 TAB 34: PRINT "!" +405 TAB 34: PRINT "0" +410 TAB 21: PRINT "<<<< DIRECTION OF ORBIT <<<<" +415 PRINT +420 TAB 20: PRINT "------ SURFACE OF MOON ------" +425 PRINT +430 PRINT +435 PRINT "ALL ANGLES BETWEEN -180 AND +180 DEGREES ARE ACCEPTED." +440 PRINT +445 PRINT "1 FUEL UNIT = 1 SEC. AT MAX THRUST" +450 PRINT "ANY DISCREPANCIES ARE ACCOUNTED FOR IN THE USE OF FUEL" +455 PRINT "FOR AN ATTITUDE CHANGE." +460 PRINT "AVAILABLE ENGINE POWER: 0 (ZERO) AND ANY VALUE BETWEEN" +465 PRINT "10 AND 100 PERCENT." +470 PRINT +475 PRINT"NEGATIVE THRUST OR TIME IS PROHIBITED." +480 PRINT +485 PRINT +490 PRINT "INPUT: TIME INTERVAL IN SECONDS ------ (T)" +495 PRINT " PERCENTAGE OF THRUST ---------- (P)" +500 PRINT " ATTITUDE ANGLE IN DEGREES ----- (A)" +505 PRINT +510 IF Q$="YES" OR Q$="yes" THEN 535 +515 PRINT "FOR EXAMPLE:" +520 PRINT "T,P,A? 10,65,-60" +525 PRINT "TO ABORT THE MISSION AT ANY TIME, ENTER 0,0,0" +530 PRINT +535 PRINT "OUTPUT: TOTAL TIME IN ELAPSED SECONDS" +540 PRINT " HEIGHT IN ";M$ +545 PRINT " DISTANCE FROM LANDING SITE IN ";M$ +550 PRINT " VERTICAL VELOCITY IN ";M$;"/SECOND" +555 PRINT " HORIZONTAL VELOCITY IN ";M$;"/SECOND" +560 PRINT " FUEL UNITS REMAINING" +565 PRINT +570 GOTO 670 +575 PRINT +580 PRINT "T,P,A"; +581 INPUT N$ +582 T1=VAL(N$) +583 I=INSTR(N$, ",")+1: F=VAL(N$(I)) +584 I=INSTR(N$(I), ",")+1: P=VAL(N$(I)) +585 REM "INPUT T1,F,P" +590 F=F/100 +595 IF T1<0 THEN 905 +600 IF T1=0 THEN 1090 +605 IF ABS(F-.05)>1 THEN 945 +610 IF ABS(F-.05)<.05 THEN 945 +615 IF ABS(P)>180 THEN 925 +620 N=20 +625 IF T1<400 THEN 635 +630 N=T1/20 +635 T1=T1/N +640 P=P*3.14159/180 +645 S=SIN(P) +650 C=COS(P) +655 M2=M0*T1*F/B +660 R3=-.5*R0*(POW(V0/R, 2))+R*A1*A1 +665 A3=-2*R1*A1/R +670 FOR I=1 TO N +675 IF M1=0 THEN 715 +680 M1=M1-M2 +685 IF M1>0 THEN 725 +690 F=F*(1+M1/M2) +695 M2=M1+M2 +700 PRINT "YOU ARE OUT OF FUEL." +705 M1=0 +710 GOTO 725 +715 F=0 +720 M2=0 +725 M=M-.5*M2 +730 R4=R3 +735 R3=-.5*R0*(POW(V0/R,2))+R*A1*A1 +740 R2=(3*R3-R4)/2+.00526*F1*F*C/M +745 A4=A3 +750 A3=-2*R1*A1/R +755 A2=(3*A3-A4)/2+.0056*F1*F*S/(M*R) +760 X=R1*T1+.5*R2*T1*T1 +765 R=R+X +770 H0=H0+X +775 R1=R1+R2*T1 +780 A=A+A1*T1+.5*A2*T1*T1 +785 A1=A1+A2*T1 +790 M=M-.5*M2 +795 T=T+T1 +800 IF H0<3.287828E-04 THEN 810 +805 NEXT I +810 H=H0*Z +815 H1=R1*Z +820 D=R0*A*Z +825 D1=R*A1*Z +830 T2=M1*B/M0 +835 PRINT #10, " ";T;H;D; +840 PRINT H1;D1;T2 +845 IF H0<3.287828E-04 THEN 880 +850 IF R0*A>164.474 THEN 1050 +855 IF M1>0 THEN 580 +860 T1=20 +865 F=0 +870 P=0 +875 GOTO 620 +880 IF R1<-8.21957E-04 THEN 1020 +885 IF ABS(R*A1)>4.93174E-04 THEN 1020 +890 IF H0<-3.287828E-04 THEN 1020 +895 IF ABS(D)>10*Z THEN 1065 +900 GOTO 995 +905 PRINT +910 PRINT "THIS SPACECRAFT IS NOT ABLE TO VIOLATE THE SPACE-"; +915 PRINT "TIME CONTINUUM." +920 GOTO 575 +925 PRINT +930 PRINT "IF YOU WANT TO SPIN AROUND, GO OUTSIDE THE MODULE" +935 PRINT "FOR AN E.V.A." +940 GOTO 575 +945 PRINT +950 PRINT "IMPOSSIBLE THRUST VALUE "; +955 IF F<0 THEN 985 +960 IF F-.05<.05 THEN 975 +965 PRINT "TOO LARGE" +970 GOTO 575 +975 PRINT "TOO SMALL" +980 GOTO 575 +985 PRINT "NEGATIVE" +990 GOTO 575 +995 PRINT +1000 PRINT "TRANQUILITY BASE HERE -- THE EAGLE HAS LANDED." +1005 PRINT "CONGRATULATIONS -- THERE WAS NO SPACECRAFT DAMAGE." +1010 PRINT "YOU MAY NOW PROCEED WITH SURFACE EXPLORATION." +1015 GOTO 1100 +1020 PRINT +1025 PRINT "CRASH !!!!!!!!!!!!!!!!" +1030 PRINT "YOUR IMPACT CREATED A CRATER ";ABS(H);M$;" DEEP." +1035 X1=SQR(D1*D1+H1*H1)*G3 +1040 PRINT "AT CONTACT YOU WERE TRAVELING ";X1;N$;"/HR" +1045 GOTO 1100 +1050 PRINT +1055 PRINT "YOU HAVE BEEN LOST IN SPACE WITH NO HOPE OF RECOVERY." +1060 GOTO 1100 +1065 PRINT "YOU ARE DOWN SAFELY - " +1075 PRINT +1080 PRINT "BUT MISSED THE LANDING SITE BY ";ABS(D/G5);N$;"." +1085 GOTO 1100 +1090 PRINT +1095 PRINT "MISSION ABENDED" +1100 PRINT +1105 PRINT "DO YOU WANT TO TRY IT AGAIN (YES/NO)?" +1110 INPUT Z$ +1115 IF Z$="YES" OR Z$="yes" THEN 20 +1120 IF Z$="NO" OR Z$="no" THEN 1130 +1125 GOTO 1105 +1130 PRINT +1135 PRINT "TOO BAD, THE SPACE PROGRAM HATES TO LOSE EXPERIENCED" +1140 PRINT "ASTRONAUTS." +1145 STOP +1150 PRINT +1155 PRINT "OK, DO YOU WANT THE COMPLETE INSTRUCTIONS OR THE INPUT -" +1160 PRINT "OUTPUT STATEMENTS?" +1165 PRINT "1=COMPLETE INSTRUCTIONS" +1170 PRINT "2=INPUT-OUTPUT STATEMENTS" +1175 PRINT "3=NEITHER" +1180 INPUT B1 +1185 Q$="NO" +1190 IF B1=1 THEN 205 +1195 Q$="YES" +1200 IF B1=2 THEN 190 +1205 IF B1=3 THEN 190 +1210 GOTO 1165 +1215 END diff --git a/data/examples/14games/letter.bas b/data/examples/14games/letter.bas new file mode 100644 index 0000000000000000000000000000000000000000..b23c2454c1834220e350b767ef0843e73f4e7b6a --- /dev/null +++ b/data/examples/14games/letter.bas @@ -0,0 +1,34 @@ +10 REM "Letter from 101 BASIC Games" +20 REM "Originally written by Bob Albrecht in 1975" +30 REM "Ported to Stefan's BASIC in 2021" +40 REM "C$ is the bell sound" +50 @R=MILLIS(1) +60 C$=7 +100 PRINT "LETTER GUESSING GAME": PRINT +110 PRINT "I'LL THINK OF A LETTER OF THE ALPHABET, A TO Z." +120 PRINT "TRY TO GUESS MY LETTER AND I'LL GIVE YOU CLUES" +130 PRINT "AS TO HOW CLOSE YOU'RE GETTING TO MY LETTER." +200 REM "Main loop()" +210 FOR P +220 L=65+INT(RND(26)) +230 G=0 +240 PRINT: PRINT "O.K., I HAVE A LETTER. START GUESSING." +250 PRINT: PRINT "WHAT IS YOUR GUESS"; +260 G=G+1 +270 INPUT A$: IF A$="#" THEN END +300 REM "Mean string code of this BASIC dialect -> (A$) is needed!" +310 IF A$>90 THEN A$=(A$)-32 +320 IF (A$)=L THEN 400 +330 IF A$>L THEN 350 +340 PRINT "TOO LOW. TRY A HIGHER LETTER.": GOTO 250 +350 PRINT "TOO HIGH. TRY A LOWER LETTER.": GOTO 250 +400 PRINT: PRINT "YOU GOT IT IN",G,"GUESSES!!" +410 IF G<=5 THEN 430 +420 PRINT "BUT IT SHOULDN'T TAKE MORE THAN 5 GUESSES!": GOTO 500 +430 PRINT "GOOD JOB !!!!!" +440 FOR N=1 TO 15: PRINT C$;: NEXT N +500 PRINT +510 INPUT "LET'S PLAY AGAIN (yes/no) ", A$ +520 IF A$(1,1)<>"Y" AND A$(1,1)<>"y" THEN BREAK +600 NEXT P +900 END diff --git a/data/examples/14games/life.bas b/data/examples/14games/life.bas new file mode 100644 index 0000000000000000000000000000000000000000..543989d94f805b2a6a5fde6355e456850f731e85 --- /dev/null +++ b/data/examples/14games/life.bas @@ -0,0 +1,68 @@ +2 REM "LIFE" +4 REM "Printed by Stefan in 2022" +6 REM +7 SET 11,1: REM "Set TAB to MS mode" +8 PRINT "ENTER YOUR PATTERN:" +9 X1=1: Y1=1: X2=24: Y2=70 +10 DIM A(24,70),B$(72, 24) +20 C=1 +30 INPUT T$: B$()(C)=T$ +40 IF B$()(C)="DONE" THEN B$(C)="": GOTO 80 +50 IF B$(1,1)(C)="." THEN T$=" ": T$(2)=B$(2)(C): B$()(C)=T$ +60 C=C+1 +70 GOTO 30 +80 C=C-1: L=0 +90 FOR X=1 TO C-1 +100 IF LEN(B$()(X))>L THEN L=LEN(B$()(X)) +110 NEXT X +120 X1=11-C/2 +130 Y1=33-L/2 +140 FOR X=1 TO C +150 FOR Y=1 TO LEN(B$()(X)) +160 IF B$(Y,Y)(X)<>" " THEN A(X1+X,Y1+Y)=1:P=P+1 +170 NEXT Y +180 NEXT X +200 PRINT:PRINT:PRINT +210 PRINT "GENERATION: ";G," POPULATION: ";P;: IF I9 THEN PRINT "INVALID!"; +211 DELAY 100 +215 X3=24:Y3=70:X4=1: Y4=1: P=0 +220 G=G+1 +225 FOR X=1 TO X1-1: PRINT: NEXT X +230 FOR X=X1 TO X2 +240 PRINT +250 FOR Y=Y1 TO Y2 +253 IF A(X,Y)=2 THEN A(X,Y)=0:GOTO 270 +256 IF A(X,Y)=3 THEN A(X,Y)=1:GOTO 261 +260 IF A(X,Y)<>1 THEN 270 +261 TAB Y: PRINT "*"; +262 IF XX4 THEN X4=X +266 IF YY4 THEN Y4=Y +270 NEXT Y +290 NEXT X +295 FOR X=X2+1 TO 24: PRINT: NEXT X +299 X1=X3: X2=X4: Y1=Y3: Y2=Y4 +301 IF X1<3 THEN X1=3:I9=-1 +303 IF X2>22 THEN X2=22:I9=-1 +305 IF Y1<3 THEN Y1=3:I9=-1 +307 IF Y2>68 THEN Y2=68:I9=-1 +309 P=0 +500 FOR X=X1-1 TO X2+1 +510 FOR Y=Y1-1 TO Y2+1 +520 C=0 +530 FOR I=X-1 TO X+1 +540 FOR J=Y-1 TO Y+1 +550 IF A(I,J)=1 OR A(I,J)=2 THEN C=C+1 +560 NEXT J +570 NEXT I +580 IF A(X,Y)=0 THEN 610 +590 IF C<3 OR C>4 THEN A(X,Y)=2: GOTO 600 +595 P=P+1 +600 GOTO 620 +610 IF C=3 THEN A(X,Y)=3:P=P+1 +620 NEXT Y +630 NEXT X +635 X1=X1-1:Y1=Y1-1:X2=X2+1:Y2=Y2+1 +640 GOTO 210 +650 END diff --git a/data/examples/14games/lifefortwo.bas b/data/examples/14games/lifefortwo.bas new file mode 100644 index 0000000000000000000000000000000000000000..88c5f89bdcf5afc97617a74d0cf09d0e6a3fcae7 --- /dev/null +++ b/data/examples/14games/lifefortwo.bas @@ -0,0 +1,85 @@ +1 REM "LIFE2" +2 REM "Ported by Stefan in 2022" +3 REM +4 SET 11, 1: REM "Set TAB to MS mode" +7 DIM N(6,6),K(18),A(16),X(2),Y(2) +8 DATA 3,102,103,120,130,121,112,111,12 +9 DATA 21,30,1020,1030,1011,1021,1003,1002,1012 +10 FOR M=1 TO 18: READ K(M): NEXT M +13 DATA -1,0,1,0,0,-1,0,1,-1,-1,1,-1,-1,1,1,1 +14 FOR O1=1 TO 16: READ A(O1): NEXT O1 +20 GOTO 500 +50 FOR J=1 TO 5 +51 FOR K=1 TO 5 +55 IF N(J,K)>99 THEN GOSUB 200 +60 NEXT K +65 NEXT J +90 K=0: M2=0: M3=0 +99 FOR J=0 TO 6: PRINT +100 FOR K=0 TO 6 +101 IF J<>0 THEN IF J<>6 THEN 105 +102 IF K=6 THEN PRINT 0;: GOTO 125 +103 PRINT K;: GOTO 120 +105 IF K<>0 THEN IF K<>6 THEN 110 +106 IF J=6 THEN PRINT 0: GOTO 126 +107 PRINT J;: GOTO 120 +110 GOSUB 300 +120 NEXT K +125 NEXT J +126 RETURN +200 B=1: IF N(J,K)>999 THEN B=10 +220 FOR O1= 1 TO 15 STEP 2 +230 N(J+A(O1),K+A(O1+1))=N(J+A(O1),K+A(O1+1))+B +231 NEXT O1 +239 RETURN +300 IF N(J,K)<3 THEN 399 +305 FOR O1=1 TO 18 +310 IF N(J,K)=K(O1) THEN 350 +315 NEXT O1 +320 GOTO 399 +350 IF O1>9 THEN 360 +351 N(J,K)=100: M2=M2+1: PRINT " * "; +355 RETURN +360 N(J,K)=1000: M3=M3+1: PRINT " # "; +365 RETURN +399 N(J,K)=0: PRINT " ";: RETURN +500 TAB 10: PRINT "U.B. LIFE GAME" +505 M2=0: M3=0 +510 FOR J=1 TO 5 +511 FOR K=1 TO 5 +515 N(J,K)=0 +516 NEXT K +517 NEXT J +519 FOR B=1 TO 2: P1=3: IF B=2 THEN P1=30 +520 PRINT:PRINT "PLAYER ";B;" - 3 LIVE PIECES." +535 FOR K1=1 TO 3: GOSUB 700 +540 N(X(B),Y(B))=P1: NEXT K1 +542 NEXT B +559 GOSUB 90 +560 PRINT: GOSUB 50 +570 IF M2=0 THEN IF M3=0 THEN 574 +571 IF M3=0 THEN B=1: GOTO 575 +572 IF M2=0 THEN B=2: GOTO 575 +573 GOTO 580 +574 PRINT: PRINT "A DRAW":GOTO 800 +575 PRINT: PRINT "PLAYER ";B;" IS THE WINNER":GOTO 800 +580 FOR B=1 TO 2: PRINT: PRINT: PRINT "PLAYER ";B;: GOSUB 700 +581 IF B=99 THEN 560 +582 NEXT B +586 N(X(1),Y(1))=100: N(X(2),Y(2))=1000 +596 GOTO 560 +700 PRINT "X,Y":PRINT"XXXXXX": PRINT "$$$$$$": PRINT "&&&&&&" +701 PRINT: INPUT Y(B),X(B) +702 REM "Was CHR$(13)" +705 IF X(B)<=5 THEN IF X(B)>0 THEN 708 +706 GOTO 750 +708 IF Y(B)<=5 THEN IF Y(B)>0 THEN 715 +710 GOTO 750 +715 IF N(X(B),Y(B))<>0 THEN 750 +720 IF B=1 THEN RETURN +725 IF X(1)=X(2) THEN IF Y(1)=Y(2) THEN 740 +730 RETURN +740 PRINT "SAME COORD. SET TO 0" +741 N(X(B)+1,Y(B)+1)=0: B=99: RETURN +750 PRINT "ILLEGAL COORDS. RETYPE": GOTO 700 +999 END diff --git a/data/examples/14games/litquiz.bas b/data/examples/14games/litquiz.bas new file mode 100644 index 0000000000000000000000000000000000000000..ef03a2d8c33cd82c75e03fe80b52b56412e5ca49 --- /dev/null +++ b/data/examples/14games/litquiz.bas @@ -0,0 +1,47 @@ +10 REM "LITERATURE QUIZ from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 R=0 +100 PRINT "TEST YOUR KNOWLEDGE OF CHILDREN'S LITERATURE." +110 PRINT: PRINT "THIS IS A MULTIPLE-CHOICE QUIZ." +120 PRINT "TYPE A 1, 2, 3, OR 4 AFTER THE QUESTION MARK." +130 PRINT: PRINT "GOOD LUCK!": PRINT: PRINT +200 PRINT "IN PINOCCHIO, WHAT WAS THE NAME OF THE CAT" +210 PRINT "1)TIGGER, 2)CICERO, 3)FIGARO, 4)GUIPETTO"; +220 INPUT A +230 IF A=3 THEN R=R+1: PRINT "VERY GOOD! HERE'S ANOTHER." +240 ELSE PRINT "SORRY...FIGARO WAS HIS NAME." +250 PRINT +260 PRINT "FROM WHOSE GARDEN DID BUGS BUNNY STEAL THE CARROTS?" +270 PRINT "1)MR. NIXON'S, 2)ELMER FUDD'S, 3)CLEM JUDD'S, 4)STROMBOLI'S"; +280 INPUT A +290 IF A=2 THEN R=R+1: PRINT "PRETTY GOOD!" +300 ELSE PRINT "TOO BAD...IT WAS ELMER FUDD'S GARDEN." +310 PRINT +320 PRINT "IN THE WIZARD OF OS, DOROTHY'S DOG WAS NAMED" +330 PRINT "1)CICERO, 2)TRIXIA, 3)KING, 4)TOTO"; +340 INPUT A +350 IF A=4 THEN R=R+1: PRINT "YEA! YOU'RE A REAL LITERATURE GIANT." +360 ELSE PRINT "BACK TO THE BOOKS,...TOTO WAS HIS NAME." +380 PRINT +390 PRINT "WHO WAS THE FAIR MAIDEN WHO ATE THE POISON APPLE" +400 PRINT "1)SLEEPING BEAUTY, 2)CINDERELLA, 3)SNOW WHITE, 4)WENDY"; +410 INPUT A +420 IF A=3 THEN R=R+1: PRINT "GOOD MEMORY!" +430 ELSE PRINT "OH, COME ON NOW...IT WAS SNOW WHITE." +440 PRINT +500 ON R+1 GOSUB 900, 900, 900, 700, 800 +510 END +700 PRINT "NOT BAD, BUT YOU MIGHT SPEND A LITTLE MORE TIME" +710 PRINT "READING THE NURSERY GREATS." +720 RETURN +800 PRINT "WOW! THAT'S SUPER! YOU REALLY KNOW YOUR NURSERY" +810 PRINT "YOUR NEXT QUIZ WILL BE ON 2ND CENTURY CHINESE" +820 PRINT "LITERATURE (HA, HA, HA)" +830 RETURN +900 PRINT "UGH. THAT WAS DEFINITELY NOT TOO SWIFT. BACK TO" +910 PRINT "NURSERY SCHOOL FOR YOU, MY FRIEND." +920 RETURN + + + diff --git a/data/examples/14games/love.bas b/data/examples/14games/love.bas new file mode 100644 index 0000000000000000000000000000000000000000..dd834c8eda87d265b16a55e0dd92337f132cf9b7 --- /dev/null +++ b/data/examples/14games/love.bas @@ -0,0 +1,36 @@ +10 REM "LOVE from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 DIM T(120) +100 PRINT "A TRIBUTE TO THE GREAT AMERICAN ARTIST, ROBERT INDIANA." +110 PRINT "HIS GREATEST WORK WILL BE REPRODUCED WITH A MESSAGE OF" +120 PRINT "YOUR CHOICE UP TO 32 CHARACTERS. IF YOU CAN'T THINK OF" +130 PRINT "A MESSAGE, SIMPLE TYPE THE WORD 'LOVE'": PRINT +200 INPUT "YOUR MESSAGE, PLEASE? ";A$: L=LEN(A$) +210 FOR J=0 TO INT(60/L) +220 FOR I=1 TO L +230 T(J*L+I)=A$(I,I+1) +240 NEXT I +250 NEXT J +260 C=0 +300 A1=1: P=1: C=C+1: IF C=37 THEN 900 +310 PRINT +320 READ A: A1=A1+A: IF P=1 THEN 400 +330 FOR I=1 TO A: PUT " ": NEXT I: P=1: GOTO 500 +400 FOR I=A1-A TO A1-1: PUT T(I): NEXT I: P=0 +500 IF A1>60 THEN 300 +510 GOTO 320 +600 DATA 60,1,12,26,9,12,3,8,24,17,8,4,6,23,21,6,4,6,22,12,5,6,5 +610 DATA 4,6,21,11,8,6,4,4,6,21,10,10,5,4,4,6,21,9,11,5,4 +620 DATA 4,6,21,8,11,6,4,4,6,21,7,11,7,4,4,6,21,6,11,8,4 +630 DATA 4,6,19,1,1,5,11,9,4,4,6,19,1,1,5,10,10,4,4,6,18,2,1,6,8,11,4 +640 DATA 4,6,17,3,1,7,5,13,4,4,6,15,5,2,23,5,1,29,5,17,8 +650 DATA 1,29,9,9,12,1,13,5,40,1,1,13,5,40,1,4,6,13,3,10,6,12,5,1 +660 DATA 5,6,11,3,11,6,14,3,1,5,6,11,3,11,6,15,2,1 +670 DATA 6,6,9,3,12,6,16,1,1,6,6,9,3,12,6,7,1,10 +680 DATA 7,6,7,3,13,6,6,2,10,7,6,7,3,13,14,10,8,6,5,3,14,6,6,2,10 +690 DATA 8,6,5,3,14,6,7,1,10,9,6,3,3,15,6,16,1,1 +700 DATA 9,6,3,3,15,6,15,2,1,10,6,1,3,16,6,14,3,1,10,10,16,6,12,5,1 +710 DATA 11,8,13,27,1,11,8,13,27,1,60 +900 PRINT +910 END diff --git a/data/examples/14games/lunar.bas b/data/examples/14games/lunar.bas new file mode 100644 index 0000000000000000000000000000000000000000..1d709977145a1c4142b2b13651e651401b803ff5 --- /dev/null +++ b/data/examples/14games/lunar.bas @@ -0,0 +1,50 @@ +10 REM "LUNAR from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +25 REM +27 IF NOT USR(0,3) THEN PRINT "THIS PROGRAM NEEDS FLOAT": END +30 PRINT "THIS IS A COMPUTER SIMULATION OF AN APOLLO LUNAR" +40 PRINT "LANDING CAPSULE.": PRINT: PRINT +50 PRINT "THE ON-BOARD COMPUTER HAS FAILED (IT WAS MADE BY" +60 PRINT "XEROX) SO YOU HAVE TO LAND THE CAPSULE MANUALLY." +70 PRINT: PRINT "SET BURN RATE OF RETRO ROCKETS TO ANY VALUE BETWEEN" +80 PRINT "0 (FREE FALL) AND 200 (MAXIMUM BURN) POUNDS PER SECOND." +90 PRINT "SET NEW BURN RATE EVERY 10 SECONDS.": PRINT +100 PRINT "CAPSULE WEIGHT 32,500 LBS; FUEL WEIGHT 16,500 LBS." +110 PRINT: PRINT: PRINT: PRINT "GOOD LUCK" +120 L=0 +130 PRINT: PRINT "SEC ","MI+FT ","MPH ","LB-FUEL","BURN-RATE":PRINT +140 A=120:V=1:M=33000:N=16500:G=1E-03:Z=1.8 +150 PRINT #4;L,#3;INT(A);"+";#4;INT(5280*(A-INT(A))),#7, 3600*V,#6,M-N; +155 INPUT K:T=10 +160 IF M-N<1E-03 THEN 240 +170 IF T<1E-03 THEN 150 +180 S=T: IF M>=N+S*K THEN 200 +190 S=(M-N)/K +200 GOSUB 420: IF I<=O THEN 340 +210 IF V<=0 THEN 230 +220 IF J<0 THEN 370 +230 GOSUB 330: GOTO 160 +240 PRINT "FUEL OUT AT",L,"SECONDS":S=(-V+SQR(V*V+2*A*G))/G +250 V=V+G*S: L=L+S +260 W=3600*V: PRINT "ON MOON AT",L,"SECONDS - IMPACT VELOCITY",W,"MPH" +274 IF W<=1.2 THEN PRINT "PERFECT LANDING!": GOTO 440 +280 IF W<=10 THEN PRINT "GOOD LANDING (COULD RE BETTER)":GOTO 440 +282 IF W>60 THEN 300 +284 PRINT "CRAFT DAMAGE... YOU'RE STRANDED HERE UNTIL A RESCUE" +286 PRINT "PARTY ARRIVES. HOPE YOU HAVE ENOUGH OXYGEN!" +288 GOTO 440 +300 PRINT "SORRY THERE WHERE NO SURVIVORS. YOU BLEW IT!" +310 PRINT "IN FACT, YOU BLASTED A NEW LUNAR CRATER",W*0.227,"FEET DEEP!" +320 GOTO 440 +330 L=L+S: T=T-S: M=M-S*K: A=I: V=J: RETURN +340 IF S<5E-03 THEN 260 +350 D=V+SQR(V*V+2*A*(G-Z*K/M)):S=2*A/D +360 GOSUB 420: GOSUB 330: GOTO 340 +370 W=(1-M*G/(Z*K))/2: S=M*V/(Z*K*(W+SQR(W*W+V/Z)))+0.05:GOSUB 420 +380 IF I<=0 THEN 340 +390 GOSUB 330: IF J>0 THEN 160 +400 IF V>0 THEN 370 +410 GOTO 160 +420 Q=S*K/M: J=V+G*S+Z*(-Q-Q*Q/2-POW(Q,3)/3-POW(Q,4)/4-POW(Q,5)/5) +430 I=A-G*S*S/2-V*S+Z*S*(Q/2+Q*Q/6+POW(Q,3)/12+POW(Q,4)/20+POW(Q,5)/30):RETURN +440 PRINT:PRINT:PRINT:PRINT "TRY AGAIN??": GOTO 70 diff --git a/data/examples/14games/mastermind.bas b/data/examples/14games/mastermind.bas new file mode 100644 index 0000000000000000000000000000000000000000..c21db74c8ec11e25d6f0147b66ae9a3200af1199 --- /dev/null +++ b/data/examples/14games/mastermind.bas @@ -0,0 +1,232 @@ +2 REM "MASTERMIND" +4 REM "Ported by Stefan 2022" +8 SET 11, 1: REM "Set the TAB command to MS mode" +10 REM +20 REM "MASTERMIND II" +30 REM "STEVE NORTH" +40 REM "CREATIVE COMPUTING" +50 REM "PO BOX 789-M MORRISTOWN NEW JERSEY 07960" +60 REM +70 REM +80 INPUT "NUMBER OF COLORS? ";C9 +90 IF C9>8 THEN PRINT "NO MORE THAN 8, PLEASE!":GOTO 80 +100 INPUT "NUMBER OF POSITIONS? ";P9 +110 INPUT "NUMBER OF ROUNDS? ";R9 +120 P=POW(C9,P9) +130 PRINT "TOTAL POSSIBILITIES = ";P +140 H=0:C=0 +150 DIM Q(P9),S(10,2),S$(32,10),A$(32,P9),G$(32,P9),I(P),H$(32,P9) +160 L$="BWRGOYPT" +170 PRINT +180 PRINT +190 PRINT "COLOR LETTER" +200 PRINT "===== ======" +210 FOR X=1 TO C9 +220 READ X$ +230 PRINT X$;: TAB 13: PRINT L$(X,X) +240 NEXT X +250 PRINT +260 FOR R=1 TO R9 +270 PRINT +280 PRINT "ROUND NUMBER";R;"----" +290 PRINT +300 PRINT "GUESS MY COMBINATION.":PRINT +310 REM "GET A COMBINATION" +320 A=INT(P*RND(1)+1) +330 GOSUB 3000 +340 FOR X=1 TO A +350 GOSUB 3500 +360 NEXT X +370 FOR M=1 TO 10 +380 PRINT "MOVE # ";M;" GUESS ";:INPUT X$ +390 IF X$="BOARD" THEN 2000 +400 IF X$="QUIT" THEN 2500 +410 IF LEN(X$)<>P9 THEN PRINT "BAD NUMBER OF POSITIONS.":GOTO 380 +420 REM "UNPACK X$ INTO G$(1-P9)" +430 FOR X=1 TO P9 +440 FOR Y=1 TO C9 +450 IF X$(X,X)=L$(Y,Y) THEN 480 +460 NEXT Y +470 PRINT "'"; X$(X,X); "' IS UNRECOGNIZED.":GOTO 380 +480 G$()(X)=X$(X,X) +490 NEXT X +500 REM "NOW WE CONVERT Q(1-P9) INTO A$(1-P9) [ACTUAL GUESS]" +510 GOSUB 4000 +520 REM "AND GET NUMBER OF BLACKS AND WHITES" +530 GOSUB 4500 +540 IF B=P9 THEN 630 +550 REM "TELL HUMAN RESULTS" +560 PRINT "YOU HAVE ";B;" BLACKS AND ";W;" WHITES." +570 REM SAVE ALL THIS STUFF FOR BOARD PRINTOUT LATER +580 S$()(M)=X$ +590 S(M,1)=B +600 S(M,2)=W +610 NEXT M +620 PRINT "YOU RAN OUT OF MOVES! THAT'S ALL YOU GET!":GOTO 640 +622 GOSUB 4000 +623 PRINT "THE ACTUAL COMBINATION WAS: "; +624 FOR X=1 TO P9 +625 PRINT A$()(X); +626 NEXT X +627 PRINT +630 PRINT "YOU GUESSED IT IN ";M;" MOVES!" +640 H=H+M +650 GOSUB 5000 +660 REM +670 REM "NOW COMPUTER GUESSES" +680 REM +690 FOR X=1 TO P +700 I(X)=1 +710 NEXT X +720 PRINT "NOW I GUESS. THINK OF A COMBINATION." +730 INPUT "HIT RETURN WHEN READY:";X$ +740 FOR M=1 TO 10 +750 GOSUB 3000 +760 REM "FIND A GUESS" +770 G=INT(P*RND(1)+1) +780 IF I(G)=1 THEN 890 +790 FOR X=G TO P +800 IF I(X)=1 THEN 880 +810 NEXT X +820 FOR X=1 TO G +830 IF I(X)=1 THEN 880 +840 NEXT X +850 PRINT "YOU HAVE GIVEN ME INCONSISTENT INFORMATION." +860 PRINT "TRY AGAIN, AND THIS TIME PLEASE BE MORE CAREFUL." +870 GOTO 660 +880 G=X +890 REM "NOW WE CONVERT GUESS #G INTO G$" +900 FOR X=1 TO G +910 GOSUB 3500 +920 NEXT X +930 GOSUB 6000 +940 PRINT "MY GUESS IS: "; +950 FOR X=1 TO P9 +960 PRINT H$()(X); +970 NEXT X +980 INPUT " BLACKS, WHITES ";B1,W1 +990 IF B1=P9 THEN 1120 +1000 GOSUB 3000 +1010 FOR X=1 TO P +1020 GOSUB 3500 +1030 IF I(X)=0 THEN 1070 +1035 GOSUB 6500 +1040 GOSUB 4000 +1050 GOSUB 4500 +1060 IF B1<>B OR W1<>W THEN I(X)=0 +1070 NEXT X +1080 NEXT M +1090 PRINT "I USED UP ALL MY MOVES!" +1100 PRINT "I GUESS MY CPU IS JUST HAVING AN OFF DAY." +1110 GOTO 1130 +1120 PRINT "I GOT IT IN ";M;" MOVES!" +1130 C=C+M +1140 GOSUB 5000 +1150 NEXT R +1160 PRINT "GAME OVER" +1170 PRINT "FINAL SCORE:" +1180 GOSUB 5040 +1190 STOP +2000 REM +2010 REM "BOARD PRINTOUT ROUTINE" +2020 REM +2025 PRINT +2030 PRINT "BOARD" +2040 PRINT "MOVE GUESS BLACK WHITE" +2050 FOR Z=1 TO M-1 +2060 PRINT Z;: TAB 9: PRINT S$()(Z);: TAB 25: PRINT S(Z,1);: TAB 35: PRINT S(Z,2) +2070 NEXT Z +2075 PRINT +2080 GOTO 380 +2500 REM +2510 REM "QUIT ROUTINE" +2520 REM +2530 PRINT "QUITTER! MY COMBINATION WAS: "; +2535 GOSUB 4000 +2540 FOR X=1 TO P9 +2550 PRINT A$()(X); +2560 NEXT X +2565 PRINT +2570 PRINT "GOOD BYE" +2580 STOP +3000 REM +3010 REM "INITIALIZE Q(1-P9) TO ZEROS" +3020 REM +3030 FOR S=1 TO P9 +3040 Q(S)=0 +3050 NEXT S +3060 RETURN +3500 REM +3510 REM "INCREMENT Q(1-P9)" +3520 REM +3522 IF Q(1)>0 THEN 3530 +3524 REM IF ZERO, THIS IS OUR FIRST INCREMENT: MAKE ALL ONES +3526 FOR S=1 TO P9 +3527 Q(S)=1 +3528 NEXT S +3529 RETURN +3530 Q=1 +3540 Q(Q)=Q(Q)+1 +3550 IF Q(Q)<=C9 THEN RETURN +3560 Q(Q)=1 +3570 Q=Q+1 +3580 GOTO 3540 +4000 REM +4010 REM "CONVERT Q(1-P9) TO A$(1-P9)" +4020 REM +4030 FOR S=1 TO P9 +4040 A$(S)=L$(Q(S),Q(S)) +4050 NEXT S +4060 RETURN +4500 REM +4510 REM "GET NUMBER OF BLACKS (B) AND WHITES (W)" +4520 REM "MASHES G$ AND A$ IN THE PROCESS" +4530 REM +4540 B=0:W=0:F=0 +4550 FOR S=1 TO P9 +4560 IF G$()(S)<>A$()(S) THEN 4620 +4570 B=B+1 +4580 G$()(S)=F +4590 A$()(S)=F+1 +4600 F=F+2 +4610 GOTO 4660 +4620 FOR T=1 TO P9 +4630 IF G$()(S)<>A$()(T) THEN 4650 +4640 IF G$()(T)=A$()(T) THEN 4650 +4645 W=W+1:A$()(T)=F:G$()(S)=F+1:F=F+2:GOTO 4660 +4650 NEXT T +4660 NEXT S +4670 RETURN +5000 REM +5010 REM "PRINT SCORE" +5020 REM +5030 PRINT "SCORE:" +5040 PRINT " COMPUTER ";C +5050 PRINT " HUMAN ";H +5060 PRINT +5070 RETURN +5500 REM +5510 REM "CONVERT Q(1-P9) INTO G$(1-P9)"" +5520 REM +5530 FOR S=1 TO P9 +5540 G$()(S)=L$(Q(S),Q(S)) +5550 NEXT S +5560 RETURN +6000 REM +6010 REM "CONVERT Q(1-P9) TO H$(1-P9)"" +6020 REM +6030 FOR S=1 TO P9 +6040 H$(S)=L$(Q(S),Q(S)) +6050 NEXT S +6060 RETURN +6500 REM +6510 REM "COPY H$ INTO G$"" +6520 REM +6530 FOR S=1 TO P9 +6540 G$()(S)=H$()(S) +6550 NEXT S +6560 RETURN +8000 REM "PROGRAM DATA FOR COLOR NAMES" +8010 DATA "BLACK", "WHITE", "RED", "GREEN", "ORANGE", "YELLOW", "PURPLE", "TAN" +9998 REM "...WE'RE SORRY BUT IT'S TIME TO GO..." +9999 END diff --git a/data/examples/14games/mathdice.bas b/data/examples/14games/mathdice.bas new file mode 100644 index 0000000000000000000000000000000000000000..a68e2475dbf2627043e29871374691e70eb9df5b --- /dev/null +++ b/data/examples/14games/mathdice.bas @@ -0,0 +1,65 @@ +10 REM "MATH DICE from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM "E counts the errors , R the response time" +40 E=0 +50 R=0 +60 C=0 +100 PRINT "THIS PROGRAM GENERATES SUCCESIVE PICTURES OF TWO DICE." +110 PRINT "WHEN TWO DICE AND AN EQUAL SIGN FOLLOWED BY A QUESTION" +120 PRINT "MARK HAVE BEEN PRINTED, TYPE YOUR ANSWER AND THE RETURN KEY." +130 PRINT "TO CONCLUDE THE LESSON, TYPE # AS YOUR ANSWER." +140 PRINT +160 @R=MILLIS(1) +200 REM "loop() the main loop" +210 N=N+1 +220 D=INT(6*RND(1)+1) +230 PRINT" ----- " +240 REM "First row" +250 IF D=1 THEN PRINT "I I" : GOTO 300 +260 IF D=2 OR D=3 THEN PRINT "I * I": GOTO 300 +270 PRINT "I * * I" +300 REM "Second row" +310 IF D=2 OR D=4 THEN PRINT "I I": GOTO 400 +320 IF D=6 THEN PRINT "I * * I": GOTO 400 +330 PRINT "I * I" +400 REM "Third row" +410 IF D=1 THEN PRINT "I I": GOTO 500 +420 IF D=2 OR D=3 THEN PRINT "I * I": GOTO 500 +430 PRINT "I * * I" +500 PRINT " ----- " +510 PRINT +520 IF N=2 THEN 600 +530 PRINT " +" +540 PRINT +550 A=D +560 GOTO 200 +600 REM "The math" +610 T=D+A +620 PRINT " ="; +630 S0=MILLIS(100) +640 INPUT T1 +650 IF T1=0 THEN 900 +660 IF T1=T THEN 800 +670 PRINT "NO, COUNT THE SPOTS AND GIVE ANOTHER ANSWER." +680 PRINT " ="; +700 INPUT T2 +710 IF T2=0 THEN 900 +720 IF T2=T THEN 800 +730 PRINT "NO, THE ANSWER IS",T +740 E=E+1 +750 GOTO 820 +800 PRINT "RIGHT!" +810 S1=MILLIS(100) +820 PRINT "REPLY TIME: "; INT((S1-S0)/10);"."; INT(S1-S0)%10;" SECONDS" +830 R=R+(S1-S0) +840 PRINT +850 PRINT "THE DICE ROLL AGAIN..." +860 PRINT +870 N=0: C=C+1 +880 GOTO 200 +900 REM "Report response times" +910 IF C=0 THEN END +920 PRINT "TRIES: "; C +930 PRINT "AVERAGE RESPONSE TIME: "; INT(R/C/10); "."; INT(R/C)%10, "SECONDS" +940 PRINT "ERRORS: "; E +950 END diff --git a/data/examples/14games/mkbuildin.bas b/data/examples/14games/mkbuildin.bas new file mode 100644 index 0000000000000000000000000000000000000000..89e0dbfbb728534f8061e5fe09e22cb8d48126f1 --- /dev/null +++ b/data/examples/14games/mkbuildin.bas @@ -0,0 +1,51 @@ +10 REM "This program created a buildin.h file to be compiled into BASIC" +20 DIM NA$(32,20), A$(128), B$(128) +30 N=0 +40 P$="*" +50 OPEN "buildin.h", 1 +1000 REM "Build the file list" +1010 FOR N=1 +1020 READ N$ +1030 IF (N$)=0 THEN BREAK +1040 PRINT "File: ", N$ +1050 NA$()(N)=N$ +1060 NEXT +1070 N=N-1 +1080 PRINT "Processing",N,"files" +1100 REM "Create the structures" +1110 FOR I=1 TO N +1120 @S=0: N$=NA$()(I) +1130 OPEN N$ +1140 IF @S<>0 THEN PRINT "File error in", N$: END +1200 REM "Process one file" +1210 PRINT &16,"const char buildin_pgm";I;"[] PROGMEM = {" +1220 FOR J=1 +1230 INPUT &16, A$ +1240 IF @S=-1 THEN BREAK +1250 IF A$="" THEN CONT +1260 B$="" +1300 FOR K=1 TO LEN(A$) +1310 IF A$(K,K)='"' THEN B$=B$+'\"' ELSE B$=B$+A$(K,K) +1320 NEXT +1330 PRINT &16, '"';B$;'\n"' +1400 NEXT +1410 PRINT &16, '"\f"' +1420 PRINT &16,"};" +1430 PRINT &16, "const char buildin_pgm";I;"_name[] PROGMEM = ";'"';P$;N$;'";' +1600 NEXT +1700 PRINT &16, "const char* const buildin_programs[] PROGMEM = {" +1710 FOR I=1 TO N +1720 PRINT &16, "buildin_pgm";I;"," +1730 NEXT I +1740 PRINT &16, "0" +1750 PRINT &16, "};" +1800 PRINT &16, "const char* const buildin_program_names[] PROGMEM = {" +1810 FOR I=1 TO N +1820 PRINT &16, "buildin_pgm";I;"_name," +1830 NEXT I +1840 PRINT &16, "0" +1850 PRINT &16, "};" +10000 REM "The programs to be included into the buildin.h +10030 DATA "tictac.bas", "rocket.bas", "nim.bas" +10100 DATA 0 + diff --git a/data/examples/14games/mugwump.bas b/data/examples/14games/mugwump.bas new file mode 100644 index 0000000000000000000000000000000000000000..56e3f640af74a7d840d3695a9bfdf9def821f4ce --- /dev/null +++ b/data/examples/14games/mugwump.bas @@ -0,0 +1,48 @@ +10 REM "MUGWUMP from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 DIM P(4*2) +50 @R=MILLIS(1) +60 DEF FND(I)=SQR(POW(P(I)-M, 2)+POW(P(I+4)-N,2)) +100 PRINT "THE OBJECT OF THIS GAME IS TO FIND FOUR MUGWUMPS" +110 PRINT "HIDDEN ON A 10 BY 10 GRID. HOMEBASE IS POSITION 0,0." +120 PRINT "ANY GUESS YOU MAKE MUST BE TWO NUMBERS WITH EACH" +130 PRINT "NUMBER BETWEEN 0 AND 9, INCLUSIVE. FIRST NUMBER" +140 PRINT "IS DISTANCE TO RIGHT OF HOMEBASE AND SECOND NUMBER" +150 PRINT "IS DISTANCE ABOVE HOMEBASE.": PRINT +160 PRINT "YOU GET 10 TRIES. AFTER EACH TRY, I WILL TELL" +170 PRINT "YOU HOW FAR YOU ARE FROM EACH MUGWUMP." +180 PRINT +190 GOSUB 1000 +200 FOR T=1 TO 10 +210 PRINT +220 PRINT "TURN NO.",T,"-- WHAT IS YOUR GUESS" +230 INPUT "X: ",M +240 INPUT "Y: ", N +300 FOR I=1 TO 4 +320 IF P(I)=-1 THEN CONT +330 IF P(I)=M AND P(I+4)=N THEN P(I)=-1: PRINT "YOU HAVE FOUND MUGWUMP",I +340 ELSE D=INT(FND(I)*10)/10: PRINT "YOU ARE",D ,"UNITS FROM MUGWUMP",I +400 NEXT I +410 FOR J=1 TO 4 +420 IF P(J)<>-1 THEN BREAK +430 NEXT J +440 IF J=5 THEN PRINT "YOU GOT THEM ALL IN",T,"TURNS!": BREAK +470 NEXT T +480 IF T<11 THEN 600 +490 PRINT "SORRY, THAT'S 10 TRIES. HERE IS WHERE THEY'RE HIDING:" +500 FOR I=1 TO 4 +510 IF P(I)=-1 THEN CONT +520 PRINT "MUGWUMP",I,"IS AT (",P(I),",",P(I+4),")" +530 NEXT I +600 PRINT "THAT WAS FUN! LET'S PLAY AGAIN......." +610 PRINT "FOUR MORE MUGWUMPS ARE NOW IN HIDING." +620 GOTO 190 +630 END +1000 FOR J=1 TO 2 +1010 FOR I=1 TO 4 +1020 P(I+(J-1)*4)=INT(RND(10)) +1030 NEXT I +1040 NEXT J +1050 RETURN +1099 END diff --git a/data/examples/14games/nicomach.bas b/data/examples/14games/nicomach.bas new file mode 100644 index 0000000000000000000000000000000000000000..8e83d4ad06ddc8419bf269bfe124d95592cca3c7 --- /dev/null +++ b/data/examples/14games/nicomach.bas @@ -0,0 +1,29 @@ +10 REM "NICOMA from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +100 PRINT "BOOMERANG PUZZLE FROM ARITHMETICA OF NICOMACHUS -- A.D. 90!" +110 PRINT +200 FOR I +210 PRINT "PLEASE THINK OF A NUMBER BETWEEN 1 AND 100." +220 PRINT "YOUR NUMBER DIVIDED BY 3 HAS A REMAINDER OF "; +230 INPUT A +240 PRINT "YOUR NUMBER DIVIDED BY 5 HAS A REMAINDER OF "; +250 INPUT B +260 PRINT "YOUR NUMBER DIVIDED BY 7 HAS A REMAINDER OF "; +270 INPUT C +280 PRINT +290 PRINT "LET ME THINK A MOMENT..." +300 PRINT +310 DELAY 1000 +320 D=70*INT(A)+21*INT(B)+15*INT(C) +330 IF D>105 THEN D=D-105: GOTO 330 +340 PRINT "YOUR NUMBER WAS",D,", RIGHT"; +350 INPUT A$ +360 IF A$="YES" OR A$="yes" THEN PRINT "HOW ABOUT THAT!!": GOTO 500 +370 IF A$="NO" OR A$="no" THEN PRINT "I FEEL YOUR ARITHMETIC IS IN ERROR.": GOTO 500 +380 IF A$="END" OR A$="end" THEN END +390 PRINT "I DON'T UNDERSTAND '",A$,"' TRY 'YES', 'NO' OR 'END'." +400 GOTO 350 +500 PRINT "LET'S TRY ANOTHER." +510 NEXT +900 END diff --git a/data/examples/14games/nim.bas b/data/examples/14games/nim.bas new file mode 100644 index 0000000000000000000000000000000000000000..44a3522b91e36c2f0521891fa6435c1c600bb2be --- /dev/null +++ b/data/examples/14games/nim.bas @@ -0,0 +1,156 @@ +100 REM "NIM" +110 REM "Ported by Stefan in 2022" +120 REM +210 DIM A(100),B(100,11),D(2) +220 PRINT "THIS IS THE GAME OF NIM." +230 PRINT "DO YOU WANT INSTRUCTIONS"; +240 INPUT Z$ +250 IF Z$="NO" THEN 440 +260 IF Z$="no" THEN 440 +270 IF Z$="YES" THEN 310 +280 IF Z$="yes" THEN 310 +290 PRINT "PLEASE ANSWER YES OR NO" +300 GOTO 240 +310 PRINT "THE GAME IS PLAYED WITH A NUMBER OF PILES OF OBJECTS." +320 PRINT "ANY NUMBER OF OBJECTS ARE REMOVED FROM ONE PILE BY YOU AND" +330 PRINT "THE MACHINE ALTERNATELY. ON YOUR TURN, YOU MAY TAKE" +340 PRINT "ALL THE OBJECTS THAT REMAIN IN ANY PILE, BUT YOU MUST" +350 PRINT "TAKE AT LEAST ONE OBJECT, AND YOU MAY TAKE OBJECTS FROM" +360 PRINT "ONLY ONE PILE ON A SINGLE TURN. YOU MUST SPECIFY WHETHER" +370 PRINT "WINNING IS DEFINED AS TAKING OR NOT TAKING THE LAST OBJECT," +380 PRINT "THE NUMBER OF PILES IN THE GAME, AND HOW MANY OBJECTS ARE" +390 PRINT "ORIGINALLY IN EACH PILE. EACH PILE MAY CONTAIN A" +400 PRINT "DIFFERENT NUMBER OF OBJECTS." +410 PRINT "THE MACHINE WILL SHOW ITS MOVE BY LISTING EACH PILE AND THE" +420 PRINT "NUMBER OF OBJECTS REMAINING IN THE PILES AFTER EACH OF ITS" +430 PRINT "MOVES." +440 PRINT +450 PRINT "ENTER WIN OPTION - 1 TO TAKE LAST, 2 TO AVOID LAST"; +460 INPUT W +470 IF W=1 THEN 490 +480 IF W<>2 THEN 450 +490 PRINT "ENTER NUMBER OF PILES"; +500 INPUT N +510 IF N>100 THEN 490 +520 IF N<1 THEN 490 +530 IF N<>INT(N) THEN 490 +540 PRINT "ENTER PILE SIZES" +550 FOR I=1 TO N +560 PRINT I; +570 INPUT A(I) +580 IF A(I)>2000 THEN 560 +590 IF A(I)<1 THEN 560 +600 IF A(I)<>INT(A(I)) THEN 560 +610 NEXT I +620 PRINT "DO YOU WANT TO MOVE FIRST"; +630 INPUT Q9$ +640 IF Q9$="YES" THEN 1450 +650 IF Q9$="yes" THEN 1450 +660 IF Q9$="NO" THEN 700 +670 IF Q9$="no" THEN 700 +680 PRINT "PLEASE ANSWER YES OR NO." +690 GOTO 630 +700 IF W=1 THEN 940 +710 LET C=0 +720 FOR I=1 TO N +730 IF A(I)=0 THEN 770 +740 LET C=C+1 +750 IF C=3 THEN 840 +760 LET D(C)=I +770 NEXT I +780 IF C=2 THEN 920 +790 IF A(D(1))>1 THEN 820 +800 PRINT "MACHINE LOSES" +810 GOTO 1640 +820 PRINT "MACHINE WINS" +830 GOTO 1640 +840 LET C=0 +850 FOR I=1 TO N +860 IF A(I)>1 THEN 940 +870 IF A(I)=0 THEN 890 +880 LET C=C+1 +890 NEXT I +900 IF C/2<>INT(C/2) THEN 800 +910 GOTO 940 +920 IF A(D(1))=1 THEN 820 +930 IF A(D(2))=1 THEN 820 +940 FOR I=1 TO N +950 LET E=A(I) +960 FOR J=0 TO 10 +970 LET F=E/2 +980 LET B(I,J+1)=2*(F-INT(F)) +990 LET E=INT(F) +1000 NEXT J +1010 NEXT I +1020 FOR J=10 TO 0 STEP -1 +1030 LET C=0 +1040 LET H=0 +1050 FOR I=1 TO N +1060 IF B(I,J+1)=0 THEN 1110 +1070 LET C=C+1 +1080 IF A(I)<=H THEN 1110 +1090 LET H=A(I) +1100 LET G=I +1110 NEXT I +1120 IF C/2<>INT(C/2) THEN 1190 +1130 NEXT J +1140 LET E=INT(N*RND(1)+1) +1150 IF A(E)=0 THEN 1140 +1160 LET F=INT(A(E)*RND(1)+1) +1170 LET A(E)=A(E)-F +1180 GOTO 1380 +1190 LET A(G)=0 +1200 FOR J=0 TO 10 +1210 LET B(G,J+1)=0 +1220 LET C=0 +1230 FOR I=1 TO N +1240 IF B(I,J+1)=0 THEN 1260 +1250 LET C=C+1 +1260 NEXT I +1270 LET A(G)=A(G)+2*(C/2-INT(C/2))*POW(2,J) +1280 NEXT J +1290 IF W=1 THEN 1380 +1300 LET C=0 +1310 FOR I=1 TO N +1320 IF A(I)>1 THEN 1380 +1330 IF A(I)=0 THEN 1350 +1340 LET C=C+1 +1350 NEXT I +1360 IF C/2<>INT(C/2) THEN 1380 +1370 LET A(G)=1-A(G) +1380 PRINT "PILE SIZE" +1390 FOR I=1 TO N +1400 PRINT #8;I,A(I) +1410 NEXT I +1420 IF W=2 THEN 1450 +1430 GOSUB 1570 +1440 IF Z=1 THEN 820 +1450 PRINT "YOUR MOVE - PILE, NUMBER TO BE REMOVED"; +1460 INPUT X,Y +1470 IF X>N THEN 1450 +1480 IF X<1 THEN 1450 +1490 IF X<>INT(X) THEN 1450 +1500 IF Y>A(X) THEN 1450 +1510 IF Y<1 THEN 1450 +1520 IF Y<>INT(Y) THEN 1450 +1530 LET A(X)=A(X)-Y +1540 GOSUB 1570 +1550 IF Z=1 THEN 800 +1560 GOTO 700 +1570 LET Z=0 +1580 FOR I=1 TO N +1590 IF A(I)=0 THEN 1610 +1600 RETURN +1610 NEXT I +1620 LET Z=1 +1630 RETURN +1640 PRINT "DO YOU WANT TO PLAY ANOTHER GAME"; +1650 INPUT Q9$ +1660 IF Q9$="YES" THEN 1720 +1670 IF Q9$="yes" THEN 1720 +1680 IF Q9$="NO" THEN 1730 +1690 IF Q9$="no" THEN 1730 +1700 PRINT "PLEASE. YES OR NO." +1710 GOTO 1650 +1720 GOTO 440 +1730 END diff --git a/data/examples/14games/number.bas b/data/examples/14games/number.bas new file mode 100644 index 0000000000000000000000000000000000000000..0d57de086503d08887b7737cd225e70791b5678d --- /dev/null +++ b/data/examples/14games/number.bas @@ -0,0 +1,39 @@ +10 REM "NUMBER from 101 BASIC games" +20 REM "Ported to Stefan's BASIC 2021" +100 PRINT "THE NUMBER GUESSING GAME" +110 PRINT "YOU HAVE 100 POINTS. BY GUESSING NUMBERS FROM 1 TO 5, YOU" +120 PRINT "CAN GAIN OR LOSE POINTS DEPENDING UPON HOW CLOSE YOU GET TO" +130 PRINT "A RANDOM NUMBER SELECTED BY THE COMPUTER.": PRINT +140 PRINT "YOU OCCASIONALLY WILL GET A JACKPOT WHICH WILL DOUBLE(!)" +150 PRINT "YOUR POINT COUNT. YOU WIN WHEN YOU GET 500 POINTS." +160 PRINT +170 P=100 +180 @R=MILLIS(1) +200 REM "Main program" +210 INPUT "GUESS A NUMBER FROM 1 TO 5: ",G +220 R=INT(RND(5)+1) +230 S=INT(RND(5)+1) +240 T=INT(RND(5)+1) +250 U=INT(RND(5)+1) +260 V=INT(RND(5)+1) +270 IF G=R THEN 400 +280 IF G=S THEN 450 +290 IF G=T THEN 500 +300 IF G=U THEN 600 +310 IF G=V THEN 700 +320 IF G>5 OR G<1 GOTO 210 +400 P=P-5 +410 GOTO 800 +450 P=P+5 +460 GOTO 800 +500 P=P+P +510 PRINT "YOU HIT THE JACKPOT!!!" +520 GOTO 800 +600 P=P+1 +610 GOTO 800 +700 P=P-P/2 +800 IF P>500 THEN 90 +810 PRINT "YOU HAVE", P, "POINTS.":PRINT +820 GOTO 200 +900 PRINT "!!!!YOU WIN!!!! WITH ", P, "POINTS." +910 END diff --git a/data/examples/14games/onecheck.bas b/data/examples/14games/onecheck.bas new file mode 100644 index 0000000000000000000000000000000000000000..fc4145139cd99d41e08c5f25b9468214d839c4a9 --- /dev/null +++ b/data/examples/14games/onecheck.bas @@ -0,0 +1,85 @@ +2 REM "ONE CHECK" +4 REM "Ported by Stefan in 2022" +6 REM +8 DIM A(64) +10 PRINT "SOLITAIRE CHECKER PUZZLE BY DAVID AHL" +15 PRINT +20 PRINT "48 CHECKERS ARE PLACED ON THE 2 OUTSIDE SPACES OF A" +25 PRINT "STANDARD 64-SQUARE CHECKERBOARD. THE OBJECT IS TO" +30 PRINT "REMOVE AS MANY CHECKERS AS POSSIBLE BY DIAGONAL JUMPS" +35 PRINT "(AS IN STANDARD CHECKERS). USE THE NUMBERED BOARD TO" +40 PRINT "INDICATE THE SQUARE YOU WISH TO JUMP FROM AND TO. ON" +45 PRINT "THE BOARD PRINTED OUT ON EACH TURN '1' INDICATES A" +50 PRINT "CHECKER AND '0' AN EMPTY SQUARE. WHEN YOU HAVE NO" +55 PRINT "POSSIBLE JUMPS REMAINING, INPUT A '0' IN RESPONSE TO" +60 PRINT "QUESTION 'JUMP FROM ?'" +62 PRINT +63 PRINT "HERE IS THE NUMERICAL BOARD:" +66 PRINT +70 FOR J=1 TO 57 STEP 8 +74 PRINT #4;J;J+1;J+2;J+3;J+4;J+5;J+6;J+7 +76 NEXT J +77 PRINT +78 PRINT "AND HERE IS THE OPENING POSITION OF THE CHECKERS." +79 PRINT +80 FOR J=1 TO 64 +82 A(J)=1 +84 NEXT J +86 FOR J=19 TO 43 STEP 8 +88 FOR I=J TO J+3 +90 A(I)=0 +92 NEXT I +94 NEXT J +96 M=0 +98 GOTO 340 +100 INPUT "JUMP FROM ";F +105 IF F=0 THEN 500 +110 INPUT "TO ";T +112 PRINT +118 REM "*** CHECK LEGALITY OF MOVE" +120 F1=INT((F-1)/8) +130 F2=F-8*F1 +140 T1=INT((T-1)/8) +150 T2=T-8*T1 +160 IF F1>7 THEN 230 +170 IF T1>7 THEN 230 +180 IF F2>8 THEN 230 +190 IF T2>8 THEN 230 +200 IF ABS(F1-T1)<>2 THEN 230 +210 IF ABS(F2-T2)<>2 THEN 230 +212 IF A((T+F)/2)=0 THEN 230 +215 IF A(F)=0 THEN 230 +220 IF A(T)=1 THEN 230 +225 GOTO 250 +230 PRINT "ILLEGAL MOVE. TRY AGAIN..." +240 GOTO 100 +245 REM "*** UPDATE BOARD" +250 A(T)=1 +260 A(F)=0 +270 A((T+F)/2)=0 +290 M=M+1 +310 REM "*** PRINT BOARD" +340 FOR J=1 TO 57 STEP 8 +350 FOR I=J TO J+7 +360 PRINT A(I); +370 NEXT I +380 PRINT +390 NEXT J +400 PRINT +410 GOTO 100 +490 REM "*** END GAME SUMMARY" +500 S=0 +510 FOR I=1 TO 64 +520 S=S+A(I) +530 NEXT I +540 PRINT:PRINT "YOU MADE";M;"JUMPS AND HAD";S;"PIECES" +550 PRINT "REMAINING ON THE BOARD." +560 PRINT +562 INPUT "TRY AGAIN";A$ +570 IF A$="YES" OR A$="yes" THEN 70 +575 IF A$="NO" OR A$="no" THEN 600 +580 PRINT "PLEASE ANSWER 'YES' OR 'NO'." +590 GOTO 562 +600 PRINT +610 PRINT "O.K. HOPE YOU HAD FUN!!" +999 END diff --git a/data/examples/14games/orbit.bas b/data/examples/14games/orbit.bas new file mode 100644 index 0000000000000000000000000000000000000000..751c74008613e3e041a69a211d022fcbff17198f --- /dev/null +++ b/data/examples/14games/orbit.bas @@ -0,0 +1,96 @@ +2 REM "ORBIT" +4 REM "Ported by Stefan in 2022" +6 REM +10 PRINT "SOMEWHERE ABOVE YOUR PLANET IS A ROMULAN SHIP." +15 PRINT +20 PRINT "THE SHIP IS IN A CONSTANT POLAR ORBIT. ITS" +25 PRINT "DISTANCE FROM THE CENTER OF YOUR PLANET IS FROM" +30 PRINT "10,000 TO 30,000 MILES AND AT ITS PRESENT VELOCITY CAN" +31 PRINT "CIRCLE YOUR PLANET ONCE EVERY 12 TO 36 HOURS." +35 PRINT +40 PRINT "UNFORTUNATELY, THEY ARE USING A CLOAKING DEVICE SO" +45 PRINT "YOU ARE UNABLE TO SEE THEM, BUT WITH A SPECIAL" +50 PRINT "INSTRUMENT YOU CAN TELL HOW NEAR THEIR SHIP YOUR" +55 PRINT "PHOTON BOMB EXPLODED. YOU HAVE SEVEN HOURS UNTIL THEY" +60 PRINT "HAVE BUILT UP SUFFICIENT POWER IN ORDER TO ESCAPE" +65 PRINT "YOUR PLANET'S GRAVITY." +70 PRINT +75 PRINT "YOUR PLANET HAS ENOUGH POWER TO FIRE ONE BOMB AN HOUR." +80 PRINT +85 PRINT "AT THE BEGINNING OF EACH HOUR YOU WILL BE ASKED TO GIVE AN" +90 PRINT "ANGLE (BETWEEN 0 AND 360) AND A DISTANCE IN UNITS OF" +95 PRINT "100 MILES (BETWEEN 100 AND 300), AFTER WHICH YOUR BOMB'S" +100 PRINT "DISTANCE FROM THE ENEMY SHIP WILL BE GIVEN." +105 PRINT +110 PRINT "AN EXPLOSION WITHIN 5,000 MILES OF THE ROMULAN SHIP" +111 PRINT "WILL DESTROY IT." +114 PRINT +115 PRINT "BELOW IS A DIAGRAM TO HELP YOU VISUALIZE YOUR PLIGHT." +116 PRINT +117 PRINT +168 PRINT " 90" +170 PRINT " 0000000000000" +171 PRINT " 0000000000000000000" +172 PRINT " 000000 000000" +173 PRINT " 00000 00000" +174 PRINT " 00000 XXXXXXXXXXX 00000" +175 PRINT " 00000 XXXXXXXXXXXXX 00000" +176 PRINT " 0000 XXXXXXXXXXXXXXX 0000" +177 PRINT " 0000 XXXXXXXXXXXXXXXXX 0000" +178 PRINT " 0000 XXXXXXXXXXXXXXXXXXX 0000" +179 PRINT "180<== 00000 XXXXXXXXXXXXXXXXXXX 00000 ==>0" +180 PRINT " 0000 XXXXXXXXXXXXXXXXXXX 0000" +181 PRINT " 0000 XXXXXXXXXXXXXXXXX 0000" +182 PRINT " 0000 XXXXXXXXXXXXXXX 0000" +183 PRINT " 00000 XXXXXXXXXXXXX 00000" +184 PRINT " 00000 XXXXXXXXXXX 00000" +185 PRINT " 00000 00000" +186 PRINT " 000000 000000" +187 PRINT " 0000000000000000000" +188 PRINT " 0000000000000" +190 PRINT " 270" +192 PRINT +195 PRINT "X - YOUR PLANET" +196 PRINT "O - THE ORBIT OF THE ROMULAN SHIP" +197 PRINT +198 PRINT "ON THE ABOVE DIAGRAM, THE ROMULAN SHIP IS CIRCLING" +199 PRINT "COUNTERCLOCKWISE AROUND YOUR PLANET. DON'T FORGET THAT" +200 PRINT "WITHOUT SUFFICIENT POWER THE ROMULAN SHIP'S ALTITUDE" +210 PRINT "AND ORBITAL RATE WILL REMAIN CONSTANT." +220 PRINT +230 PRINT "GOOD LUCK. THE FEDERATION IS COUNTING ON YOU." +270 A=INT(360*RND(1)) +280 D=INT(200*RND(1)+200) +290 R=INT(20*RND(1)+10) +300 H=0 +310 IF H=7 THEN 490 +320 H=H+1 +325 PRINT +326 PRINT +330 PRINT "THIS IS HOUR",H;", AT WHAT ANGLE DO YOU WISH TO SEND" +335 PRINT "YOUR PHOTON BOMB"; +340 INPUT A1 +350 PRINT "HOW FAR OUT DO YOU WISH TO DETONATE IT"; +360 INPUT D1 +365 PRINT +366 PRINT +370 A=A+R +380 IF A<360 THEN 400 +390 A=A-360 +400 T=ABS(A-A1) +410 IF T<180 THEN 430 +420 T=360-T +430 C=SQR(D*D+D1*D1-2*D*D1*COS(T*3.14159/180)) +440 PRINT "YOUR PHOTON BOMB EXPLODED",C,"*10^2 MILES FROM THE" +445 PRINT "ROMULAN SHIP." +450 IF C<=50 THEN 470 +460 GOTO 310 +470 PRINT "YOU HAVE SUCCESFULLY COMPLETED YOUR MISSION." +480 GOTO 500 +490 PRINT "YOU HAVE ALLOWED THE ROMULANS TO ESCAPE." +500 PRINT "ANOTHER ROMULAN SHIP HAS GONE INTO ORBIT." +510 PRINT "DO YOU WISH TO TRY TO DESTROY IT"; +520 INPUT C$ +530 IF C$(1,1)="Y" OR C$(1,1)="y" THEN 270 +540 PRINT "GOOD BYE." +999 END diff --git a/data/examples/14games/pizza.bas b/data/examples/14games/pizza.bas new file mode 100644 index 0000000000000000000000000000000000000000..5a93ffc92961a31e6eb8926173cf149fe6b3977f --- /dev/null +++ b/data/examples/14games/pizza.bas @@ -0,0 +1,73 @@ +5 REM "PIZZA" +10 REM "Ported by Stefan in 2022" +15 REM "Using substring code" +16 @R=MILLIS(1) +17 DEF FNE(X)=(X<1) OR (X>4) +20 DIM S$(16),M$(4) +30 PRINT "PIZZA DELIVERY GAME": PRINT +50 INPUT "WHAT IS YOUR FIRST NAME? ";N$: PRINT +80 PRINT "HI, ";N$;". IN THIS GAME YOU ARE TO TAKE ORDERS" +90 PRINT "FOR PIZZAS. THEN YOU ARE TO TELL A DELIVERY BOY" +100 PRINT "WHERE TO DELIVER THE ORDERED PIZZAS.": PRINT: PRINT +150 S$="ABCDEFGHIJKLMNOP" +160 M$="1234" +230 PRINT "MAP OF THE CITY OF HYATTSVILLE": PRINT +250 PRINT " -----1-----2-----3-----4-----" +260 K=4 +270 FOR I=1 TO 4 +280 PRINT "-": PRINT "-": PRINT"-": PRINT "-" +320 PRINT M$(K,K); +330 S1=16-4*I+1 +340 PRINT " ";S$(S1,S1);" ";S$(S1+1,S1+1);" "; +345 PRINT S$(S1+2,S1+2);" "; +350 PRINT S$(S1+3,S1+3);" ";M$(K,K) +380 K=K-1 +390 NEXT I +400 PRINT "-": PRINT "-": PRINT "-": PRINT "-" +440 PRINT " -----1-----2-----3-----4-----": PRINT +460 PRINT "THE OUTPUT IS A MAP OF THE HOMES WHERE" +470 PRINT "YOU ARE TO SEND PIZZAS.": PRINT +490 PRINT "YOUR JOB IS TO GIVE A TRUCK DRIVER" +500 PRINT "THE LOCATION OR COORDINATES OF THE" +510 PRINT "HOME ORDERING THE PIZZA.": PRINT +520 INPUT "DO YOU NEED MORE DIRECTIONS? ";A$ +530 IF A$="YES" OR A$="yes" THEN 590 +540 IF A$="NO" OR A$="no" THEN 750 +550 PRINT "'YES' OR 'NO' PLEASE, NOW THEN,": GOTO 520 +590 PRINT: PRINT "SOMEBODY WILL ASK FOR A PIZZA TO BE" +600 PRINT "DELIVERED. THEN A DELIVERY BOY WILL" +610 PRINT "ASK YOU FOR THE LOCATION.":PRINT " EXAMPLE:" +620 PRINT "THIS IS J. PLEASE SEND A PIZZA." +640 PRINT "DRIVER TO ";N$;". WHERE DOES J LIVE?" +650 PRINT "YOUR ANSWER WOULD BE 2,3": PRINT +660 INPUT "UNDERSTAND? ";A$ +670 IF A$="YES" OR A$="yes" THEN 690 +680 PRINT "THIS JOB IS DEFINITELY TOO DIFFICULT FOR YOU. THANKS ANYWAY" +685 GOTO 999 +690 PRINT "GOOD. YOU ARE NOW READY TO START TAKING ORDERS.": PRINT +700 PRINT "GOOD LUCK!!": PRINT +710 T=MILLIS(1000) +750 FOR I=1 TO 5 +760 S=INT(RND(1)*16+1): PRINT +770 PRINT "HELLO ";N$;"'S PIZZA. THIS IS ";S$(S,S);"."; +775 PRINT " PLEASE SEND A PIZZA." +780 PRINT " DRIVER TO ";N$;": WHERE DOES ";S$(S,S);" LIVE"; +781 REM "How to parse a number from a stream" +783 INPUT A$ +784 IF A$="END" OR A$="end" THEN END +786 @S=0: A(1)=VAL(A$): IF @S=1 THEN 780 +789 P=INSTR(A$, ","): IF P=0 THEN 780 +792 @S=0: A(2)=VAL(A$(P+1)): IF @S=1 THEN 780 +795 IF FNE(A(1)) OR FNE(A(2)) THEN 780 +870 T=A(1)+(A(2)-1)*4 +880 IF T=S THEN 920 +890 PRINT "THIS IS ";S$(T,T);". I DID NOT ORDER A PIZZA." +900 PRINT "I LIVE AT ";A(1);",";A(2) +910 GOTO 780 +920 PRINT "HELLO "N$;". THIS IS ";S$(S,S);", THANKS FOR THE PIZZA." +930 NEXT I +935 PRINT: PRINT "5 DELIVERIES. DELIVERY TIME IN SECONDS", MILLIS(1000)-T +940 PRINT: INPUT "DO YOU WANT TO DELIVER MORE PIZZAS? ";A$ +960 IF A$="YES" OR A$="yes" THEN 750 +970 PRINT: PRINT "O.K. ";N$;", SEE YOU LATER!":PRINT +999 END diff --git a/data/examples/14games/poetry1.bas b/data/examples/14games/poetry1.bas new file mode 100644 index 0000000000000000000000000000000000000000..cebc76d6530ea6dc657b1b26a4b959bec9b8d569 --- /dev/null +++ b/data/examples/14games/poetry1.bas @@ -0,0 +1,50 @@ +10 REM "POETRY from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 @R=MILLIS(1) +90 GOTO 100+I +100 PRINT "MIDNIGHT DREARY";:GOTO 210 +101 PRINT "FIERY EYES";:GOTO 210 +102 PRINT "BIRD OR FIEND";:GOTO 210 +103 PRINT "THING OF EVIL";:GOTO 210 +104 PRINT "PROPHET";:GOTO 210 +105 REM +110 GOTO 110+I +111 PRINT "BEGUILING ME";:U=2:GOTO 210 +112 PRINT "THRILLED ME";:GOTO 210 +113 PRINT "STILL SITTING....";:GOTO 212 +114 PRINT "NEVER FLITTING";:U=2:GOTO 210 +115 PRINT "BURNED";:GOTO 210 +120 GOTO 120+I +121 PRINT "AND MY SOUL";:GOTO 210 +122 PRINT "DARKNESS THERE";:GOTO 210 +123 PRINT "SHALL BE LIFTED";:GOTO 210 +124 PRINT "QUOTH THE RAVEN";:GOTO 210 +125 IF U=0 THEN 210 +126 PRINT "SIGN OF PARTING";:GOTO 210 +130 GOTO 130+I +131 PRINT "NOTHING MORE";:GOTO 210 +132 PRINT "YET AGAIN";:GOTO 210 +133 PRINT "SLOWLY CREEPING";:GOTO 210 +134 PRINT "...EVERMORE";:GOTO 210 +135 PRINT "NEVERMORE"; +210 IF U=0 OR RND(100)>19 THEN 212 +211 PRINT ",";:U=2 +212 IF RND(100)>65 THEN 214 +213 PRINT " ";:U=U+1:GOTO 215 +214 PRINT : U=0 +215 I=INT(INT(RND(10))/2)+1 +220 J=J+1 : K=K+1 +230 IF U>0 OR INT(J/2)<>J/2 THEN 240 +235 PRINT " "; +240 IF J=1 GOTO 90 +241 IF J=2 GOTO 110 +242 IF J=3 GOTO 120 +243 IF J=4 GOTO 130 +244 IF J=5 GOTO 250 +250 J=0 : PRINT : IF K>20 THEN 270 +260 GOTO 215 +270 PRINT : U=0 : K=0 +280 INPUT "Once more? ",A$ +290 IF A$="YES" OR A$="yes" THEN 110 +999 END diff --git a/data/examples/14games/poetry2.bas b/data/examples/14games/poetry2.bas new file mode 100644 index 0000000000000000000000000000000000000000..7609f3af102a6011733a2126b50fbb3e95efba30 --- /dev/null +++ b/data/examples/14games/poetry2.bas @@ -0,0 +1,45 @@ +10 REM "POETRY from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 @R=MILLIS(1) +90 ON I GOTO 100,101,102,103,104 +100 PRINT "MIDNIGHT DREARY";:GOTO 210 +101 PRINT "FIERY EYES";:GOTO 210 +102 PRINT "BIRD OR FIEND";:GOTO 210 +103 PRINT "THING OF EVIL";:GOTO 210 +104 PRINT "PROPHET";:GOTO 210 +110 ON I GOTO 111,112,113,114,115 +111 PRINT "BEGUILING ME";:U=2:GOTO 210 +112 PRINT "THRILLED ME";:GOTO 210 +113 PRINT "STILL SITTING....";:GOTO 212 +114 PRINT "NEVER FLITTING";:U=2:GOTO 210 +115 PRINT "BURNED";:GOTO 210 +120 ON I GOTO 121,122,123,124,125 +121 PRINT "AND MY SOUL";:GOTO 210 +122 PRINT "DARKNESS THERE";:GOTO 210 +123 PRINT "SHALL BE LIFTED";:GOTO 210 +124 PRINT "QUOTH THE RAVEN";:GOTO 210 +125 IF U=0 THEN 210 +126 PRINT "SIGN OF PARTING";:GOTO 210 +130 ON I GOTO 131,132,133,134,135 +131 PRINT "NOTHING MORE";:GOTO 210 +132 PRINT "YET AGAIN";:GOTO 210 +133 PRINT "SLOWLY CREEPING";:GOTO 210 +134 PRINT "...EVERMORE";:GOTO 210 +135 PRINT "NEVERMORE"; +210 IF U=0 OR RND(100)>19 THEN 212 +211 PRINT ",";:U=2 +212 IF RND(100)>65 THEN 214 +213 PRINT " ";:U=U+1:GOTO 215 +214 PRINT : U=0 +215 I=INT(INT(10*RND(1))/2)+1 +220 J=J+1 : K=K+1 +230 IF U>0 OR INT(J/2)<>J/2 THEN 240 +235 PRINT " "; +240 ON J GOTO 90,110,120,130,250 +250 J=0 : PRINT : IF K>20 THEN 270 +260 GOTO 215 +270 PRINT : U=0 : K=0 +280 INPUT "Once more? ",A$ +290 IF A$="YES" OR A$="yes" THEN 110 +999 END diff --git a/data/examples/14games/poker.bas b/data/examples/14games/poker.bas new file mode 100644 index 0000000000000000000000000000000000000000..2f7293e3d1554d3475f33cf0ad9b4a55032bd131 --- /dev/null +++ b/data/examples/14games/poker.bas @@ -0,0 +1,417 @@ +2 REM "POKER" +4 REM "Ported by Stefan in 2022" +6 REM +8 @R=MILLIS(1) +10 DIM A(50),B(15) +20 DEF FNA(X)=INT(10*RND(1)) +30 DEF FNB(X)=X-100*INT(X/100) +40 PRINT "WELCOME TO THE CASINO. WE EACH HAVE $200." +50 PRINT "I WILL OPEN THE BETTING BEFORE THE DRAW; YOU OPEN AFTER." +60 PRINT "TO FOLD BET 0; TO CHECK BET .5." +70 PRINT "ENOUGH TALK -- LET'S GET DOWN TO BUSINESS." +80 PRINT +90 LET O=1 +100 LET C=200 +110 LET S=200 +120 LET P=0 +130 REM +140 PRINT +150 IF C<=5 THEN 3670 +160 PRINT "THE ANTE IS $5. I WILL DEAL:" +170 PRINT +180 IF S>5 THEN 200 +190 GOSUB 3830 +200 LET P=P+10 +210 LET S=S-5 +220 LET C=C-5 +230 FOR Z=1 TO 10 +240 GOSUB 1740 +250 NEXT Z +260 PRINT "YOUR HAND:" +270 N=1 +280 GOSUB 1850 +290 N=6 +300 I=2 +310 GOSUB 2170 +320 PRINT +330 IF I<>6 THEN 470 +340 IF FNA(0)<=7 THEN 370 +350 LET X=11100 +360 GOTO 420 +370 IF FNA(0)<=7 THEN 400 +380 LET X=11110 +390 GOTO 420 +400 IF FNA(0)>=1 THEN 450 +410 X=11111 +420 I=7 +430 Z=23 +440 GOTO 580 +450 Z=1 +460 GOTO 510 +470 IF U>=13 THEN 540 +480 IF FNA(0)>=2 THEN 500 +490 GOTO 420 +500 Z=0 +510 K=0 +520 PRINT "I CHECK." +530 GOTO 620 +540 IF U<=16 THEN 570 +550 Z=2 +560 IF FNA(0)>=1 THEN 580 +570 Z=35 +580 V=Z+FNA(0) +590 GOSUB 3480 +600 PRINT "I'LL OPEN WITH $"; V +610 K=V +620 GOSUB 3050 +630 GOSUB 650 +640 GOTO 820 +650 IF I<>3 THEN 760 +660 PRINT +670 PRINT "I WIN." +680 C=C+P +690 PRINT "NOW I HAVE $"; C; "AND YOU HAVE $"; S +700 PRINT "DO YOU WISH TO CONTINUE"; +710 INPUT H$ +720 IF H$="YES" OR H$="yes" THEN 120 +730 IF H$="NO" OR H$="no" THEN 4100 +740 PRINT "ANSWER YES OR NO, PLEASE." +750 GOTO 700 +760 IF I<>4 THEN 810 +770 PRINT +780 PRINT "YOU WIN." +790 S=S+P +800 GOTO 690 +810 RETURN +820 PRINT +830 PRINT "NOW WE DRAW -- HOW MANY CARDS DO YOU WANT"; +840 INPUT T +850 IF T=0 THEN 980 +860 Z=10 +870 IF T<4 THEN 900 +880 PRINT "YOU CAN'T DRAW MORE THAN THREE CARDS." +890 GOTO 840 +900 PRINT "WHAT ARE THEIR NUMBERS:" +910 FOR Q=1 TO T +920 INPUT U +930 GOSUB 1730 +940 NEXT Q +950 PRINT "YOUR NEW HAND:" +960 N=1 +970 GOSUB 1850 +980 Z=10+T +990 FOR U=6 TO 10 +1000 IF INT(X/POW(10,(U-6)))<>10*INT(X/POW(10,(U-5))) THEN 1020 +1010 GOSUB 1730 +1020 NEXT U +1030 PRINT +1040 PRINT "I AM TAKING"; Z-10-T; "CARD"; +1050 IF Z=11+T THEN 1090 +1060 PRINT "S" +1070 PRINT +1080 GOTO 1100 +1090 PRINT +1100 N=6 +1110 V=I +1120 I=1 +1130 GOSUB 2170 +1140 B=U +1150 M=D +1160 IF V<>7 THEN 1190 +1170 Z=28 +1180 GOTO 1330 +1190 IF I<>6 THEN 1220 +1200 Z=1 +1210 GOTO 1330 +1220 IF U>=13 THEN 1270 +1230 Z=2 +1240 IF FNA(0)<>6 THEN 1260 +1250 Z=19 +1260 GOTO 1330 +1270 IF U>=16 THEN 1320 +1280 Z=19 +1290 IF FNA(0)<>8 THEN 1310 +1300 Z=11 +1310 GOTO 1330 +1320 Z=2 +1330 K=0 +1340 GOSUB 3050 +1350 IF T<>.5 THEN 1450 +1360 IF V=7 THEN 1400 +1370 IF I<>6 THEN 1400 +1380 PRINT "I'LL CHECK" +1390 GOTO 1460 +1400 V=Z+FNA(0) +1410 GOSUB 3480 +1420 PRINT "I'LL BET $";V +1430 K=V +1440 GOSUB 3060 +1450 GOSUB 650 +1460 PRINT +1470 PRINT "NOW WE COMPARE HANDS:" +1480 J$=H$ +1490 K$=I$ +1500 PRINT "MY HAND:" +1510 N=6 +1520 GOSUB 1850 +1530 N=1 +1540 GOSUB 2170 +1550 PRINT +1560 PRINT "YOU HAVE "; +1570 K=D +1580 GOSUB 3690 +1590 H$=J$ +1600 I$=K$ +1610 K=M +1620 PRINT "AND I HAVE "; +1630 GOSUB 3690 +1640 IF B>U THEN 670 +1650 IF U>B THEN 780 +1660 IF H$="A FLUS" THEN 1700 +1662 IF FNB(M)FNB(D) THEN 670 +1670 PRINT "THE HAND IS DRAWN." +1680 PRINT "ALL $";P; " REMAINS IN THE POT." +1690 GOTO 140 +1700 IF FNB(M)>FNB(D) THEN 670 +1710 IF FNB(D)>FNB(M) THEN 780 +1720 GOTO 1670 +1730 Z=Z+1 +1740 A(Z)=100*INT(4*RND(1))+INT(100*RND(1)) +1750 IF INT(A(Z)/100)>3 THEN 1740 +1760 IF A(Z)-100*INT(A(Z)/100)>12 THEN 1740 +1765 IF Z=1 THEN 1840 +1770 FOR K=1 TO Z-1 +1780 IF A(Z)=A(K) THEN 1740 +1790 NEXT K +1800 IF Z<=10 THEN 1840 +1810 N=A(U) +1820 A(U)=A(Z) +1830 A(Z)=N +1840 RETURN +1850 FOR Z=N TO N+4 +1860 PRINT Z;"-- "; +1870 GOSUB 1950 +1880 PRINT " OF"; +1890 GOSUB 2070 +1900 IF Z/2<>INT(Z/2) THEN 1920 +1910 PRINT +1920 NEXT Z +1930 PRINT +1940 RETURN +1950 K=FNB(A(Z)) +1960 IF K<>9 THEN 1980 +1970 PRINT "JACK"; +1980 IF K<>10 THEN 2000 +1990 PRINT "QUEEN"; +2000 IF K<>11 THEN 2020 +2010 PRINT "KING"; +2020 IF K<>12 THEN 2040 +2030 PRINT "ACE"; +2040 IF K>=9 THEN 2060 +2050 PRINT K+2; +2060 RETURN +2070 K=INT(A(Z)/100) +2080 IF K<>0 THEN 2100 +2090 PRINT " CLUBS", +2100 IF K<>1 THEN 2120 +2110 PRINT " DIAMONDS", +2120 IF K<>2 THEN 2140 +2130 PRINT " HEARTS", +2140 IF K<>3 THEN 2160 +2150 PRINT " SPADES", +2160 RETURN +2170 U=0 +2180 FOR Z=N TO N+4 +2190 B(Z)=FNB(A(Z)) +2200 IF Z=N+4 THEN 2230 +2210 IF INT(A(Z)/100)<>INT(A(Z+1)/100) THEN 2230 +2220 U=U+1 +2230 NEXT Z +2240 IF U<>4 THEN 2310 +2250 X=11111 +2260 D=A(N) +2270 H$="A FLUS" +2280 I$="H IN" +2290 U=15 +2300 RETURN +2310 FOR Z=N TO N+3 +2320 FOR K=Z+1 TO N+4 +2330 IF B(Z)<=B(K) THEN 2390 +2340 X=A(Z) +2350 A(Z)=A(K) +2360 B(Z)=B(K) +2370 A(K)=X +2380 B(K)=A(K)-100*INT(A(K)/100) +2390 NEXT K +2400 NEXT Z +2410 X=0 +2420 FOR Z=N TO N+3 +2430 IF B(Z)<>B(Z+1) THEN 2470 +2440 X=X+11*POW(10, (Z-N)) +2450 D=A(Z) +2460 GOSUB 2760 +2470 NEXT Z +2480 IF X<>0 THEN 2620 +2490 IF B(N)+3<>B(N+3) THEN 2520 +2500 X=1111 +2510 U=10 +2520 IF B(N+1)+3<>B(N+4) THEN 2620 +2530 IF U<>10 THEN 2600 +2540 U=14 +2550 H$="STRAIG" +2560 I$="HT" +2570 X=11111 +2580 D=A(N+4) +2590 RETURN +2600 U=10 +2610 X=11110 +2620 IF U>=10 THEN 2690 +2630 D=A(N+4) +2640 H$="SCHMAL" +2650 I$="TZ, " +2660 U=9 +2670 X=11000 +2680 GOTO 2740 +2690 IF U<>10 THEN 2720 +2700 IF I=1 THEN 2740 +2710 GOTO 2750 +2720 IF U>12 THEN 2750 +2730 IF FNB(D)>6 THEN 2750 +2740 I=6 +2750 RETURN +2760 IF U>=11 THEN 2810 +2770 U=11 +2780 H$="A PAIR" +2790 I$=" OF " +2800 RETURN +2810 IF U<>11 THEN 2910 +2820 IF B(Z)<>B(Z-1) THEN 2870 +2830 H$="THREE" +2840 I$=" " +2850 U=13 +2860 RETURN +2870 H$="TWO P" +2880 I$="AIR, " +2890 U=12 +2900 RETURN +2910 IF U>12 THEN 2960 +2920 U=16 +2930 H$="FULL H" +2940 I$="OUSE, " +2950 RETURN +2960 IF B(Z)<>B(Z-1) THEN 3010 +2970 U=17 +2980 H$="FOUR" +2990 I$=" " +3000 RETURN +3010 U=16 +3020 H$="FULL H" +3030 I$="OUSE, " +3040 RETURN +3050 G=0 +3060 PRINT:PRINT "WHAT IS YOUR BET"; +3070 INPUT T +3080 IF T-INT(T)=0 THEN 3140 +3090 IF K<>0 THEN 3120 +3100 IF G<>0 THEN 3120 +3110 IF T=.5 THEN 3410 +3120 PRINT "NO SMALL CHANGE, PLEASE." +3130 GOTO 3060 +3140 IF S-G-T>=0 THEN 3170 +3150 GOSUB 3830 +3160 GOTO 3060 +3170 IF T<>0 THEN 3200 +3180 I=3 +3190 GOTO 3380 +3200 IF G+T>=K THEN 3230 +3210 PRINT "IF YOU CAN'T SEE MY BET, THEN FOLD." +3220 GOTO 3060 +3230 G=G+T +3240 IF G=K THEN 3380 +3250 IF Z<>1 THEN 3420 +3260 IF G>5 THEN 3300 +3270 IF Z>=2 THEN 3350 +3280 V=5 +3290 GOTO 3420 +3300 IF Z=1 THEN 3320 +3310 IF T<=25 THEN 3350 +3320 I=4 +3330 PRINT "I FOLD." +3340 RETURN +3350 IF Z=2 THEN 3430 +3360 PRINT "I'LL SEE YOU." +3370 K=G +3380 S=S-G +3390 C=C-K +3400 P=P+G+K +3410 RETURN +3420 IF G>3*Z THEN 3350 +3430 V=G-K+FNA(0) +3440 GOSUB 3480 +3450 PRINT "I'LL SEE YOU, AND RAISE YOU ";V +3460 K=G+V +3470 GOTO 3060 +3480 IF C-G-V>=0 THEN 3660 +3490 IF G<>0 THEN 3520 +3500 V=C +3510 RETURN +3520 IF C-G>=0 THEN 3360 +3530 IF (O/2)<>INT(O/2) THEN 3600 +3540 PRINT "WOULD YOU LIKE TO BUY BACK YOUR WATCH FOR $50"; +3550 INPUT J$ +3560 IF J$(1,1)="N" OR J$(1,1)="n" THEN 3600 +3570 C=C+50 +3580 O=O/2 +3590 RETURN +3600 IF O/3<>INT(O/3) THEN 3670 +3610 PRINT "WOULD YOU LIKE TO BUY BACK YOUR TIE TACK FOR $50"; +3620 INPUT J$ +3630 IF J$(1,1)="N" OR J$(1,1)="n" THEN 3670 +3640 C=C+50 +3650 O=O/3 +3660 RETURN +3670 PRINT "I'M BUSTED. CONGRATULATIONS!" +3680 STOP +3690 PRINT H$;I$; +3700 IF H$<>"A FLUS" THEN 3750 +3710 K=INT(K/100) +3720 GOSUB 2080 +3730 PRINT +3740 RETURN +3750 K=FNB(K) +3760 GOSUB 1960 +3770 IF H$="SCHMAL" THEN 3790 +3780 IF H$<>"STRAIG" THEN 3810 +3790 PRINT " HIGH" +3800 RETURN +3810 PRINT "'S" +3820 RETURN +3830 PRINT +3840 PRINT "YOU CAN'T BET WITH WHAT YOU HAVEN'T GOT." +3850 IF O/2=INT(O/2) THEN 3970 +3860 PRINT "WOULD YOU LIKE TO SELL YOUR WATCH"; +3870 INPUT J$ +3880 IF J$(1, 1)="N" OR J$(1, 1)="n" THEN 3970 +3890 IF FNA(0)>=7 THEN 3930 +3900 PRINT "I'LL GIVE YOU $75 FOR IT." +3910 S=S+75 +3920 GOTO 3950 +3930 PRINT "THAT'S A PRETTY CRUMMY WATCH - I'LL GIVE YOU $25." +3940 S=S+25 +3950 O=O*2 +3960 RETURN +3970 IF O/3<>INT(O/3) THEN 4090 +3980 PRINT "WILL YOU PART WITH THAT DIAMOND TIE TACK": +3990 INPUT J$ +4000 IF J$(1, 1)="N" OR J$(1, 1)="n" THEN 4080 +4010 IF FNA(0)>=6 THEN 4050 +4020 PRINT "YOU ARE NOW $100 RICHER." +4030 S=S+100 +4040 GOTO 4070 +4050 PRINT "IT'S PASTE. $25." +4060 S=S+25 +4070 O=O*3 +4080 RETURN +4090 PRINT "YOUR WAD IS SHOT. SO LONG, SUCKER!" +4100 END diff --git a/data/examples/14games/qubic.bas b/data/examples/14games/qubic.bas new file mode 100644 index 0000000000000000000000000000000000000000..5342ee3bc9e4e953387dbe9a76086efc36f7fe25 --- /dev/null +++ b/data/examples/14games/qubic.bas @@ -0,0 +1,281 @@ +50 REM "PRINT CHR$(26):REM WIDTH 80" +100 REM "QUBIC" +110 REM "Ported by Stefan in 2022" +120 REM +210 PRINT "DO YOU WANT INSTRUCTIONS"; +220 INPUT C$ +230 IF C$(1,1)="N" OR C$(1,1)="n" THEN 315 +240 IF C$(1,1)="Y" OR C$(1,1)="y" THEN 265 +250 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'"; +260 GOTO 220 +265 PRINT +270 PRINT "THE GAME IS TIC-TAC-TOE IN A 4 X 4 X 4 CUBE." +280 PRINT "EACH MOVE IS INDICATED BY A 3 DIGIT NUMBER, WITH EACH" +290 PRINT "DIGIT BETWEEN 1 AND 4 INCLUSIVE. THE DIGITS INDICATE THE" +300 PRINT "LEVEL, ROW, AND COLUMN, RESPECTIVELY, OF THE OCCUPIED" +305 PRINT "PLACE. " +306 PRINT +307 PRINT "TO PRINT THE PLAYING BOARD, TYPE 0 (ZERO) AS YOUR MOVE." +308 PRINT "THE PROGRAM WILL PRINT THE BOARD WITH YOUR MOVES INDI-" +309 PRINT "CATED WITH A (Y), THE MACHINE'S MOVES WITH AN (M), AND" +310 PRINT "UNUSED SQUARES WITH A ( ). OUTPUT IS ON PAPER." +311 PRINT +312 PRINT "TO STOP THE PROGRAM RUN, TYPE 1 AS YOUR MOVE." +313 PRINT:PRINT +315 DIM X(64),L(76),M(76,4),Y(16) +320 FOR I = 1 TO 16 +330 READ Y(I) +340 NEXT I +350 FOR I=1 TO 76 +360 FOR J = 1 TO 4 +370 READ M(I,J) +380 NEXT J +390 NEXT I +400 FOR I = 1 TO 64 +410 LET X (I) =0 +420 NEXT I +430 LET Z=1 +440 PRINT "DO YOU WANT TO MOVE FIRST"; +450 INPUT S$ +460 IF S$(1,1)="N" OR S$(1,1)="n" THEN 630 +470 IF S$(1,1)="Y" OR S$(1,1)="y" THEN 500 +480 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'."; +490 GOTO 450 +500 PRINT " " +510 PRINT "YOUR MOVE"; +520 INPUT J1 +521 IF J1=1 THEN 2770 +522 IF J1<>0 THEN 525 +523 GOSUB 2550 +524 GOTO 500 +525 IF J1<111 THEN 2750 +526 IF J1>444 THEN 2750 +530 GOSUB 2500 +540 LET K1=INT(J1/100) +550 LET J2=(J1-K1*100) +560 LET K2=INT(J2/10) +570 LET K3= J1 - K1*100 -K2*10 +580 LET M=16*K1+4*K2+K3-20 +590 IF X(M)=0 THEN 620 +600 PRINT "THAT SQUARE IS USED, TRY AGAIN." +610 GOTO 500 +620 LET X(M)=1 +630 GOSUB 1640 +640 J=1 +650 I=1 +660 IF J=1 THEN 720 +670 IF J=2 THEN 790 +680 IF J=3 THEN 930 +690 I=I+1: IF I<=76 THEN 660 +700 J=J+1: IF J<=3 THEN 650 +710 GOTO 1300 +720 IF L(I)<>4 THEN 690 +730 PRINT "YOU WIN AS FOLLOWS"; +740 FOR J=1 TO 4 +750 LET M=M(I,J) +760 GOSUB 1570 +770 NEXT J +780 GOTO 1490 +790 IF L(I)<>15 THEN 690 +800 FOR J=1 TO 4 +810 LET M=M(I,J) +820 IF X(M)<>0 THEN 860 +830 LET X(M)=5 +840 PRINT "MACHINE MOVES TO"; +850 GOSUB 1570 +860 NEXT J +870 PRINT ", AND WINS AS FOLLOWS" +880 FOR J=1 TO 4 +890 LET M=M(I,J) +900 GOSUB 1570 +910 NEXT J +920 GOTO 1490 +930 IF L(I)<>3 THEN 690 +940 PRINT "NICE TRY. MACHINE MOVES TO"; +950 FOR J=1 TO 4 +960 LET M=M(I,J) +970 IF X(M)<>0 THEN 1010 +980 LET X(M)=5 +990 GOSUB 1570 +1000 GOTO 500 +1010 NEXT J +1020 GOTO 1300 +1030 I=1 +1040 LET L(I)=X(M(I,1))+X(M(I,2))+X(M(I,3))+X(M(I,4)) +1050 LET L = L(I) +1060 IF L <2 THEN 1130 +1070 IF L>=3 THEN 1130 +1080 IF L>2 THEN 2230 +1090 FOR J = 1 TO 4 +1100 IF X(M(I,J))<>0 THEN 1120 +1110 LET X(M(I,J))=1/8 +1120 NEXT J +1130 I=I+1: IF I<=76 THEN 1040 +1140 GOSUB 1640 +1150 I=1 +1160 IF L(I)=1/2 THEN 2360 +1170 IF L(I)=1+3/8 THEN 2360 +1180 I=I+1: IF I<=76 THEN 1160 +1190 GOTO 1830 +1200 LET Z = 1 +1210 IF X(Y(Z))=0 THEN 1250 +1220 LET Z=Z+1 +1230 IF Z<>17 THEN 1210 +1240 GOTO 1720 +1250 LET M=Y(Z) +1260 LET X(M)=5 +1270 PRINT "MACHINE MOVES TO"; +1280 GOSUB 1570 +1290 GOTO 500 +1300 LET X=X +1310 I=1 +1320 LET L(I)=X(M(I,1))+X(M(I,2))+X(M(I,3))+X(M(I,4)) +1330 LET L=L(I) +1340 IF L<10 THEN 1410 +1350 IF L>=11 THEN 1410 +1360 IF L>10 THEN 2230 +1370 FOR J=1 TO 4 +1380 IF X(M(I,J))<>0 THEN 1400 +1390 LET X(M(I,J))=1/8 +1400 NEXT J +1410 I=I+1: IF I<=76 THEN 1320 +1420 GOSUB 1640 +1430 I=1 +1440 IF L(I)=.5 THEN 2360 +1450 IF L(I)=5+3/8 THEN 2360 +1460 I=I+1: IF I<=76 THEN 1440 +1470 GOSUB 2500 +1480 GOTO 1030 +1490 PRINT " " +1500 PRINT "DO YOU WANT TO TRY ANOTHER GAME"; +1510 INPUT X$ +1520 IF X$(1,1)="Y" OR X$(1,1)="y" THEN 400 +1530 IF X$(1,1)="N" OR X$(1,1)="n" THEN 1560 +1540 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'"; +1550 GOTO 1510 +1560 END +1570 LET K1=INT((M-1)/16)+1 +1580 LET J2=M-16*(K1-1) +1590 LET K2=INT((J2-1)/4)+1 +1600 LET K3=M-(K1-1)*16-(K2-1)*4 +1610 LET M=K1*100+K2*10+K3 +1620 PRINT M; +1630 RETURN +1640 FOR S=1 TO 76 +1650 LET J1 = M(S,1) +1660 LET J2=M(S,2) +1670 LET J3=M(S,3) +1680 LET J4=M(S,4) +1690 LET L(S)=X(J1)+X(J2)+X(J3)+X(J4) +1700 NEXT S +1710 RETURN +1720 FOR I=1 TO 64 +1730 IF X(I)<>0 THEN 1800 +1740 LET X(I)=5 +1750 LET M=I +1760 PRINT "MACHINE LIKES"; +1770 GOSUB 1570 +1780 PRINT " " +1790 GOTO 500 +1800 NEXT I +1810 PRINT "THE GAME IS A DRAW." +1820 GOTO 1490 +1830 FOR K=1 TO 18 +1840 LET P=0 +1850 FOR I=4*K-3 TO 4*K +1860 FOR J=1 TO 4 +1870 LET P=P+X(M(I,J)) +1880 NEXT J +1890 NEXT I +1900 IF P<4 THEN 1940 +1910 IF P<5 THEN 1970 +1920 IF P<9 THEN 1940 +1930 IF P<10 THEN 1970 +1940 NEXT K +1950 GOSUB 2500 +1960 GOTO 1200 +1970 LET S=1/8 +1980 FOR I=4*K-3 TO 4*K +1990 GOTO 2370 +2000 NEXT I +2010 LET S=0 +2020 GOTO 1980 +2030 DATA 1,49,52,4,13,61,64,16,22,39,23,38,26,42,27,43 +2040 DATA 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 +2050 DATA 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38 +2060 DATA 39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56 +2070 DATA 57,58,59,60,61,62,63,64 +2080 DATA 1,17,33,49,5,21,37,53,9,25,41,57,13,29,45,61 +2090 DATA 2,18,34,50,6,22,38,54,10,26,42,58,14,30,46,62 +2100 DATA 3,19,35,51,7,23,39,55,11,27,43,59,15,31,47,63 +2110 DATA 4,20,36,52,8,24,40,56,12,28,44,60,16,32,48,64 +2120 DATA 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61 +2130 DATA 2,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62 +2140 DATA 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63 +2150 DATA 4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64 +2160 DATA 1,6,11,16,17,22,27,32,33,38,43,48,49,54,59,64 +2170 DATA 13,10,7,4,29,26,23,20,45,42,39,36,61,58,55,52 +2180 DATA 1,21,41,61,2,22,42,62,3,23,43,63,4,24,44,64 +2190 DATA 49,37,25,13,50,38,26,14,51,39,27,15,52,40,28,16 +2200 DATA 1,18,35,52,5,22,39,56,9,26,43,60,13,30,47,64 +2210 DATA 49,34,19,4,53,38,23,8,57,42,27,12,61,46,31,16 +2220 DATA 1,22,43,64,16,27,38,49,4,23,42,61,13,26,39,52 +2230 FOR J=1 TO 4 +2240 IF X(M(I,J))<>1/8 THEN 2330 +2250 LET X(M(I,J))=5 +2260 IF L(I)<5 THEN 2290 +2270 PRINT "LET'S SEE YOU GET OUT OF THIS: MACHINE MOVES TO"; +2280 GOTO 2300 +2290 PRINT "YOU FOX. JUST IN THE NICK OF TIME, MACHINE MOVES TO"; +2300 LET M=M(I,J) +2310 GOSUB 1570 +2320 GOTO 500 +2330 NEXT J +2340 PRINT "MACHINE CONCEDES THIS GAME." +2350 GOTO 1490 +2360 LET S=1/8 +2370 IF I-INT(I/4)*4>1 THEN 2400 +2380 LET A=1 +2390 GOTO 2410 +2400 LET A=2 +2410 FOR J=A TO 5-A STEP 5-2*A +2420 IF X(M(I,J))=S THEN 2450 +2430 NEXT J +2440 GOTO 2000 +2450 LET X(M(I,J))=5 +2460 LET M=M(I,J) +2470 PRINT "MACHINE TAKES"; +2480 GOSUB 1570 +2490 GOTO 500 +2500 FOR I=1 TO 64 +2510 IF X(I)<>1/8 THEN 2530 +2520 LET X(I)=0 +2530 NEXT I +2540 RETURN +2550 FOR XX=1 TO 9:PRINT:NEXT:FOR I=1 TO 4 +2560 FOR J=1 TO 4 +2562 FOR I1=1 TO J +2564 PRINT" "; +2566 NEXT I1 +2570 FOR K=1 TO 4 +2600 LET Q=16*I+4*J+K-20 +2610 IF X(Q)<>O THEN 2630 +2620 PRINT"( ) "; +2630 IF X(Q)<>5 THEN 2650 +2640 PRINT"(M) "; +2650 IF X(Q)<>1 THEN 2660 +2655 PRINT"(Y) "; +2660 IF X(Q)<>1/8 THEN 2670 +2665 PRINT"( ) "; +2670 NEXT K +2680 PRINT +2690 PRINT +2700 NEXT J +2710 PRINT +2720 PRINT +2730 NEXT I +2735 REM PRINT CHR$(12) +2740 RETURN +2750 PRINT"INCORRECT MOVE, RETYPE IT--"; +2760 GOTO 520 +2770 END diff --git a/data/examples/14games/queen.bas b/data/examples/14games/queen.bas new file mode 100644 index 0000000000000000000000000000000000000000..47ae98b6adfb2e2286ae5deee70e38f7ebb8f504 --- /dev/null +++ b/data/examples/14games/queen.bas @@ -0,0 +1,167 @@ +1 REM "QUEEN" +2 REM "Ported by Stefan in 2022" +3 REM +10 DIM S(64) +11 FOR I=1 TO 64 +12 READ S(I) +13 NEXT I +14 DATA 81, 71, 61, 51, 41, 31, 21, 11 +15 DATA 92, 82, 72, 62, 52, 42, 32, 22 +16 DATA 103, 93, 83, 73, 63, 53, 43, 33 +17 DATA 114, 104, 94, 84, 74, 64, 54, 44 +18 DATA 125, 115, 105, 95, 85, 75, 65, 55 +19 DATA 136, 126, 116, 106, 96, 86, 76, 66 +20 DATA 147, 137, 127, 117, 107, 97, 87, 77 +21 DATA 158, 148, 138, 128, 118, 108, 98, 88 +22 INPUT "DO YOU WANT INSTRUCTIONS? ";W$ +23 IF W$="NO" OR W$="no" THEN 30 +24 IF W$="YES" OR W$="yes" THEN 28 +25 PRINT "PLEASE ANSWER 'YES' OR 'NO'." +26 GOTO 22 +28 GOSUB 5000 +29 GOTO 100 +30 GOSUB 5160 +90 REM ERROR CHECKS +100 PRINT "WHERE WOULD YOU LIKE TO START"; +110 INPUT M1 +115 IF M1=0 THEN 232 +120 T1=INT(M1/10) +130 U1=M1-10*T1 +140 IF U1=1 THEN 200 +150 IF U1=T1 THEN 200 +160 PRINT "PLEASE READ THE DIRECTIONS AGAIN." +170 PRINT "YOU HAVE BEGUN ILLEGALLY." +175 PRINT +180 GOTO 100 +200 GOSUB 2000 +210 PRINT "COMPUTER MOVES TO SQUARE",M +215 IF M=158 THEN 3400 +220 PRINT "WHAT IS YOUR MOVE"; +230 INPUT M1 +231 IF M1<>0 THEN 239 +232 PRINT +233 PRINT "IT LOOKS LIKE I HAVE WON BY FORFEIT." +234 PRINT +235 GOTO 4000 +239 IF M1<=M THEN 3200 +240 T1=INT(M1/10) +250 U1=M1-10*T1 +260 P=U1-U +270 IF P<>0 THEN 300 +280 L=T1-T +290 IF L<=0 THEN 3200 +295 GOTO 200 +300 IF T1-T <>P THEN 320 +310 GOTO 200 +320 IF T1-T <>2*P THEN 3200 +330 GOTO 200 +1990 REM LOCATE MOVE FOR COMPUTER +2000 IF M1=41 THEN 2180 +2010 IF M1=44 THEN 2180 +2020 IF M1=73 THEN 2180 +2030 IF M1=75 THEN 2180 +2040 IF M1=126 THEN 2180 +2050 IF M1=127 THEN 2180 +2060 IF M1=158 THEN 3300 +2065 C=0 +2070 FOR K=7 TO 1 STEP -1 +2080 U=U1 +2090 T=T1+K +2100 GOSUB 3500 +2105 IF C=1 THEN 2160 +2110 U=U+K +2120 GOSUB 3500 +2125 IF C=1 THEN 2160 +2130 T=T+K +2140 GOSUB 3500 +2145 IF C=1 THEN 2160 +2150 NEXT K +2155 GOTO 2180 +2160 C=0 +2170 RETURN +2180 GOSUB 3000 +2190 RETURN +2990 REM RANDOM MOVE +3000 Z=RND(1) +3010 IF Z>.6 THEN 3110 +3020 IF Z>.3 THEN 3070 +3030 U=U1 +3040 T=T1+1 +3050 M=10*T+U +3060 RETURN +3070 U=U1+1 +3080 T=T1+2 +3090 M=10*T+U +3100 RETURN +3110 U=U1+1 +3120 T=T1+1 +3130 M=10*T+U +3140 RETURN +3190 REM ILLEGAL MOVE MESSAGE +3200 PRINT +3210 PRINT "Y O U C H E A T . . . TRY AGAIN"; +3220 GOTO 230 +3290 REM PLAYER WINS +3300 PRINT +3310 PRINT "C O N G R A T U L A T I O N S . . ." +3320 PRINT +3330 PRINT "YOU HAVE WON--VERY WELL PLAYED." +3340 PRINT "IT LOOKS LIKE I HAVE MET MY MATCH." +3350 PRINT "THANKS FOR PLAYING---I CAN'T WIN ALL THE TIME." +3360 PRINT +3370 GOTO 4000 +3390 REM COMPUTER WINS +3400 PRINT +3410 PRINT "NICE TRY, BUT IT LOOKS LIKE I HAVE WON." +3420 PRINT "THANKS FOR PLAYING." +3430 PRINT +3440 GOTO 4000 +3490 REM TEST FOR COMPUTER MOVE +3500 M=10*T+U +3510 IF M=158 THEN 3570 +3520 IF M=127 THEN 3570 +3530 IF M=126 THEN 3570 +3540 IF M=75 THEN 3570 +3550 IF M=73 THEN 3570 +3560 RETURN +3570 C=1 +3580 GOTO 3560 +3990 REM ANOTHER GAME??? +4000 PRINT "ANYONE ELSE CARE TO TRY"; +4010 INPUT Q$ +4020 PRINT +4030 IF Q$="YES" OR Q$="yes" THEN 30 +4040 IF Q$="NO" OR Q$="no" THEN 4050 +4042 PRINT "PLEASE ANSWER 'YES' OR 'NO'." +4045 GOTO 4000 +4050 PRINT:PRINT "OK --- THANKS AGAIN." +4060 STOP +4990 REM DIRECTIONS +5000 PRINT "WE ARE GOING TO PLAY A GAME BASED ON ONE OF THE CHESS" +5010 PRINT "MOVES. OUR QUEEN WILL BE ABLE TO MOVE ONLY TO THE LEFT," +5020 PRINT "DOWN, OR DIAGONALLY DOWN AND TO THE LEFT." +5030 PRINT +5040 PRINT "THE OBJECT OF THE GAME IS TO PLACE THE QUEEN IN THE LOWER" +5050 PRINT "LEFT HAND SQUARE BY ALTERNATING MOVES BETWEEN YOU AND THE" +5060 PRINT "COMPUTER. THE FIRST ONE TO PLACE THE QUEEN THERE WINS." +5070 PRINT +5080 PRINT "YOU GO FIRST AND PLACE THE QUEEN IN ANY ONE OF THE SQUARES" +5090 PRINT "ON THE TOP ROW OR RIGHT HAND COLUMN." +5100 PRINT "THAT WILL BE YOUR FIRST MOVE." +5110 PRINT "WE ALTERNATE MOVES." +5120 PRINT "YOU MAY FORFEIT BY TYPING '0' AS YOUR MOVE." +5130 PRINT "BE SURE TO PRESS THE RETURN KEY AFTER EACH RESPONSE." +5140 PRINT +5150 PRINT +5160 PRINT +5170 FOR A=0 TO 7 +5180 FOR B=1 TO 8 +5185 I=8*A+B +5190 PRINT #4;S(I); +5200 NEXT B +5210 PRINT +5230 PRINT +5240 NEXT A +5250 PRINT +5260 RETURN +9999 END diff --git a/data/examples/14games/reverse.bas b/data/examples/14games/reverse.bas new file mode 100644 index 0000000000000000000000000000000000000000..3b596280ca023da70c6f3683d6bbdbe7ae23660c --- /dev/null +++ b/data/examples/14games/reverse.bas @@ -0,0 +1,64 @@ +10 REM "REVERSE from 101 BASIC games" +20 REM "Ported from Stefan's BASIC in 2021" +30 REM +40 DIM A(20) +100 PRINT "REVERSE -- A GAME OF SKILL": +110 PRINT +140 REM *** N=NUMBER OF NUMBERS +150 N=9 +160 PRINT "DO YOU WANT THE RULES"; +170 INPUT A$ +180 IF A$(1,1)="Y" OR A$(1,1)="y" THEN GOSUB 710 +200 REM *** MAKE A RANDOM LIST A(1) TO A(N) +210 A(1)=INT(RND(N-1)+2) +220 FOR K=2 TO N +230 A(K)=INT(RND(N)+1) +240 FOR J=1 TO K-1 +250 IF A(K)=A(J) THEN 230 +260 NEXT J +270 NEXT K +280 REM *** PRINT ORIGINAL LIST AND START GAME +290 PRINT: PRINT "HERE WE GO ... THE LIST IS:" +310 T=0 +320 GOSUB 610 +330 PRINT "HOW MANY SHALL I REVERSE"; +340 INPUT R +350 IF R=0 THEN 520 +360 IF R<=N THEN 390 +370 PRINT "OOPS! TOO MANY! I CAN REVERSE AT MOST",N +380 GOTO 330 +390 T=T+1 +400 REM *** REVERSE R NUMBERS AND PRINT NEW LIST +410 FOR K=1 TO INT(R/2) +420 Z=A(K) +430 A(K)=A(R-K+1) +440 A(R-K+1)=Z +450 NEXT K +460 GOSUB 610 +470 REM *** CHECK FOR A WIN +480 FOR K=1 TO N +490 IF A(K)<>K THEN 330 +500 NEXT K +510 PRINT "YOU WON IT IN",T,"MOVES!!!":PRINT +520 PRINT +530 PRINT "TRY AGAIN (YES OR NO)"; +540 INPUT A$ +550 IF A$(1,1)="Y" OR A$(1,1)="y" THEN 210 +560 PRINT: PRINT "O.K. HOPE YOU HAD FUN!!":GOTO 999 +600 REM *** SUBROUTINE TO PRINT LIST +610 PRINT:FOR K=1 TO N:PRINT A(K);:NEXT K +650 PRINT:PRINT:RETURN +700 REM *** SUBROUTINE TO PRINT THE RULES +710 PRINT:PRINT "THIS IS THE GAME OF 'REVERSE'. TO WIN, ALL YOU HAVE" +720 PRINT "TO DO IS ARRANGE A LIST OF NUMBERS (1 THROUGH", N,")" +730 PRINT "IN NUMERICAL ORDER FROM LEFT TO RIGHT. TO MOVE, YOU" +740 PRINT "TELL ME HOW MANY NUMBERS (COUNTING FROM THE LEFT) TO" +750 PRINT "REVERSE. FOR EXAMPLE, IF THE CURRENT LIST IS:" +760 PRINT:PRINT "2 3 4 5 1 6 7 8 9" +770 PRINT:PRINT "AND YOU REVERSE 4, THE RESULT WILL BE:" +780 PRINT:PRINT "5 4 3 2 1 6 7 8 9" +790 PRINT:PRINT "NOW IF YOU REVERSE 5, YOU WIN!" +800 PRINT:PRINT "1 2 3 4 5 6 7 8 9":PRINT +810 PRINT "NO DOUBT YOU WILL LIKE THIS GAME, BUT" +820 PRINT "IF YOU WANT TO QUIT, REVERSE 0 (ZERO).":PRINT: RETURN +999 END diff --git a/data/examples/14games/rocket.bas b/data/examples/14games/rocket.bas new file mode 100644 index 0000000000000000000000000000000000000000..f07cbb84055831e4e381b3e4541cd875dc80e482 --- /dev/null +++ b/data/examples/14games/rocket.bas @@ -0,0 +1,81 @@ +10 REM "Rocket from 101 Basic Games" +20 REM "Ported to Stefan's BASIC in 2021" +30 PRINT +100 PRINT "LUNAR LANDING SIMULATION" +110 PRINT "----- ------- ----------":PRINT +120 INPUT "DO YOU WANT INSTRUCTIONS (YES OR NO)? ";A$ +130 IF A$(1,1)="N" OR A$(1,1)="n" THEN 390 +140 CLS +150 PRINT +200 PRINT "YOU ARE LANDING ON THE MOON AND AND HAVE" +210 PRINT "TAKEN OVER MANUAL CONTROL 1000 FEET" +215 PRINT "ABOVE A GOOD LANDING SPOT.": PRINT +220 PRINT "YOU HAVE A DOWNWARD VELOCITY OF 50 FEET/SEC." +225 PRINT "150 UNITS OF FUEL REMAIN.": PRINT +230 PRINT "HERE ARE THE RULES THAT GOVERN YOUR DESCENT" +240 PRINT "(1) AFTER EACH SECOND THE HEIGHT, VELOCITY, AND" +250 PRINT " REMAINING FUEL WILL BE REPORTED BY YOUR" +255 PRINT " ON-BOARD COMPUTER." +260 PRINT "(2) AFTER THE REPORT A '?' WILL APPEAR. ENTER" +270 PRINT " THE NUMBER OF UNITS OF FUEL YOU WISH TO BURN" +280 PRINT " DURING THE NEXT SECOND. EACH UNIT OF FUEL" +285 PRINT " WILL SLOW YOUR DESCENT BY 1 FOOT/SEC." +310 PRINT "(3) THE MAXIMUM THRUST OF YOUR ENGINE IS " +315 PRINT " 30 FEET/SEC/SEC OR 30 UNITS OF FUEL" +320 PRINT " PER SECOND." +330 PRINT "(4) WHEN YOU CONTACT THE LUNAR SURFACE. YOUR " +340 PRINT " DESCENT ENGINE WILL AUTOMATICALLY SHUT DOWN" +345 PRINT " AND YOU WILL BE GIVEN A REPORT OF YOUR " +350 PRINT " LANDING SPEED AND REMAINING FUEL." +360 PRINT "(5) IF YOU RUN OUT OF FUEL THE '?' WILL NO" +370 PRINT " LONGER APPEAR BUT YOUR SECOND BY SECOND" +380 PRINT " REPORT WILL CONTINUE UNTIL YOU CONTACT THE" +385 PRINT " LUNAR SURFACE.":PRINT +390 PRINT "BEGINNING LANDING PROCEDURE..........":PRINT +400 PRINT "G O O D L U C K ! ! !" +420 PRINT +425 INPUT "Read to go - press return ", A$ +426 CLS +430 PRINT "SEC FEET SPEED FUEL " +450 PRINT +455 T=0: H=1000: V=50: F=150 +490 PRINT #6,T,H,V,F;" I"; +495 TAB(H/70): PRINT "*" +500 INPUT B +510 IF B<0 THEN 650 +520 IF B>30 THEN B=30 +530 IF B>F THEN B=F +540 V1=V-B+5 +560 F=F-B +570 H=H-(V+V1)/2 +580 IF H<=0 THEN 670 +590 T=T+1 +600 V=V1 +610 IF F>0 THEN 490 +615 IF B=0 THEN 640 +620 PRINT "**** OUT OF FUEL ****" +640 PRINT #6,T,H,V,F;" I"; +645 TAB(H/70): PRINT "*" +650 B=0 +660 GOTO 540 +670 PRINT "***** CONTACT *****" +680 H=H+(V1+V)/2 +690 IF B=5 THEN 720 +700 D=(-V+SQR(V*V+H*(10-2*B)))/(5-B) +710 GOTO 730 +720 D=H/V +730 V1=V+(5-B)*D +760 PRINT "TOUCHDOWN AT"; T+D; "SECONDS." +770 PRINT "LANDING VELOCITY="; V1; "FEET/SEC." +780 PRINT F; "UNITS OF FUEL REMAINING." +790 IF V1<>0 THEN 810 +800 PRINT "CONGRATULATIONS! A PERFECT LANDING!!" +805 PRINT "YOUR LICENSE WILL BE RENEWED.......LATER." +810 IF ABS(V1)<2 THEN 840 +820 PRINT "***** SORRY, BUT YOU BLEW IT!!!!" +830 PRINT "APPROPRIATE CONDOLENCES WILL BE SENT TO YOUR NEXT OF KIN." +840 PRINT +850 INPUT "ANOTHER MISSION? "; A$ +860 IF A$(1,1)="Y" OR A$(1,1)="y" THEN 390 +870 PRINT: PRINT "CONTROL OUT.": PRINT +999 END diff --git a/data/examples/14games/rockscis.bas b/data/examples/14games/rockscis.bas new file mode 100644 index 0000000000000000000000000000000000000000..5708cf2ceb55521be63d3881e76b38f7f6990529 --- /dev/null +++ b/data/examples/14games/rockscis.bas @@ -0,0 +1,35 @@ +10 REM "ROCK, SCISSORS, PAPER from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM "C and H count results" +40 @R=MILLIS(1) +50 C=0: H=0 +100 PRINT "A GAME OF ROCK, SCISSORS, PAPER" +110 INPUT "HOW MANY GAMES? ";Q +120 IF Q<0 THEN 110 +200 FOR G=1 TO Q +210 PRINT "GAME NUMBER ";G +220 X=INT(RND(3)+1) +230 PRINT "3=ROCK...2=SCISSORS...1=PAPER" +240 INPUT "1...2...3...WHAT'S YOUR CHOICE? ";K +250 K=INT(K) +260 IF (K-1)*(K-2)*(K-3)<>0 THEN PRINT "INVALID.": GOTO 240 +270 PRINT "THIS IS MY CHOICE..." +280 IF X=1 THEN PRINT "...PAPER" +290 IF X=2 THEN PRINT "...SCISSORS" +300 IF X=3 THEN PRINT "...ROCK" +400 REM "Evaluate result" +410 IF X=K THEN PRINT "TIE GAME. NO WINNER.": CONT +420 IF X>K THEN 470 +430 IF X=1 THEN 450 +440 PRINT "YOU WIN!!!":H=H+1: CONT +450 IF K<>3 THEN 440 +460 PRINT "WOW! I WIN!!!":C=C+1: CONT +470 IF K<>1 OR X<>3 THEN 460 +480 GOTO 440 +490 NEXT G +500 PRINT: PRINT "HERE IS THE FINAL GAME SCORE:" +510 PRINT "I HAVE WON",C,"GAME(S)." +520 PRINT "YOU HAVE WON",H,"GAME(S)." +530 PRINT "AND",Q-(C+H),"GAME(S) ENDED IN A TIE." +540 PRINT: PRINT "THANKS FOR PLAYING!!" +800 END diff --git a/data/examples/14games/roulette.bas b/data/examples/14games/roulette.bas new file mode 100644 index 0000000000000000000000000000000000000000..79e205c14b787889a5fdcac5b2f374ba1d42c3e2 --- /dev/null +++ b/data/examples/14games/roulette.bas @@ -0,0 +1,239 @@ +10 REM "ROULETTE" +20 REM "Ported by Stefan in 2022" +30 REM +40 PRINT "ENTER THE CURRENT DATE (AS IN 'JANUARY 23, 1979') -"; +50 INPUT D$,E$ +1000 REM "-ROULETTE" +1010 REM "-DAVID JOSLIN" +1020 PRINT "WELCOME TO THE ROULETTE TABLE" +1030 PRINT +1040 PRINT "DO YOU WANT INSTRUCTIONS"; +1050 INPUT Y$ +1060 IF Y$(1,1)="N" OR Y$(1,1)="n" THEN 1550 +1070 PRINT +1080 PRINT "THIS IS THE BETTING LAYOUT" +1090 PRINT " (*=RED)" +1100 PRINT +1110 PRINT " 1* 2 3*" +1120 PRINT " 4 5* 6 " +1130 PRINT " 7* 8 9*" +1140 PRINT "10 11 12*" +1150 PRINT "---------------" +1160 PRINT "13 14* 15 " +1170 PRINT "16* 17 18*" +1180 PRINT "19* 20 21*" +1190 PRINT "22 23* 24 " +1200 PRINT "---------------" +1210 PRINT "25* 26 27*" +1220 PRINT "28 29 30*" +1230 PRINT "31 32* 33 " +1240 PRINT "34* 35 36*" +1250 PRINT "---------------" +1260 PRINT " 00 0 " +1270 PRINT +1280 PRINT "TYPES OF BETS" +1290 PRINT +1300 PRINT "THE NUMBERS 1 TO 36 SIGNIFY A STRAIGHT BET" +1310 PRINT "ON THAT NUMBER." +1320 PRINT "THESE PAY OFF 35:1" +1330 PRINT +1340 PRINT "THE 2:1 BETS ARE:" +1350 PRINT " 37) 1-12 40) FIRST COLUMN" +1360 PRINT " 38) 13-24 41) SECOND COLUMN" +1370 PRINT " 39) 25-36 42) THIRD COLUMN" +1380 PRINT +1390 PRINT "THE EVEN MONEY BETS ARE:" +1400 PRINT " 43) 1-18 46) ODD" +1410 PRINT " 44) 19-36 47) RED" +1420 PRINT " 45) EVEN 48) BLACK" +1430 PRINT +1440 PRINT " 49)0 AND 50)00 PAY OFF 35:1" +1450 PRINT " NOTE: 0 AND 00 DO NOT COUNT UNDER ANY" +1460 PRINT " BETS EXCEPT THEIR OWN." +1470 PRINT +1480 PRINT "WHEN I ASK FOR EACH BET, TYPE THE NUMBER" +1490 PRINT "AND THE AMOUNT, SEPARATED BY A COMMA." +1500 PRINT "FOR EXAMPLE: TO BET $500 ON BLACK, TYPE 48,500" +1510 PRINT "WHEN I ASK FOR A BET." +1520 PRINT +1530 PRINT "THE MINIMUM BET IS $5, THE MAXIMUM IS $500." +1540 PRINT +1550 REM-PROGRAM BEGINS HERE +1560 REM-TYPE OF BET(NUMBER) ODDS +1570 REM DON'T NEED TO DIMENSION STRINGS +1580 DIM B(100),C(100),T(100),X(38) +1590 DIM A(50) +1600 FOR I=1 TO 38: X(I)=0: NEXT I: REM "MAT X=ZER" +1610 P=1000 +1620 D=100000. +1630 PRINT "HOW MANY BETS? "; +1640 INPUT Y +1650 IF Y<1 OR Y<>INT(Y) THEN 1630 +1660 FOR I=1 TO 50: A(I)=0: NEXT I: REM MAT A=ZER +1670 FOR C=1 TO Y +1680 PRINT "NUMBER ";C; +1690 INPUT X,Z +1700 B(C)=Z +1710 T(C)=X +1720 IF X<1 OR X>50 OR X<>INT(X) THEN 1680 +1730 IF Z<1 OR Z<>INT(Z) THEN 1680 +1740 IF Z<5 OR Z>500 THEN 1680 +1750 IF A(X)=0 THEN 1780 +1760 PRINT "YOU MADE THAT BET ONCE ALREADY,DUM-DUM" +1770 GOTO 1680 +1780 A(X)=1 +1790 NEXT C +1800 PRINT "SPINNING" +1810 PRINT +1820 PRINT +1830 S=INT(RND(1)*100) +1840 IF S=0 OR S>38 THEN 1830 +1850 X(S)=X(S)+1 +1860 IF S<37 THEN 1920 +1870 IF S=37 THEN 1900 +1880 PRINT "00" +1890 GOTO 2020 +1900 PRINT "0" +1910 GOTO 2020 +1920 RESTORE +1930 FOR I1=1 TO 18 +1940 READ R +1950 IF R=S THEN 2000 +1960 NEXT I1 +1970 A$="BLACK" +1980 PRINT S;A$ +1990 GOTO 2020 +2000 A$="RED" +2010 GOTO 1980 +2020 PRINT +2030 FOR C=1 TO Y +2040 IF T(C)<37 THEN 2710 +2050 ON T(C)-36 GOTO 2090,2190,2220,2250,2300,2350,2400,2470,2500 +2060 ON T(C)-45 GOTO 2530,2560,2630 +2070 GOTO 2710 +2080 STOP +2090 REM 1-12(37) 2:1 +2100 IF S <= 12 THEN 2150 +2110 PRINT "YOU LOSE ";B(C);" DOLLARS ON BET";C +2120 D=D+B(C) +2130 P=P-B(C) +2140 GOTO 2180 +2150 PRINT "YOU WIN ";B(C)*2;" DOLLARS ON BET"C +2160 D=D-B(C)*2 +2170 P=P+B(C)*2 +2180 GOTO 2810 +2190 REM 13-24(38) 2:1 +2200 IF S>12 AND S<25 THEN 2150 +2210 GOTO 2110 +2220 REM 25-36(39) 2:1 +2230 IF S>24 AND S<37 THEN 2150 +2240 GOTO 2110 +2250 REM FIRST COLUMN(40) 2:1 +2260 FOR I=1 TO 34 STEP 3 +2270 IF S=I THEN 2150 +2280 NEXT I +2290 GOTO 2110 +2300 REM SECOND COLUMN(41) 2:1 +2310 FOR I=2 TO 35 STEP 3 +2320 IF S=I THEN 2150 +2330 NEXT I +2340 GOTO 2110 +2350 REM THIRD COLUMN(42) 2:1 +2360 FOR I=3 TO 36 STEP 3 +2370 IF S=I THEN 2150 +2380 NEXT I +2390 GOTO 2110 +2400 REM 1-18(43) 1:1 +2410 IF S<19 THEN 2430 +2420 GOTO 2110 +2430 PRINT "YOU WIN ";B(C);" DOLLARS ON BET";C +2440 D=D-B(C) +2450 P=P+B(C) +2460 GOTO 2810 +2470 REM 19-36(44) 1:1 +2480 IF S<37 AND S>18 THEN 2430 +2490 GOTO 2110 +2500 REM EVEN(45) 1:1 +2510 IF S/2=INT(S/2) AND S<37 THEN 2430 +2520 GOTO 2110 +2530 REM ODD(46) 1:1 +2540 IF S/2<>INT(S/2) AND S<37 THEN 2430 +2550 GOTO 2110 +2560 REM RED(47) 1:1 +2570 RESTORE +2580 FOR I=1 TO 18 +2590 READ R +2600 IF S=R THEN 2430 +2610 NEXT I +2620 GOTO 2110 +2630 REM BLACK(48) 1:1 +2640 RESTORE +2650 FOR I=1 TO 18 +2660 READ R +2670 IF S=R THEN 2110 +2680 NEXT I +2690 IF S>36 THEN 2110 +2700 GOTO 2430 +2710 REM--1TO36,0,00(1-36,49,50)35:1 +2720 IF T(C)<49 THEN 2760 +2730 IF T(C)=49 AND S=37 THEN 2780 +2740 IF T(C)=50 AND S=38 THEN 2780 +2750 GOTO 2110 +2760 IF T(C)=S THEN 2780 +2770 GOTO 2110 +2780 PRINT "YOU WIN ";B(C)*35;" DOLLARS ON BET";C +2790 D=D-B(C)*35 +2800 P=P+B(C)*35 +2810 NEXT C +2820 PRINT +2830 PRINT "TOTALS:","ME","YOU" +2840 PRINT " ",D,P +2850 IF P>0 THEN 2880 +2860 PRINT "OOPS! YOU JUST SPENT YOUR LAST DOLLAR!" +2870 GOTO 3190 +2880 IF D>0 THEN 2920 +2890 PRINT "YOU BROKE THE HOUSE!" +2900 P=101000. +2910 GOTO 2960 +2920 PRINT "AGAIN"; +2930 INPUT Y$ +2940 IF LEFT$(Y$,1)="Y" THEN 1630 +2950 DATA 1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36 +2960 IF P<1 THEN 3190 +2970 PRINT "TO WHOM SHALL I MAKE THE CHECK"; +2980 INPUT B$ +2990 PRINT +3000 FOR I=1 TO 72: PRINT "-";: NEXT I: REM PRINT 72 DASHES +3010 PRINT TAB(50);"CHECK NO. ";INT(RND(1)*100) +3020 PRINT +3030 GOSUB 3230 +3040 TAB(40): PRINT M$ +3050 PRINT +3060 PRINT +3070 PRINT "PAY TO THE ORDER OF-----";B$;"-----$ "; +3080 PRINT P +3090 PRINT +3100 PRINT +3110 TAB(10): PRINT "THE MEMORY BANK OF NEW YORK" +3120 PRINT +3130 TAB(40): PRINT "THE COMPUTER" +3140 TAB(40): PRINT "----------X-----" +3150 PRINT +3160 FOR I=1 TO 62: PRINT "-";: NEXT I +3170 PRINT "COME BACK SOON!" +3180 GOTO 3210 +3190 PRINT "THANKS FOR YOUR MONEY." +3200 PRINT "I'LL USE IT TO BUY A SOLID GOLD ROULETTE WHEEL" +3210 PRINT +3220 GOTO 3420 +3230 REM +3240 REM THIS ROUTINE RETURNS THE CURRENT DATE IN M$ +3250 REM IF YOU HAVE SYSTEM FUNCTIONS TO HANDLE THIS +3260 REM THEY CAN BE USED HERE. HOWEVER IN THIS +3270 REM PROGRAM, WE JUST INPUT THE DATE AT THE START +3280 REM THE GAME +3290 REM +3300 REM THE DATE IS RETURNED IN VARIABLE M$ +3310 M$=D$+", "+E$ +3320 RETURN +3420 END diff --git a/data/examples/14games/russian.bas b/data/examples/14games/russian.bas new file mode 100644 index 0000000000000000000000000000000000000000..6c5a08c00cc7aacb62516bc9b2ce9a2db2d0b653 --- /dev/null +++ b/data/examples/14games/russian.bas @@ -0,0 +1,17 @@ +10 REM "RUSSIAN ROULETTE from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +100 PRINT "THIS IS A GAME OF >>>>>>>>>>RUSSIAN ROULETTE." +110 PRINT:PRINT "HERE IS A REVOLVER." +120 PRINT "TYPE '1' TO SPIN CHAMBER AND PULL TRIGGER." +130 PRINT "TYPE '2' TO GIVE UP." +140 PRINT "GO" +150 FOR N=1 TO 10 +200 PRINT N, ": ";: INPUT I +210 IF I=2 THEN PRINT " CHICKEN!!!!!": END +220 IF INT(RND(6))<5 THEN PRINT "- CLICK -": CONT +230 ELSE PRINT " BANG!!!!! YOU'RE DEAD!": BREAK +240 NEXT +250 IF N=10 THEN PRINT "YOU WIN!!!!!" +260 ELSE PRINT "CONDOLENCES WILL BE SENT TO YOUR RELATIVES." +270 END diff --git a/data/examples/14games/salvo.bas b/data/examples/14games/salvo.bas new file mode 100644 index 0000000000000000000000000000000000000000..21a716284519e64f1ce326c5280848678ff016ad --- /dev/null +++ b/data/examples/14games/salvo.bas @@ -0,0 +1,341 @@ +1000 REM "SALVO" +1010 REM "Ported by Stefan in 2022" +1020 REM +1030 REM +1040 DIM A(10,10),B(10,10),C(7),D(7),E(12),F(12),G(12),H(12),K(10,10) +1050 Z8=0 +1060 FOR W=1 TO 12 +1070 E(W)=-1 +1080 H(W)=-1 +1090 NEXT W +1100 FOR X=1 TO 10 +1110 FOR Y=1 TO 10 +1120 B(X,Y)=0 +1130 NEXT Y +1140 NEXT X +1150 FOR X=1 TO 12 +1160 F(X)=0 +1170 G(X)=0 +1180 NEXT X +1190 FOR X=1 TO 10 +1200 FOR Y=1 TO 10 +1210 A(X,Y)=0 +1220 NEXT Y +1230 NEXT X +1240 FOR K=4 TO 1 STEP -1 +1250 U6=0 +1260 GOSUB 2910 +1270 DEF FNA(K)=(5-K)*3-2*INT(K/4)+SGN(K-1)-1 +1280 DEF FNB(K)=K+INT(K/4)-SGN(K-1) +1290 IF V+V2+V*V2=0 THEN 1260 +1300 IF Y+V*FNB(K)>10 THEN 1260 +1310 IF Y+V*FNB(K)<1 THEN 1260 +1320 IF X+V2*FNB(K)>10 THEN 1260 +1330 IF X+V2*FNB(K)<1 THEN 1260 +1340 U6=U6+1 +1350 IF U6>25 THEN 1190 +1360 FOR Z=0 TO FNB(K) +1370 F(Z+FNA(K))=X+V2*Z +1380 G(Z+FNA(K))=Y+V*Z +1390 NEXT Z +1400 U8=FNA(K) +1405 IF U8>U8+FNB(K) THEN 1460 +1410 FOR Z2= U8 TO U8+FNB(K) +1415 IF U8<2 THEN 1450 +1420 FOR Z3=1 TO U8-1 +1430 IF SQR(POW(F(Z3)-F(Z2),2)+POW(G(Z3)-G(Z2),2)) < 3.59 THEN 1260 +1440 NEXT Z3 +1450 NEXT Z2 +1460 FOR Z=0 TO FNB(K) +1470 A(F(Z+U8),G(Z+U8))=.5+SGN(K-1)*(K-1.5) +1480 NEXT Z +1490 NEXT K +1500 PRINT "ENTER COORDINATES FOR..." +1510 PRINT "BATTLESHIP" +1520 FOR X=1 TO 5 +1530 REM "INPUT Y,Z" +1535 GOSUB 5000: Y=TX: Z=TY +1540 B(Y,Z)=3 +1550 NEXT X +1560 PRINT "CRUISER" +1570 FOR X=1 TO 3 +1580 REM "INPUT Y,Z" +1585 GOSUB 5000: Y=TX: Z=TY +1590 B(Y,Z)=2 +1600 NEXT X +1610 PRINT "DESTROYER" +1620 FOR X=1 TO 2 +1630 REM "INPUT Y,Z" +1635 GOSUB 5000: Y=TX: Z=TY +1640 B(Y,Z)=1 +1650 NEXT X +1660 PRINT "DESTROYER" +1670 FOR X=1 TO 2 +1680 REM "INPUT Y,Z" +1685 GOSUB 5000: Y=TX: Z=TY +1690 B(Y,Z)=.5 +1700 NEXT X +1710 PRINT "DO YOU WANT TO START"; +1720 INPUT J$ +1730 IF J$<>"WHERE ARE YOUR SHIPS?" THEN 1890 +1740 PRINT "BATTLESHIP" +1750 FOR Z=1 TO 5 +1760 PRINT F(Z);G(Z) +1770 NEXT Z +1780 PRINT "CRUISER" +1790 PRINT F(6);G(6) +1800 PRINT F(7);G(7) +1810 PRINT F(8);G(8) +1820 PRINT "DESTROYER" +1830 PRINT F(9);G(9) +1840 PRINT F(10);G(10) +1850 PRINT "DESTROYER" +1860 PRINT F(11);G(11) +1870 PRINT F(12);G(12) +1880 GOTO 1710 +1890 C=0 +1900 PRINT "DO YOU WANT TO SEE MY SHOTS"; +1910 INPUT K$ +1920 PRINT +1930 IF J$<>"YES" THEN 2620 +1940 REM "*******************START" +1950 IF J$<>"YES" THEN 1990 +1960 C=C+1 +1970 PRINT +1980 PRINT "TURN ";C +1990 A=0 +2000 FOR W=.5 TO 3 STEP .5 +2010 FOR X=1 TO 10 +2020 FOR Y=1 TO 10 +2030 IF B(X,Y)=W THEN 2070 +2040 NEXT Y +2050 NEXT X +2060 GOTO 2080 +2070 A=A+INT(W+.5) +2080 NEXT W +2090 FOR W=1 TO 7 +2100 C(W)=0 +2110 D(W)=0 +2120 F(W)=0 +2130 G(W)=0 +2140 NEXT W +2150 P3=0 +2160 FOR X=1 TO 10 +2170 FOR Y=1 TO 10 +2180 IF A(X,Y)>10 THEN 2200 +2190 P3=P3+1 +2200 NEXT Y +2210 NEXT X +2220 PRINT "YOU HAVE ";A;" SHOTS." +2230 IF P3>=A THEN 2260 +2240 PRINT "YOU HAVE MORE SHOTS THAN THERE ARE BLANK SQUARES." +2250 GOTO 2890 +2260 IF A<>0 THEN 2290 +2270 PRINT "I HAVE WON." +2280 STOP +2290 FOR W=1 TO A +2300 REM "INPUT X,Y" +2305 GOSUB 5000: X=TX: Y=TY +2310 IF X<>INT(X) THEN 2370 +2320 IF X>10 THEN 2370 +2330 IF X<1 THEN 2370 +2340 IF Y<>INT(Y) THEN 2370 +2350 IF Y>10 THEN 2370 +2360 IF Y>=1 THEN 2390 +2370 PRINT "ILLEGAL, ENTER AGAIN." +2380 GOTO 2300 +2390 IF A(X,Y)>10 THEN 2440 +2400 C(W)=X +2410 D(W)=Y +2420 NEXT W +2430 GOTO 2460 +2440 PRINT "YOU SHOT THERE BEFORE ON TURN ";A(X,Y)-10 +2450 GOTO 2300 +2460 FOR W=1 TO A +2470 IF A(C(W),D(W))=3 THEN 2540 +2480 IF A(C(W),D(W))=2 THEN 2560 +2490 IF A(C(W),D(W))=1 THEN 2580 +2500 IF A(C(W),D(W))=.5 THEN 2600 +2510 A(C(W),D(W))=10+C +2520 NEXT W +2530 GOTO 2620 +2540 PRINT "YOU HIT MY BATTLESHIP." +2550 GOTO 2510 +2560 PRINT "YOU HIT MY CRUISER." +2570 GOTO 2510 +2580 PRINT "YOU HIT MY DESTROYER." +2590 GOTO 2510 +2600 PRINT "YOU HIT MY DESTROYER." +2610 GOTO 2510 +2620 A=0 +2630 IF J$="YES" THEN 2670 +2640 C=C+1 +2650 PRINT +2660 PRINT "TURN ";C +2670 A=0 +2680 FOR W=.5 TO 3 STEP .5 +2690 FOR X=1 TO 10 +2700 FOR Y=1 TO 10 +2710 IF A(X,Y)=W THEN 2750 +2720 NEXT Y +2730 NEXT X +2740 GOTO 2760 +2750 A=A+INT(W+.5) +2760 NEXT W +2770 P3=0 +2780 FOR X=1 TO 10 +2790 FOR Y=1 TO 10 +2800 IF A(X,Y)>10 THEN 2820 +2810 P3=P3+1 +2820 NEXT Y +2830 NEXT X +2840 PRINT "I HAVE ";A;" SHOTS." +2850 IF P3>A THEN 2880 +2860 PRINT "I HAVE MORE SHOTS THAN BLANK SQUARES." +2870 GOTO 2270 +2880 IF A<>0 THEN 2960 +2890 PRINT "YOU HAVE WON." +2900 STOP +2910 X=INT(RND(1)*10+1) +2920 Y=INT(RND(1)*10+1) +2930 V=INT(3*RND(1)-1) +2940 V2=INT(3*RND(1)-1) +2950 RETURN +2960 FOR W=1 TO 12 +2970 IF H(W)>0 THEN 3800 +2980 NEXT W +2990 REM "*******************RANDOM" +3000 W=0 +3010 R3=0 +3020 GOSUB 2910 +3030 RESTORE +3040 R2=0 +3050 R3=R3+1 +3060 IF R3>100 THEN 3010 +3070 IF X>10 THEN 3110 +3080 IF X>0 THEN 3120 +3090 X=1+INT(RND(1)*2.5) +3100 GOTO 3120 +3110 X=10-INT(RND(1)*2.5) +3120 IF Y>10 THEN 3160 +3130 IF Y>0 THEN 3270 +3140 Y=1+INT(RND(1)*2.5) +3150 GOTO 3270 +3160 Y=10-INT(RND(1)*2.5) +3170 GOTO 3270 +3180 F(W)=X +3190 G(W)=Y +3200 IF W=A THEN 3380 +3210 IF R2=6 THEN 3030 +3220 READ X1: READ Y1 +3230 R2=R2+1 +3240 DATA 1,1,-1,1,1,-3,1,1,0,2,-1,1 +3250 X=X+X1 +3260 Y=Y+Y1 +3270 IF X>10 THEN 3210 +3280 IF X<1 THEN 3210 +3290 IF Y>10 THEN 3210 +3300 IF Y<1 THEN 3210 +3310 IF B(X,Y)>10 THEN 3210 +3320 FOR Q9=1 TO W +3330 IF F(Q9)<>X THEN 3350 +3340 IF G(Q9)=Y THEN 3210 +3350 NEXT Q9 +3360 W=W+1 +3370 GOTO 3180 +3380 IF K$<>"YES" THEN 3420 +3390 FOR Z5=1 TO A +3400 PRINT F(Z5);G(Z5) +3410 NEXT Z5 +3420 FOR W=1 TO A +3430 IF B(F(W),G(W))=3 THEN 3500 +3440 IF B(F(W),G(W))=2 THEN 3520 +3450 IF B(F(W),G(W))=1 THEN 3560 +3460 IF B(F(W),G(W))=.5 THEN 3540 +3470 B(F(W),G(W))=10+C +3480 NEXT W +3490 GOTO 1950 +3500 PRINT "I HIT YOUR BATTLESHIP" +3510 GOTO 3570 +3520 PRINT "I HIT YOUR CRUISER" +3530 GOTO 3570 +3540 PRINT "I HIT YOUR DESTROYER" +3550 GOTO 3570 +3560 PRINT "I HIT YOUR DESTROYER" +3570 FOR Q=1 TO 12 +3580 IF E(Q)<>-1 THEN 3730 +3590 E(Q)=10+C +3600 H(Q)=B(F(W),G(W)) +3610 M3=0 +3620 FOR M2=1 TO 12 +3630 IF H(M2)<>H(Q) THEN 3650 +3640 M3=M3+1 +3650 NEXT M2 +3660 IF M3<>INT(H(Q)+.5)+1+INT(INT(H(Q)+.5)/3) THEN 3470 +3670 FOR M2=1 TO 12 +3680 IF H(M2)<>H(Q) THEN 3710 +3690 E(M2)=-1 +3700 H(M2)=-1 +3710 NEXT M2 +3720 GOTO 3470 +3730 NEXT Q +3740 PRINT "PROGRAM ABORT:" +3750 FOR Q=1 TO 12 +3760 PRINT "E(";Q;") =";E(Q) +3770 PRINT "H(";Q;") =";H(Q) +3780 NEXT Q +3790 STOP +3800 REM "************************USINGEARRAY" +3810 FOR R=1 TO 10 +3820 FOR S=1 TO 10 +3830 K(R,S)=0 +3840 NEXT S +3850 NEXT R +3860 FOR U=1 TO 12 +3870 IF E(U)<10 THEN 4020 +3880 FOR R=1 TO 10 +3890 FOR S=1 TO 10 +3900 IF B(R,S)<10 THEN 3930 +3910 K(R,S)=-10000000 +3920 GOTO 4000 +3930 FOR M=SGN(1-R) TO SGN(10-R) +3940 FOR N=SGN(1-S) TO SGN(10-S) +3950 IF N+M+N*M=0 THEN 3980 +3960 IF B(R+M,S+N)<>E(U) THEN 3980 +3970 K(R,S)=K(R,S)+E(U)-S*INT(H(U)+.5) +3980 NEXT N +3990 NEXT M +4000 NEXT S +4010 NEXT R +4020 NEXT U +4030 FOR R=1 TO A +4040 F(R)=R +4050 G(R)=R +4060 NEXT R +4070 FOR R=1 TO 10 +4080 FOR S=1 TO 10 +4090 Q9=1 +4100 FOR M=1 TO A +4110 IF K(F(M),G(M))>=K(F(Q9),G(Q9)) THEN 4130 +4120 Q9=M +4130 NEXT M +4131 IF R>A THEN 4140 +4132 IF R=S THEN 4210 +4140 IF K(R,S)R THEN 4190 +4170 IF G(M)=S THEN 4210 +4180 NEXT M +4190 F(Q9)=R +4200 G(Q9)=S +4210 NEXT S +4220 NEXT R +4230 GOTO 3380 +5000 REM "Subroutine to read two values" +5010 REM "They are loaded as string and split" +5020 INPUT "X, Y? ",N$ : IF N$="#" THEN END +5030 @S=0: TX=VAL(N$): IF @S THEN PRINT "ERROR": GOTO 5020 +5040 TC=INSTR(N$, ","): IF NOT TC THEN PRINT "ERROR": GOTO 5020 +5050 TY=VAL(N$(TC+1)): IF @S THEN PRINT "ERROR": GOTO 5020 +5060 RETURN + diff --git a/data/examples/14games/sinewave.bas b/data/examples/14games/sinewave.bas new file mode 100644 index 0000000000000000000000000000000000000000..2d5ebbedf0a672d71454f45ce678d0fdf92ab90e --- /dev/null +++ b/data/examples/14games/sinewave.bas @@ -0,0 +1,14 @@ +10 REM "SINE WAVE from 101 BASIC games" +20 REM "Originally written by DAVID AHL" +30 REM "Ported to Stefan's BASIC 2021" +40 IF NOT USR(0,3) THEN PRINT "NEEDS FLOAT": END +50 B=0 +100 PRINT "PLOT A SINE WAVE" +200 REM "START LONG LOOP" +210 FOR T=0 TO 40 STEP 0.25 +220 A=INT(26+25*SIN(T)) +230 TAB(A) +240 IF B=1 THEN PRINT "BASIC": B=0 +250 ELSE PRINT "Stefan's": B=1 +260 NEXT T +900 END diff --git a/data/examples/14games/slalom.bas b/data/examples/14games/slalom.bas new file mode 100644 index 0000000000000000000000000000000000000000..61128762762538490de8c9dddf84a8bc34fd50b8 --- /dev/null +++ b/data/examples/14games/slalom.bas @@ -0,0 +1,167 @@ +10 REM "SLALOM" +20 REM "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" +30 REM +40 REM "this is the double quote" +50 C$=34 +310 PRINT "HOW MANY GATES DOES THIS COURSE HAVE (1 TO 25)"; +320 INPUT V +330 IF V>25 THEN 360 +340 IF V<1 THEN 390 +350 GOTO 1440 +360 PRINT "25 IS THE LIMIT." +370 LET V=25 +380 GOTO 1440 +390 PRINT "TRY AGAIN," +400 GOTO 310 +410 PRINT "RATE YOURSELF AS A SKIER, (1=WORST, 3=BEST)"; +420 INPUT A +430 IF A<1 THEN 460 +440 IF A>3 THEN 460 +450 GOTO 480 +460 PRINT "THE BOUNDS ARE 1-3" +470 GOTO 410 +480 PRINT"THE STARTER COUNTS DOWN...5...4...3...2...1...GO!"; +490 REM +500 LET T=0 +510 LET S=INT(RND(1)*(18-9)+9) +520 PRINT +525 PRINT "YOU'RE OFF!" +530 FOR O=1 TO V +540 READ Q +550 PRINT +555 PRINT "HERE COMES GATE #";O;":" +560 PRINT S;"M.P.H." +570 LET S1=S +580 PRINT "OPTION"; +590 INPUT O1 +600 IF O1=0 THEN 970 +610 IF O1>8 THEN 1420 +620 IF O1<1 THEN 1420 +630 GOSUB 990 +640 IF S<7 THEN 1390 +650 LET T=T+(Q-S+1) +660 IF S>Q THEN 1630 +670 NEXT O +680 PRINT:PRINT "YOU TOOK ";(T+RND(1));"SECONDS." +690 LET M=T +700 LET M=M/V +710 IF M<1.5-(A*.1) THEN 1650 +720 IF M<2.9-(A*.1) THEN 1680 +730 IF M<4.4-(A*.01) THEN 1710 +740 PRINT:PRINT "DO YOU WANT TO RACE AGAIN"; +750 INPUT B$ +760 REM +770 IF B$="NO" OR B$="no" THEN 1740 +780 IF B$="YES" OR B$="yes" THEN 480 +790 PRINT "PLEASE TYPE 'YES' OR 'NO'" +800 GOTO 740 +810 STOP +820 PRINT +825 PRINT "*** SLALOM: THIS IS THE 1976 WINTER OLYMPIC GIANT SLALOM. YOU ARE" +830 PRINT " THE AMERICAN TEAM'S ONLY HOPE OF A GOLD MEDAL." +840 PRINT +845 PRINT " 0 -- TYPE THIS IS YOU WANT TO SEE HOW LONG YOU'VE TAKEN." +850 PRINT " 1 -- TYPE THIS IF YOU WANT TO SPEED UP A LOT." +860 PRINT " 2 -- TYPE THIS IF YOU WANT TO SPEED UP A LITTLE." +870 PRINT " 3 -- TYPE THIS IF YOU WANT TO SPEED UP A TEENSY." +880 PRINT " 4 -- TYPE THIS IF YOU WANT TO KEEP GOING THE SAME SPEED." +890 PRINT " 5 -- TYPE THIS IF YOU WANT TO CHECK A TEENSY." +900 PRINT " 6 -- TYPE THIS IF YOU WANT TO CHECK A LITTLE." +910 PRINT " 7 -- TYPE THIS IF YOU WANT TO CHECK A LOT." +920 PRINT " 8 -- TYPE THIS IF YOU WANT TO CHEAT AND TRY TO SKIP A GATE." +930 PRINT +935 PRINT " THE PLACE TO USE THESE OPTIONS IS WHEN THE COMPUTER ASKS:" +940 PRINT +945 PRINT "OPTION?" +950 PRINT +955 PRINT " GOOD LUCK!" +957 PRINT +960 GOTO 1470 +970 PRINT "YOU'VE TAKEN ";(T+RND(1));" SECONDS." +980 GOTO 580 +990 ON O1 GOTO 1130,1010,1170,1080,1190,1100,1150,1210 +1000 STOP +1010 LET S=S+INT(RND(1)*(5-3)+3) +1020 PRINT S;"M.P.H." +1030 IF S>Q THEN 1290 +1040 IF S>Q-1 THEN 1060 +1050 RETURN +1060 PRINT "CLOSE ONE!" +1070 RETURN +1080 PRINT S;"M.P.H." +1090 GOTO 1030 +1100 LET S=S-INT(RND(1)*(5-3)+3) +1110 PRINT S;"M.P.H." +1120 GOTO 1030 +1130 LET S=S+INT(RND(1)*(10-5)+5) +1140 GOTO 1080 +1150 LET S=S-INT(RND(1)*(10-5)+5) +1160 GOTO 1110 +1170 LET S=S+INT(RND(1)*(4-1)+1) +1180 GOTO 1110 +1190 LET S=S-INT(RND(1)*(4-1)+1) +1200 GOTO 1110 +1210 PRINT "***CHEAT" +1220 IF RND(1)<.7 THEN 1260 +1230 PRINT "YOU MADE IT!" +1240 LET T=T+1.5 +1250 RETURN +1260 PRINT "AN OFFICIAL CAUGHT YOU!" +1270 PRINT "YOU TOOK ";(T+RND(1));" SECONDS." +1280 GOTO 740 +1290 IF RND(1)<((S-Q)*.1)+.2 THEN 1320 +1300 PRINT "YOU WENT OVER THE NAXIMUM SPEED AND MADE IT!" +1310 RETURN +1320 PRINT "YOU WENT OVER THE MAXIMUM SPEED AND "; +1330 IF RND(1)<.5 THEN 1370 +1340 PRINT "WIPED OUT!" +1350 PRINT "YOU TOOK ";(T+RND(1));" SECONDS" +1360 GOTO 740 +1370 PRINT "SNAGGED A FLAG!" +1380 GOTO 1350 +1390 PRINT "LET'S BE REALISTIC, OK? LET'S GO BACK AND TRY AGAIN..." +1400 LET S=S1 +1410 GOTO 550 +1420 PRINT "WHAT?" +1430 GOTO 580 +1440 PRINT +1445 PRINT "TYPE ";C$;"INS";C$;" FOR INSTRUCTIONS" +1450 PRINT "TYPE ";C$;"MAX";C$;" FOR APPROXIMATE MAXIMUM SPEEDS" +1460 PRINT "TYPE ";C$;"RUN";C$;" FOR THE BEGINNING OF THE RACE" +1470 PRINT "COMMAND--"; +1480 INPUT A$ +1490 REM +1500 IF A$="INS" THEN 820 +1510 IF A$="MAX" THEN 1550 +1520 IF A$="RUN" THEN 410 +1530 PRINT C$;A$;C$;" IS AN ILLEGAL COMMAND--RETRY"; +1540 GOTO 1480 +1550 PRINT "GATE MAX" +1560 PRINT " # M.P.H." +1570 PRINT"----------" +1580 FOR B=1 TO V +1590 READ Q +1600 PRINT B;" ";Q +1610 NEXT B +1620 GOTO 1470 +1630 LET T=T+.5 +1640 GOTO 670 +1650 PRINT "YOU WON A GOLD MEDAL!" +1660 LET G(1)=G(1)+1 +1670 GOTO 1730 +1680 PRINT "YOU WON A SILVER MEDAL" +1690 LET S(1)=S(1)+1 +1700 GOTO 1730 +1710 PRINT "YOU WON A BRONZE MEDAL" +1720 LET B(1)=B(1)+1 +1730 GOTO 740 +1740 PRINT "THANKS FOR THE RACE" +1750 IF G(1)<1 THEN 1770 +1760 PRINT "GOLD MEDALS: ";G(1) +1770 IF S(1)<1 THEN 1790 +1780 PRINT "SILVER MEDALS: ";S(1) +1790 IF B(1)<1 THEN 1830 +1800 PRINT "BRONZE MEDALS: ";B(1) +1810 DATA 14,18,26,29,18,25,28,32,29,20,29,29,25,21,26,29,20,21,20 +1820 DATA 18,26,25,33,31,22 +1830 END diff --git a/data/examples/14games/slots.bas b/data/examples/14games/slots.bas new file mode 100644 index 0000000000000000000000000000000000000000..db61d7faec76cf0dcd82be0306b994babfb53c45 --- /dev/null +++ b/data/examples/14games/slots.bas @@ -0,0 +1,134 @@ +10 REM "SLOTS" +20 REM "Ported by Stefan in 2022" +30 C7$=7 +100 REM PRODUCED BY FRED MIRABELLE AND BOB HARPER ON JAN 29, 1973 +110 REM IT SIMULATES THE SLOT MACHINE. +120 PRINT "YOU ARE IN THE H&M CASINO,IN FRONT OF ONE OF OUR" +130 PRINT "ONE-ARM BANDITS. BET FROM $1 TO $100." +140 PRINT "TO PULL THE ARM, PUNCH THE RETURN KEY AFTER MAKING YOUR BET." +150 LET P=0 +160 PRINT: PRINT"YOUR BET"; +170 INPUT M +180 IF M>100 THEN 860 +190 IF M<1 THEN 880 +200 M=INT(M) +210 GOSUB 1270 +220 PRINT +230 LET X=INT(6*RND(1)+1) +240 LET Y=INT(6*RND(1)+1) +250 LET Z=INT(6*RND(1)+1) +260 PRINT +270 IF X=1 THEN 910 +280 IF X=2 THEN 930 +290 IF X=3 THEN 950 +300 IF X=4 THEN 970 +310 IF X=5 THEN 990 +320 IF X=6 THEN 1010 +330 IF Y=1 THEN 1030 +340 IF Y=2 THEN 1050 +350 IF Y=3 THEN 1070 +360 IF Y=4 THEN 1090 +370 IF Y=5 THEN 1110 +380 IF Y=6 THEN 1130 +390 IF Z=1 THEN 1150 +400 IF Z=2 THEN 1170 +410 IF Z=3 THEN 1190 +420 IF Z=4 THEN 1210 +430 IF Z=5 THEN 1230 +440 IF Z=6 THEN 1250 +450 IF X=Y THEN 600 +460 IF X=Z THEN 630 +470 IF Y=Z THEN 650 +480 PRINT +490 PRINT "YOU LOST." +500 LET P=P-M +510 PRINT "YOUR STANDINGS ARE $",P +520 PRINT "AGAIN"; +530 INPUT A$ +540 IF A$="Y" OR A$="y" THEN 160 +550 PRINT +560 IF P<0 THEN 670 +570 IF P=0 THEN 690 +580 IF P>0 THEN 710 +590 GOTO 1350 +600 IF Y=Z THEN 730 +610 IF Y=1 THEN 820 +620 GOTO 1341 +630 IF Z=1 THEN 820 +640 GOTO 470 +650 IF Z=1 THEN 820 +660 GOTO 1341 +670 PRINT "PAY UP! PLEASE LEAVE YOUR MONEY ON THE TERMINAL." +680 GOTO 1350 +690 PRINT"HEY, YOU BROKE EVEN." +700 GOTO 1350 +710 PRINT "COLLECT YOUR WINNINGS FROM THE H&M CASHIER." +720 GOTO 1350 +730 IF Z=1 THEN 780 +740 PRINT: PRINT"**TOP DOLLAR**" +750 PRINT "YOU WON!" +760 P=(((10*M)+M)+P) +770 GOTO 510 +780 PRINT:PRINT"***JACKPOT***" +790 PRINT "YOU WON!" +800 P=(((100*M)+M)+P) +810 GOTO 510 +820 PRINT:PRINT"*DOUBLE BAR*" +830 PRINT"YOU WON!" +840 P=(((5*M)+M)+P) +850 GOTO 510 +860 PRINT"HOUSE LIMITS ARE $100" +870 GOTO 160 +880 PRINT"MINIMUM BET IS $1" +890 GOTO 160 +900 GOTO 220 +910 PRINT"BAR";:GOSUB 1310 +920 GOTO 330 +930 PRINT"BELL";:GOSUB 1310 +940 GOTO 330 +950 PRINT"ORANGE";:GOSUB 1310 +960 GOTO 330 +970 PRINT"LEMON";:GOSUB 1310 +980 GOTO 330 +990 PRINT"PLUM";:GOSUB 1310 +1000 GOTO 330 +1010 PRINT"CHERRY";:GOSUB 1310 +1020 GOTO 330 +1030 PRINT" BAR";:GOSUB 1310 +1040 GOTO 390 +1050 PRINT" BELL";:GOSUB 1310 +1060 GOTO 390 +1070 PRINT" ORANGE";:GOSUB 1310 +1080 GOTO 390 +1090 PRINT" LEMON";:GOSUB 1310 +1100 GOTO 390 +1110 PRINT" PLUM";:GOSUB 1310 +1120 GOTO 390 +1130 PRINT" CHERRY";:GOSUB 1310 +1140 GOTO 390 +1150 PRINT" BAR" +1160 GOTO 450 +1170 PRINT" BELL" +1180 GOTO 450 +1190 PRINT" ORANGE" +1200 GOTO 450 +1210 PRINT" LEMON" +1220 GOTO 450 +1230 PRINT" PLUM" +1240 GOTO 450 +1250 PRINT" CHERRY" +1260 GOTO 450 +1270 FOR Q4=1 TO 10 +1280 PRINT C7$; +1290 NEXT Q4 +1300 RETURN +1310 FOR T8=1 TO 5 +1320 PRINT C7$; +1330 NEXT T8 +1340 RETURN +1341 PRINT: PRINT "DOUBLE!!" +1342 PRINT"YOU WON!" +1343 P=(((2*M)+M)+P) +1344 GOTO 510 +1350 STOP +9999 END diff --git a/data/examples/14games/stars.bas b/data/examples/14games/stars.bas new file mode 100644 index 0000000000000000000000000000000000000000..cce5961980934a85896a2d0d6821ead78b59fdea --- /dev/null +++ b/data/examples/14games/stars.bas @@ -0,0 +1,54 @@ +10 REM "STARS from 101 BASIC games" +20 REM "Originally from Bob Albrecht in 1975" +30 REM "Ported to Stefan's BASIC in 2021" +40 REM +50 @R=MILLIS(1) +60 A=100:M=7 +170 INPUT "STARS: DO YOU WANT INSTRUCTIONS? ";A$ +190 IF A$(1)="N" THEN 280 +200 REM "INSTRUCTIONS" +210 PRINT "I AM THINKING OF A WHOLE NUMBER FROM 1 TO",A +220 PRINT "TRY TO GUESS MY NUMBER. AFTER YOU GUESS, I" +230 PRINT "WILL TYPE ONE OR MORE STARS (*). THE MORE" +240 PRINT "STARS I TYPE, THE CLOSER YOU ARE TO MY NUMBER." +250 PRINT "ONE STAR (*) MEANS FAR AWAY, SEVEN STARS (*******)" +260 PRINT "MEANS REALLY CLOSE! YOU GET",M,"GUESSES." +270 REM "COMPUTER THINKS OF A NUMBER" +280 PRINT +290 PRINT +300 X=INT(RND(A))+1 +310 PRINT "OK, I AM THINKING OF A NUMBER, START GUESSING." +320 REM "GUESSING BEGINS, HUMAN GETS M GUESSES" +330 FOR K=1 TO M +340 PRINT +350 PRINT "YOUR GUESS"; +360 INPUT G +370 IF G=X THEN 600 +380 D=ABS(G-X) +390 IF D>=64 THEN 510 +400 IF D>=32 THEN 500 +410 IF D>=16 THEN 490 +420 IF D>=8 THEN 480 +430 IF D>=4 THEN 470 +440 IF D>=2 THEN 460 +450 PRINT "*"; +460 PRINT "*"; +470 PRINT "*"; +480 PRINT "*"; +490 PRINT "*"; +500 PRINT "*"; +510 PRINT "*"; +520 PRINT +530 NEXT K +540 REM "DID NOT GUESS IN M GUESSES" +550 PRINT +560 PRINT "SORRY, THAT'S",M,"GUESSES. THE NUMBER WAS",X +580 GOTO 650 +590 REM "WE HAVE A WINNER" +600 PRINT:FOR N=1 TO 40 +610 PRINT "*"; +620 NEXT N +630 PRINT:PRINT +640 PRINT "YOU GOT IT IN",K,"GUESSES!!! LET'S PLAY AGAIN..." +650 GOTO 280 +660 END diff --git a/data/examples/14games/stocks.bas b/data/examples/14games/stocks.bas new file mode 100644 index 0000000000000000000000000000000000000000..93bb81fd4208155e5661191632e2a0e0c32a9362 --- /dev/null +++ b/data/examples/14games/stocks.bas @@ -0,0 +1,232 @@ +10 REM "STOCK MARKET" +20 REM "Ported by Stefan in 2022" +30 REM +100 REM "STOCK MARKET SIMULATION -STOCK-" +101 REM "REVISED 8/18/70 (D. PESSEL, L. BRAUN, C. LOSIK)" +102 REM "IMP VRBLS: A-MRKT TRND SLP; B5-BRKRGE FEE; C-TTL CSH ASSTS;" +103 REM "C5-TTL CSH ASSTS (TEMP); C(I)-CHNG IN STK VAL; D-TTL ASSTS;" +104 REM "E1,E2-LRG CHNG MISC; I-STCK #; I1,I2-STCKS W LRG CHNG;" +105 REM "N1,N2-LRG CHNG DAY CNTS; P5-TTL DAYS PRCHSS; P(I)-PRTFL CNTNTS;" +106 REM "Q9-NEW CYCL?; S4-SGN OF A; S5-TTL DYS SLS; S(I)-VALUE/SHR; " +107 REM "T-TTL STCK ASSTS; T5-TTL VAL OF TRNSCTNS;" +108 REM "W3-LRG CHNG; X1-SMLL CHNG(<$1); Z4,Z5,Z6-NYSE AVE.; Z(I)-TRNSCT" +110 DIM S(5),P(5),Z(5),C(5) +112 REM "SLOPE OF MARKET TREND:A (SAME FOR ALL STOCKS) " +113 LET X=1 +114 LET A=INT((RND(X)/10)*100+.5)/100 +115 LET T5=0 +116 LET X9=0 +117 LET N1=0 +118 LET N2=0 +119 LET E1=0 +120 LET E2=0 +121 REM "INTRODUCTION" +122 PRINT "DO YOU WANT THE INSTRUCTIONS (YES-TYPE 1, NO-TYPE 0)"; +123 INPUT Z9 +124 PRINT +125 PRINT +126 IF Z9<1 THEN 200 +130 PRINT "THIS PROGRAM PLAYS THE STOCK MARKET. YOU WILL BE GIVEN" +132 PRINT "$10,000 AND MAY BUY OR SELL STOCKS. THE STOCK PRICES WILL" +134 PRINT "BE GENERATED RANDOMLY AND THEREFORE THIS MODEL DOES NOT" +135 PRINT "REPRESENT EXACTLY WHAT HAPPENS ON THE EXCHANGE. A TABLE" +136 PRINT "OF AVAILABLE STOCKS, THEIR PRICES, AND THE NUMBER OF SHARES" +137 PRINT "IN YOUR PORTFOLIO WILL BE PRINTED. FOLLOWING THIS, THE" +138 PRINT "INITIALS OF EACH STOCK WILL BE PRINTED WITH A QUESTION" +139 PRINT "MARK. HERE YOU INDICATE A TRANSACTION. TO BUY A STOCK" +140 PRINT "TYPE +NNN, TO SELL A STOCK TYPE -NNN, WHERE NNN IS THE" +141 PRINT "NUMBER OF SHARES. A BROKERAGE FEE OF 1% WILL BE CHARGED" +142 PRINT "ON ALL TRANSACTIONS. NOTE THAT IF A STOCK'S VALUE DROPS" +143 PRINT "TO ZERO IT MAY REBOUND TO A POSITIVE VALUE AGAIN. YOU" +144 PRINT "HAVE $10,000 TO INVEST. USE INTEGERS FOR ALL YOUR INPUTS." +145 PRINT "(NOTE: TO GET A 'FEEL' FOR THE MARKET RUN FOR AT LEAST" +146 PRINT "10 DAYS)" +147 PRINT "-----GOOD LUCK!-----" +200 REM "GENERATION OF STOCK TABLE; INPUT REQUESTS " +210 REM "INITIAL STOCK VALUES " +220 LET S(1)=100 +230 LET S(2)=85 +240 LET S(3)=150 +250 LET S(4)=140 +260 LET S(5)=110 +265 REM "INITIAL T8 - # DAYS FOR FIRST TREND SLOPE (A)" +266 LET T8=INT(4.99*RND(X)+1) +267 REM "RANDOMIZE SIGN OF FIRST TREND SLOPE (A)" +268 IF RND(X)>.5 THEN 270 +269 LET A=-A +270 REM "RANDOMIZE INITIAL VALUES " +280 GOSUB 830 +285 REM "INITIAL PORTFOLIO CONTENTS " +290 FOR I=1 TO 5 +300 LET P(I)=0 +305 LET Z(I)=0 +310 NEXT I +320 PRINT +330 PRINT +333 REM "INITIALIZE CASH ASSETS:C " +335 LET C=10000 +338 REM "PRINT INITIAL PORTFOLIO" +340 PRINT "STOCK"," ","INITIALS","PRICE/SHARE" +350 PRINT "INT. BALLISTIC MISSILES"," IBM",S(1) +352 PRINT "RED CROSS OF AMERICA"," RCA",S(2) +354 PRINT "LICHTENSTEIN, BUMRAP & JOKE"," LBJ",S(3) +356 PRINT "AMERICAN BANKRUPT CO."," ABC",S(4) +358 PRINT "CENSURED BOOKS STORE"," CBS",S(5) +360 PRINT +361 REM "NYSE AVERAGE:Z5; TEMP. VALUE:Z4; NET CHANGE:Z6 " +363 LET Z4=Z5 +364 LET Z5=0 +365 LET T=0 +370 FOR I=1 TO 5 +375 LET Z5=Z5+S(I) +380 LET T=T+S(I)*P(I) +390 NEXT I +391 LET Z5=INT(100*(Z5/5)+.5)/100 +392 LET Z6=INT((Z5-Z4)*100+.5)/100 +393 REM "TOTAL ASSETS:D " +394 LET D=T+C +395 IF X9>0 THEN 398 +396 PRINT "NEW YORK STOCK EXCHANGE AVERAGE: ";Z5 +397 GOTO 399 +398 PRINT "NEW YORK STOCK EXCHANGE AVERAGE: ";Z5;" NET CHANGE ";Z6 +399 PRINT +400 LET T=INT(100*T+.5)/100 +401 PRINT "TOTAL STOCK ASSETS ARE $";T +403 LET C=INT(100*C+.5)/100 +405 PRINT "TOTAL CASH ASSETS ARE $";C +407 LET D=INT(100*D+.5)/100 +408 PRINT "TOTAL ASSETS ARE $";D +410 PRINT +411 IF X9=0 THEN 416 +412 PRINT "DO YOU WISH TO CONTINUE (YES-TYPE 1, NO-TYPE 0)"; +413 INPUT Q9 +414 IF Q9<1 THEN 998 +416 REM "INPUT TRANSACTIONS " +420 PRINT "WHAT IS YOUR TRANSACTION IN" +430 PRINT "IBM"; +440 INPUT Z(1) +450 PRINT "RCA"; +460 INPUT Z(2) +470 PRINT "LBJ"; +480 INPUT Z(3) +490 PRINT "ABC"; +500 INPUT Z(4) +510 PRINT "CBS"; +520 INPUT Z(5) +525 PRINT +530 REM "TOTAL DAY'S PURCHASES IN $:P5" +540 LET P5=0 +550 REM "TOTAL DAY'S SALES IN $:S5" +560 LET S5=0 +570 FOR I=1 TO 5 +575 LET Z(I)=INT(Z(I)+.5) +580 IF Z(I)<=0 THEN 610 +590 LET P5=P5+Z(I)*S(I) +600 GOTO 620 +610 LET S5=S5-Z(I)*S(I) +612 IF -Z(I)<=P(I) THEN 620 +614 PRINT "YOU HAVE OVERSOLD A STOCK; TRY AGAIN." +616 GOTO 420 +620 NEXT I +622 REM "TOTAL VALUE OF TRANSACTIONS:T5 " +625 LET T5=P5+S5 +630 REM "BROKERAGE FEE:B5 " +640 LET B5=INT(.01*T5*100+.5)/100 +650 REM "CASH ASSETS=OLD CASH ASSETS-TOTAL PURCHASES" +652 REM "-BROKERAGE FEES+TOTAL SALES:C5 " +654 LET C5=C-P5-B5+S5 +656 IF C5>=0 THEN 674 +658 PRINT "YOU HAVE USED $"-C5" MORE THAN YOU HAVE." +660 GOTO 420 +674 LET C=C5 +675 REM "CALCULATE NEW PORTFOLIO " +680 FOR I=1 TO 5 +690 LET P(I)=P(I)+Z(I) +700 NEXT I +710 REM "CALCULATE NEW STOCK VALUES " +720 GOSUB 830 +750 REM "PRINT PORTFOLIO " +751 REM "BELL RINGING-DIFFERENT ON MANY COMPUTERS " +755 PRINT +756 PRINT "********** END OF DAY'S TRADING **********" +757 PRINT +758 PRINT +759 IF X9<1 THEN 769 +769 PRINT "STOCK","PRICE/SHARE","HOLDINGS", "VALUE", "NET PRICE CHANGE" +770 PRINT "IBM", S(1), P(1), S(1)*P(1), C(1) +771 PRINT "RCA", S(2), P(2), S(2)*P(2), C(2) +772 PRINT "LBJ", S(3), P(3), S(3)*P(3), C(3) +773 PRINT "ABC", S(4), P(4), S(4)*P(4), C(4) +774 PRINT "CBS", S(5), P(5), S(5)*P(5), C(5) +775 LET X9=1 +780 PRINT +790 PRINT +810 GOTO 360 +829 REM "NEW STOCK VALUES - SUBROUTINE" +830 REM "RANDOMLY PRODUCE NEW STOCK VALUES BASED ON PREVIOUS" +831 REM "DAY'S VALUES " +832 REM "N1,N2 ARE RANDOM NUMBERS OF DAYS WHICH RESPECTIVELY" +833 REM "DETERMINE WHEN STOCK I1 WILL INCREASE 10 PTS. AND STOCK" +834 REM "I2 WILL DECREASE 10 PTS. " +840 REM "IF N1 DAYS HAVE PASSED, PICK AN I1, SET E1, DETERMINE NEW N1 " +841 IF N1>0 THEN 850 +845 LET I1=INT(4.99*RND(X)+1) +846 LET N1=INT(4.99*RND(X)+1) +847 LET E1=1 +850 REM "IF N2 DAYS HAVE PASSED, PICK AN I2, SET E2, DETERMINE NEW N2 " +851 IF N2>0 THEN 860 +855 LET I2=INT(4.99*RND(X)+1) +856 LET N2=INT(4.99*RND(X)+1) +857 LET E2=1 +860 REM "DEDUCT ONE DAY FROM N1 AND N2" +861 LET N1=N1-1 +862 LET N2=N2-1 +890 REM "LOOP THROUGH ALL STOCKS" +900 FOR I=1 TO 5 +910 LET X1=RND(X) +915 IF X1>.25 THEN 920 +916 LET X1=.25 +917 GOTO 935 +920 IF X1>.5 THEN 925 +921 LET X1=.5 +922 GOTO 935 +925 IF X1>.75 THEN 930 +926 LET X1=.75 +927 GOTO 935 +930 LET X1=0.0 +931 REM "BIG CHANGE CONSTANT:W3 (SET TO ZERO INITIALLY)" +935 LET W3=0 +936 IF E1<1 THEN 945 +937 IF INT(I1+.5)<>INT(I+.5) THEN 945 +938 REM "ADD 10 PTS. TO THIS STOCK; RESET E1 " +939 LET W3=10 +943 LET E1=0 +945 IF E2<1 THEN 955 +947 IF INT(I2+.5)<>INT(I+.5) THEN 955 +948 REM "SUBTRACT 10 PTS. FROM THIS STOCK; RESET E2" +949 LET W3=W3-10 +953 LET E2=0 +954 REM "C(I) IS CHANGE IN STOCK VALUE" +955 LET C(I)=INT(A*S(I))+X1+INT(3-6*RND(X)+.5)+W3 +956 LET C(I)=INT(100*C(I)+.5)/100 +957 LET S(I)=S(I)+C(I) +960 IF S(I)>0 THEN 967 +964 LET C(I)=0 +965 LET S(I)=0 +966 GOTO 970 +967 LET S(I)=INT(100*S(I)+.5)/100 +970 NEXT I +972 REM "AFTER T8 DAYS RANDOMLY CHANGE TREND SIGN AND SLOPE " +973 LET T8=T8-1 +974 IF T8<1 THEN 985 +980 RETURN +985 REM "RANDOMLY CHANGE TREND SIGN AND SLOPE (A), AND DURATION " +986 REM "OF TREND (T8)" +990 LET T8=INT(4.99*RND(X)+1) +992 LET A=INT((RND(X)/10)*100+.5)/100 +993 LET S4=RND(X) +994 IF S4<=.5 THEN 997 +995 LET A=-A +997 RETURN +998 PRINT "HOPE YOU HAD FUN!!" +999 END diff --git a/data/examples/14games/superstartrek.bas b/data/examples/14games/superstartrek.bas new file mode 100644 index 0000000000000000000000000000000000000000..328181470e9f6364b27c3db5b3921278a044984c --- /dev/null +++ b/data/examples/14games/superstartrek.bas @@ -0,0 +1,433 @@ +2 REM "Settings for the BASIC Interpreter" +4 SET 11,1: REM "Set TAB to MS mode" +10 REM "SUPER STARTREK - MAY 16,1978 - REQUIRES 24K MEMORY" +30 REM "" +40 REM "**** **** STAR TREK **** ****" +50 REM "**** SIMULATION OF A MISSION OF THE STARSHIP ENTERPRISE," +60 REM "**** AS SEEN ON THE STAR TREK TV SHOW." +70 REM "**** ORIGIONAL PROGRAM BY MIKE MAYFIELD, MODIFIED VERSION" +80 REM "**** PUBLISHED IN DEC'S 101 BASIC GAMES, BY DAVE AHL." +90 REM "**** MODIFICATIONS TO THE LATTER (PLUS DEBUGGING) BY BOB" +100 REM "*** LEEDOM - APRIL & DECEMBER 1974," +110 REM "*** WITH A LITTLE HELP FROM HIS FRIENDS . . ." +120 REM "*** COMMENTS, EPITHETS, AND SUGGESTIONS SOLICITED --" +130 REM "*** SEND TO: R. C. LEEDOM" +140 REM "*** WESTINGHOUSE DEFENSE & ELECTRONICS SYSTEMS CNTR." +150 REM "*** BOX 746, M.S. 338" +160 REM "*** BALTIMORE, MD 21203" +170 REM "***" +180 REM "*** CONVERTED TO MICROSOFT 8 K BASIC 3/16/78 BY JOHN GORDERS" +190 REM "*** LINE NUMBERS FROM VERSION STREK7 OF 1/12/75 PRESERVED AS" +200 REM "*** MUCH AS POSSIBLE WHILE USING MULTIPLE STATEMENTS PER LINE" +205 REM "*** SOME LINES ARE LONGER THAN 72 CHARACTERS; THIS WAS DONE" +210 REM "*** BY USING "?" INSTEAD OF "PRINT" WHEN ENTERING LINES" +215 REM "***" +216 REM "Ported by Stefan in 2022 to Arduino IoT BASIC" +220 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT +221 PRINT" ,------*------," +222 PRINT" ,------------- '--- ------'" +223 PRINT" '-------- --' / /" +224 PRINT" ,---' '-------/ /--," +225 PRINT" '----------------'":PRINT +226 PRINT" THE USS ENTERPRISE --- NCC-1701" +227 PRINT:PRINT:PRINT:PRINT:PRINT +260 REM "CLEAR 600 - not needed to reserve string space in MS" +270 Z$=" " +330 DIM G(8,8),C(9,2),K(3,3),N(3),Z(8,8),D(8) +340 DIM A$(256),Q$(256),TT$(256), O1$(80) +370 T=INT(RND(1)*20+20)*100:T0=T:T9=25+INT(RND(1)*10):D0=0:E=3000:E0=E +440 P=10:P0=P:S9=200:S=0:B9=2:K9=0:X$="":X0$=" IS " +470 DEF FND(D)=SQR(POW(K(I,1)-S1,2)+POW(K(I,2)-S2,2)) +475 DEF FNR(R)=INT(RND(R)*7.98+1.01) +480 REM INITIALIZE ENTERPRIZE'S POSITION +490 Q1=FNR(1):Q2=FNR(1):S1=FNR(1):S2=FNR(1) +530 FOR I=1 TO 9:C(I,1)=0:C(I,2)=0:NEXT I +540 C(3,1)=-1:C(2,1)=-1:C(4,1)=-1:C(4,2)=-1:C(5,2)=-1:C(6,2)=-1 +600 C(1,2)=1:C(2,2)=1:C(6,1)=1:C(7,1)=1:C(8,1)=1:C(8,2)=1:C(9,2)=1 +670 FOR I=1 TO 8:D(I)=0:NEXT I +710 A1$="NAVSRSLRSPHATORSHEDAMCOMXXX" +810 REM "SETUP WHAT EXHISTS IN GALAXY . . ." +815 REM "K3= # KLINGONS B3= # STARBASES S3 = # STARS" +820 FOR I=1 TO 8:FOR J=1 TO 8:K3=0:Z(I,J)=0:R1=RND(1) +850 IF R1>.98 THEN K3=3:K9=K9+3:GOTO 980 +860 IF R1>.95 THEN K3=2:K9=K9+2:GOTO 980 +870 IF R1>.80 THEN K3=1:K9=K9+1 +980 B3=0:IF RND(1)>.96 THEN B3=1:B9=B9+1 +1040 G(I,J)=K3*100+B3*10+FNR(1):NEXT J:NEXT I:IF K9>T9 THEN T9=K9+1 +1100 IF B9<>0THEN 1200 +1150 IF G(Q1,Q2)<200 THEN G(Q1,Q2)=G(Q1,Q2)+120:K9=K9+1 +1160 B9=1:G(Q1,Q2)=G(Q1,Q2)+10:Q1=FNR(1):Q2=FNR(1) +1200 K7=K9:IF B9<>1 THEN X$="S":X0$=" ARE " +1230 PRINT"YOUR ORDERS ARE AS FOLLOWS:" +1240 PRINT" DESTROY THE ";K9;" KLINGON WARSHIPS WHICH HAVE INVADED" +1252 PRINT" THE GALAXY BEFORE THEY CAN ATTACK FEDERATION HEADQUARTERS" +1260 PRINT" ON STARDATE ";T0+T9;" THIS GIVES YOU ";T9;" DAYS. THERE ";X0$ +1272 PRINT" ";B9;" STARBASE";X$;" IN THE GALAXY FOR RESUPPLYING YOUR SHIP" +1280 PRINT:REM "PRINT HIT ANY KEY EXCEPT RETURN WHEN READY TO ACCEPT COMMAND" +1300 I=RND(1):REM "IF INP(1)=13 THEN 1300" +1310 REM "HERE ANY TIME NEW QUADRANT ENTERED" +1320 Z4=Q1:Z5=Q2:K3=0:B3=0:S3=0:G5=0:D4=.5*RND(1):Z(Q1,Q2)=G(Q1,Q2) +1390 IF Q1<1 OR Q1>8 OR Q2<1 OR Q2>8 THEN 1600 +1430 GOSUB 9030:PRINT:IF T0<>T THEN 1490 +1460 PRINT"YOUR MISSION BEGINS WITH YOUR STARSHIP LOCATED" +1470 PRINT"IN THE GALACTIC QUADRANT, '";G2$;"'.":GOTO 1500 +1490 PRINT"NOW ENTERING ";G2$;" QUADRANT . . ." +1500 PRINT:K3=INT(G(Q1,Q2)*.01):B3=INT(G(Q1,Q2)*.1)-10*K3 +1540 S3=G(Q1,Q2)-100*K3-10*B3:IF K3=0 THEN 1590 +1560 PRINT"COMBAT AREA CONDITION RED":IF S>200 THEN 1590 +1580 PRINT" SHIELDS DANGEROUSLY LOW" +1590 FOR I=1 TO 3:K(I,1)=0:K(I,2)=0:NEXT I +1600 FOR I=1 TO 3:K(I,3)=0:NEXT I:REM "Q$=Z$+Z$+Z$+Z$+Z$+Z$+Z$+LEFT$(Z$,17)" +1610 Q$="": FOR I=1 TO 6:Q$(LEN(Q$)+1)=Z$: NEXT: Q$(LEN(Q$)+1)=Z$(1,17) +1660 REM "POSITION ENTERPRISE IN QUADRANT, THEN PLACE K3 KLINGONS, &" +1670 REM "B3 STARBASES, & S3 STARS ELSEWHERE." +1680 A$="<*>":Z1=S1:Z2=S2:GOSUB 8670:IF K3<1 THEN 1820 +1720 FOR I=1 TO K3:GOSUB 8590:A$="+K+":Z1=R1:Z2=R2 +1780 GOSUB 8670:K(I,1)=R1:K(I,2)=R2:K(I,3)=S9*(0.5+RND(1)):NEXT I +1820 IF B3<1 THEN 1910 +1880 GOSUB 8590:A$=">!<":Z1=R1:B4=R1:Z2=R2:B5=R2:GOSUB 8670 +1910 FOR I=1 TO S3:GOSUB 8590:A$=" * ":Z1=R1:Z2=R2:GOSUB 8670:NEXT I +1980 GOSUB 6430 +1990 IF S+E>10 THEN IF E>10 OR D(7)=0 THEN 2060 +2020 PRINT:PRINT"** FATAL ERROR ** YOU'VE JUST STRANDED YOUR SHIP IN " +2030 PRINT"SPACE":PRINT"YOU HAVE INSUFFICIENT MANEUVERING ENERGY,"; +2040 PRINT" AND SHIELD CONTROL":PRINT"IS PRESENTLY INCAPABLE OF CROSS"; +2050 PRINT"-CIRCUITING TO ENGINE ROOM!!":GOTO 6220 +2060 INPUT"COMMAND? ";A$ +2080 FOR I=1 TO 9:IF A$(1,3)<>A1$(3*I-2,3*I) THEN 2160 +2140 ON I GOTO 2300,1980,4000,4260,4700,5530,5690,7290,6270 +2160 NEXT I:PRINT"ENTER ONE OF THE FOLLOWING:" +2180 PRINT" NAV (TO SET COURSE)" +2190 PRINT" SRS (FOR SHORT RANGE SENSOR SCAN)" +2200 PRINT" LRS (FOR LONG RANGE SENSOR SCAN)" +2210 PRINT" PHA (TO FIRE PHASERS)" +2220 PRINT" TOR (TO FIRE PHOTON TORPEDOES)" +2230 PRINT" SHE (TO RAISE OR LOWER SHIELDS)" +2240 PRINT" DAM (FOR DAMAGE CONTROL REPORTS)" +2250 PRINT" COM (TO CALL ON LIBRARY-COMPUTER)" +2260 PRINT" XXX (TO RESIGN YOUR COMMAND)":PRINT:GOTO 1990 +2290 REM "COURSE CONTROL BEGINS HERE" +2300 INPUT"COURSE (0-9)? ";C1:IF C1=9 THEN C1=1 +2310 IF C1>=1 AND C1<9 THEN 2350 +2330 PRINT" LT. SULU REPORTS, 'INCORRECT COURSE DATA, SIR!'":GOTO1990 +2350 X$="8":IF D(1)<0 THEN X$="0.2" +2360 PRINT"WARP FACTOR (0-";X$;")";:INPUT W1:IF D(1)<0 AND W1>.2 THEN 2470 +2380 IF W1>0 AND W1<=8 THEN 2490 +2390 IF W1=0 THEN 1990 +2420 PRINT" CHIEF ENGINEER SCOTT REPORTS 'THE ENGINES WON'T TAKE"; +2430 PRINT" WARP ";W1;"!'":GOTO 1990 +2470 PRINT"WARP ENGINES ARE DAMAGED. MAXIMUM SPEED = WARP 0.2":GOTO1990 +2490 N=INT(W1*8+.5):IF E-N>=0 THEN 2590 +2500 PRINT"ENGINEERING REPORTS 'INSUFFICIENT ENERGY AVAILABLE" +2510 PRINT" FOR MANEUVERING AT WARP";W1;"!'" +2530 IF S=1 THEN D6=1 +2770 FOR I=1 TO 8:IF D(I)>=0 THEN 2880 +2790 D(I)=D(I)+D6:IF D(I)>-.1 AND D(I)<0 THEN D(I)=-.1:GOTO 2880 +2800 IF D(I)<0 THEN 2880 +2810 IF D1<>1 THEN D1=1:PRINT"DAMAGE CONTROL REPORT: "; +2840 TAB 8:R1=I:GOSUB 8790:PRINT G2$;" REPAIR COMPLETED." +2880 NEXT I:IF RND(1)>.2 THEN 3070 +2910 R1=FNR(1):IF RND(1)>=.6 THEN 3000 +2930 D(R1)=D(R1)-(RND(1)*5+1):PRINT"DAMAGE CONTROL REPORT: "; +2960 GOSUB 8790:PRINT G2$;" DAMAGED":PRINT:GOTO 3070 +3000 D(R1)=D(R1)+RND(1)*3+1:PRINT"DAMAGE CONTROL REPORT: "; +3030 GOSUB 8790:PRINT G2$;" STATE OF REPAIR IMPROVED":PRINT +3060 REM "BEGIN MOVING STARSHIP" +3070 A$=" ":Z1=INT(S1):Z2=INT(S2):GOSUB 8670 +3110 X1=C(C1,1)+(C(C1+1,1)-C(C1,1))*(C1-INT(C1)):X=S1:Y=S2 +3140 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1)):Q4=Q1:Q5=Q2 +3170 FOR I=1 TO N:S1=S1+X1:S2=S2+X2:IF S1<1 OR S1>=9 OR S2<1 OR S2>=9 THEN 3500 +3240 S8=INT(S1)*24+INT(S2)*3-26:IF Q$(S8,S8+1)=" "THEN 3360 +3320 S1=INT(S1-X1):S2=INT(S2-X2):PRINT"WARP ENGINES SHUT DOWN AT "; +3350 PRINT"SECTOR ";S1;",";S2;" DUE TO BAD NAVAGATION":GOTO 3370 +3360 NEXT I:S1=INT(S1):S2=INT(S2) +3370 A$="<*>":Z1=INT(S1):Z2=INT(S2):GOSUB 8670:GOSUB 3910:T8=1 +3430 IF W1<1 THEN T8=.1*INT(10*W1) +3450 T=T+T8:IF T>T0+T9 THEN 6220 +3470 REM "SEE IF DOCKED, THEN GET COMMAND" +3480 GOTO 1980 +3490 REM "EXCEEDED QUADRANT LIMITS" +3500 X=8*Q1+X+N*X1:Y=8*Q2+Y+N*X2:Q1=INT(X/8):Q2=INT(Y/8):S1=INT(X-Q1*8) +3550 S2=INT(Y-Q2*8):IF S1=0 THEN Q1=Q1-1:S1=8 +3590 IF S2=0 THEN Q2=Q2-1:S2=8 +3620 X5=0:IF Q1<1 THEN X5=1:Q1=1:S1=1 +3670 IF Q1>8 THEN X5=1:Q1=8:S1=8 +3710 IF Q2<1 THEN X5=1:Q2=1:S2=1 +3750 IF Q2>8 THEN X5=1:Q2=8:S2=8 +3790 IF X5=0 THEN 3860 +3800 PRINT"LT. UHURA REPORTS MESSAGE FROM STARFLEET COMMAND:" +3810 PRINT" 'PERMISSION TO ATTEMPT CROSSING OF GALACTIC PERIMETER" +3820 PRINT" IS HEREBY *DENIED*. SHUT DOWN YOUR ENGINES.'" +3830 PRINT"CHIEF ENGINEER SCOTT REPORTS 'WARP ENGINES SHUT DOWN" +3840 PRINT" AT SECTOR ";S1;",";S2;" OF QUADRANT ";Q1;",";Q2;".'" +3850 IF T>T0+T9 THEN 6220 +3860 IF 8*Q1+Q2=8*Q4+Q5 THEN 3370 +3870 T=T+1:GOSUB 3910:GOTO 1320 +3900 REM "MANEUVER ENERGY S/R **" +3910 E=E-N-10:IF E>=0 THEN RETURN +3930 PRINT"SHIELD CONTROL SUPPLIES ENERGY TO COMPLETE THE MANEUVER." +3940 S=S+E:E=0:IF S<=0 THEN S=0 +3980 RETURN +3990 REM "LONG RANGE SENSOR SCAN CODE" +4000 IF D(3)<0 THEN PRINT"LONG RANGE SENSORS ARE INOPERABLE":GOTO 1990 +4030 PRINT"LONG RANGE SCAN FOR QUADRANT ";Q1;",";Q2 +4040 O1$="-------------------":PRINT O1$ +4060 FOR I=Q1-1 TO Q1+1:N(1)=-1:N(2)=-2:N(3)=-3:FOR J=Q2-1 TO Q2+1 +4120 IF I>0 AND I<9 AND J>0 AND J<9 THEN N(J-Q2+2)=G(I,J):Z(I,J)=G(I,J) +4180 NEXT J:FOR L=1 TO 3:PRINT": ";:IF N(L)<0 THEN PRINT"*** ";:GOTO 4230 +4210 T$=STR(N(L)+1000):PRINT T$(1,3);" "; +4230 NEXT L:PRINT":":PRINT O1$:NEXT I:GOTO 1990 +4250 REM "PHASER CONTROL CODE BEGINS HERE" +4260 IF D(4)<0 THEN PRINT"PHASERS INOPERATIVE":GOTO 1990 +4265 IF K3>0 THEN 4330 +4270 PRINT"SCIENCE OFFICER SPOCK REPORTS 'SENSORS SHOW NO ENEMY SHIPS" +4280 PRINT" IN THIS QUADRANT'":GOTO 1990 +4330 IF D(8)<0 THEN PRINT"COMPUTER FAILURE HAMPERS ACCURACY" +4350 PRINT"PHASERS LOCKED ON TARGET; "; +4360 PRINT"ENERGY AVAILABLE = ";E;" UNITS" +4370 INPUT"NUMBER OF UNITS TO FIRE? ";X:IF X<=0 THEN 1990 +4400 IF E-X<0 THEN 4360 +4410 E=E-X:IF D(7)<0 THEN X=X*RND(1) +4450 H1=INT(X/K3):FOR I=1 TO 3:IF K(I,3)<=0 THEN 4670 +4480 H=INT((H1/FND(0))*(RND(1)+2)):IF H>.15*K(I,3) THEN 4530 +4500 PRINT"SENSORS SHOW NO DAMAGE TO ENEMY AT ";K(I,1);",";K(I,2):GOTO 4670 +4530 K(I,3)=K(I,3)-H:PRINTH;"UNIT HIT ON KLINGON AT SECTOR ";K(I,1);","; +4550 PRINT K(I,2):IF K(I,3)<=0 THEN PRINT"*** KLINGON DESTROYED ***":GOTO 4580 +4560 PRINT" (SENSORS SHOW ";K(I,3);" UNITS REMAINING)":GOTO 4670 +4580 K3=K3-1:K9=K9-1:Z1=K(I,1):Z2=K(I,2):A$=" ":GOSUB 8670 +4650 K(I,3)=0:G(Q1,Q2)=G(Q1,Q2)-100:Z(Q1,Q2)=G(Q1,Q2):IF K9<=0 THEN 6370 +4670 NEXT I:GOSUB 6000:GOTO 1990 +4690 REM "PHOTON TORPEDO CODE BEGINS HERE" +4700 IF P<=0 THEN PRINT"ALL PHOTON TORPEDOES EXPENDED":GOTO 1990 +4730 IF D(5)<0 THEN PRINT"PHOTON TUBES ARE NOT OPERATIONAL":GOTO 1990 +4760 INPUT"PHOTON TORPEDO COURSE (1-9)? ";C1:IF C1=9 THEN C1=1 +4780 IF C1>=1 AND C1<9 THEN 4850 +4790 PRINT"ENSIGN CHEKOV REPORTS, 'INCORRECT COURSE DATA, SIR!'" +4800 GOTO 1990 +4850 X1=C(C1,1)+(C(C1+1,1)-C(C1,1))*(C1-INT(C1)):E=E-2:P=P-1 +4860 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1)):X=S1:Y=S2 +4910 PRINT"TORPEDO TRACK:" +4920 X=X+X1:Y=Y+X2:X3=INT(X+.5):Y3=INT(Y+.5) +4960 IF X3<1 OR X3>8 OR Y3<1 OR Y3>8 THEN 5490 +5000 PRINT" ";X3;",";Y3:A$=" ":Z1=X:Z2=Y:GOSUB 8830 +5050 IF Z3<>0 THEN 4920 +5060 A$="+K+":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 5210 +5110 PRINT"*** KLINGON DESTROYED ***":K3=K3-1:K9=K9-1:IF K9<=0 THEN 6370 +5150 FOR I=1 TO 3:IF X3=K(I,1) AND Y3=K(I,2)THEN 5190 +5180 NEXT I:I=3 +5190 K(I,3)=0:GOTO 5430 +5210 A$=" * ":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 5280 +5260 PRINT"STAR AT ";X3;",";Y3;"ABSORBED TORPEDO ENERGY.":GOSUB 6000:GOTO 1990 +5280 A$=">!<":Z1=X:Z2=Y:GOSUB 8830:IF Z3=0 THEN 4760 +5330 PRINT"*** STARBASE DESTROYED ***":B3=B3-1:B9=B9-1 +5360 IF B9>0 OR K9>T-T0-T9 THEN 5400 +5370 PRINT"THAT DOES IT, CAPTAIN!! YOU ARE HEREBY RELIEVED OF COMMAND" +5380 PRINT"AND SENTENCED TO 99 STARDATES AT HARD LABOR ON CYGNUS 12!!" +5390 GOTO 6270 +5400 PRINT"STARFLEET COMMAND REVIEWING YOUR RECORD TO CONSIDER" +5410 PRINT"COURT MARTIAL!":D0=0 +5430 Z1=X:Z2=Y:A$=" ":GOSUB 8670 +5470 G(Q1,Q2)=K3*100+B3*10+S3:Z(Q1,Q2)=G(Q1,Q2):GOSUB 6000:GOTO 1990 +5490 PRINT"TORPEDO MISSED":GOSUB 6000:GOTO 1990 +5520 REM "SHIELD CONTROL" +5530 IF D(7)<0 THEN PRINT"SHIELD CONTROL INOPERABLE":GOTO 1990 +5560 PRINT"ENERGY AVAILABLE =";E+S;:INPUT" NUMBER OF UNITS TO SHIELDS? ";X +5580 IF X<0 OR S=X THEN PRINT"":GOTO 1990 +5590 IF X<=E+S THEN 5630 +5600 PRINT"SHIELD CONTROL REPORTS 'THIS IS NOT THE FEDERATION TREASURY.'" +5610 PRINT"":GOTO 1990 +5630 E=E+S-X:S=X:PRINT"DEFLECTOR CONTROL ROOM REPORT:" +5660 PRINT" 'SHIELDS NOW AT ";INT(S);" UNITS PER YOUR COMMAND.'":GOTO 1990 +5680 REM "DAMAGE CONTROL" +5690 IF D(6)>=0 THEN 5910 +5700 PRINT"DAMAGE CONTROL REPORT NOT AVAILABLE":IF D0=0 THEN 1990 +5720 D3=0:FOR I=1 TO 8:IF D(I)<0 THEN D3=D3+.1 +5760 NEXT I:IF D3=0 THEN 1990 +5780 PRINT:D3=D3+D4:IF D3>=1 THEN D3=.9 +5810 PRINT"TECHNICIANS STANDING BY TO EFFECT REPAIRS TO YOUR SHIP;" +5820 PRINT"ESTIMATED TIME TO REPAIR:";.01*INT(100*D3);"STARDATES" +5840 INPUT "WILL YOU AUTHORIZE THE REPAIR ORDER (Y/N)? ";A$ +5860 IF A$<>"Y" THEN 1990 +5870 FOR I=1 TO 8:IF D(I)<0 THEN D(I)=0 +5890 NEXT I:T=T+D3+.1 +5910 PRINT:PRINT"DEVICE STATE OF REPAIR":FOR R1=1 TO 8 +5920 GOSUB 8790:PRINT G2$;: TAB 25: PRINT INT(D(R1)*100)*.01 +5950 NEXT R1:PRINT:IF D0<>0 THEN 5720 +5980 GOTO 1990 +5990 REM "KLINGONS SHOOTING" +6000 IF K3<=0 THEN RETURN +6010 IF D0<>0 THEN PRINT"STARBASE SHIELDS PROTECT THE ENTERPRISE":RETURN +6040 FOR I=1 TO 3:IF K(I,3)<=0 THEN 6200 +6060 H=INT((K(I,3)/FND(1))*(2+RND(1))):S=S-H:K(I,3)=K(I,3)/(3+RND(0)) +6080 PRINT H;"UNIT HIT ON ENTERPRISE FROM SECTOR";K(I,1);",";K(I,2) +6090 IFS<=0THEN6240 +6100 PRINT" ":IFH<20THEN6200 +6120 IF RND(1)>.6ORH/S<=.02 THEN 6200 +6140 R1=FNR(1):D(R1)=D(R1)-H/S-.5*RND(1):GOSUB 8790 +6170 PRINT"DAMAGE CONTROL REPORTS ";G2$;" DAMAGED BY THE HIT'" +6200 NEXT I:RETURN +6210 REM "END OF GAME" +6220 PRINT"IT IS STARDATE";T:GOTO 6270 +6240 PRINT:PRINT"THE ENTERPRISE HAS BEEN DESTROYED. THEN FEDERATION "; +6250 PRINT"WILL BE CONQUERED":GOTO 6220 +6270 PRINT"THERE WERE ";K9;" KLINGON BATTLE CRUISERS LEFT AT" +6280 PRINT"THE END OF YOUR MISSION." +6290 PRINT:PRINT:IF B9=0 THEN 6360 +6310 PRINT"THE FEDERATION IS IN NEED OF A NEW STARSHIP COMMANDER" +6320 PRINT"FOR A SIMILAR MISSION -- IF THERE IS A VOLUNTEER," +6330 INPUT"LET HIM STEP FORWARD AND ENTER 'AYE'";A$:IFA$="AYE"THEN CLR: GOTO 10 +6360 END +6370 PRINT"CONGRULATION, CAPTAIN! THEN LAST KLINGON BATTLE CRUISER" +6380 PRINT"MENACING THE FDERATION HAS BEEN DESTROYED.":PRINT +6400 PRINT"YOUR EFFICIENCY RATING IS ";1000*(K7/(T-T0))^2:GOTO 6290 +6420 REM "SHORT RANGE SENSOR SCAN & STARTUP SUBROUTINE" +6430 FOR I=S1-1 TO S1+1:FOR J=S2-1 TO S2+1 +6450 IF INT(I+.5)<1 OR INT(I+.5)>8 OR INT(J+.5)<1 OR INT(J+.5)>8 THEN 6540 +6490 A$=">!<":Z1=I:Z2=J:GOSUB 8830:IF Z3=1 THEN 6580 +6540 NEXT J:NEXT I:D0=0:GOTO 6650 +6580 D0=1:C$="DOCKED":E=E0:P=P0 +6620 PRINT"SHIELDS DROPPED FOR DOCKING PURPOSES":S=0:GOTO 6720 +6650 IF K3>0 THEN C$="*RED*":GOTO 6720 +6660 C$="GREEN":IF E=0 THEN 6770 +6730 PRINT:PRINT"*** SHORT RANGE SENSORS ARE OUT ***":PRINT:RETURN +6770 O1$="---------------------------------":PRINT O1$:FOR I=1 TO 8 +6820 FOR J=(I-1)*24+1TO(I-1)*24+22 STEP 3:PRINT" ";Q$(J,J+2);:NEXT J +6830 ON I GOTO 6850,6900,6960,7020,7070,7120,7180,7240 +6850 PRINT" STARDATE ";INT(T*10)*.1:GOTO 7260 +6900 PRINT" CONDITION ";C$:GOTO 7260 +6960 PRINT" QUADRANT ";Q1;",";Q2:GOTO 7260 +7020 PRINT" SECTOR ";S1;",";S2:GOTO 7260 +7070 PRINT" PHOTON TORPEDOES ";INT(P):GOTO 7260 +7120 PRINT" TOTAL ENERGY ";INT(E+S):GOTO 7260 +7180 PRINT" SHIELDS ";INT(S):GOTO 7260 +7240 PRINT" KLINGONS REMAINING";INT(K9) +7260 NEXT I:PRINT O1$:RETURN +7280 REM "LIBRARY COMPUTER CODE" +7290 IF D(8)<0 THEN PRINT"COMPUTER DISABLED":GOTO 1990 +7320 INPUT"COMPUTER ACTIVE AND AWAITING COMMAND";A:IF A<0 THEN 1990 +7350 PRINT:H8=1:ON A+1 GOTO 7540,7900,8070,8500,8150,7400 +7360 PRINT"FUNCTIONS AVAILABLE FROM LIBRARY-COMPUTER:" +7370 PRINT" 0 = CUMULATIVE GALACTIC RECORD" +7372 PRINT" 1 = STATUS REPORT" +7374 PRINT" 2 = PHOTON TORPEDO DATA" +7376 PRINT" 3 = STARBASE NAV DATA" +7378 PRINT" 4 = DIRECTION/DISTANCE CALCULATOR" +7380 PRINT" 5 = GALAXY 'REGION NAME' MAP":PRINT:GOTO 7320 +7390 REM "SETUP TO CHANGE CUM GAL RECORD TO GALAXY MAP" +7400 H8=0:G5=1:PRINT" THE GALAXY":GOTO 7550 +7530 REM "CUM GALACTIC RECORD" +7540 REM "INPUT'DO YOU WANT A HARDCOPY? IS THE TTY ON (Y/N)';A$" +7542 REM "IFA$="Y"THENPOKE1229,2:POKE1237,3:NULL1" +7543 PRINT:PRINT" "; +7544 PRINT"COMPUTER RECORD OF GALAXY FOR QUADRANT";Q1;",";Q2 +7546 PRINT +7550 PRINT" 1 2 3 4 5 6 7 8" +7560 O1$=" ----- ----- ----- ----- ----- ----- ----- -----" +7570 PRINT O1$:FOR I=1 TO 8:PRINT I;:IF H8=0 THEN 7740 +7630 FOR J=1 TO 8:PRINT" ";:IF Z(I,J)=0 THEN PRINT"***";:GOTO 7720 +7700 TT$=STR(Z(I,J)+1000): PRINT TT$(LEN(TT$)-2,LEN(TT$)) +7720 NEXT J:GOTO 7850 +7740 Z4=I:Z5=1:GOSUB 9030:J0=INT(15-.5*LEN(G2$)):TAB J0:PRINT G2$; +7800 Z5=5:GOSUB 9030:J0=INT(39-.5*LEN(G2$)):TAB J0: PRINT G2$; +7850 PRINT:PRINT O1$:NEXT I:PRINT:GOTO 1990 +7890 REM "STATUS REPORT" +7900 PRINT " STATUS REPORT:":X$="":IF K9>1 THEN X$="S" +7940 PRINT"KLINGON";X$;" LEFT: ";K9 +7960 PRINT"MISSION MUST BE COMPLETED IN";.1*INT((T0+T9-T)*10);"STARDATES" +7970 X$="S":IF B9<2 THEN X$="":IF B9<1 THEN 8010 +7980 PRINT"THE FEDERATION IS MAINTAINING ";B9;" STARBASE";X$;" IN THE GALAXY" +7990 GOTO 5690 +8010 PRINT"YOUR STUPIDITY HAS LEFT YOU ON YOUR ON IN" +8020 PRINT" THE GALAXY -- YOU HAVE NO STARBASES LEFT!":GOTO 5690 +8060 REM "TORPEDO, BASE NAV, D/D CALCULATOR" +8070 IF K3<=0 THEN 4270 +8080 X$="":IF K3>1 THEN X$="S" +8090 PRINT"FROM ENTERPRISE TO KLINGON BATTLE CRUISER ";X$ +8100 H8=0:FOR I=1 TO 3:IF K(I,3)<=0 THEN 8480 +8110 W1=K(I,1):X=K(I,2) +8120 C1=S1:A=S2:GOTO 8220 +8150 PRINT"DIRECTION/DISTANCE CALCULATOR:" +8160 PRINT"YOU ARE AT QUADRANT ";Q1;",";Q2;" SECTOR ";S1;",";S2 +8170 PRINT"PLEASE ENTER":INPUT" INITIAL COORDINATES (X,Y)? ";C1,A +8200 INPUT" FINAL COORDINATES (X,Y)?";W1,X +8220 X=X-A:A=C1-W1:IF X<0 THEN 8350 +8250 IF A<0 THEN 8410 +8260 IF X>0 THEN 8280 +8270 IF A=0 THEN C1=5:GOTO 8290 +8280 C1=1 +8290 IF ABS(A)<=ABS(X) THEN 8330 +8310 PRINT"DIRECTION =";C1+(((ABS(A)-ABS(X))+ABS(A))/ABS(A)):GOTO 8460 +8330 PRINT"DIRECTION =";C1+(ABS(A)/ABS(X)):GOTO 8460 +8350 IFA>0THEN C1=3:GOTO 8420 +8360 IFX<>0THEN C1=5:GOTO 8290 +8410 C1=7 +8420 IFABS(A)>=ABS(X)THEN8450 +8430 PRINT"DIRECTION =";C1+(((ABS(X)-ABS(A))+ABS(X))/ABS(X)):GOTO8460 +8450 PRINT"DIRECTION =";C1+(ABS(X)/ABS(A)) +8460 PRINT"DISTANCE =";SQR(POW(X,2)+POW(A,2)):IFH8=1THEN1990 +8480 NEXTI:GOTO1990 +8500 IFB3<>0THENPRINT"FROM ENTERPRISE TO STARBASE:":W1=B4:X=B5:GOTO8120 +8510 PRINT"MR. SPOCK REPORTS, 'SENSORS SHOW NO STARBASES IN THIS"; +8520 PRINT" QUADRANT.'":GOTO1990 +8580 REM "FIND EMPTY PLACE IN QUADRANT (FOR THINGS)"" +8590 R1=FNR(1):R2=FNR(1):A$=" ":Z1=R1:Z2=R2:GOSUB8830:IFZ3=0THEN8590 +8600 RETURN +8660 REM "INSERT IN STRING ARRAY FOR QUADRANT" +8670 S8=INT(Z2-.5)*3+INT(Z1-.5)*24+1 +8675 IF LEN(A$)<>3THEN PRINT"ERROR":STOP +8676 Q2=LEN(Q$):Q1=1:IF Q2-189>0 THEN Q1=Q2-189 +8680 IF S8=1 THEN TT$=A$: TT$(LEN(TT$)+1)=Q$(Q1,Q2):Q$=TT$: RETURN +8690 IF S8=190 THEN Q$=Q$(1,189):Q$(190)=A$:RETURN +8700 TT$=Q$(1,S8-1):TT$(S8)=A$:IF Q2-190+S8>0 THEN Q1=Q2-190+S8 +8710 TT$(LEN(TT$)+1)=Q$(Q1,Q2): Q$=TT$: RETURN +8720 REM "Q$=LEFT$(Q$,S8-1)+A$+RIGHT$(Q$,190-S8):RETURN" +8780 REM "PRINTS DEVICE NAME" +8790 ON R1 GOTO 8792,8794,8796,8798,8800,8802,8804,8806 +8792 G2$="WARP ENGINES":RETURN +8794 G2$="SHORT RANGE SENSORS":RETURN +8796 G2$="LONG RANGE SENSORS":RETURN +8798 G2$="PHASER CONTROL":RETURN +8800 G2$="PHOTON TUBES":RETURN +8802 G2$="DAMAGE CONTROL":RETURN +8804 G2$="SHIELD CONTROL":RETURN +8806 G2$="LIBRARY-COMPUTER":RETURN +8820 REM "STRING COMPARISON IN QUADRANT ARRAY" +8830 Z1=INT(Z1+.5):Z2=INT(Z2+.5):S8=(Z2-1)*3+(Z1-1)*24+1:Z3=0 +8890 IF Q$(S8,S8+2)<>A$ THEN RETURN +8900 Z3=1:RETURN +9010 REM "QUADRANT NAME IN G2$ FROM Z4,Z5 (=Q1,Q2)" +9020 REM "CALL WITH G5=1 TO GET REGION NAME ONLY" +9030 IF Z5<=4 THEN ON Z4 GOTO 9040,9050,9060,9070,9080,9090,9100,9110 +9035 GOTO9120 +9040 G2$="ANTARES":GOTO 9210 +9050 G2$="RIGEL":GOTO 9210 +9060 G2$="PROCYON":GOTO 9210 +9070 G2$="VEGA":GOTO 9210 +9080 G2$="CANOPUS":GOTO 9210 +9090 G2$="ALTAIR":GOTO 9210 +9100 G2$="SAGITTARIUS":GOTO 9210 +9110 G2$="POLLUX":GOTO 9210 +9120 ON Z4 GOTO 9130,9140,9150,9160,9170,9180,9190,9200 +9130 G2$="SIRIUS":GOTO 9210 +9140 G2$="DENEB":GOTO 9210 +9150 G2$="CAPELLA":GOTO 9210 +9160 G2$="BETELGEUSE":GOTO 9210 +9170 G2$="ALDEBARAN":GOTO 9210 +9180 G2$="REGULUS":GOTO 9210 +9190 G2$="ARCTURUS":GOTO 9210 +9200 G2$="SPICA" +9210 IF G5<>1 THEN ON Z5 GOTO 9230,9240,9250,9260,9230,9240,9250,9260 +9220 RETURN +9230 G2$(LEN(G2$)+1)=" I":RETURN +9240 G2$(LEN(G2$)+1)=" II":RETURN +9250 G2$(LEN(G2$)+1)=" III":RETURN +9260 G2$(LEN(G2$)+1)=" IV":RETURN diff --git a/data/examples/14games/superstartrekins.bas b/data/examples/14games/superstartrekins.bas new file mode 100644 index 0000000000000000000000000000000000000000..7ef68c11c2e4afcb7558bf67fc7e045f64cac760 --- /dev/null +++ b/data/examples/14games/superstartrekins.bas @@ -0,0 +1,127 @@ +10 REM "INSTRUCTIONS FOR 'SUPER STARTREK' MAR 5, 1978" +20 FOR I=1 TO 12:PRINT:NEXT I +21 TAB 10: PRINT "*************************************" +22 TAB 10: PRINT "* *" +23 TAB 10: PRINT "* *" +30 TAB 10: PRINT "* * * SUPER STAR TREK * * *" +31 TAB 10: PRINT "* *" +32 TAB 10: PRINT "* *" +35 TAB 10: PRINT "*************************************" +36 FOR I=1 TO 8:PRINT:NEXT I +40 INPUT "DO YOU NEED INSTRUCTIONS (Y/N)? ";K$:IF K$="N" THEN 2000 +44 PRINT +45 REM "PRINT 'TURN THE TTY ON-LINE AND HIT ANY KEY EXCEPT RETURN'" +46 REM "IF INP(1)=13 THEN 46" +50 REM "POKE 1229,2:POKE 1237,3:NULL 1" +90 PRINT" INSTRUCTIONS FOR 'SUPER STAR TREK'" +100 PRINT +110 PRINT"1. WHEN YOU SEE \COMMAND ?\ PRINTED, ENTER ONE OF THE LEGAL" +120 PRINT" COMMANDS (NAV,SRS,LRS,PHA,TOR,SHE,DAM,COM, OR XXX)." +130 PRINT"2. IF YOU SHOULD TYPE IN AN ILLEGAL COMMAND, YOU'LL GET A SHORT" +140 PRINT" LIST OF THE LEGAL COMMANDS PRINTED OUT." +150 PRINT"3. SOME COMMANDS REQUIRE YOU TO ENTER DATA (FOR EXAMPLE, THE" +160 PRINT" 'NAV' COMMAND COMES BACK WITH 'COURSE (1-9) ?'.) IF YOU" +170 PRINT" TYPE IN ILLEGAL DATA (LIKE NEGATIVE NUMBERS), THAN COMMAND" +180 PRINT" WILL BE ABORTED" +190 PRINT +270 PRINT" THE GALAXY IS DIVIDED INTO AN 8 X 8 QUADRANT GRID," +280 PRINT"AND EACH QUADRANT IS FURTHER DIVIDED INTO AN 8 X 8 SECTOR GRID." +290 PRINT +300 PRINT" YOU WILL BE ASSIGNED A STARTING POINT SOMEWHERE IN THE" +310 PRINT"GALAXY TO BEGIN A TOUR OF DUTY AS COMANDER OF THE STARSHIP" +320 PRINT"\ENTERPRISE\; YOUR MISSION: TO SEEK AND DESTROY THE FLEET OF" +330 PRINT"KLINGON WARWHIPS WHICH ARE MENACING THE UNITED FEDERATION OF" +340 PRINT"PLANETS." +360 PRINT +370 PRINT" YOU HAVE THE FOLLOWING COMMANDS AVAILABLE TO YOU AS CAPTAIN" +380 PRINT"OF THE STARSHIP ENTERPRISE:" +385 PRINT +390 PRINT"\NAV\ COMMAND = WARP ENGINE CONTROL --" +400 PRINT" COURSE IS IN A CIRCULAR NUMERICAL 4 3 2" +410 PRINT" VECTOR ARRANGEMENT AS SHOWN . . ." +420 PRINT" INTEGER AND REAL VALUES MAY BE ..." +430 PRINT" USED. (THUS COURSE 1.5 IS HALF- 5 ---*--- 1" +440 PRINT" WAY BETWEEN 1 AND 2 ..." +450 PRINT" . . ." +460 PRINT" VALUES MAY APPROACH 9.0, WHICH 6 7 8" +470 PRINT" ITSELF IS EQUIVALENT TO 1.0" +480 PRINT" COURSE" +490 PRINT" ONE WARP FACTOR IS THE SIZE OF " +500 PRINT" ONE QUADTANT. THEREFORE, TO GET" +510 PRINT" FROM QUADRANT 6,5 TO 5,5, YOU WOULD" +520 PRINT" USE COURSE 3, WARP FACTOR 1." +530 PRINT +540 PRINT"\SRS\ COMMAND = SHORT RANGE SENSOR SCAN" +550 PRINT" SHOWS YOU A SCAN OF YOUR PRESENT QUADRANT." +555 PRINT +560 PRINT" SYMBOLOGY ON YOUR SENSOR SCREEN IS AS FOLLOWS:" +570 PRINT" <*> = YOUR STARSHIP'S POSITION" +580 PRINT" +K+ = KLINGON BATTLE CRUISER" +590 PRINT" >!< = FEDERATION STARBASE (REFUEL/REPAIR/RE-ARM HERE!)" +600 PRINT" * = STAR" +605 PRINT +610 PRINT" A CONDENSED 'STATUS REPORT' WILL ALSO BE PRESENTED." +620 PRINT +640 PRINT"\LRS\ COMMAND = LONG RANGE SENSOR SCAN" +650 PRINT" SHOWS CONDITIONS IN SPACE FOR ONE QUADRANT ON EACH SIDE" +660 PRINT" OF THE ENTERPRISE (WHICH IS IN THE MIDDLE OF THE SCAN)" +670 PRINT" THE SCAN IS CODED IN THE FORM \###\, WHERE TH UNITS DIGIT" +680 PRINT" IS THE NUMBER OF STARS, THE TENS DIGIT IS THE NUMBER OF" +690 PRINT" STARBASES, AND THE HUNDRESDS DIGIT IS THE NUMBER OF" +700 PRINT" KLINGONS." +705 PRINT +706 PRINT" EXAMPLE - 207 = 2 KLINGONS, NO STARBASES, & 7 STARS." +710 PRINT +720 PRINT"\PHA\ COMMAND = PHASER CONTROL." +730 PRINT" ALLOWS YOU TO DESTROY THE KLINGON BATTLE CRUISERS BY " +740 PRINT" ZAPPING THEM WITH SUITABLY LARGE UNITS OF ENERGY TO" +750 PRINT" DEPLETE THEIR SHIELD POWER. (REMBER, KLINGONS HAVE" +760 PRINT" PHASERS TOO!)" +770 PRINT +780 PRINT"\TOR\ COMMAND = PHOTON TORPEDO CONTROL" +790 PRINT" TORPEDO COURSE IS THE SAME AS USED IN WARP ENGINE CONTROL" +800 PRINT" IF YOU HIT THE KLINGON VESSEL, HE IS DESTROYED AND" +810 PRINT" CANNOT FIRE BACK AT YOU. IF YOU MISS, YOU ARE SUBJECT TO" +820 PRINT" HIS PHASER FIRE. IN EITHER CASE, YOU ARE ALSO SUBJECT TO " +825 PRINT" THE PHASER FIRE OF ALL OTHER KLINGONS IN THE QUADRANT." +830 PRINT +835 PRINT" THE LIBRARY-COMPUTER (\COM\ COMMAND) HAS AN OPTION TO " +840 PRINT" COMPUTE TORPEDO TRAJECTORY FOR YOU (OPTION 2)" +850 PRINT +860 PRINT"\SHE\ COMMAND = SHIELD CONTROL" +870 PRINT" DEFINES THE NUMBER OF ENERGY UNITS TO BE ASSIGNED TO THE" +880 PRINT" SHIELDS. ENERGY IS TAKEN FROM TOTAL SHIP'S ENERGY. NOTE" +890 PRINT" THAN THE STATUS DISPLAY TOTAL ENERGY INCLUDES SHIELD ENERGY" +900 PRINT +910 PRINT"\DAM\ COMMAND = DAMMAGE CONTROL REPORT" +920 PRINT" GIVES THE STATE OF REPAIR OF ALL DEVICES. WHERE A NEGATIVE" +930 PRINT" 'STATE OF REPAIR' SHOWS THAT THE DEVICE IS TEMPORARILY" +940 PRINT" DAMAGED." +950 PRINT +960 PRINT"\COM\ COMMAND = LIBRARY-COMPUTER" +970 PRINT" THE LIBRARY-COMPUTER CONTAINS SIX OPTIONS:" +980 PRINT" OPTION 0 = CUMULATIVE GALACTIC RECORD" +990 PRINT" THIS OPTION SHOWES COMPUTER MEMORY OF THE RESULTS OF ALL" +1000 PRINT" PREVIOUS SHORT AND LONG RANGE SENSOR SCANS" +1010 PRINT" OPTION 1 = STATUS REPORT" +1020 PRINT" THIS OPTION SHOWS THE NUMBER OF KLINGONS, STARDATES," +1030 PRINT" AND STARBASES REMAINING IN THE GAME." +1040 PRINT" OPTION 2 = PHOTON TORPEDO DATA" +1050 PRINT" WHICH GIVES DIRECTIONS AND DISTANCE FROM THE ENTERPRISE" +1060 PRINT" TO ALL KLINGONS IN YOUR QUADRANT" +1070 PRINT" OPTION 3 = STARBASE NAV DATA" +1080 PRINT" THIS OPTION GIVES DIRECTION AND DISTANCE TO ANY " +1090 PRINT" STARBASE WITHIN YOUR QUADRANT" +1100 PRINT" OPTION 4 = DIRECTION/DISTANCE CALCULATOR" +1110 PRINT" THIS OPTION ALLOWS YOU TO ENTER COORDINATES FOR" +1120 PRINT" DIRECTION/DISTANCE CALCULATIONS" +1130 PRINT" OPTION 5 = GALACTIC /REGION NAME/ MAP" +1140 PRINT" THIS OPTION PRINTS THE NAMES OF THE SIXTEEN MAJOR " +1150 PRINT" GALACTIC REGIONS REFERRED TO IN THE GAME." +1990 REM "POKE 1229,0:POKE 1237,1:NULL 0" +2000 REM "PRINT:PRINT:PRINT" +2010 REM "PRINT 'TURN CASSETTE PLAYER ON AND HIT ANY KEY EXCEPT RETURN'" +2020 REM "IF INP(1)=13 THEN 2020" +2030 REM "PRINT" +2040 REM "PRINT 'TURN CASSETTE PLAYER OFF AND '' +2050 REM "PRINT 'TYPE 'RUN' WHEN COMPUTER PRINTS 'OK'' diff --git a/data/examples/14games/synonym.bas b/data/examples/14games/synonym.bas new file mode 100644 index 0000000000000000000000000000000000000000..5bca2fd16f56d7a9ffee2137ff08628140db5fed --- /dev/null +++ b/data/examples/14games/synonym.bas @@ -0,0 +1,52 @@ +2 REM "SYNONYM" +4 REM "Ported by Stefan in 2022" +10 DIM R$(8, 5),W$(20, 10),L(30),R(30) +20 R$()(1)="RIGHT": R$()(2)="CORRECT": R$()(3)="FINE": R$()(4)="GOOD!" +30 R$()(5)="CHECK" +70 C=0 +90 PRINT "A SYNONYM OF A WORD MEANS ANOTHER WORD IN THE ENGLISH" +100 PRINT "LANGUAGE WHICH HAS THE SAME OR VERY NEARLY THE SAME"; +110 PRINT " MEANING." +130 PRINT "I CHOOSE A WORD -- YOU TYPE A SYNONYM." +140 PRINT "IF YOU CAN'T THINK OF A SYNONYM, TYPE THE WORD 'HELP'" +145 PRINT "AND I WILL TELL YOU A SYNONYM.": PRINT +150 RESTORE: C=C+1: READ N +160 IF C>N THEN 420 +170 N1=INT(RND(1)*N+1) +174 IF R(N1)=1 THEN 170 +176 R(N1)=1 +180 FOR I=1 TO N1 +190 READ N2 +200 FOR J=1 TO N2 +210 READ W$()(J) +220 NEXT J +230 NEXT I +232 FOR J=1 TO N2: L(J)=J: NEXT J +235 L0=N2: G=1: PRINT +237 L(G)=L(L0): L0=N2-1: PRINT +240 PRINT " WHAT IS A SYNONYM OF ";W$()(G);: INPUT A$ +250 IF A$="HELP" THEN 340 +260 FOR K=1 TO N2 +270 IF G=K THEN 290 +280 IF A$=W$()(K) THEN 320 +290 NEXT K +300 PRINT " TRY AGAIN.": GOTO 240 +320 PRINT R$()(INT(RND(1)*5+1)): GOTO 150 +340 G1=INT(RND(1)*L0+1) +360 PRINT "**** A SYNONYM OF ";W$()(G);" IS ";W$()(L(G1));".": PRINT +370 L(G1)=L(L0): L0=L0-1: GOTO 240 +420 PRINT: PRINT "SYNONYM DRILL COMPLETED.": GOTO 999 +500 DATA 10 +510 DATA 5,"FIRST","START","BEGINNING","ONSET","INITIAL" +520 DATA 5,"SIMILAR","ALIKE","SAME","LIKE","RESEMBLING" +530 DATA 5,"MODEL","PATTERN","PROTOTYPE","STANDARD","CRITERION" +540 DATA 5,"SMALL","INSIGNIFICANT","LITTLE","TINY","MINUTE" +550 DATA 6,"STOP","HALT","STAY","ARREST","CHECK","STANDSTILL" +560 DATA 6,"HOUSE","DWELLING","RESIDENCE","DOMICILE","LODGING" +565 DATA "HABITATION" +570 DATA 7,"PIT","HOLE","HOLLOW","WELL","GULF","CHASM","ABYSS" +580 DATA 7,"PUSH","SHOVE","THRUST","PROD","POKE","BUTT","PRESS" +590 DATA 6,"RED","ROUGE","SCARLET","CRIMSON","FLAME","RUBY" +600 DATA 7,"PAIN","SUFFERING","HURT","MISERY","DISTRESS","ACHE" +605 DATA "DISCOMFORT" +999 END diff --git a/data/examples/14games/target.bas b/data/examples/14games/target.bas new file mode 100644 index 0000000000000000000000000000000000000000..cdd5bb82a98bfda912f23fffedb5a4487dcd97c2 --- /dev/null +++ b/data/examples/14games/target.bas @@ -0,0 +1,54 @@ +10 REM "TARGET" +20 REM "Ported by Stefan in 2022" +30 REM +40 IF NOT USR(0,3) THEN PRINT "FLOAT NEEDED": END +100 R=1: R1=57.296: P=3.14159 +110 PRINT "YOU ARE THE WEAPONS OFFICER ON THE STARSHIP ENTERPRISE" +120 PRINT "AND THIS IS A TEST TO SEE HOW ACCURATE A SHOT YOU" +130 PRINT "ARE IN A THREE-DIMENSIONAL RANGE. YOU WILL BE TOLD" +140 PRINT "THE RADIAN OFFSET FOR THE X AND Z AXES, THE LOCATION" +150 PRINT "OF THE TARGET IN THREE DIMENSIONAL RECTANGULAR COORDINATES," +160 PRINT "THE APPROXIMATE NUMBER OF DEGREES FROM THE X AND Z" +170 PRINT "AXES, AND THE APPROXIMATE DISTANCE TO THE TARGET." +180 PRINT "YOU WILL THEN PROCEEED TO SHOOT AT THE TARGET UNTIL IT IS" +190 PRINT "DESTROYED!": PRINT: PRINT "GOOD LUCK!!":PRINT: PRINT +220 A=RND(1)*2*P: B=RND(1)*2*P: Q=INT(A*R1): W=INT(B*R1) +260 PRINT "RADIANS FROM X AXIS =";A;" FROM Z AXIS =";B +280 P1=100000*RND(1)+RND(1): X=SIN(B)*COS(A)*P1: Y=SIN(B)*SIN(A)*P1 +290 Z=COS(B)*P1 +340 PRINT "TARGET SIGHTED: APPROXIMATE COORDINATES: X=";X;" Y=";Y;" Z=";Z +345 R=R+1: IF R>5 THEN 390 +350 ON R GOTO 355,360,365,370,375 +355 P3=INT(P1*0.05)*20: GOTO 390 +360 P3=INT(P1*0.1)*10: GOTO 390 +365 P3=INT(P1*0.5)*2: GOTO 390 +370 P3=INT(P1): GOTO 390 +375 P3=P1 +390 PRINT " ESTIMATED DISTANCE =";P3 +400 PRINT +401 INPUT "ANGLE DEVIATION FROM X=", A1 +402 INPUT "ANGLE DEVIATION FROM Z=", B1 +403 INPUT "DISTANCE =", P2 +410 PRINT: IF P2<20 THEN PRINT "YOU BLEW YOURSELF UP!!": GOTO 580 +420 A1=A1/R1: B1=B1/R1: PRINT "RADIANS FROM X AXIS =";A1;" "; +425 PRINT "FROM Z AXIS =";B1 +480 X1=P2*SIN(B1)*COS(A1): Y1=P2*SIN(B1)*SIN(A1): Z1=P2*COS(B1) +510 D=SQR(POW(X1-X,2)+POW(Y1-Y,2)+POW(Z1-Z, 2)) +520 IF D>20 THEN 670 +530 PRINT: PRINT " * * * HIT * * * TARGET IS NON-FUNCTIONAL": PRINT +550 PRINT "DISTANCE OF EXPLOSION FROM TARGET WAS ";D;" KILOMETERS." +570 PRINT: PRINT "MISSION ACCOMPLISHED IN ";R;" SHOTS." +580 R=0: FOR I=1 TO 5: PRINT: NEXT I: PRINT "NEXT TARGET...": PRINT +590 GOTO 220 +670 X2=X1-X: Y2=Y1-Y: Z2=Z1-Z: IF X2<0 THEN 730 +710 PRINT "SHOT IN FRONT OF TARGET ";X2;" KILOMETERS.": GOTO 740 +730 PRINT "SHOT BEHIND TARGET ";-X2;" KILOMETERS." +740 IF Y2<0 THEN 770 +750 PRINT "SHOT TO LEFT OF TARGET ";Y2;" KILOMETERS.": GOTO 780 +770 PRINT "SHOT TO RIGHT OF TARGET ";-Y2;" KILOMETERS." +780 IF Z2<0 THEN 810 +790 PRINT "SHOT ABOVE TARGET ";Z2;" KILOMETERS.": GOTO 820 +810 PRINT "SHOT BELOW TARGET ";-Z2;" KILOMETERS." +820 PRINT "APPROX POSITION OF EXPLOSION: X=";X1;" Y=";Y1;" Z=";Z1 +830 PRINT " DISTANCE FROM TARGET =";D: PRINT: GOTO 345 +999 END diff --git a/data/examples/14games/tictac.bas b/data/examples/14games/tictac.bas new file mode 100644 index 0000000000000000000000000000000000000000..afc285224ffa0af850a52b1676840ab3395d0025 --- /dev/null +++ b/data/examples/14games/tictac.bas @@ -0,0 +1,63 @@ +10 REM "TIC TAC TOE from 101 BASIC games" +20 REM "by David Ahl." +30 REM "Ported to Stefan's BASIC in 2021" +40 REM "The machine goes first" +100 PRINT "Welcome to tictactoe" +110 PRINT "The game board is numbered:" +120 PRINT +130 PRINT "1 2 3" +140 PRINT "8 9 4" +150 PRINT "7 6 5" +160 PRINT +200 REM "Main Program" +210 PRINT "Staring a new game" +230 A=9 +240 M=A +250 GOSUB 800 +260 P=M +270 B=P%8+1 +280 M=B +290 GOSUB 800 +300 Q=M +310 IF Q=(B+3)%8+1 GOTO 360 +320 C=(B+3)%8+1 +330 M=C +340 GOSUB 900 +350 GOTO 640 +360 C=(B+1)%8+1 +370 M=C +380 GOSUB 800 +390 R=M +400 IF R=(C+3)%8+1 GOTO 450 +410 D=(C+3)%8+1 +420 M=D +430 GOSUB 900 +440 GOTO 640 +450 IF P%2<>0 GOTO 500 +460 D=(C+6)%8+1 +470 M=D +480 GOSUB 900 +490 GOTO 640 +500 D=(C+2)%8+1 +510 M=D +520 GOSUB 800 +530 S=M +540 IF S=(D+3)%8+1 GOTO 590 +550 E=(D+3)%8+1 +560 M=E +570 GOSUB 900 +580 REM "Game is a draw" +590 E=(D+5)%8+1 +600 M=E +610 GOSUB 900 +620 PRINT "The game is a draw." +630 GOTO 200 +640 PRINT "and wins! ********" +650 GOTO 200 +800 REM "Subroutine to ask user for the move" +810 GOSUB 900 +820 INPUT "Your move? ", M +830 RETURN +900 REM "Subroutine to display move" +910 PRINT "Computer moves:",M +920 RETURN diff --git a/data/examples/14games/tictac2.bas b/data/examples/14games/tictac2.bas new file mode 100644 index 0000000000000000000000000000000000000000..a234c1621ae53c8d826499d32aa38161e0e9cb14 --- /dev/null +++ b/data/examples/14games/tictac2.bas @@ -0,0 +1,80 @@ +10 REM "TIC TAC TOE from 101 BASIC games" +20 REM "by David Ahl." +30 REM "Ported to Stefan's BASIC in 2021" +40 REM "The machine goes first" +100 PRINT "Welcome to tictactoe" +200 REM "Main Program" +210 PRINT "Staring a new game" +220 A$="123894765" +230 A=9 +240 M=A +250 GOSUB 800 +260 P=M +270 B=P%8+1 +280 M=B +290 GOSUB 800 +300 Q=M +310 IF Q=(B+3)%8+1 GOTO 360 +320 C=(B+3)%8+1 +330 M=C +340 GOSUB 900 +350 GOTO 640 +360 C=(B+1)%8+1 +370 M=C +380 GOSUB 800 +390 R=M +400 IF R=(C+3)%8+1 GOTO 450 +410 D=(C+3)%8+1 +420 M=D +430 GOSUB 900 +440 GOTO 640 +450 IF P%2<>0 GOTO 500 +460 D=(C+6)%8+1 +470 M=D +480 GOSUB 900 +490 GOTO 640 +500 D=(C+2)%8+1 +510 M=D +520 GOSUB 800 +530 S=M +540 IF S=(D+3)%8+1 GOTO 590 +550 E=(D+3)%8+1 +560 M=E +570 GOSUB 900 +580 REM "Game is a draw" +590 E=(D+5)%8+1 +600 M=E +610 GOSUB 900 +620 PRINT "The game is a draw." +630 GOTO 200 +640 PRINT "and wins! ********" +650 GOTO 200 +800 REM "Subroutine to ask user for the move" +810 GOSUB 900 +820 INPUT "Your move? ", M +830 IF M<1 OR M>9 GOTO 820 +840 M$="x" : GOSUB 1100 +850 IF X=1 GOTO 820 +860 RETURN +900 REM "Subroutine to display move" +910 PRINT "Computer moves:", M +920 M$="o" : GOSUB 1100 +930 GOSUB 1000 +940 RETURN +1000 REM "Subroutine to display the board" +1010 PRINT A$(1,1); "|"; A$(2,2); "|"; A$(3,3) +1020 PRINT "-+-+-" +1030 PRINT A$(4,4); "|"; A$(5,5); "|"; A$(6,6) +1040 PRINT "-+-+-" +1050 PRINT A$(7,7); "|"; A$(8,8); "|"; A$(9,9) +1060 RETURN +1100 REM "Set move to board" +1110 FOR I=1 TO 9 +1120 IF (A$(I,I))=("0"+M) THEN BREAK +1130 NEXT +1140 IF I=10 THEN X=1: RETURN +1150 X=0 +1160 B$=A$(I+1) +1170 A$(I)=M$ +1180 A$(I+1)=B$ +1190 RETURN diff --git a/data/examples/14games/tictacf.bas b/data/examples/14games/tictacf.bas new file mode 100644 index 0000000000000000000000000000000000000000..ca68e77b76537939afa1dbc9cc364fb1098c41fb --- /dev/null +++ b/data/examples/14games/tictacf.bas @@ -0,0 +1,117 @@ +2 REM "TIC-TAC-TOE" +4 REM "Ported by Stefan 2022" +6 REM +8 PRINT "THE BOARD IS NUMBERED:" +10 PRINT " 1 2 3" +12 PRINT " 4 5 6" +14 PRINT " 7 8 9" +16 PRINT:PRINT:PRINT +20 DIM S(9) +50 INPUT"DO YOU WANT 'X' OR 'O'? ";C$ +51 IF C$="x" THEN C$="X" +52 IF C$="o" THEN C$="O" +55 IF C$="X" THEN 475 +60 P$="O":Q$="X" +100 G=-1:H=1:IF S(5)<>0 THEN 103 +102 S(5)=-1:GOTO 195 +103 IF S(5)<>1 THEN 106 +104 IF S(1)<>0 THEN 110 +105 S(1)=-1:GOTO 195 +106 IF S(2)=1 AND S(1)=0 THEN 181 +107 IF S(4)=1 AND S(1)=0 THEN 181 +108 IF S(6)=1 AND S(9)=0 THEN 189 +109 IF S(8)=1 AND S(9)=0 THEN 189 +110 IF G=1 THEN 112 +111 GOTO 118 +112 J=3*INT((M-1)/3)+1 +113 IF 3*INT((M-1)/3)+1=M THEN K=1 +114 IF 3*INT((M-1)/3)+2=M THEN K=2 +115 IF 3*INT((M-1)/3)+3=M THEN K=3 +116 GOTO 120 +118 FOR J=1 TO 7 STEP 3:FOR K=1 TO 3 +120 IF S(J)<>G THEN 130 +122 IF S(J+2)<>G THEN 135 +126 IF S(J+1)<>0 THEN 150 +128 S(J+1)=-1:GOTO 195 +130 IF S(J)=H THEN 150 +131 IF S(J+2)<>G THEN 150 +132 IF S(J+1)<>G THEN 150 +133 S(J)=-1:GOTO 195 +135 IF S(J+2)<>0 THEN 150 +136 IF S(J+1)<>G THEN 150 +138 S(J+2)=-1:GOTO 195 +150 IF S(K)<>G THEN 160 +152 IF S(K+6)<>G THEN 165 +156 IF S(K+3)<>0 THEN 170 +158 S(K+3)=-1:GOTO 195 +160 IF S(K)=H THEN 170 +161 IF S(K+6)<>G THEN 170 +162 IF S(K+3)<>G THEN 170 +163 S(K)=-1:GOTO 195 +165 IF S(K+6)<>0 THEN 170 +166 IF S(K+3)<>G THEN 170 +168 S(K+6)=-1:GOTO 195 +170 GOTO 450 +171 IF S(3)=G AND S(7)=0 THEN 187 +172 IF S(9)=G AND S(1)=0 THEN 181 +173 IF S(7)=G AND S(3)=0 THEN 183 +174 IF S(9)=0 AND S(1)=G THEN 189 +175 IF G=-1 THEN G=1:H=-1:GOTO 110 +176 IF S(9)=1 AND S(3)=0 THEN 182 +177 FOR I=2 TO 9:IF S(I)<>0 THEN 179 +178 S(I)=-1:GOTO 195 +179 NEXT I +181 S(1)=-1:GOTO 195 +182 IF S(1)=1 THEN 177 +183 S(3)=-1:GOTO 195 +187 S(7)=-1:GOTO 195 +189 S(9)=-1 +195 PRINT:PRINT"THE COMPUTER MOVES TO..." +202 GOSUB 1000 +205 GOTO 500 +450 IF G=1 THEN 465 +455 IF J=7 AND K=3 THEN 465 +460 NEXT K +463 NEXT J +465 IF S(5)=G THEN 171 +467 GOTO 175 +475 P$="X":Q$="O" +500 PRINT:INPUT "WHERE DO YOU MOVE? ";M +502 IF M=0 THEN PRINT"THANKS FOR THE GAME.":GOTO 2000 +503 IF M>9 THEN 506 +505 IF S(M)=0 THEN 510 +506 PRINT"THAT SQUARE IS OCCUPIED.":PRINT:PRINT:GOTO 500 +510 G=1:S(M)=1 +520 GOSUB 1000 +530 GOTO 100 +1000 PRINT:FOR I=1 TO 9:PRINT" ";:IF S(I)<>-1 THEN 1014 +1012 PRINT Q$" ";:GOTO 1020 +1014 IF S(I)<>0 THEN 1018 +1016 PRINT" ";:GOTO 1020 +1018 PRINT P$" "; +1020 IF I<>3 AND I<>6 THEN 1050 +1030 PRINT:PRINT"---+---+---" +1040 GOTO 1080 +1050 IF I=9 THEN 1080 +1060 PRINT"!"; +1080 NEXT I:PRINT:PRINT:PRINT +1095 FOR I=1 TO 7 STEP 3 +1100 IF S(I)<>S(I+1)THEN 1115 +1105 IF S(I)<>S(I+2)THEN 1115 +1110 IF S(I)=-1 THEN 1350 +1112 IF S(I)=1 THEN 1200 +1115 NEXT I:FOR I=1 TO 3:IF S(I)<>S(I+3)THEN 1150 +1130 IF S(I)<>S(I+6)THEN 1150 +1135 IF S(I)=-1 THEN 1350 +1137 IF S(I)=1 THEN 1200 +1150 NEXT I:FOR I=1 TO 9:IF S(I)=0 THEN 1155 +1152 NEXT I:GOTO 1400 +1155 IF S(5)<>G THEN 1170 +1160 IF S(1)=G AND S(9)=G THEN 1180 +1165 IF S(3)=G AND S(7)=G THEN 1180 +1170 RETURN +1180 IF G=-1 THEN 1350 +1200 PRINT"YOU BEAT ME!! GOOD GAME.":GOTO 2000 +1350 PRINT"I WIN, TURKEY!!!":GOTO 2000 +1400 PRINT"IT'S A DRAW. THANK YOU." +2000 END diff --git a/data/examples/14games/tower.bas b/data/examples/14games/tower.bas new file mode 100644 index 0000000000000000000000000000000000000000..87d4b7d6aedda91774bef33ec4c83e2da5ac81a7 --- /dev/null +++ b/data/examples/14games/tower.bas @@ -0,0 +1,127 @@ +10 REM "TOWERS" +20 REM "Ported by Stefan in 2022" +30 REM +40 REM "Set the TAB behaviour to MS mode" +50 SET 11,1 +90 PRINT +100 REM "*** INITIALIZE" +110 DIM T(7,3) +120 E=0 +130 FOR D=1 TO 7 +140 FOR N=1 TO 3 +150 T(D,N)=0 +160 NEXT N +170 NEXT D +180 PRINT "TOWERS OF HANOI PUZZLE.": PRINT +200 PRINT "YOU MUST TRANSFER THE DISKS FROM THE LEFT TO THE RIGHT" +205 PRINT "TOWER, ONE AT A TIME, NEVER PUTTING A LARGER DISK ON A" +210 PRINT "SMALLER DISK.": PRINT +215 INPUT "HOW MANY DISKS DO YOU WANT TO MOVE (7 IS MAX)";S +220 PRINT +230 M=0 +240 FOR Q=1 TO 7 +250 IF Q=S THEN 350 +260 NEXT Q +270 E=E+1 +280 IF E>2 THEN 310 +290 PRINT "SORRY, BUT I CAN'T DO THAT JOB FOR YOU.": GOTO 215 +310 PRINT "ALL RIGHT, WISE GUY, IF YOU CAN'T PLAY THE GAME RIGHT, I'LL" +320 PRINT "JUST TAKE MY PUZZLE AND GO HOME. SO LONG.": STOP +340 REM "*** STORE DISKS FROM SMALLEST TO LARGEST" +350 PRINT "IN THIS PROGRAM, WE SHALL REFER TO DISKS BY NUMERICAL CODE." +355 PRINT "3 WILL REPRESENT THE SMALLEST DISK, 5 THE NEXT SIZE," +360 PRINT "7 THE NEXT, AND SO ON, UP TO 15. IF YOU DO THE PUZZLE WITH" +365 PRINT "2 DISKS, THEIR CODE NAMES WOULD BE 13 AND 15. WITH 3 DISKS" +370 PRINT "THE CODE NAMES WOULD BE 11, 13 AND 15, ETC. THE NEEDLES" +375 PRINT "ARE NUMBERED FROM LEFT TO RIGHT, 1 TO 3. WE WILL" +380 PRINT "START WITH THE DISKS ON NEEDLE 1, AND ATTEMPT TO MOVE THEM" +385 PRINT "TO NEEDLE 3." +390 PRINT: PRINT "GOOD LUCK!": PRINT +400 Y=7: D=15 +420 FOR X=S TO 1 STEP -1 +430 T(Y,1)=D: D=D-2: Y=Y-1 +460 NEXT X +470 GOSUB 1230 +480 PRINT "WHICH DISK WOULD YOU LIKE TO MOVE";:E=0 +500 INPUT D +510 IF (D-3)*(D-5)*(D-7)*(D-9)*(D-11)*(D-13)*(D-15)=0 THEN 580 +520 PRINT "ILLEGAL ENTRY... YOU MAY ONLY TYPE 3,5,7,9,11,13, OR 15." +530 E=E+1: IF E>1 THEN 560 +550 GOTO 500 +560 PRINT "STOP WASTING MY TIME. GO BOTHER SOMEONE ELSE.": STOP +580 REM "*** CHECK IF REQUESTED DISK IS BELOW ANOTHER" +590 FOR R=1 TO 7 +600 FOR C=1 TO 3 +610 IF T(R,C)=D THEN 640 +620 NEXT C: NEXT R : R=R-1 : C=C-1 +640 FOR Q=R TO 1 STEP -1 +645 IF T(Q,C)=0 THEN 660 +650 IF T(Q,C)1 THEN 780 +750 PRINT "I'LL ASSUME YOU HIT THE WRONG KEY THIS TIME. BUT WATCH IT," +760 PRINT "I ONLY ALLOW ONE MISTAKE.": GOTO 705 +780 PRINT "I TRIED TO WARN YOU, BUT YOU WOULDN'T LISTEN." +790 PRINT "BYE BYE, BIG SHOT.":STOP +800 FOR R=1 TO 7 +810 IF T(R,N)<>0 THEN 840 +820 NEXT R +830 GOTO 880 +835 REM "*** CHECK IF DISK TO BE PLACED ON A LARGER ONE" +840 IF D0 THEN 970 +950 NEXT U +960 U=7: GOTO 980 +965 REM "*** MOVE DISK AND SET OLD LOCATION TO 0" +970 U=U-1 +980 T(U,N)=T(V,W): T(V,W)=0 +995 REM "*** PRINT OUT CURRENT STATUS" +1000 GOSUB 1230 +1018 REM "*** CHECK IF DONE" +1020 M=M+1 +1030 FOR R=1 TO 7: FOR C=1 TO 2 +1050 IF T(R,C)<>0 THEN 1090 +1060 NEXT C: NEXT R +1080 GOTO 1120 +1090 IF M<=128 THEN 480 +1100 PRINT "SORRY, BUT I HAVE ORDERS TO STOP IF YOU MAKE MORE THAN" +1110 PRINT "128 MOVES.": STOP +1120 IF M<>POW(2,S)-1 THEN 1140 +1130 PRINT:PRINT "CONGRATULATIONS!!":PRINT +1140 PRINT "YOU HAVE PERFORMED THE TASK IN ";M;" MOVES." +1150 PRINT: PRINT "TRY AGAIN (YES OR NO)";: INPUT A$ +1160 IF A$="NO" THEN 1390 +1170 IF A$="YES" THEN 90 +1180 PRINT: PRINT "'YES' OR 'NO' PLEASE";: INPUT A$: GOTO 1160 +1230 REM "*** PRINT SUBROUTINE" +1240 FOR K=1 TO 7 +1250 Z=10 +1260 FOR J=1 TO 3 +1270 IF T(K,J)=0 THEN 1330 +1280 TAB Z-INT(T(K,J)/2) +1290 FOR Y=1 TO T(K,J) +1300 PRINT "*"; +1310 NEXT Y +1320 GOTO 1340 +1330 TAB Z: PRINT "*"; +1340 Z=Z+21 +1350 NEXT J +1360 PRINT +1370 NEXT K +1380 RETURN +1390 PRINT: PRINT "THANKS FOR THE GAME!": PRINT: END diff --git a/data/examples/14games/train.bas b/data/examples/14games/train.bas new file mode 100644 index 0000000000000000000000000000000000000000..f8ecbe9214a9949b07bfac4ea246a13ad02afa4b --- /dev/null +++ b/data/examples/14games/train.bas @@ -0,0 +1,24 @@ +10 REM "TRAIN from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 IF NOT USR(0,3) THEN PRINT "FLOAT NEEDED FOR THIS PROGRAM": END +100 PRINT " TRAIN TIME - SPEED DISTANCE EXERCISE": PRINT +110 C=INT(RND(25))+40 +120 D=INT(RND(15))+5 +130 T=INT(RND(19))+20 +140 PRINT "A CAR TRAVELING",C,"MPH CAN MAKE A CERTAIN TRIP IN" +150 PRINT D,"HOURS LESS THAN A TRAIN TRAVELING AT",T,"MPH." +160 PRINT "HOW LONG DOES THE TRIP TAKE BY CAR"; +170 INPUT A +180 V=D*T/(C-T) +200 E=INT(ABS((V-A)*100/A)+0.5) +210 IF E>5 THEN 240 +220 PRINT "GOOD! ANSWER WITHIN",E ,"PERCENT." +230 GOTO 300 +240 PRINT "SORRY. YOU WERE OFF BY",E ,"PERCENT." +300 PRINT "CORRECT ANSWER IS",V ,"HOURS." +310 PRINT +320 PRINT "ANOTHER PROBLEM (YES OR NO)"; +330 INPUT A$ +340 IF A$="YES" OR A$="yes" THEN 100 +999 END diff --git a/data/examples/14games/trap.bas b/data/examples/14games/trap.bas new file mode 100644 index 0000000000000000000000000000000000000000..a6efcf7a2864fe8b7bcf668a3647f222b73a30f9 --- /dev/null +++ b/data/examples/14games/trap.bas @@ -0,0 +1,39 @@ +10 REM "Trap from 101 BASIC Games" +20 REM "Originally written by Steve Ullman, 8-1-72" +30 REM "Ported to Stefan's BASIC in 2021" +40 REM +30 G=6 +40 N=100 +100 INPUT "INSTRUCTIONS? ", Z$ +110 IF Z$(1,1)<>"Y" AND Z$(1,1)<>"y" THEN 180 +120 PRINT "I AM THINKING OF A NUMBER BETWEEN 1 AND",N +130 PRINT "TRY TO GUESS MY NUMBER. ON EACH GUESS," +140 PRINT "YOU ARE TO ENTER 2 NUMBERS, TRYING TO TRAP" +145 PRINT "MY NUMBER BETWEEN THE TWO NUMBERS. I WILL" +150 PRINT "TELL YOU IF YOU HAVE TRAPPED MY NUMBER, IF MY" +155 PRINT "NUMBER IS LARGER THAN YOUR TWO NUMBERS, OR IF" +160 PRINT "MY NUMBER IS SMALLER THAN YOUR TWO NUMBERS." +170 PRINT "IF YOU WANT TO GUESS ONE SINGLE NUMBER, TYPE" +180 PRINT "YOUR GUESS FOR BOTH YOUR TRAP NUMBERS." +190 PRINT "YOU GET",G,"GUESSES TO GET MY NUMBER." +200 REM "main loop()" +210 FOR P +220 X=INT(RND(N))+1 +230 FOR Q=1 TO G +240 PRINT "GUESS #";Q +250 INPUT "LOWER NUMBER: ", A +260 INPUT "HIGHER NUMBER: ", B +270 IF A=B AND X=A THEN 500 +280 IF A>B THEN R=A: A=B: B=R +290 IF A<=X AND X<=B THEN PRINT "YOU HAVE TRAPPED MY NUMBER.": CONT +300 IF X>A THEN PRINT "MY NUMBER IS LARGER THAN YOUR TRAP NUMBERS.": CONT +310 PRINT "MY NUMBER IS SMALLER THAN YOUR TRAP NUMBERS." +320 NEXT Q +340 PRINT "SORRY, THAT'S",G,"GUESSES. THE NUMBER WAS",X +350 GOTO 520 +500 PRINT "YOU GOT IT!!!" +510 PRINT +520 PRINT "TRY AGAIN." +530 PRINT +600 NEXT P +700 END diff --git a/data/examples/14games/trek.bas b/data/examples/14games/trek.bas new file mode 100644 index 0000000000000000000000000000000000000000..b98c3cc3466f82b5830d4ae57c74e69bf10c83b5 --- /dev/null +++ b/data/examples/14games/trek.bas @@ -0,0 +1,135 @@ + 1 REM "IoT BASIC settings for compatibility with Palo Alto TinyBASIC" + 2 SET 12,0: SET 17,1: REM "array limit 0, Boolean true 1" + 3 SET 18,1: SET 19,1: REM "Integer Mode, Random base 1" + 4 REM "Preallocate memory for all variables tp protect @ from being overwritten" + 5 DIM A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z + 9 Y=2999 : INPUT "DO YOU WANT A DIFFICULT GAME (Y OR N)? ",A + 10 PRINT "STARDATE 3200: YOUR MISSION IS ",: IF A=Y THEN Y=999 + 15 K=0:B=0:D=30:FOR I=0 TO 63:J=RND(99)<5:B=B+J + 20 M=RND(Y):M=(M<209)+(M<99)+(M<49)+(M<24)+(M<9)+(M<2):K=K+M + 25 @(I)=-100*M-10*J-RND(8):NEXT I:IF(B<2)+(K<4) GOTO 15 + 30 PRINT "TO DESTROY ",#1,K," KLINGONS IN 30 STARDATES." + 35 PRINT "THERE ARE ",#1,B," STARBASES.":GOSUB 160:C=0:H=K + 40 U=RND(8):V=RND(8):X=RND(8):Y=RND(8) + 45 FOR I=71 TO 152: @(I)=0: NEXT I :@(8*X+Y+62)=4: M=ABS(@(8*U+V-9)):N=M/100 + 50 I=1: IF N THEN FOR J=1 TO N:GOSUB 165: @(J+134)=300: @(J+140)=S: @(J+146)=T: NEXT J + 55 GOSUB 175: M=M-100*N: I=2: IF M/10 GOSUB 165 + 60 M=M-M/10*10: I=3: IF M THEN FOR J=1 TO M: GOSUB 165: NEXT J + 65 GOSUB 145: GOSUB 325:IF K GOTO 95 + 70 PRINT: PRINT "MISSION ACCOMPLISHED. ": IF D<3 PRINT "BOY, YOU BARELY MADE IT." + 75 IF D>5 PRINT "GOOD WORK...": IF D>9 PRINT "FANTASTIC! ": IF D>13 PRINT "UNBELIEVABLE!" + 80 D=30-D: I=H*100/D*10: PRINT #1,H," KLINGONS IN ",D," STARDATES. (",I,")" + 85 J=100*(C=0)-5*C:PRINT #1,C," CASUALTIES INCURRED. (",J,")" + 90 PRINT "YOUR SCORE:",I+J:GOTO 110 + 95 IF D<0 PRINT "IT'S TOO LATE, THE FEDERATION HAS BEEN CONQUERED.":GOTO 110 + 100 IF E>=0 GOTO 120 + 105 PRINT "ENTERPRISE DESTROYED":IF H-K>9 PRINT " BUT YOU WERE A GOOD MAN" + 110 Y=987: PRINT: INPUT "ANOTHERE GAME (Y OR N)? ",A:IF A=Y GOTO 5 + 115 PRINT "GOOD BYE.": STOP + 120 S=220: G=180: L=200: P=260: R=420: W=465: T=555: INPUT "CAPTAIN? ",A + 125 IF (A=S)+(A=G)+(A=L)+(A=P)+(A=R)+(A=W)+(A=T) GOTO A + 130 PRINT "R=REPORT S=SR. SENSOR L=LR. SENSOR" + 135 PRINT "G=GALAXY MAP P=PHASER T=TORPEDO" + 140 PRINT "W=WARP ENGINE **PLEASE USE ONE OF THESE COMMANDS***":GOTO 120 + 145 FOR I=X-(X>1) TO X+(X<8): FOR J=Y-(Y>1) TO Y+(Y<8) + 150 IF @(8*I+J+62)<>2 :NEXT J: NEXT I: O=0: RETURN + 155 IF O=0 PRINT "SULU: CAPTAIN, WE ARE DOCKED AT STARBASE." + 160 E=4000:F=10:O=1:FOR I=64 TO 70:@(I)=0: NEXT I: RETURN + 165 S=RND(8):T=RND(8):A=8*S+T+62:IF @(A) GOTO 165 + 170 @(A)=I: RETURN + 175 PRINT "ENTERPRISE IN Q-",#1,U,V," S-",X,Y: RETURN + 180 GOSUB 175:J=2:GOSUB 375: IF I GOTO 120 + 185 PRINT " OF GALAXY MAP";: FOR I=0 TO 7:PRINT :PRINT #1,I+1,":",:FOR J=0 TO 7:M=@(8*I+J) + 190 PRINT #6,(M>0)*M,:NEXT J:PRINT :NEXT I:PRINT " ";:FOR I=0 TO 7:PRINT " ..",:NEXT I:PRINT + 195 PRINT " ";:FOR I=1TO8:PRINT #4,I,:NEXT I:PRINT :PRINT :GOTO 120 + 200 GOSUB 175:J=3:GOSUB 375:IF I GOTO 120 + 205 PRINT: FOR I=U-1 TO U+1: FOR J=V-1 TO V+1:M=8*I+J-9:A=0 + 210 IF (I>0)*(I<9)*(J>0)*(J<9) THEN A=ABS(@(M)):@(M)=A + 215 PRINT #4,A,:NEXT J:PRINT :NEXT I: GOTO 120 + 220 GOSUB 175: J=1: GOSUB 375: IF I GOTO 120 + 225 M=8*U+V-9: @(M)=ABS(@(M)) + 230 PRINT: FOR I=1 TO 8: PRINT #1,I,:FOR J=1 TO 8:M=@(8*I+J+62):IF M=0 PRINT " .", + 235 IF M=1 PRINT " K", + 240 IF M=2 PRINT " B", + 245 IF M=3 PRINT " *", + 250 IF M=4 PRINT " E", + 255 NEXT J:PRINT: NEXT I: PRINT " ",: FOR I=1TO8: PRINT #2,I,:NEXT I:PRINT:GOTO 120 + 260 J=4:GOSUB 375: IF I GOTO 120 + 265 INPUT " ENERGIZED. UNITS TO FIRE? ",A:IF A<1 GOTO 120 + 270 IF A>E PRINT "SPOCK: WE HAVE ONLY ",#1,E," UNITS.": GOTO 120 + 275 E=E-A: IF N<1 PRINT "PHASER FIRED AT EMPTY SPACE.": GOTO 65 + 280 A=A/N: FOR M=135 TO 140: IF @(M)=0 GOTO 290 + 285 GOSUB 295: PRINT #3,S," UNITS HIT ",:GOSUB 305 + 290 NEXT M: GOTO 65 + 295 IF A>1090 PRINT "...OVERLOADED..": J=4: @(67)=1: A=9: GOSUB 375 + 300 I=@(M+6)-X: J=@(M+12)-Y: S=A*30/(30+I*I+J*J)+1: RETURN + 305 PRINT "KLINGON AT S-",#1,@(M+6),@(M+12),:@(M)=@(M)-S + 310 IF @(M)>0 PRINT " **DAMAGED**": RETURN + 315 @(M)=0:I=8*U+V-9:J=@(I)/ABS(@(I)):@(I)=@(I)-100*J:K=K-1 + 320 I=8*@(M+6)+@(M+12)+62:@(I)=0:N=N-1:PRINT " ***DESTROYED***": RETURN + 325 IF N=0 RETURN + 330 PRINT "KLINGON ATTACK":IF O THEN PRINT "STARBASE PROTECTS ENTERPRISE": RETURN + 335 T=0: FOR M=135 TO 140: IF @(M)=0 GOTO 350 + 340 A=(@(M)+RND(@(M)))/2:GOSUB 295:T=T+S:I=@(M+6):J=@(M+12) + 345 PRINT #3,S," UNITS HIT FROM KLINGON AT S-",#1,I,J + 350 NEXT M:E=E-T:IF E<=0 PRINT "*** BANG ***": RETURN + 355 PRINT #1,E," UNITS OF ENERGY LEFT.": IF RND(E/4)>T RETURN + 360 IF @(70)=0 THEN @(70)=RND(T/50+1): J=7: GOTO 375 + 365 J=RND(6): @(J+63)=RND(T/99+1)+@(J+63): I=RND(8)+1: C=C+I + 370 PRINT "MC COY: SICKBAY TO BRIDGE, WE SUFFERED",#2,I," CASUALTIES." + 375 I=@(J+63): IF J=1 PRINT "SHORT RANGE SENSOR", + 380 IF J=2 PRINT "COMPUTER DISPLAY", + 385 IF J=3 PRINT "LONG RANGE SENSOR", + 390 IF J=4 PRINT "PHASER", + 395 IF J=5 PRINT "WARP ENGINE", + 400 IF J=6 PRINT "PHOTON TORPEDO TUBES", + 405 IF J=7 PRINT "SHIELD", + 410 IF I=0 RETURN + 415 PRINT " DAMAGED, ",#1,I," STARDATES ESTIMATED FOR REPAIR": RETURN + 420 PRINT "STATUS REPORT:":PRINT "STARDATE",#10,3230-D:PRINT "TIME LEFT",#7,D + 425 PRINT "CONDITION ",:IF O PRINT "DOCKED":GOTO 445 + 430 IF N PRINT "RED": GOTO 445 + 435 IF E<999 PRINT "YELLOW": GOTO 445 + 440 PRINT "GREEN " + 445 PRINT "POSITION Q-",#1,U,V," S-",X,Y:PRINT "ENERGY",#12,E + 450 PRINT "TORPEDOES",#7,F:PRINT "KLINGONS LEFT",#3,K:PRINT "STARBASES",#6,B + 455 FOR J=1 TO 7: IF @(J+63) GOSUB 375 + 460 NEXT J:GOTO 120 + 465 J=5:GOSUB 375:IF I=0 PRINT + 470 INPUT "SECTOR DISTANCE? ",W:IF W<1 GOTO 120 + 475 IF I*(W>2) THEN PRINT "CHEKOV: WE CAN TRY 2 AT MOST, SIR.":GOTO 470 + 480 IF W>91 THEN W=91:PRINT "SPOCK: ARE YOU SURE, CAPTAIN?" + 485 IF E0):NEXT M + 505 P=45*X+22:G=45*Y+22:W=45*W:FOR M=1TO8:W=W-R:IF W<-22 GOTO 525 + 510 P=P+S: G=G+T: I=P/45: J=G/45: IF(I<1)+(I>8)+(J<1)+(J>8)GOTO 530 + 515 IF @(8*I+J+62)=0 THEN X=I: Y=J: NEXT M + 520 PRINT "**EMERGENCY STOP**":PRINT " SPOCK: TO ERR IS HUMAN. " + 525 @(8*X+Y+62)=4:GOSUB 175:GOTO 65 + 530 P=U*72+P/5+W/5*S/R-9: U=P/72: G=V*72+G/5+W/5*T/R-9: V=G/72 + 535 IF RND(9)<2 PRINT "***SPACE STORM***":T=100:GOSUB 360 + 540 IF (U>0)*(U<9)*(V>0)*(V<9)X=(P+9-72*U)/9: Y=(G+9-72*V)/9: GOTO 45 + 545 PRINT "**YOU WANDERED OUTSIDE THE GALAXY** " + 550 PRINT "ON BOARD COMPUTER TAKES OVER, AND SAVED YOUR LIFE": GOTO 40 + 555 J=6: GOSUB 375: IF I GOTO 120 + 560 IF F=0 PRINT " EMPTY": GOTO 120 + 565 PRINT " LOADED": GOSUB 615: IF R=0 GOTO 120 + 570 PRINT "TORPEDO TRACK ",:F=F-1:P=45*X+22:G=45*Y+22:FOR M=1 TO 8 + 575 P=P+S: G=G+T: I=P/45:J=G/45: IF(I<1)+(I>8)+(J<1)+(J>8) GOTO 585 + 580 L=8*I+J+62: W=8*U+V-9: R=@(W)/ABS(@(W)): PRINT #1,I,J," ",:GOTO 585+5*@(L) + 585 NEXT M:PRINT "...MISSED":GOTO 65 + 590 S=RND(99)+280:FOR M=135 TO 140: IF(@(M+6)=I)*(@(M+12)=J) GOSUB 305 + 592 NEXT M:GOTO 65 + 595 B=B-1: @(L)=0: @(W)=@(W)-10*R: PRINT "STARBASE DESTROYED" + 597 PRINT "SPOCK: I OFTEN FIND HUMAN BEHAVIOUR FASCINATING. ": GOTO 65 + 600 PRINT "HIT A STAR":IF RND(9)<3 PRINT " TORPEDO ABSORBED":GOTO 65 + 605 @(L)=0:@(W)=@(W)-R:IFRND(9)<6PRINT " STAR DESTROYED":GOTO 65 + 610 T=300:PRINT "HIT NOVAS ***RADIATION ALARM***":GOSUB 360 :GOTO 65 + 615 INPUT "COURSE (0-360)? ",I:IF(I>360)+(I<0)THEN R=0: RETURN + 620 S=(I+45)/90: I=I-S*90: R=(45+I*I)/110+45: GOTO 625+5*(S<4)*S + 625 S=-45: T=I: RETURN + 630 S=I: T=45: RETURN + 635 S=45: T=-I: RETURN + 640 S=-I: T=-45: RETURN diff --git a/data/examples/14games/war.bas b/data/examples/14games/war.bas new file mode 100644 index 0000000000000000000000000000000000000000..667ff6cb316e388c3828362ca497ecb44b5b13ac --- /dev/null +++ b/data/examples/14games/war.bas @@ -0,0 +1,69 @@ +10 REM "WAR from 101 BASIC games" +20 REM "Ported by Stefan in 2022" +30 REM "FNI(X) is the index function to split the string" +40 DEF FNI(X)=(X-1)*3+1 +100 PRINT "THIS IS THE CARD GAME OF WAR. EACH CARD IS GIVEN BY SUIT-#" +110 PRINT "AS S-7 FOR SPADE 7. "; +120 PRINT "DO YOU WANT DIRECTIONS"; +130 INPUT B$ +140 IF B$="NO" OR B$="no" THEN 210 +150 IF B$="YES" OR B$="yes" THEN 180 +160 PRINT "YES OR NO, PLEASE. "; +170 GOTO 120 +180 PRINT "THE COMPUTER GIVES YOU AND IT A 'CARD'. THE HIGHER CARD" +190 PRINT "(NUMERICALLY) WINS. THE GAME ENDS WHEN YOU CHOOSE NOT TO" +200 PRINT "CONTINUE OR WHEN YOU HAVE FINISHED THE PACK." +210 PRINT +230 DIM A$(52*3),L(54) +240 FOR I=1 TO 52 +250 READ T$ +255 A$(FNI(I))=T$(1,3) +260 NEXT I +270 REM +280 FOR J=1 TO 52 +290 LET L(J)=INT(52*RND(1))+1 +295 IF J=1 THEN 350 +300 FOR K=1 TO J-1 +310 IF L(K)<>L(J) THEN 340 +320 REM +330 GOTO 290 +340 NEXT K +350 NEXT J +360 P=P+1 +370 M1=L(P) +380 P=P+1 +390 M2=L(P) +400 PRINT +420 PRINT "YOU: ";A$(FNI(M1), FNI(M1)+2),"COMPUTER: ";A$(FNI(M2), FNI(M2)+2) +430 N1=INT((M1-0.5)/4) +440 N2=INT((M2-0.5)/4) +450 IF N1>=N2 THEN 490 +460 A1=A1+1 +470 PRINT "THE COMPUTER WINS!!! YOU HAVE ";B1;" AND THE COMPUTER HAS ";A1 +480 GOTO 540 +490 IF N1=N2 THEN 530 +500 B1=B1+1 +510 PRINT "YOU WIN. YOU HAVE ";B1;" AND THE COMPUTER HAS ";A1 +520 GOTO 540 +530 PRINT "TIE. NO SCORE CHANGE." +540 IF L(P+1)=0 THEN 610 +550 PRINT "DO YOU WANT TO CONTINUE"; +560 INPUT V$ +570 IF V$="YES" OR V$="yes" THEN 360 +580 IF V$="NO" OR V$="no" THEN 650 +590 PRINT "YES OR NO, PLEASE. "; +600 GOTO 540 +610 PRINT +620 PRINT +630 PRINT "WE HAVE RUN OUT OF CARDS. FINAL SCORE: YOU: ";B1; +640 PRINT " THE COMPUTER: ";A1:PRINT +650 PRINT "THANKS FOR PLAYING. IT WAS FUN." +655 PRINT +660 DATA "S-2","H-2","C-2","D-2","S-3","H-3","C-3","D-3" +670 DATA "S-4","H-4","C-4","D-4","S-5","H-5","C-5","D-5" +680 DATA "S-6","H-6","C-6","D-6","S-7","H-7","C-7","D-7" +690 DATA "S-8","H-8","C-8","D-8","S-9","H-9","C-9","D-9" +700 DATA "S-10","H-10","C-10","D-10","S-J","H-J","C-J","D-J" +710 DATA "S-Q","H-Q","C-Q","D-Q","S-K","H-K","C-K","D-K" +720 DATA "S-A","H-A","C-A","D-A" +999 END diff --git a/data/examples/14games/weekday.bas b/data/examples/14games/weekday.bas new file mode 100644 index 0000000000000000000000000000000000000000..9701ba9bda1d1bed6d016db3b29c24560722c210 --- /dev/null +++ b/data/examples/14games/weekday.bas @@ -0,0 +1,152 @@ +10 REM "WEEKDAY from 101 BASIC computer games" +20 REM "Ported by Stefan in 2022" +30 REM +40 REM "MS style TAB" +50 SET 11, 1 +100 PRINT "WEEKDAY IS A COMPUTER DEMONSTRATION THAT" +110 PRINT "GIVES FACTS ABOUT A DATE OF INTEREST TO YOU." +120 PRINT +130 PRINT "ENTER TODAY'S DATE " +140 INPUT "MONTH: ", M1: INPUT "DAY: ", D1: INPUT "YEAR: ",Y1 +150 REM "THIS PROGRAM DETERMINES THE DAY OF THE WEEK" +160 REM "FOR A DATE AFTER 1582" +170 DEF FNA(A)=INT(A/4) +180 DIM T(12) +190 DEF FNB(A)=INT(A/7) +200 REM "SPACE OUTPUT AND READ IN INITIAL VALUES FOR MONTHS." +210 FOR I= 1 TO 12 +220 READ T(I) +230 NEXT I +240 PRINT"ENTER DAY OF BIRTH (OR OTHER DAY OF INTEREST)" +250 INPUT "MONTH: ", M: INPUT "DAY: ", D: INPUT "YEAR: ",Y +260 PRINT +270 LET I1 = INT((Y-1500)/100) +280 REM "TEST FOR DATE BEFORE CURRENT CALENDAR." +290 IF Y-1582 <0 THEN 1300 +300 LET A = I1*5+(I1+3)/4 +310 LET I2=INT(A-FNB(A)*7) +320 LET Y2=INT(Y/100) +330 LET Y3 =INT(Y-Y2*100) +340 LET A =Y3/4+Y3+D+T(M)+I2 +350 LET B=INT(A-FNB(A)*7)+1 +360 IF M > 2 THEN 470 +370 IF Y3 = 0 THEN 440 +380 LET T1=INT(Y-FNA(Y)*4) +390 IF T1 <> 0 THEN 470 +400 IF B<>0 THEN 420 +410 LET B=6 +420 LET B = B-1 +430 GOTO 470 +440 LET A = I1-1 +450 LET T1=INT(A-FNA(A)*4) +460 IF T1 = 0 THEN 400 +470 IF B <>0 THEN 490 +480 LET B = 7 +490 IF ((Y1*12+M1)*31+D1)<((Y*12+M)*31+D) THEN 550 +500 IF ((Y1*12+M1)*31+D1)=((Y*12+M)*31+D) THEN 530 +510 PRINT M;"/";D;"/";Y;" WAS A "; +520 GOTO 570 +530 PRINT M;"/";D;"/";Y;" IS A "; +540 GOTO 570 +550 PRINT M;"/";D;"/";Y;" WILL BE A "; +560 REM "PRINT THE DAY OF THE WEEK THE DATE FALLS ON." +570 IF B <>1 THEN 590 +580 PRINT "SUNDAY." +590 IF B<>2 THEN 610 +600 PRINT "MONDAY." +610 IF B<>3 THEN 630 +620 PRINT "TUESDAY." +630 IF B<>4 THEN 650 +640 PRINT "WEDNESDAY." +650 IF B<>5 THEN 670 +660 PRINT "THURSDAY." +670 IF B<>6 THEN 690 +680 GOTO 1250 +690 IF B<>7 THEN 710 +700 PRINT "SATURDAY." +710 IF (Y1*12+M1)*31+D1=(Y*12+M)*31+D THEN 1120 +720 LET I5=Y1-Y +730 PRINT +740 LET I6=M1-M +750 LET I7=D1-D +760 IF I7>=0 THEN 790 +770 LET I6= I6-1 +780 LET I7=I7+30 +790 IF I6>=0 THEN 820 +800 LET I5=I5-1 +810 LET I6=I6+12 +820 IF I5<0 THEN 1300 +830 IF I7 <> 0 THEN 850 +835 IF I6 <> 0 THEN 850 +840 PRINT "***HAPPY BIRTHDAY***" +850 TAB 25: PRINT "YEARS","MONTHS","DAYS" +855 TAB 25: PRINT "-----","------","----" +860 PRINT "YOUR AGE (IF BIRTHDATE) ";#5; I5,I6,I7 +870 LET A8 = (I5*365)+(I6*30)+I7+INT(I6/2) +880 LET K5 = I5 +890 LET K6 = I6 +900 LET K7 = I7 +910 REM "CALCULATE RETIREMENT DATE." +920 LET E = Y+65 +930 REM "CALCULATE TIME SPENT IN THE FOLLOWING FUNCTIONS." +940 LET F = 0.35 +950 PRINT "YOU HAVE SLEPT ";: TAB 25 +960 GOSUB 1370 +970 LET F = 0.17 +980 PRINT "YOU HAVE EATEN ";: TAB 25 +990 GOSUB 1370 +1000 LET F = 0.23 +1010 IF K5 > 3 THEN 1040 +1020 PRINT "YOU HAVE PLAYED";: TAB 25 +1030 GOTO 1080 +1040 IF K5 > 9 THEN 1070 +1050 PRINT "YOU HAVE PLAYED/STUDIED";:TAB 25 +1060 GOTO 1080 +1070 PRINT "YOU HAVE WORKED/PLAYED";:TAB 25 +1080 GOSUB 1370 +1085 GOTO 1530 +1090 PRINT "YOU HAVE RELAXED ";: TAB 25: PRINT #5; K5,K6,K7 +1100 PRINT +1110 TAB 16: PRINT "*** YOU MAY RETIRE IN ";E;" ***" +1120 PRINT +1140 PRINT +1200 PRINT +1210 PRINT +1220 PRINT +1230 PRINT +1240 END +1250 IF D=13 THEN 1280 +1260 PRINT "FRIDAY." +1270 GOTO 710 +1280 PRINT "FRIDAY THE THIRTEENTH---BEWARE!" +1290 GOTO 710 +1300 PRINT "NOT PREPARED TO GIVE DAY OF WEEK PRIOR TO MDLXXXII. " +1310 GOTO 1140 +1320 REM "TABLE OF VALUES FOR THE MONTHS TO BE USED IN CALCULATIONS." +1330 DATA 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 +1340 REM "THIS IS THE CURRENT DATE USED IN THE CALCULATIONS." +1350 REM "THIS IS THE DATE TO BE CALCULATED ON." +1360 REM "CALCULATE TIME IN YEARS, MONTHS, AND DAYS" +1370 LET K1=INT(F*A8) +1380 LET I5 = INT(K1/365) +1390 LET K1 = K1- (I5*365) +1400 LET I6 = INT(K1/30) +1410 LET I7 = K1 -(I6*30) +1420 LET K5 = K5-I5 +1430 LET K6 =K6-I6 +1440 LET K7 = K7-I7 +1450 IF K7>=0 THEN 1480 +1460 LET K7=K7+30 +1470 LET K6=K6-1 +1480 IF K6>0 THEN 1510 +1490 LET K6=K6+12 +1500 LET K5=K5-1 +1510 PRINT #5; I5,I6,I7 +1520 RETURN +1530 IF K6=12 THEN 1550 +1540 GOTO 1090 +1550 LET K5=K5+1 +1560 LET K6=0 +1570 GOTO 1090 +1580 REM +1590 END diff --git a/data/examples/14games/word.bas b/data/examples/14games/word.bas new file mode 100644 index 0000000000000000000000000000000000000000..66f095b78dfd976ab2268caaf9fa0e4d875b8782 --- /dev/null +++ b/data/examples/14games/word.bas @@ -0,0 +1,69 @@ +2 REM "WORD FROM 101 BASIC GAMES" +3 REM "Ported by Stefan in 2022" +4 REM +5 DIM S(7),A(7),L(7),D(7),P(7) +10 PRINT "I AM THINKING OF A WORD -- YOU GUESS IT. I WILL GIVE YOU" +15 PRINT "CLUES TO HELP YOU GET IT. GOOD LUCK!!": PRINT +20 REM +30 PRINT "YOU ARE STARTING A NEW GAME..." +35 RESTORE +40 READ N +50 C=INT(RND(1)*N+1) +60 FOR I=1 TO C +70 READ S$ +80 NEXT I +90 G=0 +95 S0=LEN(S$) +100 FOR I=1 TO LEN(S$): S(I)=S$(I): NEXT I +110 FOR I=1 TO 5 +120 A(I)=45 +130 NEXT I +140 FOR J=1 TO 5 +144 P(J)=0 +146 NEXT J +150 PRINT "GUESS A FIVE LETTER WORD"; +160 INPUT L$ +162 T$=L$ +164 FOR I=1 TO LEN(T$) +166 IF (T$(I))>96 THEN L$(I)=(T$(I))-32 ELSE L$(I)=T$(I) +168 NEXT +170 G=G+1 +172 IF S$=G$ THEN 500 +173 FOR I=1 TO 7: P(I)=0: NEXT I +175 L0=LEN(L$) +180 FOR I=1 TO LEN(L$): L(I)=L$(I): NEXT I +190 IF L(1)=63 THEN 300 +200 IF L0<>5 THEN 400 +205 M=0: Q=1 +210 FOR I=1 TO 5 +220 FOR J=1 TO 5 +230 IF S(I)<>L(J) THEN 260 +231 P(Q)=L(J) +232 Q=Q+1 +233 IF I<>J THEN 250 +240 A(J)=L(J) +250 M=M+1 +260 NEXT J +265 NEXT I +270 A0=5 +272 P0=M +275 A$="": FOR I=1 TO A0: A$(I)=A(I): NEXT I +277 P$="": FOR I=1 TO P0: P$(I)=P(I): NEXT I +280 PRINT "THERE WERE",M,"MATCHES AND THE COMMON LETTERS WERE...";P$ +285 PRINT "FROM THE EXACT LETTER MATCHES, YOU KNOW................";A$ +286 IF A$=S$ THEN 500 +287 IF M>1 THEN 289 +288 PRINT: PRINT "IF YOU GIVE UP, TYPE '?' FOR YOUR NEXT GUESS." +289 PRINT +290 GOTO 150 +300 S$="": FOR I=1 TO 7: S$(I)=S(I): NEXT I +310 PRINT "THE SECRET WORD IS ";S$: PRINT +320 GOTO 30 +400 PRINT "YOU MUST GUESS A 5 LETTER WORD. START AGAIN." +410 PRINT: G=G-1: GOTO 150 +500 PRINT "YOU HAVE GUESSED THE WORD. IT TOOK",G,"GUESSES!": PRINT +510 INPUT "WANT TO PLAY AGAIN? ",Q$ +520 IF Q$="YES" OR Q$="yes" THEN 30 +530 DATA 12,"DINKY","SMOKE","WATER","GRASS","TRAIN","MIGHT","FIRST" +540 DATA "CANDY","CHAMP","WOULD","CLUMP","DOPEY" +999 END diff --git a/data/examples/15radio/rf24rdr.bas b/data/examples/15radio/rf24rdr.bas new file mode 100644 index 0000000000000000000000000000000000000000..89a3b8f1cc885a6345cf84fd263ac8b94a700093 --- /dev/null +++ b/data/examples/15radio/rf24rdr.bas @@ -0,0 +1,8 @@ +10 REM "Simple rf24 reader" +100 REM "open the radio pipe for read" +110 OPEN &8, "radi1", 0 +200 REM "receive a message" +210 FOR I +220 IF AVAIL(8)=1 THEN INPUT &8, A$ : PRINT A$ +250 DELAY 100 +260 NEXT diff --git a/data/examples/15radio/rf24rdra.bas b/data/examples/15radio/rf24rdra.bas new file mode 100644 index 0000000000000000000000000000000000000000..62a2776ad1f81d19cb2246a6d31604c985aa0529 --- /dev/null +++ b/data/examples/15radio/rf24rdra.bas @@ -0,0 +1,17 @@ +10 REM "Avanced rf24 writer" +20 REM "Read a message from a slave and print it" +100 REM "Open the radio pipe for write and read " +110 OPEN &8, "radi2", 1 +120 OPEN &8, "radi1", 0 +130 IF @S THEN PRINT "Open error": END +200 REM "Main loop, wait for a message and then react" +210 FOR I +220 PRINT &8, "send" +230 IF @S THEN PRINT "Output error": @S=0: GOTO 280 +240 DELAY 200 +250 IF AVAIL(8)=0 THEN PRINT "No data error": GOTO 280 +260 INPUT &8, A$ +270 IF @S THEN PRINT "Input error": @S=0: ELSE PRINT A$ +280 A$="": @S=0 +290 DELAY 1000 +300 NEXT diff --git a/data/examples/15radio/rf24wrt.bas b/data/examples/15radio/rf24wrt.bas new file mode 100644 index 0000000000000000000000000000000000000000..02c1c20b1a3d1cf4ef2bf0993aafd9e4748df1e6 --- /dev/null +++ b/data/examples/15radio/rf24wrt.bas @@ -0,0 +1,11 @@ +10 REM "Simple rf24 writer" +100 REM "open the radio pipe for write " +110 OPEN &8, "radi1", 1 +200 REM "send a message" +210 FOR I +220 A$="radio " +230 A$(7)=STR(I) +240 PRINT &8, A$ +250 DELAY 1000 +260 NEXT + diff --git a/data/examples/15radio/rf24wrta.bas b/data/examples/15radio/rf24wrta.bas new file mode 100644 index 0000000000000000000000000000000000000000..bcc34d9fa6aa65cb4dffe912a053ba9db646dfc2 --- /dev/null +++ b/data/examples/15radio/rf24wrta.bas @@ -0,0 +1,19 @@ +10 REM "Avanced rf24 writer" +20 REM "Read an analog input on request of a master" +40 REM "The analog pin to read from" +50 AP=AZERO +100 REM "Open the radio pipe for write and read " +110 OPEN &8, "radi1", 1 +120 OPEN &8, "radi2", 0 +130 IF @S THEN PRINT "Open error": END +140 PINM AP, 0 +200 REM "Main loop, wait for a message and then react" +210 FOR I +220 IF AVAIL(8)=0 THEN DELAY 100: GOTO 220 +230 INPUT &8, A$ +240 IF @S THEN PRINT "Input error": @S=0 +250 IF A$="send" THEN PRINT &8, AREAD(AP) +260 IF @S THEN PRINT "Output error" +270 A$="": @S=0 +280 DELAY 1000 +290 NEXT diff --git a/data/examples/16mqtt/analog.bas b/data/examples/16mqtt/analog.bas new file mode 100644 index 0000000000000000000000000000000000000000..c1e0fcee5d362c30f8412e9da6d1c26ac7dd93aa --- /dev/null +++ b/data/examples/16mqtt/analog.bas @@ -0,0 +1,13 @@ +10 REM "Simple mqtt writer" +20 REM "read an analog input and transfer the data" +30 AP=AZERO +100 REM "open a mqtt topic for write" +110 OPEN &9, "iotbasic/data", 1 +120 PINM AP, 0 +200 REM "send a message " +210 FOR I +220 A$="analog ": A$(8)=STR(AREAD(AP)) +240 PRINT &9, A$ +250 IF NETSTAT<>3 THEN PRINT "No connection" +260 DELAY 3000 +270 NEXT diff --git a/data/examples/16mqtt/digital.bas b/data/examples/16mqtt/digital.bas new file mode 100644 index 0000000000000000000000000000000000000000..6876d737f90457d7250054c1efec561e65ebe41b --- /dev/null +++ b/data/examples/16mqtt/digital.bas @@ -0,0 +1,15 @@ +10 REM "Simple mqtt reader" +20 REM "receive a message and switch the led" +100 REM "open a mqtt topic for read" +110 OPEN &9, "iotbasic/command", 0 +120 PINM LED, 1 +200 REM "wait for a message" +210 FOR I +220 IF AVAIL(9)=0 THEN 280 +230 INPUT &9, A$ +240 REM "ESP led is inverted" +250 IF A$="on" THEN DWRITE LED, 0 +260 IF A$="off" THEN DWRITE LED, 1 +270 PRINT "Received message", A$ +280 DELAY 1000 +290 NEXT diff --git a/data/examples/16mqtt/mqttmod.bas b/data/examples/16mqtt/mqttmod.bas new file mode 100644 index 0000000000000000000000000000000000000000..cc1c9984cd8d6f0d8d086ab81852102e9384372d --- /dev/null +++ b/data/examples/16mqtt/mqttmod.bas @@ -0,0 +1,19 @@ +10 REM "Mqtt modem - use an ESP modules to send mqtt" +20 REM "The I/O buffer" +30 DIM A$(128) +100 REM "Setup section, open a read and write topic" +110 OPEN &9,"iotbasic/data",1 +120 OPEN &9,"iotbasic/command" +200 REM "The loop, input from serial and send/receive" +210 INPUT "",A$ +220 IF A$="#" THEN END +230 PRINT &9,A$ +240 DELAY 100 +250 REM "The first character printed indicates the status" +260 IF NETSTAT=3 THEN PRINT "+"; +270 IF NETSTAT=1 THEN PRINT "0"; +280 IF NETSTAT=0 THEN PRINT "-"; +290 IF AVAIL(9)=0 THEN PRINT: GOTO 210 +300 INPUT &9,A$ +310 PRINT A$ +320 GOTO 210 diff --git a/data/examples/17robot/echo.bas b/data/examples/17robot/echo.bas new file mode 100644 index 0000000000000000000000000000000000000000..f75d6dd0eec18b0c9f5d5232d253038b406398de --- /dev/null +++ b/data/examples/17robot/echo.bas @@ -0,0 +1,8 @@ +10 PINM 4, 1 +20 PINM 5, 0 +30 DWRITE 4, 0 +40 PULSE 4, 10 +50 E=PULSE(5, 1, 100) +60 PRINT E/29*100/2 +70 delay 500 +80 goto 40 diff --git a/data/examples/17robot/firsttest.bas b/data/examples/17robot/firsttest.bas new file mode 100644 index 0000000000000000000000000000000000000000..a6dfc90972da7ec1832d2a1888110d2e69e857c9 --- /dev/null +++ b/data/examples/17robot/firsttest.bas @@ -0,0 +1,6 @@ +10 PINM 13,1 +20 PINM 8,1 +30 DWRITE 13,1 +40 AWRITE 11,120 +50 DELAY 1000 +60 AWRITE 11,0 \ No newline at end of file diff --git a/data/examples/17robot/look.bas b/data/examples/17robot/look.bas new file mode 100644 index 0000000000000000000000000000000000000000..bc5907bea9de7851434d6bf6f559c84294382317 --- /dev/null +++ b/data/examples/17robot/look.bas @@ -0,0 +1,26 @@ +10 REM "The pin setting for Arduino or ESP32" +20 REM SP=27: TP=17: EP=16 +30 SP=6: TP=4: EP=5 +300 REM "The function for the servo and the echo, integer safe!" +310 DEF FNP(A)=40+A*200/180 +320 DEF FNE(P)=P/29*100/2 +1000 REM "Look around once" +1010 GOSUB 10000 +1020 FOR J=1 TO 5 +1030 PRINT J, E(J) +1040 NEXT +1050 END +10000 REM "The look around code" +10060 FOR J=1 TO 5 +10070 A=(J-1)*45: GOSUB 12000: GOSUB 11000: E(J)=E +10120 NEXT +10130 A=90: GOSUB 12000 +10190 RETURN +11000 REM "Echo once and return the value in E" +11010 DWRITE TP,0: PULSE TP,10 +11020 E=FNE(PULSE(EP,1,70)) +11030 RETURN +12000 REM "The servo code" +12010 DWRITE SP,0 +12020 FOR I=1 TO 40: DELAY 20: PULSE SP,FNP(A): NEXT +12030 RETURN diff --git a/data/examples/17robot/remote.bas b/data/examples/17robot/remote.bas new file mode 100644 index 0000000000000000000000000000000000000000..9c339e91f7cb1840c7474487faf75f8998cfa4ad --- /dev/null +++ b/data/examples/17robot/remote.bas @@ -0,0 +1,14 @@ +10 OPEN &9,"littlerobot/data" +20 OPEN &9,"littlerobot/command",1 +30 S=0 +40 WHILE -1 +50 GET &2,C +60 SWITCH C +70 CASE "1": PRINT &9,"l" +80 CASE "2": PRINT &9,"r" +90 CASE "3": PRINT &9,"b" +100 CASE "4": PRINT &9,"f" +110 SWEND +120 IF AVAIL(9)=0 THEN CONT +130 INPUT &9,A$: IF A$<>"" THEN CLS: PRINT &2,INT(VAL(A$)) +140 WEND diff --git a/data/examples/17robot/servo.bas b/data/examples/17robot/servo.bas new file mode 100644 index 0000000000000000000000000000000000000000..a4bdb4ac2dd7c2288463cc1af73e460625f71d3e --- /dev/null +++ b/data/examples/17robot/servo.bas @@ -0,0 +1,6 @@ +10 PINM 6,1 +20 DWRITE 6, 0 +30 INPUT A +40 P=40+A*200/180 +50 FOR I=1 TO 40: DELAY 20: PULSE 6, P: NEXT +60 GOTO 30 diff --git a/data/examples/17robot/turtle.bas b/data/examples/17robot/turtle.bas new file mode 100644 index 0000000000000000000000000000000000000000..e4c9f46e246019a95e026813e8ddd2ab23d0585b --- /dev/null +++ b/data/examples/17robot/turtle.bas @@ -0,0 +1,44 @@ +10 REM "engine code, the pins of the Arduino motor shield" +20 DA=12: SA=3: BA=9 +30 DB=13: SB=11: BB=8 +40 TP=4: EP=5 +100 REM "set the pins, Dx is direction, Bx is break" +110 PINM DA,1: PINM BA,1 +120 PINM DB,1: PINM BB,1 +130 AWRITE SA,0: AWRITE SB,0 +140 PINM TP, 1: PINM EP, 0 +200 REM "some parameters, TT is step time, S is speed ie voltage" +210 TT=5 +220 S=140 +1000 REM "Test code" +1010 INPUT A$ +1020 GOSUB 8000 +1030 GOTO 1000 +8000 REM "The turtle code: A$ has a set of commands" +8010 REM "Commands f,b,r,l and single digits for the distance" +8020 REM "Prepare, set the speed and directions and hit the break" +8030 DWRITE BA,1: DWRITE BB,1 +8040 AWRITE SA,S: AWRITE SB,S +8050 DWRITE DA,0: DWRITE DB,0 +8100 REM "every character in A$ is a command" +8110 WHILE LEN(A$)>0 +8120 C=A$: A$=A$(2) +8130 IF C=>"0" AND C<="9" THEN TT=C-"0": CONT +8140 SWITCH C +8150 CASE "e": END +8160 CASE "f": DWRITE DA,0: DWRITE DB,0: GOSUB 9000 +8170 CASE "b": DWRITE DA,1: DWRITE DB,1: GOSUB 9000 +8180 CASE "l": DWRITE DA,0: DWRITE DB,1: GOSUB 9000 +8190 CASE "r": DWRITE DA,1: DWRITE DB,0: GOSUB 9000 +8200 SWEND +8400 REM "Report the distance after each command" +8410 DWRITE TP,0: PULSE TP,10 +8420 E=PULSE(EP,1,100)/29*100/2 +8430 PRINT "Distance:",E +8500 WEND +8900 RETURN +9000 REM "drive a bit, TT says how long" +9010 DWRITE BA,0: DWRITE BB,0 +9020 DELAY 100+TT*100 +9030 DWRITE BA,1: DWRITE BB,1 +9040 RETURN diff --git a/data/examples/17robot/turtleb.bas b/data/examples/17robot/turtleb.bas new file mode 100644 index 0000000000000000000000000000000000000000..ed5c668c8aadd9bebe87c782c1a823cca197564c --- /dev/null +++ b/data/examples/17robot/turtleb.bas @@ -0,0 +1,58 @@ +10 REM "Engine code, the pins of the Arduino motor shield" +20 DA=12: SA=3: BA=9 +30 DB=13: SB=11: BB=8 +40 REM "Servo and sensor pins" +50 TP=4: EP=5 +60 SP=6 +100 REM "Set the pins and PWM" +110 PINM DA,1: PINM BA,1 +120 PINM DB,1: PINM BB,1 +130 AWRITE SA,0: AWRITE SB,0 +140 PINM TP,1: PINM EP,0 +150 PINM SP,1 +200 REM "some parameters, TT is step time, S is speed ie voltage" +210 TT=5 +220 S=140 +300 REM "Prep the servo forward" +310 A=90: GOSUB 9100 +1000 REM "Input loop" +1010 INPUT A$ +1020 GOSUB 8000: REM "call the turtle" +1030 GOTO 1000 +8000 REM "The turtle code: A$ has a set of commands" +8010 REM "Commands f,b,r,l and single digits for the distance" +8020 REM "Prepare, set the speed and directions and hit the break" +8030 DWRITE BA,1: DWRITE BB,1 +8040 AWRITE SA,S: AWRITE SB,S +8050 DWRITE DA,0: DWRITE DB,0 +8100 REM "every character in A$ is a command" +8110 WHILE LEN(A$)>0 +8120 C=A$: A$=A$(2) +8130 IF C =>"0" AND C <="9" THEN TT=C-"0": CONT +8140 SWITCH C +8150 CASE "e": END +8160 CASE "f": DWRITE DA,0: DWRITE DB,0 +8170 CASE "b": DWRITE DA,1: DWRITE DB,1 +8180 CASE "l": DWRITE DA,0: DWRITE DB,1 +8190 CASE "r": DWRITE DA,1: DWRITE DB,0 +8200 CASE "L": A=0: GOSUB 9100: GOSUB 9000: A=90: GOSUB 9100: CONT +8210 CASE "R": A=180: GOSUB 9100: GOSUB 9000: A=90: GOSUB 9100: CONT +8220 CASE "F": GOSUB 9000: CONT +8290 SWEND +8300 REM "drive a bit, TT says how long" +8310 DWRITE BA,0: DWRITE BB,0 +8320 DELAY 100+TT*100 +8330 DWRITE BA,1: DWRITE BB,1 +8340 GOSUB 9000: PRINT "Distance:",E +8350 WEND +8900 RETURN +9000 REM "Measure the distance" +9010 DWRITE TP,0: PULSE TP,10 +9020 E=PULSE(EP,1,100)/29*100/2 +9030 PRINT "Distance:",E +9040 RETURN +9100 REM "Set the servo angle" +9110 DWRITE SP,0 +9120 P=40+A*200/180 +9130 FOR I=1 TO 40: DELAY 20: PULSE SP,P: NEXT +9140 RETURN diff --git a/data/examples/17robot/turtleesp32.bas b/data/examples/17robot/turtleesp32.bas new file mode 100644 index 0000000000000000000000000000000000000000..02dd2899ee2843e095d7121df195827bc7d23eea --- /dev/null +++ b/data/examples/17robot/turtleesp32.bas @@ -0,0 +1,44 @@ +10 REM "engine code, the pins of the Arduino motor shield" +20 DA=19: SA=25: BA=13 +30 DB=18: SB=23: BB=12 +40 TP=17: EP=16 +100 REM "set the pins, Dx is direction, Bx is break" +110 PINM DA,1: PINM BA,1 +120 PINM DB,1: PINM BB,1 +130 AWRITE SA,0: AWRITE SB,0 +140 PINM TP, 1: PINM EP, 0 +200 REM "some parameters, TT is step time, S is speed ie voltage" +210 TT=5 +220 S=140 +1000 REM "Test code" +1010 INPUT A$ +1020 GOSUB 8000 +1030 GOTO 1000 +8000 REM "The turtle code: A$ has a set of commands" +8010 REM "Commands f,b,r,l and single digits for the distance" +8020 REM "Prepare, set the speed and directions and hit the break" +8030 DWRITE BA,1: DWRITE BB,1 +8040 AWRITE SA,S: AWRITE SB,S +8050 DWRITE DA,0: DWRITE DB,0 +8100 REM "every character in A$ is a command" +8110 WHILE LEN(A$)>0 +8120 C=A$: A$=A$(2) +8130 IF C=>"0" AND C<="9" THEN TT=C-"0": CONT +8140 SWITCH C +8150 CASE "e": END +8160 CASE "f": DWRITE DA,0: DWRITE DB,0: GOSUB 9000 +8170 CASE "b": DWRITE DA,1: DWRITE DB,1: GOSUB 9000 +8180 CASE "l": DWRITE DA,0: DWRITE DB,1: GOSUB 9000 +8190 CASE "r": DWRITE DA,1: DWRITE DB,0: GOSUB 9000 +8200 SWEND +8400 REM "Report the distance after each command" +8410 DWRITE TP,0: PULSE TP,10 +8420 E=PULSE(EP,1,100)/29*100/2 +8430 PRINT "Distance:",E +8500 WEND +8900 RETURN +9000 REM "drive a bit, TT says how long" +9010 DWRITE BA,0: DWRITE BB,0 +9020 DELAY 100+TT*100 +9030 DWRITE BA,1: DWRITE BB,1 +9040 RETURN diff --git a/data/examples/17robot/turtlemqtt32.bas b/data/examples/17robot/turtlemqtt32.bas new file mode 100644 index 0000000000000000000000000000000000000000..d60e969dd1d30fb1febd76d0cc1655af88782bb3 --- /dev/null +++ b/data/examples/17robot/turtlemqtt32.bas @@ -0,0 +1,47 @@ +10 REM "engine code, the pins of the Arduino motor shield" +20 DA=19: SA=25: BA=13 +30 DB=18: SB=23: BB=12 +40 TP=17: EP=16 +100 REM "set the pins, Dx is direction, Bx is break" +110 PINM DA,1: PINM BA,1 +120 PINM DB,1: PINM BB,1 +130 AWRITE SA,0: AWRITE SB,0 +140 PINM TP, 1: PINM EP, 0 +200 REM "some parameters, TT is step time, S is speed ie voltage" +210 TT=5 +220 S=140 +300 REM "Open MQTT channel" +310 OPEN &9, "littlerobot/data", 1 +320 OPEN &9, "littlerobot/command" +1000 REM "MQTT code" +1010 INPUT &9, A$ +1020 IF A$<>"" THEN GOSUB 8000 ELSE DELAY 500 +1030 GOTO 1000 +8000 REM "The turtle code: A$ has a set of commands" +8010 REM "Commands f,b,r,l and single digits for the distance" +8020 REM "Prepare, set the speed and directions and hit the break" +8030 DWRITE BA,1: DWRITE BB,1 +8040 AWRITE SA,S: AWRITE SB,S +8050 DWRITE DA,0: DWRITE DB,0 +8100 REM "every character in A$ is a command" +8110 WHILE LEN(A$)>0 +8120 C=A$: A$=A$(2) +8130 IF C=>"0" AND C<="9" THEN TT=C-"0": CONT +8140 SWITCH C +8150 CASE "e": END +8160 CASE "f": DWRITE DA,0: DWRITE DB,0: GOSUB 9000 +8170 CASE "b": DWRITE DA,1: DWRITE DB,1: GOSUB 9000 +8180 CASE "l": DWRITE DA,0: DWRITE DB,1: GOSUB 9000 +8190 CASE "r": DWRITE DA,1: DWRITE DB,0: GOSUB 9000 +8200 SWEND +8400 REM "Report the distance after each command" +8410 DWRITE TP,0: PULSE TP,10 +8420 E=PULSE(EP,1,100)/29*100/2 +8430 PRINT &9, "Distance:",E +8500 WEND +8900 RETURN +9000 REM "drive a bit, TT says how long" +9010 DWRITE BA,0: DWRITE BB,0 +9020 DELAY 100+TT*100 +9030 DWRITE BA,1: DWRITE BB,1 +9040 RETURN diff --git a/data/examples/17robot/turtlex.bas b/data/examples/17robot/turtlex.bas new file mode 100644 index 0000000000000000000000000000000000000000..9ba24047d6816393a96400139dca679629d97209 --- /dev/null +++ b/data/examples/17robot/turtlex.bas @@ -0,0 +1,61 @@ +10 REM "engine code, the pins of the Arduino motor shield" +20 DA=12: SA=3: BA=9 +30 DB=13: SB=11: BB=8 +40 TP=4: EP=5: SP=6 +100 REM "set the pins, Dx is direction, Bx is break" +110 PINM DA,1: PINM BA,1 +120 PINM DB,1: PINM BB,1 +130 AWRITE SA,0: AWRITE SB,0 +140 PINM TP, 1: PINM EP, 0 +200 REM "some parameters, TT is step time, S is speed ie voltage" +210 TT=5 +220 S=140 +300 REM "The function for the servo and the echo, integer safe!" +310 DEF FNP(A)=40+A*200/180 +320 DEF FNE(P)=P/29*100/2 +1000 REM "Test code" +1010 INPUT A$ +1020 GOSUB 8000 +1030 GOTO 1000 +8000 REM "The turtle code: A$ has a set of commands" +8010 REM "Commands f,b,r,l and single digits for the distance" +8020 REM "Prepare, set the speed and directions and hit the break" +8030 DWRITE BA,1: DWRITE BB,1 +8040 AWRITE SA,S: AWRITE SB,S +8050 DWRITE DA,0: DWRITE DB,0 +8100 REM "every character in A$ is a command" +8110 WHILE LEN(A$)>0 +8120 C=A$: A$=A$(2) +8130 IF C=>"0" AND C<="9" THEN TT=C-"0": CONT +8140 SWITCH C +8150 CASE "e": END +8160 CASE "f": DWRITE DA,0: DWRITE DB,0: GOSUB 9000 +8170 CASE "b": DWRITE DA,1: DWRITE DB,1: GOSUB 9000 +8180 CASE "l": DWRITE DA,0: DWRITE DB,1: GOSUB 9000 +8190 CASE "r": DWRITE DA,1: DWRITE DB,0: GOSUB 9000 +8200 CASE "L": GOSUB 10000: FOR I=1 TO 5: PRINT I,E(I): NEXT +8390 SWEND +8400 REM "Report the distance after each command" +8410 GOSUB 11000: PRINT "Distance:",E +8500 WEND +8900 RETURN +9000 REM "drive a bit, TT says how long" +9010 DWRITE BA,0: DWRITE BB,0 +9020 DELAY 100+TT*100 +9030 DWRITE BA,1: DWRITE BB,1 +9040 RETURN +10000 REM "The look around code" +10060 FOR J=1 TO 5 +10070 A=(J-1)*45: GOSUB 12000: GOSUB 11000: E(J)=E +10120 NEXT +10130 A=90: GOSUB 12000 +10190 RETURN +11000 REM "Echo once and return the value in E" +11010 DWRITE TP,0: PULSE TP,10 +11020 E=FNE(PULSE(EP,1,70)) +11030 RETURN +12000 REM "The servo code" +12010 DWRITE SP,0 +12020 FOR I=1 TO 40: DELAY 20: PULSE SP,FNP(A): NEXT +12030 RETURN + diff --git a/data/examples/17robot/turtlexesp32.bas b/data/examples/17robot/turtlexesp32.bas new file mode 100644 index 0000000000000000000000000000000000000000..43b52f04c00668330b38ba7a29b98f04b026f508 --- /dev/null +++ b/data/examples/17robot/turtlexesp32.bas @@ -0,0 +1,61 @@ +10 REM "engine code, the pins of the Arduino motor shield" +20 DA=19: SA=25: BA=13 +30 DB=18: SB=23: BB=12 +40 TP=17: EP=16: SP=27 +100 REM "set the pins, Dx is direction, Bx is break" +110 PINM DA,1: PINM BA,1 +120 PINM DB,1: PINM BB,1 +130 AWRITE SA,0: AWRITE SB,0 +140 PINM TP, 1: PINM EP, 0 +200 REM "some parameters, TT is step time, S is speed ie voltage" +210 TT=5 +220 S=140 +1000 REM "Test code" +1010 INPUT A$ +1020 GOSUB 8000 +1030 GOTO 1000 +8000 REM "The turtle code: A$ has a set of commands" +8010 REM "Commands f,b,r,l and single digits for the distance" +8020 REM "Prepare, set the speed and directions and hit the break" +8030 DWRITE BA,1: DWRITE BB,1 +8040 AWRITE SA,S: AWRITE SB,S +8050 DWRITE DA,0: DWRITE DB,0 +8100 REM "every character in A$ is a command" +8110 WHILE LEN(A$)>0 +8120 C=A$: A$=A$(2) +8130 IF C=>"0" AND C<="9" THEN TT=C-"0": CONT +8140 SWITCH C +8150 CASE "e": END +8160 CASE "f": DWRITE DA,0: DWRITE DB,0: GOSUB 9000 +8170 CASE "b": DWRITE DA,1: DWRITE DB,1: GOSUB 9000 +8180 CASE "l": DWRITE DA,0: DWRITE DB,1: GOSUB 9000 +8190 CASE "r": DWRITE DA,1: DWRITE DB,0: GOSUB 9000 +8200 CASE "L": GOSUB 10000: FOR I=1 TO 5: PRINT I,E(I): NEXT +8390 SWEND +8400 REM "Report the distance after each command" +8410 DWRITE TP,0: PULSE TP,10 +8420 E=PULSE(EP,1,100)/29*100/2 +8430 PRINT "Distance:",E +8500 WEND +8900 RETURN +9000 REM "drive a bit, TT says how long" +9010 DWRITE BA,0: DWRITE BB,0 +9020 DELAY 100+TT*100 +9030 DWRITE BA,1: DWRITE BB,1 +9040 RETURN +10000 REM "The look around code" +10010 PINM SP,1: PINM TP,1: PINM EP,0 +10020 DEF FNP(A)=50+A*200/180 +10030 DWRITE SP,0 +10040 FOR I=1 TO 40: DELAY 20: PULSE SP,FNP(0): NEXT +10050 J=1 +10060 FOR A=0 TO 180 STEP 45 +10070 FOR I=1 TO 10: DELAY 20: PULSE SP,FNP(A): NEXT +10080 DWRITE EP,0 +10090 PULSE TP,10 +10100 E(J)=PULSE(EP,1,70)/29*100/2 +10110 J=J+1 +10120 NEXT +10130 FOR I=1 TO 40: DELAY 20: PULSE SP,FNP(90): NEXT +10190 RETURN + diff --git a/data/examples/98testsArduino/corep.bas b/data/examples/98testsArduino/corep.bas new file mode 100644 index 0000000000000000000000000000000000000000..f5b55c9e172fec90fa47c4ac1dd354798f33cb46 --- /dev/null +++ b/data/examples/98testsArduino/corep.bas @@ -0,0 +1,90 @@ +10 REM Test program for integer BASICs +100 PRINT "*** Core language features ***" +110 A=5: B=19: C=A-B: D=A+B: E=A*B: F=INT(B/A) +120 PRINT "Math:" +130 PRINT A,B,C,D,E,F +140 PRINT A,B,A-B,A+B,A*B,INT(B/A) +150 PRINT "5 19 -14 24 95 3" +200 PRINT "Loop and GOTO:" +210 FOR I=1 TO 10 +220 PRINT I, +230 NEXT: PRINT +240 FOR I=1 +250 PRINT I,: IF I=10 BREAK +260 NEXT: PRINT +270 I=1 +280 PRINT I,: I=I+1: IF I<=10: GOTO 280 +290 PRINT +300 PRINT "GOSUB and RETURN" +310 GOSUB 340 +320 PRINT "Returned" +330 GOTO 400 +340 PRINT "In GOSUB" +350 RETURN +400 PRINT "Functions" +410 A=-1: B=1: @R=1 +420 PRINT SGN(A), SGN(B), ABS(A), RND(10) +430 PRINT "-1 1 1" +500 PRINT "*** Arduino features ***" +510 PRINT "Blink" +520 PINM LED, 1 +530 FOR I=1 TO 4: DWRITE LED, 1: DELAY 200: DWRITE LED, 0: NEXT +540 PRINT "Time" +550 PRINT MILLIS(1): DELAY 200: PRINT MILLIS(1) +560 PRINT "EEPROM" +570 PRINT "Size:", @E +580 FOR I=1 TO 4: PRINT I, @E(I): NEXT +590 @E(1)=10: PRINT "10=",@E(1) +600 PRINT "*** Dartmouth features ***" +610 DEF FNF(X)=X*X +620 X=5: PRINT "X=", X +630 PRINT "FNF(7)=", FNF(7) +640 PRINT "X=",X +650 FOR I=1 TO 3 +660 ON I GOSUB 700, 710, 720 +670 NEXT +680 GOTO 800 +700 PRINT "One": RETURN +710 PRINT "Two": RETURN +720 PRINT "Three": RETURN +730 DATA "Hello", "World", 31414 +800 READ A$, B$: PRINT A$,B$ +810 READ A: PRINT "PI is",A +820 PRINT "DATA pointer is", DATA +900 PRINT "*** Strings ***" +910 A$="Hello World" +920 PRINT A$, ":", LEN(A$) +930 FOR I=1 TO LEN(A$) +940 PRINT TAB(I-1);A$(I) +950 NEXT +960 FOR I=1 TO LEN(A$) +970 PRINT A$(1,I) +980 NEXT +990 B$="Arduino says " +1000 B$=B$+A$: PRINT B$ +1010 B$=STR$(A): PRINT "PI is", B$ +1020 B=VAL(B$): PRINT "PI is", B +1030 PRINT "String length pointer is", @V +1040 FOR I=1 TO 5 +1050 PRINT TAB(I-1);MID$(A$,I,LEN(A$)-2*I+1) +1060 NEXT +1070 FOR I=1 TO 5: PRINT LEFT$(A$,I): NEXT +1080 FOR I=1 TO 5: PRINT TAB(5-I);RIGHT$(A$,I): NEXT + + + + + + + + + + + + + + + + + + diff --git a/data/examples/98testsArduino/mkbuildin.bas b/data/examples/98testsArduino/mkbuildin.bas new file mode 100644 index 0000000000000000000000000000000000000000..f2216f60d1dd9e0a55dc62b449f69a6897c6a903 --- /dev/null +++ b/data/examples/98testsArduino/mkbuildin.bas @@ -0,0 +1,50 @@ +10 REM "This program created a buildin.h file to be compiled into BASIC" +20 DIM NA$(32,20), A$(128), B$(128) +30 N=0 +40 P$="*" +50 OPEN "buildin.h", 1 +1000 REM "Build the file list" +1010 FOR N=1 +1020 READ N$ +1030 IF (N$)=0 THEN BREAK +1040 PRINT "File: ", N$ +1050 NA$()(N)=N$ +1060 NEXT +1070 N=N-1 +1080 PRINT "Processing",N,"files" +1100 REM "Create the structures" +1110 FOR I=1 TO N +1120 @S=0: N$=NA$()(I) +1130 OPEN N$ +1140 IF @S<>0 THEN PRINT "File error in", N$: END +1200 REM "Process one file" +1210 PRINT &16,"const char buildin_pgm";I;"[] PROGMEM = {" +1220 FOR J=1 +1230 INPUT &16, A$ +1240 IF @S=-1 THEN BREAK +1250 IF A$="" THEN CONT +1260 B$="" +1300 FOR K=1 TO LEN(A$) +1310 IF A$(K,K)='"' THEN B$=B$+'\"' ELSE B$=B$+A$(K,K) +1320 NEXT +1330 PRINT &16, '"';B$;'\n"' +1400 NEXT +1410 PRINT &16, '"\f"' +1420 PRINT &16,"};" +1430 PRINT &16, "const char buildin_pgm";I;"_name[] PROGMEM = ";'"';P$;N$;'";' +1600 NEXT +1700 PRINT &16, "const char* const buildin_programs[] PROGMEM = {" +1710 FOR I=1 TO N +1720 PRINT &16, "buildin_pgm";I;"," +1730 NEXT I +1740 PRINT &16, "0" +1750 PRINT &16, "};" +1800 PRINT &16, "const char* const buildin_program_names[] PROGMEM = {" +1810 FOR I=1 TO N +1820 PRINT &16, "buildin_pgm";I;"_name," +1830 NEXT I +1840 PRINT &16, "0" +1850 PRINT &16, "};" +10000 REM "The programs to be included into the buildin.h +10010 DATA "corep.bas" +10100 DATA 0 diff --git a/data/examples/99tests/01hello.bas b/data/examples/99tests/01hello.bas new file mode 100644 index 0000000000000000000000000000000000000000..8c3e0f501ef8dcd63f51fc4e94bd3fcfd2895fc4 --- /dev/null +++ b/data/examples/99tests/01hello.bas @@ -0,0 +1,2 @@ +10 print "hello world" + diff --git a/data/examples/99tests/01hello.bas.res b/data/examples/99tests/01hello.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..3b18e512dba79e4c8300dd08aeb37f8e728b8dad --- /dev/null +++ b/data/examples/99tests/01hello.bas.res @@ -0,0 +1 @@ +hello world diff --git a/data/examples/99tests/02print.bas b/data/examples/99tests/02print.bas new file mode 100644 index 0000000000000000000000000000000000000000..317a1ade018ee14e4d47b229619927a93ff54e40 --- /dev/null +++ b/data/examples/99tests/02print.bas @@ -0,0 +1,9 @@ +10 PRINT +20 PRINT "this is a string" +30 PRINT 10 +40 A=10 +50 PRINT A, 10 +60 PRINT #3, A, 10, "end" +70 PRINT "the number is", A +80 PRINT "double of", A, "is", 2*A +90 PRINT "double of "; A; " is "; 2*A diff --git a/data/examples/99tests/02print.bas.res b/data/examples/99tests/02print.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..3e356853d04b82b6f211096d5926ebd0f2341e07 --- /dev/null +++ b/data/examples/99tests/02print.bas.res @@ -0,0 +1,8 @@ + +this is a string +10 +10 10 +10 10 end +the number is 10 +double of 10 is 20 +double of 10 is 20 diff --git a/data/examples/99tests/03let.bas b/data/examples/99tests/03let.bas new file mode 100644 index 0000000000000000000000000000000000000000..3e2f9124196f348d4abac4755e104b2a2de4de80 --- /dev/null +++ b/data/examples/99tests/03let.bas @@ -0,0 +1,13 @@ +10 LET A=12 +20 B=-15 +30 PRINT A, B +40 C=(A+B)*2 +50 PRINT C +60 D=(C+B)*(A+B) +70 PRINT D +80 E=INT(C) +90 F=SGN(C) +100 G=ABS(C) +110 PRINT C, E, F, G +120 A=C+E+F+G +130 PRINT A diff --git a/data/examples/99tests/03let.bas.res b/data/examples/99tests/03let.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..92f04298aac8809f36915037b52218051e8d8e49 --- /dev/null +++ b/data/examples/99tests/03let.bas.res @@ -0,0 +1,5 @@ +12 -15 +-6 +63 +-6 -6 -1 6 +-7 diff --git a/data/examples/99tests/04goto.bas b/data/examples/99tests/04goto.bas new file mode 100644 index 0000000000000000000000000000000000000000..5aba6c265900dd964e0194a03033788ad64c22ed --- /dev/null +++ b/data/examples/99tests/04goto.bas @@ -0,0 +1,4 @@ +10 PRINT "start" +20 GOTO 100 +30 PRINT "never printed" +100 PRINT "jumped" diff --git a/data/examples/99tests/04goto.bas.res b/data/examples/99tests/04goto.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..38cc109c74d8b77c98dbd7b56a46638428a7c9f0 --- /dev/null +++ b/data/examples/99tests/04goto.bas.res @@ -0,0 +1,2 @@ +start +jumped diff --git a/data/examples/99tests/05gosub.bas b/data/examples/99tests/05gosub.bas new file mode 100644 index 0000000000000000000000000000000000000000..c5c26cee3403b4b141d70d3f1e9f992aa4cf1dd7 --- /dev/null +++ b/data/examples/99tests/05gosub.bas @@ -0,0 +1,6 @@ +10 PRINT "start" +20 GOSUB 100 +30 PRINT "returned" +40 STOP +100 PRINT "in subroutine" +110 RETURN diff --git a/data/examples/99tests/05gosub.bas.res b/data/examples/99tests/05gosub.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..cceab6edfeff28acc309abae25f12076fa54bccb --- /dev/null +++ b/data/examples/99tests/05gosub.bas.res @@ -0,0 +1,3 @@ +start +in subroutine +returned diff --git a/data/examples/99tests/06for.bas b/data/examples/99tests/06for.bas new file mode 100644 index 0000000000000000000000000000000000000000..3c985624a0b71150b262b5f6825a3200057a236c --- /dev/null +++ b/data/examples/99tests/06for.bas @@ -0,0 +1,22 @@ +10 FOR I=1 TO 10 +20 A=A+I +30 NEXT I +40 PRINT A +50 FOR I=1 +60 IF I=5 BREAK +70 NEXT +80 PRINT I +90 FOR I=1 TO 10 +100 IF I>5 CONT +110 PRINT I +120 NEXT +130 FOR I=1 TO 2 +140 FOR J=1 TO 2 +150 FOR K=1 TO 2 +160 FOR L=1 TO 2 +170 A=A+(I+J)*(K+L) +180 NEXT +190 NEXT +200 NEXT +210 NEXT +220 PRINT A diff --git a/data/examples/99tests/06for.bas.res b/data/examples/99tests/06for.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..cfe762c95ea6c89e1b33f32c3200ba9ada35bcf9 --- /dev/null +++ b/data/examples/99tests/06for.bas.res @@ -0,0 +1,8 @@ +55 +5 +1 +2 +3 +4 +5 +199 diff --git a/data/examples/99tests/07array.bas b/data/examples/99tests/07array.bas new file mode 100644 index 0000000000000000000000000000000000000000..7ba29b3d97fb121a529f7c3fa5dbffb4cac72830 --- /dev/null +++ b/data/examples/99tests/07array.bas @@ -0,0 +1,46 @@ +10 REM "Array test program" +20 REM "Dimensioning, storing and recalling" +30 REM "Arrays are dimensioned with DIM like A(), B()" +40 REM "Arrays autodimension to size 10 like C()" +50 REM "@E() is the EEPROM array" +60 REM "@() is the end of memory array" +100 DIM B(28) +110 DIM A(18) +200 PRINT "Testing indexing A(I), B() is zero" +210 FOR I=1 TO 18 +220 A(I)=I*I +230 NEXT +240 FOR I=1 TO 18 +250 PRINT I, A(I), "=", I*I +260 NEXT +270 FOR I=1 TO 28 +280 PRINT I, B(I), "=", 0 +290 NEXT +300 PRINT "Testing A(2)" +310 A(2)=127 +320 PRINT #4, A(2), "= 127" +400 PRINT "Autodimensioning C" +410 FOR I=1 TO 10 +420 C(I)=RND(I) +430 NEXT +440 FOR I=1 TO 10 +450 PRINT I, C(I) +460 NEXT +500 PRINT "Testing B() and @()" +510 FOR I=1 TO 10 +520 B(I)=I*6: @(I)=I*6 +530 NEXT +540 PRINT "Size of memory array=", @ +550 FOR J=1 TO 4 +560 PRINT #3,J,B(J),@(J);" = ";6*J +570 NEXT +600 PRINT "Testing EEPROM" +610 PRINT "Size of EEPROM array=", @E +620 IF @E=0 THEN PRINT "No EEPROM" : END +630 FOR I=1 TO 10 +640 @E(I)=I*I +650 NEXT +660 FOR J=1 TO 10 +670 PRINT #3,J,@E(J);" = ";J*J +680 NEXT +700 END diff --git a/data/examples/99tests/07array.bas.res b/data/examples/99tests/07array.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..ed4e60b2f22148eacac7c2ccc3ee22d7e962947f --- /dev/null +++ b/data/examples/99tests/07array.bas.res @@ -0,0 +1,78 @@ +Testing indexing A(I), B() is zero +1 1 = 1 +2 4 = 4 +3 9 = 9 +4 16 = 16 +5 25 = 25 +6 36 = 36 +7 49 = 49 +8 64 = 64 +9 81 = 81 +10 100 = 100 +11 121 = 121 +12 144 = 144 +13 169 = 169 +14 196 = 196 +15 225 = 225 +16 256 = 256 +17 289 = 289 +18 324 = 324 +1 0 = 0 +2 0 = 0 +3 0 = 0 +4 0 = 0 +5 0 = 0 +6 0 = 0 +7 0 = 0 +8 0 = 0 +9 0 = 0 +10 0 = 0 +11 0 = 0 +12 0 = 0 +13 0 = 0 +14 0 = 0 +15 0 = 0 +16 0 = 0 +17 0 = 0 +18 0 = 0 +19 0 = 0 +20 0 = 0 +21 0 = 0 +22 0 = 0 +23 0 = 0 +24 0 = 0 +25 0 = 0 +26 0 = 0 +27 0 = 0 +28 0 = 0 +Testing A(2) +127 = 127 +Autodimensioning C +1 6.69224e-16 +2 1.47699e-07 +3 0.448212 +4 3.74166 +5 2.43394 +6 1.31984 +7 3.63157 +8 7.86531 +9 6.85589 +10 2.54556 +Testing B() and @() +Size of memory array= 16075 +1 6 6 = 6 +2 12 12 = 12 +3 18 18 = 18 +4 24 24 = 24 +Testing EEPROM +Size of EEPROM array= 256 +1 1 = 1 +2 4 = 4 +3 9 = 9 +4 16 = 16 +5 25 = 25 +6 36 = 36 +7 49 = 49 +8 64 = 64 +9 81 = 81 +10 100 = 100 diff --git a/data/examples/99tests/08string1.bas b/data/examples/99tests/08string1.bas new file mode 100644 index 0000000000000000000000000000000000000000..4a8bcf9ff32196cfdeb69da3d85eb5b951caf23c --- /dev/null +++ b/data/examples/99tests/08string1.bas @@ -0,0 +1,20 @@ +10 REM "Strings in BASIC (1)" +20 REM "Dimensioning and comparing" +100 PRINT "Strings can be constants" +110 PRINT "Strings", "can", "be", "constants" +200 PRINT "String variables" +210 A$="... without DIM - 32 chars max" +220 PRINT A$ +230 PRINT "Length of this string", LEN(A$) +240 DIM B$(80) +250 B$="... dimensioning to any length, the memory is the limit" +260 PRINT B$ +270 PRINT "Length of this string", LEN(B$) +300 IF A$<>B$ THEN PRINT "Strings are different" +310 IF A$=A$ THEN PRINT "Strings are equal" +320 IF A$ THEN PRINT "String is not empty" +330 C$="" +340 IF C$ THEN PRINT "This never shows" +350 PRINT "... because empty strings evaluate to false" +400 END + diff --git a/data/examples/99tests/08string1.bas.res b/data/examples/99tests/08string1.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..1a38573daf3118be79ce02ba574e3f1be11ce45e --- /dev/null +++ b/data/examples/99tests/08string1.bas.res @@ -0,0 +1,11 @@ +Strings can be constants +Strings can be constants +String variables +... without DIM - 32 chars max +Length of this string 30 +... dimensioning to any length, the memory is the limit +Length of this string 55 +Strings are different +Strings are equal +String is not empty +... because empty strings evaluate to false diff --git a/data/examples/99tests/09string2.bas b/data/examples/99tests/09string2.bas new file mode 100644 index 0000000000000000000000000000000000000000..b745f5484582bb18cdb6887cfc88eb01b6422c80 --- /dev/null +++ b/data/examples/99tests/09string2.bas @@ -0,0 +1,22 @@ +10 REM "Strings in BASIC (2)" +20 REM "Substrings, splitting and concatenating" +100 DIM A$(80), B$(80) +110 A$="the quick brown fox jumps over the lazy dog" +120 PRINT A$ +130 PRINT "The first 3 characters-", A$(1,3) +140 PRINT "The rest of the string-", A$(4) +150 PRINT "Splitting ..." +160 FOR I=1 TO LEN(A$) +170 PRINT A$(I, I); +180 IF A$(I, I)=" " THEN PRINT +190 NEXT I +200 PRINT +210 C$=A$(1, 19) +220 D$=A$(20) +230 PRINT C$ +240 PRINT D$ +250 PRINT "Concatenating ..." +260 B$=C$ : B$(LEN(B$)+1)=D$ +270 PRINT B$ +300 END + diff --git a/data/examples/99tests/09string2.bas.res b/data/examples/99tests/09string2.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..04c87af0e25f60c41cedfe9fbf7891823d9cad03 --- /dev/null +++ b/data/examples/99tests/09string2.bas.res @@ -0,0 +1,17 @@ +the quick brown fox jumps over the lazy dog +The first 3 characters- the +The rest of the string- quick brown fox jumps over the lazy dog +Splitting ... +the +quick +brown +fox +jumps +over +the +lazy +dog +the quick brown fox + jumps over the lazy dog +Concatenating ... +the quick brown fox jumps over the lazy dog diff --git a/data/examples/99tests/10string3.bas b/data/examples/99tests/10string3.bas new file mode 100644 index 0000000000000000000000000000000000000000..5c31f6367b808a86be7b70817f1f8c7f861f514d --- /dev/null +++ b/data/examples/99tests/10string3.bas @@ -0,0 +1,23 @@ +10 REM "Strings in BASIC (3)" +20 REM "chars and strings" +100 DIM A$(80) +110 PRINT "Integers are chars" +120 FOR I=1 TO 26 +130 A$(I)=64+I +140 NEXT I +150 PRINT A$ +200 PRINT "Chars are chars or integers, mind the ()" +210 FOR I=1 TO 10 +220 C=A$(I, I) +230 PRINT A$(I, I), (A$(I, I)), C +240 NEXT I +300 PRINT "Chars are taken from the beginning" +310 FOR I=1 TO 10 +320 C=A$(I) +330 PRINT C, A$(I) +340 NEXT I +400 PRINT "Chars are signed, mind the ()" +410 A$=230 +420 PRINT (A$) +500 END + diff --git a/data/examples/99tests/10string3.bas.res b/data/examples/99tests/10string3.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..4ef722d36607cade526021835a503855e61ddc2f --- /dev/null +++ b/data/examples/99tests/10string3.bas.res @@ -0,0 +1,26 @@ +Integers are chars +ABCDEFGHIJKLMNOPQRSTUVWXYZ +Chars are chars or integers, mind the () +A 65 65 +B 66 66 +C 67 67 +D 68 68 +E 69 69 +F 70 70 +G 71 71 +H 72 72 +I 73 73 +J 74 74 +Chars are taken from the beginning +65 ABCDEFGHIJKLMNOPQRSTUVWXYZ +66 BCDEFGHIJKLMNOPQRSTUVWXYZ +67 CDEFGHIJKLMNOPQRSTUVWXYZ +68 DEFGHIJKLMNOPQRSTUVWXYZ +69 EFGHIJKLMNOPQRSTUVWXYZ +70 FGHIJKLMNOPQRSTUVWXYZ +71 GHIJKLMNOPQRSTUVWXYZ +72 HIJKLMNOPQRSTUVWXYZ +73 IJKLMNOPQRSTUVWXYZ +74 JKLMNOPQRSTUVWXYZ +Chars are signed, mind the () +-26 diff --git a/data/examples/99tests/11string4.bas b/data/examples/99tests/11string4.bas new file mode 100644 index 0000000000000000000000000000000000000000..9f7b1e6d3cc3b0af011e7cc21a639e5f78e8fde4 --- /dev/null +++ b/data/examples/99tests/11string4.bas @@ -0,0 +1,16 @@ +10 REM "Strings in BASIC (4)" +20 REM "String arrays" +30 DIM B$(10,10) +100 REM "Read a string" +110 FOR I=1 TO 9 +120 READ B$()(I) +130 NEXT I +200 REM "Print the entire string" +210 FOR I=1 TO 9 +220 PRINT B$()(I) +230 NEXT I +300 REM "Substrings and arrays" +310 FOR I=1 TO 9 +320 PRINT B$(1,1)(I) +330 NEXT I +400 DATA "the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog" diff --git a/data/examples/99tests/11string4.bas.res b/data/examples/99tests/11string4.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..cb8886c4a99b33ef1ffcf1405695e612ceaa2693 --- /dev/null +++ b/data/examples/99tests/11string4.bas.res @@ -0,0 +1,18 @@ +the +quick +brown +fox +jumps +over +the +lazy +dog +t +q +b +f +j +o +t +l +d diff --git a/data/examples/99tests/12clrvars.bas b/data/examples/99tests/12clrvars.bas new file mode 100644 index 0000000000000000000000000000000000000000..24ee828b0ff76f3a1dad3b4a4adafe862d303f17 --- /dev/null +++ b/data/examples/99tests/12clrvars.bas @@ -0,0 +1,17 @@ +10 M=USR(0, 9) +20 PRINT "Memory size is ";M +30 PRINT "Himem is "; HIMEM +40 PRINT "Heap size is "; M-HIMEM-1 +110 DIM A(8) +120 FOR I=1 TO 8: A(I)=I: NEXT +130 FOR I=1 TO 8: PRINT I, A(I): NEXT +140 A$="Hello World" +150 PRINT "Heap size is "; M-HIMEM-1 +200 PRINT "A$ is ";A$ +210 CLR A() +220 PRINT "A$ is ";A$ +230 PRINT "Heap size is "; M-HIMEM-1 +300 DIM A(20) +310 FOR I=1 TO 20: A(I)=I: NEXT +320 FOR I=1 TO 20: PRINT I, A(I): NEXT +330 PRINT "Heap size is "; M-HIMEM-1 diff --git a/data/examples/99tests/12clrvars.bas.res b/data/examples/99tests/12clrvars.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..67585ba0ecc19b23163b50c46022e92635dac521 --- /dev/null +++ b/data/examples/99tests/12clrvars.bas.res @@ -0,0 +1,36 @@ +Memory size is 65535 +Himem is 65534 +Heap size is 0 +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +Heap size is 80 +A$ is Hello World +A$ is +Heap size is 41 +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 +19 19 +20 20 +Heap size is 128 diff --git a/data/examples/99tests/13cond.bas b/data/examples/99tests/13cond.bas new file mode 100644 index 0000000000000000000000000000000000000000..a14a04957dd2ed911815868044efb771bc3607f4 --- /dev/null +++ b/data/examples/99tests/13cond.bas @@ -0,0 +1,9 @@ +10 REM "Conditions if then else demo" +20 REM "" +100 A=10 +110 IF A=10 THEN 130 +120 PRINT "This code is never reached" +130 IF A=10 THEN PRINT "A is 10" ELSE PRINT "A is not 10" +140 IF A=20 ELSE PRINT "A is not 20" +200 END + diff --git a/data/examples/99tests/13cond.bas.res b/data/examples/99tests/13cond.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..0f22aaaa351e6983a5fb14cf2ffc5494ab82e45d --- /dev/null +++ b/data/examples/99tests/13cond.bas.res @@ -0,0 +1,2 @@ +A is 10 +A is not 20 diff --git a/data/examples/99tests/14fibo.bas b/data/examples/99tests/14fibo.bas new file mode 100644 index 0000000000000000000000000000000000000000..3cfa79caac1156cadfd9c4fd16ab912437a4f14e --- /dev/null +++ b/data/examples/99tests/14fibo.bas @@ -0,0 +1,26 @@ +10 REM "Calculates the Fibonacci numbers" +20 REM "And the Golden Ratio on an Integer BASIC" +200 REM "Main program" +210 N=19 +220 DIM A(N) +230 A(1)=1 +240 A(2)=1 +250 FOR I=3 TO N +260 IF A(I)>16000 THEN BREAK +270 A(I)=A(I-1)+A(I-2) +280 Q=A(I): D=A(I-1) +290 PRINT #4;I,Q,D; +300 GOSUB 500 +310 NEXT +320 END +500 REM "Print a decimal ratio of a fraction" +520 Z=INT(Q/D) +530 PRINT " ";Z;"."; +540 FOR J=1 TO 10 +550 Z=Q%D +560 Q=Z*10 +570 Z=INT(Q/D) +580 PRINT Z; +590 NEXT +600 PRINT " " +610 RETURN diff --git a/data/examples/99tests/14fibo.bas.res b/data/examples/99tests/14fibo.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..abad75ad20cd2a61e23d05923408fe619f3c67b0 --- /dev/null +++ b/data/examples/99tests/14fibo.bas.res @@ -0,0 +1,17 @@ +3 2 1 2.0000000000 +4 3 2 1.5000000000 +5 5 3 1.6666666666 +6 8 5 1.6000000000 +7 13 8 1.6250000000 +8 21 13 1.6153846153 +9 34 21 1.6190476190 +10 55 34 1.6176470588 +11 89 55 1.6181818181 +12 144 89 1.6179775280 +13 233 144 1.6180555555 +14 377 233 1.6180257510 +15 610 377 1.6180371352 +16 987 610 1.6180327868 +17 1597 987 1.6180344478 +18 2584 1597 1.6180338134 +19 4181 2584 1.6180340557 diff --git a/data/examples/99tests/15logic.bas b/data/examples/99tests/15logic.bas new file mode 100644 index 0000000000000000000000000000000000000000..c2edf10fe4a85a158dcc15a8b857ba48f1cc7712 --- /dev/null +++ b/data/examples/99tests/15logic.bas @@ -0,0 +1,19 @@ +10 REM "Logical expressions" +20 REM "" +100 A=10 +110 B=20 +120 PRINT "A="; A, "; B=";B, "; C=";C +130 IF A=10 THEN PRINT "A is 10" +140 IF NOT A=20 THEN PRINT "A is not 20" +150 IF A=10 AND B=20 THEN PRINT "A is 10 and B is 20" +160 IF A=10 OR C=10 THEN PRINT "A is 10 or C is 10" +200 PRINT "Expressions" +210 L=(A=10 AND B=20) +220 PRINT "L=(A=10 AND B=20)" +230 PRINT "L =",L +240 K=NOT L +250 PRINT "NOT L =",K +260 K=NOT NOT L +270 PRINT "NOT NOT L =",K +280 END + diff --git a/data/examples/99tests/15logic.bas.res b/data/examples/99tests/15logic.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..e0ca2c8f1bb758985e59d413fbf19b3cf5a56751 --- /dev/null +++ b/data/examples/99tests/15logic.bas.res @@ -0,0 +1,10 @@ +A=10 ; B=20 ; C=0 +A is 10 +A is not 20 +A is 10 and B is 20 +A is 10 or C is 10 +Expressions +L=(A=10 AND B=20) +L = -1 +NOT L = 0 +NOT NOT L = -1 diff --git a/data/examples/99tests/16parable.bas b/data/examples/99tests/16parable.bas new file mode 100644 index 0000000000000000000000000000000000000000..f62691521713ea4d0f93b6ff4a508ca3dc30ee78 --- /dev/null +++ b/data/examples/99tests/16parable.bas @@ -0,0 +1,10 @@ +10 REM "Draw a parable" +20 REM "" +100 PRINT "Y=X*X" +110 FOR X=-8 TO 8 +120 IF X<>0 PRINT "!"; +130 IF X=0 PRINT "+";: FOR I=2 TO 8*8/2: PRINT "-";: NEXT: PRINT : GOTO 160 +140 TAB(X*X/2-1) +150 PRINT "*" +160 NEXT X +200 END \ No newline at end of file diff --git a/data/examples/99tests/16parable.bas.res b/data/examples/99tests/16parable.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..e0b67265475ac3817254f2e0338ac869d7bf2acb --- /dev/null +++ b/data/examples/99tests/16parable.bas.res @@ -0,0 +1,9 @@ +Y=X*X +! * +! * +! * +! * +! * +! * +! * +!140: Range Error diff --git a/data/examples/99tests/17fileio.bas b/data/examples/99tests/17fileio.bas new file mode 100644 index 0000000000000000000000000000000000000000..8d87e6f94a4d8f416667ef0a5565b399e7a298ac --- /dev/null +++ b/data/examples/99tests/17fileio.bas @@ -0,0 +1,48 @@ +10 REM "Simple FILE I/O demo" +20 REM "" +30 N=4 +40 DIM A$(80) +100 PRINT "Write squares to file" +110 OPEN "daten.txt",1 +120 FOR I=1 TO N +130 PRINT I, I*I +140 PRINT &16, I +150 PRINT &16, I*I +160 NEXT I +170 CLOSE 1 +200 PRINT "Read data as numbers" +210 OPEN "daten.txt" +220 FOR I=1 TO N +230 INPUT &16, A +240 INPUT &16, B +250 PRINT "Read "; A; "^2="; B +260 NEXT +270 CLOSE 0 +300 PRINT "Read data as strings, use EOF status" +310 @S=0 +320 OPEN "daten.txt" +330 IF @S<>0 THEN PRINT "OPEN failed" : END +340 FOR I=1 +350 INPUT &16, A$ +360 IF @S=-1 THEN BREAK +370 PRINT "Line",I,"string '";A$; "' Status = "; @S +380 NEXT +390 CLOSE 0 +400 PRINT I, "lines read" +410 PRINT "Status =", @S +500 PRINT "Read Character by Character use EOF status" +510 @S=0 +520 OPEN "daten.txt" +530 IF @S<>0 THEN PRINT "OPEN failed" : END +540 FOR I=1 +550 GET &16, A +560 PRINT "Character ";I;" :",A +570 IF A=-1 THEN BREAK +580 NEXT +590 PRINT I, "characters read" +600 PRINT "Status =", @S +610 CLOSE 0 +700 END + + + diff --git a/data/examples/99tests/17fileio.bas.res b/data/examples/99tests/17fileio.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..72549d7bb758f078c02fa4ae38a95b3393835b60 --- /dev/null +++ b/data/examples/99tests/17fileio.bas.res @@ -0,0 +1,42 @@ +Write squares to file +1 1 +2 4 +3 9 +4 16 +Read data as numbers +Read 1^2=1 +Read 2^2=4 +Read 3^2=9 +Read 4^2=16 +Read data as strings, use EOF status +Line 1 string '1' Status = 0 +Line 2 string '1' Status = 0 +Line 3 string '2' Status = 0 +Line 4 string '4' Status = 0 +Line 5 string '3' Status = 0 +Line 6 string '9' Status = 0 +Line 7 string '4' Status = 0 +Line 8 string '16' Status = 0 +9 lines read +Status = -1 +Read Character by Character use EOF status +Character 1 : 49 +Character 2 : 10 +Character 3 : 49 +Character 4 : 10 +Character 5 : 50 +Character 6 : 10 +Character 7 : 52 +Character 8 : 10 +Character 9 : 51 +Character 10 : 10 +Character 11 : 57 +Character 12 : 10 +Character 13 : 52 +Character 14 : 10 +Character 15 : 49 +Character 16 : 54 +Character 17 : 10 +Character 18 : -1 +18 characters read +Status = -1 diff --git a/data/examples/99tests/18func.bas b/data/examples/99tests/18func.bas new file mode 100644 index 0000000000000000000000000000000000000000..789bcaa8b0c9613980fd88b06753b08aef479e03 --- /dev/null +++ b/data/examples/99tests/18func.bas @@ -0,0 +1,8 @@ +10 REM "Function definitions" +20 REM "" +100 DEF FNS(X)=X*X +200 READ N +210 PRINT "The square of",N," is: "; FN S(N) +220 PRINT "X is",X +230 END +300 DATA 10 diff --git a/data/examples/99tests/18func.bas.res b/data/examples/99tests/18func.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..073f8d06aa8c086c7b8ac2c7bb06eb227a1b2e95 --- /dev/null +++ b/data/examples/99tests/18func.bas.res @@ -0,0 +1,2 @@ +The square of 10 is: 100 +X is 0 diff --git a/data/examples/99tests/19readdata.bas b/data/examples/99tests/19readdata.bas new file mode 100644 index 0000000000000000000000000000000000000000..619ca3dde5fb225e3543464b4eff6de4a10af24a --- /dev/null +++ b/data/examples/99tests/19readdata.bas @@ -0,0 +1,32 @@ +10 REM "READ and DATA test code" +20 REM "" +100 PRINT "Reading strings" +110 READ A$ +120 IF A$="" THEN GOTO 150 +130 PRINT A$; " "; +140 GOTO 110 +150 PRINT +200 PRINT "Reading numbers and putting characters" +200 FOR I=1 TO 11 +210 READ A +220 PUT A +230 NEXT +240 PRINT +300 PRINT "Reading beyond the end" +310 PRINT "Status byte is", @S +320 PRINT "Attempting to read" +330 READ A +370 PRINT "Status byte is", @S, "now" +380 PRINT "Read data was", A +400 RESTORE +410 READ A$, B$, C$ +420 PRINT "Data pointer is now", DATA +430 RESTORE 2 +440 PRINT "Reading from data pointer 2 now" +450 READ A$ +460 PRINT "Result is", A$ +500 END +600 DATA "the", "quick", "brown", "fox", "jumps" +610 DATA "over", "the", "lazy", "dog", "" +620 DATA 72, 69, 76, 76, 79, 32, 87, 79, 82, 76, 68 + diff --git a/data/examples/99tests/19readdata.bas.res b/data/examples/99tests/19readdata.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..6193527f7e2770aa1678f2e213a9524c305e952f --- /dev/null +++ b/data/examples/99tests/19readdata.bas.res @@ -0,0 +1,11 @@ +Reading strings +the quick brown fox jumps over the lazy dog +HELLO WORLD +Reading beyond the end +Status byte is 0 +Attempting to read +Status byte is 1 now +Read data was 0 +Data pointer is now 4 +Reading from data pointer 2 now +Result is quick diff --git a/data/examples/99tests/20ongo.bas b/data/examples/99tests/20ongo.bas new file mode 100644 index 0000000000000000000000000000000000000000..a066854a1be1f8e8a90724e9f07aaec37deaf315 --- /dev/null +++ b/data/examples/99tests/20ongo.bas @@ -0,0 +1,17 @@ +10 REM "ON GOSUB/GOTO demo program" +20 REM "" +100 PRINT "For the solution to all problems:" +110 READ I +120 IF I=-1 END +130 GOSUB 800 +140 GOTO 110 +800 ON I GOTO 850, 860, 870 +810 REM "default" +820 PRINT "Wrong number",I : RETURN +830 REM "The cases" +850 PRINT "Meditations"; : GOTO 900 +860 PRINT "Alcohol"; : GOTO 900 +870 PRINT "Chocolate"; : GOTO 900 +900 PRINT " is the solution" +910 RETURN +1000 DATA 1,2,3,6,1000,-10,0,-9999,-1 diff --git a/data/examples/99tests/20ongo.bas.res b/data/examples/99tests/20ongo.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..eea8920a9eb590b375897b29077ff3b367048df3 --- /dev/null +++ b/data/examples/99tests/20ongo.bas.res @@ -0,0 +1,9 @@ +For the solution to all problems: +Meditations is the solution +Alcohol is the solution +Chocolate is the solution +Wrong number 6 +Wrong number 1000 +Wrong number -10 +Wrong number 0 +Wrong number -9999 diff --git a/data/examples/99tests/21ongosub.bas b/data/examples/99tests/21ongosub.bas new file mode 100644 index 0000000000000000000000000000000000000000..c9481176771665cb601705a7e2126f6eb5cdea97 --- /dev/null +++ b/data/examples/99tests/21ongosub.bas @@ -0,0 +1,13 @@ +10 REM "ON GOSUB/GOTO demo program" +20 REM "" +100 PRINT "For the solution to all problems:" +110 READ I +120 IF I=-1 END +130 ON I GOSUB 850, 860, 870 +140 GOTO 110 +850 PRINT "Meditation"; : GOTO 900 +860 PRINT "Alcohol"; : GOTO 900 +870 PRINT "Chocolate"; : GOTO 900 +900 PRINT " is the solution" +910 RETURN +1000 DATA 1,2,3,6,1000,-10,0,-9999,-1 diff --git a/data/examples/99tests/21ongosub.bas.res b/data/examples/99tests/21ongosub.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..81bb8b6fe9fc972adf4060c1cfab92ec6cfbb29d --- /dev/null +++ b/data/examples/99tests/21ongosub.bas.res @@ -0,0 +1,4 @@ +For the solution to all problems: +Meditation is the solution +Alcohol is the solution +Chocolate is the solution diff --git a/data/examples/99tests/22trig.bas b/data/examples/99tests/22trig.bas new file mode 100644 index 0000000000000000000000000000000000000000..28fb1c7e807c81959f539e23ed1091d3b90d451c --- /dev/null +++ b/data/examples/99tests/22trig.bas @@ -0,0 +1,12 @@ +10 REM "Table of trigonometric functions" +20 REM "" +100 REM "Calculate PI" +110 P1=4*ATAN(1) +200 PRINT "X";: TAB(4) +205 PRINT "SIN(X)";: TAB(7) +210 PRINT "COS(X)";: TAB(7) +215 PRINT "TAN(X)" +220 FOR I=0 TO 89 STEP 5 +230 X=I/360*2*P1 +240 PRINT #4, I, #12, SIN(X), COS(X), TAN(X) +250 NEXT diff --git a/data/examples/99tests/22trig.bas.res b/data/examples/99tests/22trig.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..7f70c57500860ab377cf96652f263344fd6e422e --- /dev/null +++ b/data/examples/99tests/22trig.bas.res @@ -0,0 +1,19 @@ +X SIN(X) COS(X) TAN(X) +0 0 1 0 +5 0.0871557 0.996195 0.0874887 +10 0.173648 0.984808 0.176327 +15 0.258819 0.965926 0.267949 +20 0.34202 0.939693 0.36397 +25 0.422618 0.906308 0.466308 +30 0.5 0.866025 0.57735 +35 0.573577 0.819152 0.700208 +40 0.642788 0.766044 0.8391 +45 0.707107 0.707107 1 +50 0.766044 0.642788 1.19175 +55 0.819152 0.573576 1.42815 +60 0.866025 0.5 1.73205 +65 0.906308 0.422618 2.14451 +70 0.939693 0.34202 2.74748 +75 0.965926 0.258819 3.73205 +80 0.984808 0.173648 5.67128 +85 0.996195 0.0871558 11.43 diff --git a/data/examples/99tests/23stir.bas b/data/examples/99tests/23stir.bas new file mode 100644 index 0000000000000000000000000000000000000000..8d1c32802aa925018f60b6de4e83cd122a2e5016 --- /dev/null +++ b/data/examples/99tests/23stir.bas @@ -0,0 +1,21 @@ +10 REM "Calculate Factorial and Stirlings function" +20 REM "" +100 REM "Factorial" +110 L=20 +120 DIM F(L) +130 F(1)=1 +140 FOR I=2 TO L +150 F(I)=F(I-1)*I +160 NEXT +200 REM "Stirling" +210 P1=4*ATAN(1) +220 DEF FNS(N)=SQR(2*P1*N)*EXP(N*(LOG(N)-1)) +300 REM "Print table" +305 PRINT "N";: TAB(4) +310 PRINT "FACT(N)";: TAB(6) +315 PRINT "STIR(N)";: TAB(6) +320 PRINT "Accuracy (%)" +330 FOR I=1 TO L +340 PRINT #4, I, #12, F(I), FNS(I), (F(I)-FNS(I))/F(I)*100 +350 NEXT +400 END diff --git a/data/examples/99tests/23stir.bas.res b/data/examples/99tests/23stir.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..b747ddc081f714a5a93556abf4a88e23e3221cdb --- /dev/null +++ b/data/examples/99tests/23stir.bas.res @@ -0,0 +1,21 @@ +N FACT(N) STIR(N) Accuracy (%) +1 1 0.922137 7.7863 +2 2 1.919 4.04978 +3 6 5.83621 2.72984 +4 24 23.5062 2.0576 +5 120 118.019 1.65068 +6 720 710.078 1.37802 +7 5040 4980.39 1.18265 +8 40320 39902.4 1.03572 +9 362880 359537 0.921241 +10 3628800 3.5987e+06 0.829565 +11 3.99168e+07 3.96156e+07 0.754479 +12 4.79002e+08 4.75688e+08 0.691846 +13 6.22702e+09 6.18724e+09 0.638884 +14 8.71783e+10 8.66611e+10 0.593222 +15 1.30767e+12 1.30043e+12 0.553797 +16 2.09228e+13 2.08141e+13 0.519387 +17 3.55687e+14 3.53948e+14 0.48891 +18 6.40237e+15 6.3728e+15 0.461873 +19 1.21645e+17 1.21113e+17 0.437677 +20 2.4329e+18 2.42279e+18 0.415689 diff --git a/data/examples/99tests/24mandel.bas b/data/examples/99tests/24mandel.bas new file mode 100644 index 0000000000000000000000000000000000000000..f2e3ba80df0c68cd31daeabf75de807a7a35492a --- /dev/null +++ b/data/examples/99tests/24mandel.bas @@ -0,0 +1,31 @@ +10 REM "Caculate the mandelbrot set" +20 REM "The iteration cutoff, threshold, and resolution" +30 N=10 +40 T=4 +50 R=20 +100 C0=0: C1=0 +200 REM "walk through the grid" +210 FOR J=2*R+1 TO 1 STEP -1 +220 FOR I=1 TO 3*R+1 +230 C0=-2+(I-1)/R: C1=-1+(J-1)/R +240 GOSUB 4000 +250 GOSUB 5000 +280 NEXT +290 PRINT +300 NEXT +999 END +4000 REM "do an iteration on c" +4010 Z0=C0: Z1=C1 +4020 FOR K=1 TO N +4030 S0=Z0*Z0: S1=Z1*Z1 +4040 IF S0+S1>T THEN BREAK +4050 X0=S0-S1+C0 +4060 X1=2*Z0*Z1+C1 +4070 Z0=X0: Z1=X1 +4080 NEXT +4090 RETURN +5000 REM "plot a point" +5010 IF K>N THEN PRINT "X"; : RETURN +5020 IF K>N/2 THEN PRINT "."; : RETURN +5030 PRINT " "; +5040 RETURN diff --git a/data/examples/99tests/24mandel.bas.res b/data/examples/99tests/24mandel.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..2c9c2d464eb8c1954b0478f5311b08c88f1b547a --- /dev/null +++ b/data/examples/99tests/24mandel.bas.res @@ -0,0 +1,41 @@ + ..X.XX + ...X... + ...XXX.. + .XXXXXXX. + ....XXXXXX.. + ......XXXXXX.... + ........XXXXXX......X + ..XXX.XXXXXXXXXXXX...X. + ...XXXXXXXXXXXXXXXXXXXXX + .....XXXXXXXXXXXXXXXXXXX. + ....XXXXXXXXXXXXXXXXXXXXX.. + ... .....XXXXXXXXXXXXXXXXXXXXXX.. + .X..........XXXXXXXXXXXXXXXXXXXXXX.X + ..X...X......XXXXXXXXXXXXXXXXXXXXXXXX + ...XXXXXXX..XXXXXXXXXXXXXXXXXXXXXXXX.. + ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ..X..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. + .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... + .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... + ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. + ..X..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ...XXXXXXX..XXXXXXXXXXXXXXXXXXXXXXXX.. + ..X...X......XXXXXXXXXXXXXXXXXXXXXXXX + .X..........XXXXXXXXXXXXXXXXXXXXXX.X + ... .....XXXXXXXXXXXXXXXXXXXXXX.. + ....XXXXXXXXXXXXXXXXXXXXX.. + .....XXXXXXXXXXXXXXXXXXX. + ...XXXXXXXXXXXXXXXXXXXXX + ..XXX.XXXXXXXXXXXX...X. + ........XXXXXX......X + ......XXXXXX.... + ....XXXXXX.. + .XXXXXXX. + ...XXX.. + ...X... + ..X.XX diff --git a/data/examples/99tests/25malloc.bas b/data/examples/99tests/25malloc.bas new file mode 100644 index 0000000000000000000000000000000000000000..f8aa833d70fdfa0cd9b7fdb63403114101c8387a --- /dev/null +++ b/data/examples/99tests/25malloc.bas @@ -0,0 +1,27 @@ +10 REM "Elementary malloc demo" +20 REM "" +100 PRINT "Allocate 16 bytes of memory with identifier 1" +110 M=MALLOC(1, 16) +120 PRINT "Address of memory segment", M +200 PRINT "Storing data" +210 FOR I=0 TO 15 +220 POKE M+I, I*2 +230 NEXT I +300 PRINT "Retrieving data" +310 FOR I=0 TO 15 +320 PRINT I, PEEK(M+I) +330 NEXT I +400 F=FIND(1) +410 PRINT "Memory address of buffer 1 is", F +500 A0=10 +510 F=FIND(A0) +520 PRINT "Memory address of variable A0 is", F +600 DIM A(8) +610 F=FIND(A()) +620 PRINT "Memory address of array A() is", F +700 A$="Hello World" +710 F=FIND(A$) +720 PRINT "Memory address of string A$ is", F +800 PRINT "HIMEM is now ", HIMEM +810 CLR 1 +820 PRINT "HIMEM after CLR", HIMEM diff --git a/data/examples/99tests/25malloc.bas.res b/data/examples/99tests/25malloc.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..16de156c8976fdc3e04dcf181e5e9f0f3934821d --- /dev/null +++ b/data/examples/99tests/25malloc.bas.res @@ -0,0 +1,26 @@ +Allocate 16 bytes of memory with identifier 1 +Address of memory segment 65514 +Storing data +Retrieving data +0 0 +1 2 +2 4 +3 6 +4 8 +5 10 +6 12 +7 14 +8 16 +9 18 +10 20 +11 22 +12 24 +13 26 +14 28 +15 30 +Memory address of buffer 1 is 65514 +Memory address of variable A0 is 65507 +Memory address of array A() is 65468 +Memory address of string A$ is 65427 +HIMEM is now 65426 +HIMEM after CLR 65534 diff --git a/data/examples/99tests/26eval.bas b/data/examples/99tests/26eval.bas new file mode 100644 index 0000000000000000000000000000000000000000..6563f71a99f713cc9637719c47b244b610c77d0f --- /dev/null +++ b/data/examples/99tests/26eval.bas @@ -0,0 +1,13 @@ +10 REM "Demo for the EVAL command" +20 REM "" +30 DIM A$(80) +100 A$="Y=X*X+7" +110 EVAL 1010,A$ +200 PRINT "X Y" +210 FOR X=-4 TO 4.001 STEP 0.5 +220 GOSUB 1000: PRINT #4, X, Y +230 NEXT +300 END +1000 REM "The function at the end" +1010 Y=X +1020 RETURN diff --git a/data/examples/99tests/26eval.bas.res b/data/examples/99tests/26eval.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..34712de7d78287635a27ac6eccbe87079d3d1c8f --- /dev/null +++ b/data/examples/99tests/26eval.bas.res @@ -0,0 +1,18 @@ +X Y +-4 23 +-3.5 19.25 +-3 16 +-2.5 13.25 +-2 11 +-1.5 9.25 +-1 8 +-0.5 7.25 +0 7 +0.5 7.25 +1 8 +1.5 9.25 +2 11 +2.5 13.25 +3 16 +3.5 19.25 +4 23 diff --git a/data/examples/99tests/27splitstr.bas b/data/examples/99tests/27splitstr.bas new file mode 100644 index 0000000000000000000000000000000000000000..80d919c794f0e47ad797f28a04313eb2062f885c --- /dev/null +++ b/data/examples/99tests/27splitstr.bas @@ -0,0 +1,11 @@ +10 REM "Split a string into substrings" +20 REM "" +100 DIM A$(80) +110 A$="the quick brown fox jumps over the lazy dog" +200 FOR I +210 A=INSTR(A$, " ") +220 IF A=0 THEN PRINT A$: BREAK +230 PRINT A$(1,A-1) +240 A$=A$(A+1) +250 NEXT +300 END diff --git a/data/examples/99tests/27splitstr.bas.res b/data/examples/99tests/27splitstr.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..ddd4af957de9c3c9a68f51b4e87324301a1c8898 --- /dev/null +++ b/data/examples/99tests/27splitstr.bas.res @@ -0,0 +1,9 @@ +the +quick +brown +fox +jumps +over +the +lazy +dog diff --git a/data/examples/99tests/28convert.bas b/data/examples/99tests/28convert.bas new file mode 100644 index 0000000000000000000000000000000000000000..463274250f437d3511adb33c6f19a82009983496 --- /dev/null +++ b/data/examples/99tests/28convert.bas @@ -0,0 +1,11 @@ +10 REM "Convert strings to numbers and vice versa" +20 REM "" +100 A$="123" +110 REM "Clear the error flag" +120 @S=0 +130 A=VAL(A$) +140 IF @S=0 THEN PRINT "Conversion successful, number is ", A ELSE PRINT "Number error" +200 A=123 +210 A$=STR(A) +220 PRINT "The number is '";A$;"' " +300 END diff --git a/data/examples/99tests/28convert.bas.res b/data/examples/99tests/28convert.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..8a5cee4e0e42ef1df20f4e19265aeb6e0600b915 --- /dev/null +++ b/data/examples/99tests/28convert.bas.res @@ -0,0 +1,2 @@ +Conversion successful, number is 123 +The number is '123' diff --git a/data/examples/99tests/29timestop.bas b/data/examples/99tests/29timestop.bas new file mode 100644 index 0000000000000000000000000000000000000000..da6f15b97287e90f8051b7e06611890bcd4c075f --- /dev/null +++ b/data/examples/99tests/29timestop.bas @@ -0,0 +1,10 @@ +10 REM "Stopping after some time" +100 AFTER 10 GOTO 1000 +110 T=MILLIS(1) +120 FOR I +130 IF MILLIS(1)-T>100 BREAK +140 NEXT +150 PRINT "Timer failed" +160 END +1000 PRINT "Program stopped with timer" +1010 STOP diff --git a/data/examples/99tests/29timestop.bas.res b/data/examples/99tests/29timestop.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..2a4450c8a131617b4306eb111306280cd327c0c4 --- /dev/null +++ b/data/examples/99tests/29timestop.bas.res @@ -0,0 +1 @@ +Program stopped with timer diff --git a/data/examples/99tests/30every.bas b/data/examples/99tests/30every.bas new file mode 100644 index 0000000000000000000000000000000000000000..47f7022a6fabc9ae5b70864fd5f499c3ec43697e --- /dev/null +++ b/data/examples/99tests/30every.bas @@ -0,0 +1,7 @@ +10 REM "Doing things from time to time" +100 EVERY 10 GOSUB 1000 +110 IF I>4 END +120 GOTO 110 +1000 I=I+1 +1010 PRINT "Iteration", I +1020 RETURN diff --git a/data/examples/99tests/30every.bas.res b/data/examples/99tests/30every.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..eb07dd9f8e7d303c3a1c91b71839f62c7c4383a5 --- /dev/null +++ b/data/examples/99tests/30every.bas.res @@ -0,0 +1,5 @@ +Iteration 1 +Iteration 2 +Iteration 3 +Iteration 4 +Iteration 5 diff --git a/data/examples/99tests/31error.bas b/data/examples/99tests/31error.bas new file mode 100644 index 0000000000000000000000000000000000000000..653e05855a9d2534de1f95a54c42a96fc5f28e4e --- /dev/null +++ b/data/examples/99tests/31error.bas @@ -0,0 +1,7 @@ +10 ERROR GOTO 1000 +20 PRINT "main code" +30 A=1/0 +100 END +1000 PRINT "error code" +1005 PRINT ERROR +1010 END diff --git a/data/examples/99tests/31error.bas.res b/data/examples/99tests/31error.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..f1b8596ec01dbdec13aeb0063528c41315e28aad --- /dev/null +++ b/data/examples/99tests/31error.bas.res @@ -0,0 +1,3 @@ +main code +error code +12 diff --git a/data/examples/99tests/32euler9.bas b/data/examples/99tests/32euler9.bas new file mode 100644 index 0000000000000000000000000000000000000000..9f40374fef509f62d0d7bc851d98c3048c526930 --- /dev/null +++ b/data/examples/99tests/32euler9.bas @@ -0,0 +1,41 @@ +10 REM "Solves the Euler 9 problem " +20 REM "See https://projecteuler.net/problem=9 for details" +30 REM "with a number theoretical approach" +100 PRINT "Enter the circumference K of a triangle" +110 PRINT "The program finds a pythagorean triangle" +120 PRINT "a^2 + b^2 = c^2" +130 K=1008 +140 IF K=0 THEN END +150 IF K%2=0 THEN U=K/2: GOTO 200 +160 PRINT "K is odd, no solution": GOTO 130 +200 REM "Main Program" +210 F=0 +220 X=SQR(U/2) +230 FOR I=1 TO X +240 IF U%I<>0 THEN CONT +250 FOR J=1 TO I +260 D=I+J +270 IF U%D<>0 THEN CONT +280 IF D%2=0 THEN CONT +290 R=I: Q=J +300 GOSUB 800 +310 IF R<>1 THEN CONT +320 A=I*I-J*J +330 B=2*I*J +340 C=I*I+J*J +350 PRINT "Primitive triple",A ,B, C +360 PRINT "Circumference=",A+B+C +370 S=K/(A+B+C) +380 PRINT "Scale with",S +390 PRINT "Solution ",A*S, B*S, C*S +400 F=1 +420 NEXT +430 NEXT +440 REM "All solutions found" +450 IF F=0 THEN PRINT "No solution" +460 END +800 REM "Find GCD" +810 IF R=Q THEN RETURN +820 IF R>Q THEN R=R-Q +830 IF Q>R THEN Q=Q-R +840 GOTO 810 diff --git a/data/examples/99tests/32euler9.bas.res b/data/examples/99tests/32euler9.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..109ea7ae8dbadacb93e97c01b8c9fba034d859a0 --- /dev/null +++ b/data/examples/99tests/32euler9.bas.res @@ -0,0 +1,23 @@ +Enter the circumference K of a triangle +The program finds a pythagorean triangle +a^2 + b^2 = c^2 +Primitive triple 3 4 5 +Circumference= 12 +Scale with 84 +Solution 252 336 420 +Primitive triple 7 24 25 +Circumference= 56 +Scale with 18 +Solution 126 432 450 +Primitive triple 35 12 37 +Circumference= 84 +Scale with 12 +Solution 420 144 444 +Primitive triple 45 28 53 +Circumference= 126 +Scale with 8 +Solution 360 224 424 +Primitive triple 63 16 65 +Circumference= 144 +Scale with 7 +Solution 441 112 455 diff --git a/data/examples/99tests/33primes.bas b/data/examples/99tests/33primes.bas new file mode 100644 index 0000000000000000000000000000000000000000..dcc3b6279108c689a5b4bbc40263aa2e211d3679 --- /dev/null +++ b/data/examples/99tests/33primes.bas @@ -0,0 +1,23 @@ +100 REM "Calculate the first N prime numbers" +110 REM "and output them!" +200 CLR +210 N=100 +220 IF N=0 THEN 500 +230 DIM P(N): P(1)=2: P(2)=3: I=2 +240 IF I=N THEN 360 +250 K=P(I) +260 K=K+2 +270 L=SQR(K) +280 J=1 +290 D=P(J) +310 M=K%D +320 IF M=0 THEN 260 +330 IF D@ THEN PRINT "Maximum is ", @ : GOTO 200 +230 @(1)=2: @(2)=3 +240 FOR I=3 TO N +250 K=@(I-1)+2 +260 L=SQR(K) +270 FOR J=1 +280 IF K%@(J)=0 THEN K=K+2 : GOTO 260 +290 IF @(J)>L THEN BREAK +300 NEXT J +310 @(I)=K +320 NEXT I +360 PRINT "The first", N, "primes are:" +370 FOR J=1 TO N +380 PRINT J, @(J) +390 NEXT +500 END diff --git a/data/examples/99tests/34primesl.bas.res b/data/examples/99tests/34primesl.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..9a3796bef93a90f25bcb1b13557801f650a075e0 --- /dev/null +++ b/data/examples/99tests/34primesl.bas.res @@ -0,0 +1,101 @@ +The first 100 primes are: +1 2 +2 3 +3 5 +4 7 +5 11 +6 13 +7 17 +8 19 +9 23 +10 29 +11 31 +12 37 +13 41 +14 43 +15 47 +16 53 +17 59 +18 61 +19 67 +20 71 +21 73 +22 79 +23 83 +24 89 +25 97 +26 101 +27 103 +28 107 +29 109 +30 113 +31 127 +32 131 +33 137 +34 139 +35 149 +36 151 +37 157 +38 163 +39 167 +40 173 +41 179 +42 181 +43 191 +44 193 +45 197 +46 199 +47 211 +48 223 +49 227 +50 229 +51 233 +52 239 +53 241 +54 251 +55 257 +56 263 +57 269 +58 271 +59 277 +60 281 +61 283 +62 293 +63 307 +64 311 +65 313 +66 317 +67 331 +68 337 +69 347 +70 349 +71 353 +72 359 +73 367 +74 373 +75 379 +76 383 +77 389 +78 397 +79 401 +80 409 +81 419 +82 421 +83 431 +84 433 +85 439 +86 443 +87 449 +88 457 +89 461 +90 463 +91 467 +92 479 +93 487 +94 491 +95 499 +96 503 +97 509 +98 521 +99 523 +100 541 diff --git a/data/examples/99tests/35math.bas b/data/examples/99tests/35math.bas new file mode 100644 index 0000000000000000000000000000000000000000..dd640b497b7aa5a7f6caa399673f33811364f789 --- /dev/null +++ b/data/examples/99tests/35math.bas @@ -0,0 +1,13 @@ +10 REM "Extended math functions" +20 REM "" +100 READ A +110 PRINT "The square root of", A, "is", SQR(A) +200 READ B +210 READ E +220 PRINT B, "to the power of", E, "is", POW(B, E) +300 READ V +310 IF V<0 OR V>1000 THEN PRINT "Range Error" : GOTO 300 +320 M=MAP(V, 1000, 0, 200, 100) +330 PRINT V, "mapped to the range of 200 and 100 is", M +400 END +500 DATA 2, 3, 5, 567 diff --git a/data/examples/99tests/35math.bas.res b/data/examples/99tests/35math.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..b7b826e2d4efa2523f06690424b374d3947d3ef7 --- /dev/null +++ b/data/examples/99tests/35math.bas.res @@ -0,0 +1,3 @@ +The square root of 2 is 1.41421 +3 to the power of 5 is 243 +567 mapped to the range of 200 and 100 is 157 diff --git a/data/examples/99tests/36tictac.bas b/data/examples/99tests/36tictac.bas new file mode 100644 index 0000000000000000000000000000000000000000..c77a6423a878b5e52c0e7c73bef0aa518fc34cb9 --- /dev/null +++ b/data/examples/99tests/36tictac.bas @@ -0,0 +1,66 @@ +10 REM "TIC TAC TOE from 101 BASIC games" +20 REM "by David Ahl." +30 REM "Ported to Stefan's BASIC in 2021" +40 REM "The machine goes first" +100 PRINT "Welcome to tictactoe" +110 PRINT "The game board is numbered:" +120 PRINT +130 PRINT "1 2 3" +140 PRINT "8 9 4" +150 PRINT "7 6 5" +160 PRINT +200 REM "Main Program" +210 PRINT "Staring a new game" +230 A=9 +240 M=A +250 GOSUB 800 +260 P=M +270 B=P%8+1 +280 M=B +290 GOSUB 800 +300 Q=M +310 IF Q=(B+3)%8+1 GOTO 360 +320 C=(B+3)%8+1 +330 M=C +340 GOSUB 900 +350 GOTO 640 +360 C=(B+1)%8+1 +370 M=C +380 GOSUB 800 +390 R=M +400 IF R=(C+3)%8+1 GOTO 450 +410 D=(C+3)%8+1 +420 M=D +430 GOSUB 900 +440 GOTO 640 +450 IF P%2<>0 GOTO 500 +460 D=(C+6)%8+1 +470 M=D +480 GOSUB 900 +490 GOTO 640 +500 D=(C+2)%8+1 +510 M=D +520 GOSUB 800 +530 S=M +540 IF S=(D+3)%8+1 GOTO 590 +550 E=(D+3)%8+1 +560 M=E +570 GOSUB 900 +580 REM "Game is a draw" +590 E=(D+5)%8+1 +600 M=E +610 GOSUB 900 +620 PRINT "The game is a draw." +625 END +630 GOTO 200 +640 PRINT "and wins! ********" +645 END +650 GOTO 200 +800 REM "Subroutine to ask user for the move" +810 GOSUB 900 +820 READ M +830 RETURN +900 REM "Subroutine to display move" +910 PRINT "Computer moves:",M +920 RETURN +1000 DATA 1, 6, 8, 3 diff --git a/data/examples/99tests/36tictac.bas.res b/data/examples/99tests/36tictac.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..3479907fc6f62ee4bb348dab35f6922560daedf6 --- /dev/null +++ b/data/examples/99tests/36tictac.bas.res @@ -0,0 +1,14 @@ +Welcome to tictactoe +The game board is numbered: + +1 2 3 +8 9 4 +7 6 5 + +Staring a new game +Computer moves: 9 +Computer moves: 2 +Computer moves: 4 +Computer moves: 7 +Computer moves: 5 +The game is a draw. diff --git a/data/examples/99tests/37love.bas b/data/examples/99tests/37love.bas new file mode 100644 index 0000000000000000000000000000000000000000..2acd0c586435ecabf1a8f2354f09b95eb2ffe60d --- /dev/null +++ b/data/examples/99tests/37love.bas @@ -0,0 +1,36 @@ +10 REM "LOVE from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 DIM T(120) +100 PRINT "A TRIBUTE TO THE GREAT AMERICAN ARTIST, ROBERT INDIANA." +110 PRINT "HIS GREATEST WORK WILL BE REPRODUCED WITH A MESSAGE OF" +120 PRINT "YOUR CHOICE UP TO 32 CHARACTERS. IF YOU CAN'T THINK OF" +130 PRINT "A MESSAGE, SIMPLE TYPE THE WORD 'LOVE'": PRINT +200 A$="LOVE": L=LEN(A$) +210 FOR J=0 TO INT(60/L) +220 FOR I=1 TO L +230 T(J*L+I)=A$(I,I+1) +240 NEXT I +250 NEXT J +260 C=0 +300 A1=1: P=1: C=C+1: IF C=37 THEN 900 +310 PRINT +320 READ A: A1=A1+A: IF P=1 THEN 400 +330 FOR I=1 TO A: PUT " ": NEXT I: P=1: GOTO 500 +400 FOR I=A1-A TO A1-1: PUT T(I): NEXT I: P=0 +500 IF A1>60 THEN 300 +510 GOTO 320 +600 DATA 60,1,12,26,9,12,3,8,24,17,8,4,6,23,21,6,4,6,22,12,5,6,5 +610 DATA 4,6,21,11,8,6,4,4,6,21,10,10,5,4,4,6,21,9,11,5,4 +620 DATA 4,6,21,8,11,6,4,4,6,21,7,11,7,4,4,6,21,6,11,8,4 +630 DATA 4,6,19,1,1,5,11,9,4,4,6,19,1,1,5,10,10,4,4,6,18,2,1,6,8,11,4 +640 DATA 4,6,17,3,1,7,5,13,4,4,6,15,5,2,23,5,1,29,5,17,8 +650 DATA 1,29,9,9,12,1,13,5,40,1,1,13,5,40,1,4,6,13,3,10,6,12,5,1 +660 DATA 5,6,11,3,11,6,14,3,1,5,6,11,3,11,6,15,2,1 +670 DATA 6,6,9,3,12,6,16,1,1,6,6,9,3,12,6,7,1,10 +680 DATA 7,6,7,3,13,6,6,2,10,7,6,7,3,13,14,10,8,6,5,3,14,6,6,2,10 +690 DATA 8,6,5,3,14,6,7,1,10,9,6,3,3,15,6,16,1,1 +700 DATA 9,6,3,3,15,6,15,2,1,10,6,1,3,16,6,14,3,1,10,10,16,6,12,5,1 +710 DATA 11,8,13,27,1,11,8,13,27,1,60 +900 PRINT +910 END diff --git a/data/examples/99tests/37love.bas.res b/data/examples/99tests/37love.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..4a4e4cd5dc1fb51549eb5f30b1cdcdd0996a02ab --- /dev/null +++ b/data/examples/99tests/37love.bas.res @@ -0,0 +1,42 @@ +A TRIBUTE TO THE GREAT AMERICAN ARTIST, ROBERT INDIANA. +HIS GREATEST WORK WILL BE REPRODUCED WITH A MESSAGE OF +YOUR CHOICE UP TO 32 CHARACTERS. IF YOU CAN'T THINK OF +A MESSAGE, SIMPLE TYPE THE WORD 'LOVE' + + +LOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVE +L OVELOVELOVELOVELOVELOVELOV LOVELOVELOVE +LOV ELOVELOVELOVELOVELOVELOV LOVELOVE +LOVE VELOVELOVELOVELOVELOVEL VELOVE +LOVE VELOVELOVELOVELOVELOVE LOVEL ELOVE +LOVE VELOVELOVELOVELOVELOV VELOVELO LOVE +LOVE VELOVELOVELOVELOVELOV OVELOVELOV LOVE +LOVE VELOVELOVELOVELOVELOV LOVELOVELOV LOVE +LOVE VELOVELOVELOVELOVELOV ELOVELOVELO LOVE +LOVE VELOVELOVELOVELOVELOV VELOVELOVEL LOVE +LOVE VELOVELOVELOVELOVELOV OVELOVELOVE LOVE +LOVE VELOVELOVELOVELOVEL V LOVELOVELOV LOVE +LOVE VELOVELOVELOVELOVEL V LOVELOVELO LOVE +LOVE VELOVELOVELOVELOVE V OVELOVEL LOVE +LOVE VELOVELOVELOVELOV V VELOV LOVE +LOVE VELOVELOVELOVEL VE ELOVE +L VELOV LOVELOVE +L VELOVELOV LOVELOVELOVE +L VELOV E +L VELOV E +LOVE VELOVELOVELOV VELOVELOVE VELOVELOVELO E +LOVEL ELOVELOVELO OVELOVELOVE VELOVELOVELOVE E +LOVEL ELOVELOVELO OVELOVELOVE VELOVELOVELOVEL E +LOVELO LOVELOVEL LOVELOVELOVE VELOVELOVELOVELO E +LOVELO LOVELOVEL LOVELOVELOVE VELOVEL VELOVELOVE +LOVELOV OVELOVE ELOVELOVELOVE VELOVE VELOVELOVE +LOVELOV OVELOVE ELOVELOVELOVE VELOVELOVE +LOVELOVE VELOV VELOVELOVELOVE VELOVE VELOVELOVE +LOVELOVE VELOV VELOVELOVELOVE VELOVEL VELOVELOVE +LOVELOVEL ELO OVELOVELOVELOVE VELOVELOVELOVELO E +LOVELOVEL ELO OVELOVELOVELOVE VELOVELOVELOVEL E +LOVELOVELO L LOVELOVELOVELOVE VELOVELOVELOVE E +LOVELOVELO LOVELOVELOVELOVE VELOVELOVELO E +LOVELOVELOV ELOVELOVELOVE E +LOVELOVELOV ELOVELOVELOVE E +LOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVE diff --git a/data/examples/99tests/38poetry.bas b/data/examples/99tests/38poetry.bas new file mode 100644 index 0000000000000000000000000000000000000000..d6dbf1208c618bcddd027f256771b5ef6a688ddb --- /dev/null +++ b/data/examples/99tests/38poetry.bas @@ -0,0 +1,43 @@ +10 REM "POETRY from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 @R=1 +90 ON I GOTO 100,101,102,103,104 +100 PRINT "MIDNIGHT DREARY";:GOTO 210 +101 PRINT "FIERY EYES";:GOTO 210 +102 PRINT "BIRD OR FIEND";:GOTO 210 +103 PRINT "THING OF EVIL";:GOTO 210 +104 PRINT "PROPHET";:GOTO 210 +110 ON I GOTO 111,112,113,114,115 +111 PRINT "BEGUILING ME";:U=2:GOTO 210 +112 PRINT "THRILLED ME";:GOTO 210 +113 PRINT "STILL SITTING....";:GOTO 212 +114 PRINT "NEVER FLITTING";:U=2:GOTO 210 +115 PRINT "BURNED";:GOTO 210 +120 ON I GOTO 121,122,123,124,125 +121 PRINT "AND MY SOUL";:GOTO 210 +122 PRINT "DARKNESS THERE";:GOTO 210 +123 PRINT "SHALL BE LIFTED";:GOTO 210 +124 PRINT "QUOTH THE RAVEN";:GOTO 210 +125 IF U=0 THEN 210 +126 PRINT "SIGN OF PARTING";:GOTO 210 +130 ON I GOTO 131,132,133,134,135 +131 PRINT "NOTHING MORE";:GOTO 210 +132 PRINT "YET AGAIN";:GOTO 210 +133 PRINT "SLOWLY CREEPING";:GOTO 210 +134 PRINT "...EVERMORE";:GOTO 210 +135 PRINT "NEVERMORE"; +210 IF U=0 OR RND(100)>19 THEN 212 +211 PRINT ",";:U=2 +212 IF RND(100)>65 THEN 214 +213 PRINT " ";:U=U+1:GOTO 215 +214 PRINT : U=0 +215 I=INT(INT(10*RND(1))/2)+1 +220 J=J+1 : K=K+1 +230 IF U>0 OR INT(J/2)<>J/2 THEN 240 +235 PRINT " "; +240 ON J GOTO 90,110,120,130,250 +250 J=0 : PRINT : IF K>20 THEN 270 +260 GOTO 215 +270 PRINT : U=0 : K=0 +999 END diff --git a/data/examples/99tests/38poetry.bas.res b/data/examples/99tests/38poetry.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..b61f083bf62bf18d4ee87372771fe72518fdb326 --- /dev/null +++ b/data/examples/99tests/38poetry.bas.res @@ -0,0 +1,14 @@ +MIDNIGHT DREARY FIERY EYES BEGUILING ME AND MY SOUL NEVERMORE +THING OF EVIL, + STILL SITTING.... DARKNESS THERE, + NOTHING MORE +THING OF EVIL BURNED, DARKNESS THERE NEVERMORE, + +PROPHET BURNED +DARKNESS THERE + NEVERMORE +BIRD OR FIEND + STILL SITTING.... +DARKNESS THERE ...EVERMORE + + diff --git a/data/examples/99tests/39eliza.bas b/data/examples/99tests/39eliza.bas new file mode 100644 index 0000000000000000000000000000000000000000..c59bc0d1ffc8c4407a4d8b79029423ae45021b3a --- /dev/null +++ b/data/examples/99tests/39eliza.bas @@ -0,0 +1,320 @@ +10 REM "A ELIZA version from the 70s" +20 REM "Ported 2022 - Stefan Lenz" +30 DIM C1$(80) +40 GOSUB 1070 +50 DIM C$(72), I$(72), K$(72), F$(72), S$(72), R$(72), P$(72), Z$(72) +60 DIM S(37), R(37), N(37) +65 DIM T$(80) +70 N1 = 37 +80 N2 = 14 +90 N3 = 117 +100 FOR X = 1 TO N1 + N2 + N3 +110 READ Z$ +120 NEXT X +130 FOR X = 1 TO N1 +140 READ S(X) +145 READ L +150 R(X) = S(X) +160 N(X) = S(X) + L - 1 +170 NEXT X +180 PRINT "HI! I'M ELIZA. WHAT'S YOUR PROBLEM?" +185 ZZ=0 +190 REM +200 REM "----USER INPUT SECTION----" +210 REM +215 RESTORE 243+ZZ: ZZ=ZZ+1 +220 READ I$: PRINT I$ +221 REM "Uppercase the input" +222 FOR L=1 TO LEN(I$) +223 IF I$(L)>=97 AND I$(L)<=122 THEN T$(L)=(I$(L))-32 ELSE T$(L)=I$(L) +224 NEXT +225 I$=T$ +230 REM I$ = " " + I$ + " " +235 T$=" " : T$(2)=I$: T$(LEN(T$)+1)=" " +236 I$=T$ +240 REM GET RID OF APOSTROPHES +250 FOR L = 1 TO LEN(I$) +260 REM IF MID$(I$, L, 1) <> "'" THEN 290 +261 IF I$(L, L+1)<>"'" THEN 290 +270 REM I$ = MID$(I$, 1, L - 1) + MID$(I$, L + 1, LEN(I$) - L) +271 T$=I$(1, L-1): T$(L)=I$(L+1) +280 GOTO 260 +290 IF L+4>=LEN(I$) THEN 330 +300 REM IF UCASE$(MID$(I$, L, 4)) <> "SHUT" THEN 330 +301 IF I$(L, L+3)<>"SHUT" THEN 330 +310 PRINT "IF THAT'S HOW YOU FEEL--GOODBY..." +320 END +330 NEXT L +340 IF I$<>P$ THEN 370 +350 PRINT "PLEASE DON'T REPEAT YOURSELF!" +360 GOTO 190 +370 REM +380 REM "----FIND KEYWORD IN I$----" +390 REM +400 RESTORE +410 S = 0 +420 FOR K = 1 TO N1 +430 READ K$ +440 IF S>0 THEN 510 +450 FOR L=1 TO LEN(I$) - LEN(K$) + 1 +460 REM IF MID$(I$, L, LEN(K$)) <> K$ THEN 500 +461 IF I$(L, L+LEN(K$)-1)<>K$ THEN 500 +470 S=K +480 T=L +490 F$=K$ +500 NEXT L +510 NEXT K +520 IF S<=0 THEN 560 +530 K=S +540 L=T +550 GOTO 590 +560 K=37: REM "WE DIDN'T FIND ANY KEYWORDS" +570 GOTO 850 +580 REM +590 REM "TAKE RIGHT PART OF STRINGS AND CONJUGATE IT" +600 REM "USING THE LIST OF STRINGS TO BE SWAPPED" +610 REM +620 RESTORE +630 FOR X = 1 TO N1 +640 READ Z$ +650 NEXT X +660 IF (LEN(I$)-LEN(F$)-L+1)>0 THEN 690 +670 L=L-1 +680 GOTO 660 +690 REM C$ = " " + MID$(I$, LEN(F$) + L, LEN(I$) - (LEN(F$) + L - 1)) +691 T=LEN(I$)-(LEN(F$)+L-1) +692 U=LEN(F$)+L +693 C$=I$(U, U+T-1) +700 FOR X=1 TO N2/2 +710 READ S$ +711 READ R$ +720 FOR L = 1 TO LEN(C$) +730 IF L+LEN(S$)>LEN(C$) THEN 770 +740 REM IF MID$(C$, L, LEN(S$)) <> S$ THEN 770 +741 IF C$(L, L+LEN(S$)-1)<>S$ THEN 770 +750 REM C$=MID$(C$,1,L-1)+R$+MID$(C$,L+LEN(S$),LEN(C$)-(L+LEN(S$)-1)) +751 T$=C$(1, 1+(L-1)-1) +752 T$(LEN(T$)+1)=R$ +753 T=L+LEN(S$) +754 U=LEN(C$)-(L+LEN(S$)-1) +755 T$(LEN(T$)+1)=C$(T, T+U-1) +756 C$=T$ +760 GOTO 810 +770 IF L+LEN(R$)>LEN(C$) THEN 810 +780 REM IF MID$(C$, L, LEN(R$)) <> R$ THEN 810 +781 IF C$(L, L+LEN(R$)-1)<>R$ THEN 810 +790 REM C$=MID$(C$,1,L-1)+S$+MID$(C$,L+LEN(R$),LEN(C$)-(L+LEN(R$)-1)) +791 T$=C$(1, 1+(L-1)-1) +792 T$(LEN(T$)+1)=S$ +793 T=L+LEN(R$) +794 U=LEN(C$)-(L+LEN(R$)-1) +795 T$(LEN(T$)+1)=C$(T, T+U-1) +796 C$=T$ +800 L=L+LEN(S$) +810 NEXT L +820 NEXT X +830 REM IF MID$(C$, 2, 1)=" " THEN C$=MID$(C$,2,LEN(C$)-1) 'ONLY 1SPACE +831 IF C$(2,2)=" " THEN C$=C$(2, 2+LEN(C$)-1-1) +840 REM +850 REM "NOW USING THE KEYWORD NUMBER (K) GET REPLY" +860 REM +870 RESTORE +880 FOR X=1 TO N1+N2 +890 READ Z$ +900 NEXT X +910 FOR X=1 TO R(K): REM "READ RIGHT REPLY" +920 READ F$ +930 NEXT X +940 R(K)=R(K)+1 +950 IF R(K)>N(K) THEN R(K)=S(K) +960 REM IF MID$(F$, LEN(F$), 1) = "*" THEN 1000 +961 T=LEN(F$) +962 IF F$(T, T)="*" THEN 1000 +970 PRINT F$ +980 P$=I$ +990 GOTO 190 +1000 REM PRINT MID$(F$, 1, LEN(F$) - 1); C$ +1001 PRINT F$(1, 1+(LEN(F$)-1)-1); C$ +1010 P$=I$ +1020 GOTO 190 +1030 REM "PRINT CENTER ROUTINE" +1040 TAB(40-LEN(C1$)/2): PRINT C1$ +1060 RETURN +1070 C1$ = "*** ELIZA ***" +1080 GOSUB 1030 +1090 C1$ = "IN BASIC" +1100 GOSUB 1030 +1110 C1$ = "MODIFIED FROM CYBER 175 AT UNIVERSITY OF ILLINOIS AT CHAMPAGNE" +1120 GOSUB 1030 +1130 C1$ = "JOHN SCHUGG" +1140 GOSUB 1030 +1150 C1$ = "JANUARY 1985" +1160 GOSUB 1030 +1170 C1$ = "HAVE ANY PROBLEMS ?" +1180 GOSUB 1030 +1190 C1$ = "LET ELIZA HELP YOU !" +1200 GOSUB 1030 +1210 PRINT +1220 C1$ = "TO STOP ELIZA TYPE 'SHUT UP'" +1230 GOSUB 1030 +1240 C1$ = "(THIS VERSION WILL NOT RECORD YOUR CONVERSATIONS)" +1250 GOSUB 1030 +1260 C1$ = "(PLEASE SEND SUGGESTIONS FOR IMPROVEMENTS TO JOHN SCHUGG)" +1270 GOSUB 1030 +1280 PRINT "< PRESS RETURN TO CONTINUE...>" +1290 REM "INPUT C1$" +1320 RETURN +1330 REM +1340 REM "---PROGRAM DATA FOLLOWS---"" +1350 REM +1360 REM "KEYWORDS:" +1370 REM +1380 DATA "CAN YOU","CAN I","YOU ARE","YOURE","I DONT","I FEEL" +1390 DATA "WHY DONT YOU","WHY CANT I","ARE YOU","I CANT","I AM","IM " +1400 DATA "YOU ","I WANT","WHAT","HOW","WHO","WHERE","WHEN","WHY" +1410 DATA "NAME","CAUSE","SORRY","DREAM","HELLO","HI ","MAYBE" +1420 DATA " NO","YOUR","ALWAYS","THINK","ALIKE","YES","FRIEND" +1430 DATA "COMPUTER","CAR","NOKEYFOUND" +1440 REM +1450 REM "---STRING DATA FOR CONJUGATIONS---" +1460 REM +1470 DATA " ARE "," AM ","WERE ","WAS "," YOU "," I ","YOUR ","MY " +1480 DATA " IVE "," YOUVE "," IM "," YOURE "," YOU "," ME " +1490 REM +1500 REM "----REPLIES----" +1510 REM +1520 DATA "DON'T YOU BELIEVE THAT I CAN*" +1530 DATA "PERHAPS YOU WOULD LIKE TO BE ABLE TO*" +1540 DATA "YOU WANT ME TO BE ABLE TO*" +1550 DATA "PERHAPS YOU DON'T WANT TO*" +1560 DATA "DO YOU WANT TO BE ABLE TO*" +1570 DATA "WHAT MAKES YOU THINK I AM*" +1580 DATA "DOES IT PLEASE YOU TO BELIEVE I AM*" +1590 DATA "PERHAPS YOU WOULD LIKE TO BE*" +1600 DATA "DO YOU SOMETIMES WISH YOU WERE*" +1610 DATA "DON'T YOU REALLY*" +1620 DATA "WHY DON'T YOU*" +1630 DATA "DO YOU WISH TO BE ABLE TO*" +1640 DATA "DOES THAT TROUBLE YOU?" +1650 DATA "TELL ME MORE ABOUT SUCH FEELINGS." +1660 DATA "DO YOU OFTEN FEEL*" +1670 DATA "DO YOU ENJOY FEELING*" +1680 DATA "DO YOU REALLY BELIEVE I DON'T*" +1690 DATA "PERHAPS IN GOOD TIME I WILL*" +1700 DATA "DO YOU WANT ME TO*" +1710 DATA "DO YOU THINK YOU SHOULD BE ABLE TO*" +1720 DATA "WHY CAN'T YOU*" +1730 DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*" +1740 DATA "WOULD YOU PREFER IF I WERE NOT*" +1750 DATA "PERHAPS IN YOUR FANTASIES I AM*" +1760 DATA "HOW DO YOU KNOW YOU CAN'T*" +1770 DATA "HAVE YOU TRIED?" +1780 DATA "PERHAPS YOU CAN NOW*" +1790 DATA "DID YOU COME TO ME BECAUSE YOU ARE*" +1800 DATA "HOW LONG HAVE YOU BEEN*" +1810 DATA "DO YOU BELIEVE IT IS NORMAL TO BE*" +1820 DATA "DO YOU ENJOY BEING*" +1830 DATA "WE WERE DISCUSSING YOU-- NOT ME." +1840 DATA "OH, I*" +1850 DATA "YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?" +1860 DATA "WHAT WOULD IT MEAN TO YOU IF YOU GOT*" +1870 DATA "WHY DO YOU WANT*" +1880 DATA "SUPPOSE YOU SOON GOT*" +1890 DATA "WHAT IF YOU NEVER GOT*" +1900 DATA "I SOMETIMES ALSO WANT*" +1910 DATA "WHY DO YOU ASK?" +1920 DATA "DOES THAT QUESTION INTEREST YOU?" +1930 DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?" +1940 DATA "WHAT DO YOU THINK?" +1950 DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?" +1960 DATA "WHAT IS IT THAT YOU REALLY WANT TO KNOW?" +1970 DATA "HAVE YOU ASKED ANYONE ELSE?" +1980 DATA "HAVE YOU ASKED SUCH QUESTIONS BEFORE?" +1990 DATA "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?" +2000 DATA "NAMES DON'T INTEREST ME." +2010 DATA "I DON'T CARE ABOUT NAMES-- PLEASE GO ON." +2020 DATA "IS THAT THE REAL REASON?" +2030 DATA "DON'T ANY OTHER REASONS COME TO MIND?" +2040 DATA "DOES THAT REASON EXPLAIN ANY THING ELSE?" +2050 DATA "WHAT OTHER REASONS MIGHT THERE BE?" +2060 DATA "PLEASE DON'T APOLOGIZE." +2070 DATA "APOLOGIES ARE NOT NECESSARY." +2080 DATA "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?" +2090 DATA "DON'T BE SO DEFENSIVE!" +2100 DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?" +2110 DATA "DO YOU DREAM OFTEN?" +2120 DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?" +2130 DATA "ARE YOU DISTURBED BY YOUR DREAMS?" +2140 DATA "HOW DO YOU DO--PLEASE STATE YOUR PROBLEM." +2150 DATA "YOU DON'T SEEM QUITE CERTAIN." +2160 DATA "WHY THE UNCERTAIN TONE?" +2170 DATA "CAN'T YOU BE MORE POSITIVE?" +2180 DATA "YOU AREN'T SURE?" +2190 DATA "DON'T YOU KNOW?" +2200 DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?" +2210 DATA "YOU ARE BEING A BIT NEGATIVE." +2220 DATA "WHY NOT?" +2230 DATA "ARE YOU SURE?" +2240 DATA "WHY NO?" +2250 DATA "WHY ARE YOU CONCERNED ABOUT MY*" +2260 DATA "WHAT ABOUT YOUR OWN*" +2270 DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?" +2280 DATA "WHEN?" +2290 DATA "WHAT ARE YOU THINKING OF?" +2300 DATA "REALLY, ALWAYS?" +2310 DATA "DO YOU REALLY THINK SO?" +2320 DATA "BUT YOU ARE NOT SURE YOU*" +2330 DATA "DO YOU DOUBT YOU*" +2340 DATA "IN WHAT WAY?" +2350 DATA "WHAT RESEMBLANCE DO YOU SEE?" +2360 DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?" +2370 DATA "WHAT OTHER CONNECTIONS DO YOU SEE?" +2380 DATA "COULD THERE REALLY BE SOME CONNECTION?" +2390 DATA "HOW?" +2400 DATA "YOU SEEM QUITE POSITIVE." +2410 DATA "ARE YOU SURE?" +2420 DATA "I SEE." +2430 DATA "I UNDERSTAND." +2440 DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?" +2450 DATA "DO YOUR FRIENDS WORRY YOU?" +2460 DATA "DO YOUR FRIENDS PICK ON YOU?" +2470 DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?" +2480 DATA "DO YOU IMPOSE ON YOUR FRIENDS?" +2490 DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU?" +2500 DATA "DO COMPUTERS WORRY YOU?" +2510 DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?" +2520 DATA "ARE YOU FRIGHTENED BY MACHINES?" +2530 DATA "WHY DO YOU MENTION COMPUTERS?" +2540 DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?" +2550 DATA "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?" +2560 DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?" +2570 DATA "OH, DO YOU LIKE CARS?" +2580 DATA "MY FAVORITE CAR IS A LAMBORGHINI COUNTACH. WHAT IS YOUR'S?" +2590 DATA "MY FAVORITE CAR COMPANY IS FERRARI. WHAT IS YOURS?" +2600 DATA "DO YOU LIKE PORSCHES?" +2610 DATA "DO YOU LIKE PORSCHE TURBO CARRERAS?" +2620 DATA "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?" +2630 DATA "WHAT DOES THAT SUGGEST TO YOU?" +2640 DATA "I SEE." +2650 DATA "I'M NOT SURE I UNDERSTAND YOU FULLY." +2660 DATA "COME COME ELUCIDATE YOUR THOUGHTS." +2670 DATA "CAN YOU ELABORATE ON THAT?" +2680 DATA "THAT IS QUITE INTERESTING." +2690 REM +2700 REM "---DATA FOR FINDING RIGHT REPLIES---" +2710 REM +2720 DATA 1,3,4,2,6,4,6,4,10,4,14,3,17,3,20,2,22,3,25,3 +2730 DATA 28,4,28,4,32,3,35,5,40,9,40,9,40,9,40,9,40,9,40,9 +2740 DATA 49,2,51,4,55,4,59,4,63,1,63,1,64,5,69,5,74,2,76,4 +2750 DATA 80,3,83,7,90,3,93,6,99,7,106,5,111,6 +2760 REM +2770 REM +2780 REM "LAST MOD. JULY 1979" +2790 REM +2800 REM "'ELIZA'" +2810 END +3000 REM "Test dialog questions" +3010 DATA "I am bored!", "I love cars too much." +3020 DATA "Yes I like cars very much.", "Totally" +3030 DATA "This is so annoying", "You are testing me" +3040 DATA "Or is it me testing you?", "Shut up" diff --git a/data/examples/99tests/39eliza.bas.res b/data/examples/99tests/39eliza.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..55e29b4bd95d71e2cda5de2338367f72af399f15 --- /dev/null +++ b/data/examples/99tests/39eliza.bas.res @@ -0,0 +1,29 @@ + *** ELIZA *** + IN BASIC + MODIFIED FROM CYBER 175 AT UNIVERSITY OF ILLINOIS AT CHAMPAGNE + JOHN SCHUGG + JANUARY 1985 + HAVE ANY PROBLEMS ? + LET ELIZA HELP YOU ! + + TO STOP ELIZA TYPE 'SHUT UP' + (THIS VERSION WILL NOT RECORD YOUR CONVERSATIONS) + (PLEASE SEND SUGGESTIONS FOR IMPROVEMENTS TO JOHN SCHUGG) +< PRESS RETURN TO CONTINUE...> +HI! I'M ELIZA. WHAT'S YOUR PROBLEM? +I am bored! +DID YOU COME TO ME BECAUSE YOU ARE BORED! +I love cars too much. +OH, DO YOU LIKE CARS? +Yes I like cars very much. +ARE YOU SURE? +Totally +SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS? +This is so annoying +WHAT DOES THAT SUGGEST TO YOU? +You are testing me +WHAT MAKES YOU THINK I AM TESTING ME +Or is it me testing you? +I SEE. +Shut up +IF THAT'S HOW YOU FEEL--GOODBY... diff --git a/data/examples/99tests/40forfor.bas b/data/examples/99tests/40forfor.bas new file mode 100644 index 0000000000000000000000000000000000000000..42e44340b7337de078f7fba74a9a7a555eac9f93 --- /dev/null +++ b/data/examples/99tests/40forfor.bas @@ -0,0 +1,73 @@ +100 REM "Simple loops" +110 FOR I=1 TO 10 STEP -1: PRINT I: NEXT +120 FOR I=1 TO -1 STEP -1: PRINT I: NEXT +130 FOR I=-1 TO -10 STEP 1: PRINT I: NEXT +140 I=10 +150 FOR I TO 20: PRINT I: NEXT +160 FOR I TO 10 STEP -1: PRINT I: NEXT +200 REM "Nested loops" +210 FOR I=1 TO 2 +220 FOR J=1 TO 2 +230 FOR K=1 TO 2 +240 FOR L=1 TO 2 +250 A=A+I*J*K*L +260 NEXT +270 NEXT +280 NEXT +290 NEXT +300 PRINT A +400 REM "Changing a loop variable" +410 FOR I=1 TO 10 +420 PRINT I +430 I=I+1 +440 NEXT +450 FOR I=1 TO 10 +460 PRINT I +470 I=I-0.5 +480 NEXT +500 REM "Jumping out of a loop" +510 FOR I=1 TO 2 +520 FOR J=1 TO 2 +530 GOTO 560 +540 NEXT +550 NEXT +560 FOR I=1 TO 2 +580 NEXT +590 PRINT "This is 0:", USR(0, 30) +600 REM "Jumping to next, very odd" +610 FOR I=1 TO 2 +620 FOR J=1 TO 2 +630 PRINT I, J +640 GOTO 660 +650 NEXT +660 NEXT +670 PRINT "This is 1:", USR(0, 30) +680 FOR I=1 TO 1 +690 NEXT +700 PRINT "This is 0:", USR(0, 30) +800 REM "One line FOR loops with conditions, ELSE is a termsymbol()" +810 FOR I=1: PRINT I : IF I=10 THEN BREAK ELSE NEXT +900 REM "Error wrong next" +910 ERROR GOTO 960 +920 FOR I=1 TO 2 +930 NEXT +940 NEXT +950 PRINT "FAIL": END +960 PRINT "ERROR", ERROR +1000 REM "Error wrong FOR" +1010 ERROR GOTO 1050 +1020 FOR +1030 NEXT +1040 PRINT "FAIL": END +1050 PRINT "ERROR", ERROR +1100 REM "Error wrong variable" +1110 ERROR GOTO 1150 +1120 FOR A$: NEXT +1130 PRINT "FAIL": END +1150 PRINT "ERROR", ERROR +1200 REM "Error wrong variable" +1210 ERROR GOTO 1250 +1220 FOR A(1): NEXT +1230 PRINT "FAIL": END +1250 PRINT "ERROR", ERROR +1300 END diff --git a/data/examples/99tests/40forfor.bas.res b/data/examples/99tests/40forfor.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..a82983e135db42461f4397aa4e7d0da2f7aa0402 --- /dev/null +++ b/data/examples/99tests/40forfor.bas.res @@ -0,0 +1,70 @@ +1 +0 +-1 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +20 +19 +18 +17 +16 +15 +14 +13 +12 +11 +10 +81 +1 +3 +5 +7 +9 +1 +1.5 +2 +2.5 +3 +3.5 +4 +4.5 +5 +5.5 +6 +6.5 +7 +7.5 +8 +8.5 +9 +9.5 +10 +This is 0: 0 +1 1 +1 2 +This is 1: 1 +This is 0: 0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +ERROR 19 +ERROR 10 +ERROR 10 +ERROR 10 diff --git a/data/examples/99tests/41arrayfun.bas b/data/examples/99tests/41arrayfun.bas new file mode 100644 index 0000000000000000000000000000000000000000..1dcf2071874b84fa2bcce42cc3e8f0c894850bc2 --- /dev/null +++ b/data/examples/99tests/41arrayfun.bas @@ -0,0 +1,144 @@ +10 REM "Autodim" +20 FOR I=1 TO 10: A(I)=I: NEXT +30 FOR I=1 TO 10: PRINT A(I): NEXT +100 REM "Range Errors (1)" +110 ERROR GOTO 140 +120 A(0)=0 +130 PRINT "FAIL": END +140 PRINT "ERROR", ERROR +200 REM "Range Errors (2)" +210 ERROR GOTO 240 +220 A(11)=11 +230 PRINT "FAIL": END +240 PRINT "ERROR", ERROR +300 REM "Clearing the array" +310 CLR A() +320 PRINT FIND(A())>0 +400 REM "Autodim Range Error (1)" +410 ERROR GOTO 440 +420 A(0)=10 +430 PRINT "FAIL": END +440 PRINT "ERROR", ERROR +450 PRINT FIND(A())>0 +500 REM "Autodim Range Error (2)" +510 ERROR GOTO 540 +520 A(11)=10 +530 PRINT "FAIL": END +540 PRINT "ERROR", ERROR +550 PRINT FIND(A())>0 +600 REM "Clearing the array" +610 CLR A() +620 PRINT FIND(A())>0 +700 REM "Changing borders" +710 FOR I=1 TO 10: A(I)=I: NEXT +720 SET 12, 0 +730 FOR I=0 TO 9: PRINT I, A(I): NEXT +740 SET 12, 9 +750 FOR I=9 TO 18: PRINT I, A(I): NEXT +800 REM "Autodim Range Error (1)" +810 ERROR GOTO 840 +820 A(8)=10 +830 PRINT "FAIL": END +840 PRINT "ERROR", ERROR +850 PRINT FIND(A())>0 +900 REM "Autodim Range Error (2)" +910 ERROR GOTO 940 +920 A(19)=10 +930 PRINT "FAIL": END +940 PRINT "ERROR", ERROR +950 PRINT FIND(A())>0 +960 CLR A() +970 SET 12, 1 +1000 REM "Dimensioning Arrays" +1010 DIM A(2) +1020 FOR I=1 TO 2: A(I)=I*I: NEXT +1030 FOR I=1 TO 2: PRINT A(I): NEXT +1100 REM "Range Error (1)" +1110 ERROR GOTO 1140 +1120 A(0)=10 +1130 PRINT "FAIL": END +1140 PRINT "ERROR", ERROR +1150 PRINT FIND(A())>0 +1200 REM "Autodim Range Error (2)" +1210 ERROR GOTO 1240 +1220 A(3)=10 +1230 PRINT "FAIL": END +1240 PRINT "ERROR", ERROR +1250 PRINT FIND(A())>0 +1260 CLR A() +1300 REM "Dimensioning Arrays" +1310 DIM A(20) +1320 FOR I=1 TO 20: A(I)=I*I: NEXT +1330 FOR I=1 TO 20: PRINT A(I): NEXT +1400 REM "Range Error (1)" +1410 ERROR GOTO 1440 +1420 A(0)=10 +1430 PRINT "FAIL": END +1440 PRINT "ERROR", ERROR +1450 PRINT FIND(A())>0 +1500 REM "Range Error (2)" +1510 ERROR GOTO 1540 +1520 A(21)=10 +1530 PRINT "FAIL": END +1540 PRINT "ERROR", ERROR +1550 PRINT FIND(A())>0 +1560 CLR A() +2000 REM "Multidim Arrays" +2010 DIM A(2,2) +2020 FOR I=1 TO 2: FOR J=1 TO 2: A(I,J)=3*I+J: NEXT: NEXT +2030 FOR I=1 TO 2: FOR J=1 TO 2: PRINT A(I,J);" ";: NEXT: PRINT: NEXT +2100 REM "Accessing 1d instead of 2d" +2110 PRINT A(1), A(2) +2120 PRINT A(1,1), A(2,1) +2200 REM "Range Error second index (1)" +2210 ERROR GOTO 2240 +2220 A(1, 0)=10 +2230 PRINT "FAIL": END +2240 PRINT "ERROR", ERROR +2250 PRINT FIND(A())>0 +2300 REM "Range Error second index (2)" +2310 ERROR GOTO 2340 +2320 A(1, 3)=10 +2330 PRINT "FAIL": END +2340 PRINT "ERROR", ERROR +2350 PRINT FIND(A())>0 +2400 REM "Change indexes" +2410 SET 12, 0 +2420 PRINT A(0,0), A(0,1) +2430 PRINT A(1,0), A(1,1) +2500 REM "Range Error second index (1)" +2510 ERROR GOTO 2540 +2520 A(1, -1)=10 +2530 PRINT "FAIL": END +2540 PRINT "ERROR", ERROR +2550 PRINT FIND(A())>0 +2600 REM "Range Error second index (2)" +2610 ERROR GOTO 2640 +2620 A(1, 2)=10 +2630 PRINT "FAIL": END +2640 PRINT "ERROR", ERROR +2650 PRINT FIND(A())>0 +2700 REM "Redim an array" +2710 ERROR GOTO 2740 +2720 DIM A(3) +2730 PRINT "FAIL": END +2740 PRINT "ERROR", ERROR +2800 REM "Dimension another array" +2810 DIM B(8) +2820 B(1)=10: PRINT B(1) +2900 REM "Clr one array and see if the newer is gone" +2910 CLR A() +2920 PRINT FIND(B())>0 +2930 PRINT FIND(A())>0 +3000 REM "Make two arrays and delete the newer" +3010 DIM A(8), B(7) +3020 CLR B() +3030 PRINT FIND(B())>0 +3040 PRINT FIND(A())>0 +3100 REM "Delete an array that is not there" +3110 CLR A() +3120 ERROR GOTO 3150 +3130 CLR A() +3140 PRINT "FAIL": END +3150 PRINT "ERROR", ERROR +4000 END diff --git a/data/examples/99tests/41arrayfun.bas.res b/data/examples/99tests/41arrayfun.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..9898a1dfb083f20c19bd82dfd1c6481021f508a0 --- /dev/null +++ b/data/examples/99tests/41arrayfun.bas.res @@ -0,0 +1,93 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +ERROR 16 +ERROR 16 +0 +ERROR 16 +-1 +ERROR 16 +-1 +0 +0 1 +1 2 +2 3 +3 4 +4 5 +5 6 +6 7 +7 8 +8 9 +9 10 +9 1 +10 2 +11 3 +12 4 +13 5 +14 6 +15 7 +16 8 +17 9 +18 10 +ERROR 16 +-1 +ERROR 16 +-1 +1 +4 +ERROR 16 +-1 +ERROR 16 +-1 +1 +4 +9 +16 +25 +36 +49 +64 +81 +100 +121 +144 +169 +196 +225 +256 +289 +324 +361 +400 +ERROR 16 +-1 +ERROR 16 +-1 +4 5 +7 8 +4 7 +4 7 +ERROR 16 +-1 +ERROR 16 +-1 +4 5 +7 8 +ERROR 16 +-1 +ERROR 16 +-1 +ERROR 18 +10 +0 +0 +0 +-1 +ERROR 18 diff --git a/data/examples/99tests/42gosub.bas b/data/examples/99tests/42gosub.bas new file mode 100644 index 0000000000000000000000000000000000000000..aa848c51cdc130bd9986a6113310e9ecda9b6891 --- /dev/null +++ b/data/examples/99tests/42gosub.bas @@ -0,0 +1,21 @@ +10 REM "GOSUB and RETURN" +20 GOSUB 40 +30 GOTO 100 +40 RETURN +50 PRINT "FAIL": END +100 REM "Return without a GOSUB" +110 ERROR GOTO 140 +120 RETURN +130 PRINT "FAIL": END +140 PRINT "ERROR", ERROR +200 REM "Many GOSUBs (1)" +210 ERROR GOTO 240 +220 GOSUB 220 +230 PRINT "FAIL": END +240 PRINT "ERROR", ERROR +300 REM "Many GOSUBs (2)" +310 ERROR GOTO 350 +320 GOSUB 330 +330 GOSUB 320 +340 PRINT "FAIL": END +350 PRINT "ERROR", ERROR diff --git a/data/examples/99tests/42gosub.bas.res b/data/examples/99tests/42gosub.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..8e40f9343d9fc4efc8a28d40d860adb636dfccce --- /dev/null +++ b/data/examples/99tests/42gosub.bas.res @@ -0,0 +1,3 @@ +ERROR -113 +ERROR -114 +ERROR -114 diff --git a/data/examples/99tests/45ongo.bas b/data/examples/99tests/45ongo.bas new file mode 100644 index 0000000000000000000000000000000000000000..0dd65bd148f4d5a8d2298faf22529091593601c4 --- /dev/null +++ b/data/examples/99tests/45ongo.bas @@ -0,0 +1,45 @@ +10 REM "Infinite loop ON GO" +20 AFTER 1 GOTO 90 +30 A=1 +40 ON A GOTO 40, 60 +50 PRINT "FAIL 1": END +60 PRINT "FAIL 2": END +90 PRINT "PASS" +100 REM "Branch correctly without infinite loop" +110 A=2 +120 ON A GOTO 120, 140 +130 PRINT "FAIL": END +140 PRINT "PASS" +200 REM "Branch to non existent line" +210 ERROR GOTO 250 +220 A=2 +230 ON A GOTO 230, 999 +240 PRINT "FAIL": END +250 PRINT "PASS WITH ERROR", ERROR +300 REM "Non existent line but no branch (1)" +310 ERROR GOTO 350 +320 A=0 +330 ON A GOTO 330, 999 +340 PRINT "PASS": GOTO 400 +350 PRINT "FAIL", ERROR: END +400 REM "Non existent line but no branch (2)" +410 ERROR GOTO 450 +420 A=3 +430 ON A GOTO 430, 999 +440 PRINT "PASS": GOTO 500 +450 PRINT "FAIL", ERROR: END +500 REM "Invalid line number (1)" +510 ERROR GOTO 550 +520 A=1 +530 ON A GOTO -100 +540 PRINT "FAIL": END +550 PRINT "PASS WITH ERROR", ERROR +600 REM "Invalid line number 2 - integer value used" +610 ERROR GOTO 650 +620 A=1 +630 ON A GOTO 640.5 +640 PRINT "PASS": GOTO 700 +650 PRINT "FAIL WITH ERROR", ERROR: END +700 REM + + diff --git a/data/examples/99tests/45ongo.bas.res b/data/examples/99tests/45ongo.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..274486a35ee1ee2f4ec59425227834f1e603e5ec --- /dev/null +++ b/data/examples/99tests/45ongo.bas.res @@ -0,0 +1,7 @@ +PASS +PASS +PASS WITH ERROR 13 +PASS +PASS +PASS WITH ERROR 13 +PASS diff --git a/data/examples/99tests/46output.bas b/data/examples/99tests/46output.bas new file mode 100644 index 0000000000000000000000000000000000000000..2d577af46b5659a1185ccf926959a008c8a386cc --- /dev/null +++ b/data/examples/99tests/46output.bas @@ -0,0 +1,49 @@ +10 REM "Various print statements" +20 PRINT "Hello World"; " says Stefan." +30 PRINT A0, B, K0, ":"; A$; ":" +40 A0=10: B=5: K0=6: A$="---" +50 PRINT A0, B, K0, ":"; A$; ":" +60 PRINT A0, B, #5, K0, ":"; A$; ":" +70 PRINT A0, #5, B, K0, ":"; A$; ":" +80 PRINT #5, A0, B, K0, ":"; A$; ":" +90 PRINT #5, A0, B, #0, K0, ":"; A$; ":" +100 PRINT #5, A0, #0, B, K0, ":"; A$; ":" +110 PRINT #5, #0, A0, B, K0, ":"; A$; ":" +120 PRINT #B, A0, K0;"x" +130 A0=-A0 +140 PRINT #B, A0, K0;"x" +150 K0=-K0 +160 PRINT #B, A0, K0;"x" +170 A0=A0*12: K0=K0*45 +180 PRINT #B, A0, K0;"x" +190 B=-10 +200 PRINT #B, A0, K0;"x" +210 B=10 +220 PRINT #B, A0, K0;"x" +300 REM "Print Errors" +310 ERROR GOTO 390 +320 PRINT "A" "B" +330 PRINT "FAIL": END +390 PRINT: PRINT "PASS WITH ERROR", ERROR +400 ERROR GOTO 490 +420 PRINT "A" B*5 +430 PRINT "FAIL": END +490 PRINT: PRINT "PASS WITH ERROR", ERROR +500 ERROR GOTO 590 +520 PRINT B*5 "HELLO" +530 PRINT "FAIL": END +590 PRINT: PRINT "PASS WITH ERROR", ERROR +600 ERROR GOTO 690 +620 PRINT B*5 K0 +630 PRINT "FAIL": END +690 PRINT: PRINT "PASS WITH ERROR", ERROR +700 REM "Strings and more" +710 A$="Hello" +720 PRINT A$ +730 PRINT (A$) +740 PUT 72, "H", 10 +750 PUT "A", 13, "B", 10 +760 PUT 9, "A", 10 +770 FOR I=31 TO 126: PUT I: NEXT +780 PRINT + diff --git a/data/examples/99tests/46output.bas.res b/data/examples/99tests/46output.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..4314714092f11d7cfcda3fe26d1d2f45f594cba0 --- /dev/null +++ b/data/examples/99tests/46output.bas.res @@ -0,0 +1,29 @@ +Hello World says Stefan. +0 0 0 :: +10 5 6 :---: +10 5 6 :---: +10 5 6 :---: +10 5 6 :---: +10 5 6 :---: +10 5 6 :---: +10 5 6 :---: +10 6 x +-10 6 x +-10 -6 x +-120 -270 x + -120 -270x +-120 -270 x +A +PASS WITH ERROR 10 +A +PASS WITH ERROR 10 +50 +PASS WITH ERROR 10 +50 +PASS WITH ERROR 10 +Hello +72 +HH +A B + A + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/data/examples/99tests/47while.bas b/data/examples/99tests/47while.bas new file mode 100644 index 0000000000000000000000000000000000000000..fbecf59c133e01e12d994371a530653bf3016df6 --- /dev/null +++ b/data/examples/99tests/47while.bas @@ -0,0 +1,38 @@ +10 REM "Stuctured commands test" +110 A=0 +120 B=0 +130 WHILE A<10 +140 PRINT A +150 A=A+1 +160 B=A +170 WHILE B<10 +180 PRINT B; " "; +190 B=B+1 +200 WEND +210 PRINT +220 WEND +300 REM "all in one line" +310 A=0 +320 B=0 +330 WHILE A<10 +340 PRINT A +350 A=A+1 +360 B=A +370 WHILE B<10: PRINT B; " ";: B=B+1: WEND +380 PRINT +390 WEND +400 REM "Break test code" +410 A=10 +420 WHILE A>0 +430 A=A-1 +440 IF A=4 THEN BREAK +450 PRINT A +460 WEND +500 REM "Cont test code" +510 A=10 +520 WHILE A>0 +530 A=A-1 +540 IF A%2=0 THEN CONT +550 PRINT A +560 WEND + diff --git a/data/examples/99tests/47while.bas.res b/data/examples/99tests/47while.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..f5027fc67ecc5aad395d1309d80a3cd2ac5ad4bd --- /dev/null +++ b/data/examples/99tests/47while.bas.res @@ -0,0 +1,48 @@ +0 +1 2 3 4 5 6 7 8 9 +1 +2 3 4 5 6 7 8 9 +2 +3 4 5 6 7 8 9 +3 +4 5 6 7 8 9 +4 +5 6 7 8 9 +5 +6 7 8 9 +6 +7 8 9 +7 +8 9 +8 +9 +9 +0 +1 2 3 4 5 6 7 8 9 +1 +2 3 4 5 6 7 8 9 +2 +3 4 5 6 7 8 9 +3 +4 5 6 7 8 9 +4 +5 6 7 8 9 +5 +6 7 8 9 +6 +7 8 9 +7 +8 9 +8 +9 +9 +9 +8 +7 +6 +5 +9 +7 +5 +3 +1 diff --git a/data/examples/99tests/48until.bas b/data/examples/99tests/48until.bas new file mode 100644 index 0000000000000000000000000000000000000000..2fafd86fdb90e677f77ebc63bbd852895a79eb56 --- /dev/null +++ b/data/examples/99tests/48until.bas @@ -0,0 +1,21 @@ +10 REM "Repeat until test code" +110 A=10 +120 REPEAT +130 PRINT A +140 A=A-1 +150 UNTIL A=0 +200 REM "Break test code" +210 A=10 +220 REPEAT +230 PRINT A +240 A=A-1 +250 IF A%5=0 THEN BREAK +260 UNTIL A=0 +300 REM "Cont test code" +310 A=10 +320 REPEAT +330 A=A-1 +340 IF A%2=0 THEN CONT +350 PRINT A +360 UNTIL A=0 + diff --git a/data/examples/99tests/48until.bas.res b/data/examples/99tests/48until.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..32bfcacf1a8307aa0f77bb57f200cb07b867a572 --- /dev/null +++ b/data/examples/99tests/48until.bas.res @@ -0,0 +1,20 @@ +10 +9 +8 +7 +6 +5 +4 +3 +2 +1 +10 +9 +8 +7 +6 +9 +7 +5 +3 +1 diff --git a/data/examples/99tests/49switch.bas b/data/examples/99tests/49switch.bas new file mode 100644 index 0000000000000000000000000000000000000000..f12b9990aec35767a862d67de9ffb74f87b4b65b --- /dev/null +++ b/data/examples/99tests/49switch.bas @@ -0,0 +1,35 @@ +10 REM "Switch test code" +100 FOR A=0 TO 4 +110 SWITCH A +120 PRINT "default" +130 CASE 1,2: PRINT "one or two" +140 CASE 3: PRINT "three" +150 SWEND +160 NEXT +210 REM "Nested switch" +220 B=8 +230 FOR A=0 TO 4 +240 SWITCH A +250 PRINT "default" +260 CASE 1,2: PRINT "one or two" +270 CASE 3: PRINT "three" +280 SWITCH B +290 PRINT "B: no case found" +300 CASE 8: PRINT "B is eight" +310 SWEND +320 REM +330 SWEND +340 NEXT +350 B=7 +360 FOR A=0 TO 4 +380 SWITCH A +390 PRINT "default" +400 CASE 1,2: PRINT "one or two" +410 CASE 3: PRINT "three" +420 SWITCH B +430 PRINT "B: no case found" +440 CASE 8: PRINT "B is eight" +450 SWEND +460 REM +470 SWEND +480 NEXT diff --git a/data/examples/99tests/49switch.bas.res b/data/examples/99tests/49switch.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..72eb75fc1c571db0ae40ec5cad160a860cb4678f --- /dev/null +++ b/data/examples/99tests/49switch.bas.res @@ -0,0 +1,17 @@ +default +one or two +one or two +three +default +default +one or two +one or two +three +B is eight +default +default +one or two +one or two +three +B: no case found +default diff --git a/data/examples/99tests/50teststruct.bas b/data/examples/99tests/50teststruct.bas new file mode 100644 index 0000000000000000000000000000000000000000..5cff22fc0145bbea11e22575feb87a5b23169de3 --- /dev/null +++ b/data/examples/99tests/50teststruct.bas @@ -0,0 +1,30 @@ +10 REM "Structured if then else test" +100 A=0 +110 IF A=0 THEN PRINT "A is 0" +120 IF A=1 THEN PRINT "Failed" ELSE PRINT "A is not 1" +130 IF A=0 +140 THEN PRINT "A is 0" +150 IF A=1 +160 THEN PRINT "Failed" +170 ELSE PRINT "A is not 1" +200 IF A=0 THEN DO PRINT "A is 0": DEND: PRINT "block ended" +210 IF A=1 THEN PRINT "Failed" : ELSE DO PRINT "A is 1": DEND: PRINT "block ended" +300 IF A=0 THEN DO +310 PRINT "A is 0" +320 PRINT "and there is another line in the block" +330 DEND +340 ELSE +350 DO +360 PRINT "Failed" +370 DEND +400 IF A=1 THEN DO +410 PRINT "Failed" +420 PRINT "and there is another line in the block" +430 DEND +440 ELSE +450 DO +460 PRINT "A is not one" +470 PRINT "and there is another line in the block" +480 DEND + + diff --git a/data/examples/99tests/50teststruct.bas.res b/data/examples/99tests/50teststruct.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..e1d133da364d8ed512674f78847d96da1c3c56c9 --- /dev/null +++ b/data/examples/99tests/50teststruct.bas.res @@ -0,0 +1,12 @@ +A is 0 +A is not 1 +A is 0 +A is not 1 +A is 0 +block ended +A is 1 +block ended +A is 0 +and there is another line in the block +A is not one +and there is another line in the block diff --git a/data/examples/99tests/51rocket.bas b/data/examples/99tests/51rocket.bas new file mode 100644 index 0000000000000000000000000000000000000000..f07cbb84055831e4e381b3e4541cd875dc80e482 --- /dev/null +++ b/data/examples/99tests/51rocket.bas @@ -0,0 +1,81 @@ +10 REM "Rocket from 101 Basic Games" +20 REM "Ported to Stefan's BASIC in 2021" +30 PRINT +100 PRINT "LUNAR LANDING SIMULATION" +110 PRINT "----- ------- ----------":PRINT +120 INPUT "DO YOU WANT INSTRUCTIONS (YES OR NO)? ";A$ +130 IF A$(1,1)="N" OR A$(1,1)="n" THEN 390 +140 CLS +150 PRINT +200 PRINT "YOU ARE LANDING ON THE MOON AND AND HAVE" +210 PRINT "TAKEN OVER MANUAL CONTROL 1000 FEET" +215 PRINT "ABOVE A GOOD LANDING SPOT.": PRINT +220 PRINT "YOU HAVE A DOWNWARD VELOCITY OF 50 FEET/SEC." +225 PRINT "150 UNITS OF FUEL REMAIN.": PRINT +230 PRINT "HERE ARE THE RULES THAT GOVERN YOUR DESCENT" +240 PRINT "(1) AFTER EACH SECOND THE HEIGHT, VELOCITY, AND" +250 PRINT " REMAINING FUEL WILL BE REPORTED BY YOUR" +255 PRINT " ON-BOARD COMPUTER." +260 PRINT "(2) AFTER THE REPORT A '?' WILL APPEAR. ENTER" +270 PRINT " THE NUMBER OF UNITS OF FUEL YOU WISH TO BURN" +280 PRINT " DURING THE NEXT SECOND. EACH UNIT OF FUEL" +285 PRINT " WILL SLOW YOUR DESCENT BY 1 FOOT/SEC." +310 PRINT "(3) THE MAXIMUM THRUST OF YOUR ENGINE IS " +315 PRINT " 30 FEET/SEC/SEC OR 30 UNITS OF FUEL" +320 PRINT " PER SECOND." +330 PRINT "(4) WHEN YOU CONTACT THE LUNAR SURFACE. YOUR " +340 PRINT " DESCENT ENGINE WILL AUTOMATICALLY SHUT DOWN" +345 PRINT " AND YOU WILL BE GIVEN A REPORT OF YOUR " +350 PRINT " LANDING SPEED AND REMAINING FUEL." +360 PRINT "(5) IF YOU RUN OUT OF FUEL THE '?' WILL NO" +370 PRINT " LONGER APPEAR BUT YOUR SECOND BY SECOND" +380 PRINT " REPORT WILL CONTINUE UNTIL YOU CONTACT THE" +385 PRINT " LUNAR SURFACE.":PRINT +390 PRINT "BEGINNING LANDING PROCEDURE..........":PRINT +400 PRINT "G O O D L U C K ! ! !" +420 PRINT +425 INPUT "Read to go - press return ", A$ +426 CLS +430 PRINT "SEC FEET SPEED FUEL " +450 PRINT +455 T=0: H=1000: V=50: F=150 +490 PRINT #6,T,H,V,F;" I"; +495 TAB(H/70): PRINT "*" +500 INPUT B +510 IF B<0 THEN 650 +520 IF B>30 THEN B=30 +530 IF B>F THEN B=F +540 V1=V-B+5 +560 F=F-B +570 H=H-(V+V1)/2 +580 IF H<=0 THEN 670 +590 T=T+1 +600 V=V1 +610 IF F>0 THEN 490 +615 IF B=0 THEN 640 +620 PRINT "**** OUT OF FUEL ****" +640 PRINT #6,T,H,V,F;" I"; +645 TAB(H/70): PRINT "*" +650 B=0 +660 GOTO 540 +670 PRINT "***** CONTACT *****" +680 H=H+(V1+V)/2 +690 IF B=5 THEN 720 +700 D=(-V+SQR(V*V+H*(10-2*B)))/(5-B) +710 GOTO 730 +720 D=H/V +730 V1=V+(5-B)*D +760 PRINT "TOUCHDOWN AT"; T+D; "SECONDS." +770 PRINT "LANDING VELOCITY="; V1; "FEET/SEC." +780 PRINT F; "UNITS OF FUEL REMAINING." +790 IF V1<>0 THEN 810 +800 PRINT "CONGRATULATIONS! A PERFECT LANDING!!" +805 PRINT "YOUR LICENSE WILL BE RENEWED.......LATER." +810 IF ABS(V1)<2 THEN 840 +820 PRINT "***** SORRY, BUT YOU BLEW IT!!!!" +830 PRINT "APPROPRIATE CONDOLENCES WILL BE SENT TO YOUR NEXT OF KIN." +840 PRINT +850 INPUT "ANOTHER MISSION? "; A$ +860 IF A$(1,1)="Y" OR A$(1,1)="y" THEN 390 +870 PRINT: PRINT "CONTROL OUT.": PRINT +999 END diff --git a/data/examples/99tests/51rocket.bas.inp b/data/examples/99tests/51rocket.bas.inp new file mode 100644 index 0000000000000000000000000000000000000000..7908b5e7326a8f1f142e1f6e731f2ce309f7aef9 --- /dev/null +++ b/data/examples/99tests/51rocket.bas.inp @@ -0,0 +1,23 @@ +Y + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +30 +30 +20 +20 +15 +10 +6 +8 +5 +n + diff --git a/data/examples/99tests/51rocket.bas.res b/data/examples/99tests/51rocket.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..37aad86968be7d462e6de9da9afc5027241bc41e --- /dev/null +++ b/data/examples/99tests/51rocket.bas.res @@ -0,0 +1,65 @@ + +LUNAR LANDING SIMULATION +----- ------- ---------- + +DO YOU WANT INSTRUCTIONS (YES OR NO)?  +YOU ARE LANDING ON THE MOON AND AND HAVE +TAKEN OVER MANUAL CONTROL 1000 FEET +ABOVE A GOOD LANDING SPOT. + +YOU HAVE A DOWNWARD VELOCITY OF 50 FEET/SEC. +150 UNITS OF FUEL REMAIN. + +HERE ARE THE RULES THAT GOVERN YOUR DESCENT +(1) AFTER EACH SECOND THE HEIGHT, VELOCITY, AND + REMAINING FUEL WILL BE REPORTED BY YOUR + ON-BOARD COMPUTER. +(2) AFTER THE REPORT A '?' WILL APPEAR. ENTER + THE NUMBER OF UNITS OF FUEL YOU WISH TO BURN + DURING THE NEXT SECOND. EACH UNIT OF FUEL + WILL SLOW YOUR DESCENT BY 1 FOOT/SEC. +(3) THE MAXIMUM THRUST OF YOUR ENGINE IS + 30 FEET/SEC/SEC OR 30 UNITS OF FUEL + PER SECOND. +(4) WHEN YOU CONTACT THE LUNAR SURFACE. YOUR + DESCENT ENGINE WILL AUTOMATICALLY SHUT DOWN + AND YOU WILL BE GIVEN A REPORT OF YOUR + LANDING SPEED AND REMAINING FUEL. +(5) IF YOU RUN OUT OF FUEL THE '?' WILL NO + LONGER APPEAR BUT YOUR SECOND BY SECOND + REPORT WILL CONTINUE UNTIL YOU CONTACT THE + LUNAR SURFACE. + +BEGINNING LANDING PROCEDURE.......... + +G O O D L U C K ! ! ! + +Read to go - press return SEC FEET SPEED FUEL + +0 1000 50 150 I * +? 1 947.5 55 150 I * +? 2 890 60 150 I * +? 3 827.5 65 150 I * +? 4 760 70 150 I * +? 5 687.5 75 150 I * +? 6 610 80 150 I * +? 7 527.5 85 150 I * +? 8 440 90 150 I * +? 9 347.5 95 150 I * +? 10 250 100 150 I * +? 11 162.5 75 120 I * +? 12 100 50 90 I * +? 13 57.5 35 70 I* +? 14 30 20 50 I* +? 15 15 10 35 I* +? 16 7.5 5 25 I* +? 17 3 4 19 I* +? 18 0.5 1 11 I* +? ***** CONTACT ***** +TOUCHDOWN AT18.5SECONDS. +LANDING VELOCITY=1FEET/SEC. +6UNITS OF FUEL REMAINING. + +ANOTHER MISSION? +CONTROL OUT. + diff --git a/data/examples/99tests/testscript b/data/examples/99tests/testscript new file mode 100644 index 0000000000000000000000000000000000000000..e5f5e7777606e4bfdda15e95a88157d433cc4418 --- /dev/null +++ b/data/examples/99tests/testscript @@ -0,0 +1,23 @@ +#!/bin/sh +BASIC=../../Basic1/basic + +for file in *.bas +do + if [ -r $file.inp ] + then + $BASIC $file > ${file}.tmp < ${file}.inp + else + $BASIC $file > ${file}.tmp + fi + diff ${file}.tmp ${file}.res > /dev/null + if [ $? -eq 0 ] + then + echo "passed $file" + rm ${file}.tmp + else + echo "failed $file" + fi +done + +rm eeprom.dat +rm daten.txt diff --git a/data/examples/99testsBasic2/01hello.bas b/data/examples/99testsBasic2/01hello.bas new file mode 100644 index 0000000000000000000000000000000000000000..8c3e0f501ef8dcd63f51fc4e94bd3fcfd2895fc4 --- /dev/null +++ b/data/examples/99testsBasic2/01hello.bas @@ -0,0 +1,2 @@ +10 print "hello world" + diff --git a/data/examples/99testsBasic2/01hello.bas.res b/data/examples/99testsBasic2/01hello.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..3b18e512dba79e4c8300dd08aeb37f8e728b8dad --- /dev/null +++ b/data/examples/99testsBasic2/01hello.bas.res @@ -0,0 +1 @@ +hello world diff --git a/data/examples/99testsBasic2/02print.bas b/data/examples/99testsBasic2/02print.bas new file mode 100644 index 0000000000000000000000000000000000000000..317a1ade018ee14e4d47b229619927a93ff54e40 --- /dev/null +++ b/data/examples/99testsBasic2/02print.bas @@ -0,0 +1,9 @@ +10 PRINT +20 PRINT "this is a string" +30 PRINT 10 +40 A=10 +50 PRINT A, 10 +60 PRINT #3, A, 10, "end" +70 PRINT "the number is", A +80 PRINT "double of", A, "is", 2*A +90 PRINT "double of "; A; " is "; 2*A diff --git a/data/examples/99testsBasic2/02print.bas.res b/data/examples/99testsBasic2/02print.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..3e356853d04b82b6f211096d5926ebd0f2341e07 --- /dev/null +++ b/data/examples/99testsBasic2/02print.bas.res @@ -0,0 +1,8 @@ + +this is a string +10 +10 10 +10 10 end +the number is 10 +double of 10 is 20 +double of 10 is 20 diff --git a/data/examples/99testsBasic2/03let.bas b/data/examples/99testsBasic2/03let.bas new file mode 100644 index 0000000000000000000000000000000000000000..3e2f9124196f348d4abac4755e104b2a2de4de80 --- /dev/null +++ b/data/examples/99testsBasic2/03let.bas @@ -0,0 +1,13 @@ +10 LET A=12 +20 B=-15 +30 PRINT A, B +40 C=(A+B)*2 +50 PRINT C +60 D=(C+B)*(A+B) +70 PRINT D +80 E=INT(C) +90 F=SGN(C) +100 G=ABS(C) +110 PRINT C, E, F, G +120 A=C+E+F+G +130 PRINT A diff --git a/data/examples/99testsBasic2/03let.bas.res b/data/examples/99testsBasic2/03let.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..92f04298aac8809f36915037b52218051e8d8e49 --- /dev/null +++ b/data/examples/99testsBasic2/03let.bas.res @@ -0,0 +1,5 @@ +12 -15 +-6 +63 +-6 -6 -1 6 +-7 diff --git a/data/examples/99testsBasic2/04goto.bas b/data/examples/99testsBasic2/04goto.bas new file mode 100644 index 0000000000000000000000000000000000000000..5aba6c265900dd964e0194a03033788ad64c22ed --- /dev/null +++ b/data/examples/99testsBasic2/04goto.bas @@ -0,0 +1,4 @@ +10 PRINT "start" +20 GOTO 100 +30 PRINT "never printed" +100 PRINT "jumped" diff --git a/data/examples/99testsBasic2/04goto.bas.res b/data/examples/99testsBasic2/04goto.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..38cc109c74d8b77c98dbd7b56a46638428a7c9f0 --- /dev/null +++ b/data/examples/99testsBasic2/04goto.bas.res @@ -0,0 +1,2 @@ +start +jumped diff --git a/data/examples/99testsBasic2/05gosub.bas b/data/examples/99testsBasic2/05gosub.bas new file mode 100644 index 0000000000000000000000000000000000000000..c5c26cee3403b4b141d70d3f1e9f992aa4cf1dd7 --- /dev/null +++ b/data/examples/99testsBasic2/05gosub.bas @@ -0,0 +1,6 @@ +10 PRINT "start" +20 GOSUB 100 +30 PRINT "returned" +40 STOP +100 PRINT "in subroutine" +110 RETURN diff --git a/data/examples/99testsBasic2/05gosub.bas.res b/data/examples/99testsBasic2/05gosub.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..cceab6edfeff28acc309abae25f12076fa54bccb --- /dev/null +++ b/data/examples/99testsBasic2/05gosub.bas.res @@ -0,0 +1,3 @@ +start +in subroutine +returned diff --git a/data/examples/99testsBasic2/06for.bas b/data/examples/99testsBasic2/06for.bas new file mode 100644 index 0000000000000000000000000000000000000000..3c985624a0b71150b262b5f6825a3200057a236c --- /dev/null +++ b/data/examples/99testsBasic2/06for.bas @@ -0,0 +1,22 @@ +10 FOR I=1 TO 10 +20 A=A+I +30 NEXT I +40 PRINT A +50 FOR I=1 +60 IF I=5 BREAK +70 NEXT +80 PRINT I +90 FOR I=1 TO 10 +100 IF I>5 CONT +110 PRINT I +120 NEXT +130 FOR I=1 TO 2 +140 FOR J=1 TO 2 +150 FOR K=1 TO 2 +160 FOR L=1 TO 2 +170 A=A+(I+J)*(K+L) +180 NEXT +190 NEXT +200 NEXT +210 NEXT +220 PRINT A diff --git a/data/examples/99testsBasic2/06for.bas.res b/data/examples/99testsBasic2/06for.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..cfe762c95ea6c89e1b33f32c3200ba9ada35bcf9 --- /dev/null +++ b/data/examples/99testsBasic2/06for.bas.res @@ -0,0 +1,8 @@ +55 +5 +1 +2 +3 +4 +5 +199 diff --git a/data/examples/99testsBasic2/07array.bas b/data/examples/99testsBasic2/07array.bas new file mode 100644 index 0000000000000000000000000000000000000000..088c19d149d0bd282b365712660a2d547999d1f8 --- /dev/null +++ b/data/examples/99testsBasic2/07array.bas @@ -0,0 +1,47 @@ +10 REM "Array test program" +20 REM "Dimensioning, storing and recalling" +30 REM "Arrays are dimensioned with DIM like A(), B()" +40 REM "Arrays autodimension to size 10 like C()" +50 REM "@E() is the EEPROM array" +60 REM "@() is the end of memory array" +100 DIM B(28) +110 DIM A(18) +120 I=0: J=0 +200 PRINT "Testing indexing A(I), B() is zero" +210 FOR I=1 TO 18 +220 A(I)=I*I +230 NEXT +240 FOR I=1 TO 18 +250 PRINT I, A(I), "=", I*I +260 NEXT +270 FOR I=1 TO 28 +280 PRINT I, B(I), "=", 0 +290 NEXT +300 PRINT "Testing A(2)" +310 A(2)=127 +320 PRINT #4, A(2), "= 127" +400 PRINT "Autodimensioning C" +410 FOR I=1 TO 10 +420 C(I)=RND(I) +430 NEXT +440 FOR I=1 TO 10 +450 PRINT I, C(I) +460 NEXT +500 PRINT "Testing B() and @()" +510 FOR I=1 TO 10 +520 B(I)=I*6: @(I)=I*6 +530 NEXT +540 PRINT "Is the size of the memory array larger than zero? ", @>0 +550 FOR J=1 TO 4 +560 PRINT #3,J,B(J),@(J);" = ";6*J +570 NEXT +600 PRINT "Testing EEPROM" +610 PRINT "Size of EEPROM array=", @E +620 IF @E=0 THEN PRINT "No EEPROM" : END +630 FOR I=1 TO 10 +640 @E(I)=I*I +650 NEXT +660 FOR J=1 TO 10 +670 PRINT #3,J,@E(J);" = ";J*J +680 NEXT +700 END diff --git a/data/examples/99testsBasic2/07array.bas.res b/data/examples/99testsBasic2/07array.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..a29e4b5922a20a194db65ca04722e826dc2f4bad --- /dev/null +++ b/data/examples/99testsBasic2/07array.bas.res @@ -0,0 +1,78 @@ +Testing indexing A(I), B() is zero +1 1 = 1 +2 4 = 4 +3 9 = 9 +4 16 = 16 +5 25 = 25 +6 36 = 36 +7 49 = 49 +8 64 = 64 +9 81 = 81 +10 100 = 100 +11 121 = 121 +12 144 = 144 +13 169 = 169 +14 196 = 196 +15 225 = 225 +16 256 = 256 +17 289 = 289 +18 324 = 324 +1 0 = 0 +2 0 = 0 +3 0 = 0 +4 0 = 0 +5 0 = 0 +6 0 = 0 +7 0 = 0 +8 0 = 0 +9 0 = 0 +10 0 = 0 +11 0 = 0 +12 0 = 0 +13 0 = 0 +14 0 = 0 +15 0 = 0 +16 0 = 0 +17 0 = 0 +18 0 = 0 +19 0 = 0 +20 0 = 0 +21 0 = 0 +22 0 = 0 +23 0 = 0 +24 0 = 0 +25 0 = 0 +26 0 = 0 +27 0 = 0 +28 0 = 0 +Testing A(2) +127 = 127 +Autodimensioning C +1 5.74858E-6 +2 0.72782 +3 0.6201 +4 0.59269 +5 2.51519 +6 4.61416 +7 4.76449 +8 1.50486 +9 4.63455 +10 9.2524 +Testing B() and @() +Is the size of the memory array larger than zero? -1 +1 6 6 = 6 +2 12 12 = 12 +3 18 18 = 18 +4 24 24 = 24 +Testing EEPROM +Size of EEPROM array= 256 +1 1 = 1 +2 4 = 4 +3 9 = 9 +4 16 = 16 +5 25 = 25 +6 36 = 36 +7 49 = 49 +8 64 = 64 +9 81 = 81 +10 100 = 100 diff --git a/data/examples/99testsBasic2/08string1.bas b/data/examples/99testsBasic2/08string1.bas new file mode 100644 index 0000000000000000000000000000000000000000..4a8bcf9ff32196cfdeb69da3d85eb5b951caf23c --- /dev/null +++ b/data/examples/99testsBasic2/08string1.bas @@ -0,0 +1,20 @@ +10 REM "Strings in BASIC (1)" +20 REM "Dimensioning and comparing" +100 PRINT "Strings can be constants" +110 PRINT "Strings", "can", "be", "constants" +200 PRINT "String variables" +210 A$="... without DIM - 32 chars max" +220 PRINT A$ +230 PRINT "Length of this string", LEN(A$) +240 DIM B$(80) +250 B$="... dimensioning to any length, the memory is the limit" +260 PRINT B$ +270 PRINT "Length of this string", LEN(B$) +300 IF A$<>B$ THEN PRINT "Strings are different" +310 IF A$=A$ THEN PRINT "Strings are equal" +320 IF A$ THEN PRINT "String is not empty" +330 C$="" +340 IF C$ THEN PRINT "This never shows" +350 PRINT "... because empty strings evaluate to false" +400 END + diff --git a/data/examples/99testsBasic2/08string1.bas.res b/data/examples/99testsBasic2/08string1.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..1a38573daf3118be79ce02ba574e3f1be11ce45e --- /dev/null +++ b/data/examples/99testsBasic2/08string1.bas.res @@ -0,0 +1,11 @@ +Strings can be constants +Strings can be constants +String variables +... without DIM - 32 chars max +Length of this string 30 +... dimensioning to any length, the memory is the limit +Length of this string 55 +Strings are different +Strings are equal +String is not empty +... because empty strings evaluate to false diff --git a/data/examples/99testsBasic2/09string2.bas b/data/examples/99testsBasic2/09string2.bas new file mode 100644 index 0000000000000000000000000000000000000000..b745f5484582bb18cdb6887cfc88eb01b6422c80 --- /dev/null +++ b/data/examples/99testsBasic2/09string2.bas @@ -0,0 +1,22 @@ +10 REM "Strings in BASIC (2)" +20 REM "Substrings, splitting and concatenating" +100 DIM A$(80), B$(80) +110 A$="the quick brown fox jumps over the lazy dog" +120 PRINT A$ +130 PRINT "The first 3 characters-", A$(1,3) +140 PRINT "The rest of the string-", A$(4) +150 PRINT "Splitting ..." +160 FOR I=1 TO LEN(A$) +170 PRINT A$(I, I); +180 IF A$(I, I)=" " THEN PRINT +190 NEXT I +200 PRINT +210 C$=A$(1, 19) +220 D$=A$(20) +230 PRINT C$ +240 PRINT D$ +250 PRINT "Concatenating ..." +260 B$=C$ : B$(LEN(B$)+1)=D$ +270 PRINT B$ +300 END + diff --git a/data/examples/99testsBasic2/09string2.bas.res b/data/examples/99testsBasic2/09string2.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..04c87af0e25f60c41cedfe9fbf7891823d9cad03 --- /dev/null +++ b/data/examples/99testsBasic2/09string2.bas.res @@ -0,0 +1,17 @@ +the quick brown fox jumps over the lazy dog +The first 3 characters- the +The rest of the string- quick brown fox jumps over the lazy dog +Splitting ... +the +quick +brown +fox +jumps +over +the +lazy +dog +the quick brown fox + jumps over the lazy dog +Concatenating ... +the quick brown fox jumps over the lazy dog diff --git a/data/examples/99testsBasic2/10string3.bas b/data/examples/99testsBasic2/10string3.bas new file mode 100644 index 0000000000000000000000000000000000000000..5c31f6367b808a86be7b70817f1f8c7f861f514d --- /dev/null +++ b/data/examples/99testsBasic2/10string3.bas @@ -0,0 +1,23 @@ +10 REM "Strings in BASIC (3)" +20 REM "chars and strings" +100 DIM A$(80) +110 PRINT "Integers are chars" +120 FOR I=1 TO 26 +130 A$(I)=64+I +140 NEXT I +150 PRINT A$ +200 PRINT "Chars are chars or integers, mind the ()" +210 FOR I=1 TO 10 +220 C=A$(I, I) +230 PRINT A$(I, I), (A$(I, I)), C +240 NEXT I +300 PRINT "Chars are taken from the beginning" +310 FOR I=1 TO 10 +320 C=A$(I) +330 PRINT C, A$(I) +340 NEXT I +400 PRINT "Chars are signed, mind the ()" +410 A$=230 +420 PRINT (A$) +500 END + diff --git a/data/examples/99testsBasic2/10string3.bas.res b/data/examples/99testsBasic2/10string3.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..4ef722d36607cade526021835a503855e61ddc2f --- /dev/null +++ b/data/examples/99testsBasic2/10string3.bas.res @@ -0,0 +1,26 @@ +Integers are chars +ABCDEFGHIJKLMNOPQRSTUVWXYZ +Chars are chars or integers, mind the () +A 65 65 +B 66 66 +C 67 67 +D 68 68 +E 69 69 +F 70 70 +G 71 71 +H 72 72 +I 73 73 +J 74 74 +Chars are taken from the beginning +65 ABCDEFGHIJKLMNOPQRSTUVWXYZ +66 BCDEFGHIJKLMNOPQRSTUVWXYZ +67 CDEFGHIJKLMNOPQRSTUVWXYZ +68 DEFGHIJKLMNOPQRSTUVWXYZ +69 EFGHIJKLMNOPQRSTUVWXYZ +70 FGHIJKLMNOPQRSTUVWXYZ +71 GHIJKLMNOPQRSTUVWXYZ +72 HIJKLMNOPQRSTUVWXYZ +73 IJKLMNOPQRSTUVWXYZ +74 JKLMNOPQRSTUVWXYZ +Chars are signed, mind the () +-26 diff --git a/data/examples/99testsBasic2/11string4.bas b/data/examples/99testsBasic2/11string4.bas new file mode 100644 index 0000000000000000000000000000000000000000..9f7b1e6d3cc3b0af011e7cc21a639e5f78e8fde4 --- /dev/null +++ b/data/examples/99testsBasic2/11string4.bas @@ -0,0 +1,16 @@ +10 REM "Strings in BASIC (4)" +20 REM "String arrays" +30 DIM B$(10,10) +100 REM "Read a string" +110 FOR I=1 TO 9 +120 READ B$()(I) +130 NEXT I +200 REM "Print the entire string" +210 FOR I=1 TO 9 +220 PRINT B$()(I) +230 NEXT I +300 REM "Substrings and arrays" +310 FOR I=1 TO 9 +320 PRINT B$(1,1)(I) +330 NEXT I +400 DATA "the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog" diff --git a/data/examples/99testsBasic2/11string4.bas.res b/data/examples/99testsBasic2/11string4.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..cb8886c4a99b33ef1ffcf1405695e612ceaa2693 --- /dev/null +++ b/data/examples/99testsBasic2/11string4.bas.res @@ -0,0 +1,18 @@ +the +quick +brown +fox +jumps +over +the +lazy +dog +t +q +b +f +j +o +t +l +d diff --git a/data/examples/99testsBasic2/12clrvars.bas b/data/examples/99testsBasic2/12clrvars.bas new file mode 100644 index 0000000000000000000000000000000000000000..27c4306ba62598c6b5e11cf6e122d3b0566fdca0 --- /dev/null +++ b/data/examples/99testsBasic2/12clrvars.bas @@ -0,0 +1,12 @@ +10 M=USR(0, 9) +20 PRINT "Memory size is ";M +110 DIM A(8) +120 FOR I=1 TO 8: A(I)=I: NEXT +130 FOR I=1 TO 8: PRINT I, A(I): NEXT +140 A$="Hello World" +200 PRINT "A$ is ";A$ +210 CLR A() +220 PRINT "A$ is ";A$ +300 DIM A(20) +310 FOR I=1 TO 20: A(I)=I: NEXT +320 FOR I=1 TO 20: PRINT I, A(I): NEXT diff --git a/data/examples/99testsBasic2/12clrvars.bas.res b/data/examples/99testsBasic2/12clrvars.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..f043d2bf94a5118927efd44b8153bf7049c8968f --- /dev/null +++ b/data/examples/99testsBasic2/12clrvars.bas.res @@ -0,0 +1,31 @@ +Memory size is 65535 +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +A$ is Hello World +A$ is +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 +19 19 +20 20 diff --git a/data/examples/99testsBasic2/13cond.bas b/data/examples/99testsBasic2/13cond.bas new file mode 100644 index 0000000000000000000000000000000000000000..a14a04957dd2ed911815868044efb771bc3607f4 --- /dev/null +++ b/data/examples/99testsBasic2/13cond.bas @@ -0,0 +1,9 @@ +10 REM "Conditions if then else demo" +20 REM "" +100 A=10 +110 IF A=10 THEN 130 +120 PRINT "This code is never reached" +130 IF A=10 THEN PRINT "A is 10" ELSE PRINT "A is not 10" +140 IF A=20 ELSE PRINT "A is not 20" +200 END + diff --git a/data/examples/99testsBasic2/13cond.bas.res b/data/examples/99testsBasic2/13cond.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..0f22aaaa351e6983a5fb14cf2ffc5494ab82e45d --- /dev/null +++ b/data/examples/99testsBasic2/13cond.bas.res @@ -0,0 +1,2 @@ +A is 10 +A is not 20 diff --git a/data/examples/99testsBasic2/14fibo.bas b/data/examples/99testsBasic2/14fibo.bas new file mode 100644 index 0000000000000000000000000000000000000000..3cfa79caac1156cadfd9c4fd16ab912437a4f14e --- /dev/null +++ b/data/examples/99testsBasic2/14fibo.bas @@ -0,0 +1,26 @@ +10 REM "Calculates the Fibonacci numbers" +20 REM "And the Golden Ratio on an Integer BASIC" +200 REM "Main program" +210 N=19 +220 DIM A(N) +230 A(1)=1 +240 A(2)=1 +250 FOR I=3 TO N +260 IF A(I)>16000 THEN BREAK +270 A(I)=A(I-1)+A(I-2) +280 Q=A(I): D=A(I-1) +290 PRINT #4;I,Q,D; +300 GOSUB 500 +310 NEXT +320 END +500 REM "Print a decimal ratio of a fraction" +520 Z=INT(Q/D) +530 PRINT " ";Z;"."; +540 FOR J=1 TO 10 +550 Z=Q%D +560 Q=Z*10 +570 Z=INT(Q/D) +580 PRINT Z; +590 NEXT +600 PRINT " " +610 RETURN diff --git a/data/examples/99testsBasic2/14fibo.bas.res b/data/examples/99testsBasic2/14fibo.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..abad75ad20cd2a61e23d05923408fe619f3c67b0 --- /dev/null +++ b/data/examples/99testsBasic2/14fibo.bas.res @@ -0,0 +1,17 @@ +3 2 1 2.0000000000 +4 3 2 1.5000000000 +5 5 3 1.6666666666 +6 8 5 1.6000000000 +7 13 8 1.6250000000 +8 21 13 1.6153846153 +9 34 21 1.6190476190 +10 55 34 1.6176470588 +11 89 55 1.6181818181 +12 144 89 1.6179775280 +13 233 144 1.6180555555 +14 377 233 1.6180257510 +15 610 377 1.6180371352 +16 987 610 1.6180327868 +17 1597 987 1.6180344478 +18 2584 1597 1.6180338134 +19 4181 2584 1.6180340557 diff --git a/data/examples/99testsBasic2/15logic.bas b/data/examples/99testsBasic2/15logic.bas new file mode 100644 index 0000000000000000000000000000000000000000..c2edf10fe4a85a158dcc15a8b857ba48f1cc7712 --- /dev/null +++ b/data/examples/99testsBasic2/15logic.bas @@ -0,0 +1,19 @@ +10 REM "Logical expressions" +20 REM "" +100 A=10 +110 B=20 +120 PRINT "A="; A, "; B=";B, "; C=";C +130 IF A=10 THEN PRINT "A is 10" +140 IF NOT A=20 THEN PRINT "A is not 20" +150 IF A=10 AND B=20 THEN PRINT "A is 10 and B is 20" +160 IF A=10 OR C=10 THEN PRINT "A is 10 or C is 10" +200 PRINT "Expressions" +210 L=(A=10 AND B=20) +220 PRINT "L=(A=10 AND B=20)" +230 PRINT "L =",L +240 K=NOT L +250 PRINT "NOT L =",K +260 K=NOT NOT L +270 PRINT "NOT NOT L =",K +280 END + diff --git a/data/examples/99testsBasic2/15logic.bas.res b/data/examples/99testsBasic2/15logic.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..e0ca2c8f1bb758985e59d413fbf19b3cf5a56751 --- /dev/null +++ b/data/examples/99testsBasic2/15logic.bas.res @@ -0,0 +1,10 @@ +A=10 ; B=20 ; C=0 +A is 10 +A is not 20 +A is 10 and B is 20 +A is 10 or C is 10 +Expressions +L=(A=10 AND B=20) +L = -1 +NOT L = 0 +NOT NOT L = -1 diff --git a/data/examples/99testsBasic2/16parable.bas b/data/examples/99testsBasic2/16parable.bas new file mode 100644 index 0000000000000000000000000000000000000000..f62691521713ea4d0f93b6ff4a508ca3dc30ee78 --- /dev/null +++ b/data/examples/99testsBasic2/16parable.bas @@ -0,0 +1,10 @@ +10 REM "Draw a parable" +20 REM "" +100 PRINT "Y=X*X" +110 FOR X=-8 TO 8 +120 IF X<>0 PRINT "!"; +130 IF X=0 PRINT "+";: FOR I=2 TO 8*8/2: PRINT "-";: NEXT: PRINT : GOTO 160 +140 TAB(X*X/2-1) +150 PRINT "*" +160 NEXT X +200 END \ No newline at end of file diff --git a/data/examples/99testsBasic2/16parable.bas.res b/data/examples/99testsBasic2/16parable.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..08c091263f164ebd50722d628f1bcca516c086e5 --- /dev/null +++ b/data/examples/99testsBasic2/16parable.bas.res @@ -0,0 +1,18 @@ +Y=X*X +! * +! * +! * +! * +! * +! * +! * +!* ++------------------------------- +!* +! * +! * +! * +! * +! * +! * +! * diff --git a/data/examples/99testsBasic2/17fileio.bas b/data/examples/99testsBasic2/17fileio.bas new file mode 100644 index 0000000000000000000000000000000000000000..8d87e6f94a4d8f416667ef0a5565b399e7a298ac --- /dev/null +++ b/data/examples/99testsBasic2/17fileio.bas @@ -0,0 +1,48 @@ +10 REM "Simple FILE I/O demo" +20 REM "" +30 N=4 +40 DIM A$(80) +100 PRINT "Write squares to file" +110 OPEN "daten.txt",1 +120 FOR I=1 TO N +130 PRINT I, I*I +140 PRINT &16, I +150 PRINT &16, I*I +160 NEXT I +170 CLOSE 1 +200 PRINT "Read data as numbers" +210 OPEN "daten.txt" +220 FOR I=1 TO N +230 INPUT &16, A +240 INPUT &16, B +250 PRINT "Read "; A; "^2="; B +260 NEXT +270 CLOSE 0 +300 PRINT "Read data as strings, use EOF status" +310 @S=0 +320 OPEN "daten.txt" +330 IF @S<>0 THEN PRINT "OPEN failed" : END +340 FOR I=1 +350 INPUT &16, A$ +360 IF @S=-1 THEN BREAK +370 PRINT "Line",I,"string '";A$; "' Status = "; @S +380 NEXT +390 CLOSE 0 +400 PRINT I, "lines read" +410 PRINT "Status =", @S +500 PRINT "Read Character by Character use EOF status" +510 @S=0 +520 OPEN "daten.txt" +530 IF @S<>0 THEN PRINT "OPEN failed" : END +540 FOR I=1 +550 GET &16, A +560 PRINT "Character ";I;" :",A +570 IF A=-1 THEN BREAK +580 NEXT +590 PRINT I, "characters read" +600 PRINT "Status =", @S +610 CLOSE 0 +700 END + + + diff --git a/data/examples/99testsBasic2/17fileio.bas.res b/data/examples/99testsBasic2/17fileio.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..72549d7bb758f078c02fa4ae38a95b3393835b60 --- /dev/null +++ b/data/examples/99testsBasic2/17fileio.bas.res @@ -0,0 +1,42 @@ +Write squares to file +1 1 +2 4 +3 9 +4 16 +Read data as numbers +Read 1^2=1 +Read 2^2=4 +Read 3^2=9 +Read 4^2=16 +Read data as strings, use EOF status +Line 1 string '1' Status = 0 +Line 2 string '1' Status = 0 +Line 3 string '2' Status = 0 +Line 4 string '4' Status = 0 +Line 5 string '3' Status = 0 +Line 6 string '9' Status = 0 +Line 7 string '4' Status = 0 +Line 8 string '16' Status = 0 +9 lines read +Status = -1 +Read Character by Character use EOF status +Character 1 : 49 +Character 2 : 10 +Character 3 : 49 +Character 4 : 10 +Character 5 : 50 +Character 6 : 10 +Character 7 : 52 +Character 8 : 10 +Character 9 : 51 +Character 10 : 10 +Character 11 : 57 +Character 12 : 10 +Character 13 : 52 +Character 14 : 10 +Character 15 : 49 +Character 16 : 54 +Character 17 : 10 +Character 18 : -1 +18 characters read +Status = -1 diff --git a/data/examples/99testsBasic2/18func.bas b/data/examples/99testsBasic2/18func.bas new file mode 100644 index 0000000000000000000000000000000000000000..789bcaa8b0c9613980fd88b06753b08aef479e03 --- /dev/null +++ b/data/examples/99testsBasic2/18func.bas @@ -0,0 +1,8 @@ +10 REM "Function definitions" +20 REM "" +100 DEF FNS(X)=X*X +200 READ N +210 PRINT "The square of",N," is: "; FN S(N) +220 PRINT "X is",X +230 END +300 DATA 10 diff --git a/data/examples/99testsBasic2/18func.bas.res b/data/examples/99testsBasic2/18func.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..073f8d06aa8c086c7b8ac2c7bb06eb227a1b2e95 --- /dev/null +++ b/data/examples/99testsBasic2/18func.bas.res @@ -0,0 +1,2 @@ +The square of 10 is: 100 +X is 0 diff --git a/data/examples/99testsBasic2/19readdata.bas b/data/examples/99testsBasic2/19readdata.bas new file mode 100644 index 0000000000000000000000000000000000000000..619ca3dde5fb225e3543464b4eff6de4a10af24a --- /dev/null +++ b/data/examples/99testsBasic2/19readdata.bas @@ -0,0 +1,32 @@ +10 REM "READ and DATA test code" +20 REM "" +100 PRINT "Reading strings" +110 READ A$ +120 IF A$="" THEN GOTO 150 +130 PRINT A$; " "; +140 GOTO 110 +150 PRINT +200 PRINT "Reading numbers and putting characters" +200 FOR I=1 TO 11 +210 READ A +220 PUT A +230 NEXT +240 PRINT +300 PRINT "Reading beyond the end" +310 PRINT "Status byte is", @S +320 PRINT "Attempting to read" +330 READ A +370 PRINT "Status byte is", @S, "now" +380 PRINT "Read data was", A +400 RESTORE +410 READ A$, B$, C$ +420 PRINT "Data pointer is now", DATA +430 RESTORE 2 +440 PRINT "Reading from data pointer 2 now" +450 READ A$ +460 PRINT "Result is", A$ +500 END +600 DATA "the", "quick", "brown", "fox", "jumps" +610 DATA "over", "the", "lazy", "dog", "" +620 DATA 72, 69, 76, 76, 79, 32, 87, 79, 82, 76, 68 + diff --git a/data/examples/99testsBasic2/19readdata.bas.res b/data/examples/99testsBasic2/19readdata.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..6193527f7e2770aa1678f2e213a9524c305e952f --- /dev/null +++ b/data/examples/99testsBasic2/19readdata.bas.res @@ -0,0 +1,11 @@ +Reading strings +the quick brown fox jumps over the lazy dog +HELLO WORLD +Reading beyond the end +Status byte is 0 +Attempting to read +Status byte is 1 now +Read data was 0 +Data pointer is now 4 +Reading from data pointer 2 now +Result is quick diff --git a/data/examples/99testsBasic2/20ongo.bas b/data/examples/99testsBasic2/20ongo.bas new file mode 100644 index 0000000000000000000000000000000000000000..a066854a1be1f8e8a90724e9f07aaec37deaf315 --- /dev/null +++ b/data/examples/99testsBasic2/20ongo.bas @@ -0,0 +1,17 @@ +10 REM "ON GOSUB/GOTO demo program" +20 REM "" +100 PRINT "For the solution to all problems:" +110 READ I +120 IF I=-1 END +130 GOSUB 800 +140 GOTO 110 +800 ON I GOTO 850, 860, 870 +810 REM "default" +820 PRINT "Wrong number",I : RETURN +830 REM "The cases" +850 PRINT "Meditations"; : GOTO 900 +860 PRINT "Alcohol"; : GOTO 900 +870 PRINT "Chocolate"; : GOTO 900 +900 PRINT " is the solution" +910 RETURN +1000 DATA 1,2,3,6,1000,-10,0,-9999,-1 diff --git a/data/examples/99testsBasic2/20ongo.bas.res b/data/examples/99testsBasic2/20ongo.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..eea8920a9eb590b375897b29077ff3b367048df3 --- /dev/null +++ b/data/examples/99testsBasic2/20ongo.bas.res @@ -0,0 +1,9 @@ +For the solution to all problems: +Meditations is the solution +Alcohol is the solution +Chocolate is the solution +Wrong number 6 +Wrong number 1000 +Wrong number -10 +Wrong number 0 +Wrong number -9999 diff --git a/data/examples/99testsBasic2/21ongosub.bas b/data/examples/99testsBasic2/21ongosub.bas new file mode 100644 index 0000000000000000000000000000000000000000..c9481176771665cb601705a7e2126f6eb5cdea97 --- /dev/null +++ b/data/examples/99testsBasic2/21ongosub.bas @@ -0,0 +1,13 @@ +10 REM "ON GOSUB/GOTO demo program" +20 REM "" +100 PRINT "For the solution to all problems:" +110 READ I +120 IF I=-1 END +130 ON I GOSUB 850, 860, 870 +140 GOTO 110 +850 PRINT "Meditation"; : GOTO 900 +860 PRINT "Alcohol"; : GOTO 900 +870 PRINT "Chocolate"; : GOTO 900 +900 PRINT " is the solution" +910 RETURN +1000 DATA 1,2,3,6,1000,-10,0,-9999,-1 diff --git a/data/examples/99testsBasic2/21ongosub.bas.res b/data/examples/99testsBasic2/21ongosub.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..81bb8b6fe9fc972adf4060c1cfab92ec6cfbb29d --- /dev/null +++ b/data/examples/99testsBasic2/21ongosub.bas.res @@ -0,0 +1,4 @@ +For the solution to all problems: +Meditation is the solution +Alcohol is the solution +Chocolate is the solution diff --git a/data/examples/99testsBasic2/22trig.bas b/data/examples/99testsBasic2/22trig.bas new file mode 100644 index 0000000000000000000000000000000000000000..28fb1c7e807c81959f539e23ed1091d3b90d451c --- /dev/null +++ b/data/examples/99testsBasic2/22trig.bas @@ -0,0 +1,12 @@ +10 REM "Table of trigonometric functions" +20 REM "" +100 REM "Calculate PI" +110 P1=4*ATAN(1) +200 PRINT "X";: TAB(4) +205 PRINT "SIN(X)";: TAB(7) +210 PRINT "COS(X)";: TAB(7) +215 PRINT "TAN(X)" +220 FOR I=0 TO 89 STEP 5 +230 X=I/360*2*P1 +240 PRINT #4, I, #12, SIN(X), COS(X), TAN(X) +250 NEXT diff --git a/data/examples/99testsBasic2/22trig.bas.res b/data/examples/99testsBasic2/22trig.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..4bb660d2e3633cbb0d28b2bfb22cfa430fa2f559 --- /dev/null +++ b/data/examples/99testsBasic2/22trig.bas.res @@ -0,0 +1,19 @@ +X SIN(X) COS(X) TAN(X) +0 0 1 0 +5 8.71557E-2 0.99619 8.74886E-2 +10 0.17364 0.9848 0.17632 +15 0.25881 0.96592 0.26794 +20 0.34202 0.93969 0.36397 +25 0.42261 0.9063 0.4663 +30 0.5 0.86602 0.57735 +35 0.57357 0.81915 0.7002 +40 0.64278 0.76604 0.83909 +45 0.7071 0.7071 1 +50 0.76604 0.64278 1.19175 +55 0.81915 0.57357 1.42814 +60 0.86602 0.49999 1.73205 +65 0.9063 0.42261 2.1445 +70 0.93969 0.34202 2.74747 +75 0.96592 0.25881 3.73205 +80 0.9848 0.17364 5.67128 +85 0.99619 8.71558E-2 11.43004 diff --git a/data/examples/99testsBasic2/23stir.bas b/data/examples/99testsBasic2/23stir.bas new file mode 100644 index 0000000000000000000000000000000000000000..8d1c32802aa925018f60b6de4e83cd122a2e5016 --- /dev/null +++ b/data/examples/99testsBasic2/23stir.bas @@ -0,0 +1,21 @@ +10 REM "Calculate Factorial and Stirlings function" +20 REM "" +100 REM "Factorial" +110 L=20 +120 DIM F(L) +130 F(1)=1 +140 FOR I=2 TO L +150 F(I)=F(I-1)*I +160 NEXT +200 REM "Stirling" +210 P1=4*ATAN(1) +220 DEF FNS(N)=SQR(2*P1*N)*EXP(N*(LOG(N)-1)) +300 REM "Print table" +305 PRINT "N";: TAB(4) +310 PRINT "FACT(N)";: TAB(6) +315 PRINT "STIR(N)";: TAB(6) +320 PRINT "Accuracy (%)" +330 FOR I=1 TO L +340 PRINT #4, I, #12, F(I), FNS(I), (F(I)-FNS(I))/F(I)*100 +350 NEXT +400 END diff --git a/data/examples/99testsBasic2/23stir.bas.res b/data/examples/99testsBasic2/23stir.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..dabeb479c85c1235c18c9c77b362c88e5e87daf6 --- /dev/null +++ b/data/examples/99testsBasic2/23stir.bas.res @@ -0,0 +1,21 @@ +N FACT(N) STIR(N) Accuracy (%) +1 1 0.92213 7.78629 +2 2 1.919 4.04977 +3 6 5.8362 2.72983 +4 24 23.50617 2.0576 +5 120 118.01918 1.65067 +6 720 710.07824 1.37802 +7 5040 4980.39453 1.18264 +8 40320 39902.39843 1.03571 +9 362880 359537 0.92124 +10 3628800 3598696.75 0.82956 +11 3.99168E7 3.96156E7 0.75447 +12 4.79001E8 4.75687E8 0.69184 +13 6.22702E9 6.18723E9 0.63888 +14 8.71782E10 8.66611E10 0.59322 +15 1.30767E12 1.30043E12 0.55379 +16 2.09227E13 2.08141E13 0.51938 +17 3.55687E14 3.53948E14 0.48891 +18 6.40237E15 6.3728E15 0.46187 +19 1.21645E17 1.21112E17 0.43767 +20 2.4329E18 2.42278E18 0.41568 diff --git a/data/examples/99testsBasic2/24mandel.bas b/data/examples/99testsBasic2/24mandel.bas new file mode 100644 index 0000000000000000000000000000000000000000..f2e3ba80df0c68cd31daeabf75de807a7a35492a --- /dev/null +++ b/data/examples/99testsBasic2/24mandel.bas @@ -0,0 +1,31 @@ +10 REM "Caculate the mandelbrot set" +20 REM "The iteration cutoff, threshold, and resolution" +30 N=10 +40 T=4 +50 R=20 +100 C0=0: C1=0 +200 REM "walk through the grid" +210 FOR J=2*R+1 TO 1 STEP -1 +220 FOR I=1 TO 3*R+1 +230 C0=-2+(I-1)/R: C1=-1+(J-1)/R +240 GOSUB 4000 +250 GOSUB 5000 +280 NEXT +290 PRINT +300 NEXT +999 END +4000 REM "do an iteration on c" +4010 Z0=C0: Z1=C1 +4020 FOR K=1 TO N +4030 S0=Z0*Z0: S1=Z1*Z1 +4040 IF S0+S1>T THEN BREAK +4050 X0=S0-S1+C0 +4060 X1=2*Z0*Z1+C1 +4070 Z0=X0: Z1=X1 +4080 NEXT +4090 RETURN +5000 REM "plot a point" +5010 IF K>N THEN PRINT "X"; : RETURN +5020 IF K>N/2 THEN PRINT "."; : RETURN +5030 PRINT " "; +5040 RETURN diff --git a/data/examples/99testsBasic2/24mandel.bas.res b/data/examples/99testsBasic2/24mandel.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..2c9c2d464eb8c1954b0478f5311b08c88f1b547a --- /dev/null +++ b/data/examples/99testsBasic2/24mandel.bas.res @@ -0,0 +1,41 @@ + ..X.XX + ...X... + ...XXX.. + .XXXXXXX. + ....XXXXXX.. + ......XXXXXX.... + ........XXXXXX......X + ..XXX.XXXXXXXXXXXX...X. + ...XXXXXXXXXXXXXXXXXXXXX + .....XXXXXXXXXXXXXXXXXXX. + ....XXXXXXXXXXXXXXXXXXXXX.. + ... .....XXXXXXXXXXXXXXXXXXXXXX.. + .X..........XXXXXXXXXXXXXXXXXXXXXX.X + ..X...X......XXXXXXXXXXXXXXXXXXXXXXXX + ...XXXXXXX..XXXXXXXXXXXXXXXXXXXXXXXX.. + ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ..X..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. + .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... + .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... + ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. + ..X..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. + ...XXXXXXX..XXXXXXXXXXXXXXXXXXXXXXXX.. + ..X...X......XXXXXXXXXXXXXXXXXXXXXXXX + .X..........XXXXXXXXXXXXXXXXXXXXXX.X + ... .....XXXXXXXXXXXXXXXXXXXXXX.. + ....XXXXXXXXXXXXXXXXXXXXX.. + .....XXXXXXXXXXXXXXXXXXX. + ...XXXXXXXXXXXXXXXXXXXXX + ..XXX.XXXXXXXXXXXX...X. + ........XXXXXX......X + ......XXXXXX.... + ....XXXXXX.. + .XXXXXXX. + ...XXX.. + ...X... + ..X.XX diff --git a/data/examples/99testsBasic2/25malloc.bas b/data/examples/99testsBasic2/25malloc.bas new file mode 100644 index 0000000000000000000000000000000000000000..f8aa833d70fdfa0cd9b7fdb63403114101c8387a --- /dev/null +++ b/data/examples/99testsBasic2/25malloc.bas @@ -0,0 +1,27 @@ +10 REM "Elementary malloc demo" +20 REM "" +100 PRINT "Allocate 16 bytes of memory with identifier 1" +110 M=MALLOC(1, 16) +120 PRINT "Address of memory segment", M +200 PRINT "Storing data" +210 FOR I=0 TO 15 +220 POKE M+I, I*2 +230 NEXT I +300 PRINT "Retrieving data" +310 FOR I=0 TO 15 +320 PRINT I, PEEK(M+I) +330 NEXT I +400 F=FIND(1) +410 PRINT "Memory address of buffer 1 is", F +500 A0=10 +510 F=FIND(A0) +520 PRINT "Memory address of variable A0 is", F +600 DIM A(8) +610 F=FIND(A()) +620 PRINT "Memory address of array A() is", F +700 A$="Hello World" +710 F=FIND(A$) +720 PRINT "Memory address of string A$ is", F +800 PRINT "HIMEM is now ", HIMEM +810 CLR 1 +820 PRINT "HIMEM after CLR", HIMEM diff --git a/data/examples/99testsBasic2/25malloc.bas.res b/data/examples/99testsBasic2/25malloc.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..9d846fd8e4d7be0634e97215de0f8986e973bdcd --- /dev/null +++ b/data/examples/99testsBasic2/25malloc.bas.res @@ -0,0 +1,26 @@ +Allocate 16 bytes of memory with identifier 1 +Address of memory segment 65519 +Storing data +Retrieving data +0 0 +1 2 +2 4 +3 6 +4 8 +5 10 +6 12 +7 14 +8 16 +9 18 +10 20 +11 22 +12 24 +13 26 +14 28 +15 30 +Memory address of buffer 1 is 65519 +Memory address of variable A0 is 65488 +Memory address of array A() is 65450 +Memory address of string A$ is 65409 +HIMEM is now 65403 +HIMEM after CLR 65403 diff --git a/data/examples/99testsBasic2/26eval.bas b/data/examples/99testsBasic2/26eval.bas new file mode 100644 index 0000000000000000000000000000000000000000..6563f71a99f713cc9637719c47b244b610c77d0f --- /dev/null +++ b/data/examples/99testsBasic2/26eval.bas @@ -0,0 +1,13 @@ +10 REM "Demo for the EVAL command" +20 REM "" +30 DIM A$(80) +100 A$="Y=X*X+7" +110 EVAL 1010,A$ +200 PRINT "X Y" +210 FOR X=-4 TO 4.001 STEP 0.5 +220 GOSUB 1000: PRINT #4, X, Y +230 NEXT +300 END +1000 REM "The function at the end" +1010 Y=X +1020 RETURN diff --git a/data/examples/99testsBasic2/26eval.bas.res b/data/examples/99testsBasic2/26eval.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..34712de7d78287635a27ac6eccbe87079d3d1c8f --- /dev/null +++ b/data/examples/99testsBasic2/26eval.bas.res @@ -0,0 +1,18 @@ +X Y +-4 23 +-3.5 19.25 +-3 16 +-2.5 13.25 +-2 11 +-1.5 9.25 +-1 8 +-0.5 7.25 +0 7 +0.5 7.25 +1 8 +1.5 9.25 +2 11 +2.5 13.25 +3 16 +3.5 19.25 +4 23 diff --git a/data/examples/99testsBasic2/27splitstr.bas b/data/examples/99testsBasic2/27splitstr.bas new file mode 100644 index 0000000000000000000000000000000000000000..80d919c794f0e47ad797f28a04313eb2062f885c --- /dev/null +++ b/data/examples/99testsBasic2/27splitstr.bas @@ -0,0 +1,11 @@ +10 REM "Split a string into substrings" +20 REM "" +100 DIM A$(80) +110 A$="the quick brown fox jumps over the lazy dog" +200 FOR I +210 A=INSTR(A$, " ") +220 IF A=0 THEN PRINT A$: BREAK +230 PRINT A$(1,A-1) +240 A$=A$(A+1) +250 NEXT +300 END diff --git a/data/examples/99testsBasic2/27splitstr.bas.res b/data/examples/99testsBasic2/27splitstr.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..ddd4af957de9c3c9a68f51b4e87324301a1c8898 --- /dev/null +++ b/data/examples/99testsBasic2/27splitstr.bas.res @@ -0,0 +1,9 @@ +the +quick +brown +fox +jumps +over +the +lazy +dog diff --git a/data/examples/99testsBasic2/28convert.bas b/data/examples/99testsBasic2/28convert.bas new file mode 100644 index 0000000000000000000000000000000000000000..463274250f437d3511adb33c6f19a82009983496 --- /dev/null +++ b/data/examples/99testsBasic2/28convert.bas @@ -0,0 +1,11 @@ +10 REM "Convert strings to numbers and vice versa" +20 REM "" +100 A$="123" +110 REM "Clear the error flag" +120 @S=0 +130 A=VAL(A$) +140 IF @S=0 THEN PRINT "Conversion successful, number is ", A ELSE PRINT "Number error" +200 A=123 +210 A$=STR(A) +220 PRINT "The number is '";A$;"' " +300 END diff --git a/data/examples/99testsBasic2/28convert.bas.res b/data/examples/99testsBasic2/28convert.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..8a5cee4e0e42ef1df20f4e19265aeb6e0600b915 --- /dev/null +++ b/data/examples/99testsBasic2/28convert.bas.res @@ -0,0 +1,2 @@ +Conversion successful, number is 123 +The number is '123' diff --git a/data/examples/99testsBasic2/29timestop.bas b/data/examples/99testsBasic2/29timestop.bas new file mode 100644 index 0000000000000000000000000000000000000000..da6f15b97287e90f8051b7e06611890bcd4c075f --- /dev/null +++ b/data/examples/99testsBasic2/29timestop.bas @@ -0,0 +1,10 @@ +10 REM "Stopping after some time" +100 AFTER 10 GOTO 1000 +110 T=MILLIS(1) +120 FOR I +130 IF MILLIS(1)-T>100 BREAK +140 NEXT +150 PRINT "Timer failed" +160 END +1000 PRINT "Program stopped with timer" +1010 STOP diff --git a/data/examples/99testsBasic2/29timestop.bas.res b/data/examples/99testsBasic2/29timestop.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..2a4450c8a131617b4306eb111306280cd327c0c4 --- /dev/null +++ b/data/examples/99testsBasic2/29timestop.bas.res @@ -0,0 +1 @@ +Program stopped with timer diff --git a/data/examples/99testsBasic2/30every.bas b/data/examples/99testsBasic2/30every.bas new file mode 100644 index 0000000000000000000000000000000000000000..47f7022a6fabc9ae5b70864fd5f499c3ec43697e --- /dev/null +++ b/data/examples/99testsBasic2/30every.bas @@ -0,0 +1,7 @@ +10 REM "Doing things from time to time" +100 EVERY 10 GOSUB 1000 +110 IF I>4 END +120 GOTO 110 +1000 I=I+1 +1010 PRINT "Iteration", I +1020 RETURN diff --git a/data/examples/99testsBasic2/30every.bas.res b/data/examples/99testsBasic2/30every.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..eb07dd9f8e7d303c3a1c91b71839f62c7c4383a5 --- /dev/null +++ b/data/examples/99testsBasic2/30every.bas.res @@ -0,0 +1,5 @@ +Iteration 1 +Iteration 2 +Iteration 3 +Iteration 4 +Iteration 5 diff --git a/data/examples/99testsBasic2/31error.bas b/data/examples/99testsBasic2/31error.bas new file mode 100644 index 0000000000000000000000000000000000000000..653e05855a9d2534de1f95a54c42a96fc5f28e4e --- /dev/null +++ b/data/examples/99testsBasic2/31error.bas @@ -0,0 +1,7 @@ +10 ERROR GOTO 1000 +20 PRINT "main code" +30 A=1/0 +100 END +1000 PRINT "error code" +1005 PRINT ERROR +1010 END diff --git a/data/examples/99testsBasic2/31error.bas.res b/data/examples/99testsBasic2/31error.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..f1b8596ec01dbdec13aeb0063528c41315e28aad --- /dev/null +++ b/data/examples/99testsBasic2/31error.bas.res @@ -0,0 +1,3 @@ +main code +error code +12 diff --git a/data/examples/99testsBasic2/32euler9.bas b/data/examples/99testsBasic2/32euler9.bas new file mode 100644 index 0000000000000000000000000000000000000000..9f40374fef509f62d0d7bc851d98c3048c526930 --- /dev/null +++ b/data/examples/99testsBasic2/32euler9.bas @@ -0,0 +1,41 @@ +10 REM "Solves the Euler 9 problem " +20 REM "See https://projecteuler.net/problem=9 for details" +30 REM "with a number theoretical approach" +100 PRINT "Enter the circumference K of a triangle" +110 PRINT "The program finds a pythagorean triangle" +120 PRINT "a^2 + b^2 = c^2" +130 K=1008 +140 IF K=0 THEN END +150 IF K%2=0 THEN U=K/2: GOTO 200 +160 PRINT "K is odd, no solution": GOTO 130 +200 REM "Main Program" +210 F=0 +220 X=SQR(U/2) +230 FOR I=1 TO X +240 IF U%I<>0 THEN CONT +250 FOR J=1 TO I +260 D=I+J +270 IF U%D<>0 THEN CONT +280 IF D%2=0 THEN CONT +290 R=I: Q=J +300 GOSUB 800 +310 IF R<>1 THEN CONT +320 A=I*I-J*J +330 B=2*I*J +340 C=I*I+J*J +350 PRINT "Primitive triple",A ,B, C +360 PRINT "Circumference=",A+B+C +370 S=K/(A+B+C) +380 PRINT "Scale with",S +390 PRINT "Solution ",A*S, B*S, C*S +400 F=1 +420 NEXT +430 NEXT +440 REM "All solutions found" +450 IF F=0 THEN PRINT "No solution" +460 END +800 REM "Find GCD" +810 IF R=Q THEN RETURN +820 IF R>Q THEN R=R-Q +830 IF Q>R THEN Q=Q-R +840 GOTO 810 diff --git a/data/examples/99testsBasic2/32euler9.bas.res b/data/examples/99testsBasic2/32euler9.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..109ea7ae8dbadacb93e97c01b8c9fba034d859a0 --- /dev/null +++ b/data/examples/99testsBasic2/32euler9.bas.res @@ -0,0 +1,23 @@ +Enter the circumference K of a triangle +The program finds a pythagorean triangle +a^2 + b^2 = c^2 +Primitive triple 3 4 5 +Circumference= 12 +Scale with 84 +Solution 252 336 420 +Primitive triple 7 24 25 +Circumference= 56 +Scale with 18 +Solution 126 432 450 +Primitive triple 35 12 37 +Circumference= 84 +Scale with 12 +Solution 420 144 444 +Primitive triple 45 28 53 +Circumference= 126 +Scale with 8 +Solution 360 224 424 +Primitive triple 63 16 65 +Circumference= 144 +Scale with 7 +Solution 441 112 455 diff --git a/data/examples/99testsBasic2/33primes.bas b/data/examples/99testsBasic2/33primes.bas new file mode 100644 index 0000000000000000000000000000000000000000..dcc3b6279108c689a5b4bbc40263aa2e211d3679 --- /dev/null +++ b/data/examples/99testsBasic2/33primes.bas @@ -0,0 +1,23 @@ +100 REM "Calculate the first N prime numbers" +110 REM "and output them!" +200 CLR +210 N=100 +220 IF N=0 THEN 500 +230 DIM P(N): P(1)=2: P(2)=3: I=2 +240 IF I=N THEN 360 +250 K=P(I) +260 K=K+2 +270 L=SQR(K) +280 J=1 +290 D=P(J) +310 M=K%D +320 IF M=0 THEN 260 +330 IF D@ THEN PRINT "Maximum is ", @ : GOTO 200 +230 @(1)=2: @(2)=3 +240 FOR I=3 TO N +250 K=@(I-1)+2 +260 L=SQR(K) +270 FOR J=1 +280 IF K%@(J)=0 THEN K=K+2 : GOTO 260 +290 IF @(J)>L THEN BREAK +300 NEXT J +310 @(I)=K +320 NEXT I +360 PRINT "The first", N, "primes are:" +370 FOR J=1 TO N +380 PRINT J, @(J) +390 NEXT +500 END diff --git a/data/examples/99testsBasic2/34primesl.bas.res b/data/examples/99testsBasic2/34primesl.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..9a3796bef93a90f25bcb1b13557801f650a075e0 --- /dev/null +++ b/data/examples/99testsBasic2/34primesl.bas.res @@ -0,0 +1,101 @@ +The first 100 primes are: +1 2 +2 3 +3 5 +4 7 +5 11 +6 13 +7 17 +8 19 +9 23 +10 29 +11 31 +12 37 +13 41 +14 43 +15 47 +16 53 +17 59 +18 61 +19 67 +20 71 +21 73 +22 79 +23 83 +24 89 +25 97 +26 101 +27 103 +28 107 +29 109 +30 113 +31 127 +32 131 +33 137 +34 139 +35 149 +36 151 +37 157 +38 163 +39 167 +40 173 +41 179 +42 181 +43 191 +44 193 +45 197 +46 199 +47 211 +48 223 +49 227 +50 229 +51 233 +52 239 +53 241 +54 251 +55 257 +56 263 +57 269 +58 271 +59 277 +60 281 +61 283 +62 293 +63 307 +64 311 +65 313 +66 317 +67 331 +68 337 +69 347 +70 349 +71 353 +72 359 +73 367 +74 373 +75 379 +76 383 +77 389 +78 397 +79 401 +80 409 +81 419 +82 421 +83 431 +84 433 +85 439 +86 443 +87 449 +88 457 +89 461 +90 463 +91 467 +92 479 +93 487 +94 491 +95 499 +96 503 +97 509 +98 521 +99 523 +100 541 diff --git a/data/examples/99testsBasic2/35math.bas b/data/examples/99testsBasic2/35math.bas new file mode 100644 index 0000000000000000000000000000000000000000..dd640b497b7aa5a7f6caa399673f33811364f789 --- /dev/null +++ b/data/examples/99testsBasic2/35math.bas @@ -0,0 +1,13 @@ +10 REM "Extended math functions" +20 REM "" +100 READ A +110 PRINT "The square root of", A, "is", SQR(A) +200 READ B +210 READ E +220 PRINT B, "to the power of", E, "is", POW(B, E) +300 READ V +310 IF V<0 OR V>1000 THEN PRINT "Range Error" : GOTO 300 +320 M=MAP(V, 1000, 0, 200, 100) +330 PRINT V, "mapped to the range of 200 and 100 is", M +400 END +500 DATA 2, 3, 5, 567 diff --git a/data/examples/99testsBasic2/35math.bas.res b/data/examples/99testsBasic2/35math.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..b7b826e2d4efa2523f06690424b374d3947d3ef7 --- /dev/null +++ b/data/examples/99testsBasic2/35math.bas.res @@ -0,0 +1,3 @@ +The square root of 2 is 1.41421 +3 to the power of 5 is 243 +567 mapped to the range of 200 and 100 is 157 diff --git a/data/examples/99testsBasic2/36tictac.bas b/data/examples/99testsBasic2/36tictac.bas new file mode 100644 index 0000000000000000000000000000000000000000..c77a6423a878b5e52c0e7c73bef0aa518fc34cb9 --- /dev/null +++ b/data/examples/99testsBasic2/36tictac.bas @@ -0,0 +1,66 @@ +10 REM "TIC TAC TOE from 101 BASIC games" +20 REM "by David Ahl." +30 REM "Ported to Stefan's BASIC in 2021" +40 REM "The machine goes first" +100 PRINT "Welcome to tictactoe" +110 PRINT "The game board is numbered:" +120 PRINT +130 PRINT "1 2 3" +140 PRINT "8 9 4" +150 PRINT "7 6 5" +160 PRINT +200 REM "Main Program" +210 PRINT "Staring a new game" +230 A=9 +240 M=A +250 GOSUB 800 +260 P=M +270 B=P%8+1 +280 M=B +290 GOSUB 800 +300 Q=M +310 IF Q=(B+3)%8+1 GOTO 360 +320 C=(B+3)%8+1 +330 M=C +340 GOSUB 900 +350 GOTO 640 +360 C=(B+1)%8+1 +370 M=C +380 GOSUB 800 +390 R=M +400 IF R=(C+3)%8+1 GOTO 450 +410 D=(C+3)%8+1 +420 M=D +430 GOSUB 900 +440 GOTO 640 +450 IF P%2<>0 GOTO 500 +460 D=(C+6)%8+1 +470 M=D +480 GOSUB 900 +490 GOTO 640 +500 D=(C+2)%8+1 +510 M=D +520 GOSUB 800 +530 S=M +540 IF S=(D+3)%8+1 GOTO 590 +550 E=(D+3)%8+1 +560 M=E +570 GOSUB 900 +580 REM "Game is a draw" +590 E=(D+5)%8+1 +600 M=E +610 GOSUB 900 +620 PRINT "The game is a draw." +625 END +630 GOTO 200 +640 PRINT "and wins! ********" +645 END +650 GOTO 200 +800 REM "Subroutine to ask user for the move" +810 GOSUB 900 +820 READ M +830 RETURN +900 REM "Subroutine to display move" +910 PRINT "Computer moves:",M +920 RETURN +1000 DATA 1, 6, 8, 3 diff --git a/data/examples/99testsBasic2/36tictac.bas.res b/data/examples/99testsBasic2/36tictac.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..3479907fc6f62ee4bb348dab35f6922560daedf6 --- /dev/null +++ b/data/examples/99testsBasic2/36tictac.bas.res @@ -0,0 +1,14 @@ +Welcome to tictactoe +The game board is numbered: + +1 2 3 +8 9 4 +7 6 5 + +Staring a new game +Computer moves: 9 +Computer moves: 2 +Computer moves: 4 +Computer moves: 7 +Computer moves: 5 +The game is a draw. diff --git a/data/examples/99testsBasic2/37love.bas b/data/examples/99testsBasic2/37love.bas new file mode 100644 index 0000000000000000000000000000000000000000..2acd0c586435ecabf1a8f2354f09b95eb2ffe60d --- /dev/null +++ b/data/examples/99testsBasic2/37love.bas @@ -0,0 +1,36 @@ +10 REM "LOVE from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 DIM T(120) +100 PRINT "A TRIBUTE TO THE GREAT AMERICAN ARTIST, ROBERT INDIANA." +110 PRINT "HIS GREATEST WORK WILL BE REPRODUCED WITH A MESSAGE OF" +120 PRINT "YOUR CHOICE UP TO 32 CHARACTERS. IF YOU CAN'T THINK OF" +130 PRINT "A MESSAGE, SIMPLE TYPE THE WORD 'LOVE'": PRINT +200 A$="LOVE": L=LEN(A$) +210 FOR J=0 TO INT(60/L) +220 FOR I=1 TO L +230 T(J*L+I)=A$(I,I+1) +240 NEXT I +250 NEXT J +260 C=0 +300 A1=1: P=1: C=C+1: IF C=37 THEN 900 +310 PRINT +320 READ A: A1=A1+A: IF P=1 THEN 400 +330 FOR I=1 TO A: PUT " ": NEXT I: P=1: GOTO 500 +400 FOR I=A1-A TO A1-1: PUT T(I): NEXT I: P=0 +500 IF A1>60 THEN 300 +510 GOTO 320 +600 DATA 60,1,12,26,9,12,3,8,24,17,8,4,6,23,21,6,4,6,22,12,5,6,5 +610 DATA 4,6,21,11,8,6,4,4,6,21,10,10,5,4,4,6,21,9,11,5,4 +620 DATA 4,6,21,8,11,6,4,4,6,21,7,11,7,4,4,6,21,6,11,8,4 +630 DATA 4,6,19,1,1,5,11,9,4,4,6,19,1,1,5,10,10,4,4,6,18,2,1,6,8,11,4 +640 DATA 4,6,17,3,1,7,5,13,4,4,6,15,5,2,23,5,1,29,5,17,8 +650 DATA 1,29,9,9,12,1,13,5,40,1,1,13,5,40,1,4,6,13,3,10,6,12,5,1 +660 DATA 5,6,11,3,11,6,14,3,1,5,6,11,3,11,6,15,2,1 +670 DATA 6,6,9,3,12,6,16,1,1,6,6,9,3,12,6,7,1,10 +680 DATA 7,6,7,3,13,6,6,2,10,7,6,7,3,13,14,10,8,6,5,3,14,6,6,2,10 +690 DATA 8,6,5,3,14,6,7,1,10,9,6,3,3,15,6,16,1,1 +700 DATA 9,6,3,3,15,6,15,2,1,10,6,1,3,16,6,14,3,1,10,10,16,6,12,5,1 +710 DATA 11,8,13,27,1,11,8,13,27,1,60 +900 PRINT +910 END diff --git a/data/examples/99testsBasic2/37love.bas.res b/data/examples/99testsBasic2/37love.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..4a4e4cd5dc1fb51549eb5f30b1cdcdd0996a02ab --- /dev/null +++ b/data/examples/99testsBasic2/37love.bas.res @@ -0,0 +1,42 @@ +A TRIBUTE TO THE GREAT AMERICAN ARTIST, ROBERT INDIANA. +HIS GREATEST WORK WILL BE REPRODUCED WITH A MESSAGE OF +YOUR CHOICE UP TO 32 CHARACTERS. IF YOU CAN'T THINK OF +A MESSAGE, SIMPLE TYPE THE WORD 'LOVE' + + +LOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVE +L OVELOVELOVELOVELOVELOVELOV LOVELOVELOVE +LOV ELOVELOVELOVELOVELOVELOV LOVELOVE +LOVE VELOVELOVELOVELOVELOVEL VELOVE +LOVE VELOVELOVELOVELOVELOVE LOVEL ELOVE +LOVE VELOVELOVELOVELOVELOV VELOVELO LOVE +LOVE VELOVELOVELOVELOVELOV OVELOVELOV LOVE +LOVE VELOVELOVELOVELOVELOV LOVELOVELOV LOVE +LOVE VELOVELOVELOVELOVELOV ELOVELOVELO LOVE +LOVE VELOVELOVELOVELOVELOV VELOVELOVEL LOVE +LOVE VELOVELOVELOVELOVELOV OVELOVELOVE LOVE +LOVE VELOVELOVELOVELOVEL V LOVELOVELOV LOVE +LOVE VELOVELOVELOVELOVEL V LOVELOVELO LOVE +LOVE VELOVELOVELOVELOVE V OVELOVEL LOVE +LOVE VELOVELOVELOVELOV V VELOV LOVE +LOVE VELOVELOVELOVEL VE ELOVE +L VELOV LOVELOVE +L VELOVELOV LOVELOVELOVE +L VELOV E +L VELOV E +LOVE VELOVELOVELOV VELOVELOVE VELOVELOVELO E +LOVEL ELOVELOVELO OVELOVELOVE VELOVELOVELOVE E +LOVEL ELOVELOVELO OVELOVELOVE VELOVELOVELOVEL E +LOVELO LOVELOVEL LOVELOVELOVE VELOVELOVELOVELO E +LOVELO LOVELOVEL LOVELOVELOVE VELOVEL VELOVELOVE +LOVELOV OVELOVE ELOVELOVELOVE VELOVE VELOVELOVE +LOVELOV OVELOVE ELOVELOVELOVE VELOVELOVE +LOVELOVE VELOV VELOVELOVELOVE VELOVE VELOVELOVE +LOVELOVE VELOV VELOVELOVELOVE VELOVEL VELOVELOVE +LOVELOVEL ELO OVELOVELOVELOVE VELOVELOVELOVELO E +LOVELOVEL ELO OVELOVELOVELOVE VELOVELOVELOVEL E +LOVELOVELO L LOVELOVELOVELOVE VELOVELOVELOVE E +LOVELOVELO LOVELOVELOVELOVE VELOVELOVELO E +LOVELOVELOV ELOVELOVELOVE E +LOVELOVELOV ELOVELOVELOVE E +LOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVE diff --git a/data/examples/99testsBasic2/38poetry.bas b/data/examples/99testsBasic2/38poetry.bas new file mode 100644 index 0000000000000000000000000000000000000000..d6dbf1208c618bcddd027f256771b5ef6a688ddb --- /dev/null +++ b/data/examples/99testsBasic2/38poetry.bas @@ -0,0 +1,43 @@ +10 REM "POETRY from 101 BASIC games" +20 REM "Ported to Stefan's BASIC in 2021" +30 REM +40 @R=1 +90 ON I GOTO 100,101,102,103,104 +100 PRINT "MIDNIGHT DREARY";:GOTO 210 +101 PRINT "FIERY EYES";:GOTO 210 +102 PRINT "BIRD OR FIEND";:GOTO 210 +103 PRINT "THING OF EVIL";:GOTO 210 +104 PRINT "PROPHET";:GOTO 210 +110 ON I GOTO 111,112,113,114,115 +111 PRINT "BEGUILING ME";:U=2:GOTO 210 +112 PRINT "THRILLED ME";:GOTO 210 +113 PRINT "STILL SITTING....";:GOTO 212 +114 PRINT "NEVER FLITTING";:U=2:GOTO 210 +115 PRINT "BURNED";:GOTO 210 +120 ON I GOTO 121,122,123,124,125 +121 PRINT "AND MY SOUL";:GOTO 210 +122 PRINT "DARKNESS THERE";:GOTO 210 +123 PRINT "SHALL BE LIFTED";:GOTO 210 +124 PRINT "QUOTH THE RAVEN";:GOTO 210 +125 IF U=0 THEN 210 +126 PRINT "SIGN OF PARTING";:GOTO 210 +130 ON I GOTO 131,132,133,134,135 +131 PRINT "NOTHING MORE";:GOTO 210 +132 PRINT "YET AGAIN";:GOTO 210 +133 PRINT "SLOWLY CREEPING";:GOTO 210 +134 PRINT "...EVERMORE";:GOTO 210 +135 PRINT "NEVERMORE"; +210 IF U=0 OR RND(100)>19 THEN 212 +211 PRINT ",";:U=2 +212 IF RND(100)>65 THEN 214 +213 PRINT " ";:U=U+1:GOTO 215 +214 PRINT : U=0 +215 I=INT(INT(10*RND(1))/2)+1 +220 J=J+1 : K=K+1 +230 IF U>0 OR INT(J/2)<>J/2 THEN 240 +235 PRINT " "; +240 ON J GOTO 90,110,120,130,250 +250 J=0 : PRINT : IF K>20 THEN 270 +260 GOTO 215 +270 PRINT : U=0 : K=0 +999 END diff --git a/data/examples/99testsBasic2/38poetry.bas.res b/data/examples/99testsBasic2/38poetry.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..7c1acd1459ec7bd512bee1e989a31abaeb4edc95 --- /dev/null +++ b/data/examples/99testsBasic2/38poetry.bas.res @@ -0,0 +1,13 @@ +MIDNIGHT DREARY +PROPHET BEGUILING ME +AND MY SOUL + YET AGAIN +PROPHET THRILLED ME AND MY SOUL NEVERMORE +PROPHET, STILL SITTING.... +AND MY SOUL + NOTHING MORE +FIERY EYES THRILLED ME QUOTH THE RAVEN NEVERMORE +PROPHET + NEVER FLITTING +QUOTH THE RAVEN SLOWLY CREEPING + diff --git a/data/examples/99testsBasic2/39eliza.bas b/data/examples/99testsBasic2/39eliza.bas new file mode 100644 index 0000000000000000000000000000000000000000..22a179ce6c98ddf6df8934d99178def57c394564 --- /dev/null +++ b/data/examples/99testsBasic2/39eliza.bas @@ -0,0 +1,320 @@ +10 REM "A ELIZA version from the 70s" +20 REM "Ported 2022 - Stefan Lenz" +30 DIM C1$(80) +40 GOSUB 1070 +50 DIM C$(72), I$(72), K$(72), F$(72), S$(72), R$(72), P$(72), Z$(72) +60 DIM S(37), R(37), N(37) +65 DIM T$(80) +70 N1 = 37 +80 N2 = 14 +90 N3 = 117 +100 FOR X = 1 TO N1 + N2 + N3 +110 READ Z$ +120 NEXT X +130 FOR X = 1 TO N1 +140 READ S(X) +145 READ L +150 R(X) = S(X) +160 N(X) = S(X) + L - 1 +170 NEXT X +180 PRINT "HI! I'M ELIZA. WHAT'S YOUR PROBLEM?" +185 ZZ=0 +190 REM +200 REM "----USER INPUT SECTION----" +210 REM +215 RESTORE 243+ZZ: ZZ=ZZ+1 +220 READ I$: PRINT I$ +221 REM "Uppercase the input" +222 FOR L=1 TO LEN(I$) +223 IF I$(L)>=97 AND I$(L)<=122 THEN T$(L)=(I$(L))-32 ELSE T$(L)=I$(L) +224 NEXT +225 I$=T$ +230 REM I$ = " " + I$ + " " +235 T$=" " : T$(2)=I$: T$(LEN(T$)+1)=" " +236 I$=T$ +240 REM GET RID OF APOSTROPHES +250 FOR L = 1 TO LEN(I$) +260 REM IF MID$(I$, L, 1) <> "'" THEN 290 +261 IF I$(L, L+1)<>"'" THEN 290 +270 REM I$ = MID$(I$, 1, L - 1) + MID$(I$, L + 1, LEN(I$) - L) +271 T$=I$(1, L-1): T$(L)=I$(L+1) +280 GOTO 260 +290 IF L+4>LEN(I$) THEN 330 +300 REM IF UCASE$(MID$(I$, L, 4)) <> "SHUT" THEN 330 +301 IF I$(L, L+3)<>"SHUT" THEN 330 +310 PRINT "IF THAT'S HOW YOU FEEL--GOODBY..." +320 END +330 NEXT L +340 IF I$<>P$ THEN 370 +350 PRINT "PLEASE DON'T REPEAT YOURSELF!" +360 GOTO 190 +370 REM +380 REM "----FIND KEYWORD IN I$----" +390 REM +400 RESTORE +410 S = 0 +420 FOR K = 1 TO N1 +430 READ K$ +440 IF S>0 THEN 510 +450 FOR L=1 TO LEN(I$) - LEN(K$) + 1 +460 REM IF MID$(I$, L, LEN(K$)) <> K$ THEN 500 +461 IF I$(L, L+LEN(K$)-1)<>K$ THEN 500 +470 S=K +480 T=L +490 F$=K$ +500 NEXT L +510 NEXT K +520 IF S<=0 THEN 560 +530 K=S +540 L=T +550 GOTO 590 +560 K=37: REM "WE DIDN'T FIND ANY KEYWORDS" +570 GOTO 850 +580 REM +590 REM "TAKE RIGHT PART OF STRINGS AND CONJUGATE IT" +600 REM "USING THE LIST OF STRINGS TO BE SWAPPED" +610 REM +620 RESTORE +630 FOR X = 1 TO N1 +640 READ Z$ +650 NEXT X +660 IF (LEN(I$)-LEN(F$)-L+1)>0 THEN 690 +670 L=L-1 +680 GOTO 660 +690 REM C$ = " " + MID$(I$, LEN(F$) + L, LEN(I$) - (LEN(F$) + L - 1)) +691 T=LEN(I$)-(LEN(F$)+L-1) +692 U=LEN(F$)+L +693 C$=I$(U, U+T-1) +700 FOR X=1 TO N2/2 +710 READ S$ +711 READ R$ +720 FOR L = 1 TO LEN(C$) +730 IF L+LEN(S$)>LEN(C$) THEN 770 +740 REM IF MID$(C$, L, LEN(S$)) <> S$ THEN 770 +741 IF C$(L, L+LEN(S$)-1)<>S$ THEN 770 +750 REM C$=MID$(C$,1,L-1)+R$+MID$(C$,L+LEN(S$),LEN(C$)-(L+LEN(S$)-1)) +751 T$=C$(1, 1+(L-1)-1) +752 T$(LEN(T$)+1)=R$ +753 T=L+LEN(S$) +754 U=LEN(C$)-(L+LEN(S$)-1) +755 T$(LEN(T$)+1)=C$(T, T+U-1) +756 C$=T$ +760 GOTO 810 +770 IF L+LEN(R$)>LEN(C$) THEN 810 +780 REM IF MID$(C$, L, LEN(R$)) <> R$ THEN 810 +781 IF C$(L, L+LEN(R$)-1)<>R$ THEN 810 +790 REM C$=MID$(C$,1,L-1)+S$+MID$(C$,L+LEN(R$),LEN(C$)-(L+LEN(R$)-1)) +791 T$=C$(1, 1+(L-1)-1) +792 T$(LEN(T$)+1)=S$ +793 T=L+LEN(R$) +794 U=LEN(C$)-(L+LEN(R$)-1) +795 T$(LEN(T$)+1)=C$(T, T+U-1) +796 C$=T$ +800 L=L+LEN(S$) +810 NEXT L +820 NEXT X +830 REM IF MID$(C$, 2, 1)=" " THEN C$=MID$(C$,2,LEN(C$)-1) 'ONLY 1SPACE +831 IF C$(2,2)=" " THEN C$=C$(2, 2+LEN(C$)-1-1) +840 REM +850 REM "NOW USING THE KEYWORD NUMBER (K) GET REPLY" +860 REM +870 RESTORE +880 FOR X=1 TO N1+N2 +890 READ Z$ +900 NEXT X +910 FOR X=1 TO R(K): REM "READ RIGHT REPLY" +920 READ F$ +930 NEXT X +940 R(K)=R(K)+1 +950 IF R(K)>N(K) THEN R(K)=S(K) +960 REM IF MID$(F$, LEN(F$), 1) = "*" THEN 1000 +961 T=LEN(F$) +962 IF F$(T, T)="*" THEN 1000 +970 PRINT F$ +980 P$=I$ +990 GOTO 190 +1000 REM PRINT MID$(F$, 1, LEN(F$) - 1); C$ +1001 PRINT F$(1, 1+(LEN(F$)-1)-1); C$ +1010 P$=I$ +1020 GOTO 190 +1030 REM "PRINT CENTER ROUTINE" +1040 TAB(40-LEN(C1$)/2): PRINT C1$ +1060 RETURN +1070 C1$ = "*** ELIZA ***" +1080 GOSUB 1030 +1090 C1$ = "IN BASIC" +1100 GOSUB 1030 +1110 C1$ = "MODIFIED FROM CYBER 175 AT UNIVERSITY OF ILLINOIS AT CHAMPAGNE" +1120 GOSUB 1030 +1130 C1$ = "JOHN SCHUGG" +1140 GOSUB 1030 +1150 C1$ = "JANUARY 1985" +1160 GOSUB 1030 +1170 C1$ = "HAVE ANY PROBLEMS ?" +1180 GOSUB 1030 +1190 C1$ = "LET ELIZA HELP YOU !" +1200 GOSUB 1030 +1210 PRINT +1220 C1$ = "TO STOP ELIZA TYPE 'SHUT UP'" +1230 GOSUB 1030 +1240 C1$ = "(THIS VERSION WILL NOT RECORD YOUR CONVERSATIONS)" +1250 GOSUB 1030 +1260 C1$ = "(PLEASE SEND SUGGESTIONS FOR IMPROVEMENTS TO JOHN SCHUGG)" +1270 GOSUB 1030 +1280 PRINT "< PRESS RETURN TO CONTINUE...>" +1290 REM "INPUT C1$" +1320 RETURN +1330 REM +1340 REM "---PROGRAM DATA FOLLOWS---"" +1350 REM +1360 REM "KEYWORDS:" +1370 REM +1380 DATA "CAN YOU","CAN I","YOU ARE","YOURE","I DONT","I FEEL" +1390 DATA "WHY DONT YOU","WHY CANT I","ARE YOU","I CANT","I AM","IM " +1400 DATA "YOU ","I WANT","WHAT","HOW","WHO","WHERE","WHEN","WHY" +1410 DATA "NAME","CAUSE","SORRY","DREAM","HELLO","HI ","MAYBE" +1420 DATA " NO","YOUR","ALWAYS","THINK","ALIKE","YES","FRIEND" +1430 DATA "COMPUTER","CAR","NOKEYFOUND" +1440 REM +1450 REM "---STRING DATA FOR CONJUGATIONS---" +1460 REM +1470 DATA " ARE "," AM ","WERE ","WAS "," YOU "," I ","YOUR ","MY " +1480 DATA " IVE "," YOUVE "," IM "," YOURE "," YOU "," ME " +1490 REM +1500 REM "----REPLIES----" +1510 REM +1520 DATA "DON'T YOU BELIEVE THAT I CAN*" +1530 DATA "PERHAPS YOU WOULD LIKE TO BE ABLE TO*" +1540 DATA "YOU WANT ME TO BE ABLE TO*" +1550 DATA "PERHAPS YOU DON'T WANT TO*" +1560 DATA "DO YOU WANT TO BE ABLE TO*" +1570 DATA "WHAT MAKES YOU THINK I AM*" +1580 DATA "DOES IT PLEASE YOU TO BELIEVE I AM*" +1590 DATA "PERHAPS YOU WOULD LIKE TO BE*" +1600 DATA "DO YOU SOMETIMES WISH YOU WERE*" +1610 DATA "DON'T YOU REALLY*" +1620 DATA "WHY DON'T YOU*" +1630 DATA "DO YOU WISH TO BE ABLE TO*" +1640 DATA "DOES THAT TROUBLE YOU?" +1650 DATA "TELL ME MORE ABOUT SUCH FEELINGS." +1660 DATA "DO YOU OFTEN FEEL*" +1670 DATA "DO YOU ENJOY FEELING*" +1680 DATA "DO YOU REALLY BELIEVE I DON'T*" +1690 DATA "PERHAPS IN GOOD TIME I WILL*" +1700 DATA "DO YOU WANT ME TO*" +1710 DATA "DO YOU THINK YOU SHOULD BE ABLE TO*" +1720 DATA "WHY CAN'T YOU*" +1730 DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*" +1740 DATA "WOULD YOU PREFER IF I WERE NOT*" +1750 DATA "PERHAPS IN YOUR FANTASIES I AM*" +1760 DATA "HOW DO YOU KNOW YOU CAN'T*" +1770 DATA "HAVE YOU TRIED?" +1780 DATA "PERHAPS YOU CAN NOW*" +1790 DATA "DID YOU COME TO ME BECAUSE YOU ARE*" +1800 DATA "HOW LONG HAVE YOU BEEN*" +1810 DATA "DO YOU BELIEVE IT IS NORMAL TO BE*" +1820 DATA "DO YOU ENJOY BEING*" +1830 DATA "WE WERE DISCUSSING YOU-- NOT ME." +1840 DATA "OH, I*" +1850 DATA "YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?" +1860 DATA "WHAT WOULD IT MEAN TO YOU IF YOU GOT*" +1870 DATA "WHY DO YOU WANT*" +1880 DATA "SUPPOSE YOU SOON GOT*" +1890 DATA "WHAT IF YOU NEVER GOT*" +1900 DATA "I SOMETIMES ALSO WANT*" +1910 DATA "WHY DO YOU ASK?" +1920 DATA "DOES THAT QUESTION INTEREST YOU?" +1930 DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?" +1940 DATA "WHAT DO YOU THINK?" +1950 DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?" +1960 DATA "WHAT IS IT THAT YOU REALLY WANT TO KNOW?" +1970 DATA "HAVE YOU ASKED ANYONE ELSE?" +1980 DATA "HAVE YOU ASKED SUCH QUESTIONS BEFORE?" +1990 DATA "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?" +2000 DATA "NAMES DON'T INTEREST ME." +2010 DATA "I DON'T CARE ABOUT NAMES-- PLEASE GO ON." +2020 DATA "IS THAT THE REAL REASON?" +2030 DATA "DON'T ANY OTHER REASONS COME TO MIND?" +2040 DATA "DOES THAT REASON EXPLAIN ANY THING ELSE?" +2050 DATA "WHAT OTHER REASONS MIGHT THERE BE?" +2060 DATA "PLEASE DON'T APOLOGIZE." +2070 DATA "APOLOGIES ARE NOT NECESSARY." +2080 DATA "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?" +2090 DATA "DON'T BE SO DEFENSIVE!" +2100 DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?" +2110 DATA "DO YOU DREAM OFTEN?" +2120 DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?" +2130 DATA "ARE YOU DISTURBED BY YOUR DREAMS?" +2140 DATA "HOW DO YOU DO--PLEASE STATE YOUR PROBLEM." +2150 DATA "YOU DON'T SEEM QUITE CERTAIN." +2160 DATA "WHY THE UNCERTAIN TONE?" +2170 DATA "CAN'T YOU BE MORE POSITIVE?" +2180 DATA "YOU AREN'T SURE?" +2190 DATA "DON'T YOU KNOW?" +2200 DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?" +2210 DATA "YOU ARE BEING A BIT NEGATIVE." +2220 DATA "WHY NOT?" +2230 DATA "ARE YOU SURE?" +2240 DATA "WHY NO?" +2250 DATA "WHY ARE YOU CONCERNED ABOUT MY*" +2260 DATA "WHAT ABOUT YOUR OWN*" +2270 DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?" +2280 DATA "WHEN?" +2290 DATA "WHAT ARE YOU THINKING OF?" +2300 DATA "REALLY, ALWAYS?" +2310 DATA "DO YOU REALLY THINK SO?" +2320 DATA "BUT YOU ARE NOT SURE YOU*" +2330 DATA "DO YOU DOUBT YOU*" +2340 DATA "IN WHAT WAY?" +2350 DATA "WHAT RESEMBLANCE DO YOU SEE?" +2360 DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?" +2370 DATA "WHAT OTHER CONNECTIONS DO YOU SEE?" +2380 DATA "COULD THERE REALLY BE SOME CONNECTION?" +2390 DATA "HOW?" +2400 DATA "YOU SEEM QUITE POSITIVE." +2410 DATA "ARE YOU SURE?" +2420 DATA "I SEE." +2430 DATA "I UNDERSTAND." +2440 DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?" +2450 DATA "DO YOUR FRIENDS WORRY YOU?" +2460 DATA "DO YOUR FRIENDS PICK ON YOU?" +2470 DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?" +2480 DATA "DO YOU IMPOSE ON YOUR FRIENDS?" +2490 DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU?" +2500 DATA "DO COMPUTERS WORRY YOU?" +2510 DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?" +2520 DATA "ARE YOU FRIGHTENED BY MACHINES?" +2530 DATA "WHY DO YOU MENTION COMPUTERS?" +2540 DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?" +2550 DATA "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?" +2560 DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?" +2570 DATA "OH, DO YOU LIKE CARS?" +2580 DATA "MY FAVORITE CAR IS A LAMBORGHINI COUNTACH. WHAT IS YOUR'S?" +2590 DATA "MY FAVORITE CAR COMPANY IS FERRARI. WHAT IS YOURS?" +2600 DATA "DO YOU LIKE PORSCHES?" +2610 DATA "DO YOU LIKE PORSCHE TURBO CARRERAS?" +2620 DATA "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?" +2630 DATA "WHAT DOES THAT SUGGEST TO YOU?" +2640 DATA "I SEE." +2650 DATA "I'M NOT SURE I UNDERSTAND YOU FULLY." +2660 DATA "COME COME ELUCIDATE YOUR THOUGHTS." +2670 DATA "CAN YOU ELABORATE ON THAT?" +2680 DATA "THAT IS QUITE INTERESTING." +2690 REM +2700 REM "---DATA FOR FINDING RIGHT REPLIES---" +2710 REM +2720 DATA 1,3,4,2,6,4,6,4,10,4,14,3,17,3,20,2,22,3,25,3 +2730 DATA 28,4,28,4,32,3,35,5,40,9,40,9,40,9,40,9,40,9,40,9 +2740 DATA 49,2,51,4,55,4,59,4,63,1,63,1,64,5,69,5,74,2,76,4 +2750 DATA 80,3,83,7,90,3,93,6,99,7,106,5,111,6 +2760 REM +2770 REM +2780 REM "LAST MOD. JULY 1979" +2790 REM +2800 REM "'ELIZA'" +2810 END +3000 REM "Test dialog questions" +3010 DATA "I am bored!", "I love cars too much." +3020 DATA "Yes I like cars very much.", "Totally" +3030 DATA "This is so annoying", "You are testing me" +3040 DATA "Or is it me testing you?", "Shut up" diff --git a/data/examples/99testsBasic2/39eliza.bas.res b/data/examples/99testsBasic2/39eliza.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..55e29b4bd95d71e2cda5de2338367f72af399f15 --- /dev/null +++ b/data/examples/99testsBasic2/39eliza.bas.res @@ -0,0 +1,29 @@ + *** ELIZA *** + IN BASIC + MODIFIED FROM CYBER 175 AT UNIVERSITY OF ILLINOIS AT CHAMPAGNE + JOHN SCHUGG + JANUARY 1985 + HAVE ANY PROBLEMS ? + LET ELIZA HELP YOU ! + + TO STOP ELIZA TYPE 'SHUT UP' + (THIS VERSION WILL NOT RECORD YOUR CONVERSATIONS) + (PLEASE SEND SUGGESTIONS FOR IMPROVEMENTS TO JOHN SCHUGG) +< PRESS RETURN TO CONTINUE...> +HI! I'M ELIZA. WHAT'S YOUR PROBLEM? +I am bored! +DID YOU COME TO ME BECAUSE YOU ARE BORED! +I love cars too much. +OH, DO YOU LIKE CARS? +Yes I like cars very much. +ARE YOU SURE? +Totally +SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS? +This is so annoying +WHAT DOES THAT SUGGEST TO YOU? +You are testing me +WHAT MAKES YOU THINK I AM TESTING ME +Or is it me testing you? +I SEE. +Shut up +IF THAT'S HOW YOU FEEL--GOODBY... diff --git a/data/examples/99testsBasic2/40forfor.bas b/data/examples/99testsBasic2/40forfor.bas new file mode 100644 index 0000000000000000000000000000000000000000..42e44340b7337de078f7fba74a9a7a555eac9f93 --- /dev/null +++ b/data/examples/99testsBasic2/40forfor.bas @@ -0,0 +1,73 @@ +100 REM "Simple loops" +110 FOR I=1 TO 10 STEP -1: PRINT I: NEXT +120 FOR I=1 TO -1 STEP -1: PRINT I: NEXT +130 FOR I=-1 TO -10 STEP 1: PRINT I: NEXT +140 I=10 +150 FOR I TO 20: PRINT I: NEXT +160 FOR I TO 10 STEP -1: PRINT I: NEXT +200 REM "Nested loops" +210 FOR I=1 TO 2 +220 FOR J=1 TO 2 +230 FOR K=1 TO 2 +240 FOR L=1 TO 2 +250 A=A+I*J*K*L +260 NEXT +270 NEXT +280 NEXT +290 NEXT +300 PRINT A +400 REM "Changing a loop variable" +410 FOR I=1 TO 10 +420 PRINT I +430 I=I+1 +440 NEXT +450 FOR I=1 TO 10 +460 PRINT I +470 I=I-0.5 +480 NEXT +500 REM "Jumping out of a loop" +510 FOR I=1 TO 2 +520 FOR J=1 TO 2 +530 GOTO 560 +540 NEXT +550 NEXT +560 FOR I=1 TO 2 +580 NEXT +590 PRINT "This is 0:", USR(0, 30) +600 REM "Jumping to next, very odd" +610 FOR I=1 TO 2 +620 FOR J=1 TO 2 +630 PRINT I, J +640 GOTO 660 +650 NEXT +660 NEXT +670 PRINT "This is 1:", USR(0, 30) +680 FOR I=1 TO 1 +690 NEXT +700 PRINT "This is 0:", USR(0, 30) +800 REM "One line FOR loops with conditions, ELSE is a termsymbol()" +810 FOR I=1: PRINT I : IF I=10 THEN BREAK ELSE NEXT +900 REM "Error wrong next" +910 ERROR GOTO 960 +920 FOR I=1 TO 2 +930 NEXT +940 NEXT +950 PRINT "FAIL": END +960 PRINT "ERROR", ERROR +1000 REM "Error wrong FOR" +1010 ERROR GOTO 1050 +1020 FOR +1030 NEXT +1040 PRINT "FAIL": END +1050 PRINT "ERROR", ERROR +1100 REM "Error wrong variable" +1110 ERROR GOTO 1150 +1120 FOR A$: NEXT +1130 PRINT "FAIL": END +1150 PRINT "ERROR", ERROR +1200 REM "Error wrong variable" +1210 ERROR GOTO 1250 +1220 FOR A(1): NEXT +1230 PRINT "FAIL": END +1250 PRINT "ERROR", ERROR +1300 END diff --git a/data/examples/99testsBasic2/40forfor.bas.res b/data/examples/99testsBasic2/40forfor.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..a82983e135db42461f4397aa4e7d0da2f7aa0402 --- /dev/null +++ b/data/examples/99testsBasic2/40forfor.bas.res @@ -0,0 +1,70 @@ +1 +0 +-1 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +20 +19 +18 +17 +16 +15 +14 +13 +12 +11 +10 +81 +1 +3 +5 +7 +9 +1 +1.5 +2 +2.5 +3 +3.5 +4 +4.5 +5 +5.5 +6 +6.5 +7 +7.5 +8 +8.5 +9 +9.5 +10 +This is 0: 0 +1 1 +1 2 +This is 1: 1 +This is 0: 0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +ERROR 19 +ERROR 10 +ERROR 10 +ERROR 10 diff --git a/data/examples/99testsBasic2/41arrayfun.bas b/data/examples/99testsBasic2/41arrayfun.bas new file mode 100644 index 0000000000000000000000000000000000000000..f2ae92e83d6f04340f729f16a4e1335c8be1ca4a --- /dev/null +++ b/data/examples/99testsBasic2/41arrayfun.bas @@ -0,0 +1,144 @@ +10 REM "Autodim" +20 FOR I=1 TO 10: A(I)=I: NEXT +30 FOR I=1 TO 10: PRINT A(I): NEXT +100 REM "Range Errors (1)" +110 ERROR GOTO 140 +120 A(0)=0 +130 PRINT "FAIL": END +140 PRINT "ERROR", ERROR +200 REM "Range Errors (2)" +210 ERROR GOTO 240 +220 A(11)=11 +230 PRINT "FAIL": END +240 PRINT "ERROR", ERROR +300 REM "Clearing the array" +310 CLR A() +320 PRINT FIND(A())>0 +400 REM "Autodim Range Error (1)" +410 ERROR GOTO 440 +420 A(0)=10 +430 PRINT "FAIL": END +440 PRINT "ERROR", ERROR +450 PRINT FIND(A())>0 +500 REM "Autodim Range Error (2)" +510 ERROR GOTO 540 +520 A(11)=10 +530 PRINT "FAIL": END +540 PRINT "ERROR", ERROR +550 PRINT FIND(A())>0 +600 REM "Clearing the array" +610 CLR A() +620 PRINT FIND(A())>0 +700 REM "Changing borders" +710 FOR I=1 TO 10: A(I)=I: NEXT +720 SET 12, 0 +730 FOR I=0 TO 9: PRINT I, A(I): NEXT +740 SET 12, 9 +750 FOR I=9 TO 18: PRINT I, A(I): NEXT +800 REM "Autodim Range Error (1)" +810 ERROR GOTO 840 +820 A(8)=10 +830 PRINT "FAIL": END +840 PRINT "ERROR", ERROR +850 PRINT FIND(A())>0 +900 REM "Autodim Range Error (2)" +910 ERROR GOTO 940 +920 A(19)=10 +930 PRINT "FAIL": END +940 PRINT "ERROR", ERROR +950 PRINT FIND(A())>0 +960 CLR A() +970 SET 12, 1 +1000 REM "Dimensioning Arrays" +1010 DIM A(2) +1020 FOR I=1 TO 2: A(I)=I*I: NEXT +1030 FOR I=1 TO 2: PRINT A(I): NEXT +1100 REM "Range Error (1)" +1110 ERROR GOTO 1140 +1120 A(0)=10 +1130 PRINT "FAIL": END +1140 PRINT "ERROR", ERROR +1150 PRINT FIND(A())>0 +1200 REM "Autodim Range Error (2)" +1210 ERROR GOTO 1240 +1220 A(3)=10 +1230 PRINT "FAIL": END +1240 PRINT "ERROR", ERROR +1250 PRINT FIND(A())>0 +1260 CLR A() +1300 REM "Dimensioning Arrays" +1310 DIM A(20) +1320 FOR I=1 TO 20: A(I)=I*I: NEXT +1330 FOR I=1 TO 20: PRINT A(I): NEXT +1400 REM "Range Error (1)" +1410 ERROR GOTO 1440 +1420 A(0)=10 +1430 PRINT "FAIL": END +1440 PRINT "ERROR", ERROR +1450 PRINT FIND(A())>0 +1500 REM "Range Error (2)" +1510 ERROR GOTO 1540 +1520 A(21)=10 +1530 PRINT "FAIL": END +1540 PRINT "ERROR", ERROR +1550 PRINT FIND(A())>0 +1560 CLR A() +2000 REM "Multidim Arrays" +2010 DIM A(2,2) +2020 FOR I=1 TO 2: FOR J=1 TO 2: A(I,J)=3*I+J: NEXT: NEXT +2030 FOR I=1 TO 2: FOR J=1 TO 2: PRINT A(I,J);" ";: NEXT: PRINT: NEXT +2100 REM "Accessing 1d instead of 2d" +2110 PRINT A(1), A(2) +2120 PRINT A(1,1), A(2,1) +2200 REM "Range Error second index (1)" +2210 ERROR GOTO 2240 +2220 A(1, 0)=10 +2230 PRINT "FAIL": END +2240 PRINT "ERROR", ERROR +2250 PRINT FIND(A())>0 +2300 REM "Range Error second index (2)" +2310 ERROR GOTO 2340 +2320 A(1, 3)=10 +2330 PRINT "FAIL": END +2340 PRINT "ERROR", ERROR +2350 PRINT FIND(A())>0 +2400 REM "Change indexes" +2410 SET 12, 0 +2420 PRINT A(0,0), A(0,1) +2430 PRINT A(1,0), A(1,1) +2500 REM "Range Error second index (1)" +2510 ERROR GOTO 2540 +2520 A(1, -1)=10 +2530 PRINT "FAIL": END +2540 PRINT "ERROR", ERROR +2550 PRINT FIND(A())>0 +2600 REM "Range Error second index (2)" +2610 ERROR GOTO 2640 +2620 A(1, 2)=10 +2630 PRINT "FAIL": END +2640 PRINT "ERROR", ERROR +2650 PRINT FIND(A())>0 +2700 REM "Redim an array" +2710 ERROR GOTO 2740 +2720 DIM A(3) +2730 PRINT "REDIM POSSIBLE": CLR A(): GOTO 2800 +2740 PRINT "ERROR", ERROR +2800 REM "Dimension another array" +2810 DIM B(8) +2820 B(1)=10: PRINT B(1) +2900 REM "Clr one array and see if the newer is gone" +2910 CLR A() +2920 PRINT FIND(B())>0 +2930 PRINT FIND(A())>0 +3000 REM "Make two arrays and delete the newer" +3010 DIM A(8), B(7) +3020 CLR B() +3030 PRINT FIND(B())>0 +3040 PRINT FIND(A())>0 +3100 REM "Delete an array that is not there" +3110 CLR A() +3120 ERROR GOTO 3150 +3130 CLR A() +3140 PRINT "FAIL": END +3150 PRINT "ERROR", ERROR +4000 END diff --git a/data/examples/99testsBasic2/41arrayfun.bas.res b/data/examples/99testsBasic2/41arrayfun.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..6880da74e92d68c1790daa34687e69d4044c1be8 --- /dev/null +++ b/data/examples/99testsBasic2/41arrayfun.bas.res @@ -0,0 +1,93 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +ERROR 16 +ERROR 16 +0 +ERROR 16 +-1 +ERROR 16 +-1 +0 +0 1 +1 2 +2 3 +3 4 +4 5 +5 6 +6 7 +7 8 +8 9 +9 10 +9 1 +10 2 +11 3 +12 4 +13 5 +14 6 +15 7 +16 8 +17 9 +18 10 +ERROR 16 +-1 +ERROR 16 +-1 +1 +4 +ERROR 16 +-1 +ERROR 16 +-1 +1 +4 +9 +16 +25 +36 +49 +64 +81 +100 +121 +144 +169 +196 +225 +256 +289 +324 +361 +400 +ERROR 16 +-1 +ERROR 16 +-1 +4 5 +7 8 +4 7 +4 7 +ERROR 16 +-1 +ERROR 16 +-1 +4 5 +7 8 +ERROR 16 +-1 +ERROR 16 +-1 +REDIM POSSIBLE +10 +0 +0 +0 +-1 +ERROR 18 diff --git a/data/examples/99testsBasic2/42gosub.bas b/data/examples/99testsBasic2/42gosub.bas new file mode 100644 index 0000000000000000000000000000000000000000..aa848c51cdc130bd9986a6113310e9ecda9b6891 --- /dev/null +++ b/data/examples/99testsBasic2/42gosub.bas @@ -0,0 +1,21 @@ +10 REM "GOSUB and RETURN" +20 GOSUB 40 +30 GOTO 100 +40 RETURN +50 PRINT "FAIL": END +100 REM "Return without a GOSUB" +110 ERROR GOTO 140 +120 RETURN +130 PRINT "FAIL": END +140 PRINT "ERROR", ERROR +200 REM "Many GOSUBs (1)" +210 ERROR GOTO 240 +220 GOSUB 220 +230 PRINT "FAIL": END +240 PRINT "ERROR", ERROR +300 REM "Many GOSUBs (2)" +310 ERROR GOTO 350 +320 GOSUB 330 +330 GOSUB 320 +340 PRINT "FAIL": END +350 PRINT "ERROR", ERROR diff --git a/data/examples/99testsBasic2/42gosub.bas.res b/data/examples/99testsBasic2/42gosub.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..8e40f9343d9fc4efc8a28d40d860adb636dfccce --- /dev/null +++ b/data/examples/99testsBasic2/42gosub.bas.res @@ -0,0 +1,3 @@ +ERROR -113 +ERROR -114 +ERROR -114 diff --git a/data/examples/99testsBasic2/43gogogo.bas b/data/examples/99testsBasic2/43gogogo.bas new file mode 100644 index 0000000000000000000000000000000000000000..f3ecfc56ca7eca36cd1ed2a07c4d17ec1ad66c72 --- /dev/null +++ b/data/examples/99testsBasic2/43gogogo.bas @@ -0,0 +1,77 @@ +10 REM "Many gotos, over filling the line cache" +20 GOTO 30 +30 GOTO 40 +40 GOTO 50 +50 GOTO 60 +60 GOTO 70 +70 GOTO 80 +80 GOTO 90 +90 GOTO 100 +100 GOTO 110 +110 GOTO 120 +120 GOTO 130 +130 GOTO 140 +140 GOTO 150 +150 GOTO 160 +160 GOTO 170 +170 GOTO 180 +180 GOTO 190 +190 GOTO 200 +200 PRINT "18 GOTOs" +300 REM Jumps in IF +310 A=1 +320 IF A=1 THEN GOTO 340 +330 PRINT "FAIL": END +340 IF A=1 THEN 360 +350 PRINT "FAIL": END +360 IF A=0 THEN PRINT "FAIL": END ELSE GOTO 380 +370 PRINT "FAIL": END +380 IF A=0 THEN PRINT "FAIL": END ELSE 400 +390 PRINT "FAIL": END +400 REM "Arithmetic GOTO" +410 GOTO 400+A*30 +420 PRINT "FAIL": END +430 PRINT "Jumped to", 400+A*30 +500 REM "Non existent line" +510 ERROR GOTO 540 +520 GOTO 511 +530 PRINT "FAIL": END +540 PRINT "ERROR", ERROR +600 REM "No THEN" +610 IF A=1 GOTO 630 +620 PRINT "FAIL": END +630 IF A=0 PRINT "FAIL" ELSE 650 +640 PRINT "FAIL": END +650 PRINT "PASS" +700 REM "Second line ELSE" +710 IF A=0 PRINT "FAIL": END +720 ELSE 740 +730 PRINT "FAIL": END +740 PRINT "PASS" +750 IF A=0 THEN PRINT "FAIL": END +760 ELSE 780 +770 PRINT "FAIL": END +780 PRINT "PASS" +790 IF A=1 THEN 810 +800 ELSE PRINT "FAIL": END +810 PRINT "PASS" +900 REM "Multi line IF" +910 IF A=1 +920 THEN PRINT "PASS" +930 ELSE PRINT "FAIL" +940 IF A=0 +950 THEN PRINT "FAIL" +960 ELSE PRINT "PASS" +970 IF A=1 +980 PRINT "PASS" +990 IF A=0 +1000 PRINT "FAIL" +1010 ELSE PRINT "PASS" +1020 IF A=1 +1030 PRINT "PASS" +1040 ELSE PRINT "FAIL" +1050 IF A=1 +1060 PRINT "PASS" +1070 PRINT "DOUBLE PASS" +1080 ELSE PRINT "FAIL" +1100 END diff --git a/data/examples/99testsBasic2/43gogogo.bas.res b/data/examples/99testsBasic2/43gogogo.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..2c7c5d311d46eb6c171c2f6304beddf9dc76a07b --- /dev/null +++ b/data/examples/99testsBasic2/43gogogo.bas.res @@ -0,0 +1,14 @@ +18 GOTOs +Jumped to 430 +ERROR 13 +PASS +PASS +PASS +PASS +PASS +PASS +PASS +PASS +PASS +PASS +DOUBLE PASS diff --git a/data/examples/99testsBasic2/44deffn.bas b/data/examples/99testsBasic2/44deffn.bas new file mode 100644 index 0000000000000000000000000000000000000000..d19d817242023e5c20f6953445ecd38473f487d4 --- /dev/null +++ b/data/examples/99testsBasic2/44deffn.bas @@ -0,0 +1,18 @@ +5 M=0 +10 REM "DEF FN standard" +20 DEF FN A(X)=X*X +30 PRINT FNA(2), FNA(FNA(2)), FNA(FNA(FNA(2))) +40 REM "Does the variable stay" +50 X=5 +60 PRINT FNA(2), FNA(FNA(2)), FNA(FNA(FNA(2))) +70 PRINT X +80 REM "Redefine and see what happens" +90 M=HIMEM +100 DEF FNA(X)=X*X*X +120 PRINT FNA(2) +130 PRINT HIMEM-M +200 REM "Define a new function" +210 DEF FNB(X)=FNA(X)*X +220 PRINT FNB(2) +230 DEF FNC(X)=FNB(X)*X +240 PRINT FNC(2) diff --git a/data/examples/99testsBasic2/44deffn.bas.res b/data/examples/99testsBasic2/44deffn.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..fd4feed771d7c0b83da0fbecccdcb687c35b1571 --- /dev/null +++ b/data/examples/99testsBasic2/44deffn.bas.res @@ -0,0 +1,7 @@ +4 16 256 +4 16 256 +5 +8 +0 +16 +32 diff --git a/data/examples/99testsBasic2/45ongo.bas b/data/examples/99testsBasic2/45ongo.bas new file mode 100644 index 0000000000000000000000000000000000000000..0dd65bd148f4d5a8d2298faf22529091593601c4 --- /dev/null +++ b/data/examples/99testsBasic2/45ongo.bas @@ -0,0 +1,45 @@ +10 REM "Infinite loop ON GO" +20 AFTER 1 GOTO 90 +30 A=1 +40 ON A GOTO 40, 60 +50 PRINT "FAIL 1": END +60 PRINT "FAIL 2": END +90 PRINT "PASS" +100 REM "Branch correctly without infinite loop" +110 A=2 +120 ON A GOTO 120, 140 +130 PRINT "FAIL": END +140 PRINT "PASS" +200 REM "Branch to non existent line" +210 ERROR GOTO 250 +220 A=2 +230 ON A GOTO 230, 999 +240 PRINT "FAIL": END +250 PRINT "PASS WITH ERROR", ERROR +300 REM "Non existent line but no branch (1)" +310 ERROR GOTO 350 +320 A=0 +330 ON A GOTO 330, 999 +340 PRINT "PASS": GOTO 400 +350 PRINT "FAIL", ERROR: END +400 REM "Non existent line but no branch (2)" +410 ERROR GOTO 450 +420 A=3 +430 ON A GOTO 430, 999 +440 PRINT "PASS": GOTO 500 +450 PRINT "FAIL", ERROR: END +500 REM "Invalid line number (1)" +510 ERROR GOTO 550 +520 A=1 +530 ON A GOTO -100 +540 PRINT "FAIL": END +550 PRINT "PASS WITH ERROR", ERROR +600 REM "Invalid line number 2 - integer value used" +610 ERROR GOTO 650 +620 A=1 +630 ON A GOTO 640.5 +640 PRINT "PASS": GOTO 700 +650 PRINT "FAIL WITH ERROR", ERROR: END +700 REM + + diff --git a/data/examples/99testsBasic2/45ongo.bas.res b/data/examples/99testsBasic2/45ongo.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..274486a35ee1ee2f4ec59425227834f1e603e5ec --- /dev/null +++ b/data/examples/99testsBasic2/45ongo.bas.res @@ -0,0 +1,7 @@ +PASS +PASS +PASS WITH ERROR 13 +PASS +PASS +PASS WITH ERROR 13 +PASS diff --git a/data/examples/99testsBasic2/46output.bas b/data/examples/99testsBasic2/46output.bas new file mode 100644 index 0000000000000000000000000000000000000000..e7ecaeb7c5fb1c2dc86e96d7127892a570ba42cc --- /dev/null +++ b/data/examples/99testsBasic2/46output.bas @@ -0,0 +1,32 @@ +10 REM "Various print statements" +20 PRINT "Hello World"; " says Stefan." +30 PRINT A0, B, K0, ":"; A$; ":" +40 A0=10: B=5: K0=6: A$="---" +50 PRINT A0, B, K0, ":"; A$; ":" +60 PRINT A0, B, #5, K0, ":"; A$; ":" +70 PRINT A0, #5, B, K0, ":"; A$; ":" +80 PRINT #5, A0, B, K0, ":"; A$; ":" +90 PRINT #5, A0, B, #0, K0, ":"; A$; ":" +100 PRINT #5, A0, #0, B, K0, ":"; A$; ":" +110 PRINT #5, #0, A0, B, K0, ":"; A$; ":" +120 PRINT #B, A0, K0;"x" +130 A0=-A0 +140 PRINT #B, A0, K0;"x" +150 K0=-K0 +160 PRINT #B, A0, K0;"x" +170 A0=A0*12: K0=K0*45 +180 PRINT #B, A0, K0;"x" +190 B=-10 +200 PRINT #B, A0, K0;"x" +210 B=10 +220 PRINT #B, A0, K0;"x" +700 REM "Strings and more" +710 A$="Hello" +720 PRINT A$ +730 PRINT (A$) +740 PUT 72, "H", 10 +750 PUT "A", 13, "B", 10 +760 PUT 9, "A", 10 +770 FOR I=31 TO 126: PUT I: NEXT +780 PRINT + diff --git a/data/examples/99testsBasic2/46output.bas.res b/data/examples/99testsBasic2/46output.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..22e5fa0cb1204520013c723344b36ac858562726 --- /dev/null +++ b/data/examples/99testsBasic2/46output.bas.res @@ -0,0 +1,21 @@ +Hello World says Stefan. +0 0 0 :: +10 5 6 :---: +10 5 6 :---: +10 5 6 :---: +10 5 6 :---: +10 5 6 :---: +10 5 6 :---: +10 5 6 :---: +10 6 x +-10 6 x +-10 -6 x +-120 -270 x + -120 -270x +-120 -270 x +Hello +72 +HH +A B + A + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/data/examples/99testsBasic2/47while.bas b/data/examples/99testsBasic2/47while.bas new file mode 100644 index 0000000000000000000000000000000000000000..fbecf59c133e01e12d994371a530653bf3016df6 --- /dev/null +++ b/data/examples/99testsBasic2/47while.bas @@ -0,0 +1,38 @@ +10 REM "Stuctured commands test" +110 A=0 +120 B=0 +130 WHILE A<10 +140 PRINT A +150 A=A+1 +160 B=A +170 WHILE B<10 +180 PRINT B; " "; +190 B=B+1 +200 WEND +210 PRINT +220 WEND +300 REM "all in one line" +310 A=0 +320 B=0 +330 WHILE A<10 +340 PRINT A +350 A=A+1 +360 B=A +370 WHILE B<10: PRINT B; " ";: B=B+1: WEND +380 PRINT +390 WEND +400 REM "Break test code" +410 A=10 +420 WHILE A>0 +430 A=A-1 +440 IF A=4 THEN BREAK +450 PRINT A +460 WEND +500 REM "Cont test code" +510 A=10 +520 WHILE A>0 +530 A=A-1 +540 IF A%2=0 THEN CONT +550 PRINT A +560 WEND + diff --git a/data/examples/99testsBasic2/47while.bas.res b/data/examples/99testsBasic2/47while.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..0a4e3bf34738d5f231cc371c2192dee4fc0c7b36 --- /dev/null +++ b/data/examples/99testsBasic2/47while.bas.res @@ -0,0 +1,50 @@ +0 +1 2 3 4 5 6 7 8 9 +1 +2 3 4 5 6 7 8 9 +2 +3 4 5 6 7 8 9 +3 +4 5 6 7 8 9 +4 +5 6 7 8 9 +5 +6 7 8 9 +6 +7 8 9 +7 +8 9 +8 +9 +9 + +0 +1 2 3 4 5 6 7 8 9 +1 +2 3 4 5 6 7 8 9 +2 +3 4 5 6 7 8 9 +3 +4 5 6 7 8 9 +4 +5 6 7 8 9 +5 +6 7 8 9 +6 +7 8 9 +7 +8 9 +8 +9 +9 + +9 +8 +7 +6 +5 +9 +7 +5 +3 +1 diff --git a/data/examples/99testsBasic2/48until.bas b/data/examples/99testsBasic2/48until.bas new file mode 100644 index 0000000000000000000000000000000000000000..2fafd86fdb90e677f77ebc63bbd852895a79eb56 --- /dev/null +++ b/data/examples/99testsBasic2/48until.bas @@ -0,0 +1,21 @@ +10 REM "Repeat until test code" +110 A=10 +120 REPEAT +130 PRINT A +140 A=A-1 +150 UNTIL A=0 +200 REM "Break test code" +210 A=10 +220 REPEAT +230 PRINT A +240 A=A-1 +250 IF A%5=0 THEN BREAK +260 UNTIL A=0 +300 REM "Cont test code" +310 A=10 +320 REPEAT +330 A=A-1 +340 IF A%2=0 THEN CONT +350 PRINT A +360 UNTIL A=0 + diff --git a/data/examples/99testsBasic2/48until.bas.res b/data/examples/99testsBasic2/48until.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..32bfcacf1a8307aa0f77bb57f200cb07b867a572 --- /dev/null +++ b/data/examples/99testsBasic2/48until.bas.res @@ -0,0 +1,20 @@ +10 +9 +8 +7 +6 +5 +4 +3 +2 +1 +10 +9 +8 +7 +6 +9 +7 +5 +3 +1 diff --git a/data/examples/99testsBasic2/49switch.bas b/data/examples/99testsBasic2/49switch.bas new file mode 100644 index 0000000000000000000000000000000000000000..f12b9990aec35767a862d67de9ffb74f87b4b65b --- /dev/null +++ b/data/examples/99testsBasic2/49switch.bas @@ -0,0 +1,35 @@ +10 REM "Switch test code" +100 FOR A=0 TO 4 +110 SWITCH A +120 PRINT "default" +130 CASE 1,2: PRINT "one or two" +140 CASE 3: PRINT "three" +150 SWEND +160 NEXT +210 REM "Nested switch" +220 B=8 +230 FOR A=0 TO 4 +240 SWITCH A +250 PRINT "default" +260 CASE 1,2: PRINT "one or two" +270 CASE 3: PRINT "three" +280 SWITCH B +290 PRINT "B: no case found" +300 CASE 8: PRINT "B is eight" +310 SWEND +320 REM +330 SWEND +340 NEXT +350 B=7 +360 FOR A=0 TO 4 +380 SWITCH A +390 PRINT "default" +400 CASE 1,2: PRINT "one or two" +410 CASE 3: PRINT "three" +420 SWITCH B +430 PRINT "B: no case found" +440 CASE 8: PRINT "B is eight" +450 SWEND +460 REM +470 SWEND +480 NEXT diff --git a/data/examples/99testsBasic2/49switch.bas.res b/data/examples/99testsBasic2/49switch.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..72eb75fc1c571db0ae40ec5cad160a860cb4678f --- /dev/null +++ b/data/examples/99testsBasic2/49switch.bas.res @@ -0,0 +1,17 @@ +default +one or two +one or two +three +default +default +one or two +one or two +three +B is eight +default +default +one or two +one or two +three +B: no case found +default diff --git a/data/examples/99testsBasic2/50teststruct.bas b/data/examples/99testsBasic2/50teststruct.bas new file mode 100644 index 0000000000000000000000000000000000000000..5cff22fc0145bbea11e22575feb87a5b23169de3 --- /dev/null +++ b/data/examples/99testsBasic2/50teststruct.bas @@ -0,0 +1,30 @@ +10 REM "Structured if then else test" +100 A=0 +110 IF A=0 THEN PRINT "A is 0" +120 IF A=1 THEN PRINT "Failed" ELSE PRINT "A is not 1" +130 IF A=0 +140 THEN PRINT "A is 0" +150 IF A=1 +160 THEN PRINT "Failed" +170 ELSE PRINT "A is not 1" +200 IF A=0 THEN DO PRINT "A is 0": DEND: PRINT "block ended" +210 IF A=1 THEN PRINT "Failed" : ELSE DO PRINT "A is 1": DEND: PRINT "block ended" +300 IF A=0 THEN DO +310 PRINT "A is 0" +320 PRINT "and there is another line in the block" +330 DEND +340 ELSE +350 DO +360 PRINT "Failed" +370 DEND +400 IF A=1 THEN DO +410 PRINT "Failed" +420 PRINT "and there is another line in the block" +430 DEND +440 ELSE +450 DO +460 PRINT "A is not one" +470 PRINT "and there is another line in the block" +480 DEND + + diff --git a/data/examples/99testsBasic2/50teststruct.bas.res b/data/examples/99testsBasic2/50teststruct.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..e1d133da364d8ed512674f78847d96da1c3c56c9 --- /dev/null +++ b/data/examples/99testsBasic2/50teststruct.bas.res @@ -0,0 +1,12 @@ +A is 0 +A is not 1 +A is 0 +A is not 1 +A is 0 +block ended +A is 1 +block ended +A is 0 +and there is another line in the block +A is not one +and there is another line in the block diff --git a/data/examples/99testsBasic2/51rocket.bas b/data/examples/99testsBasic2/51rocket.bas new file mode 100644 index 0000000000000000000000000000000000000000..f07cbb84055831e4e381b3e4541cd875dc80e482 --- /dev/null +++ b/data/examples/99testsBasic2/51rocket.bas @@ -0,0 +1,81 @@ +10 REM "Rocket from 101 Basic Games" +20 REM "Ported to Stefan's BASIC in 2021" +30 PRINT +100 PRINT "LUNAR LANDING SIMULATION" +110 PRINT "----- ------- ----------":PRINT +120 INPUT "DO YOU WANT INSTRUCTIONS (YES OR NO)? ";A$ +130 IF A$(1,1)="N" OR A$(1,1)="n" THEN 390 +140 CLS +150 PRINT +200 PRINT "YOU ARE LANDING ON THE MOON AND AND HAVE" +210 PRINT "TAKEN OVER MANUAL CONTROL 1000 FEET" +215 PRINT "ABOVE A GOOD LANDING SPOT.": PRINT +220 PRINT "YOU HAVE A DOWNWARD VELOCITY OF 50 FEET/SEC." +225 PRINT "150 UNITS OF FUEL REMAIN.": PRINT +230 PRINT "HERE ARE THE RULES THAT GOVERN YOUR DESCENT" +240 PRINT "(1) AFTER EACH SECOND THE HEIGHT, VELOCITY, AND" +250 PRINT " REMAINING FUEL WILL BE REPORTED BY YOUR" +255 PRINT " ON-BOARD COMPUTER." +260 PRINT "(2) AFTER THE REPORT A '?' WILL APPEAR. ENTER" +270 PRINT " THE NUMBER OF UNITS OF FUEL YOU WISH TO BURN" +280 PRINT " DURING THE NEXT SECOND. EACH UNIT OF FUEL" +285 PRINT " WILL SLOW YOUR DESCENT BY 1 FOOT/SEC." +310 PRINT "(3) THE MAXIMUM THRUST OF YOUR ENGINE IS " +315 PRINT " 30 FEET/SEC/SEC OR 30 UNITS OF FUEL" +320 PRINT " PER SECOND." +330 PRINT "(4) WHEN YOU CONTACT THE LUNAR SURFACE. YOUR " +340 PRINT " DESCENT ENGINE WILL AUTOMATICALLY SHUT DOWN" +345 PRINT " AND YOU WILL BE GIVEN A REPORT OF YOUR " +350 PRINT " LANDING SPEED AND REMAINING FUEL." +360 PRINT "(5) IF YOU RUN OUT OF FUEL THE '?' WILL NO" +370 PRINT " LONGER APPEAR BUT YOUR SECOND BY SECOND" +380 PRINT " REPORT WILL CONTINUE UNTIL YOU CONTACT THE" +385 PRINT " LUNAR SURFACE.":PRINT +390 PRINT "BEGINNING LANDING PROCEDURE..........":PRINT +400 PRINT "G O O D L U C K ! ! !" +420 PRINT +425 INPUT "Read to go - press return ", A$ +426 CLS +430 PRINT "SEC FEET SPEED FUEL " +450 PRINT +455 T=0: H=1000: V=50: F=150 +490 PRINT #6,T,H,V,F;" I"; +495 TAB(H/70): PRINT "*" +500 INPUT B +510 IF B<0 THEN 650 +520 IF B>30 THEN B=30 +530 IF B>F THEN B=F +540 V1=V-B+5 +560 F=F-B +570 H=H-(V+V1)/2 +580 IF H<=0 THEN 670 +590 T=T+1 +600 V=V1 +610 IF F>0 THEN 490 +615 IF B=0 THEN 640 +620 PRINT "**** OUT OF FUEL ****" +640 PRINT #6,T,H,V,F;" I"; +645 TAB(H/70): PRINT "*" +650 B=0 +660 GOTO 540 +670 PRINT "***** CONTACT *****" +680 H=H+(V1+V)/2 +690 IF B=5 THEN 720 +700 D=(-V+SQR(V*V+H*(10-2*B)))/(5-B) +710 GOTO 730 +720 D=H/V +730 V1=V+(5-B)*D +760 PRINT "TOUCHDOWN AT"; T+D; "SECONDS." +770 PRINT "LANDING VELOCITY="; V1; "FEET/SEC." +780 PRINT F; "UNITS OF FUEL REMAINING." +790 IF V1<>0 THEN 810 +800 PRINT "CONGRATULATIONS! A PERFECT LANDING!!" +805 PRINT "YOUR LICENSE WILL BE RENEWED.......LATER." +810 IF ABS(V1)<2 THEN 840 +820 PRINT "***** SORRY, BUT YOU BLEW IT!!!!" +830 PRINT "APPROPRIATE CONDOLENCES WILL BE SENT TO YOUR NEXT OF KIN." +840 PRINT +850 INPUT "ANOTHER MISSION? "; A$ +860 IF A$(1,1)="Y" OR A$(1,1)="y" THEN 390 +870 PRINT: PRINT "CONTROL OUT.": PRINT +999 END diff --git a/data/examples/99testsBasic2/51rocket.bas.inp b/data/examples/99testsBasic2/51rocket.bas.inp new file mode 100644 index 0000000000000000000000000000000000000000..7908b5e7326a8f1f142e1f6e731f2ce309f7aef9 --- /dev/null +++ b/data/examples/99testsBasic2/51rocket.bas.inp @@ -0,0 +1,23 @@ +Y + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +30 +30 +20 +20 +15 +10 +6 +8 +5 +n + diff --git a/data/examples/99testsBasic2/51rocket.bas.res b/data/examples/99testsBasic2/51rocket.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..37aad86968be7d462e6de9da9afc5027241bc41e --- /dev/null +++ b/data/examples/99testsBasic2/51rocket.bas.res @@ -0,0 +1,65 @@ + +LUNAR LANDING SIMULATION +----- ------- ---------- + +DO YOU WANT INSTRUCTIONS (YES OR NO)?  +YOU ARE LANDING ON THE MOON AND AND HAVE +TAKEN OVER MANUAL CONTROL 1000 FEET +ABOVE A GOOD LANDING SPOT. + +YOU HAVE A DOWNWARD VELOCITY OF 50 FEET/SEC. +150 UNITS OF FUEL REMAIN. + +HERE ARE THE RULES THAT GOVERN YOUR DESCENT +(1) AFTER EACH SECOND THE HEIGHT, VELOCITY, AND + REMAINING FUEL WILL BE REPORTED BY YOUR + ON-BOARD COMPUTER. +(2) AFTER THE REPORT A '?' WILL APPEAR. ENTER + THE NUMBER OF UNITS OF FUEL YOU WISH TO BURN + DURING THE NEXT SECOND. EACH UNIT OF FUEL + WILL SLOW YOUR DESCENT BY 1 FOOT/SEC. +(3) THE MAXIMUM THRUST OF YOUR ENGINE IS + 30 FEET/SEC/SEC OR 30 UNITS OF FUEL + PER SECOND. +(4) WHEN YOU CONTACT THE LUNAR SURFACE. YOUR + DESCENT ENGINE WILL AUTOMATICALLY SHUT DOWN + AND YOU WILL BE GIVEN A REPORT OF YOUR + LANDING SPEED AND REMAINING FUEL. +(5) IF YOU RUN OUT OF FUEL THE '?' WILL NO + LONGER APPEAR BUT YOUR SECOND BY SECOND + REPORT WILL CONTINUE UNTIL YOU CONTACT THE + LUNAR SURFACE. + +BEGINNING LANDING PROCEDURE.......... + +G O O D L U C K ! ! ! + +Read to go - press return SEC FEET SPEED FUEL + +0 1000 50 150 I * +? 1 947.5 55 150 I * +? 2 890 60 150 I * +? 3 827.5 65 150 I * +? 4 760 70 150 I * +? 5 687.5 75 150 I * +? 6 610 80 150 I * +? 7 527.5 85 150 I * +? 8 440 90 150 I * +? 9 347.5 95 150 I * +? 10 250 100 150 I * +? 11 162.5 75 120 I * +? 12 100 50 90 I * +? 13 57.5 35 70 I* +? 14 30 20 50 I* +? 15 15 10 35 I* +? 16 7.5 5 25 I* +? 17 3 4 19 I* +? 18 0.5 1 11 I* +? ***** CONTACT ***** +TOUCHDOWN AT18.5SECONDS. +LANDING VELOCITY=1FEET/SEC. +6UNITS OF FUEL REMAINING. + +ANOTHER MISSION? +CONTROL OUT. + diff --git a/data/examples/99testsBasic2/52eliza-org.bas b/data/examples/99testsBasic2/52eliza-org.bas new file mode 100644 index 0000000000000000000000000000000000000000..e2fce51dd006ef21c79d8fdb64bd0e1849f938d3 --- /dev/null +++ b/data/examples/99testsBasic2/52eliza-org.bas @@ -0,0 +1,290 @@ +10 REM "A ELIZA version from the 70s" +20 REM "Ported 2022 - Stefan Lenz" +25 REM "(Almost) original code to test HASMSSTRINGS" +30 DIM C1$(80) +40 GOSUB 1070 +50 DIM C$(72), I$(72), K$(72), F$(72), S$(72), R$(72), P$(72), Z$(72) +60 DIM S(37), R(37), N(37) +65 DIM T$(80) +70 N1 = 37 +80 N2 = 14 +90 N3 = 117 +100 FOR X = 1 TO N1 + N2 + N3 +110 READ Z$ +120 NEXT X +130 FOR X = 1 TO N1 +140 READ S(X) +145 READ L +150 R(X) = S(X) +160 N(X) = S(X) + L - 1 +170 NEXT X +180 PRINT "HI! I'M ELIZA. WHAT'S YOUR PROBLEM?" +190 REM +200 REM "----USER INPUT SECTION----" +210 REM +220 INPUT I$ +221 REM "Uppercase the input" +222 FOR L=1 TO LEN(I$) +223 IF (I$(L))>=97 AND (I$(L))<=122 THEN T$(L)=CHR$((I$(L))-32): ELSE T$(L)=I$(L) +224 NEXT +225 I$=T$ +230 T$=" "+I$+" ": I$=T$ +240 REM "GET RID OF APOSTROPHES" +250 FOR L = 1 TO LEN(I$) +260 IF MID$(I$, L, 1) <> "'" THEN 290 +270 T$=MID$(I$, 1, L-1)+MID$(I$, L+1, LEN(I$)-L) +275 I$=T$ +280 GOTO 260 +290 IF L+4>=LEN(I$) THEN 330 +300 IF MID$(I$, L, 4) <> "SHUT" THEN 330 +310 PRINT "IF THAT'S HOW YOU FEEL--GOODBY..." +320 END +330 NEXT L +340 IF I$<>P$ THEN 370 +350 PRINT "PLEASE DON'T REPEAT YOURSELF!" +360 GOTO 190 +370 REM +380 REM "----FIND KEYWORD IN I$----" +390 REM +400 RESTORE +410 S = 0 +420 FOR K = 1 TO N1 +430 READ K$ +440 IF S>0 THEN 510 +450 FOR L=1 TO LEN(I$)-LEN(K$)+1 +460 IF MID$(I$, L, LEN(K$))<>K$ THEN 500 +470 S=K +480 T=L +490 F$=K$ +500 NEXT L +510 NEXT K +520 IF S<=0 THEN 560 +530 K=S +540 L=T +550 GOTO 590 +560 K=37: REM "WE DIDN'T FIND ANY KEYWORDS" +570 GOTO 850 +580 REM +590 REM "TAKE RIGHT PART OF STRINGS AND CONJUGATE IT" +600 REM "USING THE LIST OF STRINGS TO BE SWAPPED" +610 REM +620 RESTORE +630 FOR X = 1 TO N1 +640 READ Z$ +650 NEXT X +660 IF (LEN(I$)-LEN(F$)-L+1)>0 THEN 690 +670 L=L-1 +680 GOTO 660 +690 C$ = " "+MID$(I$, LEN(F$)+L, LEN(I$)-(LEN(F$)+L-1)) +700 FOR X=1 TO N2/2 +710 READ S$ +711 READ R$ +720 FOR L = 1 TO LEN(C$) +730 IF L+LEN(S$)>LEN(C$) THEN 770 +740 IF MID$(C$, L, LEN(S$))<>S$ THEN 770 +750 T$=MID$(C$,1,L-1)+R$+MID$(C$,L+LEN(S$),LEN(C$)-(L+LEN(S$)-1)) +755 C$=T$ +760 GOTO 810 +770 IF L+LEN(R$)>LEN(C$) THEN 810 +780 IF MID$(C$, L, LEN(R$)) <> R$ THEN 810 +790 T$=MID$(C$,1,L-1)+S$+MID$(C$,L+LEN(R$),LEN(C$)-(L+LEN(R$)-1)) +795 C$=T$ +800 L=L+LEN(S$) +810 NEXT L +820 NEXT X +830 IF MID$(C$, 2, 1)=" " THEN C$=MID$(C$,2,LEN(C$)-1) +840 REM +850 REM "NOW USING THE KEYWORD NUMBER (K) GET REPLY" +860 REM +870 RESTORE +880 FOR X=1 TO N1+N2 +890 READ Z$ +900 NEXT X +910 FOR X=1 TO R(K): REM "READ RIGHT REPLY" +920 READ F$ +930 NEXT X +940 R(K)=R(K)+1 +950 IF R(K)>N(K) THEN R(K)=S(K) +960 IF MID$(F$, LEN(F$), 1) = "*" THEN 1000 +970 PRINT F$ +980 P$=I$ +990 GOTO 190 +1000 PRINT MID$(F$, 1, LEN(F$) - 1); C$ +1010 P$=I$ +1020 GOTO 190 +1030 REM "PRINT CENTER ROUTINE" +1040 PRINT TAB(40 - LEN(C1$) / 2); C1$ +1060 RETURN +1070 C1$ = "*** ELIZA ***" +1080 GOSUB 1030 +1090 C1$ = "IN BASIC" +1100 GOSUB 1030 +1110 C1$ = "MODIFIED FROM CYBER 175 AT UNIVERSITY OF ILLINOIS AT CHAMPAGNE" +1120 GOSUB 1030 +1130 C1$ = "JOHN SCHUGG" +1140 GOSUB 1030 +1150 C1$ = "JANUARY 1985" +1160 GOSUB 1030 +1170 C1$ = "HAVE ANY PROBLEMS ?" +1180 GOSUB 1030 +1190 C1$ = "LET ELIZA HELP YOU !" +1200 GOSUB 1030 +1210 PRINT +1220 C1$ = "TO STOP ELIZA TYPE 'SHUT UP'" +1230 GOSUB 1030 +1240 C1$ = "(THIS VERSION WILL NOT RECORD YOUR CONVERSATIONS)" +1250 GOSUB 1030 +1260 C1$ = "(PLEASE SEND SUGGESTIONS FOR IMPROVEMENTS TO JOHN SCHUGG)" +1270 GOSUB 1030 +1280 PRINT "< PRESS RETURN TO CONTINUE...>" +1290 INPUT C1$ +1320 RETURN +1330 REM +1340 REM "---PROGRAM DATA FOLLOWS---"" +1350 REM +1360 REM "KEYWORDS:" +1370 REM +1380 DATA "CAN YOU","CAN I","YOU ARE","YOURE","I DONT","I FEEL" +1390 DATA "WHY DONT YOU","WHY CANT I","ARE YOU","I CANT","I AM","IM " +1400 DATA "YOU ","I WANT","WHAT","HOW","WHO","WHERE","WHEN","WHY" +1410 DATA "NAME","CAUSE","SORRY","DREAM","HELLO","HI ","MAYBE" +1420 DATA " NO","YOUR","ALWAYS","THINK","ALIKE","YES","FRIEND" +1430 DATA "COMPUTER","CAR","NOKEYFOUND" +1440 REM +1450 REM "---STRING DATA FOR CONJUGATIONS---" +1460 REM +1470 DATA " ARE "," AM ","WERE ","WAS "," YOU "," I ","YOUR ","MY " +1480 DATA " IVE "," YOUVE "," IM "," YOURE "," YOU "," ME " +1490 REM +1500 REM "----REPLIES----" +1510 REM +1520 DATA "DON'T YOU BELIEVE THAT I CAN*" +1530 DATA "PERHAPS YOU WOULD LIKE TO BE ABLE TO*" +1540 DATA "YOU WANT ME TO BE ABLE TO*" +1550 DATA "PERHAPS YOU DON'T WANT TO*" +1560 DATA "DO YOU WANT TO BE ABLE TO*" +1570 DATA "WHAT MAKES YOU THINK I AM*" +1580 DATA "DOES IT PLEASE YOU TO BELIEVE I AM*" +1590 DATA "PERHAPS YOU WOULD LIKE TO BE*" +1600 DATA "DO YOU SOMETIMES WISH YOU WERE*" +1610 DATA "DON'T YOU REALLY*" +1620 DATA "WHY DON'T YOU*" +1630 DATA "DO YOU WISH TO BE ABLE TO*" +1640 DATA "DOES THAT TROUBLE YOU?" +1650 DATA "TELL ME MORE ABOUT SUCH FEELINGS." +1660 DATA "DO YOU OFTEN FEEL*" +1670 DATA "DO YOU ENJOY FEELING*" +1680 DATA "DO YOU REALLY BELIEVE I DON'T*" +1690 DATA "PERHAPS IN GOOD TIME I WILL*" +1700 DATA "DO YOU WANT ME TO*" +1710 DATA "DO YOU THINK YOU SHOULD BE ABLE TO*" +1720 DATA "WHY CAN'T YOU*" +1730 DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*" +1740 DATA "WOULD YOU PREFER IF I WERE NOT*" +1750 DATA "PERHAPS IN YOUR FANTASIES I AM*" +1760 DATA "HOW DO YOU KNOW YOU CAN'T*" +1770 DATA "HAVE YOU TRIED?" +1780 DATA "PERHAPS YOU CAN NOW*" +1790 DATA "DID YOU COME TO ME BECAUSE YOU ARE*" +1800 DATA "HOW LONG HAVE YOU BEEN*" +1810 DATA "DO YOU BELIEVE IT IS NORMAL TO BE*" +1820 DATA "DO YOU ENJOY BEING*" +1830 DATA "WE WERE DISCUSSING YOU-- NOT ME." +1840 DATA "OH, I*" +1850 DATA "YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?" +1860 DATA "WHAT WOULD IT MEAN TO YOU IF YOU GOT*" +1870 DATA "WHY DO YOU WANT*" +1880 DATA "SUPPOSE YOU SOON GOT*" +1890 DATA "WHAT IF YOU NEVER GOT*" +1900 DATA "I SOMETIMES ALSO WANT*" +1910 DATA "WHY DO YOU ASK?" +1920 DATA "DOES THAT QUESTION INTEREST YOU?" +1930 DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?" +1940 DATA "WHAT DO YOU THINK?" +1950 DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?" +1960 DATA "WHAT IS IT THAT YOU REALLY WANT TO KNOW?" +1970 DATA "HAVE YOU ASKED ANYONE ELSE?" +1980 DATA "HAVE YOU ASKED SUCH QUESTIONS BEFORE?" +1990 DATA "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?" +2000 DATA "NAMES DON'T INTEREST ME." +2010 DATA "I DON'T CARE ABOUT NAMES-- PLEASE GO ON." +2020 DATA "IS THAT THE REAL REASON?" +2030 DATA "DON'T ANY OTHER REASONS COME TO MIND?" +2040 DATA "DOES THAT REASON EXPLAIN ANY THING ELSE?" +2050 DATA "WHAT OTHER REASONS MIGHT THERE BE?" +2060 DATA "PLEASE DON'T APOLOGIZE." +2070 DATA "APOLOGIES ARE NOT NECESSARY." +2080 DATA "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?" +2090 DATA "DON'T BE SO DEFENSIVE!" +2100 DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?" +2110 DATA "DO YOU DREAM OFTEN?" +2120 DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?" +2130 DATA "ARE YOU DISTURBED BY YOUR DREAMS?" +2140 DATA "HOW DO YOU DO--PLEASE STATE YOUR PROBLEM." +2150 DATA "YOU DON'T SEEM QUITE CERTAIN." +2160 DATA "WHY THE UNCERTAIN TONE?" +2170 DATA "CAN'T YOU BE MORE POSITIVE?" +2180 DATA "YOU AREN'T SURE?" +2190 DATA "DON'T YOU KNOW?" +2200 DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?" +2210 DATA "YOU ARE BEING A BIT NEGATIVE." +2220 DATA "WHY NOT?" +2230 DATA "ARE YOU SURE?" +2240 DATA "WHY NO?" +2250 DATA "WHY ARE YOU CONCERNED ABOUT MY*" +2260 DATA "WHAT ABOUT YOUR OWN*" +2270 DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?" +2280 DATA "WHEN?" +2290 DATA "WHAT ARE YOU THINKING OF?" +2300 DATA "REALLY, ALWAYS?" +2310 DATA "DO YOU REALLY THINK SO?" +2320 DATA "BUT YOU ARE NOT SURE YOU*" +2330 DATA "DO YOU DOUBT YOU*" +2340 DATA "IN WHAT WAY?" +2350 DATA "WHAT RESEMBLANCE DO YOU SEE?" +2360 DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?" +2370 DATA "WHAT OTHER CONNECTIONS DO YOU SEE?" +2380 DATA "COULD THERE REALLY BE SOME CONNECTION?" +2390 DATA "HOW?" +2400 DATA "YOU SEEM QUITE POSITIVE." +2410 DATA "ARE YOU SURE?" +2420 DATA "I SEE." +2430 DATA "I UNDERSTAND." +2440 DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?" +2450 DATA "DO YOUR FRIENDS WORRY YOU?" +2460 DATA "DO YOUR FRIENDS PICK ON YOU?" +2470 DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?" +2480 DATA "DO YOU IMPOSE ON YOUR FRIENDS?" +2490 DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU?" +2500 DATA "DO COMPUTERS WORRY YOU?" +2510 DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?" +2520 DATA "ARE YOU FRIGHTENED BY MACHINES?" +2530 DATA "WHY DO YOU MENTION COMPUTERS?" +2540 DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?" +2550 DATA "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?" +2560 DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?" +2570 DATA "OH, DO YOU LIKE CARS?" +2580 DATA "MY FAVORITE CAR IS A LAMBORGHINI COUNTACH. WHAT IS YOUR'S?" +2590 DATA "MY FAVORITE CAR COMPANY IS FERRARI. WHAT IS YOURS?" +2600 DATA "DO YOU LIKE PORSCHES?" +2610 DATA "DO YOU LIKE PORSCHE TURBO CARRERAS?" +2620 DATA "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?" +2630 DATA "WHAT DOES THAT SUGGEST TO YOU?" +2640 DATA "I SEE." +2650 DATA "I'M NOT SURE I UNDERSTAND YOU FULLY." +2660 DATA "COME COME ELUCIDATE YOUR THOUGHTS." +2670 DATA "CAN YOU ELABORATE ON THAT?" +2680 DATA "THAT IS QUITE INTERESTING." +2690 REM +2700 REM "---DATA FOR FINDING RIGHT REPLIES---" +2710 REM +2720 DATA 1,3,4,2,6,4,6,4,10,4,14,3,17,3,20,2,22,3,25,3 +2730 DATA 28,4,28,4,32,3,35,5,40,9,40,9,40,9,40,9,40,9,40,9 +2740 DATA 49,2,51,4,55,4,59,4,63,1,63,1,64,5,69,5,74,2,76,4 +2750 DATA 80,3,83,7,90,3,93,6,99,7,106,5,111,6 +2760 REM +2770 REM +2780 REM "LAST MOD. JULY 1979" +2790 REM +2800 REM "'ELIZA'" +2810 END diff --git a/data/examples/99testsBasic2/52eliza-org.bas.inp b/data/examples/99testsBasic2/52eliza-org.bas.inp new file mode 100644 index 0000000000000000000000000000000000000000..2c86fa4e2835cfd721bd58eefe0f5e2117414100 --- /dev/null +++ b/data/examples/99testsBasic2/52eliza-org.bas.inp @@ -0,0 +1,5 @@ + +I am bored +indeed +I feel weird +shut up diff --git a/data/examples/99testsBasic2/52eliza-org.bas.res b/data/examples/99testsBasic2/52eliza-org.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..94b3ad009e5dfea5105e5ec2e616033bd9f2155d --- /dev/null +++ b/data/examples/99testsBasic2/52eliza-org.bas.res @@ -0,0 +1,17 @@ + *** ELIZA *** + IN BASIC + MODIFIED FROM CYBER 175 AT UNIVERSITY OF ILLINOIS AT CHAMPAGNE + JOHN SCHUGG + JANUARY 1985 + HAVE ANY PROBLEMS ? + LET ELIZA HELP YOU ! + + TO STOP ELIZA TYPE 'SHUT UP' + (THIS VERSION WILL NOT RECORD YOUR CONVERSATIONS) + (PLEASE SEND SUGGESTIONS FOR IMPROVEMENTS TO JOHN SCHUGG) +< PRESS RETURN TO CONTINUE...> +? HI! I'M ELIZA. WHAT'S YOUR PROBLEM? +? DID YOU COME TO ME BECAUSE YOU ARE BORED +? SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS? +? TELL ME MORE ABOUT SUCH FEELINGS. +? IF THAT'S HOW YOU FEEL--GOODBY... diff --git a/data/examples/99testsBasic2/54word.bas b/data/examples/99testsBasic2/54word.bas new file mode 100644 index 0000000000000000000000000000000000000000..66f095b78dfd976ab2268caaf9fa0e4d875b8782 --- /dev/null +++ b/data/examples/99testsBasic2/54word.bas @@ -0,0 +1,69 @@ +2 REM "WORD FROM 101 BASIC GAMES" +3 REM "Ported by Stefan in 2022" +4 REM +5 DIM S(7),A(7),L(7),D(7),P(7) +10 PRINT "I AM THINKING OF A WORD -- YOU GUESS IT. I WILL GIVE YOU" +15 PRINT "CLUES TO HELP YOU GET IT. GOOD LUCK!!": PRINT +20 REM +30 PRINT "YOU ARE STARTING A NEW GAME..." +35 RESTORE +40 READ N +50 C=INT(RND(1)*N+1) +60 FOR I=1 TO C +70 READ S$ +80 NEXT I +90 G=0 +95 S0=LEN(S$) +100 FOR I=1 TO LEN(S$): S(I)=S$(I): NEXT I +110 FOR I=1 TO 5 +120 A(I)=45 +130 NEXT I +140 FOR J=1 TO 5 +144 P(J)=0 +146 NEXT J +150 PRINT "GUESS A FIVE LETTER WORD"; +160 INPUT L$ +162 T$=L$ +164 FOR I=1 TO LEN(T$) +166 IF (T$(I))>96 THEN L$(I)=(T$(I))-32 ELSE L$(I)=T$(I) +168 NEXT +170 G=G+1 +172 IF S$=G$ THEN 500 +173 FOR I=1 TO 7: P(I)=0: NEXT I +175 L0=LEN(L$) +180 FOR I=1 TO LEN(L$): L(I)=L$(I): NEXT I +190 IF L(1)=63 THEN 300 +200 IF L0<>5 THEN 400 +205 M=0: Q=1 +210 FOR I=1 TO 5 +220 FOR J=1 TO 5 +230 IF S(I)<>L(J) THEN 260 +231 P(Q)=L(J) +232 Q=Q+1 +233 IF I<>J THEN 250 +240 A(J)=L(J) +250 M=M+1 +260 NEXT J +265 NEXT I +270 A0=5 +272 P0=M +275 A$="": FOR I=1 TO A0: A$(I)=A(I): NEXT I +277 P$="": FOR I=1 TO P0: P$(I)=P(I): NEXT I +280 PRINT "THERE WERE",M,"MATCHES AND THE COMMON LETTERS WERE...";P$ +285 PRINT "FROM THE EXACT LETTER MATCHES, YOU KNOW................";A$ +286 IF A$=S$ THEN 500 +287 IF M>1 THEN 289 +288 PRINT: PRINT "IF YOU GIVE UP, TYPE '?' FOR YOUR NEXT GUESS." +289 PRINT +290 GOTO 150 +300 S$="": FOR I=1 TO 7: S$(I)=S(I): NEXT I +310 PRINT "THE SECRET WORD IS ";S$: PRINT +320 GOTO 30 +400 PRINT "YOU MUST GUESS A 5 LETTER WORD. START AGAIN." +410 PRINT: G=G-1: GOTO 150 +500 PRINT "YOU HAVE GUESSED THE WORD. IT TOOK",G,"GUESSES!": PRINT +510 INPUT "WANT TO PLAY AGAIN? ",Q$ +520 IF Q$="YES" OR Q$="yes" THEN 30 +530 DATA 12,"DINKY","SMOKE","WATER","GRASS","TRAIN","MIGHT","FIRST" +540 DATA "CANDY","CHAMP","WOULD","CLUMP","DOPEY" +999 END diff --git a/data/examples/99testsBasic2/54word.bas.inp b/data/examples/99testsBasic2/54word.bas.inp new file mode 100644 index 0000000000000000000000000000000000000000..bb495a322f47cd983fe7d1043eb45ed36c6363c8 --- /dev/null +++ b/data/examples/99testsBasic2/54word.bas.inp @@ -0,0 +1,3 @@ +SMOKE +DINKY +n diff --git a/data/examples/99testsBasic2/54word.bas.res b/data/examples/99testsBasic2/54word.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..eb6a11d422a29d4d85e5dfe0271d5dbe340ca422 --- /dev/null +++ b/data/examples/99testsBasic2/54word.bas.res @@ -0,0 +1,14 @@ +I AM THINKING OF A WORD -- YOU GUESS IT. I WILL GIVE YOU +CLUES TO HELP YOU GET IT. GOOD LUCK!! + +YOU ARE STARTING A NEW GAME... +GUESS A FIVE LETTER WORD? THERE WERE 1 MATCHES AND THE COMMON LETTERS WERE...K +FROM THE EXACT LETTER MATCHES, YOU KNOW................---K- + +IF YOU GIVE UP, TYPE '?' FOR YOUR NEXT GUESS. + +GUESS A FIVE LETTER WORD? THERE WERE 5 MATCHES AND THE COMMON LETTERS WERE...DINKY +FROM THE EXACT LETTER MATCHES, YOU KNOW................DINKY +YOU HAVE GUESSED THE WORD. IT TOOK 2 GUESSES! + +WANT TO PLAY AGAIN? \ No newline at end of file diff --git a/data/examples/99testsBasic2/55valtest.bas b/data/examples/99testsBasic2/55valtest.bas new file mode 100644 index 0000000000000000000000000000000000000000..cc61d0118b4dbe5e9c6427dd44498495d7f21f1f --- /dev/null +++ b/data/examples/99testsBasic2/55valtest.bas @@ -0,0 +1,6 @@ +10 A$="1234567890" +20 FOR I=1 TO 10 +30 PRINT A$(I),LEN(A$(I)),VAL(A$(I)),@V,@S +40 T$=MID$(A$,I) +50 PRINT T$,LEN(T$),VAL(T$),@V,@S +60 NEXT diff --git a/data/examples/99testsBasic2/55valtest.bas.res b/data/examples/99testsBasic2/55valtest.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..3ddb603c411bc3d68c46ef8028e267593124f744 --- /dev/null +++ b/data/examples/99testsBasic2/55valtest.bas.res @@ -0,0 +1,20 @@ +1234567890 10 1.23456E9 10 0 +1234567890 10 1.23456E9 10 0 +234567890 9 2.34567E8 9 0 +234567890 9 2.34567E8 9 0 +34567890 8 3.45678E7 8 0 +34567890 8 3.45678E7 8 0 +4567890 7 4567890 7 0 +4567890 7 4567890 7 0 +567890 6 567890 6 0 +567890 6 567890 6 0 +67890 5 67890 5 0 +67890 5 67890 5 0 +7890 4 7890 4 0 +7890 4 7890 4 0 +890 3 890 3 0 +890 3 890 3 0 +90 2 90 2 0 +90 2 90 2 0 +0 1 0 1 0 +0 1 0 1 0 diff --git a/data/examples/99testsBasic2/56tinybasic.bas b/data/examples/99testsBasic2/56tinybasic.bas new file mode 100644 index 0000000000000000000000000000000000000000..f97a003ba387f48229ffd3d068779f4e2f964e7b --- /dev/null +++ b/data/examples/99testsBasic2/56tinybasic.bas @@ -0,0 +1,381 @@ +10 REM "Tinybasic interpreter written in BASIC" +15 REM +20 REM "This code is written in Stefan's Arduino BASIC aks IoT Basic" +25 REM "It also runs on MS BASIC interpreters. Set LL to 0 for this" +30 REM "and remove the ()() and @V constructs." +35 REM "The interpreter implements Dr. Wang'S Palo Alto BASIC " +40 REM "See http://www.bitsavers.org/pdf/interfaceAge/197612/092-108.pdf for" +45 REM "On the implemented language." +50 REM +55 REM "Main components of this program:" +57 REM "GOSUB 11000: the lexer. It decomposes the string A$ into tokens." +60 REM " There is one token produced in T, C, C$ after each call until" +62 REM " the end of the line which is T=0." +65 REM "GOSUB 12000: the expression evaluation. This is a recursive decent" +67 REM " parser using a stack ST. In the end the result is on the stack." +70 REM "GOSUB 14000: the command code. For each command there is one section." +72 REM " At the end of the command a new token must be produced by calling" +75 REM " The lexer with GOSUB 11000." +77 REM "GOSUB 13xxx: helper routines for the stack, parser and line storage." +80 REM "30000: keywords. First data is the number of keywords." +82 REM "The input loop from 2000-6000 ties it all together." +85 REM +100 REM "****************** Parameters and declarations ********************" +110 NL=100: REM "Maximum number of lines" +120 AS=100: REM "Number of elements in the @() array" +130 SS=16: REM "The size of the arithmetic stack" +140 LL=80: REM "The line length, set to 0 if you run on MS BASIC dialects." +150 GD=4: REM "Maximum depth of GOSUB statements" +160 FM=4: REM "Maximum number of active FOR loops (nested)" +200 REM "The debug flag, settings are" +210 REM "0: no debug, 1: lexer debug, 2: expression debug, 4: command debug" +220 DE=0 +990 REM +1000 REM "*************** essential declarations and functions *************" +1002 REM +1005 REM "The token T, the accu X and the error E" +1010 T=0: X=0: E=0 +1015 REM "The command string C$ and the input buffer A$" +1020 IF LL>0 THEN DIM C$(LL), A$(LL), T$(LL) +1025 REM "Functions to handle character and case stuff" +1030 T=1: X=0: E=0: C$="" +1040 DEF FNNU(X)=(X=>48 AND X<=57) +1050 DEF FNAL(X)=(X>=65 AND X<=90) +1060 DEF FNUP(X)=X-ABS(X>=97 AND X<=122)*32 +1070 REM "The data arrays for variables and one array" +1080 DIM VA(26), AR(AS) +1090 REM "The stacks for numbers and operators" +1100 DIM ST(SS) +1110 SI=0 +1120 REM "functions of the interpreter" +1130 DEF FNTE(T)=(T=0 OR T=ASC(":")): REM "terminal symbol of a statement" +1200 REM "The program storage" +1210 DIM LN(NL) +1220 IF LL>0 THEN DIM LS$(LL, NL): GOTO 1240 +1230 DIM LS$(NL) +1240 REM "HEre is the current line, 0 if interactive." +1250 HE=0 +1260 REM "The tables for GOSUB and FOR with their indices GS and FS" +1270 DIM GH(GD), GI(GD): GS=0 +1280 DIM FV(FM), FE(FM), FD(FM), FH(FM), FI(FM): FS=0 +1995 REM +2000 REM "************************* input loop *****************************" +2010 INPUT "]", A$: I=1: IF A$="#" THEN END +2015 GOSUB 11000: REM "Input a line and get the first token" +2020 REM "first token a line number -> store it or delete it" +2030 IF T<>-127 THEN 5000 +2040 X=INT(X) +2050 T$=MID$(A$, I) +2055 REM "empty line, delete it" +2060 IF T$="" OR T$=" " THEN GOSUB 13500: GOTO 5800 +2065 REM "insert the line" +2070 GOSUB 13200: GOTO 5800 +5000 REM "no line number at the beginning, execute it, check on RUN first" +5010 REM "on RUN loop through the statements" +5020 IF T<>-104 THEN 5500 +5030 HE=1 +5040 IF LN(HE)=0 THEN GOTO 5800 +5045 REM "get the actual line and execute it" +5050 A$=LS$()(HE): I=1: GOSUB 11000 +5060 GOSUB 14000 +5065 IF E<>0 THEN 5800 +5070 IF T=-107 THEN PRINT "Stop at", LN(HE): GOTO 5800 +5080 IF T=0 THEN HE=HE+1: GOTO 5040 +5100 GOTO 5060 +5495 REM "The interactive loop, no line fetching" +5500 GOSUB 14000: IF T<>0 GOTO 5500 +5800 REM "Catch the error and get more input" +5810 IF E<>0 THEN SP=1: I=1: A$="": GS=0: FS=0: E=0 +5995 GOTO 2000 +11000 REM "******* the lexer, generates a token stream in T, X, C$ ********" +11005 REM +11010 T=0: X=0: C$="" +11020 IF I>LEN(A$) THEN 11400 +11030 C$=MID$(A$, I, 1): C=ASC(C$): C=FNUP(C): C$=CHR$(C) +11040 REM "a whitespace is skipped" +11050 IF C$=" " THEN I=I+1: GOTO 11010 +11060 REM "a number - uses a BASIC special feature @V " +11070 IF FNNU(C) THEN T$=MID$(A$, I): X=VAL(T$): I=I+@V: T=-127: GOTO 11400 +11080 REM "a string constant" +11090 IF C<>34 THEN 11200 +11100 J=I +11110 I=I+1: IF MID$(A$, I, 1)<>CHR$(34) AND I1 THEN RETURN +11420 PRINT "** lex delivered token ",T, MID$(A$, I) +11430 RETURN +12000 REM "*************** the expression evaluator **********************" +12005 REM +12010 REM "this is a classical recursive decent parser, using an own stack" +12020 REM "as BASIC has no local variables" +12025 REM +12030 REM "*** entry point for the expression - compare" +12040 GOSUB 12200: REM "Call addition" +12050 IF T<>ASC("=") THEN 12070 +12060 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X=Y): GOSUB 13050 +12070 IF T<>ASC("#") AND T<>-119 THEN 12090 +12080 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X<>Y): GOSUB 13050 +12090 IF T<>ASC(">") THEN 12110 +12100 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X>Y): GOSUB 13050 +12110 IF T<>ASC("<") THEN 12130 +12120 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X-121 THEN 12150 +12140 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X>=Y): GOSUB 13050 +12150 IF T<>-120 THEN 12170 +12160 GOSUB 11000: GOSUB 12000: GOSUB 13030: Y=X: GOSUB 13030: X=(X<=Y): GOSUB 13050 +12170 RETURN +12200 REM "*** additions of all kind" +12210 IF T<>ASC("+") AND T<>ASC("-") THEN GOSUB 12300: GOTO 12230 +12220 X=0: GOSUB 13050: REM "Push a zero" +12230 IF T<>ASC("+") THEN 12250 +12240 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030 +12245 X=(Y+X): GOSUB 13050: GOTO 12230 +12250 IF T<>ASC("-") THEN 12270 +12260 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030 +12265 X=(X-Y): GOSUB 13050: GOTO 12230 +12270 IF NOT DE THEN RETURN +12280 PRINT "** after add, token", T, "stack is ": GOSUB 13060 +12290 RETURN +12300 REM "*** the term evaluation handles multiplication" +12310 GOSUB 12400 +12320 GOSUB 11000 +12330 IF T<>ASC("*") THEN 12350 +12340 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: X=X*Y: GOSUB 13050 +12350 IF T<>ASC("/") THEN 12370 +12360 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: IF Y=0 THEN E=-1: Y=1 +12365 X=X/Y: GOSUB 13050 +12370 IF T<>ASC("%") THEN 12390 +12380 GOSUB 11000: GOSUB 12300: GOSUB 13030: Y=X: GOSUB 13030: IF Y=0 THEN E=-1: Y=1 +12385 X=X%Y: GOSUB 13050 +12390 RETURN +12400 REM "*** the factor evaluation never calls nexttoken" +12410 IF T=-127 THEN GOSUB 13040: GOTO 12900: REM "a plain number" +12420 IF T=-124 THEN X=VA(C-64): GOSUB 13040: GOTO 12900: REM "a variable" +12430 IF T<>ASC("(") THEN 12480: REM "an expression in brackets" +12450 GOSUB 11000: GOSUB 12000: IF E GOTO 12900 +12460 IF T<>ASC(")") THEN E=-1 +12470 GOTO 12900 +12480 IF T<>-103 THEN 12510: REM "the ABS function" +12490 GOSUB 11000: GOSUB 12430 +12500 GOSUB 13030: X=ABS(X): GOSUB 13040: GOTO 12900 +12510 IF T<>-102 THEN 12540: REM "the RND function" +12520 GOSUB 11000: GOSUB 12430 +12530 GOSUB 13030: X=RND(X): GOSUB 13040: GOTO 12900 +12540 IF T<>-101 THEN 12560: REM "the SIZE constant" +12550 X=42: GOSUB 13040: GOTO 12900 +12560 IF T<>"@" THEN 12600: REM "the array" +12570 GOSUB 11000: GOSUB 12430 +12580 GOSUB 13030: IF X<1 OR X>100 THEN PRINT "ARRAY ERROR": E=-1: GOTO 12900 +12590 X=AR(X): GOSUB 13050 +12600 REM "this is the place where one could add more functions and constants" +12900 REM "The debug and error hook of factor" +12910 IF DE<>2 THEN RETURN +12920 PRINT "** after factor, token", T, "stack is ": GOSUB 13060 +12922 PRINT "** cursor position is", I +12990 RETURN +13000 REM "*********** helpers of the parser and the interpreter ***************" +13020 REM "pop data from the stack" +13030 IF SI>0 THEN X=ST(SI): SI=SI-1: GOTO 13060 +13035 PRINT "STACK ERROR": END +13040 REM "push data on the stack" +13050 IF SI0 THEN 13400 +13230 F=1 +13240 IF LN(F)0 AND F0 AND T<>ASC(":") THEN 13610 +13620 RETURN +13700 REM "check if FOR already exists, purge the FOR stack then" +13710 IF FS=1 THEN RETURN +13720 FOR F=FS-1 TO 1 STEP -1 +13730 IF FV(FS)=FV(F) THEN 13760 +13740 NEXT +13750 RETURN +13760 FD(F)=FD(FS): FE(F)=FE(FS): FH(F)=FH(FS): FI(F)=FI(FS) +13770 FOR K=FM TO FS+1: FV(K)=0: NEXT : REM "delete all inner loops" +13780 RETURN +14000 REM "*********** statements are parsed here ************************" +14010 REM +14015 REM "******** PRINT *********" +14020 IF T<>-118 THEN 14200 +14030 GOSUB 11000: IF E<>0 THEN RETURN +14040 IF T=-125 THEN PRINT C$;: GOSUB 11000: GOTO 14070 +14050 IF FNTE(T) THEN GOSUB 11000: GOTO 14080 +14060 GOSUB 12000: GOSUB 13030: PRINT X; +14070 IF T=ASC(",") OR T=ASC(";") THEN 14030 +14080 PRINT: RETURN +14195 REM "********* LET **********" +14200 IF T<>-117 AND T<>ASC("@") AND T<>-124 THEN 14400 +14210 IF T=-117 THEN GOSUB 11000: IF T<>ASC("@") AND T<>-124 THEN E=-1: RETURN +14220 T0=T: C0=C : REM "Remember if we deal with a variable or an array as left hand side" +14230 GOSUB 11000: IF T0<>ASC("@") THEN 14240 +14235 IF T<>ASC("(") THEN PRINT "ERROR": E=-1: RETURN +14237 GOSUB 11000: GOSUB 12000: GOSUB 13030: X0=X: IF T<>ASC(")") THEN E=-1: RETURN +14238 GOSUB 11000 +14240 IF E OR T<>ASC("=") THEN E=-1: RETURN +14250 GOSUB 11000: GOSUB 12000: GOSUB 13030 +14260 IF T0=-124 THEN VA(C0-64)=X: GOTO 14290 +14270 IF X0<1 OR X0>AS THEN E=-1: RETURN +14280 AR(X0)=X +14290 GOSUB 11000: RETURN +14395 REM "********* INPUT ********" +14400 IF T<>-116 THEN 14600 +14410 GOSUB 11000 +14420 IF T=-125 THEN PRINT C$; : GOSUB 11000 +14430 IF T=-124 THEN INPUT X: VA(C-64)=X: GOSUB 11000 +14440 IF T=ASC(",") THEN 14410 +14450 IF FNTE(T) THEN RETURN +14460 E=-1: RETURN +14595 REM "********* GOTO *********" +14600 IF T<>-115 THEN 14800 +14610 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +14620 GOSUB 13030: GOSUB 13100: REM "Try to find the line" +14630 IF F=0 THEN PRINT "Line not found in ", HE: E=-1: RETURN +14640 HE=F: I=1: A$=LS$()(HE): GOSUB 11000: RETURN +14795 REM "********* GOSUB *********" +14800 IF T<>-114 THEN 15000 +14810 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +14820 GOSUB 13030: GOSUB 13100: REM "Try to find the line" +14830 IF F=0 THEN PRINT "Line not found in ", HE: E=-1: RETURN +14840 IF GS=GD THEN PRINT "Gosub error": E=-1: RETURN +14850 GS=GS+1: GH(GS)=HE: GI(GS)=I: I=1: HE=F: A$=LS$()(HE): GOSUB 11000 +14860 RETURN +14995 REM "********* RETURN *********" +15000 IF T<>-113 THEN 15200 +15010 IF GS=0 THEN PRINT "Return error": E=-1: RETURN +15015 PRINT GS +15020 HE=GH(GS): I=GI(GS): GS=GS-1: A$=LS$()(HE): GOSUB 11000 +15030 RETURN +15195 REM "********* IF *********" +15200 IF T<>-112 THEN 15400 +15210 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15220 GOSUB 13030 +15230 IF NOT X THEN T=0: I=LEN(A$): REM "if goes to the end of line" +15260 RETURN +15395 REM "********* FOR, TO, STEP *********" +15400 IF T<>-111 THEN 15800 +15410 IF FS=FM THEN PRINT "For error": E=-1: RETURN +15420 FS=FS+1 +15430 GOSUB 11000 +15440 IF T<>-124 THEN E=-1: RETURN +15450 FV(FS)=C: CF=C: GOSUB 11000 +15460 IF T<>ASC("=") THEN E=-1: RETURN +15470 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15480 GOSUB 13030: VA(CF-64)=X +15490 IF T<>-110 THEN E=-1: RETURN +15500 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15510 GOSUB 13030: FE(FS)=X +15520 X=1 +15530 IF T<>-109 THEN 15550 +15540 GOSUB 11000: GOSUB 12000: IF E<>0 THEN RETURN +15545 GOSUB 13030 +15550 FD(FS)=X +15560 IF DE=4 THEN PRINT "** for complete", FV(FS), FD(FS), FE(FS) +15595 REM "All data for the FOR is complete here" +15600 GOSUB 13700 : REM "Order FOR stack correctly!!" +15610 REM "Condition fullfilled, skip to NEXT" +15620 IF FD(FS)>0 AND FE(FS)VA(CF-64) THEN FS=FS-1: GOTO 15700 +15640 REM "Remember this location" +15650 FH(FS)=HE: FI(FS)=I: IF DE=4 THEN PRINT "** for location", FI(FS), FH(FS) +15660 RETURN +15700 REM "Find the next" +15710 GOSUB 11000: IF T<>-108 AND T<>0 GOTO 15710 +15720 IF T=-108 THEN GOSUB 11000: RETURN +15730 HE=HE+1: IF LN(HE)<>0 THEN A$=LS$()(HE): I=1: GOTO 15710 +15740 PRINT "Next error": E=-1 +15750 RETURN +15795 REM "********* NEXT *********" +15800 IF T<>-108 THEN 16000 +15810 IF FS=0 THEN PRINT "Next error": E=-1: RETURN +15820 CF=FV(FS): VA(CF-64)=VA(CF-64)+FD(FS) +15825 IF DE=4 THEN PRINT "** next executed", FV(FS), FD(FS), FE(FS), FI(FS), FH(FS) +15830 IF FD(FS)>0 AND FE(FS)VA(CF-64) THEN 15870 +15850 I=FI(FS): HE=FH(FS): IF HE>0 THEN A$=LS$()(HE) +15860 GOSUB 11000: RETURN +15870 FV(FS)=0: FS=FS-1: GOSUB 11000: REM "Clean up the variable field!" +15880 RETURN +15995 REM "********* STOP ********* (handled in loop)" +16000 IF T<>-107 THEN 16200 +16010 RETURN +16195 REM "********* LIST *********" +16200 IF T<>-106 THEN 16400 +16210 GOSUB 11000 +16220 FOR K=1 TO NL +16230 IF LN(K)<>0 THEN PRINT LN(K); LS$()(K) +16240 NEXT +16250 RETURN +16395 REM "********* NEW *********" +16400 IF T<>-105 THEN 16600 +16410 GOSUB 11000 +16420 FOR K=1 TO NL: LN(K)=0: LS$()(K)="": NEXT +16430 RETURN +16595 REM "********* RUN ********* (handled in loop)" +16600 IF T<>-104 THEN 16800 +16610 GOSUB 11000: RETURN +16795 REM "********* REM *********" +16800 IF T<>-100 THEN 17000 +16810 T=0: I=LEN(A$): RETURN +16695 REM "******** LOAD *********" +17000 IF T<>-99 THEN 17200 +17010 GOSUB 11000: PRINT "not implemented": RETURN +17195 REM "******** SAVE *********" +17200 IF T<>-98 THEN 17400 +17210 GOSUB 11000: PRINT "not implemented": RETURN +17395 REM "********* : ***********" +17400 IF T<>":" THEN 17500 +17410 GOSUB 11000: RETURN +17500 IF T=0 THEN RETURN +17510 REM "******** Syntax Error *********" +17520 PRINT "Syntax Error": E=-1: RETURN +19995 RETURN +30000 REM "********* the keyword storage with the token values *************" +30010 DATA 24 +30020 DATA ">=",-121,"<=",-120,"<>",-119 +30030 DATA "print",-118,"let",-117,"input",-116,"goto",-115 +30040 DATA "gosub",-114, "return", -113, "if",-112 +30050 DATA "for", -111, "to", -110, "step", -109, "next", -108 +30060 DATA "stop", -107, "list", -106, "new", -105, "run", -104 +30070 DATA "abs", -103, "rnd", -102, "size", -101, "rem", -100 +30080 DATA "load", -99, "save", -98 + diff --git a/data/examples/99testsBasic2/56tinybasic.bas.inp b/data/examples/99testsBasic2/56tinybasic.bas.inp new file mode 100644 index 0000000000000000000000000000000000000000..d16745bc16eb4a2fe51471bc36b5bbeab6d90151 --- /dev/null +++ b/data/examples/99testsBasic2/56tinybasic.bas.inp @@ -0,0 +1,11 @@ +10 print "hello" +20 input a +25 if a=0 stop +30 for i=1 to a +40 print i, " ", i*i +50 next +list +run +5 +# + diff --git a/data/examples/99testsBasic2/56tinybasic.bas.res b/data/examples/99testsBasic2/56tinybasic.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..1b44aaa61dd667d0a8c1f724c1ef5502b5c7ab6e --- /dev/null +++ b/data/examples/99testsBasic2/56tinybasic.bas.res @@ -0,0 +1,13 @@ +]]]]]]]10 print "hello" +20 input a +25 if a=0 stop +30 for i=1 to a +40 print i, " ", i*i +50 next +]hello +? 1 1 +2 4 +3 9 +4 16 +5 25 +] \ No newline at end of file diff --git a/data/examples/99testsBasic2/57multifunc.bas b/data/examples/99testsBasic2/57multifunc.bas new file mode 100644 index 0000000000000000000000000000000000000000..5cac70c59c3f5bada86e458ca29f0eb27b4215f8 --- /dev/null +++ b/data/examples/99testsBasic2/57multifunc.bas @@ -0,0 +1,22 @@ +10 REM "Function multiline definitions" +20 REM "" +100 DEF FNS(X)=X*X +110 DEF FNT(X) +120 RETURN X*X*X +130 FEND +140 DEF FNQ(X) +150 RETURN FNS(X)*X +160 FEND +170 DEF FNR(X) +180 PRINT FNQ(X) +190 FEND +200 READ N +210 PRINT "The square of",N," is: "; FNS(N) +220 PRINT "X is",X +230 PRINT "The cube of",N," is: "; FNT(N) +240 PRINT "This can be done like this as well: "; FNQ(N) +250 PRINT "Or even like this: ";: FNR(N) +300 REM "Odd stuff" +310 PRINT "Prints ";: A=FNR(): PRINT "Returns: ",A +320 FNQ(9): FNS(11): FNT(13) +500 DATA 10 diff --git a/data/examples/99testsBasic2/57multifunc.bas.res b/data/examples/99testsBasic2/57multifunc.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..2333658d5637d9b1b12d1dc7f4a3f8faa3b8f497 --- /dev/null +++ b/data/examples/99testsBasic2/57multifunc.bas.res @@ -0,0 +1,7 @@ +The square of 10 is: 100 +X is 0 +The cube of 10 is: 1000 +This can be done like this as well: 1000 +Or even like this: 1000 +Prints 0 +Returns: 0 diff --git a/data/examples/99testsBasic2/58longnames.bas b/data/examples/99testsBasic2/58longnames.bas new file mode 100644 index 0000000000000000000000000000000000000000..b372031a2dc642ddb9e7f32484748837d3f7d3f2 --- /dev/null +++ b/data/examples/99testsBasic2/58longnames.bas @@ -0,0 +1,13 @@ +10 REM "Long names test program" +100 alpha=10 +110 a=19 +120 print a, "is not", alpha +200 name$="stefan" +210 na$="steve" +220 print name$, "is not", na$ +300 dim squares(10) +310 for number=1 to 10: squares(number)=number*number: next +320 for number=1 to 10 +330 print number, squares(number), "is not", sq(number) +340 next + diff --git a/data/examples/99testsBasic2/58longnames.bas.res b/data/examples/99testsBasic2/58longnames.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..857f3ae9996e6c25678a92240246e26ee614ae3a --- /dev/null +++ b/data/examples/99testsBasic2/58longnames.bas.res @@ -0,0 +1,12 @@ +19 is not 10 +stefan is not steve +1 1 is not 0 +2 4 is not 0 +3 9 is not 0 +4 16 is not 0 +5 25 is not 0 +6 36 is not 0 +7 49 is not 0 +8 64 is not 0 +9 81 is not 0 +10 100 is not 0 diff --git a/data/examples/99testsBasic2/59trek.bas b/data/examples/99testsBasic2/59trek.bas new file mode 100644 index 0000000000000000000000000000000000000000..b98c3cc3466f82b5830d4ae57c74e69bf10c83b5 --- /dev/null +++ b/data/examples/99testsBasic2/59trek.bas @@ -0,0 +1,135 @@ + 1 REM "IoT BASIC settings for compatibility with Palo Alto TinyBASIC" + 2 SET 12,0: SET 17,1: REM "array limit 0, Boolean true 1" + 3 SET 18,1: SET 19,1: REM "Integer Mode, Random base 1" + 4 REM "Preallocate memory for all variables tp protect @ from being overwritten" + 5 DIM A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z + 9 Y=2999 : INPUT "DO YOU WANT A DIFFICULT GAME (Y OR N)? ",A + 10 PRINT "STARDATE 3200: YOUR MISSION IS ",: IF A=Y THEN Y=999 + 15 K=0:B=0:D=30:FOR I=0 TO 63:J=RND(99)<5:B=B+J + 20 M=RND(Y):M=(M<209)+(M<99)+(M<49)+(M<24)+(M<9)+(M<2):K=K+M + 25 @(I)=-100*M-10*J-RND(8):NEXT I:IF(B<2)+(K<4) GOTO 15 + 30 PRINT "TO DESTROY ",#1,K," KLINGONS IN 30 STARDATES." + 35 PRINT "THERE ARE ",#1,B," STARBASES.":GOSUB 160:C=0:H=K + 40 U=RND(8):V=RND(8):X=RND(8):Y=RND(8) + 45 FOR I=71 TO 152: @(I)=0: NEXT I :@(8*X+Y+62)=4: M=ABS(@(8*U+V-9)):N=M/100 + 50 I=1: IF N THEN FOR J=1 TO N:GOSUB 165: @(J+134)=300: @(J+140)=S: @(J+146)=T: NEXT J + 55 GOSUB 175: M=M-100*N: I=2: IF M/10 GOSUB 165 + 60 M=M-M/10*10: I=3: IF M THEN FOR J=1 TO M: GOSUB 165: NEXT J + 65 GOSUB 145: GOSUB 325:IF K GOTO 95 + 70 PRINT: PRINT "MISSION ACCOMPLISHED. ": IF D<3 PRINT "BOY, YOU BARELY MADE IT." + 75 IF D>5 PRINT "GOOD WORK...": IF D>9 PRINT "FANTASTIC! ": IF D>13 PRINT "UNBELIEVABLE!" + 80 D=30-D: I=H*100/D*10: PRINT #1,H," KLINGONS IN ",D," STARDATES. (",I,")" + 85 J=100*(C=0)-5*C:PRINT #1,C," CASUALTIES INCURRED. (",J,")" + 90 PRINT "YOUR SCORE:",I+J:GOTO 110 + 95 IF D<0 PRINT "IT'S TOO LATE, THE FEDERATION HAS BEEN CONQUERED.":GOTO 110 + 100 IF E>=0 GOTO 120 + 105 PRINT "ENTERPRISE DESTROYED":IF H-K>9 PRINT " BUT YOU WERE A GOOD MAN" + 110 Y=987: PRINT: INPUT "ANOTHERE GAME (Y OR N)? ",A:IF A=Y GOTO 5 + 115 PRINT "GOOD BYE.": STOP + 120 S=220: G=180: L=200: P=260: R=420: W=465: T=555: INPUT "CAPTAIN? ",A + 125 IF (A=S)+(A=G)+(A=L)+(A=P)+(A=R)+(A=W)+(A=T) GOTO A + 130 PRINT "R=REPORT S=SR. SENSOR L=LR. SENSOR" + 135 PRINT "G=GALAXY MAP P=PHASER T=TORPEDO" + 140 PRINT "W=WARP ENGINE **PLEASE USE ONE OF THESE COMMANDS***":GOTO 120 + 145 FOR I=X-(X>1) TO X+(X<8): FOR J=Y-(Y>1) TO Y+(Y<8) + 150 IF @(8*I+J+62)<>2 :NEXT J: NEXT I: O=0: RETURN + 155 IF O=0 PRINT "SULU: CAPTAIN, WE ARE DOCKED AT STARBASE." + 160 E=4000:F=10:O=1:FOR I=64 TO 70:@(I)=0: NEXT I: RETURN + 165 S=RND(8):T=RND(8):A=8*S+T+62:IF @(A) GOTO 165 + 170 @(A)=I: RETURN + 175 PRINT "ENTERPRISE IN Q-",#1,U,V," S-",X,Y: RETURN + 180 GOSUB 175:J=2:GOSUB 375: IF I GOTO 120 + 185 PRINT " OF GALAXY MAP";: FOR I=0 TO 7:PRINT :PRINT #1,I+1,":",:FOR J=0 TO 7:M=@(8*I+J) + 190 PRINT #6,(M>0)*M,:NEXT J:PRINT :NEXT I:PRINT " ";:FOR I=0 TO 7:PRINT " ..",:NEXT I:PRINT + 195 PRINT " ";:FOR I=1TO8:PRINT #4,I,:NEXT I:PRINT :PRINT :GOTO 120 + 200 GOSUB 175:J=3:GOSUB 375:IF I GOTO 120 + 205 PRINT: FOR I=U-1 TO U+1: FOR J=V-1 TO V+1:M=8*I+J-9:A=0 + 210 IF (I>0)*(I<9)*(J>0)*(J<9) THEN A=ABS(@(M)):@(M)=A + 215 PRINT #4,A,:NEXT J:PRINT :NEXT I: GOTO 120 + 220 GOSUB 175: J=1: GOSUB 375: IF I GOTO 120 + 225 M=8*U+V-9: @(M)=ABS(@(M)) + 230 PRINT: FOR I=1 TO 8: PRINT #1,I,:FOR J=1 TO 8:M=@(8*I+J+62):IF M=0 PRINT " .", + 235 IF M=1 PRINT " K", + 240 IF M=2 PRINT " B", + 245 IF M=3 PRINT " *", + 250 IF M=4 PRINT " E", + 255 NEXT J:PRINT: NEXT I: PRINT " ",: FOR I=1TO8: PRINT #2,I,:NEXT I:PRINT:GOTO 120 + 260 J=4:GOSUB 375: IF I GOTO 120 + 265 INPUT " ENERGIZED. UNITS TO FIRE? ",A:IF A<1 GOTO 120 + 270 IF A>E PRINT "SPOCK: WE HAVE ONLY ",#1,E," UNITS.": GOTO 120 + 275 E=E-A: IF N<1 PRINT "PHASER FIRED AT EMPTY SPACE.": GOTO 65 + 280 A=A/N: FOR M=135 TO 140: IF @(M)=0 GOTO 290 + 285 GOSUB 295: PRINT #3,S," UNITS HIT ",:GOSUB 305 + 290 NEXT M: GOTO 65 + 295 IF A>1090 PRINT "...OVERLOADED..": J=4: @(67)=1: A=9: GOSUB 375 + 300 I=@(M+6)-X: J=@(M+12)-Y: S=A*30/(30+I*I+J*J)+1: RETURN + 305 PRINT "KLINGON AT S-",#1,@(M+6),@(M+12),:@(M)=@(M)-S + 310 IF @(M)>0 PRINT " **DAMAGED**": RETURN + 315 @(M)=0:I=8*U+V-9:J=@(I)/ABS(@(I)):@(I)=@(I)-100*J:K=K-1 + 320 I=8*@(M+6)+@(M+12)+62:@(I)=0:N=N-1:PRINT " ***DESTROYED***": RETURN + 325 IF N=0 RETURN + 330 PRINT "KLINGON ATTACK":IF O THEN PRINT "STARBASE PROTECTS ENTERPRISE": RETURN + 335 T=0: FOR M=135 TO 140: IF @(M)=0 GOTO 350 + 340 A=(@(M)+RND(@(M)))/2:GOSUB 295:T=T+S:I=@(M+6):J=@(M+12) + 345 PRINT #3,S," UNITS HIT FROM KLINGON AT S-",#1,I,J + 350 NEXT M:E=E-T:IF E<=0 PRINT "*** BANG ***": RETURN + 355 PRINT #1,E," UNITS OF ENERGY LEFT.": IF RND(E/4)>T RETURN + 360 IF @(70)=0 THEN @(70)=RND(T/50+1): J=7: GOTO 375 + 365 J=RND(6): @(J+63)=RND(T/99+1)+@(J+63): I=RND(8)+1: C=C+I + 370 PRINT "MC COY: SICKBAY TO BRIDGE, WE SUFFERED",#2,I," CASUALTIES." + 375 I=@(J+63): IF J=1 PRINT "SHORT RANGE SENSOR", + 380 IF J=2 PRINT "COMPUTER DISPLAY", + 385 IF J=3 PRINT "LONG RANGE SENSOR", + 390 IF J=4 PRINT "PHASER", + 395 IF J=5 PRINT "WARP ENGINE", + 400 IF J=6 PRINT "PHOTON TORPEDO TUBES", + 405 IF J=7 PRINT "SHIELD", + 410 IF I=0 RETURN + 415 PRINT " DAMAGED, ",#1,I," STARDATES ESTIMATED FOR REPAIR": RETURN + 420 PRINT "STATUS REPORT:":PRINT "STARDATE",#10,3230-D:PRINT "TIME LEFT",#7,D + 425 PRINT "CONDITION ",:IF O PRINT "DOCKED":GOTO 445 + 430 IF N PRINT "RED": GOTO 445 + 435 IF E<999 PRINT "YELLOW": GOTO 445 + 440 PRINT "GREEN " + 445 PRINT "POSITION Q-",#1,U,V," S-",X,Y:PRINT "ENERGY",#12,E + 450 PRINT "TORPEDOES",#7,F:PRINT "KLINGONS LEFT",#3,K:PRINT "STARBASES",#6,B + 455 FOR J=1 TO 7: IF @(J+63) GOSUB 375 + 460 NEXT J:GOTO 120 + 465 J=5:GOSUB 375:IF I=0 PRINT + 470 INPUT "SECTOR DISTANCE? ",W:IF W<1 GOTO 120 + 475 IF I*(W>2) THEN PRINT "CHEKOV: WE CAN TRY 2 AT MOST, SIR.":GOTO 470 + 480 IF W>91 THEN W=91:PRINT "SPOCK: ARE YOU SURE, CAPTAIN?" + 485 IF E0):NEXT M + 505 P=45*X+22:G=45*Y+22:W=45*W:FOR M=1TO8:W=W-R:IF W<-22 GOTO 525 + 510 P=P+S: G=G+T: I=P/45: J=G/45: IF(I<1)+(I>8)+(J<1)+(J>8)GOTO 530 + 515 IF @(8*I+J+62)=0 THEN X=I: Y=J: NEXT M + 520 PRINT "**EMERGENCY STOP**":PRINT " SPOCK: TO ERR IS HUMAN. " + 525 @(8*X+Y+62)=4:GOSUB 175:GOTO 65 + 530 P=U*72+P/5+W/5*S/R-9: U=P/72: G=V*72+G/5+W/5*T/R-9: V=G/72 + 535 IF RND(9)<2 PRINT "***SPACE STORM***":T=100:GOSUB 360 + 540 IF (U>0)*(U<9)*(V>0)*(V<9)X=(P+9-72*U)/9: Y=(G+9-72*V)/9: GOTO 45 + 545 PRINT "**YOU WANDERED OUTSIDE THE GALAXY** " + 550 PRINT "ON BOARD COMPUTER TAKES OVER, AND SAVED YOUR LIFE": GOTO 40 + 555 J=6: GOSUB 375: IF I GOTO 120 + 560 IF F=0 PRINT " EMPTY": GOTO 120 + 565 PRINT " LOADED": GOSUB 615: IF R=0 GOTO 120 + 570 PRINT "TORPEDO TRACK ",:F=F-1:P=45*X+22:G=45*Y+22:FOR M=1 TO 8 + 575 P=P+S: G=G+T: I=P/45:J=G/45: IF(I<1)+(I>8)+(J<1)+(J>8) GOTO 585 + 580 L=8*I+J+62: W=8*U+V-9: R=@(W)/ABS(@(W)): PRINT #1,I,J," ",:GOTO 585+5*@(L) + 585 NEXT M:PRINT "...MISSED":GOTO 65 + 590 S=RND(99)+280:FOR M=135 TO 140: IF(@(M+6)=I)*(@(M+12)=J) GOSUB 305 + 592 NEXT M:GOTO 65 + 595 B=B-1: @(L)=0: @(W)=@(W)-10*R: PRINT "STARBASE DESTROYED" + 597 PRINT "SPOCK: I OFTEN FIND HUMAN BEHAVIOUR FASCINATING. ": GOTO 65 + 600 PRINT "HIT A STAR":IF RND(9)<3 PRINT " TORPEDO ABSORBED":GOTO 65 + 605 @(L)=0:@(W)=@(W)-R:IFRND(9)<6PRINT " STAR DESTROYED":GOTO 65 + 610 T=300:PRINT "HIT NOVAS ***RADIATION ALARM***":GOSUB 360 :GOTO 65 + 615 INPUT "COURSE (0-360)? ",I:IF(I>360)+(I<0)THEN R=0: RETURN + 620 S=(I+45)/90: I=I-S*90: R=(45+I*I)/110+45: GOTO 625+5*(S<4)*S + 625 S=-45: T=I: RETURN + 630 S=I: T=45: RETURN + 635 S=45: T=-I: RETURN + 640 S=-I: T=-45: RETURN diff --git a/data/examples/99testsBasic2/59trek.bas.inp b/data/examples/99testsBasic2/59trek.bas.inp new file mode 100644 index 0000000000000000000000000000000000000000..c4a8fa5d4a311f626022ee211b3021307cdf9a91 --- /dev/null +++ b/data/examples/99testsBasic2/59trek.bas.inp @@ -0,0 +1,11 @@ +n +s +w +10 +150 +s +t +180 +s +# + diff --git a/data/examples/99testsBasic2/59trek.bas.res b/data/examples/99testsBasic2/59trek.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..398f2a1ec12e7493d13f86f7955a37531677734d --- /dev/null +++ b/data/examples/99testsBasic2/59trek.bas.res @@ -0,0 +1,46 @@ +DO YOU WANT A DIFFICULT GAME (Y OR N)? STARDATE 3200: YOUR MISSION IS TO DESTROY 19 KLINGONS IN 30 STARDATES. +THERE ARE 4 STARBASES. +ENTERPRISE IN Q- 6 2 S- 2 1 +CAPTAIN? ENTERPRISE IN Q- 6 2 S- 2 1 +SHORT RANGE SENSOR +1 . . . * . * . . +2 E * . * . . . . +3 . . . . . . . . +4 . . . . . . . . +5 . . . . . . * . +6 . . . . . . . . +7 . . . . . . * * +8 . . . . . . . . + 1 2 3 4 5 6 7 8 +CAPTAIN? WARP ENGINE +SECTOR DISTANCE? COURSE (0-360)? ***SPACE STORM*** +SHIELD DAMAGED, 1 STARDATES ESTIMATED FOR REPAIR +ENTERPRISE IN Q- 7 2 S- 2 7 +KLINGON ATTACK +106 UNITS HIT FROM KLINGON AT S- 8 7 +3844 UNITS OF ENERGY LEFT. +CAPTAIN? ENTERPRISE IN Q- 7 2 S- 2 7 +SHORT RANGE SENSOR +1 . . . . . . * . +2 * . . . . . E . +3 . . . . . . . * +4 . . . . . . . * +5 . * . . . . . . +6 . . . . . . . . +7 . . . . . . . * +8 . . * . . . K * + 1 2 3 4 5 6 7 8 +CAPTAIN? PHOTON TORPEDO TUBES LOADED +COURSE (0-360)? TORPEDO TRACK 3 7 4 7 5 7 6 7 7 7 8 7 KLINGON AT S- 8 7 ***DESTROYED*** +CAPTAIN? ENTERPRISE IN Q- 7 2 S- 2 7 +SHORT RANGE SENSOR +1 . . . . . . * . +2 * . . . . . E . +3 . . . . . . . * +4 . . . . . . . * +5 . * . . . . . . +6 . . . . . . . . +7 . . . . . . . * +8 . . * . . . . * + 1 2 3 4 5 6 7 8 +CAPTAIN? \ No newline at end of file diff --git a/data/examples/99testsBasic2/60rantest.bas b/data/examples/99testsBasic2/60rantest.bas new file mode 100644 index 0000000000000000000000000000000000000000..e01bcbc3f31f8a88224e33ee492e589e4d776826 --- /dev/null +++ b/data/examples/99testsBasic2/60rantest.bas @@ -0,0 +1,21 @@ +10 REM "Test the different random number settings" +100 SET 22,"Microsoft" +110 PRINT "Microsoft mode" +120 FOR I=1 TO 10: PRINT RND(8): NEXT +130 PRINT "**" +140 PRINT RND(-18) +150 PRINT "**" +160 FOR I=1 TO 10: PRINT RND(0): NEXT +170 PRINT "**" +180 FOR I=1 TO 10: PRINT RND(1): NEXT +200 SET 22, "Apple" +210 PRINT "Apple mode" +220 FOR I=1 TO 10 +230 PRINT RND(8) +240 NEXT +300 SET 22, "PaloAlto" +310 PRINT "Palo Alto mode" +320 FOR I=1 TO 10 +330 PRINT RND(8) +340 NEXT + diff --git a/data/examples/99testsBasic2/60rantest.bas.res b/data/examples/99testsBasic2/60rantest.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..3747f4951feb9331c83af1cffa106f795527d0be --- /dev/null +++ b/data/examples/99testsBasic2/60rantest.bas.res @@ -0,0 +1,57 @@ +Microsoft mode +5.74858E-6 +0.36391 +0.2067 +0.14817 +0.50303 +0.76902 +0.68064 +0.1881 +0.51495 +0.92524 +** +0.92495 +** +0.92495 +0.92495 +0.92495 +0.92495 +0.92495 +0.92495 +0.92495 +0.92495 +0.92495 +0.92495 +** +0.18798 +0.36092 +0.2996 +0.59018 +3.52415E-2 +0.25562 +0.25857 +0.97703 +0.34959 +0.94906 +Apple mode +4.19261 +6.97598 +7.85985 +5.72737 +0.43226 +3.75033E-2 +1.31136 +1.30647 +6.78356 +7.01431 +Palo Alto mode +5 +2 +8 +5 +1 +1 +8 +2 +8 +4 diff --git a/data/examples/99testsBasic2/61euler.bas b/data/examples/99testsBasic2/61euler.bas new file mode 100644 index 0000000000000000000000000000000000000000..305bdb21c242d36e04934efd1c312ed7bdf1abba --- /dev/null +++ b/data/examples/99testsBasic2/61euler.bas @@ -0,0 +1,16 @@ +10 REM 'Function to calculate the greatest common divisor (GCD)' +100 DEF FNG() +110 WHILE B <> 0 +120 T = B +130 B = A % B +140 A = T +150 WEND +160 RETURN A +170 FEND +200 WHILE -1 +210 READ A,B +220 IF @S<>0 THEN BREAK +230 PRINT "The greatest common denominator of",A,"and",B,"is: ";FNG() +240 WEND +250 END +300 DATA 18,27,54,63,128,371,34,85 diff --git a/data/examples/99testsBasic2/61euler.bas.res b/data/examples/99testsBasic2/61euler.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..ecfa3c9a2d9bf6b8ac42c982da023aca23afcf4b --- /dev/null +++ b/data/examples/99testsBasic2/61euler.bas.res @@ -0,0 +1,4 @@ +The greatest common denominator of 18 and 27 is: 9 +The greatest common denominator of 54 and 63 is: 9 +The greatest common denominator of 128 and 371 is: 1 +The greatest common denominator of 34 and 85 is: 17 diff --git a/data/examples/99testsBasic2/62testvalandstr.bas b/data/examples/99testsBasic2/62testvalandstr.bas new file mode 100644 index 0000000000000000000000000000000000000000..a38c12f3e7999808808c9392cea79a6416874ce3 --- /dev/null +++ b/data/examples/99testsBasic2/62testvalandstr.bas @@ -0,0 +1,156 @@ +10 REM "Test VAL and STR in as many cases as possible" +20 REM "Serge Caron, 2025" +30 PRINT "" +40 PRINT "Testing VAL and STR on this kernel..." +50 PRINT "and of @V" +60 REM "Longer strings to avoid 29 length restriction" +70 DIM A$(80), B$(80), C$(80) + +100 PRINT "" +110 PRINT "Decimal test of VAL and @V" +120 A$ = "10": GOSUB 9000 +130 A$ = " 10": GOSUB 9000 +140 A$ = "010": GOSUB 9000 +150 A$ = "-15": GOSUB 9000 +160 A$ = "d18": GOSUB 9000 +170 A$ = "d 18": GOSUB 9000 +180 A$ = "d61": GOSUB 9000 +190 A$ = "45t": GOSUB 9000 +200 A$ = "45 46": GOSUB 9000 +210 A$ = "- 12": GOSUB 9000 +220 A$ = "65535": GOSUB 9000 +230 A$ = "65536": GOSUB 9000 +240 A$ = "2147483647": GOSUB 9000 +250 A$ = "2147483648": GOSUB 9000 +260 A$ = "4294967295": GOSUB 9000 +270 A$ = "4294967296": GOSUB 9000 +280 A$ = "4294967297": GOSUB 9000 +290 GOSUB 8000 + +500 PRINT "" +510 PRINT "Hexadecimal test of VAL and @V" +520 A$ = "0x10": GOSUB 9000 +530 A$ = "0X10": GOSUB 9000 +540 A$ = "0x010": GOSUB 9000 +550 A$ = "0x 25": GOSUB 9000 +560 A$ = " 0x25": GOSUB 9000 +570 A$ = "0x44 0x2": GOSUB 9000 +580 A$ = "35 0x40": GOSUB 9000 +590 A$ = "0xZ40": GOSUB 9000 +600 A$ = "Z0x40": GOSUB 9000 +610 A$ = "x10": GOSUB 9000 +620 A$ = "0xfe": GOSUB 9000 +630 A$ = "0XFE": GOSUB 9000 +640 A$ = "-0XFe": GOSUB 9000 +650 A$ = "0x-10": GOSUB 9000 +660 A$ = "0xFFFF": GOSUB 9000 +670 A$ = "0x10000": GOSUB 9000 +680 A$ = "0xffffFFFF": GOSUB 9000 +690 A$ = "0x7fffffff": GOSUB 9000 +700 A$ = "0x80000000": GOSUB 9000 +710 A$ = "0x1ffffFFFF": GOSUB 9000 +720 A$ = "0x100000000": GOSUB 9000 +730 A$ = "0x100000001": GOSUB 9000 +740 A$ = "-0x100000000": GOSUB 9000 +750 GOSUB 8000 + +1000 PRINT "" +1010 PRINT "Octal test of VAL and @V" +1020 A$ = "0o10": GOSUB 9000 +1030 A$ = "0O10": GOSUB 9000 +1040 A$ = "0o010": GOSUB 9000 +1050 A$ = "0o 25": GOSUB 9000 +1060 A$ = " 0o25": GOSUB 9000 +1070 A$ = "0o44 0o2": GOSUB 9000 +1080 A$ = "35 0o40": GOSUB 9000 +1090 A$ = "0oZ40": GOSUB 9000 +1100 A$ = "Z0o40": GOSUB 9000 +1110 A$ = "0o40Z": GOSUB 9000 +1120 A$ = "o10": GOSUB 9000 +1130 A$ = "0o377": GOSUB 9000 +1140 A$ = "0o400": GOSUB 9000 +1150 A$ = "-0o377": GOSUB 9000 +1160 A$ = "0o-10": GOSUB 9000 +1170 A$ = "0o177777": GOSUB 9000 +1180 A$ = "0o200000": GOSUB 9000 +1190 A$ = "0o37777777777": GOSUB 9000 +1200 A$ = "0o17777777777": GOSUB 9000 +1210 A$ = "0o20000000000": GOSUB 9000 +1220 A$ = "0o77777777777": GOSUB 9000 +1230 A$ = "0o40000000000": GOSUB 9000 +1240 A$ = "0o40000000001": GOSUB 9000 +1250 A$ = "-0o40000000000": GOSUB 9000 +1260 GOSUB 8000 + +1500 PRINT "" +1510 PRINT "Binary test of VAL" +1520 PRINT "Bit Walking..." +1530 Z$="0" +1540 A$="0b1" +1550 B$ = "'" +1560 FOR I=1 TO 32 +1570 C$ = B$ + A$ + B$ +1580 PRINT I, "=", C$, "->", VAL(A$) +1590 A$ = A$ + Z$ +1600 NEXT +1620 A$ = "0b10": GOSUB 9000 +1630 A$ = "0B10": GOSUB 9000 +1640 A$ = "0b010": GOSUB 9000 +1650 A$ = "0b 10": GOSUB 9000 +1660 A$ = " 0b10": GOSUB 9000 +1670 A$ = "0b11 0b1": GOSUB 9000 +1680 A$ = "11 0b10": GOSUB 9000 +1690 A$ = "0oZ10": GOSUB 9000 +1700 A$ = "Z0b10": GOSUB 9000 +1710 A$ = "b10": GOSUB 9000 +1720 A$ = "0b11111111": GOSUB 9000 +1730 A$ = "0b100000000": GOSUB 9000 +1740 A$ = "-0b11111111": GOSUB 9000 +1750 A$ = "0b-10": GOSUB 9000 +1760 A$ = "0b1111111111111111": GOSUB 9000 +1770 A$ = "0b10000000000000000": GOSUB 9000 +1780 PRINT "Largest binary number in string form (29 bits) for an unmodified string length:" +1790 A$ = "0b11111111111111111111111111111": PRINT A$, "->", VAL(A$), "(@V=";@V;")" +1800 GOSUB 8000 + +2000 PRINT "" +2010 PRINT "Testing STR(number, base)" +2020 A = 65535 +2030 FOR B=2 TO 32 +2040 GOSUB 7000 +2050 NEXT +2060 GOSUB 8000 +2070 A = 0 +2080 FOR B=2 TO 32 +2090 GOSUB 7000 +2100 NEXT +2110 GOSUB 8000 +2120 A = -2147483648 +2130 FOR B=2 TO 32 +2140 GOSUB 7000 +2150 NEXT + +3000 REM "" +3010 REM "Things that can go wrong" +3020 REM "To be done SL" + +6000 PRINT "Done" +6010 END + +6999 REM "Cute line formating for STR(). A contains the number, B is the base" +7000 PRINT A, "Base", B, "->" , STR(A, B) +7010 RETURN + +7999 REM "Wait for a key" +8000 PRINT "" +8005 RETURN +8010 PRINT "Press a key to continue" +8020 WHILE AVAIL(1)=0 +8030 WEND +8040 GET A +8050 RETURN + +8999 REM "Cute line formating for VAL(). A$ contains the string to be converted" +9000 PRINT "'";A$;"'", "->", VAL(A$), "(@V=";@V;")" +9010 RETURN + diff --git a/data/examples/99testsBasic2/62testvalandstr.bas.res b/data/examples/99testsBasic2/62testvalandstr.bas.res new file mode 100644 index 0000000000000000000000000000000000000000..71126427e006b3ffa561ed24870efd29a790f49f --- /dev/null +++ b/data/examples/99testsBasic2/62testvalandstr.bas.res @@ -0,0 +1,228 @@ + +Testing VAL and STR on this kernel... +and of @V + +Decimal test of VAL and @V +'10' -> 10 (@V=2) +' 10' -> 10 (@V=3) +'010' -> 10 (@V=3) +'-15' -> -15 (@V=3) +'d18' -> 0 (@V=0) +'d 18' -> 0 (@V=0) +'d61' -> 0 (@V=0) +'45t' -> 45 (@V=2) +'45 46' -> 45 (@V=2) +'- 12' -> 0 (@V=0) +'65535' -> 65535 (@V=5) +'65536' -> 65536 (@V=5) +'2147483647' -> 2.14748E9 (@V=10) +'2147483648' -> 2.14748E9 (@V=10) +'4294967295' -> 4.29496E9 (@V=10) +'4294967296' -> 4.29496E9 (@V=10) +'4294967297' -> 4.29496E9 (@V=10) + + +Hexadecimal test of VAL and @V +'0x10' -> 16 (@V=4) +'0X10' -> 16 (@V=4) +'0x010' -> 16 (@V=5) +'0x 25' -> 0 (@V=2) +' 0x25' -> 37 (@V=5) +'0x44 0x2' -> 68 (@V=4) +'35 0x40' -> 35 (@V=2) +'0xZ40' -> 0 (@V=2) +'Z0x40' -> 0 (@V=0) +'x10' -> 0 (@V=0) +'0xfe' -> 254 (@V=4) +'0XFE' -> 254 (@V=4) +'-0XFe' -> -254 (@V=5) +'0x-10' -> 0 (@V=2) +'0xFFFF' -> 65535 (@V=6) +'0x10000' -> 65536 (@V=7) +'0xffffFFFF' -> 4.29496E9 (@V=10) +'0x7fffffff' -> 2.14748E9 (@V=10) +'0x80000000' -> 2.14748E9 (@V=10) +'0x1ffffFFFF' -> 8.58993E9 (@V=11) +'0x100000000' -> 4.29496E9 (@V=11) +'0x100000001' -> 4.29496E9 (@V=11) +'-0x100000000' -> -4.29496E9 (@V=12) + + +Octal test of VAL and @V +'0o10' -> 8 (@V=4) +'0O10' -> 8 (@V=4) +'0o010' -> 8 (@V=5) +'0o 25' -> 0 (@V=2) +' 0o25' -> 21 (@V=5) +'0o44 0o2' -> 36 (@V=4) +'35 0o40' -> 35 (@V=2) +'0oZ40' -> 0 (@V=2) +'Z0o40' -> 0 (@V=0) +'0o40Z' -> 32 (@V=4) +'o10' -> 0 (@V=0) +'0o377' -> 255 (@V=5) +'0o400' -> 256 (@V=5) +'-0o377' -> -255 (@V=6) +'0o-10' -> 0 (@V=2) +'0o177777' -> 65535 (@V=8) +'0o200000' -> 65536 (@V=8) +'0o37777777777' -> 4.29496E9 (@V=13) +'0o17777777777' -> 2.14748E9 (@V=13) +'0o20000000000' -> 2.14748E9 (@V=13) +'0o77777777777' -> 8.58993E9 (@V=13) +'0o40000000000' -> 4.29496E9 (@V=13) +'0o40000000001' -> 4.29496E9 (@V=13) +'-0o40000000000' -> -4.29496E9 (@V=14) + + +Binary test of VAL +Bit Walking... +1 = '0b1' -> 1 +2 = '0b10' -> 2 +3 = '0b100' -> 4 +4 = '0b1000' -> 8 +5 = '0b10000' -> 16 +6 = '0b100000' -> 32 +7 = '0b1000000' -> 64 +8 = '0b10000000' -> 128 +9 = '0b100000000' -> 256 +10 = '0b1000000000' -> 512 +11 = '0b10000000000' -> 1024 +12 = '0b100000000000' -> 2048 +13 = '0b1000000000000' -> 4096 +14 = '0b10000000000000' -> 8192 +15 = '0b100000000000000' -> 16384 +16 = '0b1000000000000000' -> 32768 +17 = '0b10000000000000000' -> 65536 +18 = '0b100000000000000000' -> 131072 +19 = '0b1000000000000000000' -> 262144 +20 = '0b10000000000000000000' -> 524288 +21 = '0b100000000000000000000' -> 1048576 +22 = '0b1000000000000000000000' -> 2097152 +23 = '0b10000000000000000000000' -> 4194304 +24 = '0b100000000000000000000000' -> 8388608 +25 = '0b1000000000000000000000000' -> 1.67772E7 +26 = '0b10000000000000000000000000' -> 3.35544E7 +27 = '0b100000000000000000000000000' -> 6.71088E7 +28 = '0b1000000000000000000000000000' -> 1.34217E8 +29 = '0b10000000000000000000000000000' -> 2.68435E8 +30 = '0b100000000000000000000000000000' -> 5.3687E8 +31 = '0b1000000000000000000000000000000' -> 1.07374E9 +32 = '0b10000000000000000000000000000000' -> 2.14748E9 +'0b10' -> 2 (@V=4) +'0B10' -> 2 (@V=4) +'0b010' -> 2 (@V=5) +'0b 10' -> 0 (@V=2) +' 0b10' -> 2 (@V=5) +'0b11 0b1' -> 3 (@V=4) +'11 0b10' -> 11 (@V=2) +'0oZ10' -> 0 (@V=2) +'Z0b10' -> 0 (@V=0) +'b10' -> 0 (@V=0) +'0b11111111' -> 255 (@V=10) +'0b100000000' -> 256 (@V=11) +'-0b11111111' -> -255 (@V=11) +'0b-10' -> 0 (@V=2) +'0b1111111111111111' -> 65535 (@V=18) +'0b10000000000000000' -> 65536 (@V=19) +Largest binary number in string form (29 bits) for an unmodified string length: +0b11111111111111111111111111111 -> 5.3687E8 (@V=31) + + +Testing STR(number, base) +65535 Base 2 -> 1111111111111111 +65535 Base 3 -> 10022220020 +65535 Base 4 -> 33333333 +65535 Base 5 -> 4044120 +65535 Base 6 -> 1223223 +65535 Base 7 -> 362031 +65535 Base 8 -> 177777 +65535 Base 9 -> 108806 +65535 Base 10 -> 65535 +65535 Base 11 -> 45268 +65535 Base 12 -> 31B13 +65535 Base 13 -> 23AA2 +65535 Base 14 -> 19C51 +65535 Base 15 -> 14640 +65535 Base 16 -> FFFF +65535 Base 17 -> D5D0 +65535 Base 18 -> B44F +65535 Base 19 -> 9AA4 +65535 Base 20 -> 83GF +65535 Base 21 -> 71CF +65535 Base 22 -> 638J +65535 Base 23 -> 58K8 +65535 Base 24 -> 4HIF +65535 Base 25 -> 44LA +65535 Base 26 -> 3IOF +65535 Base 27 -> 38O6 +65535 Base 28 -> 2RGF +65535 Base 29 -> 2JQO +65535 Base 30 -> 2COF +65535 Base 31 -> 2661 +65535 Base 32 -> 1VVV + +0 Base 2 -> 0 +0 Base 3 -> 0 +0 Base 4 -> 0 +0 Base 5 -> 0 +0 Base 6 -> 0 +0 Base 7 -> 0 +0 Base 8 -> 0 +0 Base 9 -> 0 +0 Base 10 -> 0 +0 Base 11 -> 0 +0 Base 12 -> 0 +0 Base 13 -> 0 +0 Base 14 -> 0 +0 Base 15 -> 0 +0 Base 16 -> 0 +0 Base 17 -> 0 +0 Base 18 -> 0 +0 Base 19 -> 0 +0 Base 20 -> 0 +0 Base 21 -> 0 +0 Base 22 -> 0 +0 Base 23 -> 0 +0 Base 24 -> 0 +0 Base 25 -> 0 +0 Base 26 -> 0 +0 Base 27 -> 0 +0 Base 28 -> 0 +0 Base 29 -> 0 +0 Base 30 -> 0 +0 Base 31 -> 0 +0 Base 32 -> 0 + +-2.14748E9 Base 2 -> -1111111111111111111111110000000 +-2.14748E9 Base 3 -> -12112122212110120200 +-2.14748E9 Base 4 -> -1333333333332000 +-2.14748E9 Base 5 -> -13344223433040 +-2.14748E9 Base 6 -> -553032005200 +-2.14748E9 Base 7 -> -104134210620 +-2.14748E9 Base 8 -> -17777777600 +-2.14748E9 Base 9 -> -5478773520 +-2.14748E9 Base 10 -> -2.14748E9 +-2.14748E9 Base 11 -> -A02220176 +-2.14748E9 Base 12 -> -4BB230800 +-2.14748E9 Base 13 -> -282BA4A10 +-2.14748E9 Base 14 -> -1652CA880 +-2.14748E9 Base 15 -> -C87E6630 +-2.14748E9 Base 16 -> -7FFFFF80 +-2.14748E9 Base 17 -> -53G7F4E0 +-2.14748E9 Base 18 -> -3928G3A0 +-2.14748E9 Base 19 -> -27C57GF8 +-2.14748E9 Base 20 -> -1DB1F8G0 +-2.14748E9 Base 21 -> -140H2D30 +-2.14748E9 Base 22 -> -IKF5B96 +-2.14748E9 Base 23 -> -EBELF3G +-2.14748E9 Base 24 -> -B5GGE00 +-2.14748E9 Base 25 -> -8JMDNFK +-2.14748E9 Base 26 -> -6OJ8IK0 +-2.14748E9 Base 27 -> -5EHNCFI +-2.14748E9 Base 28 -> -4CLM940 +-2.14748E9 Base 29 -> -3HK793P +-2.14748E9 Base 30 -> -2SB6CO0 +-2.14748E9 Base 31 -> -2D09U7T +-2.14748E9 Base 32 -> -1VVVVS0 +Done diff --git a/data/examples/99testsBasic2/testscript b/data/examples/99testsBasic2/testscript new file mode 100644 index 0000000000000000000000000000000000000000..179bda9473a94072c3014aca25559146fa2c8437 --- /dev/null +++ b/data/examples/99testsBasic2/testscript @@ -0,0 +1,23 @@ +#!/bin/sh +BASIC=../../Basic2/Posix/basic + +for file in *.bas +do + if [ -r $file.inp ] + then + $BASIC $file > ${file}.tmp < ${file}.inp + else + $BASIC $file > ${file}.tmp + fi + diff ${file}.tmp ${file}.res > /dev/null + if [ $? -eq 0 ] + then + echo "passed $file" + rm ${file}.tmp + else + echo "failed $file" + fi +done + +rm eeprom.dat +rm daten.txt diff --git a/data/misc/BASIC.sublime-syntax b/data/misc/BASIC.sublime-syntax new file mode 100644 index 0000000000000000000000000000000000000000..9784a1910d1e3852984fb163b1aa7ac99272322f --- /dev/null +++ b/data/misc/BASIC.sublime-syntax @@ -0,0 +1,61 @@ +%YAML 1.2 +--- +# http://www.sublimetext.com/docs/3/syntax.html +# goes to ./Library/Application Support/Sublime Text 3/Packages/User +name: IoT BASIC +file_extensions: + - bas +scope: source.iot-basic +contexts: + main: + - match: ^\d+ + scope: entity.name.function.line-number + - match: \b(?i:rem) + push: + - meta_scope: comment.line + - match: '\n' + pop: true + + - match: '"' + scope: punctuation.definition.string.begin + push: + - meta_scope: string.quoted.double + - match: '"' + scope: punctuation.definition.string.end + pop: true + + - match: '\b(?i:goto|if|then|for|to|step|next|gosub|return|pop|stop|cont|end|break|on|else|def|fn|fend|switch|case|swend|repeat|until|while|wend|do|dend)(?![$])\b' + scope: keyword.control + - match: '\b(?i:list|dump|run|new)(?![$])\b' + scope: keyword.control.immediate + - match: '\b(?i:poke|call|usr|set|clr|delay)(?![$])\b' + scope: keyword.utility + - match: '\b(?i:himem|size|azero|sleep):' + scope: keyword.utility.colon + - match: \b(?i:peek)(?=\() + scope: support.function.utility + - match: '\b(?i:gr|color|plot|draw|rect|frect|circle|fcircle|cls)(?![$])\b' + scope: keyword.graphics + - match: \b(?i:scrn)(?=\() + scope: support.function.graphics + - match: '\b(?i:tab|print|input|open|close|read|data|restore|delete|fdisk|netstat|load|save|put|get|pinm|awrite|dwrite|play|every|after|error|event|pulse|wire)(?![$])\b' + scope: keyword.io + - match: '\b(?i:in|pr)#' + scope: keyword.io.hash + - match: \b(?i:aread|dread|pulse|millis|malloc|find|sensor|wire)(?=\() + scope: support.function.io + - match: '\b(?i:and|or|not)(?![$])\b' + scope: keyword.operator.logical + - match: '\b(?i:mod)(?![$])\b' + scope: keyword.operator.arithmetic + - match: '\b(?i:dim|let)(?![$])\b' + scope: keyword.variable + - match: \b(?i:abs|sgn|rnd|pow|sqr|atan|sin|cos|tan|log|exp|map)(?=\() + scope: support.function.arithmetic + - match: \b(?i:len|asc|val|str|instr)(?=\() + scope: support.function.string + - match: '\b[A-Za-z][A-Za-z0-9]*[$]?' + comment: uses non-greedy *? so keywords get a first shot + scope: variable + - match: '\d+|\d*\.\d*([eE][+-]?\d+)?' + scope: constant.numeric diff --git a/data/misc/PS2Keyboard.zip b/data/misc/PS2Keyboard.zip new file mode 100644 index 0000000000000000000000000000000000000000..950ef55d6707162d368d6ffd7adeebaacbd31e6b --- /dev/null +++ b/data/misc/PS2Keyboard.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cda4693c2c5a326c2d22fb9232ba28d80c469c2a9fd90dc81a64d277395eaf1 +size 24190 diff --git a/data/misc/PicoSerial-master.zip b/data/misc/PicoSerial-master.zip new file mode 100644 index 0000000000000000000000000000000000000000..be519c8132146283cb645fea51d4f5b8c592e776 --- /dev/null +++ b/data/misc/PicoSerial-master.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6611e4fb283a41ae08bbd92c8334ce59255e92c55335d5a41018d2fbd0e4e1f +size 23535 diff --git a/data/misc/UTFT.pdf b/data/misc/UTFT.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5907b402165f10d6fb7623c0f92935e323b9f24b --- /dev/null +++ b/data/misc/UTFT.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52321bc9767cfc9a19ac79d6eb22d991964c051f94cbf9af176952f5173070ec +size 245773 diff --git a/data/misc/stefansbasic.stc b/data/misc/stefansbasic.stc new file mode 100644 index 0000000000000000000000000000000000000000..4e6c6133b507cedf54d5ec476c4582432c304708 --- /dev/null +++ b/data/misc/stefansbasic.stc @@ -0,0 +1,84 @@ +BaudRate = 9600 +DataBits = 8 +Parity = N +StopBits = 1 +FlowControlCTS = false +FlowControlDTR = false +FlowControlXON = false +UseSoftwareSupportedFlowControl = true +BlockKeystrokesWhileFlowHalted = true +DTRDefaultState = true +RTSDefaultState = true +ViewerMode = Plain +WrapPlainText = true +TerminalMode = Raw +EnterKeyEmulation = LF +EnterKeyEmulationCustomSequence = 00 1B +EnableBell = false +FormatTABtext = false +FormatTABtextColumnWidth = 8 +ReplaceSpacesWithTAB = false +ReplaceSpacesWithTABthreshold = 2 +EnableFormFeed = true +EnableEndOfText = false +IgnoreLineFeed = false +CombineCR = false +UseRealCR = false +HandleEscHome = false +HandleEscEnd = false +FilterASCIIescapeSequences = false +PlainTextEncoding = SystemDefault +LocalEcho = false +ReplaceTAB = false +TABSpaces = 4 +ConvertNonPrint = true +RemoveHighBit = false +EnableBackspace = true +LoopbackRXData = false +IgnoreRXSignalErrors = true +RXBufferSize = 10000 +RXDataTimeStamp = false +RXDataTimeStampFormat = DateTime +RXDataTimeStampWaitForEOL = false +CaptureFormat = Raw +CaptureFormatHexData = true +CaptureTimeStamp = false +CaptureTimeStampFormat = DateTime +CaptureWaitForTerminationString = true +CaptureTerminationString = 0D 0A +CaptureRetainTerminationString = false +CaptureLocalEcho = false +CaptureFileStaysOpen = true +CaptureAutostart = false +CaptureAutoAppend = false +CaptureAutoFilename = +CapturePath = /private/var/folders/8j/knsng1m96711qn_94y5b855w0000gn/T/AppTranslocation/0743B64D-F7E9-4AC5-B678-6E080B480FB1/d +TerminateSendString = false +TerminationString = 0D 0A +TXCharDelayEnabled = false +TXCharDelay = 3000 +TXLineDelayEnabled = false +TXLineDelay = 3000 +TXLineDelayChars = 0A +TXLineDelayMatchAllChars = false +TXPacketDelayEnabled = false +TXPacketDelay = 3000 +TXPacketSize = 256 +XmitWaitEnable = false +SendTextSoundEnable = false +TextFont = Monaco +TextFontSize = 0 +InputFontSize = 0 +TextFontColor = &h00000000 +CondenseLines = false +TextBackgroundColor = &h00FFFFFF +HexFont = Monaco +HexFontSize = 0 +AutoConnect = false +AutoDisconnect = false +AutoReconnect = true +AutoReconnectDelay = 100 +ShowConnectionTimer = true +ShowRxTxByteCounts = true +ResetStatisticsWhenPortOpens = true +RefreshInterval = 100 \ No newline at end of file diff --git a/data/misc/trek.bas.org b/data/misc/trek.bas.org new file mode 100644 index 0000000000000000000000000000000000000000..0ed82be746d5ac35010c06b034aab3adc6d5061a --- /dev/null +++ b/data/misc/trek.bas.org @@ -0,0 +1,130 @@ + 5 Y=2999;IN."DO YOU WANT A DIFFICULT GAME? ","(Y OR N)"A + 10 PR."STARDATE 3200: YOUR MISSION IS ",;IFA=YY=999 + 15 K=0,B=0,D=30;F.I=0TO63;J=R.(99)<5,B=B+J + 20 M=R.(Y),M=(M<209)+(M<99)+(M<49)+(M<24)+(M<9)+(M<2),K=K+M + 25 @(I)=-100*M-10*J-R.(8);N.I;IF(B<2)+(K<4)G.15 + 30 PR."TO DESTROY ",#1,K," KLINGONS IN 30 STARDATES. + 35 PR."THERE ARE ",#1,B," STARBASES.";GOS.160;C=0,H=K + 40 U=R.(8),V=R.(8),X=R.(8),Y=R.(8) + 45 F.I=71TO152;@(I)=0;N.I;@(8*X+Y+62)=4,M=A.(@(8*U+V-9)),N=M/100 + 50 I=1;IFNF.J=1TON;GOS.165;@(J+134)=300,@(J+140)=S,@(J+146)=T;N.J + 55 GOS.175;M=M-100*N,I=2;IFM/10GOS.165 + 60 M=M-M/10*10,I=3;IFMF.J=1TOM;GOS.165;N.J + 65 GOS.145;GOS.325;IFKG.95 + 70 PR.;PR."MISSION ACCOMPLISHED.";IFD<3PR."BOY, YOU BARELY MADE IT. + 75 IFD>5PR."GOOD WORK...";IFD>9PR."FANTASTIC!";IFD>13PR."UNBELIEVABLE! + 80 D=30-D,I=H*100/D*10;PR.#1,H," KLINGONS IN ",D," STARDATES. (",I,") + 85 J=100*(C=0)-5*C;PR.#1,C," CASUALTIES INCURRED. (",J,") + 90 PR."YOUR SCORE:",I+J;G.110 + 95 IFD<0PR."IT'S TOO LATE, THE FEDERATION HAS BEEN CONQUERED.";G.110 + 100 IFE>=0G.120 + 105 PR."ENTERPRISE DESTROYED";IFH-K>9PR."BUT YOU WERE A GOOD MAN + 110 Y=987;PR.;IN."ANOTHERE GAME? ","(Y OR N)"A;IFA=YG.5 + 115 PR."GOOD BYE.";STOP + 120 S=220,G=180,L=200,P=260,R=420,W=465,T=555;IN."CAPTAIN"A + 125 IF(A=S)+(A=G)+(A=L)+(A=P)+(A=R)+(A=W)+(A=T)G.A + 130 PR."R=REPORT S=SR. SENSOR L=LR. SENSOR + 135 PR."G=GALAXY MAP P=PHASER T=TORPEDO + 140 PR."W=WARP ENGINE **PLEASE USE ONE OF THESE COMMANDS***";G.120 + 145 F.I=X-(X>1)TOX+(X<8);F.J=Y-(Y>1)TOY+(Y<8) + 150 IF@(8*I+J+62)#2N.J;N.I;O=0;R. + 155 IFO=0PR.'SULU: "CAPTAIN, WE ARE DOCKED AT STARBASE." + 160 E=4000,F=10,O=1;F.I=64TO70;@(I)=0;N.I;R. + 165 S=R.(8),T=R.(8),A=8*S+T+62;IF@(A)G.165 + 170 @(A)=I;R. + 175 PR."ENTERPRISE IN Q-",#1,U,V," S-",X,Y;R. + 180 GOS.175;J=2;GOS.375;IFIG.120 + 185 PR." OF GALAXY MAP";F.I=0TO7;PR.;PR.#1,I+1,":",;F.J=0TO7;M=@(8*I+J) + 190 PR.#4,(M>0)*M,;N.J;PR.;N.I;PR." ",;F.I=0TO7;PR." ..",;N.I;PR. + 195 PR." ",;F.I=1TO8;PR.#4,I,;N.I;PR.;PR.;G.120 + 200 GOS.175;J=3;GOS.375;IFIG.120 + 205 PR.;F.I=U-1TOU+1;F.J=V-1TOV+1;M=8*I+J-9,A=0 + 210 IF(I>0)*(I<9)*(J>0)*(J<9)A=A.(@(M)),@(M)=A + 215 PR.#4,A,;N.J;PR.;N.I;G.120 + 220 GOS.175;J=1;GOS.375;IFIG.120 + 225 M=8*U+V-9,@(M)=A.(@(M)) + 230 PR.;F.I=1TO8;PR.#1,I,;F.J=1TO8;M=@(8*I+J+62);IFM=0PR." .", + 235 IFM=1PR." K", + 240 IFM=2PR." B", + 245 IFM=3PR." *", + 250 IFM=4PR." E", + 255 N.J;PR.;N.I;PR." ",;F.I=1TO8;PR.#2,I,;N.I;PR.;G.120 + 260 J=4;GOS.375;IFIG.120 + 265 IN." ENERGIZED. ","UNITS TO FIRE"A;IFA<1G.120 + 270 IFA>EPR.'SPOCK: "WE HAVE ONLY ',#1,E,' UNITS."';G.120 + 275 E=E-A;IFN<1PR."PHASER FIRED AT EMPTY SPACE.";G.65 + 280 A=A/N;F.M=135TO140;IF@(M)=0G.290 + 285 GOS.295;PR.#3,S," UNITS HIT ",;GOS.305 + 290 N.M;G.65 + 295 IFA>1090PR."...OVERLOADED..";J=4,@(67)=1,A=9;GOS.375 + 300 I=@(M+6)-X,J=@(M+12)-Y,S=A*30/(30+I*I+J*J)+1;R. + 305 PR."KLINGON AT S-",#1,@(M+6),@(M+12),;@(M)=@(M)-S + 310 IF@(M)>0PR." **DAMAGED**";R. + 315 @(M)=0,I=8*U+V-9,J=@(I)/A.(@(I)),@(I)=@(I)-100*J,K=K-1 + 320 I=8*@(M+6)+@(M+12)+62,@(I)=0,N=N-1;PR." ***DESTROYED***";R. + 325 IFN=0R. + 330 PR."KLINGON ATTACK";IFOPR."STARBASE PROTECTS ENTERPRISE";R. + 335 T=0;F.M=135TO140;IF@(M)=0G.350 + 340 A=(@(M)+R.(@(M)))/2;GOS.295;T=T+S,I=@(M+6),J=@(M+12) + 345 PR.#3,S," UNITS HIT FROM KLINGON AT S-",#1,I,J + 350 N.M;E=E-T;IFE<=0PR."*** BANG ***";R.R + 355 PR.#1,E," UNITS OF ENERGY LEFT.";IFR.(E/4)>TR. + 360 IF@(70)=0@(70)=R.(T/50+1),J=7;G.375 + 365 J=R.(6),@(J+63)=R.(T/99+1)+@(J+63),I=R.(8)+1,C=C+I + 370 PR.'MC COY: "SICKBAY TO BRIDGE, WE SUFFERED',#2,I,' CASUALTIES." + 375 I=@(J+63);IFJ=1PR."SHORT RANGE SENSOR", + 380 IFJ=2PR."COMPUTER DISPLAY", + 385 IFJ=3PR."LONG RANGE SENSOR", + 390 IFJ=4PR."PHASER", + 395 IFJ=5PR."WARP ENGINE", + 400 IFJ=6PR."PHOTON TORPEDO TUBES", + 405 IFJ=7PR."SHIELD", + 410 IFI=0R. + 415 PR." DAMAGED, ",#1,I," STARDATES ESTIMATED FOR REPAIR";R. + 420 PR."STATUS REPORT:";PR."STARDATE",#10,3230-D;PR."TIME LEFT",#7,D + 425 PR."CONDITION ",;IFOPR."DOCKED";G.445 + 430 IFNPR."RED";G.445 + 435 IFE<999PR."YELLOW";G.445 + 440 PR."GREEN + 445 PR."POSITION Q-",#1,U,V," S-",X,Y;PR."ENERGY",#12,E + 450 PR."TORPEDOES",#7,F;PR."KLINGONS LEFT",#3,K;PR."STARBASES",#6,B + 455 F.J=1TO7;IF@(J+63)GOS.375 + 460 N.J;G.120 + 465 J=5;GOS.375;IFI=0PR. + 470 IN."SECTOR DISTANCE"W;IFW<1G.120 + 475 IFI*(W>2)PR.'CHEKOV: "WE CAN TRY 2 AT MOST, SIR."';G.470 + 480 IFW>91W=91;PR.'SPOCK: "ARE YOU SURE, CAPTAIN?" + 485 IFE0);N.M + 505 P=45*X+22,G=45*Y+22,W=45*W;F.M=1TO8;W=W-R;IFW<-22G.525 + 510 P=P+S,G=G+T,I=P/45,J=G/45;IF(I<1)+(I>8)+(J<1)+(J>8)G.530 + 515 IF@(8*I+J+62)=0X=I,Y=J;N.M + 520 PR."**EMERGENCY STOP**";PR.'SPOCK: "TO ERR IS HUMAN." + 525 @(8*X+Y+62)=4;GOS.175;G.65 + 530 P=U*72+P/5+W/5*S/R-9,U=P/72,G=V*72+G/5+W/5*T/R-9,V=G/72 + 535 IFR.(9)<2PR."***SPACE STORM***";T=100;GOS.360 + 540 IF(U>0)*(U<9)*(V>0)*(V<9)X=(P+9-72*U)/9,Y=(G+9-72*V)/9;G.45 + 545 PR."**YOU WANDERED OUTSIDE THE GALAXY** + 550 PR."ON BOARD COMPUTER TAKES OVER, AND SAVED YOUR LIFE";G.40 + 555 J=6;GOS.375;IFIG.120 + 560 IFF=0PR." EMPTY";G.120 + 565 PR." LOADED";GOS.615;IFR=0G.120 + 570 PR."TORPEDO TRACK ",;F=F-1,P=45*X+22,G=45*Y+22;F.M=1TO8 + 575 P=P+S,G=G+T,I=P/45,J=G/45;IF(I<1)+(I>8)+(J<1)+(J>8)G.585 + 580 L=8*I+J+62,W=8*U+V-9,R=@(W)/A.(@(W));PR.#1,I,J," ",;G.585+5*@(L) + 585 N.M;PR."...MISSED";G.65 + 590 S=R.(99)+280;F.M=135TO140;IF(@(M+6)=I)*(@(M+12)=J)GOS.305 + 592 N.M;G.65 + 595 B=B-1,@(L)=0,@(W)=@(W)-10*R;PR."STARBASE DESTROYED + 597 PR.'SPOCK: "I OFTEN FIND HUMAN BEHAVIOUR FASCINATING."';G.65 + 600 PR."HIT A STAR";IFR.(9)<3PR."TORPEDO ABSORBED";G.65 + 605 @(L)=0,@(W)=@(W)-R;IFR.(9)<6PR."STAR DESTROYED";G.65 + 610 T=300;PR."IT NOVAS ***RADIATION ALARM***";GOS.360;G.65 + 615 IN."COURSE (0-360)"I;IF(I>360)+(I<0)R=0;R. + 620 S=(I+45)/90,I=I-S*90,R=(45+I*I)/110+45;G.625+5*(S<4)*S + 625 S=-45,T=I;R. + 630 S=I,T=45;R. + 635 S=45,T=-I;R. + 640 S=-I,T=-45;R. diff --git a/data/test/aled.bas b/data/test/aled.bas new file mode 100644 index 0000000000000000000000000000000000000000..9b838e2d25753324b7861dd0b4ba3ade5462f10c --- /dev/null +++ b/data/test/aled.bas @@ -0,0 +1,12 @@ +10 PINM 3,192 +20 PINM 4,192 +30 PINM 5,192 +40 AWRITE 3,255 +50 AWRITE 4,255 +60 AWRITE 5,255 +100 FOR I=255 TO 0 STEP -1 +110 AWRITE 3,I +120 AWRITE 4,I +130 AWRITE 5,I +140 DELAY 10 +150 NEXT diff --git a/data/test/bench.bas b/data/test/bench.bas new file mode 100644 index 0000000000000000000000000000000000000000..1999dd7b2145ec23430ab342374bfa29c35b323c --- /dev/null +++ b/data/test/bench.bas @@ -0,0 +1,7 @@ +10 T=MILLIS(1): FOR I=1 TO 10000000: A=5: NEXT: T=MILLIS(1)-T +20 S=MILLIS(1): FOR I=1 TO 10000000: NEXT: S=MILLIS(1)-S +30 U=MILLIS(1): FOR I=1 TO 10000000: : NEXT: U=MILLIS(1)-U +35 PRINT "Times in 0.1 micro seconds units" +40 PRINT "Token time:",U-S +50 PRINT "Assigment time:",T-S-(U-S)*4, T-S +60 PRINT "Loop time:",S diff --git a/data/test/bench.txt b/data/test/bench.txt new file mode 100644 index 0000000000000000000000000000000000000000..a7a795a9f8edeb38c00412d11a5e251e4d236957 --- /dev/null +++ b/data/test/bench.txt @@ -0,0 +1,45 @@ +LGT with float + +Token time: 74 +Assigment time: 66 362 +Loop time: 259 + +LGT without float + +Token time: 62 +Assigment time: 7 255 +Loop time: 151 + +XMC with float (BASICFULL) + +Token time: 103 +Assigment time: 257 669 +Loop time: 431 + +XMC with float (BASICTINYWITHFLOAT) + +Token time: 103 +Assigment time: 256 668 +Loop time: 431 + +XMC without float (BASICMINIMAL) + +Token time: 90 +Assigment time: 243 603 +Loop time: 283 + +UNO without float + +Token time: 192 +Assigment time: 107 875 +Loop time: 434 + +ESP32 with float (No network function) + +Token time: 174 +Assigment time: -303 393 +Loop time: 189 + + + + diff --git a/data/test/bench2.bas b/data/test/bench2.bas new file mode 100644 index 0000000000000000000000000000000000000000..68d664f8537bf71629aa62b6638bc50379d33448 --- /dev/null +++ b/data/test/bench2.bas @@ -0,0 +1,8 @@ +10 T=MILLIS(1): FOR I=1 TO 10000: A=5: NEXT: T=MILLIS(1)-T +20 S=MILLIS(1): FOR I=1 TO 10000: A=5*6: NEXT: S=MILLIS(1)-S +30 U=MILLIS(1): FOR I=1 TO 10000: : NEXT: U=MILLIS(1)-U +40 V=MILLIS(1): FOR I=1 TO 10000: NEXT: V=MILLIS(1)-V +50 PRINT "Loop time", V/10 +60 PRINT "Token time", (U-V)/10 +70 PRINT "Assignment time", (T-U)/10 +80 PRINT "Multiplication time", (S-T)/10 diff --git a/data/test/bench2.txt b/data/test/bench2.txt new file mode 100644 index 0000000000000000000000000000000000000000..b45d64b71ae55d75d4118b158ea9fbd06e0e991a --- /dev/null +++ b/data/test/bench2.txt @@ -0,0 +1,80 @@ +Uno Integer - Simple + +Loop time 43 +Token time 18 +Assignment time 68 +Multiplication time 34 + +LGT8 Integer - Simple + +Loop time 15 +Token time 6 +Assignment time 19 +Multiplication time 10 + +Uno Float - Simple with float + +Loop time 69.9 +Token time 21.1 +Assignment time 83.5 +Multiplication time 52.2 + +STM32V4VE + +Loop time 5.3 +Token time 1.7 +Assignment time 10.3 +Multiplication time 3.7 + +XMC + +Loop time 43 +Token time 10.3 +Assignment time 56 +Multiplication time 34.2 + +ESP8266 + +Loop time 32.5 +Token time 23.2 +Assignment time 54.6 +Multiplication time 10.6 + +ESP8266 (streamlined Wifi) + +Loop time 29.89999 +Token time 21.5 +Assignment time 36.9 +Multiplication time 9.6 + +ESP32 + +Loop time 18.9 +Token time 17.4 +Assignment time 21.8 +Multiplication time 2.6 + +ESP32 (streamlined Wifi) + +Loop time 11.3 +Token time 9.89999 +Assignment time 14 +Multiplication time 2.59999 + +ESP32-C3 (streamlined Wifi) + +Loop time 12.3 +Token time 9.39999 +Assignment time 14 +Multiplication time 3.59999 + +RP2040 (Pi Pico) + +Loop time 12.6 +Token time 12.89999 +Assignment time 18.5 +Multiplication time 5.59999 + + + + diff --git a/data/test/clock.bas b/data/test/clock.bas new file mode 100644 index 0000000000000000000000000000000000000000..deb3a49d0e56092c091a71bfa60a1f069c3749bb --- /dev/null +++ b/data/test/clock.bas @@ -0,0 +1,38 @@ +5 REM "The small clock" +10 S=0 +20 CLS: PUT &2,27,"f" +30 GOSUB 1000 +40 GET &2,A +50 IF A=10 GOSUB 200 +60 DELAY 500 +100 GOTO 30 +200 REM "The select code" +210 S=(S+1)%3 +220 @X=14: @Y=0 +230 ON S+1 GOSUB 300,400,500 +290 RETURN +300 REM "Simply display" +310 PUT &2," " +390 RETURN +400 REM "Set time and date" +410 PUT &2,"S" +420 GOSUB 600 +490 RETURN +500 REM "Set Alarm" +510 PUT &2,"A" +590 RETURN +600 REM "Set the time" +610 @X=0: @Y=0 +620 PUT &2,27,"e" +630 T=2 +640 GET &2,A +650 IF A=10 THEN PUT &2,27,"f": RETURN +660 IF A="3" THEN @T(T)=@T(T)+1: GOSUB 1000 +670 IF A="4" THEN @T(T)=@T(T)-1: GOSUB 1000 +680 IF A="1" AND T<2 THEN T=T+1 +690 IF A="2" AND T>0 THEN T=T-1 +700 @X=(2-T)*3 +710 GOTO 640 +1000 REM "Redraw the display" +1010 PUT &2,27,"H": PRINT &2,@T$(1,8);" "; +1020 RETURN diff --git a/data/test/clock1.bas b/data/test/clock1.bas new file mode 100644 index 0000000000000000000000000000000000000000..99c163ab00ffad0813d623b9a1c15f19c67a8093 --- /dev/null +++ b/data/test/clock1.bas @@ -0,0 +1,27 @@ +100 REM "A little clock in BASIC" +120 @O=2: CLS +200 REM "Display the clock and wait for input" +210 @X=0: @Y=0 +220 PRINT @T$(1,8);" ": PRINT @T$(10);" "; +230 GET &2, A: IF A=10 THEN GOSUB 3000 +240 DELAY 300 +250 GOTO 210 +3000 REM "Input a time and date" +3010 @X=0: @Y=1 +3020 N=@T(2): N$="Hour: ": MI=0: MA=24: GOSUB 5000: @T(2)=N +3030 N=@T(1): N$="Minute: ": MI=0: MA=59: GOSUB 5000: @T(1)=N +3040 N=@T(0): N$="Second: ": MI=0: MA=59: GOSUB 5000: @T(0)=N +3050 N=@T(4): N$="Day: ": MI=1: MA=31: GOSUB 5000: @T(4)=N +3060 N=@T(5): N$="Month: ": MI=1: MA=12: GOSUB 5000: @T(5)=N +3070 N=@T(6): N$="Year: ": MI=1970: MA=2100: GOSUB 5000: @T(6)=N +3080 CLS +3090 RETURN +5000 REM "Input a number through the touchpad" +5010 PUT 27,"j": SET 13,1 +5020 PUT 27, "l": PRINT N$;N;: PUT 27, "k" +5030 GET &2,A: IF A=0 THEN 5030 +5040 IF A=10 THEN SET 13,0: GET &2, A: RETURN +5050 IF A="3" AND NMI THEN N=N-1 +5070 DELAY 200 +5080 GOTO 5010 diff --git a/data/test/clock2.bas b/data/test/clock2.bas new file mode 100644 index 0000000000000000000000000000000000000000..d575cc82d0d9d0efa365e72adc18a0be9f1f89c7 --- /dev/null +++ b/data/test/clock2.bas @@ -0,0 +1,27 @@ +100 REM "A little clock in BASIC" +120 @O=2: CLS +200 REM "Display the clock and wait for input" +210 @X=0: @Y=0 +220 PRINT @T$(1,8);" ": PRINT @T$(10);" "; +230 GET &2, A: IF A=10 THEN GOSUB 3000 +240 DELAY 300 +250 GOTO 210 +3000 REM "Input a time and date" +3010 @X=0: @Y=1 +3020 FOR I=1 TO 6 +3030 READ D, N$, MI, MA +3040 N=@T(D): GOSUB 5000: @T(D)=N +3050 NEXT +3060 RESTORE: CLS +3090 RETURN +3100 DATA 2, "Hour :", 0, 24, 1, "Minute: ", 0, 59, 0, "Second: ", 0, 59 +3110 DATA 4, "Day: ", 1, 31, 5, "Month: ", 1, 12, 6, "Year: ", 1970, 2100 +5000 REM "Input a number through the touchpad" +5010 PUT 27,"j": SET 13,1 +5020 PUT 27, "l": PRINT N$;N;: PUT 27, "k" +5030 GET &2,A: IF A=0 THEN 5030 +5040 IF A=10 THEN SET 13,0: GET &2, A: RETURN +5050 IF A="3" AND NMI THEN N=N-1 +5070 DELAY 200 +5080 GOTO 5010 diff --git a/data/test/clock3.bas b/data/test/clock3.bas new file mode 100644 index 0000000000000000000000000000000000000000..efbe85bca668013bb846e5bd707124fff85b3f21 --- /dev/null +++ b/data/test/clock3.bas @@ -0,0 +1,22 @@ +100 REM "A little clock in BASIC" +120 @O=2: CLS +200 REM "Display the clock and wait for input" +210 @X=0: @Y=0 +220 PRINT @T$(1,8);" ": PRINT @T$(10);" "; +230 GET &2, C: IF C=10 THEN GOSUB 3000 +240 GOTO 210 +3000 REM "Input a time and date on line 2" +3010 @X=0: @Y=1: I=1: SET 13,1 +3020 DELAY 200 +3030 RESTORE 1+(I-1)*4: READ D, N$, L, H: N=@T(D) +3040 PUT 27,"j", 27, "l": PRINT N$;N;: PUT 27, "k" +3060 GET &2, C: IF C=0 THEN 3060 +3070 IF C="1" AND I>1 THEN I=I-1 +3080 IF C="2" AND I<6 THEN I=I+1 +3090 IF C="3" AND NL THEN N=N-1 +3120 IF C=10 THEN SET 13,0: GET &2, C: RETURN +3130 @T(D)=N +3140 GOTO 3020 +3600 DATA 2, "Hour :", 0, 24, 1, "Minute: ", 0, 59, 0, "Second: ", 0, 59 +3610 DATA 4, "Day: ", 1, 31, 5, "Month: ", 1, 12, 6, "Year: ", 1970, 2100 diff --git a/data/test/clock4.bas b/data/test/clock4.bas new file mode 100644 index 0000000000000000000000000000000000000000..0231579ae596836c68b19b9903613f0e141aa228 --- /dev/null +++ b/data/test/clock4.bas @@ -0,0 +1,29 @@ +100 REM "A little clock in BASIC" +120 @O=2: A=0: CLS +200 REM "Display the clock and wait for input" +210 @X=0: @Y=0 +220 PRINT @T$(1,8);" ": PRINT @T$(10);" "; +230 IF NOT A THEN @D(16)=" " +240 ELSE @D(16)="A": IF @T(2)=@E(2) AND @T(1)=@E(1) THEN GOSUB 4000 +250 GET &2, C: IF C=10 THEN GOSUB 3000 ELSE IF C="1" THEN A=NOT A +260 GOTO 210 +3000 REM "Input a time and date on line 2" +3010 @X=0: @Y=1: I=1: SET 13,1 +3020 DELAY 200 +3030 RESTORE 1+(I-1)*4: READ D, N$, L, H +3035 IF I<7 THEN N=@T(D) ELSE N=@E(D) +3040 PUT 27,"j", 27, "l": PRINT N$;N;: PUT 27, "k" +3060 GET &2, C: IF C=0 THEN 3060 +3070 IF C="1" AND I>1 THEN I=I-1 +3080 IF C="2" AND I<8 THEN I=I+1 +3090 IF C="3" AND NL THEN N=N-1 +3120 IF C=10 THEN SET 13,0: GET &2, C: RETURN +3130 IF I<7 THEN @T(D)=N ELSE @E(D)=N +3140 GOTO 3020 +3600 DATA 2, "Hour :", 0, 23, 1, "Minute: ", 0, 59, 0, "Second: ", 0, 59 +3610 DATA 4, "Day: ", 1, 31, 5, "Month: ", 1, 12, 6, "Year: ", 1970, 2100 +3620 DATA 2, "Alarm h: ", 0, 24, 1, "Alarm m: ", 0, 59 +4000 REM "The alarm routine" +4010 DELAY 500 +4030 RETURN diff --git a/data/test/tread1.bas b/data/test/tread1.bas new file mode 100644 index 0000000000000000000000000000000000000000..fa7470b3fd3b378e9059bb792e044caa21292a15 --- /dev/null +++ b/data/test/tread1.bas @@ -0,0 +1,6 @@ +10 READ A +20 PRINT A +30 READ B,C +40 PRINT B,C +50 READ A(1),A(2),A(3) +100 DATA 1,2,3,4,5 diff --git a/data/test/vt52test.bas b/data/test/vt52test.bas new file mode 100644 index 0000000000000000000000000000000000000000..0655ef0ebea9baf60dc57858ab533700efd39fa9 --- /dev/null +++ b/data/test/vt52test.bas @@ -0,0 +1,60 @@ +5 D=2 +10 PUT &D, D +20 PRINT &D,"the quick brown fox" +30 PRINT &D,"jumps over the lazy dog" +35 DELAY 2000 +40 PUT &D,27,"A",27,"L" +45 DELAY 1000 +50 PRINT &D,"" +55 DELAY 2000 +60 PUT &D,27,"A",27,"M" +70 PUT &D,27,"B" +80 PRINT &D,"" +90 DELAY 1000 +100 PUT &D,27,"A",27,"M" +110 PUT &D,27,"H",27,"I" +120 DELAY 1000 +130 PRINT &D,"" +140 DELAY 1000 +150 PUT &D,27,"H",27,"K" +160 PRINT &D,"" +170 DELAY 1000 +180 PUT &D,27,"A" +190 PUT &D,27,"M" +200 PUT &D,27,"Y",32+3,32+5 +210 PRINT &D,"I am here"; +230 PUT &D,27,"j" +240 PRINT &D +250 PRINT &D,"the next line " +260 DELAY 1000 +270 PUT &D,27,"k" +280 PRINT &D," - back again" +290 DELAY 1000 +300 PUT &D,27,"J" +310 PRINT &D,""; +320 DELAY 1000 +330 PUT &D,27,"o" +340 PRINT &D,"gone"; +350 PUT &D,13 +355 DELAY 1000 +360 PRINT &D,"carriage return" +370 DELAY 1000 +380 PUT &D,27,"d" +400 PUT &D,27,"H" +410 FOR I=0 TO 15 +420 PUT &D,27,"b",32+I +430 PRINT &D,"color" +435 delay 200 +440 NEXT +500 FOR I=1 TO 10 +510 PRINT &D +520 DELAY 500 +530 NEXT +600 CLS +610 T=MILLIS(1) +620 PRINT &D,"the quick brown fox" +630 PRINT &D,"jumps over the lazy dog" +640 T=MILLIS(1)-T +650 PRINT &D,T,"ms for ";42;" chars" +660 PRINT &D,"bandwidth ",42*8*1000/T;" baud" + diff --git a/data/test/vt52test2.bas b/data/test/vt52test2.bas new file mode 100644 index 0000000000000000000000000000000000000000..edd9efe9a394c0eebc77be1cefa1ea571230fd4f --- /dev/null +++ b/data/test/vt52test2.bas @@ -0,0 +1,58 @@ +5 D=4 +8 OPEN &D,"/dev/cu.usbmodem14201" +9 DELAY 4000 +10 PUT &D,12 +20 PRINT &D,"the quick brown fox" +30 PRINT &D,"jumps over the lazy dog" +35 DELAY 2000 +40 PUT &D,27,"A",27,"L" +45 DELAY 1000 +50 PRINT &D,"" +55 DELAY 2000 +60 PUT &D,27,"A",27,"M" +70 PUT &D,27,"B" +80 PRINT &D,"" +90 DELAY 1000 +100 PUT &D,27,"A",27,"M" +110 PUT &D,27,"H",27,"I" +120 DELAY 1000 +130 PRINT &D,"" +140 DELAY 1000 +150 PUT &D,27,"H",27,"K" +160 PRINT &D,"" +170 DELAY 1000 +180 PUT &D,27,"A" +190 PUT &D,27,"M" +200 PUT &D,27,"Y",32+3,32+5 +210 PRINT &D,"I am here"; +230 PUT &D,27,"j" +240 PRINT &D +250 PRINT &D,"the next line " +260 DELAY 1000 +270 PUT &D,27,"k" +280 PRINT &D," - back again" +290 DELAY 1000 +300 PUT &D,27,"J" +310 PRINT &D,""; +320 DELAY 1000 +330 PUT &D,27,"o" +340 PRINT &D,"gone"; +350 PUT &D,13 +355 DELAY 1000 +360 PRINT &D,"carriage return" +370 DELAY 1000 +380 PUT &D,27,"d" +400 PUT &D,27,"H" +410 FOR I=0 TO 15 +420 PUT &D,27,"b",32+I +430 PRINT &D,"color" +435 DELAY 200 +440 NEXT +500 FOR I=1 TO 10 +510 PRINT &D +520 DELAY 500 +530 NEXT +600 PUT &D,12 +620 PRINT &D,"the quick brown fox" +630 PRINT &D,"jumps over the lazy dog" + diff --git a/data/utility/arduinoterm b/data/utility/arduinoterm new file mode 100644 index 0000000000000000000000000000000000000000..e6a142606399cb23e718a9e643ffb485b5e1f98e --- /dev/null +++ b/data/utility/arduinoterm @@ -0,0 +1,3 @@ +#!/bin/sh +python3 /Users/stefan/Documents/Technology/tinybasic/monitor.py +python3 /Users/stefan/Documents/Technology/tinybasic/utility/monitor.py diff --git a/data/utility/dosify b/data/utility/dosify new file mode 100644 index 0000000000000000000000000000000000000000..8f6d614c294ce734589286c388bdc480925ca535 --- /dev/null +++ b/data/utility/dosify @@ -0,0 +1 @@ +cat $1 | sed 's/\/\/.*$//g' | perl -pe 's/\r\n|\n|\r/\r\n/g' | sed 's/^#undef.*MSDOS/#define MSDOS/' diff --git a/data/utility/monitor.py b/data/utility/monitor.py new file mode 100644 index 0000000000000000000000000000000000000000..89055912005b279d3a7bc9532dd0b51601fcb451 --- /dev/null +++ b/data/utility/monitor.py @@ -0,0 +1,107 @@ +#!/usr/bin/python3 +# +# $Id: monitor.py,v 1.7 2021/08/20 20:06:23 stefan Exp stefan $ +# +# Arduino Monitor V0.1 for Stefan's tinybasic. +# +# This is a very basic serial monitor with a few special features. +# it connects to the Arduino serial port and interacts with +# Stefan's Tinybasic. +# +# Special commands +# L loads a program into the Arduino - literally typing it in +# S saves a program from the Arduino - collects the output of LIST +# to save type , enter the file name and then type list +# end save mode with another , then hand edit the output +# file to remove the "list" and "Ready" +# D ends the monitor +# +# Set the port here +# +#port = '/dev/cu.usbserial-1420' +port = '/dev/cu.wchusbserial1420' +#port = '/dev/cu.wchusbserial1410' +#port = '/dev/cu.usbserial-1410' +#port = '/dev/cu.usbmodem14201' +#port = '/dev/cu.usbmodem14101' +#port = '/dev/cu.usbserial-0001' +#port = '/dev/ttyUSB0' +#port = '/dev/cu.usbserial-A900f3Ty' + +import sys +import serial +import threading +from time import sleep +import readchar + +# timeout is needed to terminate properly + +ser = serial.Serial(port, 9600, timeout = 0.3, xonxoff = True) + +# +# The upload function +# + +def sendline(l): + sleep(0.1) + for ch in l: + sleep(0.01) + chp = ch.encode('utf-8') + ser.write(chp) + +cont = True; +saveflag = False; + +def loadfile(): + fn = input("Loading from file: ") + f = open(fn, "r") + for line in f: + sendline(line) + +# +# The reader thread +# +def readfunction(): + while cont: + ch = ser.read() + chp = ch.decode('utf-8') + if ( chp == "\n"): + sys.stdout.write("\r"); + if ( chp == "\r"): + sys.stdout.write("\r"); + sys.stdout.write("\n"); + if ( chp == "\x7f" ): + sys.stdout.write("\b") + sys.stdout.write(chp) + sys.stdout.flush() + if (saveflag): + if (chp != "\r"): + f2.write(chp) + +reader = threading.Thread(target=readfunction) +reader.start() + +# +# The write loop +# +while cont: + ch = readchar.readchar() + chp = ch.encode('utf-8') + if (chp == b'\x04'): + cont = False + elif (chp == b'\x0c'): + loadfile() + elif (chp == b'\x13'): + if (not saveflag): + print("Save on") + fn = input("Save to file: ") + f2 = open(fn, "w") + saveflag = True + else: + saveflag = False + print("Save off") + f2.close() + else: + ser.write(chp) + +reader.join() diff --git a/data/utility/tc201.zip b/data/utility/tc201.zip new file mode 100644 index 0000000000000000000000000000000000000000..fcc438075ecad8323ad86e95fa48792409079bde --- /dev/null +++ b/data/utility/tc201.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49feb4a54a1328fb7e48022ae42c9787a2d85ee9d8b9407f64884da715f86185 +size 2263886