Registers and Mouse Drivers.

I guess you could call me a beginner pascal programmer.
I understand all of the "basics" of pascal.  Now, I'm coding
a drawing program and instead of using anyone else's
code, I'd like to write my own mouse routines.  But I don't
understand registers.  Is there any faq or a webpage that
I could be pointed to?  Also, where can I get specs for file
formats of BMP, PCX, JPG or GIF?  Thanks in advance.