cause (&total +1) adds 4 bytes to 'total'. This is a general C thing. ~d
On Saturday 04 January 2003 00:02, Mark Stokes wrote: > Thanks for the warning, but I haven't gotten any errors/warnings while > using 'g'. > Thanks also for reminding me about doc.txt. For some reason I thought I > had read the entire document. Looks like I need to read it again. > I don't however understand why the first "total += 25;" is accessing the > incorrect memory location (see my second post on this subject). Any > ideas about that? > -Mark Stokes > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Dmitry > Sent: Friday, January 03, 2003 3:35 PM > To: [email protected] > Subject: Re: [Mspgcc-users] ASM accessing high word of long int? > > > One more thing: > "g" is an invalid constraint in mspgcc port. > You 'll have errors (and compiler warnings) here. > ~d > > On Friday 03 January 2003 22:50, Mark Stokes wrote: > > __asm__("\tDADD %1, %0": "=g" (total) : "n" (25) ); > > 1374: b2 a0 19 00 00 02 dadd #25, &0x0200 > > ;#0x0019 > > > __asm__("\tDADC %0": "=g" (*((&total)+1) ) ); > > 137a: 82 a3 04 02 dadc &0x0204 ; -- ********************************************************************* ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44 _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314 *********************************************************************
