The following pages link to Programming:Source code to show it is possible to store data in PSG register 14 and 15 even if the port has been set to input: