home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,615 of 4,675   
   Mateusz Viste to R.Wieser   
   Re: Indirect INT calling   
   27 Oct 18 18:47:14   
   
   From: mateusz@nospicedham.wont.tell   
      
   On Sat, 27 Oct 2018 14:51:35 +0200, R.Wieser wrote:   
   > I'm dealing with a packet driver, which API (ABI?) can be put behind any   
   > available INT (by specifying the number when loading it).   
   >   
   > I would like my program to find the right INT at runtime (which is not   
   > hard,   
   > as the packet driver has a certain string at a certain place, just so   
   > you can check if its actually there) and than use that.   
   >   
   > The problem is that no "INT [byte address]" exists.   
      
   You do not have to use an INT instruction. As Rick suggested already, you   
   can simulate an INT using a "pushf + cli + far call" combo. This way all   
   you have to do is resolve the jump address from the vector table when   
   your program starts and then jump to this address whenever you need to   
   call the pktdrvr interface.   
      
   Here below is how I did it in DWOL:   
   https://sourceforge.net/p/dwol/code/HEAD/tree/trunk/dwol.asm#l162   
      
   I also used the same method in EtherDFS:   
   https://sourceforge.net/p/etherdfs/code/HEAD/tree/etherdfs/trunk/   
   etherdfs.c#l319   
      
   Mateusz   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca