Add conio

Also removes print statements from the interrupt handler (except for the
button interrupt)
This commit is contained in:
Byron Lathi
2022-03-14 22:20:15 -05:00
parent 340f43103a
commit 15b91dcc20
3 changed files with 77 additions and 25 deletions

View File

@@ -1,24 +1,20 @@
#include <stdint.h>
#include <conio.h>
#include "sevenseg.h"
#include "uart.h"
void puts(const char* s)
{
while (*s) {
uart_txb_block(*s);
if (*s == '\n')
uart_txb_block('\r');
s++;
}
}
int main() {
hex_enable(0x3f);
hex_set_24(0xabcdef);
char s[16];
clrscr();
cprintf("Hello, world!\n");
while (1) {
cscanf("%15s", s);
cprintf("Read string: %s\n", s);
}
puts("Hello, World!\n");
while(1);
return 0;
}