[Resolved (ish)] Thumb Scratch Registers? Returning #0x0 from ASMC Routines?

If you were reading the recent posts on my dump of ASM crap, you’d know that @AlfredKamon had a problem with one of my routines. So I went in and I couldn’t really find a problem. But then I changed a
push {r4-r5, lr} to a push {r0-r5, r14} and the equivalent pops. And now it worked. What’s going on!? Aren’t registers r0-r3 supposed to be scratch? Or is returning 0x0 in r0 a problem for ASMC routines?


IMO, the second one(if r0 is the only changed register.).

No, this problem. It’s with the give-all-items-to-convoy routine.

depending on where/what you wrote your hack into up it’s entirely possible that there were extraneous return values in r1(/r2/r3) that you inadvertently clobbered

No, this was literally a standalone ASMC routine for events…

actual ASMC event routines typically don’t return a value (they wouldn’t do anything with it anyway); it shouldn’t actually matter but FE8 is probably weird???

I’ll take “FE8 is probably weird” …