Re: Check if all 256 bits are clear or set ?
skybuck2000 <[email protected]> Thu, 28 Oct 2021 18:12:39 -0700 (PDT)
| Newsgroups | alt.comp.lang.borland-delphi |
|---|---|
| Message-ID | <[email protected]> |
This would make a fine implementation for Are256BitsClear. This leaves Are256BitsSet still to be implemented... Hmm can the same trick be done for AllSet ? Probably with AND and checking for FF also decimally known as 255 :) So for Are256BitsSet this code may work: mov register1, 64 bits from array[0] mov register2, 64 bits from array[1] mov register3, 64 bits from array[2] mov register4, 64 bits from array[3] and register1, register2 and register1, register3 and register1, register4 jump if zero/jump if not zero. ^ Not sure about the jump if not zero instruction... this would probably be invalid. It needs to be 255 or nothing at all. My initially thought was to maybe negate it or something, turn 255 specific to zero somehow... Maybe subtract 255 from it to see if it's zero... if not then it's not full. Hmmm ? Bye for now, Skybuck.