Hi Spocky.
Let's see if I can be of any help. First notice that this is not at all the fastest way to do this, but anyway.
If I understood correctly you want to fill lines from 147 to bottom with ink color. First thing to tweak is the limit of the for loop. It should go up to 199 (the max. row). Then the draw command which takes the width in pixels in both x and y directions AND an additional parameter which is 0 to draw with paper color and 1 to draw with ink color. So you have to set it to 1. Also beware that the width is 239. Setting it to 240 will attept to draw outside the limits, so an error is produced and nothing is drawn.
So the code would be:
Code: Select all
for(i=147;i<200;i++){
curset(0,i,0);
draw(239,0,1);
}
You will notice the first pixel is still black. If you replace the curset parameters with curset(0,i,1) that will do the trick.
If you simply want set the paper or ink color of that area, it is much better to deal with attributes, either directly poke'ing them or using the fill command.
For instance, to set those lines all to red paper, you can do:
Code: Select all
curset(0,147,0);
fill(53,1,1+16); /*Red color is 1, add 16 to indicate it is paper color, not ink */
Refer to the Oric's BASIC manual for details on how to use these routines, as the C library simply calls them.
Hope this helps...