zabot@cesare.dec.com (Adv.Tech.Mgr-ACT Torino) (01/22/88)
Subj: Error on $interpret ( was Re: JFORTH ) Sorry, somehow a SWAP has been swapped out of the file I posted yesterday. Here is the corrected version of $interpret. The missed SWAP is indicated. ---------------------cut here ------------------------------------- : $INTERPRET ( string-addr string-cnt -- ???? ) 'TIB @ >r #TIB @ >r >IN @ >r FBLK @ >r BLK @ >r #TIB ! 'TIB ! >in off fblk off blk off BEGIN bl word dup c@ \ is there anything in the input stream left? WHILE find \ YES ... is it in the dictionary? IF compiling? over >name immediate? 0= and IF cfa, \ COMPILE it if in comp mode AND its not immediate ELSE execute \ otherwise, EXECUTE the thing! THEN ELSE \ if its not found in dictionary, is it a number? dup number? 0= if ." What's that ??-> " $. ." ?" else drop [compile] literal SWAP drop then ( ^^^^ ) THEN REPEAT \ while we did find find something, go back and check again... drop \ nothing left to EXECUTE, get rid of address on stack r> blk ! r> fblk ! r> >in ! r> #tib ! r> 'tib ! ;
page@swan.ulowell.edu (Bob Page) (01/22/88)
zabot@cesare.dec.com (Adv.Tech.Mgr-ACT Torino) wrote: >: $INTERPRET ( string-addr string-cnt -- ???? ) > 'TIB @ >r #TIB @ >r >IN @ >r FBLK @ >r BLK @ >r > #TIB ! 'TIB ! >in off fblk off blk off > BEGIN bl word dup c@ \ is there anything in the input stream left? Looks like some uuencoded file to me! :-) ..Bob -- Bob Page, U of Lowell CS Dept. page@swan.ulowell.edu ulowell!page "I don't know such stuff. I just do eyes." -- from 'Blade Runner'