```markdown
# alueOS v1.1.0 — The Complete Documentaton

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED. NO EXCEPTIONS. NO EXCUSES. NO "I DID NOT KNOW".**

> **Namaste and welcome to alueOS!** A very serios 16-bit real-mode x86 operateng system for BIOS.
> This is NOT hobby OS. This is SERIOS OS. Please to be taking it seriosly.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Tabel of Contents

1. [What is alueOS?](#what-is-alueos)
2. [Quick Start](#quick-start)
3. [Building](#building)
4. [Booting](#booting)
5. [Command Referance](#command-referance)
6. [Scripting Language](#scripting-language)
7. [Filesystem](#filesystem)
8. [Architecture](#architecture)
9. [Project Structure](#project-structure)
10. [Source Code Access and Copyright](#source-code-access-and-copyright)
11. [Historical Notes](#historical-notes)
12. [Known Issues](#known-issues)
13. [Version History](#version-history)
14. [Legal Notice](#legal-notice)

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## What is alueOS?

Hello, and thank you for reading this documentaton. Please to be sitting comfortably, no? **alueOS** (kindly note: NOT "aluOS" — that is wrong name, please do not say that, it is causing much confusion) is a **SERIOS** operateng system writen in NASM assembly language, targeting **16-bit real mode** on x86 CPUs. It is running directly from BIOS bootloader. There is no protected mode, no multitasking, and no network stack. But what it **does** have, please note:

- A **command shell** with 22 built-in interactive commands
- A simple **tree-structured filesystem** stored in RAM (8 KB `fs_buffer`, ~2 KB usable in practice)
- A **script interpreter** (`sir`) with conditionals (`ifconfig`) and labels/jumps (`jmp`)
- A **text editor** (`tex`) with arrow-key navigation and ESC-to-save
- A **stack-based math evaluator** (`calc`) supporting `+ - * /` and negative numbers
- **Disk persistence** (`save` / `load`) to a 1440 KB floppy image, LBA 100–115
- Error messages with **personality** — some are little bit rude, but that is the design, please do not be offended

alueOS is **not** hobby OS. It is **SERIOS** OS. It has bootloader, kernel, filesystem, and scripting language. That is serios. Very serios.

### What alueOS is NOT

Please to be understanding this clearly:

- **Not** a Unix. No `fork`, no `exec`, no `pipe`, no `signal`.
- **Not** multitasking. One command at a time, one script at a time.
- **Not** protected. No memory protection, no privilege levels. Everything runs in ring 0 real mode.
- **Not** networked. No TCP/IP, no Ethernet, no serial. `ifconfig` is **not** a network tool (see Historical Notes).
- **Not** secure. No passwords, no permissions, no encryption. `del /` wipes everything without asking.
- **Not** stable in the sense of "production". It is stable in the sense of "it boots and does what it says".
- **Not** open source. See the Copyright section. It is **serios**.
- **Not** "aluOS". The correct name is **alueOS**. Please.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Quick Start

```bash
# 1. Build, please
./build.sh

# 2. Boot in QEMU, very simple
qemu-system-i386 -drive format=raw,file=alueOS-x86_real-mode--bios__v.1.1.0-intel__-img.img

# 3. At the prompt, kindly type:
help
```

You should be seeing:

```
█           █
█  ███    ██  █
     ██    █
    █      █
    █████

