maybe?
This commit is contained in:
parent
ac1eef983f
commit
f25003e0d6
@ -47,20 +47,14 @@ void user_input(char *input) {
|
||||
char base_str[16];
|
||||
|
||||
// Get input from your input source (you need to implement this)
|
||||
get_input(base_str);
|
||||
strncpy(base_str, input + 3, sizeof(base_str) - 1); // Skip the command part
|
||||
base_str[sizeof(base_str) - 1] = '\0'; // Null-terminate the base_str
|
||||
|
||||
// Check if the input matches the expected message
|
||||
if (strcmp(base_str, "Enter base register value: ") == 0) {
|
||||
// Input matches, proceed to read the value
|
||||
get_input(base_str); // Assuming get_input reads the actual value
|
||||
// Convert base_str to an integer (you need a suitable conversion function)
|
||||
u32 base = digit_conver(base_str);
|
||||
|
||||
// Now you have the base register input, and you can use it as needed
|
||||
umem_head = add_node(umem_head, base, 0x100, true, global_id++);
|
||||
} else {
|
||||
// Input doesn't match the expected message
|
||||
kprint("Invalid input format.\n");
|
||||
// Handle the error or prompt the user again
|
||||
}
|
||||
} else if (strcmp(input, "LIST") == 0) {
|
||||
kprint("***** FORWARD ****\n");
|
||||
print_list( umem_head, true);
|
||||
|
Reference in New Issue
Block a user