When I'm writting code for the Jupiter Ace in plain text format, I miss a way to test it quickly. The spool option of some Jupiter Ace emulators is too slow just to find a missing word in the source. That's why I had the idea to write a code layer to be able to compile the Ace Forth sources under an ANS Forth, as part of the developing and debugging process.
This is a work in progress. Some important words are not finished yet.
Listing
\ ace2ans.fs
\ Layer to compile or even run some Ace Forth programs under an ANS Forth.
\ Copyright (C) 2009,2010 Marcos Cruz (http:\programandala.net)
\ License: http://programandala.net/license
\ 2009-06-07 First version. Some words are not finished.
\ 2010-03-02 New (faulty) versions of definer and compiler .
: ascii ( "text" -- c ) state @ if postpone [char] else char then ; immediate
: at ( y x -- ) swap at-xy ;
: beep ( u1 u2 -- ) 2drop ;
: bload ( "text" -- ) parse-word 2drop ;
: bsave ( "text" -- ) parse-word 2drop ;
: bverify ( "text" -- ) parse-word 2drop ;
: call ( a -- ) drop ;
: cls ( -- ) page ;
: compiler ( -- ) postpone : postpone create ; \ DRAFT!!!
: definer ( -- ) postpone : postpone create ; \ DRAFT!!!
: edit ( "text" -- ) parse-word 2drop ;
: fast ( -- ) ;
: forget ( "text" -- ) parse-word 2drop ;
: i' ( -- n ) i ; \ UNFINISHED!!!
: in ( a -- ) drop ;
: inkey ( -- c ) key? if key else 0 then ;
: invis ( -- ) ;
: line ( -- ) ; \ UNFINISHED!!!
: list ( "text" -- ) see ;
: load ( "text" -- ) postpone include ;
: out ( b a -- ) 2drop ;
: plot ( x y u -- ) drop at-xy [char] . emit ;
: redefine ( "text" -- ) parse-word 2drop ;
: retype ( -- ) ; \ UNFINISHED!!!
: runs> ( -- ) does> ; immediate \ NOT TESTED!!!
: save ( "text" -- ) parse-word 2drop ;
: slow ( -- ) ;
: u* ( u1 u2 -- ud ) um* ;
: u/mod ( ud u1 -- u2 u3 ) um/mod ;
: verify ( "text" -- ) parse-word 2drop ;
: vis ( -- ) ;
: vlist ( -- ) words ;