Added common.h/c for reading/writing from I/O bus