2017-01-19 08:02:29 +01:00
|
|
|
module Risc
|
2015-06-22 21:48:42 +02:00
|
|
|
|
|
|
|
# name says it all really
|
|
|
|
# only arg is the method syscall name
|
|
|
|
# how the layer below executes these is really up to it
|
|
|
|
|
|
|
|
# Any function issuing a Syscall should also save the current message
|
|
|
|
# and restore it after the syscall, saving the return value in Return_index
|
|
|
|
|
|
|
|
class Syscall < Instruction
|
|
|
|
|
2015-07-27 11:13:39 +02:00
|
|
|
def initialize source ,name
|
|
|
|
super(source)
|
2015-06-22 21:48:42 +02:00
|
|
|
@name = name
|
|
|
|
end
|
|
|
|
attr_reader :name
|
2015-07-24 12:23:56 +02:00
|
|
|
|
|
|
|
def to_s
|
2015-07-25 08:30:58 +02:00
|
|
|
"Syscall: #{name}"
|
2015-07-24 12:23:56 +02:00
|
|
|
end
|
|
|
|
|
2015-06-22 21:48:42 +02:00
|
|
|
end
|
|
|
|
end
|