#define VRAMADDR 0x14800000 #define DISPH 480 #define DISPW 800 .globl start .arm start: // r0: y, r1: x mov r0, #0 mov r1, #0 .Lloopy: cmp r0, #(DISPH) beq .Lstop .Lloopx: cmp r1, #(DISPW) bne .Lcontx mov r1, #0 add r0, #1 b .Lloopy .Lcontx: // r2: ((y&0)^(x&0)) ? 0xffffffff : 0 eor r2, r0, r1 and r2, #1 sub r2, #1 // addr: VRAMADDR + (y*DISPW + x)*2 mov r3, #(DISPW) mul r3, r0 add r3, r1 add r3, r3 add r3, #(VRAMADDR) // store the pixel strh r2, [r3] add r1, #1 b .Lloopx .Lstop: b .Lstop