[gforth] / gforth / code.fs  

gforth: gforth/code.fs

Diff for /gforth/code.fs between version 1.21 and 1.22

version 1.21, Sat Apr 17 21:31:36 2010 UTC version 1.22, Sun Apr 25 18:27:09 2010 UTC
Line 41 
Line 41 
     defstart init-asm ;      defstart init-asm ;
   
 [ifdef] doabicode:  [ifdef] doabicode:
 : abi-code ( "name" -- colon-sys )      \ gforth        abi_code  : abi-code ( "name" -- colon-sys )      \ gforth        abi-code
    \G Start a native code definition that is called using the platform's     \G Start a native code definition that is called using the platform's
    \G ABI conventions corresponding to the C-prototype:     \G ABI conventions corresponding to the C-prototype:
    \G @example     \G @example
Line 69 
Line 69 
 interpret/compile: ;code ( compilation. colon-sys1 -- colon-sys2 )      \ tools-ext     semicolon-code  interpret/compile: ;code ( compilation. colon-sys1 -- colon-sys2 )      \ tools-ext     semicolon-code
 \g The code after @code{;code} becomes the behaviour of the last  \g The code after @code{;code} becomes the behaviour of the last
 \g defined word (which must be a @code{create}d word).  The same  \g defined word (which must be a @code{create}d word).  The same
 \g caveats apply as for @code{code}, but Gforth does not have a  \g caveats apply as for @code{code}, so we recommend using
 \g @code{;abi-code} yet.  As a workaround, you can use @code{does> foo  \g @code{;abi-code} instead.
 \g ;} instead, where @code{foo} is defined with @code{abi-code}.  
   [ifdef] do;abicode:
   : !;abi-code ( addr -- )
       latestxt do;abicode: any-code! ;
   
   : ;abi-code ( -- ) \ gforth semicolon-abi-code
       ['] !;abi-code does>-like postpone [ init-asm ; immediate
   [then]
   
 : end-code ( colon-sys -- )     \ gforth        end_code  : end-code ( colon-sys -- )     \ gforth        end_code
     \G End a code definition.  Note that you have to assemble the      \G End a code definition.  Note that you have to assemble the
Line 80 
Line 87 
     \G yourself.      \G yourself.
     latestxt here over - flush-icache      latestxt here over - flush-icache
     previous ?struc reveal ;      previous ?struc reveal ;
   


Generate output suitable for use with a patch program
Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help