fix last tests that required faked returns

This commit is contained in:
2020-03-28 19:46:07 +02:00
parent a3effe29f6
commit e8111c259b
8 changed files with 53 additions and 92 deletions

View File

@ -256,6 +256,7 @@ module Risc
false
end
# execute the given system call, only putstring and exit really
def execute_Syscall
name = @instruction.name
ret_value = 0
@ -274,8 +275,12 @@ module Risc
true
end
# get the return after system exit. exit_sequence expects the last return to
# be an int and reduces that, so that is returned
# the value is reduced to 8 bits, because that is what linux does
def get_sys_return
val = get_register( std_reg(:syscall_1) ) # syscalls return into syscall_1
val & 0xFF
end
def run_all