The TOY86 Assembler, Revision 1

完成!Architecture 上也做了一點必要的小小更動:讓 PC 從 0x100 起跳。原案「從 0x010 起跳」留前面 16 個 bytes 實在沒什麼意義 XD。下面轉錄初版的 readme file(最新版請點連結):

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.
  - Loading procedure addresses does not need a separate instruction
    "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.)

Note: please don't read the .cpp file; read the .pdf instead. They are
both extracted by CWEB tools from the .w file. The .cpp file is intended
for compilation while the .pdf file is for human reading.

等我多看幾遍再寄信給 cyy XD。


<< 回到主頁