Unfortunately I can't reference this but I can tell you what I was once told....
Mode B was a 'spare' set of 4096 codes available to civvy ATC, presumably when they ran out of Mode A codes. Very few aircraft had Mode B transponders, I saw them only on some of the RAF L1011-500s, I think the ex Pan Am aircraft. I have never met anyone who has ever been asked to squawk Mode B.
Mode D is listed in 1960's textbooks as 'experimental'
There is a brief description of the Modes
here including the military modes.