This commit is contained in:
Kartik K. Agaram 2021-07-26 17:36:54 -07:00
parent a5cbf871ea
commit bade3ae86c
2 changed files with 16 additions and 4 deletions

View File

@ -42,7 +42,7 @@ fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk)
convert-graphemes-to-pixels second-screen convert-graphemes-to-pixels second-screen
copy-pixels second-screen, screen copy-pixels second-screen, screen
} }
linger env linger
loop loop
} }
} }
@ -1016,11 +1016,10 @@ fn num-live-neighbors _self: (addr environment), x: int, y: int -> _/eax: int {
return result return result
} }
fn linger _self: (addr environment) { fn linger {
var self/esi: (addr environment) <- copy _self
var i/ecx: int <- copy 0 var i/ecx: int <- copy 0
{ {
compare i, 0x10000000 # Kartik's Linux with -enable-kvm compare i, 0x10000000 # Kartik's Linux with -accel kvm
#? compare i, 0x8000000 # Kartik's Mac with -accel tcg #? compare i, 0x8000000 # Kartik's Mac with -accel tcg
break-if->= break-if->=
i <- increment i <- increment

View File

@ -244,9 +244,22 @@ fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk)
# iter: grid1 -> grid2 # iter: grid1 -> grid2
step grid1, grid2 step grid1, grid2
render grid2 render grid2
#? linger
# iter: grid2 -> grid1 # iter: grid2 -> grid1
step grid2, grid1 step grid2, grid1
render grid1 render grid1
#? linger
loop
}
}
fn linger {
var i/ecx: int <- copy 0
{
compare i, 0x10000000 # Kartik's Linux with -accel kvm
#? compare i, 0x8000000 # Kartik's Mac with -accel tcg
break-if->=
i <- increment
loop loop
} }
} }