Very much so. If programs are well-behaved, and call "int 21", etc all is well. But a lot of programs would use undocumented things, such as the list-of-lists and they'd directly peek and poke into the operating systems code.
I've had fun updating the shell, and code, of CP/M, in assembly, and writing emulators of it. But as always there is no shortage of programs making specific assumptions that make everything more complex than they should be.