Nanomedicine is the application of nanotechnology to medicine: the preservation and improvement of human health, using molecular tools and molecular knowledge of the human body. Medical nanorobotics is the most powerful form of future nanomedicine technology. Nanorobots may be constructed of diamondoid nanometer-scale parts and mechanical subsystems including onboard sensors, motors, manipulators, power plants, and molecular computers. The presence of onboard nanocomputers would allow in vivo medical nanorobots to perform numerous complex behaviors which must be conditionally executed on at least a semiautonomous basis, guided by receipt of local sensor data and constrained by preprogrammed settings, activity scripts, and event clocking, and further limited by a variety of simultaneously executing real-time control protocols. Such nanorobots cannot yet be manufactured in 2007 but preliminary scaling studies for several classes of medical nanorobots have been published in the literature. These designs are reviewed with an emphasis on the basic computational tasks required in each case, and a summation of the various major computational control functions common to all complex medical nanorobots is extracted from these design examples. Finally, we introduce the concept of nanorobot control protocols which are required to ensure that each nanorobot fully completes its intended mission accurately, safely, and in a timely manner according to plan. Six major classes of nanorobot control protocols have been identified and include operational, biocompatibility, theater, safety, security, and group protocols. Six important subclasses of theater protocols include locational, functional, situational, phenotypic, temporal, and identity control protocols.