MenuetOS is an example of an OS written entirely in Assembly. Is there any advantage to writing it in Assembly instead of a low-level programming language such as C?
At this point, not much, although it naturally depends on what system and what resources you're writing the OS for. Almost all modern computers come bundled with a C compiler that is basically as close to the machine as you can get, so using Assembly is not going to help. On the other hand, if you're writing code for a robot, Assembly would be very useful.
Presumably you can write a compact and fast OS. Though you may not be able to write it quickly, and you lose any hope of trivial portability.
Optimized assembly is the fastest you can get. Even well-optimized C is measurably slower that well-crafted assembly. For a general-purpose operating system, though, the gains are not worth the difficulty. I can't imagine an assembly OS scaling at all in that realm. If I recall, Menuet is meant for very small, simple embedded systems where the increased complexity of assembly code is outweighed by the performance benefits.
The advantages are pretty much none compared to the disadvantages
Interfacing with an OS tends to be easiest in the language it was written in -- C in UNIX and Win32, C++ in BeOS, etc. MenuetOS was designed specifically to make developing assembly applications easy, so the best choice was to write the OS itself in assembly.
For OSes which aren't intended to be general-purpose, such as embedded systems and microcontrollers, the overhead introduced by mechanical translation (ie compilation) of C into assembly can be unacceptable. Compilers aren't as smart as humans, especially when it comes to the sorts of fiddly little optimizations required on embedded platforms, and writing directly in assembly guarantees there won't be a compiler mucking up carefully-designed algorithms.
Someone could say - speed and small code (by small code I don't mean source code of course, but compiled one), as for the second one - probably yes, as for speed - I don't know how big the differences are, assuming the fact that you have decent c compiler. But I can give you 1 big disadvantage - you can't port such OS to other architectures, writing OS in assembler binds you to one and chosen processor architecture. I won't even mention time that you have to spend to write such piece of software, compared to C.
I'd imagine the advantage was that it gave them a lot of good PR considering the number of places I've seen that story. Reputation gets you the best jobs...
There is still an active community of folks who bang out demos in assembly. There are sites where people are even coding demos for 8-bitters like the C64 and Atari XL machines. It's simply thier "weapon of choice." And they enjoy coding in that format. And provides a higher degree of control, but requires a greater understanding of the machine. Their mastery over the machine and ability to do entire executables in less memory than the overhead standard C libs take up give them intense satifaction.
No matter how good your compiler is, it's still follows a mecanical process in generating the code. Assembly pretty much gives you full control, allowing you to do things that aren't easily representable by even a language like C. For example "Atomic operations" are usually wrapped by either a OS call or function call making them substantially less efficient because there is no standard way to represent them in the language it's self. (Sometimes they will be represented by a compiler intrinsic extension to C.)
Also it allows unconventional things to be done, like using the processor stack in ways that you CAN'T in C. (Thus in C you create a "Stack" datastructure using dynamic memory allocation to replicate some thing the processor can natively do.)
Size wize, I've seen a full screen Text mode, text editor that was required less than 512 bytes for the executable image. That was written by a guy I knew from the bulletin boards. (The pre WWW era.) I've seen C startup code that took more memory than that!
Main advantage: you don't need a C compiler. Secondary advantage: if you have to make the code size really, really small, then (a) modern compilers are aiming more for fast execution than small code size, and (b) the human penalty for writing assembly code is smaller if the artifact is smaller.
So if you're doing some really tiny OS for some new embedded ISA and it all has to fit in 4K, writing in assembly might be a good choice...