diff options
author | Benji Dial <benji@benjidial.net> | 2023-05-30 00:22:29 -0400 |
---|---|---|
committer | Benji Dial <benji@benjidial.net> | 2023-05-30 00:22:29 -0400 |
commit | 28e855f5424df395dd1ba98354a53536d4598d47 (patch) | |
tree | 21e17429958fedf754ac7aad59377f6fdac2a08f /warriors/dwarf-replicator.red | |
parent | e56afe88854d3da8d0d9d5c836da6024b02a9bac (diff) | |
download | lib94-28e855f5424df395dd1ba98354a53536d4598d47.tar.gz |
fix djn again, and pre-dec / post-inc; few other changes
Diffstat (limited to 'warriors/dwarf-replicator.red')
-rw-r--r-- | warriors/dwarf-replicator.red | 55 |
1 files changed, 55 insertions, 0 deletions
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, <start + + dat + +dwarf: + mov end, end + 4 + add.ab #4, dwarf + jmp 2 + + dat + + seq.ab #start + 723 - dwarf, dwarf + jmp dwarf + jmp 2 + + dat + +core_clear: + mov end, end + 1 + add.ab #1, 0-1 + jmp 2 + + dat + + seq.a #0-1, core_clear + jmp core_clear + jmp 2 + + dat + + mov.ab #end + 1, core_clear + jmp core_clear + dat + +end: |