; Life44 44-byte Conway's game of life by Baudsurfer/rsi 2015 aka olivier.poudade.free.fr ; optimized from original 65-byte ver. by Vladislav Kaipetsky, Tenie Remmel, Mark Andreas org 100h mov al,13h ; Set mode 13h int 10h push 09000h ; DS = last 64K segment pop ds push 0A000h ; ES = video memory pop es LifeLoop:xchg cx,ax AccLoop: add cl,[di+bx-64] ; Add in this column add cl,[si+bx-2] add cl,[si+bx+318] dec bx ; Loop back jnz AccLoop lodsb ; Get center cell, set pixel stosb stc ; 3 = birth, 4 = stay (tricky): rcr al,cl ; 1.00?0000x --> 0.0x100?00 (rcr 3) and al,20h ; ^carry | ^ or [si-1],al ; Add in new cell ^ shr byte [di-65],5 ; Shift previous value mov bl,3 ; 3 iterations in AccLoop jmp LifeLoop