Alright, I have a little 8086 assembler for my toy OS going now – or rather a proof-of-concept thereof. It only supports a tiny fraction of the instruction set. It was an interesting learning experience, but I don’t think trying to “complete” this program is worth my time.

The whole thing is just a learning project, I don’t want to actually make a usable OS. There are a few more things I want to have a look at and then I’ll eventually move on to 386/amd64 later this year (hopefully).

https://movq.de/v/d8f30cbe75/vid3.mp4

⤋ Read More

@lyse@lyse.isobeef.org Yeah, what else does one need? 😅

I added more instructions, made it portable (so it runs on my own OS as well as Linux/DOS/whatever), and the assembler is now good enough to be used in the build process to compile the bootloader:

Image

That is pretty cool. 😎

It’s still a “naive” assembler. There are zero optimizations and it can’t do macros (so I had to resort to using cpp). Since nothing is optimized, it uses longer opcodes than NASM and that makes the bootloader 11 bytes too large. 🥴 I avoided that for now by removing some cosmetic output from the bootloader.

⤋ Read More

@movq@www.uninformativ.de Neat, that sounds like a clever design with a table implementation. :-)

Oh, for sure! Complexity will definitely go through the roof and beyond with optimizations, no doubt. Maybe with the very simplest of the easy ones it might be still reasonably straight forward, but I also imagine that this has the potential to escalate very quickly. :-D

⤋ Read More

Participate

Login or Register to join in on this yarn.