space invaders: fix load order issue.
parent
de16313d06
commit
43ee7d00c6
|
@ -219,6 +219,18 @@ TUPLE: cpu b c d e f h l a pc sp halted? last-interrupt cycles port1 port2i port
|
||||||
#! F |= quot call
|
#! F |= quot call
|
||||||
[ cpu-f swap call bitxor ] keep set-cpu-f ; inline
|
[ cpu-f swap call bitxor ] keep set-cpu-f ; inline
|
||||||
|
|
||||||
|
: cpu-f-bitor= ( value cpu -- )
|
||||||
|
#! cpu-f |= value
|
||||||
|
[ cpu-f bitor ] keep set-cpu-f ;
|
||||||
|
|
||||||
|
: cpu-f-bitand= ( value cpu -- )
|
||||||
|
#! cpu-f &= value
|
||||||
|
[ cpu-f bitand ] keep set-cpu-f ;
|
||||||
|
|
||||||
|
: cpu-f-bitxor= ( value cpu -- )
|
||||||
|
#! cpu-f ^= value
|
||||||
|
[ cpu-f bitxor ] keep set-cpu-f ;
|
||||||
|
|
||||||
: set-flag ( cpu flag -- )
|
: set-flag ( cpu flag -- )
|
||||||
swap cpu-f-bitor= ;
|
swap cpu-f-bitor= ;
|
||||||
|
|
||||||
|
@ -290,17 +302,6 @@ TUPLE: cpu b c d e f h l a pc sp halted? last-interrupt cycles port1 port2i port
|
||||||
bitand HEX: 80 bitand ( cpu v )
|
bitand HEX: 80 bitand ( cpu v )
|
||||||
0 = not [ [ overflow-flag ] swap cpu-f-bitor ] [ drop ] ifte ;
|
0 = not [ [ overflow-flag ] swap cpu-f-bitor ] [ drop ] ifte ;
|
||||||
|
|
||||||
: cpu-f-bitor= ( value cpu -- )
|
|
||||||
#! cpu-f |= value
|
|
||||||
[ cpu-f bitor ] keep set-cpu-f ;
|
|
||||||
|
|
||||||
: cpu-f-bitand= ( value cpu -- )
|
|
||||||
#! cpu-f &= value
|
|
||||||
[ cpu-f bitand ] keep set-cpu-f ;
|
|
||||||
|
|
||||||
: cpu-f-bitxor= ( value cpu -- )
|
|
||||||
#! cpu-f ^= value
|
|
||||||
[ cpu-f bitxor ] keep set-cpu-f ;
|
|
||||||
|
|
||||||
: add-byte ( lhs rhs cpu -- result )
|
: add-byte ( lhs rhs cpu -- result )
|
||||||
#! Add rhs to lhs
|
#! Add rhs to lhs
|
||||||
|
|
|
@ -4,4 +4,4 @@ USE: parser
|
||||||
"../parser-combinators/lazy.factor" run-file
|
"../parser-combinators/lazy.factor" run-file
|
||||||
"../parser-combinators/parser-combinators.factor" run-file
|
"../parser-combinators/parser-combinators.factor" run-file
|
||||||
"cpu.factor" run-file
|
"cpu.factor" run-file
|
||||||
"tests.factor" run-file
|
! "tests.factor" run-file
|
||||||
|
|
Loading…
Reference in New Issue