Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!mit-eddie!ll-xn!ames!amdcad!amd!intelca!oliveb!pyramid!prls!philabs!micomvax!musocs!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.lang.c Subject: Re: Inline assembler (traditional asm() misfeature) Message-ID: <830@mcgill-vision.UUCP> Date: Fri, 26-Jun-87 22:55:51 EDT Article-I.D.: mcgill-v.830 Posted: Fri Jun 26 22:55:51 1987 Date-Received: Sat, 4-Jul-87 23:08:29 EDT References: <608@zen.UUCP> <2299@hoptoad.uucp> <21211@sun.uucp> <830@omepd> Organization: McGill University, Montreal Lines: 28 In article <830@omepd>, mcg@omepd (Steven McGeady) writes: > 1. Traditional Mechanism > If the keyword 'asm' is seen, immediately followed by a parenthesis > and a quoted string, e.g.: > asm("movq g0,r0"); > then the quoted string is stripped of the quotes and emitted [into > the assembly output of the compiler]. What's astonishing is how primitive the implementation of this sometimes is. We were very surprised to find that asm(".asciz \"foo\""); didn't work. It inserted .asciz \ into the assembly output and then complained about foo! The thing inside parentheses was not even being parsed as a string token; it was being copied at about as low a level as possible. der Mouse (mouse@mcgill-vision.uucp)