Ya, the example looks good to me.  In fact, I didn't know you could use
useful labels for the asm vars, I have a few that all use A1 B2, etc.
In my code, I just used straight C to convert from BCD to Bin (and vice
versa), although, you're looks to be far more efficient.
On the assembly for the dadd, seems like you are going to a bit of extra
work, this too would work:
    __asm__( "DADD.W  %A1, %A0  \n\t" : "=r" (bcd_a) : "r" (bcd_b) );

Found one pet peve: 
In file: x33.html, the word "its" is missing an apostrophe.  The word is
short for "It is", I know you know this (being British), but some others
here might not :)

-Mark



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Steve
Underwood
Sent: Tuesday, June 10, 2003 8:58 AM
To: [email protected]
Subject: Re: [Mspgcc-users] FAQ


Mark Stokes wrote:

>Great FAQ!!!
>Some suggestions:
>x27.html :
>You might add that any and all BCD variables must be dealt with
straight
>assembly, but then tell them how easy it is.
>
I just added something in the "I will still need to use some assembly 
language somewhere, won't I?" section about BCD. I didn't have any 
examples of using assembly language to access special machine features, 
as one might do on any processor. BCD handling is a good one. I included

some example code - a normal routine for binary->BCD conversion, and a 
little inlined one for adding. The conversion routine is pasted in from 
my own software. The addition routine is unchecked!

>x81.html:
>You need to replace "do" with "to" in the title.
>
Done.

>Great work (and thanks for the pwm example).
>
We should really build a library of source code like this, as the wheel 
keeps getting reinvented far too often.

I've seen a few nice examples of something in this area recently. 
Someone showed me a routine for setting an FLL to any frequency. You 
wouldn't really use this routine in a real embedded program, as its 
generality makes it too big. However, reading through it is the best way

I have found to figure out what to put in the registers to achieve the 
specific FLL frequencies I actually want.

Regards,
Steve




-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Reply via email to