home .. forth .. colorforth mail list archive ..

Re: [colorforth] bug in bit32?


On Fri, 6 May 2005, Albert van der Horst wrote:
I expect EAX to be three time a character value, such that it contains
all zero's in the upper 16 bits.

Indeed bit16 is called 24 times. But only the first time
something is deposited at [DI]. After that zero's have been
shifted into AX.
Similarly bit32 is called 24 times. Again only the first
time something is deposited at [DI]. The second time
EAX is already zero, in view of the values supplied.
After that again EAX is certainly zero.

So this would mean that it doesn't matter whether a 16 or 32 bits
register is shifted. Apart from that I don't claim to understand
much of what is going on.

I don't follow this analysis. You should probably review again the source code. The way bit16 works is that is will shift the bits one by one into the carry bit, if the carry bit is set it will write a pixel. I does this 16 times. bit32 is similar execpt it will write four pixels if the carry bit is set.

Your conclusion could be checked by placing a character C on the
lowest line. It should look bad with one line missing.

If you want a test to demonstrate try:

: ok show black screen text 13 2emit ;

13 is the character 'g' which uses that bottom row.

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com