;redcode-94nop ;name optima finder #1 ;author M Joonas Pihlaja ;strategy show off subroutines in redcode ;assert CORESIZE>=50 ; MAXCYCLES>=CORESIZE*100 load0 z for 0 rof sp rsp dat -1,0 ; sp: data stack pointer ; rsp: return stack pointer ip jmp >0, go+1 ; instruction pointer ; macro to execute next instruction in a threaded subroutine. NEXT equ jmp >ip ; macro to exit from a subroutine. EXIT equ mov.b >rsp, ip equ NEXT ; runtime code for saving ip to stack and for tail recursive calls. ; used like: jmp enter, SUBR-ip ; and: jmp tail, SUBR-ip enter: mov.b ip,