Class: Crabstone::M680X::Operand

Inherits:
FFI::Struct
  • Object
show all
Includes:
Extension::Operand
Defined in:
lib/crabstone/arch/4/m680x.rb,
lib/crabstone/arch/5/m680x.rb

Instance Method Summary collapse

Methods included from Extension::Operand

#valid?, #value

Instance Method Details

#constant?Boolean Also known as: const_val?

Returns:

  • (Boolean)


84
85
86
# File 'lib/crabstone/arch/4/m680x.rb', line 84

def constant?
  self[:type] == OP_CONSTANT
end

#direct?Boolean Also known as: direct_addr?

Returns:

  • (Boolean)


76
77
78
# File 'lib/crabstone/arch/4/m680x.rb', line 76

def direct?
  self[:type] == OP_DIRECT
end

#extended?Boolean Also known as: ext?

Returns:

  • (Boolean)


72
73
74
# File 'lib/crabstone/arch/4/m680x.rb', line 72

def extended?
  self[:type] == OP_EXTENDED
end

#immediate?Boolean Also known as: imm?

Returns:

  • (Boolean)


64
65
66
# File 'lib/crabstone/arch/4/m680x.rb', line 64

def immediate?
  self[:type] == OP_IMMEDIATE
end

#indexed?Boolean Also known as: idx?

Returns:

  • (Boolean)


68
69
70
# File 'lib/crabstone/arch/4/m680x.rb', line 68

def indexed?
  self[:type] == OP_INDEXED
end

#register?Boolean Also known as: reg?

Returns:

  • (Boolean)


60
61
62
# File 'lib/crabstone/arch/4/m680x.rb', line 60

def register?
  self[:type] == OP_REGISTER
end

#relative?Boolean Also known as: rel?

Returns:

  • (Boolean)


80
81
82
# File 'lib/crabstone/arch/4/m680x.rb', line 80

def relative?
  self[:type] == OP_RELATIVE
end