Init_VIA ($F14C)
This routine is invoked during powerup, to initialize the VIA chip. Among other things, it initializes the scale factor to 0x7F, and sets up the direction for the port A and B data lines.
EXIT:
DP = $D0 D-reg, X-reg trashed
DP = $D0
D-reg, X-reg trashed
Source