| 1 |
/* harness for testing a master boot record |
| 2 |
|
| 3 |
Copyright (C) 2001 Neil Turton. |
| 4 |
|
| 5 |
This program is free software; you can redistribute it and/or |
| 6 |
modify it under the terms of the GNU General Public License as |
| 7 |
published by the Free Software Foundation; either version 2 of the |
| 8 |
License, or (at your option) any later version. |
| 9 |
|
| 10 |
This program is distributed in the hope that it will be useful, but |
| 11 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
General Public License for more details. |
| 14 |
|
| 15 |
You should have received a copy of the GNU General Public License |
| 16 |
along with this program; if not, write to the Free Software |
| 17 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 18 |
|
| 19 |
See file COPYING for details */ |
| 20 |
|
| 21 |
/* The purpose of this program is to provide an execution environment |
| 22 |
similar to the BIOS for a MBR, which doesn't depend on DOSEMU |
| 23 |
(which keeps changing and doesn't provide the control we need). It |
| 24 |
should provide results back to the MBR in response to BIOS calls, |
| 25 |
according to command line arguments. |
| 26 |
|
| 27 |
We need to specify: |
| 28 |
1. The MBR to run. This is a 512-byte file. (-f <file>) |
| 29 |
2. The initial time of day. (-t <time>.<sub>) |
| 30 |
3. Schedule a key-press event (-k <key>) |
| 31 |
4. Wait for a particular time (-w <time>.<sub>) |
| 32 |
5. A timer rate. (-r <rate>) |
| 33 |
6. Real time limit (-a <secs>) |
| 34 |
*/ |
| 35 |
|
| 36 |
#include "harness.h" |
| 37 |
|
| 38 |
/*** Top level ***********************************************************/ |
| 39 |
|
| 40 |
int main(int argc, char **argv) |
| 41 |
{ |
| 42 |
process_init(); |
| 43 |
bios_init(); |
| 44 |
args_init(argc, argv); |
| 45 |
mbr_init(); |
| 46 |
vm86_run(); |
| 47 |
return 0; |
| 48 |
} |
| 49 |
|
| 50 |
/* */ |
| 51 |
/* Local Variables: */ |
| 52 |
/* mode:c */ |
| 53 |
/* c-indentation-style: "whitesmith" */ |
| 54 |
/* c-basic-offset: 2 */ |
| 55 |
/* End: */ |