add pack_word() method

git-svn-id: file:///home/svn/framework3/trunk@6045 4d416f70-5f16-0410-b530-b9f4589650da
unstable
kris 2008-12-25 01:55:05 +00:00
parent 410d52626c
commit cc233af814
1 changed files with 7 additions and 0 deletions

View File

@ -331,6 +331,13 @@ module X86
sub(val, reg, badchars, true, adjust, bits)
end
#
# This method wrappers packing a short integer as a little-endian buffer.
#
def self.pack_word(num)
[num].pack('v')
end
#
# This method wrappers packing an integer as a little-endian buffer.
#