home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zephyr.ens.tek.com!uw-beaver!ubc-cs!destroyer!sol.ctr.columbia.edu!usc!sdd.hp.com!mips!mips!munnari.oz.au!trlluna!titan!sibelius.trl.oz.au!mathers
- From: mathers@sibelius.trl.oz.au (Steven Mathers)
- Newsgroups: comp.lang.c++
- Subject: TURBO C and inline assembly
- Message-ID: <1992Aug19.081907.4705@trl.oz.au>
- Date: 19 Aug 92 08:19:07 GMT
- Sender: root@trl.oz.au (System PRIVILEGED Account)
- Reply-To: s.mathers@trl.oz.au
- Organization: Telecom Research Labs, Melbourne, Australia
- Lines: 17
-
- Hello, I am in need of help from someone familiar with the way
- Turbo C++ handles inline assembly.
-
- My problem is that I would like to be able to issue an
- OUT ax,dx from inline assembly. Currently I am using the
- OUTPORT command, which works fine, but generates a lot of needless
- assembly instructions...something like 16 instructions, as opposed to
- the 3 I would need for the OUT assembler command.
-
- What I would like to know is: Can I freely use AX and DX in an inline
- assembly, without having to worry if Turbo was expecting the values of
- these registers to be anything in particular, and thus throw things out
- of kilter. I tried it, and it worked fine, but I'm not sure if I was
- just lucky, and I am reluctant to continue with this method unless I know it
- will be A-OK.
-
- Thanks for any replies.
-