Class: Ragweed::Rasm::Call

Inherits:
Instruction show all
Defined in:
lib/ragweed/rasm/isa.rb

Overview

Call a register/memory location

Instance Attribute Summary

Attributes inherited from Instruction

#dst, #src

Instance Method Summary collapse

Methods inherited from Instruction

#add, #coerce, #decode, #dst_imm?, #dst_lab?, #dst_reg?, i, #locate, #modrm, #patch, #sib, #src_imm?, #src_lab?, #src_reg?

Constructor Details

#initialize(dst = nil) ⇒ Call

e8 rel ff/2 r/m no far yet



484
# File 'lib/ragweed/rasm/isa.rb', line 484

def initialize( dst=nil); super dst; end

Instance Method Details

#to_sObject

Raises:



486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/ragweed/rasm/isa.rb', line 486

def to_s
  raise Insuff if not @dst
  
  if dst_reg?
    add(0xff)
    add(modrm(@dst, Edx.clone))
  else
    add(0xe8)
    add(@dst.val, true)
  end
  super
end