#21450 - realV - Sat May 29, 2004 2:52 pm
Code (GNU gas)
---------------------
.text
.arm
.global main
bitmap: .hword 0x1FFF,0xFFFF,0x1111,0x1232
main:
ldr r0,=0x04000000
ldrh r1,=0x0403
strh r1,[r0]
ldr r0,=0x06000000
ldr r1,=bitmap
ldr r2,=4
.load:
ldrh r3,[r1],#2
strh r3,[r0],#2
subs r2,r2,#1
bne .load
.loop:
b .loop
I tested this code on Linux VisualBoyAdvance , WindowsXp VisualBoyAdvance , Linux Boycott but all pixels that are displayed on the screen are BLUE (VBA) or WHITE (boycott).
When i write this programm in goldroad asm then it is ok , but GNU as dosn't work.
The next programm in gas works:
ldr r0,=0x06000000
ldrh r1,=0x1FFF
strh r1,[r0]
the displayed pixel color is ok
I don't know where is the problem , maybe someone can help me.
PS: Sory for my anglish
---------------------
.text
.arm
.global main
bitmap: .hword 0x1FFF,0xFFFF,0x1111,0x1232
main:
ldr r0,=0x04000000
ldrh r1,=0x0403
strh r1,[r0]
ldr r0,=0x06000000
ldr r1,=bitmap
ldr r2,=4
.load:
ldrh r3,[r1],#2
strh r3,[r0],#2
subs r2,r2,#1
bne .load
.loop:
b .loop
I tested this code on Linux VisualBoyAdvance , WindowsXp VisualBoyAdvance , Linux Boycott but all pixels that are displayed on the screen are BLUE (VBA) or WHITE (boycott).
When i write this programm in goldroad asm then it is ok , but GNU as dosn't work.
The next programm in gas works:
ldr r0,=0x06000000
ldrh r1,=0x1FFF
strh r1,[r0]
the displayed pixel color is ok
I don't know where is the problem , maybe someone can help me.
PS: Sory for my anglish