"manuscript volume (especially an ancient one)," 1845, from Latin codex "book" (see code (n.)). Related: Codical.
"a writing added to a will to explain, alter, add to, or revoke original terms," early 15c., from Latin codicillus "a short writing, a small writing tablet," diminutive of codex (genitive codicis) "book" (see code (n.)). Related: Codicillary.
c. 1300, "systematic compilation of laws," from Old French code "system of laws, law-book" (13c.), from Latin codex"systematic classification of statutory law," earlier caudex "book," literally "tree trunk," hence, book made up of wooden tablets covered with wax for writing. De Vaan traces this through Proto-Italic *kaud-ek- to PIE *kehu-d- "cleaved, separate," which he also sees as the root of cauda "tail" (see coda).
Meaning "cipher, system of signals and the rules which govern their use" (the sense in secret code) is from 1808. Code-name is from 1879 (in telegraphy). Meaning "system of expressing information and instructions in a form usable by a computer" is from 1946.