diff --git a/20210525/dwarf2.red b/20210525/dwarf2.red new file mode 100644 index 0000000000000000000000000000000000000000..a8b92b9f19e3221dd851fca53b8c94272166972b --- /dev/null +++ b/20210525/dwarf2.red @@ -0,0 +1,17 @@ +;redcode +;name Dwarf +;author A. K. Dewdney, P. Gerwinski +;strategy Throw DAT bombs around memory, hitting every 4th memory cell. +;strategy This program was presented in the first Corewar article. + +; Variante, die bessere Chancen gegen Knirps hat + +bomb DAT #1 + DAT #0 ; Knirps-Falle +dwarf ADD #4, bomb + MOV bomb, @bomb + JMP dwarf + END dwarf ; Programs start at the first line unless + ; an "END start" pseudo-op appears to indicate + ; the first logical instruction. Also, nothing + ; after the END instruction will be assembled. diff --git a/20210525/dwarf3.red b/20210525/dwarf3.red new file mode 100644 index 0000000000000000000000000000000000000000..f73203c1494aea636e0e3a742e7c891139217c14 --- /dev/null +++ b/20210525/dwarf3.red @@ -0,0 +1,17 @@ +;redcode +;name Dwarf +;author A. K. Dewdney, P. Gerwinski +;strategy Throw DAT bombs around memory, hitting every 4th memory cell. +;strategy This program was presented in the first Corewar article. + +; Variante, die noch bessere Chancen gegen Knirps hat ... oder auch nicht ... ?!? + +bomb DAT #1 + DAT #0 ; Knirps-Falle +dwarf ADD #5, bomb + MOV bomb, <bomb + JMP dwarf + END dwarf ; Programs start at the first line unless + ; an "END start" pseudo-op appears to indicate + ; the first logical instruction. Also, nothing + ; after the END instruction will be assembled. diff --git a/20210525/mice-jump.red b/20210525/mice-jump.red new file mode 100644 index 0000000000000000000000000000000000000000..cf87490b286a58775806d7297e3af89afd556673 --- /dev/null +++ b/20210525/mice-jump.red @@ -0,0 +1,13 @@ +;name Mice +;author Chip Wendell, P. Gerwinski +;assert 1 + +ptr dat #0 +start mov #12, ptr ; n = 12 +loop mov @ptr, <dest ; *dest = *(ptr+(*ptr)) + djn loop, ptr ; if(--ptr != 0) + ; goto loop + jmp @dest ; jump(*dest) +dest dat #833 + + end start