EECON2
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user