Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why do my assembly language swi calls sometimes cause problems?

0
Posted

Why do my assembly language swi calls sometimes cause problems?

0

If you are using ARM SDT tools then you must make sure that you tell the compiler what registers are being used by bios swi code so that the compiler will know what registers will be safe and what registers will be destroyed by the swi. YOU MUST ALWAYS TELL THE COMPILER THAT THE LR REGISTER WILL BE DESTROYED. Read that last sentence one more time to commit it to memory. 😉 Here is the format for passing that info: swi 0x?, {input registers}, {output register}, {lr,destroyed registers} If the swi call requires no input or output registers, then use the following format as an example: swi 0x?

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123