	program test
	integer*4 I4,I4MIN,I4MAX
	integer*2 J1,J2,J3,J4
	character c*10
	
	c = 'yada'
	call AskChar('testing',c)
	i = 1
	if (i .eq. 1) stop 'done'
	
	I4MAX = Z'7FFFFFFF'
	I4MIN = Z'80000000'
	print *, I4MIN,I4MAX
c	do I4=I4MIN+100,I4MAX-100

c	do I4=-2147483648,2147483647

	do I4=1,2147483647
	    J1 = (I4 .and. '7FFF'X)-((I4 .and. 'FFFF'X)/'8000'X)*'8000'X
	    J2 = (I4 .and. Z'7FFF')-((I4 .and. Z'FFFF')/Z'8000')*Z'8000'
	    J3 = iand(I4,Z'7FFF')-iand(I4,Z'FFFF')/Z'8000'*Z'8000'
	    J4 = iand(I4,Z'FFFF')

	    if (J1 .ne. J2) print *, '1-2:',I4,J1,J2,J3,J4
	    if (J1 .ne. J3) print *, '1-3:',I4,J1,J2,J3,J4
	    if (J1 .ne. J4) print *, '1-4:',I4,J1,J2,J3,J4
	    if (J2 .ne. J3) print *, '2-3:',I4,J1,J2,J3,J4
	    if (J2 .ne. J4) print *, '2-4:',I4,J1,J2,J3,J4
	    if (J3 .ne. J4) print *, '3-4:',I4,J1,J2,J3,J4

	end do


	do I4=-1,0
	    J1 = (I4 .and. '7FFF'X)-((I4 .and. 'FFFF'X)/'8000'X)*'8000'X
	    J2 = (I4 .and. Z'7FFF')-((I4 .and. Z'FFFF')/Z'8000')*Z'8000'
	    J3 = iand(I4,Z'7FFF')-iand(I4,Z'FFFF')/Z'8000'*Z'8000'
	    J4 = iand(I4,Z'FFFF')

	    if (J1 .ne. J2) print *, '1-2:',I4,J1,J2,J3,J4
	    if (J1 .ne. J3) print *, '1-3:',I4,J1,J2,J3,J4
	    if (J1 .ne. J4) print *, '1-4:',I4,J1,J2,J3,J4
	    if (J2 .ne. J3) print *, '2-3:',I4,J1,J2,J3,J4
	    if (J2 .ne. J4) print *, '2-4:',I4,J1,J2,J3,J4
	    if (J3 .ne. J4) print *, '3-4:',I4,J1,J2,J3,J4

	end do

	do I4=-2147483648,-2
	    J1 = (I4 .and. '7FFF'X)-((I4 .and. 'FFFF'X)/'8000'X)*'8000'X
	    J2 = (I4 .and. Z'7FFF')-((I4 .and. Z'FFFF')/Z'8000')*Z'8000'
	    J3 = iand(I4,Z'7FFF')-iand(I4,Z'FFFF')/Z'8000'*Z'8000'
	    J4 = iand(I4,Z'FFFF')

	    if (J1 .ne. J2) print *, '1-2:',I4,J1,J2,J3,J4
	    if (J1 .ne. J3) print *, '1-3:',I4,J1,J2,J3,J4
	    if (J1 .ne. J4) print *, '1-4:',I4,J1,J2,J3,J4
	    if (J2 .ne. J3) print *, '2-3:',I4,J1,J2,J3,J4
	    if (J2 .ne. J4) print *, '2-4:',I4,J1,J2,J3,J4
	    if (J3 .ne. J4) print *, '3-4:',I4,J1,J2,J3,J4

	end do

	stop 'done'

	end
