MadDog
Member
I'm trying to write a bit of inline asm for clearing the screen. Its not the best code because i'm more intrested at the mo in learning how to do it.
Anyway, i've getting the error
asm ( [Says error is on this line.]
"mov r3,#76800 \n"
"mov r4,%0 \n"
"orr r4,r4,r4,lsl#8 \n"
"orr r4,r4,r4,lsl#16 \n"
"mov r5,%2 \n"
"clear_screen_loop: \n"
" mov [r5],r4 \n"
" add r5,r5,4 \n"
" subs r3,r3,1 \n"
"bne clear_screen_loop \n"
:/*no output*/
:"r"(cmd->paletteindex), "a"(reg.display.rt)
:"r3", "r4" , "r5" );
Anyway, i've getting the error
on the current code at the first line, any ideas?.\source\GPU.c(246): error: impossible constraint in 'asm'
asm ( [Says error is on this line.]
"mov r3,#76800 \n"
"mov r4,%0 \n"
"orr r4,r4,r4,lsl#8 \n"
"orr r4,r4,r4,lsl#16 \n"
"mov r5,%2 \n"
"clear_screen_loop: \n"
" mov [r5],r4 \n"
" add r5,r5,4 \n"
" subs r3,r3,1 \n"
"bne clear_screen_loop \n"
:/*no output*/
:"r"(cmd->paletteindex), "a"(reg.display.rt)
:"r3", "r4" , "r5" );