ACCESS REGISTERS FROM TURBO C??
Steve Hutzley
hutzley at bigq.dec.com
Thu Nov 15 06:54:56 AEST 1990
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
void your_funct(int a, int b)
{
union REGS in, out;
r.h.ah = a;
r.x.bx = b;
int86(0x10, &in, &out); /* call int 10, video */
}
r.x. = 16 bits (AX,BX,CX.....)
r.h. = 8 bits (either AH, AL)
ANY QUESTIONS?
Steve
More information about the Comp.lang.c
mailing list