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

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? 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
Asm externs in iwram   Message List  
Reply | Forward Message #9728 of 15019 |
Re: [gbadev] Asm externs in iwram

Ben Smith wrote:
>
> Hi all,
> I've been trying to compile GASS also, and found that all data that was
supposed to be loaded into IWRAM isn't. What's weirder is that the data isn't
even at the ROM load address.
> A simple test has shown me that Jeff's lnkscrpt will load data into IWRAM
correctly if there are C constants being loaded also, but incorrectly if the
only external data is loaded through an asm file.

This is due to the way GAS works it appears.
I just added this to the GBA Dev FAQs:

http://www.devrs.com/gba/files/gbadevfaqs.php#EmptyBits

GAS Assembly FAQs

Q: When I compile assembly code to go into section .iwram, only empty (0x00)
code is copied from ROM to IWRAM. Why?
A: It is not enough to just do the following:
-.SECTION .iwram
-you need to do the following instead:
-.SECTION .iwram,"ax",%progbits
-or otherwise the code that is put in ROM, to be copied to IWRAM,
-for some reason is composed only of the value 0x00.
-If you use the GCC command line option -save-temps when compiling
-a C file then you will notice similar directives in the resulting .s
-temporary files. Search this file on the keyword 'progbits' for
-other examples.

Jeff




Fri Feb 1, 2002 2:18 pm

jfrohwei
Offline Offline
Send Email Send Email

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

Hi all, I've been trying to compile GASS also, and found that all data that was supposed to be loaded into IWRAM isn't. What's weirder is that the data isn't...
Ben Smith
bsmith2@...
Send Email
Feb 1, 2002
8:44 am

... This is due to the way GAS works it appears. I just added this to the GBA Dev FAQs: http://www.devrs.com/gba/files/gbadevfaqs.php#EmptyBits GAS Assembly...
Jeff Frohwein
jfrohwei
Offline Send Email
Feb 1, 2002
2:18 pm
Advanced

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