From: Shakthi Kannan Date: Tue, 28 Mar 2006 04:06:46 -0800 (PST) Subject: [U-Boot-Users] Re: combined C/ARM assembly example Message-ID: <20060328120647.71344.qmail@web30715.mail.mud.yahoo.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi again, Got this working. Repositioned, ptr1, ptr2 assignment after the assembly usage: #include #include int main (int argc, char *argv[]) { unsigned long *ptr1, *ptr2; /* not here */ asm volatile ("ldr r0,= 0x30800000"); asm volatile ("ldr r3,= 0x30800004"); asm volatile ("ldr r1,= 0xff000000"); asm volatile ("movs r2, r1, lsl #1"); asm volatile ("mrs r1, cpsr"); asm volatile ("str r1, [r0, #0]"); asm volatile ("str r2, [r3, #0]"); /* placed here */ ptr1 = (unsigned long *) (0x30800000); ptr2 = (unsigned long *) (0x30800004); printf ("*ptr1 = %8lx\n", *ptr1); printf ("*ptr2 = %8lx\n", *ptr2); return (0); } Regards, SK -- Shakthi Kannan, MS Software Engineer, Hexaware Technologies [E]: shakthimaan at yahoo dot com [M]: (91) 98407-87007 [W]: http://www.shakthimaan.com [L]: Chennai, India __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com