From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c78177ec2e61f4ac X-Google-Attributes: gid103376,public From: "Marin David Condic, 561.796.8997, M/S 731-93" Subject: Re: ada and robots Date: 1997/06/12 Message-ID: <97061213082757@psavax.pwfl.com>#1/1 X-Deja-AN: 247978955 Sender: Ada programming language Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU X-Vms-To: SMTP%"INFO-ADA@VM1.NODAK.EDU" Newsgroups: comp.lang.ada X-Vms-Cc: CONDIC Date: 1997-06-12T00:00:00+00:00 List-Id: Joe Gwinn writes: >There is tons of such code available for free on the internet. Just look >for I/O drivers, such as for UNIX and VxWorks. VxWorks Board Support >Packages are another example. > >Even C-coded I/O drivers and kernel initialization sequences resort to >some assembly code. > >As for shared memory, look into the handling of driver comm pools, queues >shared between tasks and also with ISRs. And so on. > >For UNIX drivers, there are multiple books available on exactly how to >write such drivers, all in C. Most include (annotated) sample driver >code. > >I would submit that there is ample evidence that C can be used for direct >hardware control, and for shared memory. > >I would not claim that all who have tried such things have succeeded, >regardless of language. Many programmers couldn't write an I/O driver if >their life depended on it. > It seems that what your saying is that C has been used to develop code which exercises direct control of hardware and is able to implement shared memory data structures between threads. I don't think that anyone would doubt this. I think what I originally took exception to was the claim that Ada *can't* do these things. If I was trying to implement some extension to Unix, (a device driver, perhaps) I probably wouldn't spit into the wind by trying to do it in Ada (Given that the whole OS is written in C, all the support tools are C oriented and I wouldn't want to maintain one lonely little Ada module afloat in a Sea of C ;-) But that's a far cry from claiming that Ada is incapable of being used to write device drivers. I've written lots of code which implements interfaces to A/D converters, ISR's, discrete I/O, Mil-Std-1553 buses, UARTs, Manchester data links, etc, etc, etc. All in Ada(83). I've shared memory between tasks and between processors using Ada(83) (albeit, not using the "pragma SHARED" - but implementing what you'd have to do for yourself in C anyway - a semaphore or some hardware support for shared memory.). So it's a little hard to read "Ada can't be used down at the bare metal" when you know that you've been doing just that for years - and that it's not at all any more difficult than it would be in C. While I won't presume to speak for Dr. Dewar (I know he's pretty good at clarifying himself :-) I think its fair to say we'd both like to see an example of something you believe that C does in dealing with the bare machine that you feel would be difficult in Ada. I'll accept that there may be some things C does better than Ada, but I'd like to see an example. MDC Marin David Condic, Senior Computer Engineer ATT: 561.796.8997 Pratt & Whitney GESP, M/S 731-96, P.O.B. 109600 Fax: 561.796.4669 West Palm Beach, FL, 33410-9600 Internet: CONDICMA@PWFL.COM =============================================================================== "You spend a billion here and a billion there. Sooner or later it adds up to real money." -- Everett Dirksen ===============================================================================