Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!saxony!dgil From: dgil@pa.reuter.COM (Dave Gillett) Newsgroups: comp.sys.ibm.pc.misc Subject: Re: Inline assembly code possible with any compiler Message-ID: <386@saxony.pa.reuter.COM> Date: 5 Sep 90 18:47:56 GMT References: <1990Sep4.100511.10686@uokmax.uucp> <528@demott.COM> Organization: Reuter:file Inc (A Reuter Company) Palo Alto, CA Lines: 18 In <528@demott.COM> kdq@demott.COM (Kevin D. Quitt) writes: >In article <1990Sep4.100511.10686@uokmax.uucp> bateman@nsslsun.gcn.uoknor.edu (Monte Bateman) writes: >>It's possible to do in-line assembler with ANY compiler. >[ abominable technique of executing a string of octal constants deleted]. > Sorry, that isn't in-line assembly. It's unsupportable, and since >there can't be any references to normal variables, mostly useless. The >power on in-line assembly is that you *can* get to normal variables, with >the linker doing the corrections for you. Technically, it's also not "in-line" because the compiler is generating a *function call* into the octal code, which hopefully ends with a suitable return instruction (near/far or whatever). The main attraction of putting machine instructions in-line instead of linking to an assembly-language routine is to avoid the function call/return overhead, and this method doesn't. Dave