| \ MAIN.FS Kernal main load file 20may93jaw |
\ MAIN.FS Kernel main load file 20may93jaw |
| |
|
| \ Copyright (C) 1995,1996,1997,1998,2000 Free Software Foundation, Inc. |
\ Copyright (C) 1995,1996,1997,1998,2000 Free Software Foundation, Inc. |
| |
|
| |
|
| |
|
| bl word vocabulary find nip 0= [IF] |
bl word vocabulary find nip 0= [IF] |
| \ if search order stuff is missing assume we compile on a gforth |
\ if search order stuff is missing assume we are compiling on a gforth |
| \ system and include it |
\ system and include it. |
| \ We want the files taken from out current gforth installation |
\ We want the files taken from our current gforth installation |
| \ so we don't include relatively to this file |
\ so we don't include relatively to this file |
| |
|
| require search.fs |
require search.fs |
| require environ.fs |
require environ.fs |
| require envos.fs |
require envos.fs |
| require errors.fs |
require errors.fs |
| require extend.fs \ load core-extended |
require extend.fs \ core-extended |
| require hash.fs |
require hash.fs |
| |
|
| [THEN] |
[THEN] |
| |
|
| \ include etags.fs |
\ include etags.fs |
| |
|
| include ./../cross.fs \ include cross-compiler |
include ./../cross.fs \ cross-compiler |
| |
|
| decimal |
decimal |
| |
|
| 0 , \ locals stack base |
0 , \ locals stack base |
| [THEN] |
[THEN] |
| |
|
| UNLOCK ghost - drop \ ghost must exist because - would be treated as number |
UNLOCK ghost - drop \ need a ghost otherwise "-" would be treated as a number |
| LOCK |
LOCK |
| |
|
| doc-off |
doc-off |
| has? prims [IF] |
has? prims [IF] |
| include ./aliases.fs \ include primitive aliases |
include ./aliases.fs \ primitive aliases |
| [ELSE] |
[ELSE] |
| prims-include |
prims-include |
| undef-words |
undef-words |
| |
|
| \ include ./vars.fs \ variables and other stuff |
\ include ./vars.fs \ variables and other stuff |
| \ include kernel/version.fs \ is in $(build)/kernel |
\ include kernel/version.fs \ is in $(build)/kernel |
| include ./kernel.fs \ load kernel |
include ./kernel.fs \ kernel |
| \ include ./special.fs \ special must be last! |
|
| \ include ./errore.fs |
\ include ./errore.fs |
| include ./doers.fs |
include ./doers.fs |
| has? file [IF] |
has? file [IF] |
| include ./args.fs |
include ./args.fs |
| include ./files.fs \ load file words |
include ./files.fs \ file words |
| include ./paths.fs |
include ./paths.fs |
| include ./require.fs |
include ./require.fs |
| [THEN] |
[THEN] |
| |
|
| has? compiler [IF] |
has? compiler [IF] |
| has? glocals [IF] |
has? glocals [IF] |
| include ./cond.fs \ load IF and co |
include ./cond.fs \ IF and co. |
| [ELSE] |
[ELSE] |
| include ./cond-old.fs \ load IF and co w/o locals |
include ./cond-old.fs \ IF and co. withoutlocals |
| [THEN] |
[THEN] |
| |
\ these two games can be added to provide complex examples for the 4stack |
| |
\ and misc simulators (see arch/4stack/README and arch/misc/README). |
| \ include arch/misc/tt.fs |
\ include arch/misc/tt.fs |
| \ include arch/misc/sokoban.fs |
\ include arch/misc/sokoban.fs |
| [THEN] |
[THEN] |
| has? header [IF] |
has? header [IF] |
| \ UNLOCK |
\ UNLOCK |
| here >address 2 cells ! \ image size |
here >address 2 cells ! \ image size |
| ' boot >body 8 cells A! \ Entry point |
' boot >body 8 cells A! \ image entry point |
| \ LOCK |
\ LOCK |
| [ELSE] |
[ELSE] |
| >boot |
>boot |
| [THEN] |
[THEN] |
| |
|
| include ./pass.fs |
include ./pass.fs \ pass pointers from cross to target |
| |
|
| .unresolved |
.unresolved \ how did we do? |