<p>So, we need exactly 50 words to represent a row of source (width = 1600 pixels / 32 pixelPerWord).<br>
Trying to read <code>nWords = 51</code> is asking for trouble...<br>
We are translating 1 bit to the right, so the destination requires 51 words (1601 pixels).</p>
<p>What we ought to do in the <code>BitBlt>>copyLoop</code> is:<br>
Copy 12bits from 1st src word (<code>mask1 - 16rFFF "4095"</code>) onto 1st dst word<br>
Then 49 times copy the rotate thing (last bit from prev src word+31 bits from next src word) onto next dest word</p>
<pre><code>    skewWord := ((prevWord bitAnd: notSkewMask) bitShift: unskew)
        bitOr:  "32-bit rotate"
    ((thisWord bitAnd: skewMask) bitShift: skew).
</code></pre>
<p>Then last bit of prev src word to next dest word (with <code>mask2 = 16r80000000</code>).</p>
<p>The incorrect code is in the last section, trying to read next sourceWord for nothing since it will be fully masked by <code>mask2</code> after rotation (skew).<br>
So this last code requires a protection.<br>
We could for example try <code>((skewMask bitShift: skew) bitAnd: mask2)</code>, and if null don't fetch next sourceWord (just use 0 instead).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/441?email_source=notifications&email_token=AIJPEW5Y7ZYHAJ7H2TZJM3DQRH67HA5CNFSM4JHATQK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECV4RWA#issuecomment-548128984">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW7OVBJBYUBYDPE5G5LQRH67HANCNFSM4JHATQKQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEW32DMBDT4PTCDQDULTQRH67HA5CNFSM4JHATQK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECV4RWA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/441?email_source=notifications\u0026email_token=AIJPEW5Y7ZYHAJ7H2TZJM3DQRH67HA5CNFSM4JHATQK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECV4RWA#issuecomment-548128984",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/441?email_source=notifications\u0026email_token=AIJPEW5Y7ZYHAJ7H2TZJM3DQRH67HA5CNFSM4JHATQK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECV4RWA#issuecomment-548128984",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>