Announcement

Collapse
No announcement yet.

ASM Command "nop"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ASM Command "nop"

    I have this Dr watson that is occuring, I believe it is when a BID is received from the host, and it's not my product but I am troubleshooting the events and this is the DR Watson log, what is a "nop" ? I would like to say "No op" or no operation but I don't know...
    Code:
    function: <nosymbols>
            017e04f4 c20400           ret     0x4
            017e04f7 90               nop
            017e04f8 90               nop
            017e04f9 90               nop
            017e04fa 90               nop
            017e04fb 90               nop
            017e04fc 90               nop
            017e04fd 90               nop
            017e04fe 90               nop
            017e04ff 90               nop
    FAULT ->017e0500 8b4108           mov     eax,[ecx+0x8]          ds:00eeea06=????????
            017e0503 8b510c           mov     edx,[ecx+0xc]          ds:00eeea06=????????
            017e0506 56               push    esi
            017e0507 8b742408         mov     esi,[esp+0x8]          ss:0345e12b=????????
            017e050b 2bd0             sub     edx,eax
            017e050d 3bd6             cmp     edx,esi
            017e050f 763b             jbe     017e054c
            017e0511 8d1406           lea     edx,[esi+eax]          ds:0256f740=00000000
            017e0514 8b01             mov     eax,[ecx]              ds:00000000=????????
            017e0516 c1ea08           shr     edx,0x8
            017e0519 85c0             test    eax,eax
            017e051b 742f             jz      017e054c
    -------------
    Scott
    mailto:[email protected][email protected]</A>
    MCSE, MCP+Internet
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

    #2
    Yes, NOP means "no operation". Do nothing.

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>



    [This message has been edited by Eric Pearson (edited June 22, 2000).]
    "Not my circus, not my monkeys."

    Comment


      #3
      NOP may mean "do nothing", but it has a function: alignment.
      regards,

      ------------------
      [email protected]
      :) IRC :)

      Comment


        #4
        I think - that NOP's have replaced any call of unused function.
        ------------
        V.Shulakov

        ------------------
        Spherical Panorama Inc. Virtual Reality for: Real Estate, Tourism Advertisment.

        Comment


          #5
          Scott,

          db 90 hex (nop) is generally used to pad either data or code to align it.
          It can also be used to delay a following set of instructions but it
          basically the "DO NOTHING EXCEPT TAKE UP SPACE" instruction.

          Now here is a little trick when you want to have a look at Bob Zale's
          assembler code as it compiles in PowerBASIC, add about 10 or so NOPs in the
          code just before the piece of code that you want to examine.

          Code:
              ! nop
              ! nop
              ! nop
              ! nop
              ! nop
              ! nop
              ! nop
              ! nop
              ! nop
              ! nop
          Compile it and run it through your favourite disassembler and search for
          "nop". When you find the sequence of "nop's", what follows it is the piece
          of code you wish to examine.

          Regards,

          [email protected]

          ------------------
          hutch at movsd dot com
          The MASM Forum - SLL Modules and PB Libraries

          http://www.masm32.com/board/index.php?board=69.0

          Comment


            #6
            I saw nothing. What should I see?
            [code]
            With NOP
            =========
            JUNK
            =========
            :00401420 55 push ebp
            :00401421 8BEC mov ebp, esp
            :00401423 53 push ebx
            :00401424 56 push esi
            :00401425 57 push edi
            :00401426 83EC5C sub esp, 0000005C
            :00401429 6A00 push 00000000
            :0040142B 6A00 push 00000000
            :0040142D 6A00 push 00000000
            :0040142F 90 nop
            :00401430 90 nop
            :00401431 90 nop
            :00401432 90 nop
            :00401433 90 nop
            :00401434 90 nop
            :00401435 90 nop
            :00401436 90 nop
            :00401437 90 nop
            :00401438 90 nop
            :00401439 8D65F4 lea esp, dword[ebp-0C]
            :0040143C 5F pop edi
            :0040143D 5E pop esi
            :0040143E 5B pop ebx
            :0040143F 5D pop ebp
            :00401440 C3 ret

            WithOut NOP
            =========
            JUNK
            =========
            :00401420 55 push ebp
            :00401421 8BEC mov ebp, esp
            :00401423 53 push ebx
            :00401424 56 push esi
            :00401425 57 push edi
            :00401426 83EC5C sub esp, 0000005C
            :00401429 6A00 push 00000000
            :0040142B 6A00 push 00000000
            :0040142D 6A00 push 00000000
            :0040142F 8D65F4 lea esp, dword[ebp-0C]
            :00401432 5F pop edi
            :00401433 5E pop esi
            :00401434 5B pop ebx
            :00401435 5D pop ebp
            :00401436 C3 ret

            Comment


              #7
              Ron,

              Steve was just pointing out a simple technique that can be used to locate particular sections of a compiled file, rather than telling you there was something "special" that would happen if you used a bunch of NOP's.



              ------------------
              Lance
              PowerBASIC Support
              mailto:[email protected][email protected]</A>
              Lance
              mailto:[email protected]

              Comment


                #8
                > Steve was just pointing out a simple technique that can be used to locate particular sections of a compiled file

                An INT 3 should do the trick when you want to step through the code from a particular point.


                Peter.


                ------------------
                [email protected]

                Comment


                  #9
                  Peter,

                  The suggestion was as Lance saw it, a "simple" way to find a piece of
                  compiled code in a dead listing. You can use a large number of NOP's and
                  the code will compile OK and with the dead listing, you can simply find
                  the NOP sequence in a text editor with the normal search.

                  A debugger will not be much use actually finding the piece of code and if
                  the compiled file is of a reasonable size, you may need to read through
                  some megabytes of assembler dump to get it otherwise.

                  Regards,

                  [email protected]

                  ------------------
                  hutch at movsd dot com
                  The MASM Forum - SLL Modules and PB Libraries

                  http://www.masm32.com/board/index.php?board=69.0

                  Comment


                    #10
                    Thanks. I outta dring more coffee before I engage what's left of my brain.
                    ( BTW the little embarrased red face seems not to work. )

                    Ron

                    [This message has been edited by Ron Pierce (edited June 24, 2000).]

                    Comment


                      #11
                      Steve,

                      I agree, but INT 3 can be very useful if you want to run a program and have it stop in a a debugger at any particular point you like. With PB's inline assembler it's almost too easy.


                      Peter.


                      ------------------
                      [email protected]

                      Comment


                        #12
                        Well you are all pretty much right on the money.
                        My theory as to what is happening, and the SNA datastream trace will validate this when it comes in....

                        a BID is received form the host, it sets the communication conversation and basically says "I'm gonna talk now"...

                        This particular piece of software when installed ina particular fashion is not yet gathering data to format (Print server) so it's in a communications mode and can't handle the BID.
                        (Badda Bing Badda BID Badda BOOM dr Watson... )


                        The trace will also show 140 printer LU's going offline via a NOTIFY right after this, so that's the piece that is missing for validation...This product cleans up VERY nicely after a Dr Watson..) (RH of 810620 for those curious what a NOTIFY is)..

                        So, my suspicion is that the noop is either debug left in by the engineer or is in NTWaitFOrMultipleObject function call (Likely since it's gather commo data from the host)..

                        Scott


                        ------------------
                        Scott
                        mailto:[email protected][email protected]</A>
                        MCSE, MCP+Internet
                        Scott Turchin
                        MCSE, MCP+I
                        http://www.tngbbs.com
                        ----------------------
                        True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                        Comment

                        Working...
                        X
                        😀
                        🥰
                        🤢
                        😎
                        😡
                        👍
                        👎