--- gforth/prim 1998/06/04 16:17:41 1.8 +++ gforth/prim 1998/10/18 23:16:51 1.12 @@ -1327,7 +1327,7 @@ a_addr = (Cell *)DOES_CODE(xt); code-address! c_addr xt -- gforth code_address_store ""Creates a code field with code address c_addr at xt"" MAKE_CF(xt, c_addr); -CACHE_FLUSH(xt,PFA(0)); +CACHE_FLUSH(xt,(size_t)PFA(0)); : ! ; @@ -1335,7 +1335,7 @@ does-code! a_addr xt -- gforth does_cod ""creates a code field at xt for a defining-word-defined word; a_addr is the start of the Forth code after DOES>"" MAKE_DOES_CF(xt, a_addr); -CACHE_FLUSH(xt,PFA(0)); +CACHE_FLUSH(xt,(size_t)PFA(0)); : dodoes: over ! cell+ ! ; @@ -1343,7 +1343,7 @@ does-handler! a_addr -- gforth does_hand ""creates a DOES>-handler at address a_addr. a_addr usually points just behind a DOES>."" MAKE_DOES_HANDLER(a_addr); -CACHE_FLUSH(a_addr,DOES_HANDLER_SIZE); +CACHE_FLUSH((caddr_t)a_addr,DOES_HANDLER_SIZE); : drop ; @@ -1371,14 +1371,16 @@ n=1; \+has? os [IF] -(key) -- n gforth paren_key +key-file wfileid -- n gforth paren_key_file fflush(stdout); -/* !! noecho */ -n = key(); +n = key((FILE*)wfileid); -key? -- n facility key_q +key?-file wfileid -- n facility key_q_file fflush(stdout); -n = key_query; +n = key_query((FILE*)wfileid); + +stdin -- wfileid gforth +wfileid = (Cell)stdin; stdout -- wfileid gforth wfileid = (Cell)stdout; @@ -1980,6 +1982,11 @@ f>l r -- gforth f_to_l lp -= sizeof(Float); *(Float *)lp = r; +fpick u -- r gforth +r = fp[u+1]; /* +1, because update of fp happens before this fragment */ +: + floats fp@ + f@ ; + \+[THEN] [THEN] \ has? glocals \+has? OS [IF] @@ -2004,12 +2011,12 @@ define(argclist, \ icall(argnum) define(icall, `icall$1 argflist($1)u -- uret gforth -uret = ((Cell(*)(argdlist($1)))u)(argclist($1)); +uret = (SYSCALL(Cell(*)(argdlist($1)))u)(argclist($1)); ') define(fcall, `fcall$1 argflist($1)u -- rret gforth -rret = ((Float(*)(argdlist($1)))u)(argclist($1)); +rret = (SYSCALL(Float(*)(argdlist($1)))u)(argclist($1)); ')