Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
stack   Message List  
Reply | Forward Message #13820 of 15019 |
How does the stack on the Gameboy Advance work?

Jeff's crt0.S sets the user and irq stack pointers high in IWRAM (160 and
92 bytes respectively). This implies to me that these stacks grow upwards
in memory. Giving the irq stack 92 bytes and the user stack 160 - 92 = 68
bytes.

This looks to odd to me, and knowing that stacks ussually grow downward in
memory towards the top of the heap then maybe they really grow downwards,
giving the irq stack 68 and the user stack all of iwram (or until it
corrupts any variables stored there).

If so, then what is the 92 bytes left free at the top? I seem to recall
there being a third stack on the ARM7TDMI, is this for bios calls?

I knew all of this once upon a time, but looking at everything again is
serving to confuse me, not clarify ^_^

Looking at the linkscript and crt0.S for devkitadvance again is making me
have a lot of "What the hell!" moments which one gets when they look at
cod ethey wrote years ago.








Fri Mar 21, 2003 5:13 pm

fenix@...
Send Email Send Email

Forward
Message #13820 of 15019 |
Expand Messages Author Sort by Date

How does the stack on the Gameboy Advance work? Jeff's crt0.S sets the user and irq stack pointers high in IWRAM (160 and 92 bytes respectively). This implies...
Jason Wilkins
fenix@...
Send Email
Mar 21, 2003
5:36 pm

No, the stacks grow downwards. In systems where there is only one stack, that is ususally set to the high end of (a typically monolithic) memory area and the...
John Seghers
johnse98072
Offline Send Email
Mar 21, 2003
8:03 pm

The stack system the ARM7 uses only require 4 opcodes, LDR, STR, LDM and STM, which can also be used to load and store data from memory, which can get...
Benjamin White
bw3043@...
Send Email
Mar 21, 2003
9:10 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help