The test file format is documented in Appendix B of the book.
The .cmp file and the .out file need to be an exact match, except for '*' in the .cmp file that matches any individual character. The best way to generate a .bmp file is to comment out the compare-to in the .tst file and run the test. After verifying that the .out file shows correct operation of the chip, rename the .out file to .cmp.
See this post
for more info on output formatting.
You need wider margins on your zero and nonzero columns.