changeset 22:69bc6d477b38

Added python run function
author windel
date Wed, 30 Nov 2011 22:41:51 +0100
parents 66e9c332c845
children 5dd47d6eebac
files cos/Makefile cos/kernel/kernel.c
diffstat 2 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/cos/Makefile	Tue Nov 29 19:32:31 2011 +0100
+++ b/cos/Makefile	Wed Nov 30 22:41:51 2011 +0100
@@ -15,8 +15,7 @@
 			-nostartfiles \
 			-mno-red-zone \
 			-fno-builtin \
-			-mcmodel=large \
-			-Iinclude
+			-mcmodel=large
 
 OBJECTS = \
 	kernel/video.o \
@@ -25,9 +24,8 @@
 	kernel/asmcode.o \
 	kernel/handlers.o
 
-
 lcfosc.bin: $(CRT0) $(OBJECTS) linker.ld
-	ld -T linker.ld -o lcfosc.bin $(CRT0) $(OBJECTS)
+	ld -T linker.ld -s -o lcfosc.bin $(CRT0) $(OBJECTS)
 
 %.o : %.asm Makefile
 	nasm -f elf64 -o $@ $<
--- a/cos/kernel/kernel.c	Tue Nov 29 19:32:31 2011 +0100
+++ b/cos/kernel/kernel.c	Wed Nov 30 22:41:51 2011 +0100
@@ -147,6 +147,7 @@
 void startPython()
 {
    // TODO: connect to Py_Main
+   PyRun_SimpleString("print('hello world')");
 
 }
 
@@ -166,10 +167,9 @@
 void kmain()
 {
   init_screen();
-  printf("Welcome! .. ");
+  setupIDT();
 
-  printf("Enabling interrupts .. ");
-  setupIDT();
+  printf("Welcome! .. ");
   printf("Testing malloc");
   testMalloc();
   printf("Entering mainloop!\n");