| |
|
| decimal |
decimal |
| |
|
| has? kernel-size makekernel ( size ) |
has? kernel-size makekernel |
| \ create image-header |
\ create image-header |
| has? header [IF] |
has? header [IF] |
| 0 A, \ base address |
here dup |
| |
A, \ base address |
| 0 , \ checksum |
0 , \ checksum |
| 0 , \ image size (without tags) |
0 , \ image size (without tags) |
| >address , \ dict size |
has? kernel-size |
| |
, \ dict size |
| has? stack-size , \ data stack size |
has? stack-size , \ data stack size |
| has? fstack-size , \ FP stack size |
has? fstack-size , \ FP stack size |
| has? rstack-size , \ return stack size |
has? rstack-size , \ return stack size |
| 0 , \ fp stack base |
0 , \ fp stack base |
| 0 , \ return stack base |
0 , \ return stack base |
| 0 , \ locals stack base |
0 , \ locals stack base |
| |
AConstant image-header |
| |
: forthstart image-header @ ; |
| [THEN] |
[THEN] |
| |
|
| UNLOCK ghost - drop \ need a ghost otherwise "-" would be treated as a number |
UNLOCK ghost - drop \ need a ghost otherwise "-" would be treated as a number |
| [THEN] |
[THEN] |
| doc-on |
doc-on |
| |
|
| 0 AConstant forthstart |
\ 0 AConstant forthstart |
| |
|
| \ 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 |
| |
|
| has? header [IF] |
has? header [IF] |
| \ UNLOCK |
\ UNLOCK |
| here >address 2 cells ! \ image size |
here image-header 2 cells + ! \ image size |
| ' boot >body 8 cells A! \ image entry point |
' boot >body image-header 8 cells + A! \ image entry point |
| \ LOCK |
\ LOCK |
| [ELSE] |
[ELSE] |
| >boot |
>boot |