[A83] Re: 95 pixels


[Prev][Next][Index][Thread]

[A83] Re: 95 pixels




Actually, there are 96 pixels across(if you count the one at 0,0, and the 
last one), but thats beside the point
If You want to access the plotscreen and plot a pixel, you would do this
ld hl,plotscreen
ld bc,(amount you want to go over / 8. so if i wanted pixel 20, it would be 2)
add hl,bc
(then add how far down you want to go * 12(because 96(num of pixels)/8(number 
of bytes per pixel) = 12)
now you take the remainder of x/8(you can and the x value by 7), subtract 8 
(so it's backwards) from that number, then bitshift 1 to the right that many 
times(that you got by subtracting 8)
then you can xor it to the place that hl is at.

There! all that to display a pixel!
Hope that helps