[BOOTVID] Simplify the code by introducing and using IO port helper macros.