Re: Help with this assembly code
Posted: Sat Nov 24, 2018 1:12 am
Yes around 1994 would be correct. I forget which peice of software my copy came with, though it was late 1994 that I got it based on the October 1994 date on the 3 page Acorn document.Paeryn wrote: ↑Sat Nov 24, 2018 12:26 amThe oldest APCS I could find is from Acorn RISC Machines with a copyright of 1994 (so slightly earlier than I could find on Arm's website), no idea what revision it is though (it doesn't say and it's a plain text document), that has the same usage as now.
No idea on how printf is picking up R4 for you without knowing how it was compiled. Have you tried compiling a C program against it and looking at how it is passing parameters?
Yes it I had that wrong, do to an incorrect document, combined with my personal memory failing. I apologize.
I did figure it out on why the extra parameter was accepted that way, it does not work in C.
I have a fast C library that I had put together for playing around with that uses R0-R8 for parameters, it is only of any use from assembly, and I have my toolchain configured to link with that for assembly source if any C Library function is called. I had was not thinking about it until i dumped the assembly listing from gcc, and it did not line up.
Thank you for the refresher.