If you want to head down this road without building something from scratch and want to learn a lot about how your processor actually functions, consider trying to build a boot sector. Following that, building a very basic version of a DOS is a fantastic learning experience.
If you decide to give it a shot, please feel free to ping me. I've been down this road professionally a number of times.