mirror of
https://github.com/Alvin-Zilverstand/bob16.git
synced 2026-11-21 12:52:59 +01:00
s
This commit is contained in:
1 parent
74bda7d8b2
commit
472df35261
23 files changed
+32910
-42
No files matched your search
@@ -0,0 +1,22 @@
|
||||
#include "runtime.h"
|
||||
#include "runtime.c"
|
||||
#include "files.c"
|
||||
#include "compiler.c"
|
||||
#include "shell.c"
|
||||
|
||||
int main(void) {
|
||||
int length; char *sample;
|
||||
println("bob!");
|
||||
println("bob16 OS: help COMMAND for usage; go bob.c runs the example.");
|
||||
println("Files are in RAM; halt exits. Type help to get started.");
|
||||
sample = "int main(void) { println(\"bob!\"); return 0; }";
|
||||
file_write("bob.c", sample, strlen(sample), 0);
|
||||
while (1) {
|
||||
print("bob> ");
|
||||
length = read_line(command_line, 128);
|
||||
if (length == -2) { bob_putc('\n'); return 0; }
|
||||
if (length < 0) println("Command too long.");
|
||||
else shell_command(command_line);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user