The AT24C02 is a serial EEPROM using two 2 wires (clock and data) to connect to 8051.
You have to get use with what is called a bit bang procedure that emulates the I2C bus required by AT24C02.
Read carefully AT24C02 datasheet and these two documents:
**broken link removed**
**broken link removed**
This will teach you how to store/retrieve one byte to AT24C02. After that, sending a long variable it's a piece of cake.