[gforth] / gforth / kernel / basics.fs  

gforth: gforth/kernel/basics.fs

Diff for /gforth/kernel/basics.fs between version 1.12 and 1.13

version 1.12, Tue Mar 23 20:24:23 1999 UTC version 1.13, Mon Mar 29 22:52:32 1999 UTC
Line 62 
Line 62 
 [THEN]  [THEN]
   
 : unused ( -- u ) \ core-ext  : unused ( -- u ) \ core-ext
       \G Return the amount of free space remaining (in address units) in
       \G the region addressed by @code{here}.
     dictionary-end here - [ word-pno-size pad-minsize + ] Literal - ;      dictionary-end here - [ word-pno-size pad-minsize + ] Literal - ;
   
 \ here is used for pad calculation!  \ here is used for pad calculation!
   
 : dp    ( -- addr ) \ gforth  : dp    ( -- addr ) \ gforth
     dpp @ ;      dpp @ ;
 : here  ( -- here ) \ core  : here  ( -- addr ) \ core
       \G Return the address of the next free location in data space.
     dp @ ;      dp @ ;
   
 \ on off                                               23feb93py  \ on off                                               23feb93py
Line 141 
Line 144 
 : accumulate ( +d0 addr digit - +d1 addr )  : accumulate ( +d0 addr digit - +d1 addr )
   swap >r swap  base @  um* drop rot  base @  um* d+ r> ;    swap >r swap  base @  um* drop rot  base @  um* d+ r> ;
   
 : >number ( d1 addr1 count1 -- d2 addr2 count2 ) \ core  : >number ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 ) \ core
       \G Attempt to convert the character string @var{c-addr1, u1} to an
       \G unsigned number in the current number base. The double
       \G @var{ud1} accumulates the result of the conversion to form
       \G @var{ud2}. Conversion continues, left-to-right, until the whole
       \G string is converted or a character that is not convertable in
       \G the current number base is encountered (including + or -). For
       \G each convertable character, @var{ud1} is first multiplied by
       \G the value in @code{BASE} and then incremented by the value
       \G represented by the character. @var{c-addr2} is the location of
       \G the first unconverted character (past the end of the string if
       \G the whole string was converted). @var{u2} is the number of
       \G unconverted characters in the string. Overflow is not detected.
     0      0
     ?DO      ?DO
         count digit?          count digit?


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help