Add Movlw instruction (#7)

This commit is contained in:
DarkressX authored and GitHub committed 2023-05-23 15:19:51 +02:00
1 parent 347e67c3c8
commit d5eaee2bde
2 files changed
+21 -6

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package commands;
import registers.Memory;
public class Movlw extends CommandUtils implements Command
{
private final int literal;
public Movlw(int input)
{
literal = input & 0x00FF;
}
@Override
public void execute()
{
Memory.workingRegister = literal;
}
}