A friend just told me "Hey I programmed a fully functional processor emulator, where you can write your own assembly code for it!"
All it was was an array with a bunch of if statements and a while(true) loop

  • 5
    So basically he wrote an AI
  • 10
    Well to be fair, you don't need much more to emulate a basic processor, that's about all they do
  • 7
    If it does what a processor does -- it's a processor :) Could be as well build with sticks and a bag of sand for all I care :D
  • 2
    Thats,,,, thats how an interpreter works, what did you think they looked like?
  • 2
    The are usually recursive and use pattern matching but those are just fancy words for loops and if statements
  • 4
  • 2
    I worked on a vm that was in a game engine. Just a giant switch statement with a stack system. Was really easy to understand.
  • 2
    A processor without interrupts is like a Thai massage without happy end.
  • 2
    I mean it's missing a lot from modern processors, but that's about all a basic processor does.
  • 2
    Haha I remember when I was studying assembler for a Motorola MC68000.
    I downloaded emulator and basically was doing all need work at home. Put it on USB stick, come to exam, copy paste, validate by teacher, go away. 5 minutes exams lol
Add Comment