solving diophantine equations



I need to use extended euclidean algorithm to solve some diophantine
equations. I'd like to use free software for this, but unfortunately I
can't find a corresponding routine in either Maxima or Pari/GP.

In maple there is the function gcdex, when given polynomials a(x) and
b(x), it finds c and d such that
	c*a(x) + d*b(x) = 1
For example, if a(x)=x^16+1 and b(x)=x^16-1, then c=1/2 and d=-1/2 because

			      16        16
			     x   + 1   x   - 1
 			     ------- - ------- = 1
				2	  2

Have I missed something, or can't Maxima (nor Pari!) really do this?

Another thing that bugs my slightly is that Maxima uses only 80 columns to
display even if I'd have much more.