Skip to content
This repository was archived by the owner on Nov 26, 2019. It is now read-only.

jkotlinski/htdk

Repository files navigation

Hack n' Trade Development Kit

Cross-compiled 6502 Forth, using ACME assembler. Non-standard, but matches Forth 2012 when possible.

Usage: ./htfc code.fs ; acme code.asm

The resulting code.prg runs the user-defined word named start.

Words

Not supported

Since this is a cross-compiled Forth, rather than a true Forth, many important compiling words are missing:

[ ] ' find immediate literal postpone state does> >body evaluate source >in word

Compiling

: ; :code ;code value hex

Arithmetic

1+ 2+ 1- + -

Logic

= 0= and

Memory

! @ c! c@ fill

Stack manipulation

drop rot swap over dup 2dup

Control structures

begin again if else then

Number format

  • 1234 - decimal
  • #1234 - decimal
  • $d020 - hexadecimal

Assembler

  • MSB = top of MSB parameter stack
  • LSB = top of LSB parameter stack
  • W = zero-page work area cell

Code words are defined using ACME assembler:

:code incbg
-   inc $d020
    jmp - ;code

About

Hack n' Trade Development Kit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages