public void gen_assign(SemanticRec id, SemanticRec exp, SemanticRec symbolTable) {

        SemanticRec result = gen_assign_cast(id, exp);

        Row leftRow = getIdRowFromSR(id);
        if (leftRow.getClassification() == Classification.VARIABLE)
        {
            SymbolTable leftTable = findSymbolTable(leftRow);
            String leftOffset = generateOffset(leftTable, (DataRow) leftRow);
            //rightside is ontop of the stack pop into destination
            pop(leftOffset); //pop into left
        }
        else if (leftRow.getClassification() == Classification.FUNCTION)
        {
            FunctionRow funcRow = (FunctionRow) leftRow;
            String nestingLvl = symbolTable.getDatum(1);
            String register = getRegisterFromNL(nestingLvl);
            String offset = "-1(" + register + ")"; //one above the current old register value is the slot for the return value
            pop(offset);
            funcRow.setHasReturnValue(true);
        }
        else if (leftRow.getClassification() == Classification.PARAMETER)
        {
            SymbolTable leftTable = findSymbolTable(leftRow);
            DataRow row = (DataRow) leftRow;
            Mode paramMode = row.getMode();
            String offset = null;
            if (paramMode == Mode.VALUE)
            {
                offset = generateOffset(leftTable, row);
                pop(offset); //if it is a value parameter treat it like a normal Variable for that scope
            }
            else if (paramMode == Mode.VARIABLE)
            {
                offset = "@" + generateOffset(leftTable, row);
                pop(offset); //if it is a variable parameter dereference the local parameter to store at the parent address contained in it
            }
        }
    }