 				
 				default:
 					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: INY");
-					break;
-			}
-		}
-		
-		private function instrLDA(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				case IMM:
-					A = param1 & 0xFF;
-					break;
-				case ZPG:
-					A = _mem[param1] & 0xFF;
-					break;
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: LDA");
-					break;
-			}
-			
-			P &= 0x7D; // Clear Zero Flag and Negative Flag
-			
-			if (A == 0)
-				P |= ZERO_FLAG;
-				
-			if (A & 0x80)
-				P |= NEGATIVE_FLAG;
-		}
-		
-		private function instrLDY(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: LDY");
-					break;
-			}
-		}
-		
-		private function instrLSR(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: LSR");
-					break;
-			}
-		}
-		
-		private function instrORA(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: ORA");
-					break;
-			}
-		}
-		
-		private function instrPHA(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: PHA");
-					break;
-			}
-		}
-		
-		private function instrPHP(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: PHP");
-					break;
-			}
-		}
-		
-		private function instrPLA(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: PLA");
-					break;
-			}
-		}
-		
-		private function instrPLP(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: PLP");
-					break;
-			}
-		}
-		
-		private function instrROL(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: ROL");
-					break;
-			}
-		}
-		
-		private function instrROR(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: ROR");
-					break;
-			}
-		}
-		
-		private function instrRTI(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: RTL");
-					break;
-			}
-		}
-		
-		private function instrRTS(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: RTS");
-					break;
-			}
-		}
-		
-		private function instrSBC(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: SBC");
-					break;
-			}
-		}
-		
-		private function instrSED(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: SED");
-					break;
-			}
-		}
-		
-		
-		private function instrSEI(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: SEI");
-					break;
-			}
-		}
-		
-		private function instrSTA(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				case ZPG:
-					_mem[param1] = A;
-					break;
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: STA");
-					break;
-			}
-		}
-		private function instrSTY(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: STY");
-					break;
-			}
-		}
-		
-		private function instrTAX(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: TAX");
-					break;
-			}
-		}
-		
-		private function instrTAY(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: TAY");
-					break;
-			}
-		}
-		
-		private function instrTSX(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: TSX");
-					break;
-			}
-		}
-		
-		private function instrTXA(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: TXA");
-					break;
-			}
-		}
-		
-		private function instrTXS(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: TXS");
-					break;
-			}
-		}
-		
-		private function instrTYA(addressingMode:uint, param1:uint, param2:uint, paramWord:uint):void
-		{
-			switch (addressingMode)
-			{
-				
-				default:
-					_emulator.log("Invalid addressing mode " + ADDR_NAME[addressingMode] + " for Instruction: TYA");
 					break;
 			}
 		}

			return str;
		}
		
		private function hexToStr(number:int, width:int = 2):String 
		{
			var ret:String = number.toString(16);
			while( ret.length < width )
				ret="0" + ret;
			return ret;
		}
		
	}

{
	import flash.utils.ByteArray;
	import flash.utils.getTimer;
	import net.johnmercer.nes.utils.Debug;
	import net.johnmercer.nes.view.Emulator;
	/**
	 * ...
