MSP430: How to set a gpio as output HIGH at same instant it is set as output in DIR register?
P4OUT = | BIT7;
  P4DIR = | BIT7;


PxOut can be set even if the Px.y is an input. Infact, that's how you decide whether the builtin pull up/down resistor is a up (1) or down (0). (You enable the resistor with PxRen)