Somewhat working Timer0Interrupt

This commit is contained in:
Darkress
2023-06-18 19:13:37 +02:00
parent 101c6ec464
commit 60b288a762
7 changed files with 48 additions and 7 deletions

View File

@@ -0,0 +1,14 @@
package de.darkress.pic16f84sim.microcontroller;
public class Interrupt
{
private static boolean globalInterruptEnabled() {
return (Memory.getRegister(0x0B) & 0x80) == 0x80;
}
public static boolean checkTimerInterruptConditions() {
boolean timerInterruptEnabled = (Memory.getRegister(0x0B) & 0x20) == 0x20;
//boolean timerOverflowInterruptFlag = (Memory.getRegister(0x0B) & 0x04) == 0x04;
return globalInterruptEnabled() && timerInterruptEnabled;
}
}