Class: Haxor::Compiler::Component::Transfer
- Inherits:
-
Base
- Object
- Base
- Haxor::Compiler::Component::Transfer
show all
- Defined in:
- lib/haxor/compiler/component/transfer.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_mov(a, b) ⇒ Object
19
20
21
|
# File 'lib/haxor/compiler/component/transfer.rb', line 19
def cmd_mov(a, b)
add_cmd Vm::Cpu::Unit::Transfer::OP_MOV, a, b
end
|
#cmd_pop(a) ⇒ Object
15
16
17
|
# File 'lib/haxor/compiler/component/transfer.rb', line 15
def cmd_pop(a)
add_cmd Vm::Cpu::Unit::Transfer::OP_POP, a
end
|
#cmd_push(a) ⇒ Object
11
12
13
|
# File 'lib/haxor/compiler/component/transfer.rb', line 11
def cmd_push(a)
add_cmd Vm::Cpu::Unit::Transfer::OP_PUSH, a
end
|
#register ⇒ Object
5
6
7
8
9
|
# File 'lib/haxor/compiler/component/transfer.rb', line 5
def register
bind_cmd 'mov', :cmd_mov
bind_cmd 'push', :cmd_push
bind_cmd 'pop', :cmd_pop
end
|