Пример #1
0
        /// <summary>
        /// Gets the address pointed to by a pointer referenced by a long address.
        /// </summary>
        /// <param name="baseAddress">24-bit address</param>
        /// <param name="Index"></param>
        /// <returns></returns>
        private int GetPointerLong(int baseAddress, Register Index = null)
        {
            int addr = baseAddress;

            if (Index != null)
            {
                addr += Index.Value;
            }
            return(DataBank.GetLongAddress(MemMgr.ReadWord(addr)));
        }
Пример #2
0
        /// <summary>
        /// Gets the address pointed to by a pointer in the data bank.
        /// </summary>
        /// <param name="baseAddress"></param>
        /// <param name="Index"></param>
        /// <returns></returns>
        private int GetPointerLocal(int baseAddress, Register Index = null)
        {
            int addr = DataBank.GetLongAddress(baseAddress);

            if (Index != null)
            {
                addr += Index.Value;
            }
            return(addr);
        }
Пример #3
0
        /// <summary>
        /// Gets the address pointed to by a pointer in Direct page.
        /// be in the Direct Page. The address returned will be DBR+Pointer.
        /// </summary>
        /// <param name="baseAddress"></param>
        /// <param name="Index"></param>
        /// <returns></returns>
        private int GetPointerDirect(int baseAddress, Register Index = null)
        {
            int addr = DirectPage.Value + baseAddress;

            if (Index != null)
            {
                addr += Index.Value;
            }
            int pointer = MemMgr.ReadWord(addr);

            return(DataBank.GetLongAddress(pointer));
        }