-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.h
More file actions
27 lines (23 loc) · 963 Bytes
/
shell.h
File metadata and controls
27 lines (23 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Copyright (c) 2025, Rye Stahle-Smith
December 2nd, 2025 - shell.h
Description: Shell interface and command dispatcher declarations for the RISC-V OS console environment. */
#ifndef SHELL_H
#define SHELL_H
#pragma once
#include <stdint.h>
extern "C" void shell_main();
extern "C" char getchar();
extern "C" void putchar(char c);
extern "C" void print_str(const char* s);
extern "C" void print_hex(uint32_t val);
extern "C" int strcmp(const char* a, const char* b);
extern "C" int strncmp(const char* a, const char* b, int n);
extern "C" void strcpy(char* dest, const char* src);
extern "C" char* strncpy(char* dest, const char* src, int n);
extern "C" void strcat(char* dest, const char* src);
extern "C" const char* strrchr(const char* s, int c);
extern "C" int strlen(const char* str);
extern "C" void* memset(void* s, int c, int n);
extern "C" void* memcpy(void* dest, const void* src, int n);
void itoa(uint32_t value, char* str, int base = 10);
#endif