FIG Forth on the WDC W65C134SXB board
Posted: Sun Oct 09, 2022 9:49 am
So I first encountered FORTH in 1983 at the Army Apprentice College, I already knew about BASIC so they had a teacher come in to teach me FORTH as one of the BBC Microcomputers had a FORTH ROM installed. So since then I have had a paper listing of FIG FORTH and wanted now to give it a go. So purchased a board from WDC with the W65C134S microcontroller and 32k RAM and a socket for an external ROM chip ( 128k ). I also got the memSIM2 emulator and a cheap USB logic analyser.
First was to get the board to jump from the internal ROM to the external ROM at $800, much head scratching (and use of the logic analyser) later I acheived the fisrt 'Hello World' ( Assembler ) from the external ROM using the internal Serial routines. Then I ported over what I needed for the FORTH ( mainly serial in and out via RS232/USB ) connection and got this running.
So I had the basics in place and started on the FORTH kernel, converting it to assemble with the WDC tool set, the hardest part was getting it to compile to run in RAM but be stored in ROM. The startup would copy it from ROM to RAM before calling 'COLD'.
Then I got it to run and print 'fig-FORTH 1.0' on the terminal emulator.
A little debugging later I have a running system on the board. It currently has a RAM disk buffer that holds 16 screens, this is initialised from data in the ROM at start up... what joy to see '? EMPTY STACK' instead of '? MSG # 0'.
Next job is to see if I can boot straight into the external ROM after RESET and bypass the internal ROM completly.
Points to note:
1) WDC Data sheets and manuals need a lot of time to understand and they miss a few points out.
2) Board is good for a start up system, would like to add in a second serial port to get a 'disk' added.
3) The board has 16 bytes of zero page missing, and would need considerable external decoding and RAM chip to add this. Why they did not have this on board is another question.
First was to get the board to jump from the internal ROM to the external ROM at $800, much head scratching (and use of the logic analyser) later I acheived the fisrt 'Hello World' ( Assembler ) from the external ROM using the internal Serial routines. Then I ported over what I needed for the FORTH ( mainly serial in and out via RS232/USB ) connection and got this running.
So I had the basics in place and started on the FORTH kernel, converting it to assemble with the WDC tool set, the hardest part was getting it to compile to run in RAM but be stored in ROM. The startup would copy it from ROM to RAM before calling 'COLD'.
Then I got it to run and print 'fig-FORTH 1.0' on the terminal emulator.
A little debugging later I have a running system on the board. It currently has a RAM disk buffer that holds 16 screens, this is initialised from data in the ROM at start up... what joy to see '? EMPTY STACK' instead of '? MSG # 0'.
Next job is to see if I can boot straight into the external ROM after RESET and bypass the internal ROM completly.
Points to note:
1) WDC Data sheets and manuals need a lot of time to understand and they miss a few points out.
2) Board is good for a start up system, would like to add in a second serial port to get a 'disk' added.
3) The board has 16 bytes of zero page missing, and would need considerable external decoding and RAM chip to add this. Why they did not have this on board is another question.