Date: Tue, 12 Sep 95 09:51 MDT From: mat AT ardi DOT com (Mat Hostetter) To: digisoft AT eis DOT net DOT au (Paul) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: interrupt stops being invoked References: <199509120623 DOT QAA22743 AT tinny DOT eis DOT net DOT au> >>>>> "Paul" == Paul writes: Paul> How can you get the size of a piece of "C" code that Paul> services the interrupt so that it can be locked. Up till Paul> now I just lock it all to be safe. As a TOTALLY EVIL hack, you can do something like: ---------------------------------------------------------------------- void interrupt_memory_start (void) { } void my_interrupt_handler (void) { ... } void interrupt_memory_end (void) { } ---------------------------------------------------------------------- and then lock: (char *) interrupt_memory_end - (char *) interrupt_memory_start bytes, starting at: (char *) interrupt_memory_start Of course, there's no guarantee that this will work (I think even casting a function pointer to a char * is forbidden) but it happens to be the case that this works with the latest djgpp (just make sure all of your functions are non-static). -Mat