public final void registerWrite(int regNum, int data) {
		switch (regNum) {
		case 0  : b = (short) data;
		return;
		case 1  : c = (short) data;
		return;
		case 2  : d = (short) data;
		return;
		case 3  : e = (short) data;
		return;
		case 4  : hl = (hl & 0x00FF) | (data << 8);
		return;
		case 5  : hl = (hl & 0xFF00) | data;
		return;
		case 6  : addressWrite(hl, data);
		return;
		case 7  : a = (short) data;
		return;
		default : return;
		}
	}