mescc: Have micro-mes print argv.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 3 Jan 2017 11:33:34 +0000 (12:33 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 3 Jan 2017 11:33:34 +0000 (12:33 +0100)
commit296449c6158de0e6cf79dedc246e3282780568c9
tree818de7c0a6a8596d37ac7f820515a3860e9e35f1
parent01177f7324b9a21c0867434c68e93b98ed4eab22
mescc: Have micro-mes print argv.

* module/language/c99/compiler.mes (expr->arg): Bugfix argv: Use
  size=4 (int).
  (statement->text+symbols+locals): Bugfixes: array-ref, initialize with
  immediate, initialize with local.
  (formals->locals): Bugfix: formals counted down from -1 [WAS: down to
  -1].
* module/mes/libc-i386.mes (i386:call): Reverse args pushes to match
  formals index changes.
  (i386:write): Update for changed formals push order.
  (i386:mem->accu, i386:value->accu): New functions.
* module/mes/libc-i386.scm (mes): Export them.
* doc/examples/micro-mes.c (eputs, puts, fputs): Make identical with
  mescc's implementations.
  (main): Print argv[0] and (unconditionally; crash if not given) argv[1].
module/language/c99/compiler.mes
module/mes/libc-i386.mes
module/mes/libc-i386.scm
scaffold/micro-mes.c