Co to jest format pliku URCL?
Plik .urcl zawiera kod źródłowy napisany w URCL, czyli Universal Reduced Computer Language. URCL to język pośredni przypominający asembler RISC, zaprojektowany tak, aby był jak najprostszy - na tyle, by ręcznie budowane procesory z redstone w Minecraft mogły uruchamiać napisane w nim programy. To pochodzenie z Minecrafta sprawia, że niektóre dokumentacje społeczności rozwijają nazwę jako „Universal Redstone Computer Language”.
Plik jest czystym tekstem z jedną instrukcją na linię. Zaczyna się od dyrektyw nagłówka, takich jak BITS, MINREG, MINHEAP i MINSTACK, które opisują rozmiar słowa i zasoby potrzebne programowi, a następnie zawiera blok instrukcji, takich jak IMM, ADD, JMP, OUT i HLT. Etykiety zaczynają się od kropki, a komentarze od //. Instrukcje są podzielone na poziomy Core, Basic i Complex, dzięki czemu kompilator musi implementować tylko niewielki zestaw Core, a resztę może uprościć.
W przeciwieństwie do prawdziwego asemblera, URCL ukrywa szczegóły sprzętowe, takie jak szczeliny opóźnienia skoku (branch delay slots), flagi i taktowanie wejścia/wyjścia, co czyni go przyjaznym sposobem na naukę programowania niskopoziomowego lub opisywanie programów, które mogą działać na wielu różnych procesorach.
Bezpieczeństwo
RYZYKO: 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.
Szczegóły formatu
w pigułce- 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.
Programy otwierające pliki URCL
py URCL.py <ISA> program.urcl output.txt to compile the file to a target instruction set or emulate it. Szczegóły techniczne
specyfikacja| 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) |
| Wydano | 2020 |
| Najnowsza wersja | URCL 1.4.0 (specification revision) |
| Otwarty standard | Tak · bezpłatny (royalty-free) |
| Specyfikacja | github.com |
Konwersje URCL
Pytania i odpowiedzi społeczności
pytania użytkownikówBrak pytań - bądź pierwszą osobą, która zapyta o pliki URCL.