Uploaded September 2023 | Updated September 2026, 2 weeks ago
In this installment of //Source Dive//, we're back in xv6, looking at how the operating system layers abstractions. The "console" is a great example, with a low-level driver rooted in the hardware, to an abstract console, to the printf function that eventually outputs characters to the screen.
=[ 🔗 Links 🔗 ]=
🐋 RISC-V Docker Image: github.com/francisrstokes/rv-toolchain-docker/pkgs/container/rv-toolchain-docker
🎥 Series Playlist:
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/mit-pdos/xv6-riscv
In this installment of //Source Dive//, we're back in xv6, looking at how the operating system layers abstractions. The "console" is a great example, with a low-level driver rooted in the hardware, to an abstract console, to the printf function that eventually outputs characters to the screen.
=[ 🔗 Links 🔗 ]=
🐋 RISC-V Docker Image: github.com/francisrstokes/rv-toolchain-docker/pkgs/container/rv-toolchain-docker
🎥 Series Playlist:
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/mit-pdos/xv6-riscv
![Bare Metal Programming Series 0
This is episode 0 of the bare metal programming series! Over the next few videos, were going to be building firmware for a Cortex-M4 STM32 processor (STM32F401RE).
This video introduces:
- the series
- what well be covering
- who the intended audience is
- the goals and the non-goals
- the hardware youll need to follow along
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: https://www.youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: https://discord.gg/FPWaVgk
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
💻 Github Repo: https://github.com/lowbyteproductions/bare-metal-series Bare Metal Programming Series 0](https://i.ytimg.com/vi/uQQsDWLRDuI/mqdefault.jpg)
![C++ NES Emulator: Investigating The Memory Map
In this video were continuing to develop the NES Emulator that will run on a teensy 4.1 microcontroller. Specifically, were investigating the memory map of the NES, what the different registers are and for what theyre used.
=[ 🔗 Links 🔗 ]=
💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
🗣 Discord: https://discord.gg/FPWaVgk
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
💻 Github Repo: C++ NES Emulator: Investigating The Memory Map](https://i.ytimg.com/vi/uQXY27d8Pao/mqdefault.jpg)
![Making WAVs: Understanding, Parsing, and Creating WAV Files in JavaScript
The WAVE file format is a binary format that encodes high fidelity audio data. But how is the audio encoded and stored? How can these files be read and created in JavaScript? Thats what well find out in this video!
=[ 🔗 Links 🔗 ]=
💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
💻 Github Repo: https://github.com/LowLevelJavaScript/Making-WAVs
https://github.com/francisrstokes/arcsecond
https://github.com/francisrstokes/construct-js
http://soundfile.sapp.org/doc/WaveFormat/
https://en.wikipedia.org/wiki/WAV
http://www.tactilemedia.com/info/MCI_Control_Info.html
https://en.wikipedia.org/wiki/Pulse-code_modulation
https://en.wikipedia.org/wiki/Sampling_(signal_processing)#Sampling_rate
https://github.com/francisrstokes/arcsecond
https://github.com/francisrstokes/arcsecond-binary Making WAVs: Understanding, Parsing, and Creating WAV Files in JavaScript](https://i.ytimg.com/vi/udbA7u1zYfc/mqdefault.jpg)
![Twos Complement [The Bits And Bytes Of Binary ep.6]
This mini series is all about binary. Over the course of the series, well be building a library that gives us precise control of every bit and operation.
Youll learn how the logical and arithmetic operations work, how different kinds of numbers are encoded, how to set, clear and toggle bits, and how we can create representations of structured binary data.
1. Bits
2. Operations
3. Unsigned Numbers
4. Addition
5. Zero Extension
6. Twos complement
7. Overflow Addition and Sign Extension
8. Shifting
9. Setting, Clearing, and Toggling Bits
10. Endianness
11. Structures
=[ 🔗 Links 🔗 ]=
💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
🗣 Discord: https://discord.gg/FPWaVgk
🎥 Playlist: https://www.youtube.com/playlist?list=PLP29wDx6QmW47oPsNBFNEi_SYTOLDJXqQ
💻 Github Repo: https://github.com/LowLevelJavaScript/The-Bits-And-Bytes-Of-Binary
=[ 🎶 Music 🎶 ]=
Fender Bender - Bad Snacks Twos Complement [The Bits And Bytes Of Binary ep.6]](https://i.ytimg.com/vi/vgbOTf8lgTQ/mqdefault.jpg)
![Memory Access and Branching (16-Bit VM in JavaScript 002)
In this video we establish the core instruction set of the VM, give the VM the capabilities to read and write to main memory, and also to make decisions about how the program should proceed with branching instructions.
=[ ℹ 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. Well 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
- Series 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 Memory Access and Branching (16-Bit VM in JavaScript 002)](https://i.ytimg.com/vi/wJ-pu6Iq0B8/mqdefault.jpg)
![Why 0.1 + 0.2 0.30000000000000004: Implementing IEEE 754 in JS
Floating point math is tricky. In this video, well learn how these numbers work in computers, and build a software implementation from scratch in JavaScript.
=[ 🔗 Links 🔗 ]=
- ⭐️ Patreon: https://www.patreon.com/lowleveljavascript
- 💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
- Floating Point Arithmetic: https://en.wikipedia.org/wiki/Floating-point_arithmetic
- 16 Bit Floats: https://en.wikipedia.org/wiki/Half-precision_floating-point_format
- IEEE 754 Spec: https://ieeexplore.ieee.org/document/30711
- Fabien Sanglards awesome blog on the subject: http://fabiensanglard.net/floating_point_visually_explained/
- Denormalised Numbers: https://en.wikipedia.org/wiki/Denormal_number
- Github Repo: https://github.com/LowLevelJavaScript/Floating-Point-Implemented-In-JS Why 0.1 + 0.2 0.30000000000000004: Implementing IEEE 754 in JS](https://i.ytimg.com/vi/wPBjd-vb9eI/mqdefault.jpg)
![Classes, mapping, and generic parsers [Parser Combinators From Scratch] Episode 3
In this episode well create a Parser class and implement map, a method that will allow us to apply arbitrary structure as we parse.
Well also build more general parsers like letters and digits, as well as combinators like choice and many.
=[ ℹ About ℹ ]=
During this series we will develop an understanding of the concept of parsing, and build our own parser combinator system from scratch. The system we build will be capable of parsing both binary and text data. Well make use of both object-oriented and function programming principles to develop an effective and intuitive library.
=[ ⛓ Links ⛓ ]=
- ⭐️ Patreon: https://www.patreon.com/lowleveljavascript
- 💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
- LLJS Subreddit: https://reddit.com/r/lowleveljavascript Classes, mapping, and generic parsers [Parser Combinators From Scratch] Episode 3](https://i.ytimg.com/vi/xB7lFPMN4dU/mqdefault.jpg)
![EXTRA: Chain Tricks For Sequential Parsing - Parser Combinators From Scratch
In this episode we discover how the .chain() method (one of our monadic ingredients) allows us to turn deeply nested, contextual parser descriptions into flat, readable flows - much the same as async/await does for promises!
=[ ℹ About ℹ ]=
During this series we will develop an understanding of the concept of parsing, and build our own parser combinator system from scratch. The system we build will be capable of parsing both binary and text data. Well make use of both object-oriented and function programming principles to develop an effective and intuitive library.
=[ 🔗 Links 🔗 ]=
- ⭐️ Patreon: https://www.patreon.com/lowleveljavascript
- 💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
- Playlist: https://www.youtube.com/watch?v=6oQLRhw5Ah0&list=PLP29wDx6QmW5yfO1LAgO8kU3aQEj8SIrU
- Github Repo: https://github.com/LowLevelJavaScript/Parser-Combinators-From-Scratch
- LLJS Subreddit: https://reddit.com/r/lowleveljavascript
- Promises / Async 2-Parter: https://www.youtube.com/playlist?list=PLP29wDx6QmW7IaD762Rf_Awfr1Wxz0Amq EXTRA: Chain Tricks For Sequential Parsing - Parser Combinators From Scratch](https://i.ytimg.com/vi/yPEwjpIWOGg/mqdefault.jpg)
![Control and Status Registers (CSRs): RISC-V ep.8
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: https://www.youtube.com/watch?v=ER7h4ZTe19A&list=PLP29wDx6QmW4sXTvFYgbHrLygqH8_oNEH
💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
🗣 Discord: https://discord.gg/FPWaVgk
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
💻 Github Repo (emulator): https://github.com/LowLevelJavaScript/RISC-V-Emulator Control and Status Registers (CSRs): RISC-V ep.8](https://i.ytimg.com/vi/ykbAKu77n5Q/mqdefault.jpg)
![Implementing Stack Mechanics (16-Bit VM in JavaScript 004)
In this episode, we create an implementation for the stack mechanisms that were described in the last episode. If you have seen that, you can find it at https://www.youtube.com/watch?v=mamop8aqFNk
=[ ℹ 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. Well 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
- Series Playlist: https://www.youtube.com/playlist?list=PLP29wDx6QmW5DdwpdwHCRJsEubS5NrQ9b&playnext=1&index=1
- Github Repo: https://github.com/LowLevelJavaScript/16-Bit-Virtual-Machine
- Stack Data Structure: https://en.wikipedia.org/wiki/Stack_(abstract_data_type)
- Subroutine: https://en.wikipedia.org/wiki/Subroutine Implementing Stack Mechanics (16-Bit VM in JavaScript 004)](https://i.ytimg.com/vi/zAsn8q-X9HM/mqdefault.jpg)