Method of programming an electrically alterable read-only memory