Mail Archives: djgpp/2000/01/13/07:34:13
Prashant TR (prashant_tr AT yahoo DOT com) wrote:
: On 12 Jan 2000, Martin Stromberg wrote:
: > : You can't run an interrupt handler in a stack. Use _my_cs(). Although
: > : both SS, DS and CS have the same base, they have different access rights.
: >
: > Yes, you can (at least theoretically).
: Could you explain this in more detail?
Something like this:
asm("
my_handler:
...
my_handler_end:
");
int main()
{
unsigned char code[1000];
memcpy(code, &my_handler, my_handler_end - my_handler);
lock(code, my_handler_end - my_handler);
installhandler(code);
}
Shostakovich, String Quartet 14,
MartinS
- Raw text -