Documentation request
Closed this issue · 14 comments
This may not be a direction you are interested in, but it would be nice to have a basic outline of how to add additional tokens and functions to the interpreter. I add a WDT based reset command and token, but am having trouble adding commands with arguments (servo and motor speed commands). I stripped out the DWRITE code and dropped in a servo command which worked fine, but I don't understand the numbering attached to the tokens and how how they relate to the BASE token.
If you don't want to get into extensibility I fully understand.
This is great! I had reverse engineered most of it but my error was trying add a new commands as -128 and -129. The RESET I added does work as -128 but I will move it to the correct spot. Do we need to change the "#define NKEYWORDS 3+19+13+12+11+5+2+7+7+7+12" to include additional KEYWORDS?
Just tested that - it works on my 1284 SBC but have no idea why lol. I used the WDT library and this:
void soft_restart() { do { wdt_enable(WDTO_15MS); for (;;) { } } while (0); }
Just had a look. You added a keyword to position the cursor. This functionality is always there ;-) Try to do @x=10: @y=8: PRINT „Something“; The special variables @x, @y are the cursor postions. They are read / write. Best, Stefan
…
Am 05.07.2022 um 22:51 schrieb Paweł Grobelniak @.>: Ha, good to know there is this documentation :) I've been able to add few (not very useful) commands myself in my fork. wt., 5 lip 2022, 22:41 użytkownik Stefan Lenz @.> napisał: > Actually I wrote a little tutorial on how to extend the language: > > > https://github.com/slviajero/tinybasic/wiki/How-to-compile-Stefan's-BASIC-(and-how-it-works)#how-to-add-your-own-commands > < > https://github.com/slviajero/tinybasic/wiki/How-to-compile-Stefan's-BASIC-(and-how-it-works)#how-to-add-your-own-commands > > > > Maybe this helps. If you want to do something more complicated, please > tell me. > I can create some template functions. > > Best, > Stefan > > > Am 05.07.2022 um 15:16 schrieb Encom Lab @.>: > > > > > > This may not be a direction you are interested in, but it would be nice > to have a basic outline of how to add additional tokens and functions to > the interpreter. I add a WDT based reset command and token, but am having > trouble adding commands with arguments (servo and motor speed commands). I > stripped out the DWRITE code and dropped in a servo command which worked > fine, but I don't understand the numbering attached to the tokens and how > how they relate to the BASE token. > > > > If you don't want to get into extensibility I fully understand. > > > > — > > Reply to this email directly, view it on GitHub < > #23>, or unsubscribe < > https://github.com/notifications/unsubscribe-auth/ACSY56FTOPGC2RTPV645PHTVSQYRRANCNFSM52WF6C4Q > >. > > You are receiving this because you are subscribed to this thread. > > > > — > Reply to this email directly, view it on GitHub > <#23 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AA4ZW22ALUVL33YKQWRADFLVSSMYFANCNFSM52WF6C4Q > . > You are receiving this because you are subscribed to this thread.Message > ID: @.> > — Reply to this email directly, view it on GitHub <#23 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56ENKHBC75RX6M37G4LVSSN5RANCNFSM52WF6C4Q. You are receiving this because you commented.
I suspected i might have missed something like that :D thanks. i wrote few commands to tinker with the terminal modes/resolutions just for the sake of tinkering
documentation added
Thanks :) i have also implemented @t to use sdl_ticks because i didn't notice there is already MILLIS ;D