I have a quick question. I am using MARS assembler (programming in the MIPS instruction set) and I have two MIPS files. One file contains my main method to be run and it calls a function in the other file. My function has the .globl directive before it, but every time I try and compile my program it says
Symbol "print_hex" not found in symbol table.
Here is a screen shot for more context:
The label print_hex is located in the file called print_hex.s.
How can I link these two files together? Lastly, how can I tell MARS to call a specific label at the start of execution, for example I want it to call main.
Settings->Assemble all files in directory
And then all the files in the directory should get assembled and linked together.
To always have execution start at your main label, you can enable Settings->Initialize program counter to global 'main'
.