Commit 366ac6b3 authored by pazsan's avatar pazsan

Added fsincos, corrected fsin.

Added fexpm1, flog1p.
Changed EXIT to ;S
Created immediate EXIT in kernal.fs and cross.fs for locals.
parent 960b5be6
\ CROSS.FS The Cross-Compiler 06oct92py
\ $Id: cross.fs,v 1.1 1994-02-11 16:30:45 anton Exp $
\ $Id: cross.fs,v 1.2 1994-05-03 15:24:11 pazsan Exp $
\ Idea and implementation: Bernd Paysan (py)
\ Copyright 1992 by the ANSI figForth Development Group
......@@ -412,7 +412,7 @@ ghost (do) ghost (?do) 2drop
ghost (for) drop
ghost (loop) ghost (+loop) 2drop
ghost (next) drop
ghost unloop ghost EXIT 2drop
ghost unloop ghost ;S 2drop
ghost lit ghost (compile) ghost ! 2drop drop
ghost (;code) ghost noop 2drop
ghost (.") ghost (S") ghost (ABORT") 2drop drop
......@@ -481,10 +481,12 @@ Cond: [Char] ( "<char>" -- ) restrict? Char lit, ;Cond
(THeader ;Resolve ! there ;Resolve cell+ !
docol, depth T ] H ;
Cond: EXIT ( -- ) restrict? compile ;S ;Cond
Cond: ; ( -- ) restrict?
depth ?dup IF 1- <> ABORT" CROSS: Stack changed"
ELSE true ABORT" CROSS: Stack empty" THEN
compile EXIT state off
compile ;S state off
;Resolve @
IF ;Resolve @ ;Resolve cell+ @ resolve THEN
;Cond
......
......@@ -509,6 +509,8 @@ Create ??? ," ???"
\ : ; 24feb93py
: EXIT ( -- ) postpone ;s ; immediate
: : ( -- colon-sys ) Header [ :docol ] ALiteral cfa, 0 ] ;
: ; ( colon-sys -- ) ?struc postpone exit reveal postpone [ ;
immediate restrict
......
/*
$Id: primitives,v 1.2 1994-04-20 17:12:06 pazsan Exp $
$Id: primitives,v 1.3 1994-05-03 15:24:14 pazsan Exp $
Copyright 1992 by the ANSI figForth Development Group
WARNING: This file is processed by m4. Make sure your identifiers
......@@ -464,7 +464,7 @@ f_addr = fp;
fp! f_addr -- new fp_store
fp = f_addr;
exit -- core
;s -- core exit
/* use ;s as alias */
ip = (Xt *)(*rp++);
......@@ -875,13 +875,32 @@ r2 = cos(r1);
fexp r1 -- r2 float-ext
r2 = exp(r1);
fexpm1 r1 -- r2 float-ext
r2 =
#ifdef expm1
expm1(r1);
#else
exp(r1)-1;
#endif
fln r1 -- r2 float-ext
r2 = log(r1);
flnp1 r1 -- r2 float-ext
r2 =
#ifdef log1p
log1p(r1);
#else
log(r1+1);
#endif
flog r1 -- r2 float-ext
r2 = log10(r1);
fsin r1 -- r2 r3 float-ext
fsin r1 -- r2 float-ext
r2 = sin(r1);
fsincos r1 -- r2 r3 float-ext
r2 = sin(r1);
r3 = cos(r1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment