mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-12-23 00:30:21 +00:00
Change PC externally
This commit is contained in:
parent
3b56312d9c
commit
e47730e131
@ -145,6 +145,11 @@ func (s *State) SetAXYP(regA uint8, regX uint8, regY uint8, regP uint8) {
|
|||||||
s.reg.setP(regP)
|
s.reg.setP(regP)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetPC changes the program counter, as a JMP instruction
|
||||||
|
func (s *State) SetPC(pc uint16) {
|
||||||
|
s.reg.setPC(pc)
|
||||||
|
}
|
||||||
|
|
||||||
// Save saves the CPU state (registers and cycle counter)
|
// Save saves the CPU state (registers and cycle counter)
|
||||||
func (s *State) Save(w io.Writer) error {
|
func (s *State) Save(w io.Writer) error {
|
||||||
err := binary.Write(w, binary.BigEndian, s.cycles)
|
err := binary.Write(w, binary.BigEndian, s.cycles)
|
||||||
|
Loading…
Reference in New Issue
Block a user