Skip to content

Commit 13b6866

Browse files
committed
fix zpi
1 parent 391c7a2 commit 13b6866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CPU.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ public void IZY() {
758758
}
759759

760760
public void ZPI() {
761-
short lowPointer = Bus.read(programCounter++);
761+
short lowPointer = (short) (Bus.read(programCounter++) & 0x00ff);
762762

763763
addressAbsolute = (short)(Byte.toUnsignedInt(Bus.read((short)(lowPointer+1)))*256+Byte.toUnsignedInt(Bus.read(lowPointer)));
764764
}

0 commit comments

Comments
 (0)