mu/subx/examples
Kartik Agaram ee9a9237d6 4802
Some automated commenting cleanup. Still needs more careful manual scanning.

  sed -i 's/^#   1-3/# . 1-3/' *.subx */*.subx
  sed -i 's/^#   op/# . op/' *.subx */*.subx
  sed -i 's/# vim/# . . vim/' *.subx */*.subx
  sed -i 's/^    # push args/    # . . push args/' *.subx */*.subx
  sed -i 's/^    # discard args/    # . . discard args/' *.subx */*.subx
  sed -i 's/^    # call/    # . . call/' *.subx */*.subx
  sed -i 's/^    # prolog/    # . prolog/' *.subx */*.subx
  sed -i 's/^    # epilog/    # . epilog/' *.subx */*.subx
  sed -i 's/^    # save registers/    # . save registers/' *.subx */*.subx
  sed -i 's/^    # restore registers/    # . restore registers/' *.subx */*.subx
  sed -i 's/  operand  /  register /' *.subx */*.subx
2018-11-30 11:13:36 -08:00
..
Readme.md 4618 2018-09-29 17:45:00 -07:00
ex1 4661 2018-10-04 23:23:48 -07:00
ex1.subx 4802 2018-11-30 11:13:36 -08:00
ex2 4661 2018-10-04 23:23:48 -07:00
ex2.subx 4802 2018-11-30 11:13:36 -08:00
ex3 4661 2018-10-04 23:23:48 -07:00
ex3.subx 4802 2018-11-30 11:13:36 -08:00
ex4 4661 2018-10-04 23:23:48 -07:00
ex4.subx 4802 2018-11-30 11:13:36 -08:00
ex5 4661 2018-10-04 23:23:48 -07:00
ex5.subx 4802 2018-11-30 11:13:36 -08:00
ex6 4661 2018-10-04 23:23:48 -07:00
ex6.subx 4802 2018-11-30 11:13:36 -08:00
ex7 4661 2018-10-04 23:23:48 -07:00
ex7.subx 4802 2018-11-30 11:13:36 -08:00
ex8 4661 2018-10-04 23:23:48 -07:00
ex8.subx 4802 2018-11-30 11:13:36 -08:00
ex9 4661 2018-10-04 23:23:48 -07:00
ex9.subx 4802 2018-11-30 11:13:36 -08:00
ex10 4661 2018-10-04 23:23:48 -07:00
ex10.subx 4802 2018-11-30 11:13:36 -08:00
ex11 4667 2018-10-05 19:49:47 -07:00
ex11.subx 4802 2018-11-30 11:13:36 -08:00
ex12 4661 2018-10-04 23:23:48 -07:00
ex12.subx 4802 2018-11-30 11:13:36 -08:00

Readme.md

Small example programs, each with a simple pedagogical goal.

They also help to validate SubX instruction semantics against native x86 hardware. For example, loading a single byte to a register would for some time clear the rest of the register. This behavior was internally consistent with unit tests. It took running an example binary natively to catch the discrepancy.