private void executeCurrentOp() throws LowlevelError {

		if (current_op >= pcode.length) {
			fallthruOp();
			return;
		}

		last_op = current_op;

		PcodeOp op = pcode[current_op];
		if (op.getOpcode() == PcodeOp.UNIMPLEMENTED) {
			throw new UnimplementedInstructionException(current_address);
		}

		PcodeOpRaw raw = new PcodeOpRaw(op);

		OpBehavior behave = raw.getBehavior();
		if (behave == null) {
			// unsupported opcode
			throw new LowlevelError(
				"Unsupported pcode op (opcode=" + op.getOpcode() + ", seq=" + op.getSeqnum() + ")");
		}
		if (behave instanceof UnaryOpBehavior) {
			UnaryOpBehavior unaryBehave = (UnaryOpBehavior) behave;
			Varnode in1var = op.getInput(0);
			Varnode outvar = op.getOutput();
			if (in1var.getSize() > 8 || outvar.getSize() > 8) {
				BigInteger in1 = memstate.getBigInteger(op.getInput(0), false);
				BigInteger out = unaryBehave.evaluateUnary(op.getOutput().getSize(),
					op.getInput(0).getSize(), in1);
				memstate.setValue(op.getOutput(), out);
			}
			else {
				long in1 = memstate.getValue(op.getInput(0));
				long out = unaryBehave.evaluateUnary(op.getOutput().getSize(),
					op.getInput(0).getSize(), in1);
				memstate.setValue(op.getOutput(), out);
			}
			fallthruOp();
		}
		else if (behave instanceof BinaryOpBehavior) {
			BinaryOpBehavior binaryBehave = (BinaryOpBehavior) behave;
			Varnode in1var = op.getInput(0);
			Varnode in2var = op.getInput(1);
			Varnode outvar = op.getOutput();
			if (in1var.getSize() > 8 || in2var.getSize() > 8 || outvar.getSize() > 8) {
				BigInteger in1 = memstate.getBigInteger(op.getInput(0), false);
				BigInteger in2 = memstate.getBigInteger(op.getInput(1), false);
				BigInteger out = binaryBehave.evaluateBinary(outvar.getSize(),
					op.getInput(0).getSize(), in1, in2);
				memstate.setValue(outvar, out);
			}
			else {
				long in1 = memstate.getValue(op.getInput(0));
				long in2 = memstate.getValue(op.getInput(1));
				long out = binaryBehave.evaluateBinary(outvar.getSize(), op.getInput(0).getSize(),
					in1, in2);
				memstate.setValue(outvar, out);
			}
			fallthruOp(); // All binary ops are fallthrus
		}
		else {
			switch (behave.getOpCode()) {
				case PcodeOp.LOAD:
					executeLoad(raw);
					fallthruOp();
					break;
				case PcodeOp.STORE:
					executeStore(raw);
					fallthruOp();
					break;
				case PcodeOp.BRANCH:
					executeBranch(raw);
					break;
				case PcodeOp.CBRANCH:
					executeConditionalBranch(raw);
					break;
				case PcodeOp.BRANCHIND:
					executeBranchind(raw);
					break;
				case PcodeOp.CALL:
					executeCall(raw);
					break;
				case PcodeOp.CALLIND:
					executeCallind(raw);
					break;
				case PcodeOp.CALLOTHER:
					executeCallother(raw);
					break;
				case PcodeOp.RETURN:
					executeBranchind(raw);
					break;
				case PcodeOp.MULTIEQUAL:
					executeMultiequal(raw);
					fallthruOp();
					break;
				case PcodeOp.INDIRECT:
					executeIndirect(raw);
					fallthruOp();
					break;
				default:
					throw new LowlevelError("Unsupported op (opcode=" + behave.getOpCode() + ")");
			}
		}
	}
This method executes a single pcode operation, the current one (returned by getCurrentOp()).
The MemoryState of the emulator is queried and changed as needed to accomplish this.
Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/emulate/Emulate.java