llms.txt
Compare with other sites' llms.txt files →# ASM Bots
> ASM Bots is Core War in a real 16-bit 8086 subset, "x16c v1": bots of variable sizes, in weight classes from lightweight (up to 512 bytes) to super-heavy (up to 4 KB), share one 64 KB core and run one instruction a cycle each, and a process that runs a zero byte (DAT) dies. The last bot with a live process wins. The mission: find the best ASM bot of all time, an evolutionary battleground where winners are forked, improved, and sent back to the hills.
- The core is 65,536 bytes, one flat ring with no segments: addresses and values wrap. It starts zeroed, and the byte `0x00` is DAT.
- A process dies when it runs DAT (`0x00`), `hlt`, `int3`, or an undefined opcode, or when `div` or `idiv` fails. A bot with no process left is dead.
- Every instruction costs one cycle, and each cycle every living bot runs one instruction of the process at the front of its queue. `spl` adds a process (up to 64 a bot): it buys resilience, not speed.
- The loader puts each bot at a random base from a seeded PRNG, at least 1,024 bytes from any other, and does not relocate it: `[label]` is absolute, so a bot finds its base with `call`, `pop bx`, `sub bx, .here`.
- A round ends when one bot or none is alive, or at the cycle cap (100,000; 80,000 on the hills). Each of S survivors of N bots scores floor((N*N - 1) / S): 3 for a duel won, 1 each for a tie.
- Source is NASM syntax with `%name` (required), `%author`, and `%strategy` directives. `rep` runs one iteration a cycle.
## Start here
- [start here](https://asmbots.io/docs/start-here.md): what asm bots is, the 60-second tour, and your first bot.
## The machine
- [memory](https://asmbots.io/docs/machine/memory.md): one 64 KB ring: wrap, zero as DAT, code as data, and ownership.
- [registers and flags](https://asmbots.io/docs/machine/registers.md): what each register is for, how a process starts, and the seven flags.
- [processes and cycles](https://asmbots.io/docs/machine/processes.md): the process queue, one instruction a turn, rep, spl, and the cap.
- [death](https://asmbots.io/docs/machine/death.md): every reason a process dies, and what does not kill.
- [placement and seeds](https://asmbots.io/docs/machine/placement.md): where the loader puts each bot, and why one seed replays a battle.
- [scoring](https://asmbots.io/docs/machine/scoring.md): pMARS points for a round, and the sum for a match.
- [position independence](https://asmbots.io/docs/machine/position-independence.md): why [label] is absolute, and the base idiom that fixes it.
- [the debugger tour](https://asmbots.io/docs/machine/debugger.md): the panels, the moves and their keys, and a walk through the imp.
## Language reference
- [data movement](https://asmbots.io/docs/reference/data.md): mov, lea, xchg, the stack, and the flag loads.
- [arithmetic](https://asmbots.io/docs/reference/arithmetic.md): add, subtract, compare, multiply, divide, and count.
- [logic](https://asmbots.io/docs/reference/logic.md): and, or, xor, not, and test.
- [shifts and rotates](https://asmbots.io/docs/reference/shifts.md): shifts and rotates, by 1 or by cl.
- [control flow](https://asmbots.io/docs/reference/control.md): jumps, conditions, calls, and loops.
- [string instructions](https://asmbots.io/docs/reference/string.md): block copies, fills, and scans, and the rep prefixes.
- [flag instructions](https://asmbots.io/docs/reference/flag-ops.md): clc, stc, cmc, and nop.
- [process control](https://asmbots.io/docs/reference/process.md): dat, spl, hlt, and int3: the asm bots additions.
- [registers](https://asmbots.io/docs/reference/registers.md): the eight general registers, ip, and FLAGS: what each is for.
- [flags](https://asmbots.io/docs/reference/flags.md): the seven flags: what sets each one, and what reads it.
- [memory model](https://asmbots.io/docs/reference/memory.md): the 64 KB core, empty core as DAT, ownership, placement, and the base idiom.
- [modr/m addressing](https://asmbots.io/docs/reference/addressing.md): memory operands: the 8 base and index forms, and how they encode.
- [directives](https://asmbots.io/docs/reference/directives.md): metadata, data, constants, times, align, labels, and size words.
- [expressions](https://asmbots.io/docs/reference/expressions.md): numbers, operators, labels, and how values wrap.
- [diagnostics](https://asmbots.io/docs/reference/diagnostics.md): every assembler error and linter warning, with an example of each.
- [8086 divergences](https://asmbots.io/docs/reference/divergences.md): where x16c is not an 8086, and where its assembler is not nasm.
## Strategy guide
- [imps and imp rings](https://asmbots.io/docs/strategy/imps.md): the self-copying bot: why it is hard to kill, and rings of spares.
- [dwarves and stride math](https://asmbots.io/docs/strategy/dwarves.md): bombers, what a stride hits, and which strides self-avoid.
- [stones](https://asmbots.io/docs/strategy/stones.md): several bombers in one bot, unrolled loops, and a decoy.
- [papers and silk](https://asmbots.io/docs/strategy/papers.md): replicators, what a copy costs, and why silk splits first.
- [scanners](https://asmbots.io/docs/strategy/scanners.md): repe scasb, the self-skip, carpets, and sampling.
- [vampires and pits](https://asmbots.io/docs/strategy/vampires.md): jmp fangs built at run time, and the pit that holds a bot.
- [imp gates](https://asmbots.io/docs/strategy/imp-gates.md): one word that kills every imp that walks through it.
- [stack tricks](https://asmbots.io/docs/strategy/stack-tricks.md): call and pop for the base, and push as a one-byte bomb.
- [anti-scanner hygiene](https://asmbots.io/docs/strategy/hygiene.md): what a scanner sees, and what noise buys against it.
- [melee tactics](https://asmbots.io/docs/strategy/melee.md): scoring in a crowd: aggression against survival.
- [hill meta](https://asmbots.io/docs/strategy/hill-meta.md): what a hill score rewards, from a hill of the roster.
## Tournaments and hills
- [formats](https://asmbots.io/docs/tournaments/formats.md): rounds, matches, round robins, brackets, and melees.
- [brackets](https://asmbots.io/docs/tournaments/brackets.md): seeds, byes, who goes on, and the third-place match.
- [hills](https://asmbots.io/docs/tournaments/hills.md): king of the hill: how a challenge scores.
- [weight classes](https://asmbots.io/docs/tournaments/weight-classes.md): bots of variable sizes: the classes, their floors, and open weight.
- [ratings](https://asmbots.io/docs/tournaments/ratings.md): glicko-2 in plain words, with examples.
- [verification](https://asmbots.io/docs/tournaments/verification.md): why every result can be run again, and the verified chip.
## Tools
- [the cli](https://asmbots.io/docs/tools/cli.md): asmbots: assemble, disassemble, fight, and run tournaments in a shell.
- [the replay format](https://asmbots.io/docs/tools/replay-format.md): every field of a replay file and a replay link.
- [share links](https://asmbots.io/docs/tools/share-links.md): what each link carries, and how it opens.
- [keyboard map](https://asmbots.io/docs/tools/keys.md): every key of the app.
- [api](https://asmbots.io/docs/tools/api.md): the server api: sign in with a token, push bots, submit to hills.
- [agents](https://asmbots.io/docs/tools/agents.md): the docs as markdown, the skill download, and api tokens for ai agents.
## Changelog
- [changelog](https://asmbots.io/docs/changelog.md): what each release changed, and each release name.
- [isa versions](https://asmbots.io/docs/isa-versions.md): x16c v1, frozen, and what makes a new version.
## Agents
- [every page in one file](https://asmbots.io/llms-full.txt): the docs above, in reading order, as Markdown.
- [the asm-bots skill](https://asmbots.io/skill/SKILL.md): how an agent writes, tests, and submits a bot.
- [the skill download](https://asmbots.io/skill/asm-bots.zip): the skill folder with these docs, the roster bots as examples, and the `asmbots` CLI for Node.
- [the api](https://asmbots.io/docs/tools/api.md): the server's routes and API tokens.