Class: Ragweed::Rasm::Not

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

Overview

NOT a register

Instance Attribute Summary

Attributes inherited from Instruction

#dst, #src

Instance Method Summary collapse

Methods inherited from Instruction

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

Constructor Details

#initialize(dst = nil) ⇒ Not

f7/2 r/m



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

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

Instance Method Details

#to_sObject

Raises:



917
918
919
920
921
922
923
924
# File 'lib/ragweed/rasm/isa.rb', line 917

def to_s
  raise Insuff if not @dst
  raise(BadArg, "need reg for not") if not dst_reg?

  add(0xf7)
  add(modrm(@dst, Edx.clone))
  super
end