| save-mem r@ stack-pointer 2! |
save-mem r@ stack-pointer 2! |
| ['] stack-in-index r> stack-in-index-xt ! ; |
['] stack-in-index r> stack-in-index-xt ! ; |
| |
|
| s" sp" save-mem s" Cell" save-mem s" (Cell)" make-stack data-stack |
|
| s" fp" save-mem s" Float" save-mem s" " make-stack fp-stack |
|
| s" rp" save-mem s" Cell" save-mem s" (Cell)" make-stack return-stack |
|
| s" IP" save-mem s" Cell" save-mem s" error don't use # on results" make-stack inst-stream |
|
| ' inst-in-index inst-stream stack-in-index-xt ! |
|
| \ !! initialize stack-in and stack-out |
|
| |
|
| \ stack items |
\ stack items |
| |
|
| : init-item ( addr u addr1 -- ) |
: init-item ( addr u addr1 -- ) |
| stack item item-stack ! |
stack item item-stack ! |
| item declaration ; |
item declaration ; |
| |
|
| |
s" sp" save-mem s" Cell" save-mem s" (Cell)" make-stack data-stack |
| |
s" fp" save-mem s" Float" save-mem s" " make-stack fp-stack |
| |
s" rp" save-mem s" Cell" save-mem s" (Cell)" make-stack return-stack |
| |
s" IP" save-mem s" Cell" save-mem s" error don't use # on results" make-stack inst-stream |
| |
' inst-in-index inst-stream stack-in-index-xt ! |
| |
\ !! initialize stack-in and stack-out |
| |
|
| \ offset computation |
\ offset computation |
| \ the leftmost (i.e. deepest) item has offset 0 |
\ the leftmost (i.e. deepest) item has offset 0 |
| \ the rightmost item has the highest offset |
\ the rightmost item has the highest offset |