As some further explanation, the newer M2 and X2 parts allow most pins on the chip to be bi-directional.
By default, the pins are inputs except for a limited number of cases where a pin can only be an output.
Accordingly it is necessary to set the direction of the pins which you wish to use as an outputs.
The DIRS<port> = %xxxxxxxx ; where <port> is the corresponding port A,B,C,D as available on the respective PICAXE chips (See PICAXE manual 1 pages 9 to 11). For smaller chips the ports are typically “C” first available then B and C on mid sized chips. Only the 40 pin chips have all 4 ports available.
(See PICAXE manual 2 page 137)
Then to set the pins for a port high or low
PINS<port> = %xxxxxxxx. (See PICAXE manual 2 page 139)