ACCESS REGISTERS FROM TURBO C??
mdivax1!mclaren
mdivax1!mclaren
Thu Nov 15 13:28:26 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?
Yes, there are two ways.
The first is to program in assembly language. Look up the appropriate
#--- preprocessor command to do this. Turbo C won't be able to compile this
from the integrated environment - use TCC.
The simpler way is to use the Turbo C predefined variables for every register.
Off the top of my head, they go something like:
_AH
_BL
_DS
etc. Just use them like you would any other variable. Of cource, code
written this way is unlikely to be portable, but you knew that, didn't you :)
You may have to include some special include file. My best advice is RTFM.
--Gavin McLaren
...!uunet!van-bc!mdivax1!mclaren
More information about the Comp.lang.c
mailing list