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,613 of 4,675   
   R.Wieser to All   
   Indirect INT calling   
   27 Oct 18 14:51:35   
   
   From: address@nospicedham.not.available   
      
   Hello all,   
      
   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.   
      
   So, I'm looking for a different solution.   
      
   The simplest is self-modifying code to change one byte and than have the   
   rest call the "int {number}", "RET" sequence.  But that would wrap avery   
   call in a superfluous return.   
      
   I guess I could push the flags, clear some bitflags in it and than jump   
   indirect (thru the INT vector table at page zero) to the correct address,   
   but I'm wondering if there isn't maybe an easier(?), more direct way of   
   doing it.   
      
   Regards,   
   Rudy Wieser   
      
   --- 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