News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

How can I use Interrupt in 64-bits Window 7/8 via x86 Instruction ?

Started by gapry, April 27, 2015, 10:19:51 AM

Previous topic - Next topic

gapry

Dear:

     If I need to write some applications via x86/x64 Instruction in Window 7, how can I use Interrupt or Exception to speedup my program? For now my approach is polling or coroutine, I hope I can speedup it via Interrupt or Exception. I read the book, Assembly Language for x86 Processors (7th) and found a approach, 16-Bit MS-DOS Programming. But I think that is out of date. Any suggestion?

Thanks

dedndave

what kind of event triggers it ?
interrupts are pretty much unusable, at least in user mode
not even sure they are usable in kernel mode

hutch--

Hi gapry,

Welcome on board. You are right, the old 16 bit DOS was real mode addressing where 32 and 64 bit Windows are protected mode addressing and the ranges are entirely different. As Dave mentioned, some kernel mode drivers use specific interrupts for some hardware tasks but they are not available in user mode at all. The trick is to learn your Widows API functions well including sometimes complex variations and you will get the best you can get this way.

Look at multiple threading and picking the right API combination and you may surprise yourself. Fast algorithms are an art so get used to timing different algos to get the speed you need.

rrr314159

hello gapry.

Depends what interrupt you're looking for, traditional 16-bit interrupts are not available but there are callback functions that do the same sort of thing, namely asynchronously call a designated routine in your program, taking the place of polling. There are also software interrupts like "int 3" used for debugging that could be cleverly adapted to your needs, maybe. It depends entirely what you're trying to do. As hutch says there are plenty of ways to speed up programs, interrupt vs. polling is only one of many issues, usually not very important.
I am NaN ;)