#25870 - anoneem - Mon Aug 30, 2004 10:22 am
Damn, it's me again! :) I was writing a stupid program, wich i would like to draw for me some nice colours on the screen. Here it goes...
But it's drawing a... colourfull starfield? What am I doing bad here? Please, if You are boring, or if You want to educate a little dummy coder, fix it! I will be thankfull!
PS. Sory for english, if it's bad.
Code: |
@textarea
loop: ldr r1,=0x4000000 ;screen conrol ldr r2,=0x403 ;Mode 3, BG2 str r2,[r1] ;OKAY! ;Tryb 3 ON ldr r0,=0x0FF ;it is colour ldr r1,=0 ;x position ldr r2,=0 ;y position ldr r3,=240 ;well... 240 value :) r3 is counter ldr r4,=0x06000000 ;vram ldr r5,=0 ; ldr r6,=240 ;wide ldr r7,=160 ;height testx: cmp r3,0 ;is line drawn? beq wiersz: ;if yes, draw next mla r5,r2,r6,r1 ;if no, y*240+x add r4,r4,r5 ;vram+position str r0,[r4] ;and draw dot add r1,r1,1 ;inc x sub r3,r3,1 ;counter - 1 add r0,r0,1 ;inc colour b testx: wiersz: add r3,r3,240 ;240 - x position is 0, so set counter of x line cmp r7,0 ;is last point of screen drawn? (240,160) beq loop: ;if yes, loop sub r7,r7,1 ;if no, dec counter b testx ;and branch label1 b label1 @pool @endarea |
But it's drawing a... colourfull starfield? What am I doing bad here? Please, if You are boring, or if You want to educate a little dummy coder, fix it! I will be thankfull!
PS. Sory for english, if it's bad.