Login Register






Kernel32.dll Beep Function filter_list
Author
Message
RE: Kernel32.dll Beep Function #5
I thought of storing the full value in a register, and then pushing the high and low off on the stack separately before, which should work. Unless I go with higher values. 8 bits is really small though... So why cl? :S Perhaps split one up into 16 bits instead?

I could probably even utilize some bitshifting to get rid of some 0x0's. I suppose this will work for smaller values though, but I think 0x3E8 is a bit too big for an 8 bit storage, so I'm not sure why you posted that. :S

Anyways here's what I got:
Code:
__asm { mov ecx, dword ptr 0x755631AF xor eax, eax mov ax, 0x320 push eax mov ax, 0x450 push eax call ecx }

Which would be:
Code:
\xB9\xAF\x31\x56\x75\x33\xC0\x66\xB8\x20\x03\x50\x66\xB8\x50\x04\x50\xFF\xD1\xC3

And all works fine Smile
-- cxS

[ Haskell/.NET/C/C++ - Software Engineer ]

Reply





Messages In This Thread
Kernel32.dll Beep Function - by cxS - 04-25-2013, 06:09 AM
RE: Kernel32.dll Beep Function - by w00t - 04-25-2013, 06:13 AM
RE: Kernel32.dll Beep Function - by cxS - 04-25-2013, 06:14 AM
RE: Kernel32.dll Beep Function - by w00t - 04-25-2013, 06:22 AM
RE: Kernel32.dll Beep Function - by cxS - 04-25-2013, 06:52 AM
RE: Kernel32.dll Beep Function - by w00t - 04-25-2013, 07:59 AM
RE: Kernel32.dll Beep Function - by cxS - 04-25-2013, 08:02 AM