]> wirehaze git hosting - lifeboot.git/blobdiff - lifeboot.asm

wirehaze git hosting

xor -> cmp
[lifeboot.git] / lifeboot.asm
index d4ba435081f7892280834e2b6e67274773c483c9..2a623edf26e34fa19d91b14a7ce8d2699eb94e61 100644 (file)
@@ -291,11 +291,9 @@ mov dx, [es:si + bx]        ; dl = cell current state
 cmp dl, ALIVE               ; if (ALIVE) {
 jne .else
 
-cmp ax, 2                   ;     if (n < 2)
-jl .dead                    ;         return DEAD
-
-cmp ax, 3                   ;     if (n > 3)
-jg .dead                    ;         return DEAD
+shr ax, 1
+cmp ax, 1                   ;     if (n != 2 || n != 3)
+jne .dead                   ;         return DEAD (likely)
 
 jmp .alive                  ;     return ALIVE