16-Bit Virtual Machine in JavaScript 001



In this episode we begin implementing a 16-bit virtual machine from scratch in JavaScript. The concepts of computation are introduced, along with the basics of assembly language and machine code.

=[ ℹ About ℹ ]=

This series is all about building a powerful virtual machine in JavaScript with the following features:

– A flexible, extensible, register-based virtual machine
– Support for signed, unsigned and floating point operations
– A call stack
– Interrupt capabilities
– Ability to do memory mapping for IO
– An assembly language with macro and module support
– A higher level, C like language. We’ll use and expand the library from the parser combinators from scratch series
– And finally, to be able to take the whole thing into the browser and exend it to create a sort of fantasy console – an emulator for a machine that never existed

=[ 🔗 Links 🔗 ]=

– ⭐️ Patreon: https://www.patreon.com/lowleveljavascript
– 💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript

– Playlist: https://www.youtube.com/playlist?list=PLP29wDx6QmW5DdwpdwHCRJsEubS5NrQ9b&playnext=1&index=1
– Github Repo: https://github.com/LowLevelJavaScript/16-Bit-Virtual-Machine

– 16BitJS: https://github.com/francisrstokes/16bitjs
– VMFC: https://github.com/francisrstokes/vmfc
– Turing Machine: https://en.wikipedia.org/wiki/Turing_machine
– Von Neumann architecture: https://en.wikipedia.org/wiki/Von_Neumann_architecture
– CPU: https://en.wikipedia.org/wiki/Central_processing_unit
– Stack Machine: https://en.wikipedia.org/wiki/Stack_machine
– Register Machine: https://en.wikipedia.org/wiki/Register_machine
– Instruction set architecture: https://en.wikipedia.org/wiki/Instruction_set_architecture

40 thoughts on “16-Bit Virtual Machine in JavaScript 001

  1. Hey these videos are really amazing! I wish it had Subtitles on though (instead of the auto-translate).
    I wasn't able to find a way to upload my own subtitles either. If there was any way I would love to do so!

    Thank you for such an awesome and well prepared video. You've earned a subscriber!

  2. Argghh….just what I don't need, an easy introduction to emulation in javascript, here goes 18 months of my life writing a Z80 emulator which will never work in javascript which has probably already been written a million times, but whats the fun in using libraries eh kids?! Awesome video…..just wish I hadn't seen it!

  3. I've just discovered this channel and I have to comment to say that this is really good content.
    Can't wait to see the progress going forward!

  4. Excuse me for being dim, but what is the point of all this? Is this solely for education/research or are there real-world applications for this? It seems very interesting, but I just can't work out why.

  5. Awesome video! I'm kind of confused on why we are splitting the value into 2 bytes.
    Also, what font are you using? The font looks nice 🙂

  6. Help me understand — In handling instruction 0x12 "add", aren't you getting the values in register1 and register2 already with the two calls to `this.fetch()` ? Why are those calls followed by the two lines where you directly reach into memory? scratches head

  7. First of all amazing job, the quality of the content is well high and I'm glad that I've randomly spotted this on reddit. On second hand at 6:26 you mention that you produced a previous video on array buffer which I cannot find. Would you mind to put the link in? Because I would love to check it out.

Leave a Reply

Your email address will not be published. Required fields are marked *