This brings me back to the code I wrote in Paradox (an early 80s database, I used the version Borland put out just after buying the company that wrote it) for our family music shop rental billing.

For some reason my 16 year old brain thought the Dec Rainbow was a cool machine so we bought one despite the awful shopping experience that DEC provided for non large enterprises.

It was a cool machine in that it could run both CP/M (what Paradox would run on) and MS-DOS because it had a z80 as well as some early x86 variant. The drives could also read both formats too.

NEC made an enhanced clone of the 8086 called the V30 that had built-in 8080 support. It could be switched in and out of 8080 mode on the fly. This made it fairly simple to write a program that allowed CP/M programs to run natively on an MS-DOS PC with a V30. The MS-DOS API was mostly a copy of the CP/M API, so all you had to do when you got a CP/M system call was switch the CPU into 16-bit mode, do the equivalent MS-DOS system call, and switch the CPU back to 8-bit mode.