timer0Interrupt (#37)
Co-authored-by: Darkress <30271678+DarkressX@users.noreply.github.com> Reviewed-on: darkress/pic16f84-sim#37
This commit was merged in pull request #37.
This commit is contained in:
13
de/darkress/pic16f84sim/microcontroller/Interrupt.java
Normal file
13
de/darkress/pic16f84sim/microcontroller/Interrupt.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package de.darkress.pic16f84sim.microcontroller;
|
||||
|
||||
public class Interrupt
|
||||
{
|
||||
private static boolean globalInterruptEnabled() {
|
||||
return (Memory.getRegister(0x0B) & 0x80) == 0x80; // Check GIE
|
||||
|
||||
}
|
||||
public static boolean checkTimerInterruptConditions() {
|
||||
boolean timerInterruptEnabled = (Memory.getRegister(0x0B) & 0x20) == 0x20;
|
||||
return globalInterruptEnabled() && timerInterruptEnabled;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user