00001 void MdspDump () {
00002 gSystem->Load("libTApi.so");
00003
00004 TApi *tapi = new TApi();
00005
00006 tapi->initialiseAll(1);
00007
00008
00009 char response;
00010 do {
00011 int dspStart, dspEnd;
00012
00013 hex(cin);
00014 cout << "Starting address (hex): ";
00015 cin >> dspStart;
00016 cout << "Ending address (hex): ";
00017 cin >> dspEnd;
00018 dec(cin);
00019 if(dspEnd > dspStart) {
00020 int numWords = (dspEnd +1 - dspStart)/4;
00021
00022
00023 unsigned long * buffer = new unsigned long[numWords];
00024 tapi->DspBlockRead(0, dspStart, numWords, -1);
00025 } else {
00026 cout << "Start must be less than end, skipping\n";
00027 }
00028
00029
00030 cout << "Do another? [Y/n]: ";
00031 cin >> response;
00032 } while (response != 'n');
00033
00034
00035 delete tapi;
00036
00037 return 0;
00038 }
00039
00040