// Path: src/main/java/com/amanvishnani/sim8085/domain/IAddress.java
// public interface IAddress {
//     String hexValue();
//     Integer intValue();
//     IData getLSB();
//     IData getMSB();
//     IData getData();
//     void setData(IData data);
//     static IAddress ZERO = Address.from(0);
//     static IAddress FFFF = Address.from("FFFF");
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IData.java
// public interface IData {
//     IData ZERO = Data.from("00");
//     String hexValue();
//     Integer intValue();
//     IOperationResult add(IData data);
//     IOperationResult add(IData data, Integer carry);
//     IOperationResult minus(IData data);
//     IRegister toRegister();
//     public IData getLSB();
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IOpcode.java
// public interface IOpcode {
//     String getInstruction();
//     IData getOpcodeData();
//     Integer getOpcodeLength();
// }


import com.amanvishnani.sim8085.domain.IAddress;
import com.amanvishnani.sim8085.domain.IData;
import com.amanvishnani.sim8085.domain.IOpcode;
import java.util.*;
                    row = InstructionRow.createInstructionRow(localPointer);
                    row.setData(address.getLSB());
                    instructionRowMap.put(localPointer, row);
                    localPointer = localPointer + 1;
                    // Set LSB
                    row = InstructionRow.createInstructionRow(localPointer);
                    row.setData(address.getMSB());
                    instructionRowMap.put(localPointer, row);
                    localPointer = localPointer + 1;
                } else {
                    // if operand has Label
                    // Label flow
                    String operandLabel = parser.extractOperandLabel(opcode);
                    row.setHasOperandLabel(true);
                    row.setOperandLabel(operandLabel);
                    localPointer = localPointer + 2;
                }
            }
        }
    }

    private void passTwo() {
        var instructionsToAdd = new ArrayList<InstructionRow>();
        for (Map.Entry<Integer, InstructionRow> entry :
                instructionRowMap.entrySet()) {
            Integer addr = entry.getKey();
            InstructionRow row = entry.getValue();
            if (row.getHasLabelOperand()) {
                String label = row.getLabelOperand();
                Integer labelAddr = this.labelMap.get(label);
// Path: src/main/java/com/amanvishnani/sim8085/domain/IAddress.java
// public interface IAddress {
//     String hexValue();
//     Integer intValue();
//     IData getLSB();
//     IData getMSB();
//     IData getData();
//     void setData(IData data);
//     static IAddress ZERO = Address.from(0);
//     static IAddress FFFF = Address.from("FFFF");
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IData.java
// public interface IData {
//     IData ZERO = Data.from("00");
//     String hexValue();
//     Integer intValue();
//     IOperationResult add(IData data);
//     IOperationResult add(IData data, Integer carry);
//     IOperationResult minus(IData data);
//     IRegister toRegister();
//     public IData getLSB();
// }
// 
// Path: src/main/java/com/amanvishnani/sim8085/domain/IOpcode.java
// public interface IOpcode {
//     String getInstruction();
//     IData getOpcodeData();
//     Integer getOpcodeLength();
// }


// Path: src/main/java/com/amanvishnani/sim8085/domain/Impl/Compiler.java
import com.amanvishnani.sim8085.domain.IAddress;
import com.amanvishnani.sim8085.domain.IData;
import com.amanvishnani.sim8085.domain.IOpcode;
import java.util.*;

                    row = InstructionRow.createInstructionRow(localPointer);
                    row.setData(address.getLSB());
                    instructionRowMap.put(localPointer, row);
                    localPointer = localPointer + 1;
                    // Set LSB
                    row = InstructionRow.createInstructionRow(localPointer);
                    row.setData(address.getMSB());
                    instructionRowMap.put(localPointer, row);
                    localPointer = localPointer + 1;
                } else {
                    // if operand has Label
                    // Label flow
                    String operandLabel = parser.extractOperandLabel(opcode);
                    row.setHasOperandLabel(true);
                    row.setOperandLabel(operandLabel);
                    localPointer = localPointer + 2;
                }
            }
        }
    }

    private void passTwo() {
        var instructionsToAdd = new ArrayList<InstructionRow>();
        for (Map.Entry<Integer, InstructionRow> entry :
                instructionRowMap.entrySet()) {
            Integer addr = entry.getKey();
            InstructionRow row = entry.getValue();
            if (row.getHasLabelOperand()) {
                String label = row.getLabelOperand();
                Integer labelAddr = this.labelMap.get(label);
                IAddress labelAddress = Address.from(labelAddr);