home *** CD-ROM | disk | FTP | other *** search
- /*******************************************
- * *
- * Åα«úαá¼á TRACER *
- * éÑαß¿∩ 3.1 *
- * ìỿßá¡á Å«Γá¡¿¡δ¼ î. ₧. *
- ********************************************/
- #include"ftrace.h"
- #include"cpu.h"
-
- #include<stdio.h>
- #include<stdlib.h>
- #include<alloc.h>
- #include<process.h>
-
- int steptest(void);
-
- void inittrace(funct t);
- void texit(int);
-
- void main(int argv,char ** argc)
- {
- unsigned int num,max,min;
-
- puts("TRACER Vercion 3.1\nMake by M.Potanin.\n");
-
- switch(argv)
- {
- char * x;
- case 3: num=(unsigned)strtoul(argc[1],&x,16);
- if(argc[1] == x) goto erri;
- switch(*(argc[2]))
- {
- case 'l':
- case 'L':min = (unsigned)strtoul(argc[2]+1,&x,16);
- if(argc[2]+1 == x) goto erri;
- max = 0xffff;
- break;
- default:max = (unsigned)strtoul(argc[2]+1,&x,16);
- if(argc[2]+1 == x) goto erri;
- min = 0;
- break;
- }
- break;
- case 4: num=(unsigned)strtoul(argc[1],&x,16);
- if(argc[1] == x) goto erri;
- switch(*(argc[2]))
- {
- case 'l':
- case 'L':min = (unsigned)strtoul(argc[2]+1,&x,16);
- if(argc[2]+1 == x) goto erri;
- max = (unsigned)strtoul(argc[3]+1,&x,16);;
- if(argc[2]+1 == x) goto erri;
- break;
- default:max = (unsigned)strtoul(argc[2]+1,&x,16);
- if(argc[2]+1 == x) goto erri;
- min = (unsigned)strtoul(argc[3]+1,&x,16);;
- if(argc[2]+1 == x) goto erri;
- break;
- }
- break;
- default:
- erri:
- puts("TRACER hex_int_num {l|m}hex_seg");
- exit(3);
- }
-
- inittrace((funct)getvect(num));
-
- while((topstack->CS_IP.Words.cs < max) &&
- (topstack->CS_IP.Words.cs > min))
- {
- if(steptest()){puts("Error.");texit(1);}
- }
- setvect(num,(interr)(adress));
- texit(0);
- }