Commit 3a281115 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Manage main label not found

parent b24822d9
2003-06-29 Benot Perrot <benoit@lrde.epita.fr>
* src/vm/virtual_machine.hh: Display a dedicated error message
when the main label can not be found.
2003-06-29 Benot Perrot <benoit@lrde.epita.fr>
* dev/mipsy.xml, dev/mipsy.py:
......
......@@ -53,6 +53,11 @@ namespace vm
precondition(_program);
const inst::TextSection& text_section = (*_program).text_section ();
if (! text_section.has_label(inst::Label("main")))
{
std::cerr << "No `main' label in assembly file." << std::endl;
return;
}
cpu.set_pc(text_section.get_offset(inst::Label("main")));
_halt = false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment