Skip to content
A Direct Threaded Forth for the WDC W65C816SXB developer board
Assembly Other
  1. Assembly 99.2%
  2. Other 0.8%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
documents
.gitignore
LICENSE.md
Makefile
NMAKE.ERR
NMAKE.EXE
README.md
WDCDB.INI
ans-forth.asm
ans-forth.bin
ans-forth.lst
ans-forth.map
build.bat
clean.bat
debug.bat
device.asm
w65c816.inc
w65c816sxb.asm
w65c816sxb.inc
w65c816sxb.lst

README.md

W65C816SXB ANS Forth

This project builds a Forth environment for a WDC W65C816SXB which can be accessed via a USB serial connection to the ACIA port. (I use a cheap PL2303 module with jumper wires acquired from ebay).

The code is split into two modules namely:

  • The w65c816sxb.asm file is a general purpose vector handler and UART handler (to get around hardware problems in the W65C51 ACIA chip).

  • The ans-forth.asm file is implements the forth environment. This file includes device.asm to implement hardware specific words.

A number of include files are used to support the code, namely:

  • The w65c816.inc file contains useful definitions and macros for the W65C816 processor.

  • The w65c816sxb.inc file contains hardware definitions for the WDC W65C816SXB development board.

Current Status

The code in this repository builds a functional Forth environment that can execute standard commands and compile new words.


W65C816SXB ANS-Forth [16.04]

: STAR ( -- ) 42 EMIT ; Ok
: STARS ( n -- ) 0 DO STAR LOOP ; Ok
CR 7 STARS
*******Ok
: SQUARE ( n -- )  DUP 0 DO DUP STARS CR LOOP DROP ; Ok
CR 6 SQUARE CR
******
******
******
******
******
******

Ok

I will continue to add documentation, more words and debug.

Bugs

  • The generation of new lines during command entry needs to be improved.
You can’t perform that action at this time.