mirror of
https://github.com/bradford-hamilton/apple-1.git
synced 2024-06-12 15:29:31 +00:00
Internal/vm/{exec_funcs,opcodes}: missed one, add exec func for BCS opcode
This commit is contained in:
parent
a9a3ae5c0a
commit
e5709ad58b
|
@ -330,6 +330,15 @@ func execBPL(a *Appleone, o op) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// branch on C = 1 N Z C I D V
|
||||||
|
// - - - - - -
|
||||||
|
func execBCS(a *Appleone, o op) error {
|
||||||
|
if a.getCarry() != 0 {
|
||||||
|
a.branch(o)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// X - M N Z C I D V
|
// X - M N Z C I D V
|
||||||
// + + + - - -
|
// + + + - - -
|
||||||
func execCPX(a *Appleone, o op) error {
|
func execCPX(a *Appleone, o op) error {
|
||||||
|
|
|
@ -336,7 +336,7 @@ var opcodes = map[uint8]op{
|
||||||
// addressing assembler opc bytes cyles
|
// addressing assembler opc bytes cyles
|
||||||
// --------------------------------------------
|
// --------------------------------------------
|
||||||
// relative BCS oper B0 2 2**
|
// relative BCS oper B0 2 2**
|
||||||
0xB0: newOp("BCS", 0xB0, 2, relative, todo),
|
0xB0: newOp("BCS", 0xB0, 2, relative, execBCS),
|
||||||
|
|
||||||
// CPX Compare Memory and Index X
|
// CPX Compare Memory and Index X
|
||||||
// addressing assembler opc bytes cyles
|
// addressing assembler opc bytes cyles
|
||||||
|
|
Loading…
Reference in New Issue
Block a user