Commit graph

4 commits

Author SHA1 Message Date
472f91fe14 Started work on memory map, added printf features
Printf now has long (64-bit), char, and % literal support. I haven't written
anything specific for shorts yet but if you cast it to an int on the way
in, it'll work anyway, so whatever.
2025-07-05 04:36:39 -04:00
53198515c8 Temporary "default output" global, makefile changes.
Default output variable holds a generic writer, and any output that
isn't really sure where to output to can just output there. Set by the
system early in boot.

Also made some changes to the makefile to support arguments in the "make
run" or "make debug" subset of calls. For now, it's just VGA=1/0 or
SERIAL=1/0 to enable/disable VGA/serial. Defaults are VGA=1, SERIAL=0.
2025-07-04 02:20:31 -04:00
d6465ade55 Reworked I/O methodology
Instead of passing function pointers, we're passing structs with context
now. The idea is the same, I/O functions require some struct with a
function pointer and some generic memory that only the output device
cares about. I/O just calls it.

VGA has been reworked to accomodate this change, as well as default
outputs being created for low-overhead use (such as interrupt handlers).
2025-07-03 01:36:47 -04:00
4899877cec Changed I/O to be more generic.
instead of stuffing all of the i/o stuff into the "kio" library, i've
decided to rework i/o to be a generic handler that takes in a function
pointer for putc, and does the rest of the logic onto that pointer.
That way, you can pass any function that can take in characters and move
them to buffers.
I'll do a writeup on this at some point to document it.
2025-06-29 01:13:43 -04:00