Handbook
Glossary
>ppm ( cpu filename -- cpu )
Vocabulary
cpu
.
8080
.
test
Inputs
cpu
an
object
filename
an
object
Outputs
cpu
an
object
Definition
USING:
accessors
io
io.encodings.ascii
io.files
kernel
math
sequences
;
IN:
cpu.8080.test
:
>ppm
( cpu filename -- cpu )
ascii
[
"P3"
print
"256 224"
print
"1"
print
224
[
32
[
over
32
*
over
+
9216
+
reach
ram>>
nth
[
[
" 0 0 0"
write
]
[
" 1 1 1"
write
]
if
]
each-8bit
drop
]
each
drop
nl
]
each
]
with-file-writer
;