;redcode-94 ;name Self-Modifying Code v0.11 ;author Ben Ford ;assert (CORESIZE==8000) ;strategy p^3++: silk, rock, scan, burn, wipe ;strategy heavily based on Recycled Bits by David Moore ;strategy improved the brain with ideas from the P^3 switcher ;strategy saved 15 instructions and 1 cycle in brains + tables ;strategy ;strategy v0.11 more constants tweaked and more instructions shaved ;strategy and anti-combatra measure added ;strategy ;strtaegy nothing else seems to want to fall into place ;strategy so going with this and will see what happens boot equ 1430 ; boot distance w0 equ (silk-silk) w1 equ (rock-silk) w2 equ (scan-silk) w3 equ (burn-silk) w4 equ (wipe-silk) ; ----- silk ----- d1 equ 4496 ; 4496 771 2333 4195 d2 equ 1283 ; 1283 748 1737 6234 silk spl 2, < 13 ; lose, need non-0 b-field in prev cell spl 1, < 14 ; win spl 1, < 15 ; tie slk0 spl @ 0, < d1 mov }slk0, >slk0 mov sdat, }3307 mov {slk0, wtop mov *wend, >wtop djn.f -1, {wtop jmp -2, borg mov burn, @ -1 jmz -3, # 0 ; bombed with spl to start clear mov bdat, >burn-bptr djn.f -1, >burn-bptr bdat dat <2667, 2+bptr-burn bmov mov -bhop, >-bhop ; mov half of the incendiary dat \$ 0, \$ 0 dat \$ 0, \$ 0 dat \$ 0, \$ 0 dat \$ 0, \$ 0 ; ----- scan ----- sinc equ 5393 ; 5397 5393 slen equ (sbmb-scan+3) scan jmz.f sjmp, 5000 smov mov sbmb, >scan sadd add #sinc, #sinc sjmp jmz.f smov, @sadd slt.b sadd, #slen mov.b sadd, scan jmn smov, sadd jmp smov, }smov sbmb spl # 0, { 0 dat \$ 0, \$ 0 dat \$ 0, \$ 0 dat \$ 0, \$ 0 dat \$ 0, \$ 0 ; ----- p^3++ brain ----- PKEY equ 34 SIZE equ 9 pmod: main ldp.a # 0, # 13 ; main specific distance from vect ldp.a #PKEY, vect ; 15 mod.ba *pmod, vect ; 14 stp.b *vect, #PKEY add.x *vect, last ; .x is anti-combatra... 'random' booting! for SIZE mov