Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: [AVR-Chat] Re: INTO interrupt firing all the time?

Re: [AVR-Chat] Re: INTO interrupt firing all the time?

2007-12-17 by Dennis Clark

Pay no attention to the "assembly uber alles" dinosaurs out there, C is
only slightly higher level than that anyway.  It does bring up one
point, when working in embedded programming it pays to know the assembly
so you can check and tweak C constructs to fit your needs.  That said,
only a masochist insists on coding projects entirely in assembly when
they have an option not to.

DLC

> On Dec 17, 2007 4:35 PM, John Samperi <samperi@ampertronics.com.au> wrote:
>> At 06:02 AM 18/12/2007, you wrote:
>> >RJMP when it should be using JMP, that the ISRs all end in RETI,
>>
>> Now David, who would do such a silly thing....... :-)
>
> Some people have entirely too good of a memory..
> :)
>
> Hey, it happens to us all at some point.
>
>> He is not like us but he is using the "other" laguage.
>
> Oh.. Hmm., That complicates things.
> People keep telling me I need to learn that, and yet the need never
> actually crops up in a project.
>
>
>
> Yahoo! Groups Links
>
>
>
>


-- 
Dennis Clark
TTT Enterprises

Re: [AVR-Chat] Re: INTO interrupt firing all the time?

2007-12-18 by Enki

You are right, coding in Assembly is not for everyone.
	The ones that have the intelligence for doing that are often seeing 
as masochists. Pure jealousy...

	MJ
Show quoted textHide quoted text
On 17 Dec 2007 at 14:48, Dennis Clark wrote:

>   Pay no attention to the "assembly uber alles" dinosaurs out there, C is
> only slightly higher level than that anyway.  It does bring up one
> point, when working in embedded programming it pays to know the assembly
> so you can check and tweak C constructs to fit your needs.  That said,
> only a masochist insists on coding projects entirely in assembly when
> they have an option not to.
> 
> DLC
>

Re: [AVR-Chat] Re: INTO interrupt firing all the time?

2007-12-18 by David Kelly

On Dec 17, 2007, at 6:49 PM, Enki wrote:

> 	You are right, coding in Assembly is not for everyone.
> 	The ones that have the intelligence for doing that are often seeing
> as masochists. Pure jealousy...


There is always the snobbery angle to consider. I have inherited very  
few projects done in assembly that were done well. Also have inherited  
too many done in C that were horrible. Some seem to have been made  
horrible so as to ensure employment of the original author.

A prime example #included all the source files at one place or  
another, sometimes in the main.c file, sometimes in a file that was  
#included from another. A Makefile was too exotic. I spent a day  
trying to unravel the spaghetti without success. The code had many  
other faults such as it was interpreting serial commands encoded in  
hex ascii claimed to be MODBUS. It wasn't. Meanwhile a routine would  
look at the input buffer, convert the hex ascii to binary, think about  
it, then CONVERT IT TO HEX and put it back, where the next routine  
would DO THE SAME THING OVER AGAIN TO THE SAME DATA!

I wrote new code in less time than the original author took to port  
his beast from Rabbit-C to avr-gcc. Had a solid code base which  
withstood The Boss's creeping feature-itis the next 6 months. To this  
day its that company's best and least trouble product. And now it  
really and truly speaks ASCII Modbus.

One of my favorite Makefile targets with avr-gcc is:

.elf.list:
         avr-objdump -DS $< > $@

which generates a commented dump listing. It tries to disassemble data  
sections too, which doesn't make much sense but doesn't hurt anything.

I spend a moderate amount of time making sure the compiler wrote what  
I was looking for. Very important when building initialized structs  
and storing them in __ATTR_PROGMEM__ space.

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Re: [AVR-Chat] Re: INTO interrupt firing all the time?

2007-12-18 by dlc

Coding in assembly is a must for some things - Especially if you don't 
need complex decision structures and aren't doing a lot of "big number" 
math.  Doing it for everything is just being stubborn - IMO.  ;)  I like 
the tightness of assembly, but I have projects that would be a nightmare 
done that way.  Can you imaging a Zigbee stack coded in assembly? 
<shudder>.

DLC

Enki wrote:
> 	You are right, coding in Assembly is not for everyone.
> 	The ones that have the intelligence for doing that are often seeing 
> as masochists. Pure jealousy...
> 
> 	MJ
> 
> 
> 
> On 17 Dec 2007 at 14:48, Dennis Clark wrote:
> 
> 
>>  Pay no attention to the "assembly uber alles" dinosaurs out there, C is
>>only slightly higher level than that anyway.  It does bring up one
>>point, when working in embedded programming it pays to know the assembly
>>so you can check and tweak C constructs to fit your needs.  That said,
>>only a masochist insists on coding projects entirely in assembly when
>>they have an option not to.
>>
>>DLC
>>
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 

-- 
-------------------------------------------------
Dennis Clark          TTT Enterprises
www.techtoystoday.com
-------------------------------------------------

Re: [AVR-Chat] Re: INTO interrupt firing all the time?

2007-12-18 by Roy E. Burrage

There isn't only the job security angle but also milking the project as 
well.  I think we've all seen that one if we've been around a while.

And then there's just down right plain incompetence...


REB


David Kelly wrote:

>On Dec 17, 2007, at 6:49 PM, Enki wrote:
>
>  
>
>>	You are right, coding in Assembly is not for everyone.
>>	The ones that have the intelligence for doing that are often seeing
>>as masochists. Pure jealousy...
>>    
>>
>
>
>There is always the snobbery angle to consider. I have inherited very  
>few projects done in assembly that were done well. Also have inherited  
>too many done in C that were horrible. Some seem to have been made  
>horrible so as to ensure employment of the original author.
>  
>


[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.