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
– 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
Original source
34 responses to “16-Bit Virtual Machine in JavaScript 001”
Please increase the fontSize of editor….. and that margin in the vscode window makes it even worse to see the code.
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.
Wow, this clarifies so much! Thanks for the videos
This is amazing, I'm currently going through my computer organization course in university and this video really helps putting all the concepts togheter. Keep it up!
I can only sub your channel after this excellent video, thanks for the content!
For the next series, can you teach how to build your own database engine in Javascript
This channel is gold. I’m super impressed with your videos and your clear, quick explanations please make more videos on this subject!
this video is like a movie lol thanks, keep up the good work i'll make sure to always star your repos.
this guy is the alpha male of Javascript
Very, very cool. This is the kind of channel that really deserves to grow. I'm definitely sharing.
Excellent lesson, but honestly moves really fast.
Really good content!
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 🙂
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
Can't wait for the 002 video now.
This just melts my brain
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.
Amazing content and production quality. Keep it up!
Super cool!! Thank you so much!
Low level Javascript? Please consider killing yourself!
If you could increase font size that would be great.
Nice…I am keen on implementing this along.
Do you have a Patreon account by any chance? Would love to contribute. This is invaluable content you are putting out. Keep it up!
Man.. This is weirdly satisfying. I think I finally start to understand how CPUs work
This is so sick to get to know lower level code in a language that I understand.
I don't have a particularly large following but I shared it on Twitter and Discord anyway because this channel deserves exposure and growth.
This is too good
god dammit now i have to binge watch these even though they're not entirely relevant to what i'm doing
amazing!!!
This looks super cool. I hope you continue with the serie
Keep the good work
This is amazing ! Is your voice distorted somehow ? I hear some weird, tremolo-like artifacts in your voice. But yeah anyway, great video!
Very interesting!
> And the prospect of building something like this that is able to perform those functions sounds quite daunting
I think I'm misunderstanding what you mean here, but isn't Brainfuck is like… close to if not the easiest to implement programming language in existence and meeting all of the requirements?
Bro you have good content in your channel.