removing for now because of circular dep chain
This commit is contained in:
parent
fa048152c9
commit
98eb93bc71
3
makefile
3
makefile
@ -4,7 +4,8 @@ LINK=ld
|
||||
ISO=genisoimage
|
||||
|
||||
OBJECTS=mem.o kernel.o gdt_seg.o gdt.o interrupts.o loader.o serial.o \
|
||||
framebuffer.o ports.o stlio.o tests.o interrupt_entry.o
|
||||
framebuffer.o ports.o stlio.o tests.o interrupt_entry.o pit.o
|
||||
|
||||
AFLAGS=-f elf32
|
||||
CFLAGS=-masm=intel -O2 -m32 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles \
|
||||
-nodefaultlibs -Wall -Wextra -c #-Werror -c
|
||||
|
39
shell.c
39
shell.c
@ -1,39 +0,0 @@
|
||||
// NOTE: we shouldn't have to worry about scrolling so the library/kernel
|
||||
// should do this for us
|
||||
// Oh yes
|
||||
#include "stlio.h"
|
||||
#include "types.h"
|
||||
|
||||
#define bsize 101
|
||||
|
||||
#define banner0 "_______ _______ _________"
|
||||
#define banner1 "\\ _ \\____________ ____ ____ ____ \\ _ \\ / _____/"
|
||||
#define banner2 "/ /_\\ \\_ __ \\__ \\ / \\ / ___\\_/ __ \\/ /_\\ \\ \\_____ \\ "
|
||||
#define banner3 "\\ \\_/ \\ | \\// __ \\| | \\/ /_/ > ___/\\ \\_/ \\/ \\"
|
||||
#define banner4 " \\_____ /__| (____ /___| /\\___ / \\___ >\\_____ /_______ /"
|
||||
#define banner5 " \\/ \\/ \\//_____/ \\/ \\/ \\/ "
|
||||
|
||||
void smain(void) {
|
||||
// print out a nice banner on start
|
||||
printf(banner0);
|
||||
printf(banner1);
|
||||
printf(banner2);
|
||||
printf(banner3);
|
||||
printf(banner4);
|
||||
printf(banner5);
|
||||
|
||||
char buffer[bsize];
|
||||
while(1) {
|
||||
// read into buffer bsize bytes, if we reach bsize then we just keep replacing that character
|
||||
// keep in mind however that backspace will take us back as well
|
||||
u32 bytes = read(buffer, bsize); // reeads n - 1 characters as the last one is always null
|
||||
// now we process options
|
||||
if(strcmp(buffer, "quit") == 0) {
|
||||
break;
|
||||
}
|
||||
// generate a random number on the screen for now
|
||||
if(strcmp(buffer, "rand") == 0) {
|
||||
printHex(random32(5000));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user