From everything baidu
ROM: program storage, obviously, the memory is stored microcontroller running program, you write the program is stored in this part of the space inside, but some don't need to change the program data in the table, the data can also be placed on the inside, where the data back will be lost when power supply drop, is equivalent to a computer hard drive, general MCU when running the program, can only read the data, but cannot change the data, to change the inside of the data needs to be some special means, like a downloader to download the program inside,
RAM: data storage, storage microcontroller when executing programs to produce some of the temporary data, such as the C language of some of the variables are defined in this space, in the assembly often move data in this register to the register, the so-called register here refers to the RAM, it fell after the electrical data will be lost in it, and so will use this part of the register to initialize, otherwise the data inside is a random number, equivalent to a computer's memory,
ROM MOVC access instruction; RAM is divided into two both within and outside chip, is used to store data, on chip with MOV access, topical MOVX access, on chip RAM access to the fastest, but the space is little, external RAM access the slower, but the space is large, the internal ROM or RAM, so easy to distinguish, 51 MCU ROM generally bigger than RAM, but it doesn't have to be, such as 89 c51 internal ROM space have 4 k, but the RAM is only 256 b space, 51 internal RAM 128 space also used as the definition of special function register, in addition, assembly language, respectively, to the operation of the ROM and RAM in MOVC and MOV
External extension: external extension of resolution depends on the type of memory chips, was written some ROM or RAM