This commit is contained in:
2024-05-27 12:20:03 +02:00
parent 99ce3b378b
commit 08b815c64c
2 changed files with 18 additions and 4 deletions

View File

@ -78,6 +78,8 @@ public class DataRegister {
public static int getRegister(int fileAddress){
int address = determineIndirectAndChange (fileAddress);
if (bank () + address == EECON2)
return 0;
return dataRegister[bank() + address];
}
@ -109,6 +111,8 @@ public class DataRegister {
public static int getBit(int fileAddress, int bit) {
int address = determineIndirectAndChange (fileAddress);
if (bank() + address == EECON2)
return 0;
return (dataRegister[bank() + address] >> bit) & 1;
}