[gforth] / gforth / kernel / nio.fs  

gforth: gforth/kernel/nio.fs

Diff for /gforth/kernel/nio.fs between version 1.15 and 1.25

version 1.15, Sat Sep 23 15:47:11 2000 UTC version 1.25, Fri Dec 31 18:09:02 2010 UTC
Line 1 
Line 1 
 \ Number IO  \ Number IO
   
 \ Copyright (C) 1995,1996,1997,1998,2000 Free Software Foundation, Inc.  \ Copyright (C) 1995,1996,1997,1998,2000,2003,2006,2007,2010 Free Software Foundation, Inc.
   
 \ This file is part of Gforth.  \ This file is part of Gforth.
   
 \ Gforth is free software; you can redistribute it and/or  \ Gforth is free software; you can redistribute it and/or
 \ modify it under the terms of the GNU General Public License  \ modify it under the terms of the GNU General Public License
 \ as published by the Free Software Foundation; either version 2  \ as published by the Free Software Foundation, either version 3
 \ of the License, or (at your option) any later version.  \ of the License, or (at your option) any later version.
   
 \ This program is distributed in the hope that it will be useful,  \ This program is distributed in the hope that it will be useful,
Line 15 
Line 15 
 \ GNU General Public License for more details.  \ GNU General Public License for more details.
   
 \ You should have received a copy of the GNU General Public License  \ You should have received a copy of the GNU General Public License
 \ along with this program; if not, write to the Free Software  \ along with this program. If not, see http://www.gnu.org/licenses/.
 \ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.  
   
 require ./io.fs  require ./io.fs
   
Line 24 
Line 23 
     \G @var{c-addr} is the address of a transient region that can be      \G @var{c-addr} is the address of a transient region that can be
     \G used as temporary data storage. At least 84 characters of space      \G used as temporary data storage. At least 84 characters of space
     \G is available.      \G is available.
     here word-pno-size + aligned ;      [ has? flash [IF] ] normal-dp @ [ [ELSE] ] here [ [THEN] ]
       word-pno-size + aligned ;
   
 \ hold <# #> sign # #s                                 25jan92py  \ hold <# #> sign # #s                                 25jan92py
   
   has? EC [IF]
       : hld  ( -- addr )  pad cell - ;
       : hold  ( char -- )  hld -1 over +! @ c! ;
       : <#    hld dup ! ;
       : #>   ( d -- addr +n )  2drop hld dup @ tuck - ;
       ' <# alias <<#
       ' noop alias #>>
   [ELSE]
 : hold    ( char -- ) \ core  : hold    ( char -- ) \ core
     \G Used within @code{<#} and @code{#>}. Append the character      \G Used within @code{<#} and @code{#>}. Append the character
     \G @var{char} to the pictured numeric output string.      \G @var{char} to the pictured numeric output string.
Line 58 
Line 66 
     \G Release the hold area started with @code{<<#}.      \G Release the hold area started with @code{<<#}.
     holdend @ dup holdbuf-end u>= -&11 and throw      holdend @ dup holdbuf-end u>= -&11 and throw
     count chars bounds holdptr ! holdend ! ;      count chars bounds holdptr ! holdend ! ;
   [THEN]
   
 : sign    ( n -- ) \ core  : sign    ( n -- ) \ core
     \G Used within @code{<#} and @code{#>}. If @var{n} (a @var{single}      \G Used within @code{<#} and @code{#>}. If @var{n} (a @var{single}
Line 91 
Line 100 
         # 2dup or 0=          # 2dup or 0=
     UNTIL ;      UNTIL ;
   
   : holds ( addr u -- )
       BEGIN  dup  WHILE  1- 2dup + c@ hold  REPEAT  2drop ;
   
 \ print numbers                                        07jun92py  \ print numbers                                        07jun92py
   
 : d.r ( d n -- ) \ double       d-dot-r  : d.r ( d n -- ) \ double       d-dot-r


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help