First line.. Compare r0 to 1 (you forgot 0x but meh w\e..)... whats the address in r0? you never set it....Unless that has a latch on it >__>
If it didn't have a latch then there would be 3 other errors besides that one line. Plus, I posted the ARDS code. Do you really think it would be that long if there wasn't a latch on it? Hehe...