Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. .NET and assembly

.NET and assembly

Scheduled Pinned Locked Moved C / C++ / MFC
csharpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sirrius
    wrote on last edited by
    #1

    Is there a way to write up a littl C code in .NET or V6 and be able to look at the assembly code that it produced after it compiled?

    Z B 2 Replies Last reply
    0
    • S Sirrius

      Is there a way to write up a littl C code in .NET or V6 and be able to look at the assembly code that it produced after it compiled?

      Z Offline
      Z Offline
      ZoogieZork
      wrote on last edited by
      #2

      Easy -- set a breakpoint at the beginning of the code you want to view the assembly for, execute the program in debug mode, then when the breakpoint is triggered, right-click on the statement and select "Go To Disassembly". (This is for VS.NET 2K3). - Mike

      1 Reply Last reply
      0
      • S Sirrius

        Is there a way to write up a littl C code in .NET or V6 and be able to look at the assembly code that it produced after it compiled?

        B Offline
        B Offline
        Blake Coverett
        wrote on last edited by
        #3

        Michael's answer works fine. Alternatively, add the /Fa switch when you compile and .asm files will be generated that you can browse through with your favorite editor. I often find this more convenient. -- -Blake (com/bcdev/blake)

        B 1 Reply Last reply
        0
        • B Blake Coverett

          Michael's answer works fine. Alternatively, add the /Fa switch when you compile and .asm files will be generated that you can browse through with your favorite editor. I often find this more convenient. -- -Blake (com/bcdev/blake)

          B Offline
          B Offline
          Beer26
          wrote on last edited by
          #4

          I have a related question, I still haven't gotten around to using managed C++ code so I still no next to nothing about dotnet aside from it's java like qualities, but i do know some assembly from reading books and so forth. What format is .NET IL assembly in? is it MASM assembly, or a new type of assembly with different macros+syntax or what?

          B 1 Reply Last reply
          0
          • B Beer26

            I have a related question, I still haven't gotten around to using managed C++ code so I still no next to nothing about dotnet aside from it's java like qualities, but i do know some assembly from reading books and so forth. What format is .NET IL assembly in? is it MASM assembly, or a new type of assembly with different macros+syntax or what?

            B Offline
            B Offline
            Blake Coverett
            wrote on last edited by
            #5

            At a basic layout level IL syntax looks somewhat like other assembly syntax in that it is line based, has directives that start with a dot, labels at the left, then a short opcode, then arguments, typically rendered in aligned columns. From there is goes on to completely unlike MASM (or any other physical machine assembly) in that the opcodes are stack based, strongly typed, and at a much higher level of abstraction than even CISC assembly. No macros or the like as ILASM is not designed to be written by humans so there's no purpose for such things. -- -Blake (com/bcdev/blake)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups