There are a few things that are totally, totally killing this code, which is otherwise OK.
For j = y1 To y2
PokeQ(*ecran + j*lgEcran*2 + Int(x)*8 , coul)
PokeQ(*ecran + j*lgEcran*2 + lgEcran + Int(x)*8 , coul)
x = x + inc
Next
First thing is that x is not an integer, so doing Int(x) is going to be really expensive.
Second thing is that most of the expression in the PokeQ is either constant or changes by a fixed amount each pixel.
So you could rewrite this code (I'm not totally familiar with PB so bear with me)
xp.i = 0
xi.i = Int(inc*65536)
ecran2 = ecran + y1*lgEcran*2 + Int(x)*8
For j = y1 To y2
PokeQ(*ecran2 + (xp>>16)<<3 , coul)
PokeQ(*ecran2 + lgEcran + (xp>>16)<<3, coul)
xp = xp + xi
ecran2 = ecran2 + lgEcran*2
Next
I think it's possible to optimize this some more, to get rid of the <<3. But I think the asm for this will be OK. Can PB output the asm?
Jim