The Assert() macro is a useful tool in all programming, not just in operating system development. However, it takes on extra importance in an operating system, since, without a conventional debugger, there are frequently no other convenient ways to fully test a system. Assert() is not much more than an if()/else macro, but therein lies most of its power. When the system is fully debugged, the Assert()s can be compiled out (taking up no code space and no time during execution) by turning off a compile-time definition.
Assert() simply takes a C expression and asserts its truth. If the expression is true, execution continues without any noticeable interruption. However, if the assertion is false, the program should print out some debugging information and halt immediately.
For example, Assert() could be used to make sure that your video driver is always writing to the correct area of video memory. During development and testing, if this is ever not the case, you will know immediately. When the video driver has been determined to be stable, it can be compiled without Assert()s at no loss.
Look at the example Assert.h and Assert.c to see a standard Assert(). You won't be able to use this one, since it uses fprintf() and libc functions aren't available.
Any file that uses Assert() needs to #include "Assert.h", and you need to add Assert.o to your list of object files. In the Makefile, add -DASSERT (this defines ASSERT, so that Assert()s will be evaluated) as an option to the compile command.