Che cos'è il formato di file URCL?
Un file .urcl contiene codice sorgente scritto in URCL, l'Universal Reduced Computer Language. URCL è un linguaggio intermedio simile all'assembly RISC, progettato per essere il più semplice possibile, tanto che le CPU redstone di Minecraft cablate a mano possono eseguire programmi scritti in esso. Questa origine legata a redstone è il motivo per cui alcuni documenti della comunità estendono il nome come «Universal Redstone Computer Language».
Il file è in testo semplice con un'istruzione per riga. Inizia con direttive di intestazione come BITS, MINREG, MINHEAP e MINSTACK che descrivono la dimensione della parola e le risorse necessarie a un programma, seguite da un corpo di istruzioni come IMM, ADD, JMP, OUT e HLT. Le etichette utilizzano un punto iniziale e i commenti utilizzano //. Le istruzioni sono suddivise nei livelli Core, Basic e Complex, in modo che un compilatore debba implementare solo il piccolo set Core e possa convertire il resto a un livello inferiore.
A differenza del vero assembly, URCL nasconde i dettagli hardware come i branch delay slot, i flag e la temporizzazione IO, il che lo rende un modo amichevole per imparare la programmazione a basso livello o per descrivere un programma che molte CPU diverse possono eseguire.
Sicurezza e incolumità
RISCHIO: 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.
Dettagli del formato
in sintesi- 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.
Programmi che aprono file URCL
py URCL.py <ISA> program.urcl output.txt to compile the file to a target instruction set or emulate it. Dettagli tecnici
specifiche approfondite| 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) |
| Rilasciato | 2020 |
| Ultima versione | URCL 1.4.0 (specification revision) |
| Standard aperto | Sì · royalty-free |
| Specifica | github.com |
Conversioni URCL
Domande e risposte della community
chiesto dagli utentiAncora nessuna domanda - sii il primo a chiedere informazioni sui file URCL.