diff options
author | Benji Dial <benji3.141@gmail.com> | 2020-05-25 15:35:45 -0400 |
---|---|---|
committer | Benji Dial <benji3.141@gmail.com> | 2020-05-25 15:35:45 -0400 |
commit | 44c0352f0d4124d7c367352e4de746a51b9db42b (patch) | |
tree | 65ad0862c92c4e2d134585b48fbfcc5bead165ea /src/kernel/main.c | |
parent | c99a319d3405d4ac76881cae288c29624fa34a44 (diff) | |
download | portland-os-44c0352f0d4124d7c367352e4de746a51b9db42b.tar.gz |
got file loading working properly
Diffstat (limited to 'src/kernel/main.c')
-rw-r--r-- | src/kernel/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/kernel/main.c b/src/kernel/main.c index 194ce93..92e778c 100644 --- a/src/kernel/main.c +++ b/src/kernel/main.c @@ -54,5 +54,19 @@ void main() { u32_dec(e.length, nbuf); vga_printsz(nbuf); } + fs_close(root); + if (root = fs_open("BLEH.TXT")) { + vga_printsz("\n\nContents of BLEH.TXT:"); + uint8_t l; + uint8_t line[82]; + line[0] = '\n'; + line[1] = ' '; + line[2] = ' '; + while (l = fs_read(root, 78, line + 3)) { + line[l + 3] = 0; + vga_printsz(line); + } + fs_close(root); + } halt(); }
\ No newline at end of file |