rubyx/lib/risc/instructions/syscall.rb
Torsten Ruger aa79e41d1c rename register to risc
seems to fit the layer much better as we really have a very reduced
instruction set
2017-01-19 09:02:29 +02:00

24 lines
481 B
Ruby

module Risc
# 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
def initialize source ,name
super(source)
@name = name
end
attr_reader :name
def to_s
"Syscall: #{name}"
end
end
end