Spiritus

עמוד

התגובות שלי בפורום

מוצגות 8 תגובות – 1 עד 8 (מתוך 8 סה״כ)
  • מאת
    תגובות
  • Spiritus
    משתתף

    Maybe… but it is not a sign of a good survivor. On the contrary, a good survivor that doesn't use call far will do REALLY good in those cases, and there are. I believe Jack(or some version of it, that doesn't use call far), or some of last years' survivors would probably win the match. But again, it's not because one survivor is better than the other, it's just the situation(Which HutsHuts made, not blaming anyone^^).

    And about your comment, 007Ninja kicks "GreenHands" 's as.. *cough*.. behind, when fighting head-to-head.

    בתגובה ל: על CALL FAR וחולשתו #78364
    Spiritus
    משתתף

    1. lol!!! I used NASM, but it's funny, the survivors dont like each other apperantly:-)
    btw, I see you used xchg between segments in your code, is it valid? I don't think the emulator supports it, but I can be mistaken. It just doesn't compile(actually, it doesn't assemble^^).
    2. Yes, I see your point. I ran myn against Ninja, DIME 3someb & Zeus, and it scored jsut like ninja(both kicked the others guys asses^^).
    You know, our survivor, ninja, copied itself every 256*8 opcodes, not 256… if we could only… bummer… no matter^^
    And please answer me about the xchg, cause I want to run your survivor^^

    בתגובה ל: על CALL FAR וחולשתו #78366
    Spiritus
    משתתף

    1. Your code didn't work, maybe it's just for me^^
    2. Why didn't you use repe scasw? I think it's faster.
    I wrote something like yours that uses repe scasw, and doesnt check byte by byte, but word by word, and then just writes to both possibilities(or actually 4, to eliminate those nasty DIMEs).
    Here it is:

    %define Edge 128
    %define Space 640;128
    %define SSWrongUp 300
    %define SSWrongDown 300
    %define jumpOffset 17*0x100

    @code:
    mov cx, (@DownEnd-@UpBeg)/2
    mov si, ax
    add si, @UpBeg-@code
    rep movsw

    add si, @WrongUpBeg-@DownEnd
    mov di, SSWrongUp
    mov cx, (@WrongUpEnd-@WrongUpBeg+1)/2
    rep movsw

    xor si, si

    mov cx, es
    mov ds, cx
    mov cx, cs
    mov es, cx
    mov ss, cx

    xor cx, cx

    mov di, ax
    add di, @UpBeg-@code
    mov ax, 0x1212
    movsw
    jmp @UpBeg

    @start:

    @UpBeg:

    ;Copy us
    movsw
    movsw
    mov cl, (@MidEnd-@UpBeg-6)/2
    rep movsw

    mov sp, di
    add sp, 2

    mov cl, Edge/2
    sub di, @MidEnd-@UpBeg+Space
    repe scasw
    pushf
    add di, @MidEnd-@UpBeg+Space-Edge
    popf
    jz @UpEnd

    ;Problem found
    mov dx, di ;Store position found problem
    sub dx, (@MidEnd-@UpBeg+Space-Edge)
    mov si, SSWrongUp ;Copy a different part from stack
    add di, cx
    add di, cx ;We add it twice, because scasw scans cx number of WORDS(So, number of bytes=cx*2).
    mov bp, 0x10000-jumpOffset
    nop

    @UpEnd:

    @MidStart:
    movsw
    @MidEnd:

    @DownBeg:
    movsw
    movsw
    mov cl, byte (@DownEnd-@DownBeg-6)/2
    rep movsw
    mov cl, Edge/2
    add di, Space-Edge
    repe scasw ;Scan upper edge, compare es:[di] with ax
    pushf
    sub di, Space+(@DownEnd-@UpBeg)
    xor si, si
    movsw
    popf
    jz @UpBeg

    ;Problem found
    mov dx, di ;Store position found problem
    add di, @DownEnd-@UpBeg-2
    add dx, Space+(@DownEnd-@UpBeg)-2
    mov si, SSWrongDown ;Copy a different part from stack
    add di, cx ;cx is what the repe scasw needed to perform before di would point to @UpBeg
    add di, cx ;We add it twice, because scasw scans cx number of WORDS(So, number of bytes=cx*2).
    mov bp, jumpOffset
    movsw

    @DownEnd:

    @WrongUpBeg:
    movsw
    movsw
    mov cl, (@UpStop-@WrongUpBeg-6)/2
    rep movsw
    add di, bp
    mov bx, di
    movsw
    jmp bx
    nop

    @UpStop:
    movsw
    movsw
    mov cl, (@WrongUpEnd-@UpStop-6)/2
    rep movsw

    mov bp, dx
    sub bp, 2

    mov cl, 4
    @mLoop:
    mov sp, bp
    pop bx
    pop si

    mov ax, 0x10
    mul si
    add ax, bx

    mov sp, ax
    mov ax, 0xCCCC
    push ax
    inc bp
    loop @mLoop

    mov ax, 0x1212

    mov cl, Edge/2
    rep stosw
    add di, @DownEnd-@UpBeg+2*(Space-Edge)
    mov cx, Edge/2
    rep stosw

    sub di, @DownEnd-@UpBeg+Space
    xor si, si
    movsw
    jmp @WrongUpEnd+Space

    @WrongUpEnd:

    @end:

    בתגובה ל: על CALL FAR וחולשתו #78371
    Spiritus
    משתתף

    You know, I think I just understood your team name. Hot Shots, is that it?

    בתגובה ל: 007Ninja #78376
    Spiritus
    משתתף

    Sorry, wrong version^^

    ;007Ninja1

    %define jumpOff 0x800

    @code:

    mov [si], word 0x1000
    mov cx, cs
    mov es, cx
    mov bl, 0xEA
    mov ch, 00
    mov [si], ax
    and ax, 0x0FFF
    mov bh, al
    mov cl, ah
    add cl, 0xE0 ;to get proper address in seg 200
    mov ax, 0xFEEB
    int 0x87

    call @here
    @here:

    pop ax
    mov dx, ss
    mov es, dx
    mov si, ax
    add si, @Shurikan-@here
    mov cx, (@end-@Shurikan+1)/2
    rep movsw

    mov ds, dx

    mov cx, cs
    mov ss, cx

    sub ax, 0x1700+@here-@code
    and al, 0x7     
    sub al, 0x8
    mov ch, 0x0F
    mov cl, al
    shl al, 1
    shl al, 1
    shl al, 1
    shl al, 1
    mov sp, ax
    mov al, 0xA3 ;movsw – 2
    mov bx, 0x100
    mov [bx], ax
    mov [bx+2], cx
    mov di, ax
    sub sp, 0x100-0xA3 ;movsw – 2

    mov es, cx

    xor si, si

    mov ax, 0xCCCC
    mov dx, 0xCCCC
    std
    int 0x86
    int 0x86
    cld
    add di, 0x200

    mov ax, 0x1FFF ;call far [bx]
    stosw
    dec di

    mov bp, jumpOff
    add sp, bp
    xor cx, cx
    call far [bx]

    @Shurikan:
    movsw
    movsw
    mov cl, (@ShuEnd-@ShuMid)/2
    rep movsw
    @ShuMid:
    sub [bx], bp
    mov di, [bx]
    movsw
    dec di
    xor si, si
    call far [bx]
    @ShuEnd:
    call far [bx]
    @end:

    ;007Ninja2

    %define opNum (jumpOff/4+shu1Num-shu2Num)/2
    %define shu1Num 15
    %define shu2Num 25
    %define jumpOff 0x800
    %define shootOff0 0x27D0
    %define startOff0 ((opNum*(shootOff0-0x4)) % 0x10000)
    %define shootOffd 0x160
    %define startOffd (opNum*shootOffd)

    @code:
    mov es, [si]
    mov ax, 0xCC3D
    mov dx, 0x75CC
    mov bx, 0xFEEB
    int 0x87

    xchg ax, [si]
    mov bx, ax
    and bx, 0x0FFF
    call @here

    @zombStart:
    mov si, word 0x0000
    @putSI:
    mov ax, word jumpOff+0x800
    @putAX:
    mov cx, 17
    @a:
    loop @a
    jmp @start

    @here:
    pop si
    mov [bx], byte 0xEA ;jmp far …
    mov [bx+1], si
    mov [bx+3], word 0x1000
    add [si+(@putSI-@zombStart)-2], si
    add [si+(@putAX-@zombStart)-2], ax
    mov [bx+1], word 0xCCCC
    @start:
    mov dx, ss
    mov es, dx
    add si, @Shurikan-@zombStart
    xor di, di
    mov cx, (@end-@Shurikan+1)/2
    rep movsw

    mov ds, dx

    mov cx, cs
    mov ss, cx

    sub ax, 0x500
    and al, 7
    sub al, 8
    mov ch, 0x0F
    mov cl, al
    shl al, 1
    shl al, 1
    shl al, 1
    shl al, 1
    mov sp, ax
    mov al, 0xA5-(@end-@ShuEnd) ;movsw
    mov bx, 0x100
    mov [bx], ax
    mov [bx+2], cx
    mov di, ax
    sub sp, 0x100-0xA5+startOff0 ;movsw

    mov es, cx

    xor si, si

    mov ax, 0xCCCC
    mov dx, 0xCCCC
    int 0x86
    int 0x86
    sub di, 0x200

    mov ax, 0xD401 ;add sp, dx
    stosw
    mov ax, 0x1FFF ;call far [bx]
    stosw
    sub di, byte 3

    mov ax, startOff0+jumpOff-0x4
    mov dx, shootOff0

    mov bp, jumpOff

    xor cx, cx

    call far [bx]

    @Shurikan:
    movsw
    movsw
    mov cl, (@ShuEnd-@ShuMid)/2
    rep movsw
    @ShuMid:
    sub [bx], bp
    add ax, startOffd
    sub sp, ax
    add dx, shootOffd
    mov di, [bx]
    movsw
    movsw
    sub di, byte 3
    xor si, si
    call far [bx]
    @ShuEnd: ;this – ShuMid must be even
    add sp, dx
    call far [bx]
    @end:

    בתגובה ל: בהצלחה מחר! #78378
    Spiritus
    משתתף

    right back at ya

    בתגובה ל: Mass bombing and smart bombing examples #78380
    Spiritus
    משתתף

    The problem is with the repe movsw.
    this survivor was written before the rules for 2 survivors, so it assumes es to be cs.
    The new rules state that es is the common memory segment for the survivors, and is only 1024 long.
    That means that the survivor probably tries to copy itself outside the es place.
    You should add at the beginning something like:
    push cs
    pop es
    And it should work.

    בתגובה ל: מתי נקבל תשובות? #78482
    Spiritus
    משתתף

    אוף… לא הגעתי לשלושה הראשונים…
    אתם תפרסמו את התשובות הנכונות למבחן?
    היה קשר בין שלב הקבוצות למנצחים, נכון?

מוצגות 8 תגובות – 1 עד 8 (מתוך 8 סה״כ)