| here swap read-whole-file |
here swap read-whole-file |
| dup endinput ! |
dup endinput ! |
| here - allot |
here - allot |
| |
align |
| primitives2something ; |
primitives2something ; |
| |
|
| \ types |
\ types |
| \ n1 is the offset of the accessed item, n2, n3 are effect-*-size |
\ n1 is the offset of the accessed item, n2, n3 are effect-*-size |
| drop swap - 1- dup |
drop swap - 1- dup |
| if |
if |
| ." sp[" . ." ]" |
." sp[" 0 .r ." ]" |
| else |
else |
| drop ." TOS" |
drop ." TOS" |
| endif ; |
endif ; |
| \ n1 is the offset of the accessed item, n2, n3 are effect-*-size |
\ n1 is the offset of the accessed item, n2, n3 are effect-*-size |
| nip swap - 1- dup |
nip swap - 1- dup |
| if |
if |
| ." fp[" . ." ]" |
." fp[" 0 .r ." ]" |
| else |
else |
| drop ." FTOS" |
drop ." FTOS" |
| endif ; |
endif ; |
| effect-out-size 2@ |
effect-out-size 2@ |
| rot swap - ( d-in d-out f-diff ) |
rot swap - ( d-in d-out f-diff ) |
| rot rot - ( f-diff d-diff ) |
rot rot - ( f-diff d-diff ) |
| ." sp += " . ." ;" cr |
?dup IF ." sp += " 0 .r ." ;" cr THEN |
| ." fp += " . ." ;" cr ; |
?dup IF ." fp += " 0 .r ." ;" cr THEN ; |
| |
|
| : store ( item -- ) |
: store ( item -- ) |
| \ f is true if the item should be stored |
\ f is true if the item should be stored |
| compute-offsets \ for everything else |
compute-offsets \ for everything else |
| flush-tos |
flush-tos |
| fetches |
fetches |
| stack-pointer-updates |
stack-pointer-updates cr |
| ." NAME(" [char] " emit forth-name 2@ type [char] " emit ." )" cr \ debugging |
." NAME(" [char] " emit forth-name 2@ type [char] " emit ." )" cr \ debugging |
| ." {" cr |
." {" cr |
| c-code 2@ type |
c-code 2@ type |