The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: shakuni on October 19, 2007, 10:47:37 AM

Title: windows native mode applications
Post by: shakuni on October 19, 2007, 10:47:37 AM
I recently came across a program that looked like a win32 program but going through the source code I came across the interrupt calls like
int 3
eventually I realised that it was a native application(the author mentioned it in the comments)

I think I know much about win32 but next to nothing about native windows applications.Are they device drivers or are they ring-0 applications(probably device drivers are ring-0 themselves).

I request to please lead me from where I could learn to write such appications.
And please explain how could we use interrupts, I thought they were obsolete and all we need to know is the api.
Title: Re: windows native mode applications
Post by: Tedd on October 19, 2007, 11:00:47 AM
Win32 application are 'native' windows applications.
"int 3" is the x86 breakpoint interrupt - when executed it sets an exception which will (usually) be picked up by the debugger and handled there. You'll find it in compiled code sometimes when it's used as 'filling' for aligning code, instead of "nop".
The other interrupts aren't used for general application programming - that's what the api is for - but some are used internally by windows, but since it's internal (and generally undocumented) it has a habit of changing between windows versions. There used to be one used specifically for service calls by device drivers, but I'm not sure that's still the case - you'll have to read up on programming device drivers :P