Что такое формат файла URCL?
Файл .urcl содержит исходный код, написанный на URCL (Universal Reduced Computer Language). URCL - это промежуточный язык, похожий на RISC-ассемблер, созданный максимально простым, чтобы даже процессоры на редстоуне в Minecraft, собранные вручную, могли выполнять написанные на нем программы. Из-за происхождения в среде Minecraft в некоторых документах сообщества название расшифровывается как «Universal Redstone Computer Language».
Файл представляет собой обычный текст с одной инструкцией на строку. Он начинается с заголовочных директив, таких как BITS, MINREG, MINHEAP и MINSTACK, которые описывают разрядность и ресурсы, необходимые программе, за которыми следует тело с инструкциями вроде IMM, ADD, JMP, OUT и HLT. Метки начинаются с точки, а комментарии - с //. Инструкции разделены на уровни Core, Basic и Complex, поэтому компилятору достаточно реализовать лишь небольшой набор Core, а остальные он может упростить до базовых.
В отличие от реального ассемблера, URCL скрывает детали оборудования, такие как слоты задержки перехода, флаги и тайминги ввода-вывода, что делает его удобным способом изучения низкоуровневого программирования или описания программ, которые могут работать на множестве различных CPU.
Безопасность и защита
РИСК: LOWA .urcl file is human-readable text and cannot execute on its own; opening it in an editor is harmless. The only theoretical risk is running an untrusted URCL program inside an emulator or compiler, which is sandboxed and far safer than running an unknown binary. Verify a file is genuine URCL source before compiling it.
Детали формата
в двух словах- Universal Systems Language (USL) - Unrelated software-engineering language occasionally abbreviated near URCL in searches; does not use the .urcl extension.
- UNCOL - Historical universal intermediate-language concept that comes up alongside URCL as prior art but is a separate, unrelated idea with no .urcl files.
Программы, открывающие файлы URCL
py URCL.py <ISA> program.urcl output.txt to compile the file to a target instruction set or emulate it. Технические подробности
глубокая спецификация| Encoding | Plain text (ASCII / UTF-8), one instruction per line |
| Byte order | N/A (text format) |
| Container | None; flat text file |
| Typical size | A few hundred bytes to tens of kilobytes |
| Structure | A header block of directives (BITS, MINREG, MINHEAP, MINSTACK, RUN) followed by a body of instructions, labels (prefixed with a dot), register operands (R1, R2 or $1), immediates, memory addresses (M-prefixed), ports, and comments introduced with //. Instructions fall into Core, Basic, and Complex tiers, for example IMM, ADD, SUB, JMP, BRZ, LOD, STR, OUT, IN, HLT. |
| Platforms | Windows, macOS, Linux |
| Notes | URCL is a RISC-like intermediate assembly language, not a native machine ISA. A URCL program is compiled or translated to a target instruction set (a real CPU ISA or a Minecraft redstone CPU) via a per-architecture config, or run directly in a URCL emulator. Preprocessor directives such as @DEFINE, @INCLUDE and @PRAGMA and macro support are provided by some toolchains. |
| Initial Release Full | Around 2020, growing out of the Minecraft redstone computer community |
| Structure Tiers | Core (7 fundamental instructions every backend must translate), Basic, and Complex (higher-level operations like multiply/divide and function calls that the compiler can lower to Core) |
| Выпущен | 2020 |
| Последняя версия | URCL 1.4.0 (specification revision) |
| Открыть стандартное | Да · без роялти |
| Спецификация | github.com |
Конвертации URCL
Вопросы и ответы сообщества
спрошено пользователямиВопросов пока нет - станьте первым, кто спросит о файлах URCL.