summaryrefslogtreecommitdiff
path: root/Noddybox.Emulation.EightBit/Register16Factory.cs
blob: fd31fe47db63c350d94538c8a70252b37822b733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Noddybox.Emulation.EightBit
{
    /// <summary>
    /// Defines a common 16-bit register, which is two bytes which are separately addressable.
    /// </summary>
    public static class Register16Factory
    {
        public static IRegister16 Create()
        {
            if (BitConverter.IsLittleEndian)
            {
                return new Register16LittleEndian();
            }
            else
            {
                return new Register16BigEndian();
            }
        }
    }
}