I'm attempting to test an assembly file compiled from my c++ program and I keep getting errors. My program is a simple "hello world" but no matter what I try and what variation of assembly files I try I can't get a solid run on anything bu the exception.s that comes with SPIM. Here is what I do:
-write quick cpp file
-Compile using: g++ file.cpp -S
-open file.s in SPIM
And I get the following error:
spim: (parser) syntax error on line 2 of file c:\Users\Dan\Desktop\file.s .mod_init_func ^
This line reads:
1 .mod_init_func 2 .align 3 3 .quad__GLOBAL__I_main
Aside from getting this specific error fixed, can someone please tell me how to compile and simulate a program without errors ocurring?
Also, when I just double click a .s file to open it in SPIM, it says the file can't be opened. Any reason why?