delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/17/05:11:15

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Thu, 17 Aug 1995 09:15:29 BST
Subject: Re: inline asm?
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

  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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019