2023-03-22 12:58:11 +00:00
|
|
|
include "std.mcl"
|
2023-03-20 11:39:04 +00:00
|
|
|
|
|
|
|
macro BOARD_SIZE 100 end
|
|
|
|
|
|
|
|
mem BOARD_SIZE 2 - + 1 @8
|
|
|
|
|
|
|
|
0 while dup BOARD_SIZE 2 - < do
|
|
|
|
0 while dup BOARD_SIZE < do
|
2023-03-18 16:41:57 +00:00
|
|
|
dup mem + !8 if
|
2023-03-20 14:33:08 +00:00
|
|
|
dup mem + BOARD_SIZE + '*' @8
|
2023-03-18 16:41:57 +00:00
|
|
|
else
|
2023-03-20 14:33:08 +00:00
|
|
|
dup mem + BOARD_SIZE + ' ' @8
|
2023-03-18 16:41:57 +00:00
|
|
|
end
|
|
|
|
1 +
|
|
|
|
end
|
2023-03-18 17:06:03 +00:00
|
|
|
|
2023-03-20 14:33:08 +00:00
|
|
|
mem + BOARD_SIZE + '\n' @8
|
2023-03-18 16:41:57 +00:00
|
|
|
|
2023-03-20 11:39:04 +00:00
|
|
|
BOARD_SIZE 1 + mem BOARD_SIZE + puts
|
2023-03-18 16:41:57 +00:00
|
|
|
|
|
|
|
// pattern
|
|
|
|
mem !8 1 shl
|
|
|
|
mem 1 + !8
|
|
|
|
bor
|
|
|
|
|
2023-03-20 11:39:04 +00:00
|
|
|
1 while dup BOARD_SIZE 2 - < do
|
2023-03-18 16:41:57 +00:00
|
|
|
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
|