
reg_card_test ()
{
    int status = TRUE;
    unsigned int pin, ctr;
    unsigned int voltage;

    phys_pin_offset = 0;

    setup_supplies (400, 200, 400, 128);
    print_running_msg(menu_ibmint[6].set_menu_row);

    for (pin = 1; (pin <= 40) && (status == TRUE); pin++)
    {
	/* set to all 1's */
	for (ctr = 1; (ctr <= 40) && (status == TRUE); ctr++)
	{
	    set_pin_cnf (ctr, PU_DRIVER_ON);
	}
	/* turn on ground driver of a pin */
	set_pin_cnf (pin, GD_DRIVER_ON);

	for (ctr = 1; (ctr <= 40) && (status == TRUE); ctr++)
	{
	    if (ctr == pin)
	    {
		if (read_zif_pin (pin) != 0)
		{
		    status = FALSE;
		}
	    }
	    else
	    {
		if (read_zif_pin (ctr) == 0)
		{
		    status = FALSE;
		}
	    }
	}
    }

    if	(status == TRUE)
    {
	set_pin_cnf (1, SRC_DRIVER_ON);
	set_pin_dac (1, 500);

	voltage = read_pin_voltage (1);
	if ((voltage >= 480) && (voltage <= 520))
	{
	    status = TRUE;
	}
	else
	{
	    status = FALSE;
	}
	set_pin_dac (1, 0);
    }

    setup_supplies (0, 0, 0, 0);
    unpump();
    delete_running_msg();
    if (status == TRUE)
    {
	print_pass_msg();
    }
    else
    {
	print_fail_msg();
    }
    pause ();
}
