-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchaingang.red
32 lines (32 loc) · 1.28 KB
/
chaingang.red
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
;redcode
;name ChainGang 1.1
;author Eric J. Schwertfeger
;strategy Vampire & Vampire Hunter that
;strategy is Immune to it's own hunt
;strategy Much improved bombing thanks to
;strategy Julius Andrew Cisek (PitTrap)
;stragety Submitted: @date@
;assert 1
BOMB EQU (WHERE-2)
WHERE JMP PIT,0 ;by adding a value x,-x, we maintain
; a proper distance such that if the instruction is moved to
; where the b field points to, the a field points back to PIT
BLANK DAT #-3,#-3
LOOP ADD INC,WHERE ; JMZ so we don't leave fingerprints that
JMZ LOOP,@WHERE ; BackFire or garlic will find
SLT #TAIL+1,WHERE ; SLT so we don't shoot ourself
JMP LOOP
MOV WHERE,BOMB ; here we compute the address to blast
SUB @WHERE,BOMB ; see BackFire for better explanation
MOV BOMB-1,<BOMB
MOV BOMB-1,<BOMB
MOV BOMB-1,<BOMB
BLAST MOV WHERE,@WHERE
ADD #4000,@WHERE
JMP LOOP
INC DAT #13,#-13
PLOOP2 MOV BOMB-1,<BLANK ; from personal experience, this is the
MOV BOMB-1,<BLANK ; best pit to use. NEVER put the SPL
PIT SPL 0 ; before the MOV, otherwise you kill the
TAIL JMP PLOOP2 ; MOV's, then have no way to kill the SPL
END LOOP