#127978 - JapanLover - Mon May 07, 2007 4:15 am
hey there...
i'm just starting to do asm on gba (i've done some asm in dos and windows, but never arm)...
here is a little bit of code that doesn't seem to work right.........
shouldn't that fill the screen with green ?...
instead i get stripes...
what am i doing wrong?
i appreciate any replies =)
thanks in advance for you time/help =)
i'm just starting to do asm on gba (i've done some asm in dos and windows, but never arm)...
here is a little bit of code that doesn't seem to work right.........
Code: |
@ --- screen.h (presumably) ---
#define REG_DISPCNT 0x04000000 #define MODE_3 0x0003 #define BG2_ENABLE 0x0400 #define vram 0x06000000 @ --- main.s --- .text @ where the code should go .code 32 @ code type (ARM in this case) .global main @ makes main visible for the whole project main: ldr r1,=REG_DISPCNT ldr r2,=BG2_ENABLE|MODE_3 str r2,[r1] ldr r1,=0x03E0 ldr r2,=0x06000000 ldr r3,=0x06012C00 .Lopp: str r1,[r2] add r2,#1 cmp r2,r3 ble .Lopp .Lloop: b .Lloop .pool |
shouldn't that fill the screen with green ?...
instead i get stripes...
what am i doing wrong?
i appreciate any replies =)
thanks in advance for you time/help =)