So whats th difference between the two???
Okay the stack may point to the memory location that holds the return address so what is the link register for?
On an ARM the return address is stored in the link register. A subroutine can choose to store it on the stack or not; if it does not call any other subroutines it's quicker.
Thereâ€™s loads of generic documentation available to teach yourself what a stack is and what itâ€™s used for.
The link register holds the return address for the current function, which is not pushed on the stack immediately. Read the AVR 32-bit Architecture Manual and the AVR32UC Technical Reference Manual for more info on that. Itâ€™s all in there.
© 2020 Microchip Technology Inc.