1. A portable electronic device detachably connected to an external host system, comprising: memory means for storing a system program and a user program; command text generating means for generating a command text containing data indicating whether a text transmitted to the portable electronic device from said external host system is used to write the system program or the user program into said memory means, said command text having a start code field, a text length field, a command field, and a check code, said command field containing a specified bit which indicates whether the text transmitted to the portable electronic device from said external host system is used to write the system program or the user program into said memory means; and response text generating means for generating a response text containing data indicating whether a text transmitted from the portable electronic device to the host system is used to write the system program or the user program into said memory means.