Could you be more specific?
It is actually very simple:
When the gate is 0, the opamp is in negative feedback and outputs a 3v so its inverting input sits at 3v.
When the gate goes to 6v, there are two cases:
1) if the mosfet's Vgs(th) is sufficiently low (let's say 1v) for the mosfet to conduct, the inverting inputs will be at 6v (mcu's otuput) - Vgs = 5v. With the opamp's non-inverting input at 3v, the amp goes to 0v to try to bring down the voltage differential - it can never do that. or
2) if the mosfet's Vgs(th) is sufficiently high (let's say 4v) so the mosfet cannot be opened, the inverting input continues to sit at 3v, and the opamp outputs a 3v.
The analysis has nothing to do with the resistors in the drain, as you have noticed.
You could have easily reconfigured the circuit into a r2r and you wouldn't need to use those mosfets.
If you do want to use the existing topology, put a pnp mosfet there, between the resistors and 6v to switch the resistors into / out of the network.
Another alternative is to use a switched divider network.
Also, when you pick the mosfet, pick one with small capacitance (TO90 or IRF510) to avoid ringing on the rising edge.