RS485-RS232 through code

How about this for a solution:

When commanded to act as a RS485-RS232 converter, the main loop starts continuously:
-checking the state of the digital pins representing 485 Rx- and Rx+ (or just one of them, saving some clock cycles), and arduino pin 0 (232 Rx).
-Setting the digital pins representing 485 Tx- and Tx+ (placed on the same port and set directly, ensuring synchronous switching) according to the state of the 232 Rx pin
-setting 232 Tx according to 485 Rx pins.

In case that got confusing because of my poor description: I was thinking of using direct pin manipulation between the pins connected to the ATmega16U2 and some random pins chosen as an RS485 interface.

Due to my limited programming education, I have a hard time trying to determine how quickly the processor could perform these tasks. What sort of baud rate would this implementation support? Also, would the ATmega16U2 blindly accept these signals or is there more to it?
Finally, if this is possible: Do i need to deactivate the UART to prevent interference? Can this be/how is this done?