CoreForth-0

cortex/boards/thumbulator.ft.md


Host ———————————————————————

::host::

../janus/compiler.ft

Target ——————————————————————-

::target::

$00000000 to trom
$20000000 to tram
        4 to tcell

trom tdp !
tram tvp !

tram $00001000 + t, 0 t,
trom $00000400 + torg

../cpus/cortex-m0/armv6-m-primitives.ft

::stc:: include ../cpus/cortex-m0/threading-stc.ft
::dtc:: include ../cpus/cortex-m0/threading-dtc.ft
::itc:: include ../cpus/cortex-m0/threading-itc.ft

  $10 buffer:  #docol
  $10 buffer:  #dodoes
  $7C buffer:  psp
      variable s0
  $7C buffer:  rsp
      variable r0

../common/core.ft

../../common/core.ft

../dictionary/common.ft

$E0000000 constant emulator-uart-tx
$E0000004 constant emulator-uart-rx
$E0000008 constant emulator-uart-sr

code wait-key   $2182 $B402 $BEAB end-code

: key?          emulator-uart-sr @ ;
: emit          emulator-uart-tx ! ;
: key           wait-key emulator-uart-rx @ ;

../../common/output.ft

../../common/input.ft

../dictionary/full.ft

::stc:: include ../common/threading-stc.ft
::dtc:: include ../common/threading-dtc.ft
::itc:: include ../common/threading-itc.ft

../../common/exception.ft

../../common/control-flow.ft

../common/compiler.ft

../../common/interpret.ft

../../common/utils.ft

../janus/init.ft

code rom-dump   $6831 $6030 $0008 $0001 $6830 $3604 $B402 $0001 $6830
                $3604 $B402 $2180 $B402 $BEAB end-code
: save-vars     latest @ init-latest i! dp @ init-dp i! vp @ init-vp i! ;
: save          bl word dup c@ 0= if
                  ." missing start word, not saving" drop exit then
                find 0= if ." not found, not saving" drop exit then
                save-vars
                0 here rom-dump ;

: cold          0 (source-id) ! setup-vars ." CoreForth-0 " .threading ."  ready" cr hex abort ;

Host ———————————————————————

::host::

::dtc:: t' #docol $0C + t@ t' ,enter 8 + t!
::dtc:: t' #dodoes $0C + t@ t' ,dodoes 8 + t!

../janus/save-image.ft

::dtc:: s" thumbulator-dtc.bin" save-bin
::stc:: s" thumbulator-stc.bin" save-bin
::itc:: s" thumbulator-itc.bin" save-bin