mclangc/examples/rule110.mcl

35 lines
488 B
Plaintext
Executable File

mem 98 + 1 @8
0 while dup 98 < do
0 while dup 100 < do
dup mem + !8 if
dup mem + 100 + 42 @8
else
dup mem + 100 + 32 @8
end
1 +
end
mem + 100 + 10 @8
101 mem 100 + 1 1 syscall3 drop
// pattern
mem !8 1 shl
mem 1 + !8
bor
1 while dup 98 < do
swap 1 shl 7 band
over mem + 1 + !8 bor
2dup 110 swap shr 1 band
swap mem + swap @8
swap
1 +
end
drop drop
1 +
end
drop