There isn't _A_ code of which I am aware.
The AHJ may have some preferences.
The CAT info provided by IvyMike is pretty decent. Pay particular attention to the need for supports and flex joints, and to sizing the system to stay within the engine's backpressure budget. ... which is not much, and is smaller for newer high tech engines and for larger engines.
A good silencer may consume half or more of the backpressure budget, so don't ignore it when sizing the pipe; ask a silencer manufacturer for performance numbers for use with the specific engine.
If the customer gets sticker shocked and says they can do without a silencer, size the pipes for one anyway; the customer's neighbors will change his mind.
Rule of Thumb: Very quiet, "Hospital Grade" silencers are available, and preferred, and will occupy about as much volume as the engine itself does. Not the cubic inch displacement; the L/W/H volume of the engine's exterior.
The silencer and the pipes get very hot when the engine is running at full song. Beware of radiation to nearby flammable surfaces. Thermal insulation blankets are available at some cost; they will greatly reduce heat transfer to the surrounding spaces.
Mike Halloran
Pembroke Pines, FL, USA