~remexre/stahlos

ref: 7bf2eb256167be5b7093a32d8819707d1bca1286 stahlos/src/kernel-aarch64/init/repl.fth -rw-r--r-- 250 bytes
7bf2eb25Nathan Ringo ... 2 months ago
                                                                                
1
2
3
4
5
6
7
CREATE repl:buffer 80 ALLOT
: repl:read-line repl:buffer DUP 80 READ-LINE ;
: repl:one-inner ." > " repl:read-line 0 EVALUATE ;
: repl:one ['] repl:one-inner CATCH ?DUP IF ." error " .DECIMAL ELSE ." ok" THEN CR ;
: repl BEGIN repl:one AGAIN ;

repl