#9767 - Omega81 - Sun Aug 17, 2003 1:55 am
I would like to know were I get a good tutorial on programming ASM for ARM with GAS, I want to know what the basic setup construct is (do I just define a .text and start programming or what?) . The man problem is that I have a piece of code I wrote in GAS to change the screen mode but it only works for one pixel plot. basically, I want it to plot a lot of pixel on the sreen one pixel position after another. but I have noticed (due to the debug mode in VisualGameBoyAdvance :)) that GAS is calculating the branch vectors incorrectly. Here is the code:
GAS keeps jumping too far in memory, I thing it is a configuration thing but can be too sure so wanted so input. if you have any input or a solution I would be grateful. OOO yeah I am using DevKitAdvance bilt from GCC 3.1
thanks
Charlie
Code: |
.text
.start: ldr r1, =(0x0400|0x03) @ load mode settings into register r1 ldr r2, =0x4000000 @ load the mode select register address in r2 str r1, [r2] @ enable the video mode ldr r1, =0xff00 @ load the color into r1 ldr r2, =0x6000000 @ Load the Vram address in to r2 ldr r3, =38400 @ number times we will loop throug .label1: str r1, [r2],#10 @ blast it at the screen add r1,r1,#5 @ changed color sub r3,r3,#1 @ decrement the loop counter cmp r3,#0 bne .label1 add r2,r2,#200 ldr r1, =0xffff @ load the color into r1 str r1, [r2],#4 @ blast it at the screen .end: b .label1 @ infinity loop .pool |
GAS keeps jumping too far in memory, I thing it is a configuration thing but can be too sure so wanted so input. if you have any input or a solution I would be grateful. OOO yeah I am using DevKitAdvance bilt from GCC 3.1
thanks
Charlie