gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

ASM > Why must i use ASM for GBA???

#5047 - Link - Fri Apr 18, 2003 9:53 am

I don't know ASM but i would learn...
i know ASM for Windows is different from ASM for GBA, so to develop for GBA what ASM mus i use?
Why must i use assembly instead C or C++??

#5048 - lordmetroid - Fri Apr 18, 2003 12:44 pm

you don't need to use asm you can use C or C++ however I geratly advise you to chose C if you chose some of them...

The asm for GBA is either thumb or arm based... I prefer thumb.
you can find rferences and spec or www.arm.com
_________________
*Spam*
Open Solutions for an open mind, www.areta.org

Areta is an organization of coders codeing mostly open source project, but there is alot of sections like GBA dev, Language learning communities, RPG communities, etc...

#5050 - Link - Fri Apr 18, 2003 12:59 pm

Tnx, but why some people use ASM?

#5051 - darkcloud - Fri Apr 18, 2003 4:30 pm

The main reason you would use ASM is for speed-critical things like some 3d-graphics things, or software audio mixing.
_________________
Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean ? It's a mystery, and that's why so is mankind.

#5068 - jd - Sat Apr 19, 2003 4:54 am

Hand-coded assembler is usually faster than compiled C/C++. Generally, the best approach is to write most of the code in C/C++ (there's no difference in performance between them if you're careful with C++'s extra features) and just write the performance critical code in assembler. For my current project, only ~5% of the code is in assembler, but ~95% of the CPU time is spent there.

Also, it generally isn't worth writing something in assembler on the GBA unless you're also putting it in IWRAM, in which case you should use ARM rather than thumb.