add x86 push_word method

git-svn-id: file:///home/svn/framework3/trunk@5932 4d416f70-5f16-0410-b530-b9f4589650da
unstable
kris 2008-11-16 22:54:03 +00:00
parent f6464e7116
commit a35a9b7bdb
1 changed files with 8 additions and 1 deletions

View File

@ -161,6 +161,13 @@ module X86
raise ::ArgumentError, "Can only take signed byte values!", caller()
end
#
# This method generates a push word instruction.
#
def self.push_word(val)
return "\x66\x68" + [ val ].pack('v')
end
#
# This method generates a push dword instruction.
#
@ -495,4 +502,4 @@ module X86
end
end end
end end