There are lots of I/O expander chips out there. They use some kind of serial interface (SPI, I2C), which you may have to implement in software depending on what kind of peripherals your controller has.
See, for example, the MCP23S17 from Microchip. You can cascade up to 8 devices for 128 I/O pins using just two or four pins on your microcontroller. You can also roll your own system using shift registers and so.
You can use 82c55 PPI for this. I am using this for my all projects based on 8051. map 8255 on data memory.(memory mapped IO). Each port of 8255 contain data memory address. try searching on net for same or i'll give u basic design.