URCL ファイル形式とは?
.urcl ファイルには、Universal Reduced Computer Language (URCL) で記述されたソースコードが格納されています。URCL は、可能な限りシンプルになるように設計された RISC アセンブリ風の中間言語であり、手配線の Minecraft レッドストーン CPU でもプログラムを実行できるほど単純です。このレッドストーン由来の背景から、コミュニティのドキュメントでは「Universal Redstone Computer Language」と略称を広義に解釈することもあります。
ファイルはプレーンテキスト形式で、1行に1つの命令が記述されます。ファイルの冒頭には、ワードサイズやプログラムが必要とするリソースを定義する 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 の変換
コミュニティ Q&A
ユーザーからの質問まだ質問はありません。URCL ファイルについて最初の質問をしてみましょう。