Actions
Task #10646
openMicroTESK Documentation: дополнить описание конструкции mode
Start date:
12/26/2020
Due date:
% Done:
0%
Estimated time:
Detected in build:
git
Published in build:
Description
Возможности конструкции mode в документации не описаны.
Примеры кода:
Работа с индексом i
mode X (i: card(5)) = XREG [i] mode CX (i: card(3)) = XREG [coerce(card(5), i) + 8] rd: CX X(zero_extend(card(5), rd.i) + 8)
ИЛИ правило:
mode IMM4 (i: card(4)) syntax = format("%d", i) image = format("%4s", i) mode IMM8 (i: card(8)) syntax = format("%d", i) image = format("%8s", i) mode IMM16 (i: card(16)) syntax = format("%d", i) image = format("%16s", i) mode IMM32 (i: card(32)) syntax = format("%d", i) image = format("%32s", i) mode IMM = IMM4 | IMM8 | IMM16 | IMM32 mode IMM8_16_32 = IMM8 | IMM16 | IMM32 mode IMM8_16 = IMM8 | IMM16 mode IMM4_16 = IMM4 | IMM16
"Структуры":
// Memory mem MEM_CLASS [2 ** 32, u64] mode ClassBlock (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 0]:: MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 1]:: MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 2]:: MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 3]:: MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 4]:: MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 5]:: MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 6]:: MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 7]:: MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 8]:: MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 9] mode ClassBlockName (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 0] mode ClassBlockBase (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 1] mode ClassBlockSize (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 2] mode ClassBlockFlags (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 3] mode ClassBlockImplStart (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 4] mode ClassBlockNImpl (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 5] mode ClassBlockMemberStart (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 6] mode ClassBlockNMembers (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 7] mode ClassBlockMethodStart (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 8] mode ClassBlockNMethods (i: u32) = MEM_CLASS[CLASS_BLOCK + i*CLASS_DESCRIPTION_SIZE + 9]
Actions