aoc-forth

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.alexwennerberg.com/aoc-forth
Log | Files | Refs | README

commit 90cde4e604580828f5932525347472e715d2b8b2
parent 73e77d1a4020ae66046058f1341d758b07549cdb
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Wed, 24 Aug 2022 10:50:00 -0400

Cleanup template, get boot working

Diffstat:
A.gitignore | 2++
M2021/01.fs | 14+++++++++++---
A2021/02.fs | 2++
A2021/template.fs | 11+++++++++++
MREADME.md | 12+++++++++++-
5 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,2 @@ +*.rom +input*.txt diff --git a/2021/01.fs b/2021/01.fs @@ -11,7 +11,6 @@ h# 5000 constant filespace drop ; -" input.txt" filename : solvea 0 @@ -23,5 +22,14 @@ h# 5000 constant filespace drop ; -solvea . -( TODO solve part 2 ) +: solveb +200 +; + +: boot + s" input01.txt" filename + solvea . solveb . + bye +; +save 01.rom \ Replace with soln number +bye diff --git a/2021/02.fs b/2021/02.fs @@ -0,0 +1,2 @@ + + diff --git a/2021/template.fs b/2021/template.fs @@ -0,0 +1,11 @@ +: solvea +; + +: solveb +; + +: boot + s" input01.txt" filename + solvea . cr solveb bye ; +save 01.rom \ Replace with soln number +bye diff --git a/README.md b/README.md @@ -12,4 +12,14 @@ in preparation for 2022. A notable challenge will be that I only have access to 64kb of memory. May have to use swap space of some sort. -Running instructions TBD +To run each solution (after building or acquiring ufx.rom from the `uf` repo): + +``` +# make sure input is in inputN.txt (TODO: make a CLI arg) +uxncli ufx.rom < N.fs +uxnemu N.rom +``` + +Some solutions have visualizations, others do not. For those that don't, you can use uxncli + +part 1 and part 2 solutions will be printed to the console, newline separated