Method: Rex::Arch::X86.mov_byte

Defined in:
lib/rex/arch/x86.rb

.mov_byte(reg, val) ⇒ Object

This method generates the opcodes that set the low byte of a given register to the supplied value.



210
211
212
213
214
# File 'lib/rex/arch/x86.rb', line 210

def self.mov_byte(reg, val)
  _check_reg(reg)
  # chr will raise RangeError if val not between 0 .. 255
  return (0xb0 | reg).chr + val.chr
end