- // TODO: Read in the a.out file. This should be done in the simulator's init function call?
- nedsim->nedstate = init_simulator();
+ // Load the program file specified by the user or, if none is specified,
+ // randomly select one of the included programs.
+ char * input_file = get_string_resource(nedsim->dpy, "binary", "String");
+ if (input_file == NULL) {
+ // TODO: Need to include some default programs and randomly select one to load into RAM.
+ nedsim->nedstate = init_simulator("./test.out");
+ } else {
+ nedsim->nedstate = init_simulator(input_file);
+ }