Add some enums for console attributes.
Factor out read/write functions for crt controller.
Add printf function (supports %d and %s).