Hello,
Each port has an associated data direction register to control whether each pin for the port is an input or output. For Port D this register is named PTDDD, at address $0007. When a pin requires to be an output, the corresponding bit in PTDDD is set to logic 1.
If you have not already done so, I might suggest you download the data sheet for the MC9S08AW60, which also includes the 'AW32 device, from the Freescale web site.
Regards,
Mac