Mail Archives: djgpp/1995/08/17/05:11:15
mat AT ardi DOT com (Mat Hostetter) wrote:-
> You could "pushal" them onto the stack and "popal" them when you are done.
I hadn't heard of pushal and popal before. What PC processors can obey them?
I prefer not to use 486-specific code while there are still many 386's about.
Sometimes I have to write Gnu C++ programs for compiling for people in my
department to run on other PC's.
> But if you are just writing interrupt glue, I'd just write the function
> completely in assembly and only save/restore those registers which the C
> calling convention requires (with a few pushl's/popl's, which are very fast
> on the Pentium and elsewhere).
In my manual of interrupts, the descriptions of most interrupts include a
long list of registers which are clobbered by that interrupt, so I feel safer
saving every register every time. I also find it easier to read to: write the
interrupt's args to `long _ax' etc; swop _ax etc with the registers; call the
interrupt; swop back; pick the interrupt's results out of _ax etc.
> I dunno...Intel must offer such literature.
What is Intel's postal address and phone number?
- Raw text -