public void mod(TACCommand c) {
        if ((c.getP1() instanceof VarLocation) && (c.getP2() instanceof Literal)) {
            VarLocation loc = (VarLocation) c.getP1();
            assembly.add("      movl $0, %edx");
            assembly.add("      movl " + offset(loc) + ", %eax"); //muevo el dividendo operando al registro edx
            assembly.add("      movl $" + c.getP2().toString() + ", %ecx");
            assembly.add("      cltd");
            assembly.add("      idivl %ecx"); //edx div divisor
            VarLocation res = (VarLocation) c.getP3();
            assembly.add("      movl " + " %edx, "  + offset(res)); //el resto de la division queda en edx
        }
        if ((c.getP2() instanceof VarLocation) && (c.getP1() instanceof Literal)) {
            VarLocation loc = (VarLocation) c.getP2();
            assembly.add("      movl $0, %edx");
            assembly.add("      movl " + offset(loc) + ", %ecx"); //muevo el dividendo operando al registro edx
            assembly.add("      movl $" + c.getP1().toString() + ", %eax");
            assembly.add("      cltd");
            assembly.add("      idivl %ecx");   //edx div ecx
            VarLocation res = (VarLocation) c.getP3();
            assembly.add("      movl " + " %edx, "  + offset(res));
        }
        if ((c.getP1() instanceof Literal) && (c.getP2() instanceof Literal)) {
            assembly.add("      movl $0, %edx");
            assembly.add("      movl $" + c.getP1().toString() + ", %eax");
            assembly.add("      movl $" + c.getP2().toString() + ", %ecx");
            assembly.add("      cltd");
            assembly.add("      idivl %ecx");
            VarLocation res = (VarLocation) c.getP3();
            assembly.add("      movl " + " %edx, "  + offset(res));
        }
        if ((c.getP1() instanceof VarLocation) && (c.getP2() instanceof VarLocation)) {
            VarLocation loc = (VarLocation) c.getP1();
            VarLocation loc2 = (VarLocation) c.getP2();
            assembly.add("      movl $0, %edx");
            assembly.add("      movl " + offset(loc) + ", %eax"); //muevo el dividendo operando al registro edx
            assembly.add("      movl " + offset(loc2) + ", %ecx"); //muevo el dividendo operando al registro edx
            assembly.add("      cltd");
            assembly.add("      idivl %ecx");
            VarLocation res = (VarLocation) c.getP3();
            assembly.add("      movl " + " %edx, "  + offset(res));
        }
    }