Clever ways to hide a compare




Suppose you are writing a protection scheme, and need to compare 2
values. Is there a clever way to do this without an outright 'cmp'
instruction? Of course it's always possible to use the value in a
calculation that is needed for correct functionality of the program,
but I was wondering if there is a way to have 2 values compared in a
sneaky way where it is not immediately evident what is happening.

.



Relevant Pages

  • Re: Pick the odd one out.
    ... We have a compare instruction with two ... But to express that we want to compare bytes we have add a "BYTE" somewhere ... (the best place would be the cmp -> cmp.b), ... cmp BYTE PTR, 0 ...
    (alt.lang.asm)
  • Re: Clever ways to hide a compare
    ... > to compare 2 values. ... > without an outright 'cmp' instruction? ... > correct functionality of the program, ... a `cmp` is nothing but a `sub` with the resultant ...
    (comp.lang.asm.x86)
  • Re: JES2 Exit6 - Changing Class= Based on PGM=
    ... instruction offset,offset. ... To compare 1 byte, you would ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)
  • Re: Performance benefits of rep/loop?
    ... >> The loop instruction has always been slow on Intel processors. ... > Then compare the buffered a to the strings one at a time. ... > make up for the cost in setting up a. ... > that the instruction cache is a bit more reliable than the data cache. ...
    (comp.lang.asm.x86)
  • Re: interrupting for overflow and loop termination
    ... instruction or condition would then trigger the previously specified exit. ... The address is specified before the loop, you can call it an interrupt address or a future branch address. ... How about a compare and conditional branch ...
    (comp.arch)