• Pendulum X

    From John Metcalf@21:1/5 to All on Tue Nov 8 14:48:56 2022
    Pendulum is a .75c scanner related to HSA which restores the scan pointer
    after the attack to avoid breaking the scan pattern. There's also no
    need to initialise the scan pointer. Here's the version currently on the
    94x hill:

    ;redcode-94x
    ;name Pendulum X
    ;author John Metcalf
    ;strategy .75c scanner
    ;assert CORESIZE==55440

    step equ 13
    ptr equ (inc-step)

    bomb spl #0, {0

    wipe mov @last, <ptr
    mov >ptr, >ptr
    jmn.f wipe, >ptr

    reset mov.ab ptr, ptr

    scan sub inc, ptr
    sne.x *ptr, @ptr
    inc sub.x #-2*step, ptr
    jmz.f scan, @ptr

    slt ptr, #last+4-ptr
    djn wipe, ptr
    djn reset, #13
    last djn.f reset, #bomb

    end reset

    Widely-space pointers are also possible (within limits) and can be
    effective. E.g. using 4009 as the step in CORESIZE 8000 and placing the
    ptr at -2*step = -18:

    ;redcode-94
    ;name Pendulum-4009
    ;author John Metcalf
    ;strategy .75c scanner
    ;assert CORESIZE==8000

    step equ 4009
    ptr equ (inc-2*step)

    bomb spl #0, {0

    wipe mov @last, <ptr
    mov >ptr, >ptr
    jmn.f wipe, >ptr

    reset mov.ab ptr, ptr

    scan sub.x inc, ptr
    sne.x *ptr, @ptr
    inc sub.f #-step, ptr
    jmz.f scan, @ptr

    slt ptr, #last+4-ptr
    djn wipe, ptr
    djn reset, #17
    last djn.f reset, #bomb

    end reset

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)