Ypsilon.Emulation.Processor.YCPU.ReadMemInt8 C# (CSharp) Method

ReadMemInt8() public method

Reads an 8-bit value from the address specified.
public ReadMemInt8 ( ushort address, SegmentIndex segment ) : byte
address ushort
segment SegmentIndex
return byte
        public byte ReadMemInt8(ushort address, SegmentIndex segment)
        {
            // Int8 accesses do not have to be 16-bit aligned. Only one memory access is needed.
            Cycles += 1;
            Segment s = GetSegment(segment);
            if (s == null)
                throw new Exception("Unknown segment referenced in DebugReadMemory");
            return s[address];
        }