Close

Got eForth/Z80 working under CP/M

A project log for eForth/z80 modifications

A more hackable eForth/z80

ken-yapKen Yap 08/15/2019 at 01:472 Comments

Woo hoo. I have it working under the RunCPM emulator.

A>EFZ80

eForth v1.00
WORDS
 COLD 'BOOT hi VER WORDS SEE .ID >NAME ?CSP !CSP .S DUMP dm+ _TYPE VARIABLE CREATE USER IMMEDIATE : call, ] ; OVERT $COMPILE $,n ?UNIQUE ." $" ABORT" WHILE ELSE AFT THEN REPEAT AHEAD IF AGAIN UNTIL NEXT BEGIN FOR RECURSE $," LITERAL COMPILE [COMPILE] , ALLOT ' QUIT CONSOLE I/O HAND FILE xio PRESET EVAL ?STACK .OK [ $INTERPRET abort" ABORT NULL$ THROW CATCH QUERY EXPECT accept kTAP TAP ^H NAME? find SAME? NAME> WORD TOKEN CHAR \ ( .( PARSE parse ? . U. U.R .R ."| $"| do$ CR TYPE SPACES SPACE PACE NUF? EMIT KEY ?KEY NUMBER? DIGIT? DECIMAL HEX str #> SIGN #S # HOLD <# EXTRACT DIGIT PACK$ -TRAILING FILL CMOVE @EXECUTE TIB PAD HERE COUNT 2@ 2! +! PICK DEPTH >CHAR BL ALIGNED CELLS CELL- CELL+ */ */MOD M* * UM* / MOD /MOD M/MOD UM/MOD WITHIN MIN MAX < U< = ABS - DNEGATE NEGATE NOT + 2DUP 2DROP ROT ?DUP FORTH forth LAST NP CP CURRENT CONTEXT HANDLER HLD 'NUMBER 'EVAL CSP #TIB >IN SPAN tmp BASE 'PROMPT 'ECHO 'TAP 'EXPECT 'EMIT '?KEY RP0 SP0 doUSER UP doVAR BYE TX! ?RX !IO UM+ XOR OR AND 0< OVER SWAP DROP DUP SP! SP@ RP! RP@ R> R@ >R C@ C! @ ! branch ?branch next EXECUTE EXIT doLIST doLIT ok
65 EMITA ok
BYE
RunCPM Version 3.7 (CP/M 2.2 60K)

A>

It also can be conditionally assembled for the 8080 by changing one equate.

Will check code into GitHub in a moment.

Now to look for some eForth tests. 

Discussions

Thomas wrote 08/15/2019 at 18:08 point

Congrats!

  Are you sure? yes | no

Ken Yap wrote 08/16/2019 at 00:11 point

Thanks, I'll give this project a rest now while I sort out hardware issues with my Z80 and 8080 platforms. And deal with other projects on my plate. Long delivery times from suppliers make one multitask. 😁

  Are you sure? yes | no