//******************************************************************
//*   Read/Write for show_regs
//*   This routine reads a NIC register and dumps it out to the
//*   serial port as ASCII.
//******************************************************************
//
void readwrite()
{
     read_creg(i);
     bin2hex(byte_read);
     printf("\t%c%c",high_char,low_char);
}
//******************************************************************
//*   Displays Control Registers in Pages 1, 2 and 3
//*   This routine dumps all of the NIC internal registers
//*   to the serial port as ASCII characters.
//******************************************************************
void show_regs()
{
   write_creg(CR,0x21);
   cls();
   printf("\r\n");
   printf("    Realtek 8019AS Register Dump\n\n\r");
   printf("REG\tPage0\tPage1\tPage2\tPage3\n\r");

   for(i=0;i<16;++i)
   {
     bin2hex((int8) i);
     printf("%c%c",high_char,low_char);
     write_creg(CR,0x21);
     readwrite();
     write_creg(CR,0x61);
     readwrite();
     write_creg(CR,0xA1);
     readwrite();
     write_creg(CR,0xE1);
     readwrite();
     printf("\r\n");
   }
}
