flat assembler
Message board for the users of flat assembler.
Index
> Non-x86 architectures > gba gfxlib, port to fasmarm |
Author |
|
ghoshi 16 Jul 2010, 09:18
hi, I've been modified the gba gfxlib (http://www.devrs.com/gba/asmcode.php) and port part of it to fasmarm, can draw pixel, line, ellipse on the gba screen now.
Compile: fasmarm fasmarm glib.asm Run: VisualBoyAdvance glib.bin Install VisualBoyAdvance in ubuntu: sudo apt-get install VisualBoyAdvance
|
||||||||||||||||||||
16 Jul 2010, 09:18 |
|
Tyler 16 Jul 2010, 10:21
Wow, that's pretty cool.
|
|||
16 Jul 2010, 10:21 |
|
ghoshi 16 Jul 2010, 11:36
Thank you, revolution, I'll pay attention to this. And I want to port like MenuetOS to fasmarm too, but need some more tutorial, or can some one give me some example of os writed with fasmarm please?
|
|||
16 Jul 2010, 11:36 |
|
revolution 16 Jul 2010, 11:54
ghoshi wrote: ... can some one give me some example of os writed with fasmarm please? ARM is not really targeted towards general purpose systems, so any assembly code tends to be single purpose and not very transferable to elsewhere. But Linux has been ported to many boards. However it tends to be a huge install and a huge overhead in the small ARM boards. I would only recommend it for quick and dirty setups where performance and power usage optimisation are not important. |
|||
16 Jul 2010, 11:54 |
|
ghoshi 16 Jul 2010, 13:09
I just try to write a small os with height performance and low power with fasmarm, so I' try it, thank you.
|
|||
16 Jul 2010, 13:09 |
|
ghoshi 16 Jul 2010, 13:53
@revolution, when I write this: LDR r2,0x0FF00FF0, the compiler complain that the second parameter is invalid, can you tell me why, and how to solve this?
|
|||
16 Jul 2010, 13:53 |
|
revolution 16 Jul 2010, 13:59
What are you trying to do?
Load a value from memory or load a constant? ldr r1,[r1,offset] or, mov r2,0x0ff00000 orr r2,r2,0x00000ff0 |
|||
16 Jul 2010, 13:59 |
|
ghoshi 16 Jul 2010, 15:06
revolution wrote: What are you trying to do? I try to load a 32bit constant to regtister, use ldr, but can't compile correct. |
|||
16 Jul 2010, 15:06 |
|
revolution 16 Jul 2010, 16:13
ldr r2,[MyConstant]
;... MyConstant dw 0x0FF00FF0 |
|||
16 Jul 2010, 16:13 |
|
ghoshi 17 Jul 2010, 01:43
If I want to use the immediately value in the ldr instructions?
|
|||
17 Jul 2010, 01:43 |
|
revolution 17 Jul 2010, 02:00
ghoshi wrote: If I want to use the immediately value in the ldr instructions? |
|||
17 Jul 2010, 02:00 |
|
revolution 17 Jul 2010, 04:54
revolution wrote: The GBA use ARM7TDMI, that is version 4 of the instruction set. You might want to consider use the processor and coprocessor directives to set the instructions supported. Otherwise you have to manually make sure that you don't try to use something from a later generation. |
|||
17 Jul 2010, 04:54 |
|
ghoshi 17 Jul 2010, 05:03
OK, thank you, revolution, I'll notice this
|
|||
17 Jul 2010, 05:03 |
|
revolution 17 Jul 2010, 05:33
Oh yeah, and one other reason to restrict the CPU instruction range is mov
Code: ;v7 (default) mov r0,0x123 ;0xE3000123 - movw r0,0x123 ;v4 processor 0xfe mov r0,0x123 ;error: Requires CPU capability T2, use directive "processor" to select. |
|||
17 Jul 2010, 05:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.