Results 1 to 5 of 5

Thread: Test

  1. #1

    Thread Starter
    Member BinaryAnge's Avatar
    Join Date
    Jun 2002
    Location
    Columbus,Ohio
    Posts
    51

    Test

    how does the test work, for example:

    test eax, eax
    je 1500d7e3

    is this comparing eax to eax and then jumping if they are equal. and if so, wont they always be equal so the jump will alway happen ???
    The Programmers Credo -
    Protect dumb-ass from himself.

  2. #2
    Junior Member mortolee's Avatar
    Join Date
    Nov 2002
    Location
    england, essex
    Posts
    20
    i thought

    -------------------------------

    CMP eax,eax
    JE MyLabel

    MyLabel:
    Mov loo,poo


    --------------------------------

    would compare then jump
    I believe in Death after Life!

  3. #3

    Thread Starter
    Member BinaryAnge's Avatar
    Join Date
    Jun 2002
    Location
    Columbus,Ohio
    Posts
    51

    ?

    what??
    The Programmers Credo -
    Protect dumb-ass from himself.

  4. #4
    Junior Member mortolee's Avatar
    Join Date
    Nov 2002
    Location
    england, essex
    Posts
    20
    CMP eax,eax

    i thought that compares them

    then this jumps if equal

    JE 'whatever label'
    I believe in Death after Life!

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    test eax, eax
    is usually used with jz, to see if a register is 0 or not. You can't use it to "compare a number to itself", it doesn't make sense.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width