en:pfw:kangoeroe
                Kangaroo method
The “lone” DOES> is used for the creation of only one word rather than for the creation of a category of words. simple example in noForth
create .DAY ( n -- )  s" SunMonTueWedThuFriSat ? " m, align
    does> swap 7 umin 3 * + 3 type ;
example in noForth
create :
    assembler   ip push   w ip mov   next   forth   \ DOCOL
    does> create here cell- doer! ] ;               \ Action
or
:noname     does> create here cell- doer! ] ;
create :
    assembler   ip push   w ip mov   next   forth
execute
“faraway” DOES> for forward references in metacompiler
create :
    assembler   ip push   w ip mov   next   forth
    ... \ many other definitions
TELL : TO-DO: create here cell- doer! ] ;
literal pool in assembler words with CODE>
code !RP0  ( -- )
    ramadr: RP0 ,       \ register w points to this literal
    code>   day  w ) ldr,
            day  day ) ldr,
            rp day mov,
    next, end-code
(an)
Please add your comments below.
en/pfw/kangoeroe.txt · Last modified: 2023-09-04 18:16 by uho
                
                
Discussion
The same technique works in gforth: