Method and apparatus for controlling a program directly executable in the external storage device using a randomly accessible and rewritable memory