print_usage(char ** argv)
{
printf( "NED Simulator v%d (www.subgeniuskitty.com)\n"
- "Usage: %s -f <file>\n"
+ "Usage: %s -i <file> [-s <hz>} [-t <file>] [-a <address> -p <port>]\n"
" -h Help (prints this message)\n"
- " -f <file> Specify a binary image file to load in RAM.\n"
+ " -i <file> Specify a binary image file to load in RAM.\n"
" -s <int hz, optional> Frequency of simulated system clock.\n"
" Allowable values are 1 <= clock <= 1,000,000,000.\n"
" -t <file, optional> Saves a trace of JMP and BRZ syllables to file.\n"
- " -i <ip-addr, optional> IP address of nedfp instance. Enables front panel output.\n"
+ " -a <ip-addr, optional> IP address of nedfp instance. Enables front panel output.\n"
" -p <port, optional> Port of nedfp instance. Required when '-i' specified.\n"
, VERSION, argv[0]
);
char * fp_ip = NULL;
char * fp_port = NULL;
uint32_t fp_ram = 0x40000000;
- while ((c = getopt(argc,argv,"hi:p:t:s:f:")) != -1) {
+ while ((c = getopt(argc,argv,"hi:p:t:s:a:")) != -1) {
switch (c) {
- case 'f':
+ case 'i':
if ((input = fopen(optarg, "r")) == NULL) {
fprintf(stderr, "ERROR: %s: %s\n", optarg, strerror(errno));
exit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
break;
- case 'i':
+ case 'a':
// TODO: What do I want to consider valid input?
fp_ip = optarg;
break;