Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

PerfectJudgment

macrumors newbie
Original poster
Aug 6, 2007
5
0
My assignment is to write the core part of a mini processor simulator called MinSPIM using C language. The simulator should read in a file containing MIPS machine codes and simulate what the MIPS does cycle-by-cycle. Included in the instructions are steps to run the simulator:

"For your convenience, here is how you could do it in UNIX environment. First compile:

$ gcc -o spimcore spimcore.c project.c

After compilation, to use MinSPIM, you would type the following command in UNIX:

$ spimcore <filename>.asc

The command prompt

cmd:

should appear."

Given the instructions, I figured I should use the Terminal to compile the project. The project compiles just fine, but when I enter the second command, "$ spimcore <filename>.asc" the output says, "-bash: spimcore: command not found" instead of displaying the command prompt. Any ideas what I'm doing wrong?
 
Seems like you need to specify where to find the file, since it is not in one of the standard path. Try this:

$ ./spimcore <filename>.asc
 
The instructions make the (poor) assumption that . is in your path. If you run ./spimcore it should run (if it compiled properly as you stated).

-Lee
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.