Re: calling windows syscalls from gnu assembler
- From: NathanCBaker@xxxxxxxxx
- Date: Sat, 30 Aug 2008 09:30:48 -0700 (PDT)
On Aug 30, 7:46 am, shikamuk <shika...@xxxxxxxxx> wrote:
How to call windows syscalls? I suppose, it is quite different from
Linux way and instead of moving params to regs, and doing int0x80 it
is necessary to call some windows dll functions?
And anyway, how to do it from gnu asm?
I intent to use mingw gnu binutils on windows to produce .exe files
from generated assembly, thank you
If you'd use Cygwin, you wouldn't have to change anything -- the
Cygwin layer would translate those int80h calls for you.
The later-half of this page shows how to call functions from the
'kernel', 'user', and 'gdi' DLLs using (g)as.
http://en.wikibooks.org/wiki/X86_Assembly/GAS_Syntax
In addition, you will need to tell 'ld' to link against those
libraries:
http://sourceware.org/binutils/docs-2.16/ld/WIN32.html#WIN32
Nathan.
.
- References:
- calling windows syscalls from gnu assembler
- From: shikamuk
- calling windows syscalls from gnu assembler
- Prev by Date: Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
- Next by Date: Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
- Previous by thread: calling windows syscalls from gnu assembler
- Index(es):