0

I am working on an assignment right now for ARM 7 (Big Endian) Assembly. We are using LDMDB and STMIA for this problem where we have an empty ascending stack, where I am asked to push the frame pointer value to the top of the stack. Then I am asked to point the frame pointer to the head of the stack. Is the head where the fp value is stored in the stack, or is it where the sp points to 4 bytes after that?

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
acornTime
  • 278
  • 1
  • 15
  • have you simply looked at how compilers build the stack frame? (arm7 is not natively big endian and the stack frame has nothing to do with endianness) (not sure why you would put big endian in there after arm 7... – old_timer Apr 17 '23 at 06:23
  • what part of the arm documentation do you not understand, this is clearly documented. Please post the confusing sections of the documentation on this topic. – old_timer Apr 17 '23 at 06:23
  • @old_timer I added big endian because I didn't know if it was important information to the question, it is part of the name on Keil UVision 4, so I added it. I am a student, and I am here to ask for help because I couldn't figure it out on my own with google or gpt. As with the documentation, it says at the top of the stack, and I did not know if the top for an empty type stack is at top value or the space after it. Calling me out for not knowing about endienness, and telling me that arm is documented does not help me. – acornTime Apr 17 '23 at 21:20
  • the arm instruction documentation has pseudo code to describe exactly how the stm and ldm instructions work. hint: the older arm arm docs are simpler pseudo code, but all of them describe it. – old_timer Apr 18 '23 at 00:06

0 Answers0