Re: Clever ways to hide a compare



Depending upon the register/data size, you can use a subtract, add,
multiply, or divide. You can do a translate and come up with some
interesting possibilities. If this is DOS and not Windows NT, you can have
self modifying code that can do wonderful things. Translate an instruction
to something good if the value is good. Otherwise change it to something
that will lead to headaches.

"jonathon" <spamtrap@xxxxxxxxxx> wrote in message
news:1127603005.082317.85010@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> 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: Clever ways to hide a compare
    ... You can do a translate and come up with some ... > self modifying code that can do wonderful things. ... Translate an instruction ... >> Suppose you are writing a protection scheme, and need to compare 2 ...
    (comp.lang.asm.x86)
  • Re: Long translate (TR) instruction?
    ... I'm looking for the fastest way in assembler to translate data in one buffer ... Any advise on the fastest instruction path to do this would be appreciated.. ... For IBM-MAIN subscribe / signoff / archive access instructions, ... LABEL01 DS 0H ...
    (bit.listserv.ibm-main)
  • Re: Long translate (TR) instruction?
    ... Subject: Long translate instruction? ... your buffer equals to the contents of the low order byte general ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • Re: Long translate (TR) instruction?
    ... Look at the TRTE, TRanslate and Test Extended, instruction on pp. 7-231ff of the current PROP. ... 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: no-op function pointer
    ... instead of simply putting in a "call addy" assembly for every ... the function pointer could "translate" to a snippet of ... faster (compiles to a single instruction on a lot of platforms). ... instruction but parameter passing, especially if you have more than one ...
    (comp.lang.c)