Writing
asm ("dadd %A1, %A0\n\t"
"dadd %B1, %B0"
: "=rm" (total)
: "i" (25));
yelds
dadd #llo(25), &total
dadd #lhi(25), &total+2
check appendix in doc.txt
~d
On Friday 03 January 2003 21:58, Mark Stokes wrote:
> I'm having trouble telling my assembly about a high byte of a long int.
> Is there an easy way to do this?
> Example:
>
> void DADDLongInt( unsigned long int total )
> {
> // for now, just add 25 each time
> __asm__("\tDADD %1, %0\n\tDADC %0": "=g" (total) : "n" (25) );
> }
> Written another way:
> void DADDLongInt( unsigned long int total )
> {
> // for now, just add 25 each time
> __asm__("\tDADD %1, %0": "=g" (total) : "n" (25) );
> __asm__("\tDADC %0": "=g" (total) );
> }
> What do I use for the operand of the second assembly instruction? I
> want to just say "(total(2))" or "(total+2)", but neither work.
>
> Thanks
> -Mark
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
--
*********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314
*********************************************************************