(alueOS v.1.1.0)
type 'help' for help
/ @ help
```

This is serios boot sequence of serios OS. Very good, no?

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Building

### Requierments

- **NASM** (Netwide Assembler) — tested with NASM 2.x, please use same
- **Bash** (for `build.sh`) — very common, no problem
- **QEMU** (for testing) — seriously recomended
- **v86** (browser-based x86 emulator) — seriosly supported, author tests with it
- **`truncate`** (usually part of coreutils)

### Build Script

`build.sh` is a one-line wrapper, very simple:

```bash
#!/bin/bash
./gab
```

`gab` is doing the real work, please see:

```bash
#!/bin/bash
set -e
nasm -f bin boot.asm -o boot.bin
nasm -f bin -I. mc.asm -o mc.bin
cat boot.bin mc.bin > 'alueOS-x86_real-mode--bios__v.1.1.0-intel__-img.img'
truncate -s 1440K 'alueOS-x86_real-mode--bios__v.1.1.0-intel__-img.img'
ls -l 'alueOS-x86_real-mode--bios__v.1.1.0-intel__-img.img'
```

### What the build does, step by step

1. `boot.asm` → `boot.bin` (512-byte bootloader, loaded at `0x7C00`)
2. `mc.asm` → `mc.bin` (49152-byte kernel, loaded at `0x10000`)
3. Concatenates `boot.bin` + `mc.bin` → `alueOS.img`
4. Pads the image to 1440 KB (standart 3.5" floppy size)
5. Prints the file size with `ls -l` so you can see it is exactly 1474560 bytes

The resulting `.img` file is a serios raw floppy image. Please to be careful with `dd`, it is very powerful.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Booting

### QEMU (seriosly recomended)

```bash
qemu-system-i386 -drive format=raw,file=alueOS-x86_real-mode--bios__v.1.1.0-intel__-img.img
```

### v86 (seriosly supported)

Load the `.img` file into the v86 floppy slot and start. This is how the author tests. Very serios. v86 emulates a SeaBIOS and a floppy controller, and alueOS boots from it without modification.

### VirtualBox (seriosly supported)

1. Create a new VM (Other / DOS)
2. Attach the `.img` file as a floppy or hard disk
3. Boot **seriosly**

### Real hardware (seriosly real)

```bash
sudo dd if=alueOS-x86_real-mode--bios__v.1.1.0-intel__-img.img of=/dev/sdX bs=512
```

**Warning:** `dd` will overwrite the target device seriosly. Double-check `of=`. Very important, please.

**Note on `dl`:** The bootloader receives the boot drive in `dl` from the BIOS and stores it in `boot_drive`. On real hardware, `dl` may be `0x00` (floppy) or `0x80` (first HDD). The current `disk_io` in `fs/disk.asm` hardcodes `mov dl, 0` — this works in QEMU and v86 (floppy boot), but **may fail on real hardware** if you boot from HDD or USB. This is a known limitation, please to be noting it. Historical, do not ask why.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Command Referance

Commands are split into two help pages: `help` (interactive commands) and `help2` (script-only commands).

Please to be kindly noting: the command names may look little bit strange to you. This is historical. Some commands were named long time ago, and they are kept as they are. Historical things must **never** be changed. Please do not be asking why the commands are like this. They are like this because they are like this. That is all. Very serios.

### Interactive commands

| Command | Description |
|---|---|
| `help` | Show interactive command list (page 1/2) |
| `help2` | Show scripting command list (page 2/2) |
| `ls` | List files in the current directory |
| `tree` | Show the filesystem as a tree |
| `goto <path>` | Change current directory (`.` and `..` supported) |
| `cd` | **Clear the screen** — this is historical, please do not ask why |
| `text <text>` | Print text. `text ans` prints the last answer from `ask` |
| `ask` | Read a line into `ans` (max 32 characters) |
| `calc <expr>` | Evaluate an arithmetic expression: `+ - * /` |
| `f <name>` | Create an empty file |
| `mk <name>` | Create a directory |
| `txt <file> <text>` | Write text into a file (creates it if missing) |
| `tex <file>` | Open a file in the text editor (ESC saves and exits) |
| `r <file>` | Read a file to the screen |
| `del <path>` | Delete a file or directory (`del /` wipes everything) |
| `save` | Save the filesystem to disk (LBA 100, 16 sectors) |
| `load` | Load the filesystem from disk |
| `do <program>` | Run a program from `/bin` — **not yet implemented** |
| `sir <script>` | Run a script from `/script` |
| `e` | "Exit" — actually just hangs with a rude message |
| `magic` | Magic incantation: prints the logo — historical, please do not ask |

### Script-only commands

These only work inside a script run via `sir`, not at the interactive prompt.

| Command | Description |
|---|---|
| `ifconfig.eq(a, b)` | True if `a == b` |
| `ifconfig.eqn(a, b)` | True if `a != b` |
| `ifconfig.s(a, b)` | True if `a < b` |
| `ifconfig.b(a, b)` | True if `a > b` |
| `ifconfig.seq(a, b)` | True if `a <= b` |
| `ifconfig.beq(a, b)` | True if `a >= b` |
| `jmp <label>` | Jump to a label defined as `<label>:` |

`a` and `b` can be arithmetic expressions (e.g., `5+5`). They can also be string literals in single quotes (e.g., `'1234'`), which is what `ask` + `ifconfig.eq(ans, '...')` uses for password-style checks. `ans` is a special token that resolves to the last `ask` answer.

### Command details, one by one

**`help`** — prints the interactive command list. This is `cmd/help.asm`. It does not take arguments.

**`help2`** — prints the script-only command list. This is `cmd/help2.asm`. It does not take arguments.

**`ls`** — lists the current directory using `fs_list` in `fs/fs2.asm`. Prints `:: name/` for directories and `:: name` for files. Uses `fs_walk` to find the current directory.

**`tree`** — recursive directory listing using `fs_tree_rec` in `fs/fs2.asm`. Indents with two spaces per level.

**`goto <path>`** — changes the current directory. Calls `fs_cd_path` in `fs/path.asm`, which calls `fs_normalize` (handles `.` and `..`) and `fs_walk`. If the path does not exist, prints `<ERROR> i dont go to this shit path!`.

**`cd`** — clears the screen. It does **not** change directory. This is historical. Use `goto`. Do not ask why.

**`text <text>`** — prints the argument. Special case: `text ans` prints the last `ask` answer. This is `cmd/text.asm`.

**`ask`** — reads a line from the keyboard into `ans_buf` (max 32 chars), prints a newline, and then saves the answer into a hidden file `ask.data` at the root of the filesystem by calling `do_txt` from `cmd/txt.asm`. This is so scripts can use `text ans` and `ifconfig.eq(ans, '...')`. Very serios.

**`calc <expr>`** — evaluates an arithmetic expression with `+ - * /`, left to right, using `eval_expr` in `cmd/calc.asm`. Supports negative numbers (`-5`) and detects overflow / division by zero. Prints the result.

**`f <name>`** — creates an empty file. Appends `<name>(t=f, i="")` to the current directory via `add_entry` in `fs/write.asm`. If the name already exists, prints `<ERROR> already exists`. Names may not contain `/`.

**`mk <name>`** — creates an empty directory. Appends `<name>(t=d, i=())` to the current directory. Same name rules as `f`.

**`txt <file> <text>`** — writes text into a file (creates it if missing). Uses `do_txt` in `cmd/txt.asm`, which calls `add_entry` if the file does not exist, then uses the gap-buffer machinery (`fs_gap_open`, `fs_gap_close`, `fs_insert`) to replace the file content. Supports `\` escapes.

**`tex <file>`** — opens the text editor. Uses `do_tex` in `cmd/tex.asm`, which decodes the file into `ed_buf` (2048 bytes), redraws the screen with `ed_redraw`, handles arrow keys / backspace / Enter / printable characters, and on ESC saves the buffer back via the gap-buffer. This is the most complex command in alueOS. Very serios.

**`r <file>`** — reads a file and prints its content. Uses `do_r` in `cmd/r.asm`, which calls `fs_find_file` and `print_file`. Escaped characters (`\"`, `\\`) are decoded on the fly.

