Generating Machine Code (16-Bit VM in JavaScript 011) @LowByteProductions
Generating Machine Code (16-Bit VM in JavaScript 011)  @LowByteProductions
Uploaded June 2020 | Updated November 2026, 2 days ago
In this episode we take the AST representation of the assembly code we get from the parser and turn it into real machine code - the bytes in memory that the virtual CPU executes as instructions. Along the way we'll add support for labels, allowing us to write location independent and logically grouped assembly code.


Big shout out to patron Max Starr, whose LLJS IDE Project (github.com/manmon42/lljsvm-ide) is featured in this episode.



=[ ℹ 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 extend it to create a sort of fantasy console - an emulator for a machine that never existed



- 💌 Updates to your inbox: tinyletter.com/lowleveljavascript
- ⭐️ Patreon: patreon.com/lowleveljavascript

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

- LLJS IDE: github.com/manmon42/lljsvm-ide
- arcsecond: github.com/francisrstokes/arcsecond
- Parser Combinators From Scratch: youtube.com/watch?v=6oQLRhw5Ah0&list=PLP29wDx6QmW5yfO1LAgO8kU3aQEj8SIrU

=[ 🔗 Links 🔗 ]=

- Playlist: youtube.com/playlist?list=PLP29wDx6QmW5DdwpdwHCRJsEubS5NrQ9b&playnext=1&index=1
- Github Repo: github.com/LowLevelJavaScript/16-Bit-Virtual-Machine
Generating Machine Code (16-Bit VM in JavaScript 011)Building an DECODER for QOI Images (Quite OK Image Format)Turning Pixels Into WavesHow Parser Combinators Work [Parser Combinators From Scratch] Episode 1Packing Bits For Compression[stream] More USB Reverse Engineering + DriversInterrupts (16-Bit VM in JavaScript 013)Mage ASCII Game EngineBad Apple 🍎 #stm32 #led #ws2812bZero Extension [The Bits And Bytes Of Binary ep.5][stream] Exploring the FT232H and Node Native AddonsLive Coding A NES Emulator in C++!
Low Byte Productions |

Generating Machine Code (16-Bit VM in JavaScript 011)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER