;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Redcode warrior that builds a bomb carpet in front of itself and jumps ; ; over it afterwards - just to start building the next bomb carpet. If not ; ; interrupted by another warrior it will keep going until 'Max Cycles' ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Optimized for the standard terminal size of 80 columns x 24 rows ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; jmp throw ; Jump to bomb throwing instructions src dat #0 ; The source address to copy from dest dat #995 ; The destination address to copy to bomb dat #15 ; The distance to the first bomb throw mov bomb, @bomb ; Throw the first bomb to +15 add #5, bomb ; Increase distance by +5 to next bomb cmp bomb, #995 ; Bomb carpet finally build? jmp throw ; No! Go on building the bomb carpet copy mov @src, @dest ; Yes! Copy ourself over the bombs add #1, src ; Increment source address add #1, dest ; Increment destination address cmp src, #15 ; Have all lines been copied? jmp copy ; No! Go on copying ourself mov #995, 985 ; Yes! Reset the dest variable at our copy mov #15, 985 ; Also reset the bomb variable there jmp 985 ; Finally: Jump to our new copy!