{"id":21758626,"url":"https://github.com/themaster1127/htll","last_synced_at":"2026-05-18T01:04:41.539Z","repository":{"id":259347721,"uuid":"875158115","full_name":"TheMaster1127/HTLL","owner":"TheMaster1127","description":"HTLL is a project where I created my own assembly language and a compiled language that converts to that assembly. The assembly code is then interpreted and executed by an emulator. The purpose of HTLL is to explore low-level programming concepts and create a fun, minimal architecture with strict limitations.","archived":false,"fork":false,"pushed_at":"2025-02-14T22:07:59.000Z","size":1126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T23:19:38.326Z","etag":null,"topics":["custom-assembly-language","low-level-programming"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheMaster1127.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-19T08:45:15.000Z","updated_at":"2025-02-14T22:09:51.000Z","dependencies_parsed_at":"2024-10-24T17:55:48.732Z","dependency_job_id":null,"html_url":"https://github.com/TheMaster1127/HTLL","commit_stats":null,"previous_names":["themaster1127/htll"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMaster1127%2FHTLL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMaster1127%2FHTLL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMaster1127%2FHTLL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMaster1127%2FHTLL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheMaster1127","download_url":"https://codeload.github.com/TheMaster1127/HTLL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244734202,"owners_count":20501018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-assembly-language","low-level-programming"],"created_at":"2024-11-26T11:22:56.583Z","updated_at":"2026-05-18T01:04:41.533Z","avatar_url":"https://github.com/TheMaster1127.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTLL\n\nHTLL is a low-level programming language that compiles directly to x86-64 and AArch64 Linux assembly and some more, creating small, fast, and dependency-free statically linked binaries. It's built on the \"Escape Programming\" philosophy, which rejects the bloat and restrictions of modern toolchains in favor of absolute control. \n\n## The Power of Minimalism: A Concrete Example\n\nHTLL's simplicity translates directly to hyper-efficient executables.\n\n*   A standard `Hello, World!` program in HTLL compiles to a **440-byte** assembly (`.s`) file. When assembled, the final **statically linked** binary file is only **255 bytes**.\n*   A more complex program, like a full Bubble Sort algorithm, produces a final **statically linked** executable of just **1.1 kilobytes**.\n\nThis is the result of speaking directly to the metal without unnecessary abstraction layers.\n\n## Core Features at a Glance\n\nHTLL provides a powerful set of primitives for systems programming:\n\n*   **Direct Memory Control:** Manipulate data using arrays as raw byte buffers.\n*   **Simple Syntax:** A straightforward syntax inspired by the \"least keystroke\" philosophy.\n*   **Core Functionality:** Includes variables, functions, loops, and conditionals.\n*   **Built-in System Calls:** Direct access to file I/O (read, append, delete) and user input without external libraries.\n\n### Full Documentation\n\nFor a complete guide, including detailed explanations of every feature, syntax rules, and extensive examples, please read the full documentation:\n\n[**Read the Full HTLL Documentation**](https://github.com/TheMaster1127/HTLL/blob/main/docs.md)\n\n---\n\n## Requirements\n\n*   **architectures:** x86-64, AArch64\n*   **Operating System:** 64-bit Linux\n*   **Compiler:** `g++` (for the initial compiler bootstrap)\n*   **Assembler:** `fasm` (flat assembler) and for AArch64 use `as` and `ld`\n\n**Installing FASM:**\n\n*   **Arch Linux / Manjaro:** `sudo pacman -S fasm`\n*   **Debian / Ubuntu:** `sudo apt install fasm`\n\n---\n\n## How to Use\n\nThe build process is separated into a one-time compiler setup and the process for your own programs.\n\n### 1. Compiling the HTLL Compiler (One-Time Setup)\n\nTo build the `HTLL` compiler from source, follow these exact steps in order:\n\n1.  **Compile the compiler:**\n    ```bash\n    g++ HTLL.cpp -o HTLL\n    ```\n\n### 2. Compiling and Running Your Program\n\nOnce the compiler is built, use this simple workflow for your own `.htll` files:\n\n## x86-64 Example\n\n1.  **Compile Source to Assembly:**\n    ```bash\n    ./HTLL my_program.htll x86-64\n    ```\n2.  **Assemble to a Static Executable:**\n    ```bash\n    fasm my_program.s\n    ```\n3.  **Run:**\n    ```bash\n    ./my_program\n    ```\n\n---\n\n## ARM (AArch64) Example\n\n### HTLL source (`my_program.htll`)\n\n```bash\n./HTLL my_program.htll arm\n```\n\nThis generates:\n\n```\nmy_program.s\n```\n\n### Assemble (ARM)\n\n```bash\nas my_program.s -o my_program.o\n```\n\n### Link\n\n```bash\nld my_program.o -o my_program\n```\n\n### Run\n\n```bash\n./my_program\n```\n---\n\n## ORYX: Interpreted Assembly for HTLL\n\nORYX is an **assembly-like interpreted language** that HTLL can **compile your `.htll` code into**.\n\n### Workflow\n\n1. **Compile HTLL to ORYX assembly** (`.oryxir`):\n\n```bash\n./HTLL my_program.htll oryx\n```\n\n2. **Compile the ORYX runtime** (`oryxir.cpp`):\n\n```bash\ng++ oryxir.cpp -o oryxir\n```\n\n3. **Run the ORYX file**:\n\n```bash\n./oryxir my_program.oryxir\n```\n\n4. **Debug using the browser**:\n\n* Open `index.html`\n* Load your `.oryxir` file\n* Step forward/backward, inspect and modify registers or memory\n\n\u003e ORYX is **interpreted**, not a binary. `oryxir` executes it, and `index.html` is the debugger.\n\n---\n\n## HT-Kernel: Ring 0 Execution for HTLL\n\nHT-Kernel is a **minimal x86-64 kernel written in FASM assembly** that allows **HTLL-generated code to run directly in ring 0**.\n\nIt is designed for **bare-metal experimentation**, giving HTLL programs direct access to hardware without an operating system.\n\n### Overview\n\n* **Architecture:** x86-64 only  \n* **Privilege Level:** Ring 0  \n* **Language:** FASM assembly  \n* **Purpose:** Execute HTLL-generated kernel-safe assembly  \n* **OS:** None (bare metal) x86-64 ONLY\n\nHT-Kernel is intentionally simple and experimental.\n\n### HTLL → HT-Kernel Workflow\n\n1. **Compile HTLL to kernel assembly**:\n```bash\n./HTLL ring0_test.htll x86-64-ring0\n````\n\n2. **Use the generated assembly output**:\n\n* Copy the contents of the generated `.s` file\n* Paste it into the HT-Kernel folder in main_draw.s and then run `./build.sh`\n\n3. **Build the kernel**:\n\n* Assemble the kernel using FASM\n* Boot it (QEMU or real hardware)\n\n### Example Programs\n\nHTLL programs such as `ring0_test.htll` demonstrate:\n\n* Direct screen drawing\n* 80×50 text-mode graphics\n* Simple game and visual demos\n* A clock in UTC+2\n\nHTLL programs such as `random_ring0.htll` demonstrate:\n\n* Direct screen drawing\n* 80×50 text-mode graphics\n* Random number generator in ring 0\n* Terminal allows you to set the minimum and maximum random number\n\n### Repository\n\nHT-Kernel is hosted here:\n\n[https://github.com/TheMaster1127/HT-Kernel](https://github.com/TheMaster1127/HT-Kernel)\n\n\u003e HT-Kernel is experimental. No memory protection, no safety guarantees.\n\n---\n\n## License\n\nThis project is licensed under the [GNU General Public License v3.0 (GPLv3)](https://www.gnu.org/licenses/gpl-3.0.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemaster1127%2Fhtll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthemaster1127%2Fhtll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemaster1127%2Fhtll/lists"}