C64Lib.Core.MOS6510.ExtWriteByte C# (CSharp) Method

ExtWriteByte() public method

public ExtWriteByte ( UInt16 adr, byte abyte ) : void
adr System.UInt16
abyte byte
return void
        public void ExtWriteByte(UInt16 adr, byte abyte)
        {
            // Save old memory configuration
            bool bi = basic_in, ki = kernal_in, ci = char_in, ii = io_in;

            // Set new configuration
            basic_in = (ExtConfig & 3) != 0;
            kernal_in = (ExtConfig & 2) != 0;
            char_in = (ExtConfig & 3) != 0 && ~(ExtConfig & 4) != 0;
            io_in = (ExtConfig & 3) != 0 && (ExtConfig & 4) != 0;

            // Write byte
            write_byte(adr, abyte);

            // Restore old configuration
            basic_in = bi; kernal_in = ki; char_in = ci; io_in = ii;
        }