The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
From: "Frank Bemelman"
Subject: Re: To C or not to C
Date: Sat, 4 Jan 2003 19:22:52 +0100
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
Organization: EuroNet Internet
NNTP-Posting-Date: 04 Jan 2003 18:23:27 GMT
"Dr.Bob" schreef in bericht
> "Michael Culley" wrote in message
> > Thanks to everyone's help here my small project has progressed well. I
> > had a completed (although very messy) prototype. For those who didn't
> > my previous thread it is using an 8051 and a max232 to connect to a
> > port. I'm doing this project with a friend and he prefers to use C while
> > prefer to use assembler. We have both written the software and both
> > work the same with only minor differences. I can see 2 problems with
> > C. First, there is alot of extra assembly code added in that we don't
> > what it does, if this produces a bug it could be hard to track down.
> > it appears to use alot more of the rom. The assembler version is 757
> > and the C version is 1508 bytes. About 350 bytes is text in both, so the
> > code is almost 3 times larger than the assembler version. The C version
> > had quite a few hours spent on it getting it down to 1500 bytes where
> > assembler version hasn't been optimised. 1500 bytes seams like a huge
> > when we only have 2k.
> > What does everyone think, which is better C or assembler? We are using
> > --
> > Michael Culley
> That's very interesting. I've always heard that assembly language would
> produce a shorter more succinct and faster running code than code compiled
> from C. Your experience confirms that view at least in your small program.
> But, I never figured that the difference would be as geat as you've found,
> to1 that's amazing and almost scary. I'm writing a MIDI controller that is
> several thousand lines long and the program will have to bomb through it
> a very fast rate to keep up with the MIDI commands. It's for a pipe organ.
> I'm working in assemby and am glad I didn't even think of doing it in C.
> Based on your experience it dosen't look like code compiled from C could
> fast enough to do my job. Thanks for the insight.
Doctor Bob. Relies on the insight from one little project.
(remove 'x' & .invalid when sending email)
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup