Efficient use of assembly for cellphones | developer.brewmp.com Efficient use of assembly for cellphones | developer.brewmp.com

Developer

Efficient use of assembly for cellphones

Forums:

Hi.

Someone knows where I can find some information/samples about efficient use of assembly for cellphones (using assembly code in BREW programs)?

lots of places, its just ARM based assembler, gameboy is always a good place to look, theres a few good arm books, search the forums for some recommendations.
the arm compiler is pretty efficient though

lots of places, its just ARM based assembler, gameboy is always a good place to look, theres a few good arm books, search the forums for some recommendations.
the arm compiler is pretty efficient though

There's nothing magic to writing assembly code for Brew phones. It works exactly the same way as on any other ARM paltform, suc has the Pocket PC, the MS Smartphone etc.
You write you code, assemble it using ARMASM and link it into your projects. That's it. The real annoyance is that you have no way of debugging it and that you will have to write C/C++ implementations of your routines as well for the emulator version - which is required for True Brew Testing.
Just a quick heads-up, though, typically I debug my assembly routines on the Pocket PC where you have wonderful, fast, real on-device debugging and don't have to do with crap such as broken Logger output or log files because the phone is not even capable of communicating a debug output to the PC.

There's nothing magic to writing assembly code for Brew phones. It works exactly the same way as on any other ARM paltform, suc has the Pocket PC, the MS Smartphone etc.
You write you code, assemble it using ARMASM and link it into your projects. That's it. The real annoyance is that you have no way of debugging it and that you will have to write C/C++ implementations of your routines as well for the emulator version - which is required for True Brew Testing.
Just a quick heads-up, though, typically I debug my assembly routines on the Pocket PC where you have wonderful, fast, real on-device debugging and don't have to do with crap such as broken Logger output or log files because the phone is not even capable of communicating a debug output to the PC.

Hey All, thanks for the postings - you've saved me a lot of time!
Anyone out there tried to use ARMASM with GBA or Smartphone assembler source? I'm definitely a rookie when it comes to knowing the difference between to two, so your knowledge is much appreciated.
Thanks!
B

Hey All, thanks for the postings - you've saved me a lot of time!
Anyone out there tried to use ARMASM with GBA or Smartphone assembler source? I'm definitely a rookie when it comes to knowing the difference between to two, so your knowledge is much appreciated.
Thanks!
B

well you can use whichever assembler you want, provided the object file is compatible and you don't use say gba bios calls on a smartphone or vice versa.
each assembler has its own format for code though, but the code itself, its generally usuable, again providing you use only whats common

well you can use whichever assembler you want, provided the object file is compatible and you don't use say gba bios calls on a smartphone or vice versa.
each assembler has its own format for code though, but the code itself, its generally usuable, again providing you use only whats common

It depends. MS Smartphones use XScale chips so if you have highly optimized XScale code it may not be optimal for an ARM9 chip in terms of performance for example but for the most part there is not much of a difference in terms of the instruction sets themselves.

It depends. MS Smartphones use XScale chips so if you have highly optimized XScale code it may not be optimal for an ARM9 chip in terms of performance for example but for the most part there is not much of a difference in terms of the instruction sets themselves.

Thanks Charlie & Dragon. I saw Charlie recommended some ARM Books out there. Any specific recommendations to help a newbie get started?

Thanks Charlie & Dragon. I saw Charlie recommended some ARM Books out there. Any specific recommendations to help a newbie get started?

The ARM technical reference guides that are available for download on ARM's official website are some of the best materials for programming the CPU in assembly.

The ARM technical reference guides that are available for download on ARM's official website are some of the best materials for programming the CPU in assembly.