Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!zaphod.mps.ohio-state.edu!van-bc!mdivax1!mclaren Newsgroups: comp.lang.c Subject: Re: ACCESS REGISTERS FROM TURBO C?? Summary: Yes, it's possible. Keywords: Turbo C, Assembly, Registers Message-ID: <1990Nov15.022826.9723@mdivax1.uucp> Date: 15 Nov 90 02:28:26 GMT References: <11475@j.cc.purdue.edu> Reply-To: mdivax1!mclaren (Gavin McLaren) Organization: Mobile Data International, Richmond, B.C., Canada Lines: 24 Return-Path: Apparently-To: van-bc!rnews In article <11475@j.cc.purdue.edu> zhou@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