Commit graph

21 commits

Author SHA1 Message Date
David Given 9945b019d2 Add a B man page. 2017-01-07 22:35:02 +01:00
David Given 5a38ce2a69 Pre-and-post-modification operators now work substantially better (i.e.,
working).
2017-01-07 18:46:03 +01:00
David Given 77fc62285d Extern variables can now be written to. 2017-01-06 23:24:05 +01:00
David Given 62bc2ab97a Jump tables for switch now go in ROM (required by the EM spec). Forward gotos
now work.
2017-01-01 23:28:41 +00:00
David Given 8b8910595a Add proper support for negative constants in external initialisers. 2017-01-01 17:56:53 +00:00
David Given 049aff9f33 Remove the negative-constant code from the compiler; I think it's going to
break a=-1 (with no spaces). Backed out changeset dead3363ac7d.
2017-01-01 17:44:55 +00:00
David Given 374e7a1c57 Add support for the ~ operator. 2017-01-01 17:40:06 +00:00
David Given b1576e2c77 Add support for negative constants in external initialisers. 2016-12-31 19:43:03 +00:00
David Given a01523a893 Allow programs to override binit() (so they can register their own modules). 2016-12-31 17:39:51 +00:00
David Given 803b81e3f4 Add support for the xor operator. 2016-12-31 17:36:12 +00:00
David Given c3e1ef1064 B patch table names shouldn't be in the B symbol namespace. 2016-12-31 00:14:28 +00:00
David Given fa02a855e8 Fix issue where !x was actually calculating !!x. 2016-12-31 00:14:04 +00:00
David Given ebd424e7f1 First draft of the B module code; a module name can now be specified as a
compiler flag, which is used to set the name of the patch table. The compiler
now understands C preprocessor line directives. Extend the standard library
somewhat.
2016-12-29 17:10:21 +00:00
David Given e50f4be710 Merge from default. 2016-12-26 19:44:48 +00:00
David Given bbcc08a6b6 Fix putchar() return value. 2016-11-28 21:38:46 +01:00
David Given 9f34262f95 Implement enough libb to make 'Hello, world!' work. 2016-11-27 22:05:15 +01:00
David Given b9665c7c99 Fix some basic showstopping bugs; compilation now works up to failing to find
the libb standard library.
2016-11-27 21:08:14 +01:00
David Given 4485d89b23 Hook the B compiler up to the compiler driver. 2016-11-27 20:48:07 +01:00
David Given 707585b67d Perform initial (i.e. feature complete and compiling, but not necessarily
working) port of the B compiler to EM.
2016-11-27 20:28:19 +01:00
David Given cfc723250f Initial EM-ification; start threading word size stuff through the code. 2016-11-27 11:58:59 +01:00
David Given a69045c0e4 Import aap@github's B compiler. 2016-11-27 11:37:25 +01:00