Vad är filformatet URCL?
En .urcl-fil innehåller källkod skriven i URCL, Universal Reduced Computer Language. URCL är ett RISC-assembler-liknande mellanspråk byggt för att vara så enkelt som möjligt, så enkelt att handkopplade Minecraft-redstone-CPU:er kan köra program skrivna i det. Detta redstone-ursprung är anledningen till att vissa dokument i communityn utläser namnet som «Universal Redstone Computer Language».
Filen är klartext med en instruktion per rad. Den börjar med huvuddirektiv (headers) som BITS, MINREG, MINHEAP och MINSTACK som beskriver ordstorlek och resurser som ett program behöver, följt av en huvuddel med instruktioner som IMM, ADD, JMP, OUT och HLT. Etiketter (labels) använder en inledande punkt och kommentarer använder //. Instruktioner är uppdelade i nivåerna Core, Basic och Complex, så att en kompilator bara behöver implementera den lilla Core-uppsättningen och kan bryta ner resten.
Till skillnad från riktig assembler döljer URCL hårdvarudetaljer som branch delay slots, flaggor och IO-tajming, vilket gör det till ett vänligt sätt att lära sig lågnivåprogrammering eller för att beskriva ett program som många olika CPU:er kan köra.
Säkerhet & trygghet
RISK: 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.
Formatdetaljer
i ett nötskal- 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.
Program som öppnar URCL-filer
py URCL.py <ISA> program.urcl output.txt to compile the file to a target instruction set or emulate it. Tekniska detaljer
djup specifikation| 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) |
| Släppt | 2020 |
| Senaste version | URCL 1.4.0 (specification revision) |
| Öppen standard | Ja · royaltyfri |
| Specifikation | github.com |
URCL-konverteringar
Frågor & svar
frågat av användareInga frågor än - bli den första att fråga om URCL-filer.