Handbook
Glossary
load-rom ( filename cpu -- )
Vocabulary
cpu
.
8080
.
emulator
Inputs
filename
a
string
cpu
a
cpu
Outputs
None
Word description
Read the ROM file into the cpu's memory starting at address 0000. The filename is relative to the path stored in the
rom-root
variable. An exception is thrown if this variable is not set.
See also
load-rom*
Definition
USING:
accessors
io.encodings.binary
io.files
kernel
;
IN:
cpu.8080.emulator
:
load-rom
( filename cpu -- )
ram>>
swap
binary
[
0
swap
(load-rom)
]
with-file-reader
;