ACCESS REGISTERS FROM TURBO C??

John D. Mitchell c164-bd at cinna.uucp
Thu Nov 15 12:56:36 AEST 1990


In article <2024 at mountn.dec.com> hutzley at bigq.dec.com (Steve Hutzley) writes:
>
>In article <11475 at j.cc.purdue.edu>, zhou at brazil.psych.purdue.edu (Albert Zhou) writes...
>>This question might be silly to some of you. How can I directly access
							 ^^^^^^^^
>>registers from Turbo C?
>
>Look at <union REGPACK....>
>
>        example  [deleted]

If the original poster wanted *direct* access then see my previous
posting.

The REGPACK union is really only useful for the DOS intXX() interrupt
interface functions.  The incur a lot of overhead due to (usually)
excessive copying of the union to the actual registers prior to the
int call and then copying the registers into the union after the call.
The plus is that quite a few DOS compilers support this feature in
basically the exact same way.  The inline assembly and pseudovariable
capabilities of TC will generate (unportable but) faster, smaller code.

Good luck,
	John Mitchell
	johnm at cory.Berkeley.EDU



More information about the Comp.lang.c mailing list