XorlwInstruction #1
@@ -1,29 +1,18 @@
|
|||||||
package de.darkress.pic16f84sim;
|
package de.darkress.pic16f84sim;
|
||||||
|
|
||||||
import de.darkress.pic16f84sim.microcontroller.Stack;
|
import de.darkress.pic16f84sim.commands.Command;
|
||||||
|
import de.darkress.pic16f84sim.decoder.CommandDecoder;
|
||||||
|
import de.darkress.pic16f84sim.microcontroller.Memory;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
class Main
|
class Main
|
||||||
{
|
{
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
/*
|
|
||||||
ArrayList<Command> program = new ArrayList<>();
|
ArrayList<Command> program = new ArrayList<>();
|
||||||
int input1 = 0x3EFF;
|
Memory.workingRegister = 0xAA;
|
||||||
|
int input1 = 0x3AFF;
|
||||||
program.add(CommandDecoder.decode(input1));
|
program.add(CommandDecoder.decode(input1));
|
||||||
program.get(0).execute();
|
program.get(0).execute();
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
for(int i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
Stack.push(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int i = 0; i < 16; i++)
|
|
||||||
{
|
|
||||||
System.out.println(Stack.peek());
|
|
||||||
Stack.pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,8 +55,7 @@ public class CommandDecoder
|
|||||||
case 0x3800:
|
case 0x3800:
|
||||||
return new Iorlw(input);
|
return new Iorlw(input);
|
||||||
case 0x3A00:
|
case 0x3A00:
|
||||||
//xorlw();
|
return new Xorlw(input);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(input & 0x3F80)
|
switch(input & 0x3F80)
|
||||||
|
|||||||
Reference in New Issue
Block a user