none
making a microprocessor simulator in C# RRS feed

  • Question

  • I'm trying to make a 8086 microprocessor simulator in c# which will simulate the code written by the user on hypotetical microprocessor and give the same ideal result as real microprocessor. just like other compilers the architecture of my compiler is the same until Microsoft Intermediate language (MSIL). Specifically in my code generator phase of the compiler I face one problem which may actually be conceptual problem. It is the fact that MSIL uses the stack based archiceture which is confusing me because i'm expecting it to be register based, which i thought it would be easy for implementation. I think that this stack based execuition is not suitable for making such kind of compiler or is there any other way of implementing my needs in .NET please help.
    Monday, March 15, 2010 9:27 AM

Answers

  • You are not very clear on what you are trying to build? Are you writing a compiler that will take an old style dos exe and compile it into a msil binary? Or are you writing an application that emulates an 8086 by interpeting the opcodes and that can execute an old style dos exe?
    • Marked as answer by SamAgain Wednesday, March 24, 2010 10:22 AM
    Monday, March 15, 2010 2:24 PM

All replies

  • You are not very clear on what you are trying to build? Are you writing a compiler that will take an old style dos exe and compile it into a msil binary? Or are you writing an application that emulates an 8086 by interpeting the opcodes and that can execute an old style dos exe?
    • Marked as answer by SamAgain Wednesday, March 24, 2010 10:22 AM
    Monday, March 15, 2010 2:24 PM
  • Hi, Djtech:
         Could you be more specific about what you want to do? A micro-processor simulator in C#? Or a code generator for your  MSIL comopiler?
    Please mark the right answer at right time.
    Thanks,
    Sam
    Monday, March 15, 2010 2:48 PM
  • Hi, Djtech:

         I am writing to check the status of this problem. Could you be more specific about your problem?


    Please mark the right answer at right time.
    Thanks,
    Sam
    Monday, March 22, 2010 3:32 AM