Sha256: 67ab97e36b87442441d1766455708904ed0b2feea4995683a7687d16386852e6

Contents?: true

Size: 523 Bytes

Versions: 1

Compression:

Stored size: 523 Bytes

Contents

module Haxor
  module Compiler
    module Component
      class Transfer < Base
        def register
          bind_cmd 'mov', :cmd_mov
          bind_cmd 'push', :cmd_push
          bind_cmd 'pop', :cmd_pop
        end

        def cmd_push(a)
          add_cmd Vm::Cpu::Unit::Transfer::OP_PUSH, a
        end

        def cmd_pop(a)
          add_cmd Vm::Cpu::Unit::Transfer::OP_POP, a
        end

        def cmd_mov(a, b)
          add_cmd Vm::Cpu::Unit::Transfer::OP_MOV, a, b
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
haxor-0.3.0 lib/haxor/compiler/component/transfer.rb