public void emulateStep()
    {
        String code = (String) view.getMemoryTable().getValueAt(programCounter, 0);

        if (code.equals("") && !code.equals("0000")) {
            getBearing();
            code = (String) view.getMemoryTable().getValueAt(programCounter, 0);
        }

        if (!code.equalsIgnoreCase("0000")) {
            boolean good = executeNextStep(code);
            setRegisters();
            counter++;

            if (code.startsWith("1")) {
                if (findNegative(code.substring(0, 4))) {
                    view.setNegBit(true);
                }
            }

            if (!good) {
                EmulatorControl.addError(new EmulatorError(">>ERROR<< AN ERROR OCCURED WHEN EMULATING", 0));
                return;
            }
        } else {
            executeNextStep(code);
            ran = true;
        }
    }