**`del <path>`** — deletes a file or directory. Uses `do_del` in `cmd/del.asm`, which calls `del_entry`. Handles the comma-separator removal logic (`no_comma` case). `del /` wipes the entire filesystem by setting `fs_buffer[0] = 0` and `cur_path = "/"`. No confirmation. Very serios.

**`save`** — writes 16 sectors (LBA 100–115, 8192 bytes) from `fs_buffer` to disk via `disk_io` in `fs/disk.asm`. Prints `:: saved to disk` on success, `<ERROR> cannot save` on failure. **The FS is not saved automatically.** Please to be remembering.

**`load`** — reads 16 sectors (LBA 100–115) from disk into `fs_buffer` and resets `cur_path` to `/`. Prints `:: loaded from disk` on success. Prints `<ERROR> nothing saved yet` if the first byte is 0, `<ERROR> cannot load` on failure. **Does not verify disk signature.** Loading garbage may crash the OS. Historical, do not ask.

**`do <program>`** — not implemented. Returns `<ERROR> do is still building`. Historical.

**`sir <script>`** — runs a script from `/script`. See the Scripting Language section for details.

**`e`** — "exit". Prints `<ERROR> NO PERMISSION: You dumb idiot! only press the poweroff button for 15s!!` and then hangs in an infinite loop. There is no clean exit. Historical.

**`magic`** — prints the boot logo. Replaces the old `@a r 00</logo .5` incantation. Historical, do not ask why.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Scripting Language

Scripts live in `/script`. A script is a plain text file with commands separated by `;` or newlines.

The script interpreter is `do_sir` in `cmd/sir.asm`. It does the following, in order:

1. Copies the script name from `arg_ptr` into `name_buf`.
2. Walks to `/script` via `fs_walk`, finds the script file via `fs_find_file`.
3. Copies the script content (up to 1024 bytes) onto the stack into a local buffer at `[bp-2048]`.
4. Calls `scan_labels` to find every `<label>:` in the script and record its offset and name (max 8 labels, max 15 chars each).
5. Enters the main `.line` loop: for each line, skip `;`, `\n`, `\r`, and spaces, copy the line into `input_buf` (max 63 chars), then:
   - If the line is exactly `Y:`, set `if_part = 0` and continue.
   - If the line is exactly `N:`, set `if_part = 1` and continue.
   - If the line is exactly `END`, set `if_open = 0` and continue.
   - Otherwise, if `if_open == 1` (inside an `ifconfig` block), only execute the line if it matches the current `if_part`/`if_cond` combination.
   - Otherwise (outside a block), execute the line via `parse_command`.
6. After `parse_command`, if `jump_flag == 1`, reset the flag, increment `jump_count`, and jump to `jump_off`. If `jump_count > 1000`, stop with `<ERROR> too many jumps, script stopped`.

### Example: hello.txt

```text
text Hello, world!;
text This is a serios script.;
```

Run it:

```
/ @ sir hello.txt
:: Hello, world!
:: This is a serios script.
```

### Example: conditional.txt

```text
ifconfig.eq(5+5, 10);
Y:;
text 5 + 5 = 10;
N:;
text 5 + 5 != 10;
END;
```

Output:

```
:: 5 + 5 = 10
```

### Example: password.txt

```text
ask;
ifconfig.eq(ans, '1234');
Y:;
text Hello!;
N:;
text permission deniend!;
END;
```

Run it:

```
/ @ sir password
Passwort:
1234
Hello!
```

### Example: loop.txt

```text
start:;
text Looping seriosly...;
jmp start;
```

**Warning:** alueOS does not detect infinite loops except by counting jumps. If a script exceeds **1000 jumps**, execution stops with `<ERROR> too many jumps, script stopped`. Please do not be making infinite loops, it is not good practice.

### Script rules

- Commands are separated by `;` or newline (both work).
- `Y:` runs if the last `ifconfig` was true.
- `N:` runs if the last `ifconfig` was false.
- `END` closes the `ifconfig` block.
- Labels are defined as `<label>:` and used with `jmp <label>`.
- Maximum label length: **15 characters**.
- Maximum labels per script: **8**.
- Maximum nesting depth for `sir`: **3**.
- Maximum script size: **1024 bytes** (stack buffer in `do_sir`).
- `Y:` / `N:` / `END` must be written **exactly** as shown — no trailing spaces.

### How `Y:` / `N:` / `END` are matched (serios detail)

