function pointer & memory selection

I'm not sure exactly what the code is trying to do, but I changed the line:

        pMemory = &memory_System.bSlidingSwitch_Left;

to

       pMemory = (word *) &memory_System.bSlidingSwitch_Left;

and the code compiles. The error is caused because, without the cast, there is a type mismatch between the two data types. Many compilers don't complain on a "silent cast", because you're attempting to place a smaller data type (boolean) into a larger data type (word). That is, you're pouring one byte of information into a two-byte bucket. Any reasonably good compiler will complain on assignment in the other direction (pour two bytes of information into a one-byte bucket, since that runs the risk of losing information).