Commit 7952c3c7 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

2005-02-15 Benoît Perrot <benoit@lrde.epita.fr>

	Implement print_err.
	
	* src/vm/cpu.c: Print buffer pointed to by $a0 on standard 
	error stream on syscall when $v0 = 15.
parent cf2790d6
2005-02-15 Benoît Perrot <benoit@lrde.epita.fr>
Implement print_err.
* src/vm/cpu.c: Print buffer pointed to by $a0 on standard
error stream on syscall when $v0 = 15.
2005-02-03 Benoît Perrot <benoit@lrde.epita.fr>
* src/inst/data_section.hh, src/inst/data_section.cc,
......
......@@ -733,6 +733,17 @@ namespace vm
exit_status = (exit_type) get_register(Cpu::a0);
break;
// print_err (buffer: $a0)
case 15:
for (int i = get_register(Cpu::a0); true; ++i)
{
char b = mmu_.data_load_byte(i);
if (b == 0)
break;
std::cerr << b;
}
break;
default:
assertion(!"syscall: Not implemented yet");
};
......
Markdown is supported
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