Clean up include, autoboot, split windows, shorten start.

Drop startup timeout to 100ms.
Clean up exceptions in include.
Cleanup stack in autoboot.
Split out windows into a second string, to work around overflow issue.
This commit is contained in:
Brad Nelson
2023-01-22 16:44:42 -08:00
parent 40400b873e
commit 9ef1ea9f90
7 changed files with 48 additions and 12 deletions

View File

@ -78,11 +78,12 @@ forth definitions internals
: included ( a n -- )
sourcefilename >r >r
>r >r sourcedirname r> r> path-join 2dup sourcefilename!
['] raw-included catch
dup if ." Error including: " sourcefilename type cr then
['] raw-included catch if
." Error including: " sourcefilename type cr
-38 throw
then
sourcefilename& include+
r> r> sourcefilename!
throw ;
r> r> sourcefilename! ;
: include ( "name" -- ) bl parse included ;
@ -98,4 +99,6 @@ forth definitions internals
: required ( a n -- ) 2dup included? if 2drop else included then ;
: needs ( "name" -- ) bl parse required ;
: file-exists? ( "name" -- f ) r/o open-file if drop 0 else close-file throw -1 then ;
forth