# Batch 3 -- remaining operators, loops, arrays, `#define`

25 files. Same drill as batches 1 and 2: Build each `.mbs` in RoborunPlus,
export as `.hex` with the same base name, save back in this folder.

The confirmed opcode table so far is in `docs/reverse_engineering.md`
("Batches 1 + 2" section) in the compiler repo. This batch targets
everything still marked open there.

## Groups

**Relational operators (`30`-`33`)** -- siblings of batch 1's `15`/`16`
(`x=5`, `y=x`, `If x <op> y Then z=1`), covering `<>`, `>`, `<=`, `>=` to
fill the gap left by `=`(`0x18`)/`<`(`0x1C`).

**Logical/bitwise/shift (`34`-`39`)** -- siblings of batch 1's arithmetic
sweep (`z = x <op> y`): `And`, `Or`, `XOr`, `Not` (unary, `z = Not x`),
`<<`, `>>`.

**Compound assignment (`40`-`43`)** -- `x += y`, `x -= y`, `x *= y`,
`x /= y`. The manual says these are literally equivalent to `x = x op y`;
worth checking whether the compiler actually compiles them that way
(reusing the same LOAD/op/STORE sequence) or has dedicated compound-assign
opcodes.

**Decrement / consumed increment (`44`-`46`)** -- `44` mirrors batch 2's
`25_increment_alone.mbs` but with `--`, to find the decrement opcode.
`45`/`46` use `++`/`--` where the result is actually *used*
(`y = ++x` vs `y = x++`) rather than discarded as a bare statement -- the
manual says prefix returns the post-increment value and postfix returns the
pre-increment value, so these two should compile differently if the ISA
respects that distinction.

**`#define` vs. direct literal (`47`/`48`)** -- resolves the discrepancy
from the real corpus, where `#define rolloff (87)` used what looked like a
wider encoding than a plain `x = 87` should need (batches 1/2 proved 87
fits the compact 1-byte form). `47` uses `#define FOO 87` then `x = FOO`;
`48` is the direct-literal control. Diff them against each other.

**Loops (`49`-`52`)** -- `While`/`End While`, `Do While`/`Loop`, traditional
`For`/`Next`, and C-style `For ... AndWhile ... Next`. All loop bodies are
just `x++` so the loop-control bytecode (condition check + back-jump) should
be easy to isolate from the already-confirmed increment/branch encoding.
These four files add a `Dim i As Integer` to the preamble (used by the `For`
loops), so slot numbers for `x`/`y`/`z` are unaffected -- `i` becomes slot 3.

**Arrays (`53`/`54`)** -- `arr[1] = 5` alone, then the same plus `x =
arr[1]` to isolate array read vs. write. These use `Dim arr[4] As Integer`
instead of extra scalars, so `arr` is slot 3.
