//----------------------------------------------------------------------------- // Roman Lysecky, Tony Givargis, and Greg Stitt // Copyright 1999, All Rights Reserved. //----------------------------------------------------------------------------- // Version 1.1 //----------------------------------------------------------------------------- #include #include #include "i8051.h" //----------------------------------------------------------------------------- void SigHandler(int signal); //----------------------------------------------------------------------------- static I8051 i8051; //----------------------------------------------------------------------------- int main(int argc, char* argv[]) { // check for too many paramters if( argc > 3 ) { cerr << "usage: 8051sim " << endl; exit(0); } else { signal(SIGINT, SigHandler); i8051.Simulate(argc>=2 ? argv[1] : "out.hex", argc==3 ? argv[2] : "output.txt"); } return(0); } //----------------------------------------------------------------------------- void SigHandler(int signal) { i8051.Stop(); } //-----------------------------------------------------------------------------