Handbook
Glossary
read-port ( port cpu -- byte )
Vocabulary
cpu
.
8080
.
emulator
Inputs
port
an
object
cpu
an
object
Outputs
byte
an
object
Definition
IN:
cpu.8080.emulator
GENERIC:
read-port
( port cpu -- byte )
Methods
USING:
cpu.8080.emulator
kernel
;
M:
cpu
read-port
2drop
0
;
USING:
combinators
cpu.8080.emulator
kernel
roms.space-invaders
;
M:
space-invaders
read-port
swap
{
{
1
[
read-port1
]
}
{
2
[
read-port2
]
}
{
3
[
read-port3
]
}
[
2drop
0
]
}
case
;