Wat is het URCL-bestandsformaat?
Een .urcl-bestand bevat broncode geschreven in URCL, de Universal Reduced Computer Language. URCL is een op RISC-assembly lijkende tussentaal die is gebouwd om zo eenvoudig mogelijk te zijn, zo eenvoudig dat handmatig bedrade Minecraft redstone-CPU's programma's kunnen draaien die erin zijn geschreven. Die redstone-oorsprong is de reden waarom sommige community-documenten de naam uitbreiden als „Universal Redstone Computer Language”.
Het bestand is platte tekst met één instructie per regel. Het begint met header-richtlijnen zoals BITS, MINREG, MINHEAP en MINSTACK die de woordgrootte en bronnen beschrijven die een programma nodig heeft, gevolgd door een reeks instructies zoals IMM, ADD, JMP, OUT en HLT. Labels gebruiken een voorafgaande punt en commentaren gebruiken //. Instructies zijn onderverdeeld in Core-, Basic- en Complex-niveaus, zodat een compiler alleen de kleine Core-set hoeft te implementeren en de rest kan verlagen.
In tegenstelling tot echte assembly verbergt URCL hardware-details zoals branch delay slots, vlaggen en IO-timing, wat het een vriendelijke manier maakt om low-level programmeren te leren of om een programma te beschrijven dat op veel verschillende CPU's kan draaien.
Beveiliging & veiligheid
RISICO: 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.
Formaatdetails
in een notendop- 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.
Programma's die URCL-bestanden openen
py URCL.py <ISA> program.urcl output.txt to compile the file to a target instruction set or emulate it. Technische details
diepe specificaties| 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) |
| Uitgebracht | 2020 |
| Laatste versie | URCL 1.4.0 (specification revision) |
| Open standaard | Ja · royaltyvrij |
| Specificatie | github.com |
URCL conversies
Community V&A
gevraagd door gebruikersNog geen vragen - wees de eerste om iets te vragen over URCL-bestanden.