Class: Rips::Instructions::Sesr

Inherits:
Instruction show all
Defined in:
lib/rips/instructions/sesr.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Instruction

#args_number, #code, #set_arguments

Constructor Details

#initializeSesr

@variables: types of instruction’s variables @length: length in bits for each variable



12
13
14
15
16
# File 'lib/rips/instructions/sesr.rb', line 12

def initialize
  super("sesr",Formats::CFormat.new(0b1101))
  @variables = [Variables::Port.new, Variables::Register.new]
  @length = {r2:2, r1:4, op:4, blank:6}
end

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length.



8
9
10
# File 'lib/rips/instructions/sesr.rb', line 8

def length
  @length
end

#variablesObject (readonly)

Returns the value of attribute variables.



8
9
10
# File 'lib/rips/instructions/sesr.rb', line 8

def variables
  @variables
end