To program a fourth axis (rotary) is very simple. Say you want to move 10 inches in X and 720 degrees in A, you would simply program"
G1 X10 A720 F30
That's it. In this example, the G1 programs a linear move (interpolated) at 30 inches a minute along the interpolated path. The X moves 10" at the same time the rotary is moving 720 degrees (2 full revolutions) and they both end at the same time.
If you programmed a G0 instead of a G1, they would move in rapid (non-interpolated) and they would not end at the same time.
You could program a coordinated three axis move (let's say, X10" Z-3" and A3600 degrees) as follows: G1 X10 Z-3 A3600 F20. In this case it will feed to the right in X as it is feeding down in Z and rotating in A.
To go the opposite way in A, simply say -3600 instead of 3600.