Mass bombing and smart bombing examples

עמוד
מוצגות 3 תגובות – 1 עד 3 (מתוך 3 סה״כ)
  • מאת
    תגובות
  • #76963
    ChaosDude
    משתתף

      is it possable to have a small example of a use of a smart bombing and/or the dumb bombing?  are they "visable" in the *corewars* application( like all the other "mov"'s)?

      In the example codes there is one Sored that cought my eye "Jerry"  seems this guy was ment to "copy it-self, and jump into the copy" but it dies after 33 moves, any one have any idea why it happens?  or how it should be fixed?

    the jerry asm' code:

    mov si, ax

    add si, 025

    mov cx, 07

    push w.[si]

    sub si, 02

    loop 08

    mov di, ss

    mov ds, di

    add ax, 027

    mov di, ax

    nop

    mov cx, 07

    mov si, sp

    add di, 027

    mov ax, di

    repe

    movsw

    jmp ax

     

    #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.

    #77978
    Pico
    משתתף

    הבעיה שלך היא שאתה לא יכול לדחוף נתון למחסנית עם מיעון עקיף,תנסה להשתמש בעוד אוגר שאליו תעביר את הנתון ואותו תדחוף למחסנית.
    לדוגמא:
    mov bx,[si]
    push bx

מוצגות 3 תגובות – 1 עד 3 (מתוך 3 סה״כ)
  • יש להתחבר למערכת על מנת להגיב.