Mode A selected on the transponder provides identification of the aircraft to the secondary radar; Mode C will add an automatic height read-out of an aircraft. Mode S is a selective addressing. But previously there was a Mode B which nowadays is not in used anymore. What was it used for, and what information was this mode able to provide?
SSR modes B and D are not used today, but mode B has been used in UK, Australia and some other countries for some time, and it was compliant with mode A:
In reply to interrogation in Mode-A and Mode-B information of identity, which is set by the pilot, is sent to the ground interrogator.
Modes A and B are used with a squawk code of 12 bits, offering 4096 different identifiers. In both modes the code is selected on the SSR transponder panel, using 4 octal digits (0 to 7).
SSR transponder panel, source
For a transponder handling multiple modes, the correct mode must be selected in parallel of the squawk code.
The interrogator (SSR ground station) can request identifiers using one mode at a time, and receive answers from transponders set to that mode. Aircraft using code 1234 will only reply when interrogated using the mode their are currently set to.
SSR interrogation modes are identified by the timing between pulse P1 and P3 (P2 is used to reject interrogations from secondary SSR lobes).
SSR modes identification, source
While mode A is compliant with military mode 3 (both often referred to as 3/A), mode B is purely civil. Its purpose is assumed to be an extension of the mode A, giving 4096 additional codes to ATC.
ICAO Doc 9684 which is the reference for SSR doesn't even mention modes B and D anymore.