From 28e855f5424df395dd1ba98354a53536d4598d47 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Tue, 30 May 2023 00:22:29 -0400 Subject: fix djn again, and pre-dec / post-inc; few other changes --- warriors/big-nothing.red | 30 ++++++++++------------- warriors/dwarf-replicator.red | 55 +++++++++++++++++++++++++++++++++++++++++++ warriors/dwarf.red | 12 ++++------ warriors/epson.red | 42 +++++++++++++++++++++++++++++++++ warriors/imp.red | 4 ---- warriors/simple-clear.red | 9 ------- warriors/splitter.red | 5 ---- warriors/trap.red | 28 ---------------------- 8 files changed, 113 insertions(+), 72 deletions(-) create mode 100644 warriors/dwarf-replicator.red create mode 100644 warriors/epson.red delete mode 100644 warriors/imp.red delete mode 100644 warriors/simple-clear.red delete mode 100644 warriors/splitter.red delete mode 100644 warriors/trap.red (limited to 'warriors') diff --git a/warriors/big-nothing.red b/warriors/big-nothing.red index 8549f6f..a9aa6c9 100644 --- a/warriors/big-nothing.red +++ b/warriors/big-nothing.red @@ -1,20 +1,14 @@ -;author blah -;name big nothing +;author Benji Dial +;name Big Nothing start: -nop -nop -nop -nop -nop -nop -nop -nop -nop -nop -nop -nop -nop -nop -nop -jmp start + nop + nop + nop + nop + nop + nop + nop + nop + nop + jmp start diff --git a/warriors/dwarf-replicator.red b/warriors/dwarf-replicator.red new file mode 100644 index 0000000..f301a05 --- /dev/null +++ b/warriors/dwarf-replicator.red @@ -0,0 +1,55 @@ +;author Benji Dial +;name Dwarf Replicator + +;not a particularly good warrior, but is sufficient to test a few things + +start: + mov 0, 2908 + nop }start, >start + jmp 2 + + dat + + seq.a #end - start, start + jmp start + jmp 2 + + dat + + sub.ab #end - start, start + spl @start + jmp 2, scan + mov bomb + 1, @scan + jmp found_ret, start -background: diff --git a/warriors/splitter.red b/warriors/splitter.red deleted file mode 100644 index 17016c4..0000000 --- a/warriors/splitter.red +++ /dev/null @@ -1,5 +0,0 @@ -;author blah -;name splitter - -spl 0 -jmp 0-1 diff --git a/warriors/trap.red b/warriors/trap.red deleted file mode 100644 index 681ea6e..0000000 --- a/warriors/trap.red +++ /dev/null @@ -1,28 +0,0 @@ -;author benji -;name trap - -org start - -trap: -spl 1 -jmp trap - -start: -mov.i bomb, bomb + 8 -add.ab #8, start -sub.ab #8, bomb -sne.ab #bomb - 8 - start, start -jmp core_clear -jmp start - -bomb: -jmp trap - 8 - -core_clear: -mov background, background + 1 -add.ab #1, core_clear -jnz.b core_clear, core_clear -mov.ab #background + 1 - core_clear, core_clear -jmp core_clear - -background: -- cgit v1.2.3