flat assembler
Message board for the users of flat assembler.
Index
> Main > Interrupts vs. Calls |
Author |
|
itsnobody 09 Feb 2008, 19:42
Just wondering, which is actually faster? Interrupts or calls?
|
|||
09 Feb 2008, 19:42 |
|
revolution 09 Feb 2008, 20:05
What sort of calls? Near? Far? What mode? Real? PM? What code setting? 16? 32?
|
|||
09 Feb 2008, 20:05 |
|
itsnobody 11 Feb 2008, 19:41
So which would be faster? The Linux interrupts or Windows API (assuming both do the samethings)?
|
|||
11 Feb 2008, 19:41 |
|
System86 11 Feb 2008, 23:14
Quote:
Windows API is not the lowest layer. The Win32 functions end up calling the NT native functions, which then generate an int 2Eh to make a kernel call. |
|||
11 Feb 2008, 23:14 |
|
OzzY 12 Feb 2008, 01:26
System86 wrote:
Is it possible to make a kernel call or an int 2Eh directly without windows API? |
|||
12 Feb 2008, 01:26 |
|
edfed 12 Feb 2008, 01:53
windows api come from a file loaded in memory at boot time.
a .dll for use of these libs need an include '*.inc', to import the list of pointers and equates. |
|||
12 Feb 2008, 01:53 |
|
System86 12 Feb 2008, 02:18
Quote:
Theoretically yes, but Int 2Eh is undocumented internal interface and sometimes changes between windows versions, so using it is nonportable (unlike int 21h for DOS or int 80h for Linux, which are standard interfaces). If you want low level access to Windows, better use Native API, which is still mostly officially undocumented but is more well known. See http://undocumented.ntinternals.net/ for NT native functions. |
|||
12 Feb 2008, 02:18 |
|
revolution 12 Feb 2008, 02:20
OzzY wrote: Is it possible to make a kernel call or an int 2Eh directly without windows API? Yes in the sense that there is no restriction and you can directly call int 0x2e if you want. Although there is very little advantage to doing so because the whole interface is not officially documented and can change at any time with an update or service pack. Note that many kernel32 API's are simply wrappers to int 0x2e functions, so in effect you already do call the kernel directly. No in the sense that you are forced to load at least one API DLL into your address space, ntdll.dll will always be mapped in and depending on the OS version ntdll will subsequently load in kernel32.dll. My testing shows that Win2K and WinXP behave differently, one will allow an exe file with no imports and the other will not. I forget which one works and which doesn't, but it is not important anyway, it is enough to know that doing so is unreliable. |
|||
12 Feb 2008, 02:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.