.GLOBAL _start @ exports the start lable for linking _start: @ start of the code. mov r0, #0x4000000 @ Display control ldr r1, =0x0000403 @ store requested vid mode strh r1, [r0] @ set it to background 2, mode 3 mainloop: @ a label for the branch mov r0, #0x06000000 @ set video ram address ldr r1, =0x0fff @ make a color strh r1, [r0] @ put single pixel of above in vid ram mov r2, #0x02 @ put 2 to increase the vram by strh r1, [r0, r2] @ put the r1 pixel in [r0 + r2] bl PaintScreen @ paint the screen a color. bl so it passes the next address for a return address. b mainloop @ do the shit over and over. PaintScreen: @ whoo.. function to fill video ram with a color. mov r3, #0 @ 0 out r3 for addition and stuff. ldr r5, =0xfff @ make a pixel ldr r6, =0x12C00 @ end of display ram. PaintMain: @ loop point. strh r5, [r0,r3] @ copy pixel to video RAM at offset r2 add r3, r3,#2 @ increment r2 by 2 cmp r3, r6 @ end of display. beq PaintEnd @ when it's equal, it's done, this'll execute b PaintMain @ This will execute while the above is not equal... looping until it's done. PaintEnd: @ End of painting. Only gets here when done with display. mov pc, r14 @ When it's equal, it's done, and this'll execute. .pool @ so it can ldr r0,=0x0005 stuff...