[name] Game of life [puzzle] SzSandbox [traces] ...................... .955554.....1C....954. .A1C.15C14...A.14.A... .34354.A...1C3C154A... .94954.A....A.3C8.A1C. .A.A94.34.1C354AA.A.A. .A.AA95555CA.15634A.A. .2.AAA..14234.....3CA. .156AA.155554.14...AA. .14.A355481C..14...AA. .155E....A.34..94..AA. ....35554A154.16..16A. .........354......156. ...................... [chip] [type] LCDC2 [x] 2 [y] 1 [custom-screen] 29x34-matrix [chip] [type] UC6 [x] 8 [y] 1 [code] slx x2 mov x2 acc mov acc dat sub 29 loop: add 1 mov acc x3 mov acc x1 #(q0) teq x1 1 + mov 1 x3 - mov -1 x3 tlt acc dat + jmp loop mov 0 x2 [chip] [type] UC6 [x] 12 [y] 1 [code] 0: slx x1 mov x1 acc mov null x3 mov x1 dat tcp x3 0 - mul dat - mov acc x0 #(c1) - jmp 0 + mov acc x0 + jmp 0 mul -1 mov acc x0 #(c1) [chip] [type] UC6 [x] 16 [y] 1 [code] slx x0 loop: mov x0 null tgt dat 0 + mov x2 x0 - mov x3 x0 add 1 tlt acc 29 + jmp loop mov 0 acc teq dat 0 + mov 1 dat - mov 0 dat [chip] [type] BRIDGE [x] 1 [y] 4 [chip] [type] BRIDGE [x] 9 [y] 4 [chip] [type] BRIDGE [x] 10 [y] 4 [chip] [type] UC6 [x] 12 [y] 4 [code] slx x0 mov x0 acc #offset mov x0 dat #cell add dat loop: teq dat x2 add x2 + mov 0 x0 - mov acc x1 - mov x1 x0 teq x3 18 - jmp loop + mov 0 x3 + mov -999 x0 [chip] [type] BANKXL [x] 15 [y] 4 [rom] 1,-30,0,1,29,1,1,27,0,1,29,1,1,27,0,1,29,1,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 [chip] [type] BRIDGE [x] 8 [y] 6 [chip] [type] UC6 [x] 11 [y] 7 [code] 0: slx x3 mov x3 x1 #offset mov x3 x1 #cell mov 0 acc loop: mov x1 dat teq dat -999 - add dat - jmp loop teq acc 3 + mov 1 x2 + jmp 0 teq acc 4 + mov -1 x2 - mov 0 x2 [chip] [type] RAMXL [x] 17 [y] 7 [chip] [type] UC6 [x] 2 [y] 8 [code] 0: teq p1 0 - jmp off mov x3 acc tlt acc 0 + jmp end mov acc x2 teq x2 0 - mul -1 mov acc x1 end: slp 1 jmp 0 off: mov 0 x0 slp 999 jmp off [chip] [type] NOTE [x] 5 [y] 8 [code] 3: life, 4: stay, else: death 1: gen new row1 1.5: write row0?? 2: gen new row2 3: write row1 4: gen new row3 5: write row2 [chip] [type] BRIDGE [x] 16 [y] 9 [chip] [type] UC6 [x] 6 [y] 10 [code] slx x0 mov x0 acc loop: mov acc x3 slx x3 mov x3 null teq acc 0 + jmp inc mov acc x1 slx x1 mov x1 null inc: add 29 tgt acc 986 + mov 0 acc jmp loop [chip] [type] UC6 [x] 9 [y] 10 [code] slx x1 mov x1 dat #offset teq dat 986 + jmp end mov 1 acc #cell loop: mov dat x2 mov acc x2 add 1 tlt acc 30 + jmp loop end: mov 0 x1 [chip] [type] UC6 [x] 13 [y] 10 [code] slx x0 mov 0 acc loop: tgt dat 0 + mov x0 x3 - mov x0 x2 add 1 tlt acc 29 + jmp loop teq dat 0 + mov 1 dat - mov 0 dat [chip] [type] RAMXL [x] 17 [y] 10 [chip] [type] BTN [x] 3 [y] 11