$\newcommand{\defeq}{\mathrel{\mathop:}=}$

## 2007/09/24

### The TOY86 Assembler, Revision 1

This is the TOY86 Machine, Revision 1, implemented by Josh Ko.

TOY86/          The original TOY86 project.
toy86_rev1.jar  The Java GUI simulator (source included).
toy86asm.cpp    C++ source code of the assembler.
toy86asm.pdf    Literate program of the assembler.
toy86asm.w      CWEB source of the assembler.

Differences between the original version and Revision 1:
- The program counter starts from 0x100. This is a more reasonable
design for TOY86.
- The syntax rule for comments is relaxed. Any character that is not
a letter, a digit, an underscore, a plus sign, a minus sign, a star
sign, or a whitespace begins a comment.
- Data declarations have slightly different syntax and rules. Please
refer to section 6 of the literate assembler program.
"leap". Simply use "lea".
- The "RZ * c" term in data transfer instructions cannot be written
as "c * RZ".
- All procedure instructions may appear outside procedures.
- Procedures must come after all exposed instructions. (Hence the
assembly source is divided into three parts: data declarations,
exposed instructions, and procedures, in the order they appear.)