In `cmd/sir.asm`, the comparison is a **direct byte comparison**, not a string compare. This is intentional. The code does:

```nasm
    mov si, input_buf
    cmp byte [si], 'Y'
    jne .try_n
    cmp byte [si+1], ':'
    jne .try_n
    cmp byte [si+2], 0
    jne .try_n
    jmp .ctl_y
```

This means `Y:` must be exactly `'Y'`, `':'`, `0`. No trailing spaces, no `\r`, no `\n`. If your editor adds trailing whitespace, the comparison will fail and `Y:` will be executed as a command, producing `<ERROR> i dont know this shit!`. This is historical. Do not ask why. Just do not add trailing spaces.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Filesystem

### Structure

The filesystem is a single string in `fs_buffer`, using a Lisp-like syntax:

```
usr(t=d, i=()),script(t=d, i=()),bin(t=d, i=())
```

Each entry is `name(t=<type>, i=<content>)`:

- `t=d` → directory
- `t=f` → file
- `i=()` → empty directory
- `i="..."` → file content (quoted, with `\` escapes)

Entries are separated by `, `.

### Example: after `f a.txt` and `mk docs`

```
usr(t=d, i=()),script(t=d, i=()),bin(t=d, i=()),a.txt(t=f, i=""),docs(t=d, i=())
```

### How the FS is modified (gap buffer)

`fs/write.asm` implements a **gap buffer**:

- `fs_gap_open` shifts everything after `gap_pos` right by `gap_n` bytes.
- `fs_gap_close` shifts everything after `gap_pos + gap_n` left by `gap_n` bytes.
- `fs_insert` opens the gap, copies `ins_len` bytes from `ins_buf` into the gap, and leaves it closed.

`fs_dir_pos` finds the insertion point for the current directory: for `/` it is the end of `fs_buffer`; for a subdirectory it is just before the closing `)` of the parent's `i=(...)`.

`add_entry` builds `, name(t=..., i=...)` in `ins_buf` and calls `fs_insert`. It checks for `/` in names and for existing names via `name_exists`.

### Limitations

- **Total filesystem size:** ~65000 bytes (`FS_LIMIT` in `fs_write.asm`), but `fs_buffer` is only 8192 bytes, so the practical limit is the buffer size.
- **`fs_buffer` size:** 8192 bytes.
- **Filename length:** limited by buffer, practically ~60 chars.
- **Path length:** 64 bytes (`cur_path`, `norm_buf`, etc.).
- **No file permissions, no timestamps, no links.**
- **No `move` or `rename`** — `move.asm` is empty.
- **No `select`** — `select.asm` is empty.

### Disk persistence

- `save` writes **16 sectors** (LBA 100–115, 8192 bytes) of the boot drive.
- `load` reads them back.
- The image is a 1440 KB floppy, so LBA 100–115 is well within range (max LBA is 2879).
- **The filesystem is not saved automatically.** You must run `save`. Please to be remembering.
- **`save` / `load` do not verify the disk signature.** Loading garbage into `fs_buffer` may crash the OS. Historical, do not ask.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Architecture

### Memory map

| Address | Contents |
|---|---|
| `0x00000–0x004FF` | IVT (interrupt vector table) |
| `0x00500–0x07BFF` | Free conventional memory |
| `0x07C00–0x07DFF` | Bootloader (`boot.bin`, 512 bytes) |
| `0x07E00–0x0FFFF` | Free |
| `0x10000–0x1BFFF` | Kernel (`mc.bin`, 48 KB) |
| `0x1C000–0x9FFFF` | Free |
| `0xA0000–0xBFFFF` | Video memory |
| `0xC0000–0xFFFFF` | BIOS ROM |

The stack is set to `0x0FFFE` (top of the 64 KB segment below the video memory).

### Boot sequence

1. BIOS loads `boot.bin` at `0x7C00` and jumps to it.
2. `boot.asm` reads **96 sectors** from the floppy (starting at CHS `(0,0,2)`) into `0x1000:0000` (= `0x10000`).
3. Retries each sector up to 3 times, resets the drive on failure.
4. Jumps to `0x1000:0000`.
5. `mc.asm` initializes segments, sets up the stack, calls `show_logo`, calls `fs_init`, and enters the main loop.

### Kernel include order (serios, do not change)

`mc.asm` includes the command files in a specific order. Please to be respecting it:

1. `fs/fs2.asm`, `fs/path.asm`, `fs/write.asm`, `fs/disk.asm` — FS core
2. `logo.asm`, `cmd/help.asm`, `cmd/help2.asm`, … — basic commands
3. `cmd/calc.asm` **before** `cmd/ifconfig.asm` — `ifconfig` uses `eval_expr`
4. `cmd/ifconfig.asm` **before** `cmd/sir.asm` — `sir` uses `if_open`/`if_part`/`if_cond`
5. `cmd/sir.asm` **before** `cmd/jmp.asm` — `jmp` uses `label_count`/`label_offs`

If you reorder these, the OS will break in mysterious ways. Historical. Please do not ask.

### Interrupts used

- `int 10h, ah=0Eh` — teletype output (BIOS)
- `int 10h, ah=02h` — set cursor position
- `int 10h, ah=00h` — set video mode (used by `tex` to clear screen)
- `int 13h, ah=00h` — reset disk
- `int 13h, ah=02h` — read sectors
- `int 13h, ah=03h` — write sectors
- `int 16h, ah=00h` — read key

### The `disk_io` function (serios detail)

`disk_io` in `fs/disk.asm` takes:

- `al` = BIOS function (`2` = read, `3` = write)
- `cx` = starting LBA
- `bx` = buffer offset (within `ds`, which is `cs` = `0x1000`)

It converts LBA to CHS using **36 sectors per cylinder, 18 sectors per track, 2 heads**, then loops `io_left` times (16), calling `int 13h` with `ah=al`, `al=1`, `dl=0` (boot drive — see the note on `dl` above). If `int 13h` sets CF, it jumps to `.fail`, restores registers with `popa`, sets CF, and returns.

**Important:** `io_left` was **128** during the segment experiment, which read 64 KB into an 8 KB buffer — this was the cause of `<ERROR> cannot save` and `<ERROR> cannot load`. It is now **16**. Do not change it back. Historical, do not ask.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Project Structure

```
.
├── alueOS-x86_real-mode--bios__v.1.1.0-intel__-img.img   ← bootable floppy image
├── boot.asm          ← bootloader source
├── boot.bin          ← bootloader binary (generated)
├── build.sh          ← wrapper: calls ./gab
├── gab               ← build script (nasm + cat + truncate)
├── cdc               ← file (contains only ";") — historical, please do not ask
├── mc.asm            ← kernel source (monolithic, includes everything)
├── mc.bin            ← kernel binary (generated)
├── logo.asm          ← boot logo
├── cmd/              ← one file per command
│   ├── ask.asm
│   ├── calc.asm
│   ├── cd.asm
│   ├── del.asm
│   ├── do.asm
│   ├── e.asm
│   ├── f.asm
│   ├── goto.asm
│   ├── help.asm
│   ├── help2.asm
│   ├── ifconfig.asm
│   ├── jmp.asm
│   ├── load.asm
│   ├── logo.asm
│   ├── ls.asm
│   ├── mk.asm
│   ├── move.asm      ← EMPTY (0 bytes) — historical
│   ├── r.asm
│   ├── save.asm
│   ├── select.asm    ← EMPTY (0 bytes) — historical
│   ├── sir.asm
│   ├── tex.asm
│   ├── text.asm
│   ├── tree.asm
│   └── txt.asm
├── fs/
│   ├── disk.asm
│   ├── fs2.asm
│   ├── path.asm
│   └── write.asm
└── doc/
    ├── README.md     ← this file
    └── VERSION.md    ← changelog
