Added Iorlw Instrction (#6)

This commit is contained in:
DarkressX
2023-05-23 15:12:30 +02:00
committed by GitHub
parent 8011c0ce40
commit 347e67c3c8
2 changed files with 24 additions and 2 deletions

22
commands/Iorlw.java Normal file
View File

@@ -0,0 +1,22 @@
package commands;
import registers.Memory;
public class Iorlw extends CommandUtils implements Command
{
private final int literal;
public Iorlw(int input)
{
literal = input & 0x00FF;
}
@Override
public void execute()
{
int result = literal | Memory.workingRegister;
checkZeroBit(result);
Memory.workingRegister = result % 256;
}
}