A code is related to strong forms of emergence, because it can be the connection of two worlds, if it implements the basic blocks of one world in terms of the other. A code can be used to root one system in the other, if it is the gateway and interface between both. It often separates and unites two systems at the same time. The binary code for instance can be understood by hardware and software, and it separates and unites both at the same time.
A protocol is a code for communication in a network. It usually refers to a set of formalized rules that define an exact format for communication between systems over a network, and can be considered as the 'language' spoken between computers to help them exchange information and data. A standard agent communication language like FIPA ACL relies on 'speech act' codes for 'communicative acts' (REQUEST, QUERY, PROPOSE,..).
A code is also the basic requirement for evolution and evolutionary algorithms. In nature, this is usually the genetic code stored in the DNA.
- Marcello Barbieri, The Organic Codes, Cambridge University Press, 2002, ISBN 0521531004