磁芯大战吧 关注:152贴子:550
  • 4回复贴,共1

【原创】可以在内存中倒跳着运行的程序~~~(磁芯大战)

只看楼主收藏回复

;redcode-94b
;assert 1
;name <jmp_back>
;kill <NEW_WARRIOR>
;author zbg
;strategy 可以在内存中按相反的方向跳着运行
;date 2011-Dec-01
;version 1
;原理是把自己每次复制到前面的内存中,然后jump过去
jmp c
a dat #0
b dat #0 ;每次往前跳14格
f dat #-14 ;对b dat的赋值
g dat #13 ;对d djn的赋值
c mov f,b
mov #0,a
mov.b g,d
h mov @a,@b
add #1,a;
add #1,b;
d djn h ,#13
e jmp -19
;原创,转载请注明


1楼2012-06-14 22:23回复
    赞一个
    顺带一提这个程序对Imp Gate秒杀


    2楼2012-06-28 15:00
    回复


      IP属地:广东3楼2012-08-01 21:58
      回复
        把精力集中在前方的程序根本挡不住。
        不过看看这个。。
        ;redcode
        ;name DwarfScout
        ;version 2
        ;author Marcus
        ;date 2004-Feb-05
        ;strategy waits for dwarfy attack and dodges while dwarfing
        ORG EntryPoint
        FSIZE EQU 9 ; field size
        FDIST EQU 473 ; field distance
        DSTEP EQU 5 ; dwarf step size
        fUptr DAT #0, #0 ;watch Pointer to Up-field
        dUptr DAT #0, #0 ;watch dwarf Up pointer
        rlSptr DAT #0, #0 ;watch pointers for relocation
        rlTptr DAT #0, #0 ;watch
        EntryPoint
        MOV.I dwarfLoop, dwarfKillSave
        FIRST ; relocate begins with the following instruction
        initFgenerate MOV.AB #-1*FDIST, fUptr
        MOV.AB #FDIST, fDptr
        generateFloop MOV.I FCODEu, <fUptr
        MOV.I FCODEd, >fDptr
        CMP.AB #FDIST+FSIZE, fDptr
        JMP generateFloop
        SPL dwarfInit
        restartVerify MOV.AB #-1*FDIST, fUptr
        MOV.AB #FDIST, fDptr
        verifyFloop CMP.I FCODEu, <fUptr
        JMP alertUfield
        CMP.I FCODEd, >fDptr
        JMP alertDfield
        CMP.AB #FDIST+FSIZE, fDptr
        JMP verifyFloop
        JMP restartVerify
        dwarfKillSave DAT.I #0
        dwarfInit MOV.I dwarfKillSave, dwarfLoop
        MOV.AB #-MINDISTANCE, dUptr
        MOV.AB #MINDISTANCE, dDptr
        dwarfLoop MOV.I BOMBu, @dUptr
        MOV.I BOMBd, @dDptr
        SUB.AB #DSTEP, dUptr
        ADD.AB #DSTEP, dDptr
        JMP dwarfLoop
        alertUfield MOV.A #-FDIST-MINDISTANCE, rlDelta
        JMP relocate
        alertDfield MOV.A #FDIST+MINDISTANCE, rlDelta
        relocate MOV BOMBd, dwarfLoop ; save CPU time
        MOV.AB #1+LAST-rlSptr, rlSptr ; initialize pointers
        MOV.AB #2+LAST-FIRST, rlTptr
        ADD.AB rlDelta, rlTptr ; add distance param
        relocLoop MOV.I <rlSptr, <rlTptr
        CMP.B rlSptr, #FIRST-rlSptr
        JMP relocLoop
        JMP @rlTptr
        BOMBu FCODEu DAT.X <667, $766 ;watch recognition code Up-field
        LAST ; relocate area ends with next instruction
        BOMBd FCODEd DAT.X <776, $677 ;watch recognition code Down-field
        rlDelta DAT #0 ;watch relocation distance
        dDptr DAT #0, #0 ;watch dwarf Down pointer
        fDptr DAT #0, #0 ;watch pointer to Down-field
        END


        IP属地:中国香港4楼2014-09-24 02:08
        回复
          这玩意儿可以闪避!


          IP属地:中国香港5楼2014-09-24 02:09
          回复