Have you looked at the application notes for the 8051? (http://www.atmel.com/dyn/products/app_notes.asp?family_id=604)
I wasn't able to download any for some reason but i think some might be in assembly (at least the AVR ones have assembly and sometimes C)
I suggest you to buy a book about the 8031/8051 assembly and microprocessors, the best book i know is:
8051 Microcontroller and Embedded Systems
by Muhammad Ali Mazidi, Janice Gillispie Mazidi, Muhammed Ali Mazidi
**broken link removed**
But there are plenty of books that you can buy or get @ your local library...