OS-9 was around for the Motorola 6809 and its offspring.
OS-9 is still around for bigger chips today.
A former Mostek engineer and I even wrote a real-time, even-driven version of CP/M for the 8080 and Z-80, with an extended BASIC language centered around the event handlers, much like Visual Basic was 15 years later.

Vesta and other such companies had their real-time C compilers, which were really nice. You could write it over an RS-232 line to the main board, run it, and then ROM it right there, even remotely over the phone.

But when your ISR is complex or involves handshaking like a terminal session, TCP/IP, or has enough dead time between packets or characters, you can need to be able to switch tasks. Doing this, you can run 8 terminals, a parallel printer, console keyboard, and real-time DAC like multi-axis, coordinated motor control and vision systems, with all that slower stuff in background, on an 8-Mhz 80286.

The last one I developed from the low level was in C and mostly the DSP assembly, on a PC-104 bus, with dual DSP chips having their memory dumped DMA to the Pentium's RAM in one clock cycle. The setup interface and real time control in Watcom C++, ran on that Pentium under QNX. The operator interface was written in C++ for Windows.

C is too loose, and C++ is a cobbled fix. I'd rather have encapsulation over inheritance any day.

For C, I long ago wrote a wrapper for every bit of the Intel BIOS and direct calls, then a hierarchy of code modules. Same for C++ and an object hierarchy. Stub everything you think might warrant using someone else's code library.

Most complex RT application I ever worked on was from the ground up, on the PowerPC. I had rolled my own 64-bit system in 1987 and two of us had written our assembly language for it, but the PowerPC was way more complex, especially with the tight memory constraints.