hacking method not found

was using exit, since raise is not implemented. This was ambiguous as all programs exit.
Using :died as special kernel code and bending it, and reporting it in interpreter.
This commit is contained in:
2019-09-09 11:47:37 +03:00
parent 7334e72458
commit 0ae7c5d8aa
6 changed files with 22 additions and 7 deletions

View File

@ -139,10 +139,12 @@ module Arm
end
def translate_Syscall( code )
call_codes = { :putstring => 4 , :exit => 1 }
int_code = call_codes[code.name]
raise "Not implemented syscall, #{code.name}" unless int_code
send( code.name , int_code )
call_codes = { putstring: 4 , exit: 1 }
name = code.name
name = :exit if name == :died
int_code = call_codes[name]
raise "Not implemented syscall, #{name}" unless int_code
send( name , int_code )
end
def putstring( int_code )