Commit 49fade2d authored by Bernd Paysan's avatar Bernd Paysan
Browse files

Added see for flits

Improved alignment of fp lits (now noops compiled before flit)
added crs at end of configure.bat (command.com needs them)
parent 51639d4a
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -4,4 +4,5 @@ ECHO *** Configuring for MS-DOS with DJGPP GNU C ***
COPY MAKEFILE.DOS MAKEFILE
COPY KERNL32L.FI GFORTH.FI
COPY 386.H MACHINE.H
COPY STARTUP.FS STARTUP.UNX
COPY STARTUP.DOS STARTUP.FS
+5 −1
Original line number Diff line number Diff line
\ CROSS.FS     The Cross-Compiler                      06oct92py
\ $Id: cross.fs,v 1.22 1995-02-06 18:14:30 anton Exp $
\ $Id: cross.fs,v 1.23 1995-02-08 13:38:50 pazsan Exp $
\ Idea and implementation: Bernd Paysan (py)
\ Copyright 1992-94 by the GNU Forth Development Group

@@ -23,6 +23,10 @@

\ include other.fs       \ ansforth extentions for cross

: string, ( c-addr u -- )
    \ puts down string as cstring
    dup c, here swap chars dup allot move ;
' falign Alias cfalign
: comment? ( c-addr u -- c-addr u )
        2dup s" (" compare 0=
        IF    postpone (
+4 −2
Original line number Diff line number Diff line
@@ -32,8 +32,10 @@

: fdepth  ( -- n )  f0 @ fp@ - [ 1 floats ] Literal / ;

: FLit ( -- r )  r> faligned dup f@ float+ >r ;
: FLiteral ( r -- )  postpone FLit  falign f, ;  immediate
: FLit ( -- r )  r> dup f@ float+ >r ;
: FLiteral ( r -- )
  BEGIN  here cell+ dup faligned <>  WHILE  postpone noop  REPEAT
  postpone FLit  f, ;  immediate

&15 Value precision
: set-precision  to precision ;
+11 −0
Original line number Diff line number Diff line
@@ -191,6 +191,16 @@ VARIABLE C-Pass
        Display? IF dup @ dup abs 0 <# #S rot sign #> 0 .string bl cemit THEN
        cell+ ;

: c-flit
        Display? IF  dup f@ scratch represent 0=
                     IF    2drop  scratch 3 min 0 .string
                     ELSE   IF  '- cemit  THEN  1-
                            scratch over c@ cemit '. cemit 1 /string 0 .string
                            'E cemit
                            dup abs 0 <# #S rot sign #> 0 .string bl cemit
                 THEN THEN
        float+ ;

: c-s"
        count 2dup + aligned -rot
        Display?
@@ -373,6 +383,7 @@ VARIABLE C-Pass

CREATE C-Table
        ' lit A,         ' c-lit A,
        ' flit A,        ' c-flit A,
        ' (s") A,        ' c-s" A,
        ' (.") A,        ' c-." A,
        ' "lit A,        ' c-c" A,