@Override
    public List<AssemblyLine> generate(Context context)
    {
        final List<AssemblyLine> lines = Lists.newLinkedList();
        
        Data value = getValue(context, lines);
        
        if (context.getAddress(ident) == null)
        {
            Context.error("Try to assign a non-existent variable: " + ident);
        }
        
        if (Compiler.debug)
        {
            lines.add(new Comment("Start assignment"));
        }
        
        Data data = context.getAddress(ident);
        
        if (data instanceof RegisterAccess)
        {
            generateOperationLines(lines, op, data, value);
        }
        else if (data instanceof Pointer)
        {
            Data pointed = ((Pointer) data).getData();
            if (pointed instanceof Value)
            {
                generateOperationLines(lines, op, data, value);
            }
            else if (pointed instanceof RegisterAccess)
            {
                RegisterAccess access = (RegisterAccess) pointed;
                if (access.getRegisterName().equalsIgnoreCase("SP")
                        && access.getOffset() != 0)
                {
                    lines.add(new Instruction(Opcode.SET)
                            .first(Datas.data("I")).second(access));
                    
                    String opz = "+";
                    if (access.getOffset() < 0)
                    {
                        opz = "";
                    }
                    
                    generateOperationLines(lines, op,
                            Datas.data("[I" + opz + access.getOffset() + "]"),
                            value);
                }
                else
                {
                    generateOperationLines(lines, op, data, value);
                }
            }
        }
        
        return lines;
    }