version 1.175, 2010/04/11 15:37:22
|
version 1.176, 2010/04/25 18:27:10
|
Line 542 has? flash [IF] ' flash! [ELSE] ' ! [THE
|
Line 542 has? flash [IF] ' flash! [ELSE] ' ! [THE
|
alias code-address! ( c_addr xt -- ) \ gforth |
alias code-address! ( c_addr xt -- ) \ gforth |
\G Create a code field with code address @i{c-addr} at @i{xt}. |
\G Create a code field with code address @i{c-addr} at @i{xt}. |
|
|
: does-code! ( a_addr xt -- ) \ gforth |
: any-code! ( a-addr cfa code-addr -- ) |
|
\ for implementing DOES> and ;ABI-CODE, maybe : |
|
\ code-address is stored at cfa, a-addr at cfa+cell |
|
over ! cell+ ! ; |
|
|
|
: does-code! ( a-addr xt -- ) \ gforth |
\G Create a code field at @i{xt} for a child of a @code{DOES>}-word; |
\G Create a code field at @i{xt} for a child of a @code{DOES>}-word; |
\G @i{a-addr} is the start of the Forth code after @code{DOES>}. |
\G @i{a-addr} is the start of the Forth code after @code{DOES>}. |
[ has? flash [IF] ] |
[ has? flash [IF] ] |
dodoes: over flash! cell+ flash! |
dodoes: over flash! cell+ flash! |
[ [ELSE] ] |
[ [ELSE] ] |
dodoes: over ! cell+ ! |
dodoes: any-code! |
[ [THEN] ] ; |
[ [THEN] ] ; |
|
|
2 cells constant /does-handler ( -- n ) \ gforth |
2 cells constant /does-handler ( -- n ) \ gforth |