Новое описание с самого начала сделано по такой схеме.
Слегка расширен функционал Mapper-аКод:[Macro("HDRDF$")] public class TaskHeader { [Map("H.CSP: .BLKW 1")] public UInt16 CurrentStackPointer; // Current stack pointer [Map("H.HDLN: .BLKW 1")] public UInt16 HeaderLength; // Header length [Map("H.EFLM: .BLKW 1")] public UInt16 EventFlagMask; // Event flag mask [Set(".=.-2")] [Map("H.SMAP: .BLKB 1")] public byte SupervisorModeMappingMask; // Supervisor mode mapping mask [Map("H.DMAP: .BLKB 1")] public byte IDSpaceModeMappingMask; // I- and D-space mode mapping mask [Map("H.EFLA: .BLKW 1")] public UInt16 EventFlagAddress; // Event flag address [Set(".=.-2")] [Map("H.FMAP: .BLKW 1")] public UInt16 H_FMAP; // ?? [Map("H.CUIC: .BLKW 1")] public UInt16 CurrentUIC; // Current UIC [Map("H.DUIC: .BLKW 1")] public UInt16 DefaultUIC; // Default UIC [Map("H.IPS: .BLKW 1")] public UInt16 InitialPS; // Initial PS [Map("H.IPC: .BLKW 1")] public UInt16 InitialPC; // Initial PC [Map("H.ISP: .BLKW 1")] public UInt16 InitialSP; // Initial SP [Map("H.ODVA: .BLKW 1")] public UInt16 ODTSSTVectorAddress; // ODT SST vector address [Map("H.ODVL: .BLKW 1")] public UInt16 ODTSSTVectorLength; // ODT SST vector length [Map("H.TKVA: .BLKW 1")] public UInt16 TaskSSTVectorAddress; // Task SST vector address [Map("H.TKVL: .BLKW 1")] public UInt16 TaskSSTVectorLength; // Task SST vector length [Map("H.PFVA: .BLKW 1")] public UInt16 PowerFailASTControlBlock; // Power fail AST control block [Map("H.FPVA: .BLKW 1")] public UInt16 FloatingPointASTControlBlock; // Floating-point AST control block [Map("H.RCVA: .BLKW 1")] public UInt16 ReceiveASTControlBlock; // Receive AST control block [Map("H.EFSV: .BLKW 1")] public UInt16 EventFlagContextAddress; // Address of event flag context [Map("H.FPSA: .BLKW 1")] public UInt16 FloatingPointContextAddress; // Address of floating-point context [Map("H.WND: .BLKW 1")] public UInt16 PointerToNumberOfWindowBlock; // Pointer to number of window block [Map("H.DSW: .BLKW 1")] public UInt16 DirectiveStatusWord; // Directive status word [Map("H.FCS: .BLKW 1")] public UInt16 FCSImpureStorageAddress; // Address of FCS impure storage [Map("H.FORT: .BLKW 1")] public UInt16 FORTRANImpureStorageAddress; // Address of FORTRAN impure storage [Map("H.OVLY: .BLKW 1")] public UInt16 OverlayImpureStorageAddress; // Address of overlay impure storage [Map("H.VEXT: .BLKW 1")] public UInt16 ImpureVectorsAddress; // Address of impure vectors [Map("H.SPRI: .BLKB 1")] public byte SwappingPriority; // Swapping priority [Map("H.NML: .BLKB 1")] public byte MailboxLUN; // Mailbox LUN [Map("H.RRVA: .BLKW 1")] public UInt16 ReceiveByReferenceASTControlBlock; // Receive by reference AST control block [Map("H.X25: .BLKB 1")] public byte X25; // H_X25 [Map("H.RES1: .BLKB 1")] public byte H_Reserved1; // Reserved [Map("H.RES2: .BLKW 1")] public UInt16 H_Reserved2; // Reserved [Map("H.LUTE: .BLKW 1")] public UInt16 H_LUTE; // Reserved [Map("H.GARD: .BLKW 1")] public UInt16 HeaderGuardWord; // Header guard word [Map("H.NLUN: .BLKW 1")] public UInt16 NumberOfLUNs; // Number of luns [Map("H.LUN: .BLKW ?H.NLUN")] public LUNDescriptor[] LUNTable; // LUN table (2 words per LUN) static TaskHeader() => Helpers.Mapper<TaskLabel>(); public TaskHeader(byte[] data, uint baseOffset = 0) => this.Mapper<TaskHeader>(data, baseOffset); }




Ответить с цитированием