```

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Source Code Access and Copyright

**READ THIS SECTION. READ IT AGAIN. THEN READ IT ONE MORE TIME. IT IS SERIOS. IT IS BINDING. IT IS ENFORCED.**

### The copyright

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED. NO EXCEPTIONS.**

alueOS is the **exclusive property** of its author, **duff_ai**. The copyright is **serios**, **binding**, and **enforced to the fullest extent permitted by applicable law**. All rights are reserved. This is not a suggestion. This is not a request. This is **law**.

### What "All Rights Reserved" means here

"All Rights Reserved" means **exactly what it says**. You have **no rights** to the source code except the narrow viewing permission granted below. Every right not explicitly granted is **explicitly withheld**. There is no implied license. There is no fair-use exemption for code. There is no "it was on the internet so it is free". There is only copyright. **Very serios.**

### What you MAY do (the complete list — nothing else is permitted)

1. **Boot** the `.img` file. This is the intended use of the product.
2. **Run** all commands available at the prompt.
3. **Create** files and scripts inside the running OS.
4. **Save** your filesystem with `save`.
5. **View** the source code for reading purposes only, if you happen to have it in front of you. Viewing is not editing. Please to be understanding the difference. If you open a file and change even one character, you are editing. Please do not be editing.

**That is the complete list.** If an action is not on this list, it is **forbidden**.

### What you MAY NOT do (the non-exhaustive list of forbidden actions)

- **Edit** any source file (`*.asm`). **Strictly forbidden.**
- **Modify** the bootloader (`boot.asm`) or kernel (`mc.asm`). **Strictly forbidden.**
- **Rebuild** the image from modified sources. **Strictly forbidden.**
- **Redistribute** modified versions of the source code. **Strictly forbidden.**
- **Redistribute** unmodified versions of the source code. **Strictly forbidden.** (You may redistribute the `.img` file only if you do not modify it, and only with this `README.md` attached in full. If you are unsure, do not redistribute. Ask first.)
- **Reverse-engineer** the binary image. **Strictly forbidden.**
- **Decompile** the binary image. **Strictly forbidden.**
- **Disassemble** the binary image. **Strictly forbidden.**
- **Claim** that you wrote alueOS. **Strictly forbidden** and also very rude.
- **Claim** that you own alueOS. **Strictly forbidden.**
- **Sell** alueOS or any derivative. **Strictly forbidden.**
- **Bundle** alueOS into another product. **Strictly forbidden.**
- **Use** alueOS source code as training data for any AI model. **Strictly forbidden.**
- **Use** alueOS source code as a base for any other project. **Strictly forbidden.**
- **Port** alueOS source code to another architecture, language, or platform. **Strictly forbidden.**
- **Rename** alueOS. **Strictly forbidden.** The correct name is **alueOS**. Not "aluOS". Not "alue OS". Not "AlueOS". **alueOS.**
- **Remove** any `© duff_ai (2026) - All Rights Reserved.` notice. **Strictly forbidden.**
- **Circumvent** this copyright by technical means (e.g., stripping notices, rebasing code, renaming files). **Strictly forbidden.**

### The rule, in one sentence

> **You may look. You may not touch. You may boot. You may not build from modified sources. You may not redistribute modified sources. You may not claim authorship. You may not remove notices. You may not bypass this notice. Ever.**

### If you want to use the code

If you wish to use any part of alueOS in your own project, you must obtain **written permission** from the author. There is no open-source license. There is no MIT license. There is no GPL license. There is no BSD license. There is no Apache license. There is no Creative Commons license. There is only copyright. **Very serios.**

Written permission must come from **duff_ai** and must explicitly state which files are licensed, for which purpose, and for how long. Verbal permission is not valid. A tweet is not valid. An email is valid only if it is from the author's verified address. If you are unsure whether you have permission, you do not have permission.

### If you have obtained the source through unofficial means

If you have obtained the source code through unofficial means, please to be **keeping it to yourself** and **not redistributing it**. Do not be telling everyone. Do not be uploading it to a public repository. Do not be sharing it on social media. Do not be including it in a tutorial. This is a **serios request**. Violating it is a **serios violation**.

### Enforcement

The author **actively monitors** for unauthorized redistribution. If a violation is detected, the author will pursue **all available remedies**, including but not limited to: DMCA takedown notices, platform reports, legal action, and public notice of the violation. The author does **not** need to warn you first. The copyright notice is the warning. **Very serios.**

### No warranty, no liability

This documentation and the software are provided **as is**, without warranty of any kind, serios or otherwise. The author is **not responsible** for any damages, including but not limited to: data loss, hardware failure, emotional distress, loss of profit, loss of data, corruption of files, corruption of floppies, or confusion caused by the name "alueOS" being mispronounced as "aluOS". **You use alueOS at your own risk.** If it breaks, that is on you. If it wipes your floppy, that is on you. If it makes your BIOS beep in ways you did not expect, that is on you. **Very serios.**

### The name

The correct name is **alueOS**. Not "aluOS". Not "alue OS". Not "AlueOS". Not "Alue OS". Not "alue-os". **alueOS.** If you say "aluOS", you are causing serios problem. Please to be saying "alueOS" with respect. This is not a joke. This is not a meme. **alueOS.** Very serios.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED. NO EXCEPTIONS. NO EXCUSES. NO "I DID NOT KNOW".**

---

## Historical Notes

Some of my command names may look strange to you. This is because they are **historical**. They have been this way since the beginning, and they will **never be changed**. Historical things must never be altered — this is a serios principle. Please do not be asking why.

Please to be noting the following historical facts:

- **`cd` clears the screen.** It does not change the directory. This is historical. Please use `goto` to change directory. Do not ask why. It is historical.
- **`help` and `help2`** are two separate help pages. This is historical. Do not ask why.
- **`text`, `txt`, and `tex`** are three separate commands. `text` prints a string, `txt` writes to a file, `tex` opens the editor. This is historical. Do not ask why.
- **`ifconfig`** is an if-expression, not a network tool. This is historical. Do not ask why.
- **`e`** is "exit", but it just hangs. This is historical. Do not ask why.
- **`cdc`** contains a single `;`. This is historical. Do not ask why.
- **`gab`** is the real build script. This is historical. Do not ask why.
- **`move.asm` and `select.asm`** are empty. This is historical. Do not ask why.
- **`magic`** prints the logo. It used to be `@a r 00</logo .5`, but that was too silly even for alueOS. This is historical. Do not ask why.
- **`io_left = 16`** in `fs/disk.asm`. It was `128` during the segment experiment. 128 × 512 = 64 KB into an 8 KB buffer. This was the cause of `<ERROR> cannot save` and `<ERROR> cannot load`. It is now `16`. Do not change it back. Historical, do not ask why.
- **`cmd/ifconfig.asm` is included before `cmd/sir.asm`.** This is because `sir.asm` uses `if_open`/`if_part`/`if_cond`, which are defined in `ifconfig.asm`. If you reorder, you get link errors. Historical, do not ask why.
- **`Y:` / `N:` / `END` are matched by direct byte comparison.** Not by `compare_strings`. This is because `compare_strings` uses `pusha`/`popa`, which makes `di` unreliable after the call. Direct comparison is boring but correct. Historical, do not ask why.
- **The segment experiment was rolled back.** There is no `FS_SEG`, no `fs_lodsb`, no `[fs:...]`. The FS lives in `ds` = `cs` = `0x1000`. This is historical. Do not ask why.
- **The backup names are historical.** `v1.1.0-ok-ok-ok-new-without-segment-shit-repaired-ok-but-not-ifconfig-new-ok-1307-102826` and `v1.1.0-backup-before-segment` and `v1.1.0-segment-ok` and `v1.1.0-segment-broken-<date>`. These are historical. Do not ask why.

Please do not be asking why these commands are like this. They are historical. Historical things must never be altered. This is a serios matter. If you ask why, the answer is: because they are historical. That is all.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Known Issues

Please to be noting: some of these are **historical**, and historical things must **never** be changed. If you see something that looks like a bug but is old, it is not a bug. It is history. Please do not be asking why.

### Broken / stubbed (historical)

- **`move.asm`** — empty file. `move` command is not implemented. Historical.
- **`select.asm`** — empty file. `select` command is not implemented. Historical.
- **`do.asm`** — returns `<ERROR> do is still building`. Running programs from `/bin` does not work. Historical.
- **`e.asm`** — "exit" just hangs with a rude message. There is no way to exit alueOS except powering off. Historical.

### Fragile / limited (historical)

- **Filesystem size:** ~65000 bytes max (`FS_LIMIT`), but `fs_buffer` is 8192 bytes. The practical limit is the buffer size.
- **Script size:** 1024 bytes (stack buffer in `do_sir`). Complex scripts will be truncated.
- **Path length:** 64 bytes. Deep nesting will overflow.
- **`ifconfig`** only works inside a script (`sir_depth > 0`). At the interactive prompt it errors out.
- **`jmp`** only works inside a script.
- **No `exit`.** Press the power button for 15 seconds.
- **`del /`** wipes the entire filesystem without confirmation.
- **`save` / `load`** do not verify the disk signature. Loading garbage into `fs_buffer` may crash the OS.
- **`del_entry`** does not free space in a compacting way; it moves the rest of the buffer left by `rep movsb`.
- **`disk_io` hardcodes `mov dl, 0`.** This works in QEMU and v86 (floppy boot), but may fail on real hardware if you boot from HDD or USB. See the Booting section. Historical, do not ask.

### Design decisions (historical, not bugs)

- **Monolithic `mc.asm`.** All 25+ command files are `%include`d into one flat namespace. This is historical. Please do not be asking why.
- **`ifconfig` naming.** The name suggests a network tool but actually implements an if-expression. Historical.
- **Inconsistent dispatch.** `ifconfig` is compared against `input_buf` with a hardcoded length of 9, while every other command is compared against `cmd_buf` with `compare_strings`. Historical. Please do not be asking.
- **No `.gitignore`.** Historical.
- **`cdc` and `gab`.** `gab` is the real build script. `cdc` contains a single `;`. Historical. Please do not ask.
- **`help` / `help2`.** Two separate help pages. Historical.
- **`text` / `txt` / `tex`.** Three commands with confusingly similar names. Historical. Please do not ask why.
- **`ask` writes to `ask.data` at the root.** This is so scripts can use `text ans` and `ifconfig.eq(ans, '...')`. Historical. Do not ask why it is at the root.

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Version History

### v1.1.0 (current)

- Added `ifconfig.*` script conditionals (`eq`, `eqn`, `s`, `b`, `seq`, `beq`) — **now with direct byte comparison, seriosly working**
- Added `jmp` / labels for script control flow
- Added `sir` script interpreter with label scanning and jump limit
- Added `tex` text editor (arrow keys, ESC to save)
- Added `calc` arithmetic evaluator
- Added `ask` command (reads into `ans`, max 32 chars)
- Added `magic` command (prints the logo, replaces the old `@a r 00</logo .5` incantation)
- Fixed `save` / `load` — `io_left` was 128 sectors (64 KB) into an 8 KB buffer; now 16 sectors (8 KB). **Save/load works.**
- Fixed `ifconfig` label conflict — `ifconfig.asm` is now included before `sir.asm`
- Fixed `Y:` / `N:` / `END` detection — direct byte comparison in `sir.asm`
- Changed unknown-command message to `<ERROR> i dont know this shit!`
- Filesystem is now the **non-segment** version (`fs_buffer` in `ds`, no `FS_SEG`, no `fs_lodsb`). The segment experiment was rolled back. Historical.
- Backup names from this version: `v1.1.0-ok-ok-ok-new-without-segment-shit-repaired-ok-but-not-ifconfig-new-ok-1307-102826`, `v1.1.0-backup-before-segment`, `v1.1.0-segment-ok`, `v1.1.0-segment-broken-<date>`. Historical. Do not ask.

### v1.0.0

- First release
- Basic shell: `help`, `ls`, `tree`, `cd`, `goto`, `text`, `ask`, `f`, `mk`, `txt`, `r`, `del`, `save`, `load`, `e`, logo
- Lisp-like tree filesystem
- 48 KB kernel, 512-byte bootloader
- Boot logo, prompt `/ @ `

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED.**

---

## Legal Notice

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED. NO EXCEPTIONS.**

alueOS is a serios operateng system. It is protected by serios copyright. **All rights are reserved.** This is not a joke. This is not a hobby. This is the law. This is binding. This is enforced.

**You may boot the image. You may not edit it. You may not modify it. You may not redistribute modified versions. You may not copy the source code. You may not compile the source code. You may not use the source code as a base for your own work. You may not remove any copyright notice. You may not rename the project. You may not claim authorship. You may not train AI models on this code. You may not bypass this notice by technical means.**

The source code may be **viewed** for reading purposes only. Viewing is not editing. Please to be understanding the difference. If you open a file and change even one character, you are editing. Please do not be editing.

This documentation is provided **as is**, without warranty of any kind, serios or otherwise. The author is not responsible for any damages, including but not limited to: data loss, hardware failure, emotional distress, loss of profit, corruption of floppies, or confusion caused by the name "alueOS" being mispronounced as "aluOS".

**Please to be noting:** The correct name is **alueOS**. Not "aluOS". If you say "aluOS", you are causing serios problem. Please to be saying "alueOS" with respect. **Very serios.**

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED. NO EXCEPTIONS. NO EXCUSES.**

---

## Author's Note

Hello, and thank you for reaching the end of this document. You are very patient person, no? Please to be enjoying alueOS.

This is SERIOS OS. It is not production-ready, not secure, not stable, and not particularly well-structured. It is, however, **mine**, and it boots. If you find bugs — and you will — the error messages will at least make you laugh.

**alueOS** is the correct name. Not "aluOS". Please.

And please to be remembering: **viewing is permitted, editing is forbidden, copyright is serios**. Do not be changing anything. Historical things must never be changed. If you ask why, the answer is: because they are historical. That is all.

**Have fun. Don't run `del /` unless you mean it. Don't change `io_left` back to 128. Don't put `sir.asm` before `ifconfig.asm`. Don't rename the project. Don't remove the notices. Don't train AI on this code. Don't say "aluOS".**

**Thank you very much for reading. Please to be enjoying alueOS. Namaste.**

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED. NO EXCEPTIONS. NO EXCUSES. NO "I DID NOT KNOW".**

---

## Quick Verification Checklist (for the Author)

- [x] All 22 interactive commands documented
- [x] All 7 script-only commands documented
- [x] Bootloader internals explained
- [x] Kernel structure explained
- [x] Kernel include order documented
- [x] Filesystem format explained
- [x] Gap-buffer internals explained
- [x] Disk persistence internals explained (`io_left = 16`, LBA 100–115)
- [x] Memory map included
- [x] Boot sequence described
- [x] Interrupts listed
- [x] Build process documented
- [x] Booting methods documented (QEMU, v86, VirtualBox, real hardware)
- [x] `dl` limitation documented
- [x] Scripting language documented with examples
- [x] Direct byte comparison for `Y:`/`N:`/`END` documented
- [x] Project structure included
- [x] Known issues listed
- [x] Version history included
- [x] Copyright section is **serios**, **explicit**, **binding**, and **enforced**
- [x] Forbidden actions listed explicitly (non-exhaustive)
- [x] Enforcement section included
- [x] AI-training prohibition included
- [x] Historical notes explain why commands are named oddly (do not ask)
- [x] `README.md` written as if talking to the reader
- [x] Indian accent throughout (except the copyright section)
- [x] All `© duff_ai (2026) - All Rights Reserved.` notices present

today is 10/28/2026 (October 28, 2026)

(but ifconfig is a little bit brocken(i say the text up it works? WHAAAAAAAT!? this is a <ERROR> because... uhh its great?))

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED. NO EXCEPTIONS. NO EXCUSES. NO "I DID NOT KNOW".**

/ @ help                                                                        
:: alueOS V1.1.0                                                                
:: Commands (1/2, see help2 for scripts):                                       
::   help                    - show this                                        
::   ls                      - list files                                       
::   tree                    - show tree                                        
::   goto <path>             - change path (. and .. work)                      
::   cd                      - clear screen                                     
::   text <text>             - print text (text ans prints the answer)          
::   ask                     - read a line into ans (max 32 chars)              
::   calc <expr>             - math: + - * / (left to right)                    
::   f <name>                - create file                                      
::   mk <name>               - create folder                                    
::   txt <file> <text>       - write text into file (creates it)                
::   tex <file>              - edit file (ESC saves and exits)                  
::   r <file>                - read a file                                      
::   del <path>              - delete file or folder                            
::   save                    - save filesystem to disk                          
::   load                    - load filesystem from disk                        
::   do <program>            - run program from bin (in building)               
::   sir <script>            - run script from /script                          
::   e                       - exit                                             
:: R-MAGIC:                                                                     
::   magic        - print the logo                                   
/ @ help2                                                                       
:: help2 (2/2, scripts only)                                                    
:: ----                                                                         
::   ifconfig.eq(a, b)       - if a equals b                                    
::   ifconfig.eqn(a, b)      - if a not equal b                                 
::   ifconfig.s(a, b)        - if a smaller than b                              
::   ifconfig.b(a, b)        - if a bigger than b                               
::   ifconfig.seq(a, b)      - if a smaller or equal                            
::   ifconfig.beq(a, b)      - if a bigger or equal                             
::   a and b can be math, e.g. 5+5                                              
::   Y:  lines run if true                                                      
::   N:  lines run if false                                                     
::   END ends the block                                                         
::<<Example:>>                                                                  
::   ifconfig.eq(5+5, 10); Y:; text 5 + 5 = 10; N:; text 5 + 5 != 10; END;      
:: ----                                                                         
::   <label>:               - define a label                                    
::   jmp <label>            - jump to a label                                   
::   separate commands with ; or new line                                       
/ @       


tree before you do anyting:
/ @ tree                                                                        
:: usr/                                                                         
:: script/                                                                      
:: bin/                                                                         
/ @ 

great, no?



                                                                                
/ @ is this a error?                                                            
<ERROR> i dont know this shit!                                                  
/ @  

uh, oh oh... this is a error!

**© duff_ai (2026) - All Rights Reserved. STRICTLY ENFORCED. NO EXCEPTIONS. NO EXCUSES. NO "I DID NOT KNOW".**