Class: Haxor::Compiler::Component::Various

Inherits:
Base
  • Object
show all
Defined in:
lib/haxor/compiler/component/various.rb

Instance Attribute Summary

Attributes inherited from Base

#compiler

Instance Method Summary collapse

Methods inherited from Base

#add, #add_cmd, #bind_cmd, #offset?, #offset_flags, #parse_value, #strip_offset

Instance Method Details

#cmd_int(a) ⇒ Object



20
21
22
# File 'lib/haxor/compiler/component/various.rb', line 20

def cmd_int(a)
  add_cmd Vm::Cpu::Unit::Various::OP_INT, a
end

#cmd_lea(a, b) ⇒ Object



16
17
18
# File 'lib/haxor/compiler/component/various.rb', line 16

def cmd_lea(a, b)
  add_cmd Vm::Cpu::Unit::Various::OP_LEA, a, b
end

#cmd_nop(*_args) ⇒ Object



12
13
14
# File 'lib/haxor/compiler/component/various.rb', line 12

def cmd_nop(*_args)
  add_cmd Vm::Cpu::Unit::Various::OP_NOP
end

#cmd_syscall ⇒ Object



24
25
26
# File 'lib/haxor/compiler/component/various.rb', line 24

def cmd_syscall
  add_cmd Vm::Cpu::Unit::Various::OP_SYSCALL
end

#register ⇒ Object



5
6
7
8
9
10
# File 'lib/haxor/compiler/component/various.rb', line 5

def register
  bind_cmd 'nop', :cmd_nop
  bind_cmd 'lea', :cmd_lea
  bind_cmd 'int', :cmd_int
  bind_cmd 'syscall', :cmd_syscall
end