package de.czempin.nicnac16;

public enum Instruction {
	ADD() {
		public void execute(int word, Processor p) {
			super.execute(word, p);
			int address = word & 0x00000FFF; // extract address
			System.out.println(String.format("address: %h", address));
			int value = p.readMemory(address);
			String formatted = String.format("value: %h", value);
			System.out.println(formatted);
			p.AC += value; // TODO: condition bits
		}
	},
	NOP() {
		public void execute(int word, Processor p) {
			super.execute(word, p);
			System.out.println("NOP");
		}
	};

	public void execute(int instruction, Processor p) {
		p.PC++;
	}
}

@@ -191,70 +191,8 @@
 ess%0A
-%09%09%09System.out.println(String.format(%22address: %25h%22, address));%0A
 %09%09%09i
@@ -229,96 +229,86 @@
 s);%0A
+%0A
 %09%09%09S
-tring formatted = String.format(%22value: %25h%22, value);%0A%09%09%09System.out.println(formatted
+ystem.out.println(String.format(%22address: %25h. value: %25h%22, address, value)
 );%0A%09

clean up the output