Handbook
Glossary
write-port5 ( value cpu -- )
Vocabulary
roms
.
space-invaders
Inputs
value
an
object
cpu
an
object
Outputs
None
Definition
USING:
accessors
kernel
;
IN:
roms.space-invaders
:
write-port5
( value cpu -- )
2dup
0
port5-newly-set?
[
dup
SOUND-WALK1
play-invaders-sound
]
when
2dup
1
port5-newly-set?
[
dup
SOUND-WALK2
play-invaders-sound
]
when
2dup
2
port5-newly-set?
[
dup
SOUND-WALK3
play-invaders-sound
]
when
2dup
3
port5-newly-set?
[
dup
SOUND-WALK4
play-invaders-sound
]
when
2dup
4
port5-newly-set?
[
dup
SOUND-UFO-HIT
play-invaders-sound
]
when
port5o<<
;