From 6cbd17cf52d15802793b89a08fea9f2b38d9579e Mon Sep 17 00:00:00 2001 From: Darkress <30271678+DarkressX@users.noreply.github.com> Date: Wed, 31 May 2023 20:24:32 +0200 Subject: [PATCH] implemented Nop Instruction --- de/darkress/pic16f84sim/commands/Nop.java | 14 ++++++++++++++ .../pic16f84sim/decoder/CommandDecoder.java | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 de/darkress/pic16f84sim/commands/Nop.java diff --git a/de/darkress/pic16f84sim/commands/Nop.java b/de/darkress/pic16f84sim/commands/Nop.java new file mode 100644 index 0000000..ef3c182 --- /dev/null +++ b/de/darkress/pic16f84sim/commands/Nop.java @@ -0,0 +1,14 @@ +package de.darkress.pic16f84sim.commands; + +import de.darkress.pic16f84sim.microcontroller.ProgramCounter; + +public class Nop extends LiteralCommandUtils implements Command +{ + + @Override + public void execute() + { + // Do nothing, just increment the PC + ProgramCounter.incPC(); + } +} diff --git a/de/darkress/pic16f84sim/decoder/CommandDecoder.java b/de/darkress/pic16f84sim/decoder/CommandDecoder.java index c7f1954..f756150 100644 --- a/de/darkress/pic16f84sim/decoder/CommandDecoder.java +++ b/de/darkress/pic16f84sim/decoder/CommandDecoder.java @@ -111,7 +111,7 @@ public class CommandDecoder if ((input | 0x0060) == 0x0060) { - //nop(); + return new Nop(); } if (input == 0x0064) -- 2.49.1