you should initialize these register
1. enable GPIO pins from which you want to read or write data.
2. set direction as input or output.
3. read or write GPIO value register according to requirement.
For interrupt
enable GPIO pin and set as input
include vector_intr.asm file and make some change to interrupt vector file on
required interrupt.
initalize external interrupt and write ISR.
Regards,
Zeeshan Ansari