diff options
author | Christian Cunningham <cc@localhost> | 2022-03-24 09:38:08 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-03-24 09:38:08 -0700 |
commit | 93bf62580a68533dc8252b9a2a055c02f34ecb67 (patch) | |
tree | 1b1ca92ebbe107a998136a1442c0dba5be885e13 /src/lib/kmem.c | |
parent | 3e64dda5d5c350cc325650133f7e64967f1efe84 (diff) |
Modularized
Diffstat (limited to 'src/lib/kmem.c')
-rw-r--r-- | src/lib/kmem.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/lib/kmem.c b/src/lib/kmem.c deleted file mode 100644 index 9861f12..0000000 --- a/src/lib/kmem.c +++ /dev/null @@ -1,38 +0,0 @@ -#include <globals.h> -#include <drivers/uart.h> -#include <lib/kmem.h> - -// Output longs at address -void kmemshow32(void* data, unsigned long length) -{ - unsigned long* ptr = data; - for(unsigned long i = 0; i < length; i++) { - uart_hex(*ptr); - ptr+=1; - if (i != length-1) - uart_char(' '); - } - uart_char('\n'); -} - -// Output bytes at address -void kmemshow(void* data, unsigned long length) -{ - unsigned char* ptr = data; - for(unsigned long i = 0; i < length; i++) { - char tmp = *ptr>>4; - tmp += 0x30; - if (tmp > 0x39) - tmp += 0x7; - uart_char(tmp); - tmp = *ptr&0xF; - tmp += 0x30; - if (tmp > 0x39) - tmp += 0x7; - uart_char(tmp); - ptr+=1; - if (i != length-1) - uart_char(' '); - } - uart_char('\n'); -} |