public final ArrayList<Instruction> compileMacros(int offest){
        ArrayList<Instruction> program = new ArrayList<>();
        ArrayList<InputPin> inPins = new ArrayList<>();
        ArrayList<OutputPin> outPins = new ArrayList<>();
        macroSize = 0;
        for (AbstractUnit unit : units) {
            if(unit instanceof InputPin){
                inPins.add((InputPin) unit);
            }
            if(unit instanceof OutputPin){
                outPins.add((OutputPin) unit);
            }
            if(unit instanceof AbstractUnit){
                macroSize++;
            }
        }
        
        initArrays(inPins.size(), outPins.size());
        int i = 0;
        for (InputPin pin : inPins) {
            inLables[i] = pin.name;
            i++;
        }
        i = 0;
        for (OutputPin pin : outPins) {
            inLables[i] = pin.name;
            i++;
        }
        
        int comm = 0;
        for (AbstractUnit unit : units) {
             if(unit instanceof IInstructionUnit){
                ((IInstructionUnit)unit).getInstruction(unitNumber+comm);
            }
        }
        
        return program;
    }