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,623 of 4,675    |
|    Terje Mathisen to R.Wieser    |
|    Re: Indirect INT calling    |
|    28 Oct 18 15:55:07    |
      From: terje.mathisen@nospicedham.tmsw.no              R.Wieser wrote:       > Terje,       >       >> Selfmodifying code, i.e. fixing the 60h constant to whichever INT       >> value is being used, is by far the simplest to implement in asm.       >       > Agreed.       >       > But as that INT 0x60 is present at several different locations       > thruout the program all those locations need to be stored, and walked       > thru on init. Forget one, and the program will fail ... somewhere.       > Hence my "call a procedure" preference (only one spot to change).              I thought that one was obvious, you have to make a single function which       does the INT xx emulation, and which you call from all the paces where       you need to.       >       >> Then when you need to call the driver you can do this:       >>       >> pushf CLI call far [local_int]       >       > Don't forget the CS: prefix - DS can be, depending on the API       > function, be pointing somewhere rather different than where the       > "local_int" is stored. :-)              Sorry, I agree. I intended for this one to use a segment overrride, and       CS and easier than FS or GS. :-)       >       > One question though: The specs mention three flags being cleared by       > the INT instruction, and you only clear the interrupt flag.       > Experience or something else ?              I have never seen any real need for more than the Int enable flag, and       for a sw API, even CLI is probably not needed, but safer if the code       called this way assumes CLI while doing something dangerous like       changing SS:SP.              Terje              --       - |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca