home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12542 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  1.3 KB

  1. 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
  2. From: mathers@sibelius.trl.oz.au (Steven Mathers)
  3. Newsgroups: comp.lang.c++
  4. Subject: TURBO C and inline assembly
  5. Message-ID: <1992Aug19.081907.4705@trl.oz.au>
  6. Date: 19 Aug 92 08:19:07 GMT
  7. Sender: root@trl.oz.au (System PRIVILEGED Account)
  8. Reply-To: s.mathers@trl.oz.au
  9. Organization: Telecom Research Labs, Melbourne, Australia
  10. Lines: 17
  11.  
  12. Hello, I am in need of help from someone familiar with the way
  13. Turbo C++ handles inline assembly.
  14.  
  15. My problem is that I would like to be able to issue an
  16. OUT ax,dx from inline assembly.  Currently I am using the 
  17. OUTPORT command, which works fine, but generates a lot of needless
  18. assembly instructions...something like 16 instructions, as opposed to
  19. the 3 I would need for the OUT assembler command.
  20.  
  21. What I would like to know is:  Can I freely use AX and DX in an inline
  22. assembly, without having to worry if Turbo was expecting the values of
  23. these registers to be anything in particular, and thus throw things out
  24. of kilter.  I tried it, and it worked fine, but I'm not sure if I was
  25. just lucky, and I am reluctant to continue with this method unless I know it
  26. will be A-OK.
  27.  
  28. Thanks for any replies.
  29.