With assembly, you could make calls to BIOS directly from MS-DOS. You could make system calls to the kernel directly in Win95, via accessing their static addresses in memory. It was magic. (It was also quite terrible from the perspective of an OS developer, but that's beside the point).
So, is there any VM that can emulate all that these days? Without crashing, that is.