Co-authored-by: Darkress <30271678+DarkressX@users.noreply.github.com> Reviewed-on: darkress/pic16f84-sim#2
21 lines
432 B
Java
21 lines
432 B
Java
package de.darkress.pic16f84sim.commands;
|
|
|
|
import de.darkress.pic16f84sim.microcontroller.Memory;
|
|
import de.darkress.pic16f84sim.microcontroller.ProgramCounter;
|
|
|
|
public class Goto extends CommandUtils implements Command
|
|
{
|
|
private final int literal;
|
|
|
|
public Goto(int input)
|
|
{
|
|
literal = input & 0x07FF;
|
|
}
|
|
|
|
@Override
|
|
public void execute()
|
|
{
|
|
ProgramCounter.setPcForGotoCall(literal);
|
|
}
|
|
}
|