64-bit I/O port software
We need 8 8-bit registers to store/write the 64 bits
- Select the EN addresses to be $...000 to $...007
- Select OUT addresses to be $...010 to $...017
Read 15th bit
- load value at address $...011 (2nd set of OUT regs)
- logical AND with 0x80
- bit position 7 of result is 15th bit
Write the 47th bit
- read OUT register at $...015
- set bit position 7 to desired value ( or with 0x80)
- store in $...015
- load EN register at $...005
- set bit to output
- store value back to $...005