@patrickcmiller I did a fair bit of that back in the day. First on the 286, but that was too limited, so when I had a 386 and the Intel manuals I was able to get protected mode, then virtual 86 mode, then finally I was able to switch back and forth at will.
Ultimately wrote a TSR debugger in 386 assembler that sat in high memory, activated with the SysReq key, and a library for MSC that allowed small model C code to access all physical memory. Never tried to do virtual memory.
Sadly it all stopped working when EMM386 shipped with MSDOS.
Lots of fun. Still have the source code.