Having Trouble Getting My Homework Assignment to Run

Discussion in 'Mac Programming' started by PerfectJudgment, Apr 24, 2009.

  1. PerfectJudgment macrumors newbie

    Joined:
    Aug 6, 2007
    #1
    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?
     
  2. misterredman macrumors 6502a

    misterredman

    Joined:
    Oct 3, 2007
    #2
    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
     
  3. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #3
    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
     
  4. PerfectJudgment thread starter macrumors newbie

    Joined:
    Aug 6, 2007

Share This Page