ace2ans

Description of the page content

Forth layer to let some Ace Forth programs to be compiled under an ANS Forth.

Tags:

When I write 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.

Source code

\ ace2ans.fs

\ Layer to compile or even run some Ace Forth programs under an ANS Forth.

\ Copyright (C) 2009,2010,2013 Marcos Cruz (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'.
\ 2013-08-22 Changes in comments.
\ 2013-08-22 New: 'variable'.

\ To-do
\ 2013-08-22 Can Ace Forth's 'repeat' be used without 'while'?

: 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  ;  \ xxx draft 
: definer  ( -- )  postpone : postpone create  ;  \ xxx draft
: edit  ( "text" -- )  parse-word 2drop  ;
: fast  ( -- )  ;
: forget  ( "text" -- )  parse-word 2drop  ;
: i'  ( -- n )  i  ;  \ xxx unfinished
: in  ( a -- ) drop  ;
: inkey  ( -- c )  key? if key else 0 then  ;
: invis  ( -- )  ;
: line  ( -- )  ;  \ xxx 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  ( -- )  ;  \ xxx unfinished
: runs>  ( -- ) does>  ;  immediate  \ xxx 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  ;
: variable  ( x "name" -- )  drop variable  ;
: vis  ( -- )  ;
: vlist  ( -- )  words  ;

Downloads