# Path: VM/ctypes_types.py



import ctypes
from .ctypes_types import ubyte, uword, udword
        ('base', udword),
        ('limit', udword),
        ('access', udword)
    ]

    def __str__(self):
        return f'base=0x{self.base:08x}, limit=0x{self.limit:08x}, access={self.access:08x}'


class _one_sreg(ctypes.Structure):
    _pack_ = 1
    _fields_ = [
        ('visible', udword),
        ('hidden', _sreg_hidden)
    ]

    def __str__(self):
        return f'Sreg(visible=0x{self.visible:08x}, {self.hidden})'


class SegmentDescriptor(ctypes.LittleEndianStructure):
    _pack_ = 1
    _fields_ = [
        ('base_3', ubyte),
        ('G', ubyte, 1),
        ('DB', ubyte, 1),
        ('L', ubyte, 1),
        ('AVL', ubyte, 1),
        ('limit_2', ubyte, 4),
        ('P', ubyte, 1),

# Path: VM/ctypes_types.py



# Path: VM/Registers.py
import ctypes
from .ctypes_types import ubyte, uword, udword

        ('base', udword),
        ('limit', udword),
        ('access', udword)
    ]

    def __str__(self):
        return f'base=0x{self.base:08x}, limit=0x{self.limit:08x}, access={self.access:08x}'


class _one_sreg(ctypes.Structure):
    _pack_ = 1
    _fields_ = [
        ('visible', udword),
        ('hidden', _sreg_hidden)
    ]

    def __str__(self):
        return f'Sreg(visible=0x{self.visible:08x}, {self.hidden})'


class SegmentDescriptor(ctypes.LittleEndianStructure):
    _pack_ = 1
    _fields_ = [
        ('base_3', ubyte),
        ('G', ubyte, 1),
        ('DB', ubyte, 1),
        ('L', ubyte, 1),
        ('AVL', ubyte, 1),
        ('limit_2', ubyte, 4),
        ('P', ubyte, 1),

        ('DPL', ubyte, 2),