1. A data processing apparatus for transmitting and receiving data to and from an external apparatus and a portable information recording medium, comprising: a first interface for transmitting and receiving data to and from the external apparatus; a second interface for transmitting and receiving data to and from the portable information recording medium; a non-volatile memory for storing a first program regarding the data processing apparatus in advance; a volatile memory having no backup battery, said volatile memory being supplied with power from the external apparatus through said first interface; program storing means for storing a second program received by said first interface in said volatile memory; erasing means for erasing said second program stored in said volatile memory when a power supply to said volatile memory from the external apparatus via said first interface is stopped; and processing means for transmitting and receiving data to and from the portable information recording medium, and processing the data in accordance with said first program stored in said non-volatile memory and said second program stored in said volatile memory.