/************************************************************* * File: mon/compare.c * Purpose: Part of core Monitor * Author: Phil Bunce (pjb@carmel.com) * Revision History: * 980725 Created */ #include Optdesc compare_opts[] = { {"addr1 addr2 bytes","compare memory"}, {"addr1","start address of 1st area"}, {"addr2","start address of 2nd area"}, {"bytes","length in bytes"}, {0}}; /************************************************************* * compare_cmd(int ac,char *av[]) * the compare command */ compare_cmd(int ac,char *av[]) { int i,len,errcnt,x1,x2; ADDR addr1,addr2; U64 rv; if (!regChain) { printf("Target Description Driver not loaded\n"); return(1); } if (ac != 4) { printf("usage: compare \n"); return(1); } if (!get_rsa(&rv,av[1])) return(1); addr1 = rv.lo; if (!get_rsa(&rv,av[2])) return(1); addr2 = rv.lo; if (!get_rsa(&rv,av[3])) return(1); len = rv.lo; for (i=errcnt=0;i 20) { printf("Too many errors. Exiting.\n"); break; } } printf("Test completed with %d errors.\n",errcnt); }