OSDN Git Service

fix
authorvosystems <doradora.motochan@gmail.com>
Sun, 19 Oct 2014 13:54:14 +0000 (22:54 +0900)
committervosystems <doradora.motochan@gmail.com>
Sun, 19 Oct 2014 13:54:14 +0000 (22:54 +0900)
24 files changed:
Kernel/ASM_Interrupt.o [deleted file]
Kernel/FAT.o [deleted file]
Kernel/GDT_IDT.o [deleted file]
Kernel/Graphical.o [deleted file]
Kernel/Interrupt.o [deleted file]
Kernel/KeyBoard.o [deleted file]
Kernel/Makefile~ [deleted file]
Kernel/Message.o [deleted file]
Kernel/System.c~ [deleted file]
Kernel/System.o [deleted file]
Kernel/Vane.o [deleted file]
Kernel/boot.c~ [deleted file]
Kernel/boot.o [deleted file]
Kernel/load.o [deleted file]
Kernel/memory.o [deleted file]
Kernel/scancode.o [deleted file]
Kernel/stdio.c~ [deleted file]
Kernel/stdio.o [deleted file]
Kernel/string.c~ [deleted file]
Kernel/string.o [deleted file]
Kernel/task.o [deleted file]
Kernel/time.c~ [deleted file]
Kernel/time.o [deleted file]
Kernel/timer.o [deleted file]

diff --git a/Kernel/ASM_Interrupt.o b/Kernel/ASM_Interrupt.o
deleted file mode 100644 (file)
index 719191f..0000000
Binary files a/Kernel/ASM_Interrupt.o and /dev/null differ
diff --git a/Kernel/FAT.o b/Kernel/FAT.o
deleted file mode 100644 (file)
index 465757e..0000000
Binary files a/Kernel/FAT.o and /dev/null differ
diff --git a/Kernel/GDT_IDT.o b/Kernel/GDT_IDT.o
deleted file mode 100644 (file)
index 116c62a..0000000
Binary files a/Kernel/GDT_IDT.o and /dev/null differ
diff --git a/Kernel/Graphical.o b/Kernel/Graphical.o
deleted file mode 100644 (file)
index ddaa211..0000000
Binary files a/Kernel/Graphical.o and /dev/null differ
diff --git a/Kernel/Interrupt.o b/Kernel/Interrupt.o
deleted file mode 100644 (file)
index 13a696b..0000000
Binary files a/Kernel/Interrupt.o and /dev/null differ
diff --git a/Kernel/KeyBoard.o b/Kernel/KeyBoard.o
deleted file mode 100644 (file)
index 7bdc78a..0000000
Binary files a/Kernel/KeyBoard.o and /dev/null differ
diff --git a/Kernel/Makefile~ b/Kernel/Makefile~
deleted file mode 100644 (file)
index 9c5d190..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-TARGET      = ../bin/Kernel.vsb
-
-#宣言
-CC                     = gcc
-RM                     = /bin/rm
-MV                     = /bin/mv
-LD                     = /usr/bin/ld
-LN_S           = ln -s
-AR                     = /usr/bin/ar
-RANLIB         = ranlib
-INCLUDES    = -I../include
-LIBVANE                = ../lib/libvanec.a ../lib/libvanego.a
-FLAGS          = -m32 -ffreestanding -fno-common -fno-builtin -fomit-frame-pointer -O2 -c
-FLAGSC         = -m32 -ffreestanding -fno-common -nostdlib -masm=intel -fno-builtin -fomit-frame-pointer -O2 -c
-LD          = ld -Ttext 0x100000 -T linkerscript -melf_i386 --oformat elf32-i386 -o
-
-#サフィックス
-.S.o:
-       ${CC} ${INCLUDES} ${FLAGS} $<
-.c.o:
-       ${CC} ${INCLUDES} ${FLAGSC} $<
-       
-#ソースコード
-BOOT_C=boot.c
-BOOT_S=load.S
-VANE_S=Vane.S
-KEYBOARD_C=KeyBoard.c
-GDT_IDT_C=GDT_IDT.c
-INTERRUPT_C=Interrupt.c
-STDIO_C=stdio.c
-STRING_C=string.c
-ASM_INTERRUPT_S=ASM_Interrupt.S
-SCANCODE_C=scancode.c
-MEMMAN_C=memory.c
-FAT_C=FAT.c
-GRAPHIC_C=Graphical.c
-SYSTEM_C=System.c
-MESSAGE_C=Message.c
-TIMER_C=timer.c
-TASK_C=task.c
-
-#オブジェクト
-BOOT_OBJ=${BOOT_S:.S=.o} ${BOOT_C:.c=.o} ${VANE_S:.S=.o} ${KEYBOARD_C:.c=.o} ${STDIO_C:.c=.o} ${GDT_IDT_C:.c=.o} ${INTERRUPT_C:.c=.o} ${STRING_C:.c=.o} ${ASM_INTERRUPT_S:.S=.o} ${SCANCODE_C:.c=.o} ${MEMMAN_C:.c=.o} ${FAT_C:.c=.o} ${GRAPHIC_C:.c=.o} ${SYSTEM_C:.c=.o} ${MESSAGE_C:.c=.o} ${TIMER_C:.c=.o} ${TASK_C:.c=.o}
-
-kernel: ${BOOT_OBJ}
-       ${LD} ${TARGET} ${BOOT_OBJ}
-
-${BOOT_OBJ}: ${BOOT_SRC}
-clean::
-       -${RM}  -f *~ *.lo *.o make.log *.bak .a.out .core .*.core
-
diff --git a/Kernel/Message.o b/Kernel/Message.o
deleted file mode 100644 (file)
index de7590f..0000000
Binary files a/Kernel/Message.o and /dev/null differ
diff --git a/Kernel/System.c~ b/Kernel/System.c~
deleted file mode 100644 (file)
index 89b8032..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-*System Functions
-*(C) 2014 VOSystems.
-*/
-#include <stdio.h>
-
-int vram_start_address;
-char vmode;
-short scrnX,scrnY;
-void init_qemuvga0(int x, int y, int c, int flag);
-/*int Check_VESA(void)
-{
-       in_virtual86mode();
-       if(VESA_Check()==0){
-               out_virtual86mode();
-               return 0;
-       }else{
-               out_virtual86mode();
-               return 1;
-       }
-}
-
-void ScreenVGA_Graphic(void)
-{/*
-       in_virtual86mode();
-       scrn320();
-       out_virtual86mode();
-       vram_start_address=0x000a0000;
-       scrnX=320;
-       scrnY=200;
-       init_qemuvga0(1024,600,32,0x41);
-}*/
-
-void set_qemuvga0reg(int reg, int dat)
-{
-    io_out16(0x01ce, reg);
-    io_out16(0x01cf, dat);
-    return;
-}
-
-void init_qemuvga0(int x, int y, int c, int flag)
-{
-    set_qemuvga0reg(0x0004, 0x0000);
-    set_qemuvga0reg(0x0001, x);
-    set_qemuvga0reg(0x0002, y);
-    set_qemuvga0reg(0x0003, c); /* 4, 8, 15, 16, 24, 32 */
-    set_qemuvga0reg(0x0005, 0x0000);
-    set_qemuvga0reg(0x0004, flag); /* リニアアクセスモードでVRAMの初期化をするなら0x41 */
-        /* bit7 : VRAM初期化抑制, bit6 : リニアアクセスモード, bit0 : 設定有効 */
-    scrnX = x;
-    scrnY = y;
-    vmode = c;
-    if ((flag & 0x40) == 0) {
-        vram_start_address = 0x000a0000;
-    } else {
-        vram_start_address = 0xe0000000;
-    }
-    return;
-}
-
-void readrtc(unsigned char *t)
-{
-    char err;
-    static unsigned char adr[7] = { 0x00, 0x02, 0x04, 0x07, 0x08, 0x09, 0x32 };
-    static unsigned char max[7] = { 0x60, 0x59, 0x23, 0x31, 0x12, 0x99, 0x99 };
-    int i;
-    for (;;) { /* 読み込みが成功するまで繰り返す */
-        err = 0;
-        for (i = 0; i < 7; i++) {
-            io_out8(0x70, adr[i]);
-            t[i] = io_in8(0x71);
-        }
-        for (i = 0; i < 7; i++) {
-            io_out8(0x70, adr[i]);
-            if (t[i] != io_in8(0x71) || (t[i] & 0x0f) > 9 || t[i] > max[i]) {
-                err = 1;
-            }
-        }
-        if (err == 0) {
-            return;
-        }
-    }
-}
-
-void printtime(void)
-{
-    unsigned char s[24], t[7];
-    readrtc(t);
-    printf("%X%X/%X/%X %X:%X:%X", t[6], t[5], t[4], t[3], t[2], t[1], t[0]);
-}
diff --git a/Kernel/System.o b/Kernel/System.o
deleted file mode 100644 (file)
index 37af87c..0000000
Binary files a/Kernel/System.o and /dev/null differ
diff --git a/Kernel/Vane.o b/Kernel/Vane.o
deleted file mode 100644 (file)
index a141c3b..0000000
Binary files a/Kernel/Vane.o and /dev/null differ
diff --git a/Kernel/boot.c~ b/Kernel/boot.c~
deleted file mode 100644 (file)
index 03b08ec..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-/*!
-       boot.c
-       Kernel and Setting.
-       (C) 2013-2014 VOSystems.
-*/
-
-/*
-       Vane Operating System
-       Publish under The MIT License
-
-       MIT License
-       http://opensource.org/licenses/mit-license.php
-       Copyright (C) 2013-2014 VOSystems. All rights reserved.
-*/
-
-#include<multiboot.h>
-#include<VaneOS.h>
-#include<GDT_IDT.h>
-#include<KeyBoard.h>
-#include<Interrupt.h>
-#include<stdio.h>
-#include<scancode.h>
-#include<memory.h>
-#include<Graphic.h>
-#include<Message.h>
-#include<timer.h>
-#include<System.h>
-
-/*PROTOTYPE*/
-void outPortByte( unsigned short address, unsigned char value );
-unsigned char inPortByte( unsigned short address );
-void initPIC( void );
-int setPitCounter( int freq, unsigned char counter, unsigned char mode );
-void initPit( void );
-void clear_state(void);
-void hlt(void);
-
-/*!
-       load.S call this function
-       
-       Set All & Call shell
-       (C)2014 VOSystems.
-       create 2014/09/23
-       update 2014/10/15
-       author VOSystems
-*/
-void cstart(unsigned long magic, unsigned long addr)
-{
-       /*Common Settings*/
-       char cmd[100]={0};
-       struct MEMMAN *memman=(struct MEMMAN*)MEMMAN_ADDR;
-       multiboot_info_t *mbi;
-       
-       mbi = (multiboot_info_t *) addr;
-               
-       //ClearScreen();
-       break_flag=0;   system_key_code_flag=0;
-       screen=(unsigned short*)0xb8000;//VRam Setting
-       attr=WHITE;
-       
-       /*Start Set Main Code*/
-       printf("VOSystems Vane Operating System  [Version 0.2(build 300)]\n");
-       printf("VOSystems Console Host [Version 0.1(build 10)]\n");
-       
-       /*Setting IDT*/
-       printTASK("Setting IDT.....");
-       setupInterruptGate(DEF_IDT_INT_NUM_IRQ1,KeyBoard_Interrupt_asm);//Register Keyboard interrupt handler
-       setupInterruptGate(DEF_IDT_INT_NUM_IRQ0,Timer_Interrupt_asm);//Register Timer interrupt handler
-       idtr.size       = NUM_IDT * sizeof( GATE_DESCRIPTOR );
-       idtr.base       = ( GATE_DESCRIPTOR *)idt;
-       
-       load_idt();
-       printOK("Setting IDT.....");
-       
-       /*Setting GDT*/
-       printTASK("Setting GDT.....");
-       /*set up null descriptor*/
-       gdt[NULL_DESCRIPTOR].limitLo    = DEF_GDT_NULL_LIMIT;
-       gdt[NULL_DESCRIPTOR].baseLo             = DEF_GDT_NULL_BASELO;
-       gdt[NULL_DESCRIPTOR].baseMid    = DEF_GDT_NULL_BASEMID;
-       gdt[NULL_DESCRIPTOR].flags              = DEF_GDT_NULL_FLAGS;
-       gdt[NULL_DESCRIPTOR].baseHi             = DEF_GDT_NULL_BASEHI;
-       /* set up code descriptor */
-       gdt[CODE_DESCRIPTOR].limitLo    = DEF_GDT_CODE_LIMIT;
-       gdt[CODE_DESCRIPTOR].baseLo             = DEF_GDT_CODE_BASELO;
-       gdt[CODE_DESCRIPTOR].baseMid    = DEF_GDT_CODE_BASEMID;
-       gdt[CODE_DESCRIPTOR].flags              = DEF_GDT_CODE_FLAGS;
-       gdt[CODE_DESCRIPTOR].baseHi             = DEF_GDT_CODE_BASEHI;
-
-       /* set up data descriptor */
-       gdt[DATA_DESCRIPTOR].limitLo    = DEF_GDT_DATA_LIMIT;
-       gdt[DATA_DESCRIPTOR].baseLo             = DEF_GDT_DATA_BASELO;
-       gdt[DATA_DESCRIPTOR].baseMid    = DEF_GDT_DATA_BASEMID;
-       gdt[DATA_DESCRIPTOR].flags              = DEF_GDT_DATA_FLAGS;
-       gdt[DATA_DESCRIPTOR].baseHi             = DEF_GDT_DATA_BASEHI;
-       
-       gdtr.size       = NUM_GDT * sizeof( SEGMENT_DESCRIPTOR );
-       gdtr.base       = ( SEGMENT_DESCRIPTOR *)gdt;
-       
-       load_gdt();
-       printOK("Setting GDT.....");
-       
-       printTASK("Init PIC.....");
-       initPIC();
-       printOK("Init PIC.....");
-       
-       printTASK("Init Keyboard.....");
-       initKeyboard();
-       keyboardEnableKBD();
-       printOK("Init Keyboard.....");
-       
-       printTASK("Init Messaging Buffer.....");
-       msg_init(&kernel,32,kernelbuf);
-       printOK("Init Messaging Buffer.....");
-       
-       printTASK("Init PIT.....");
-       setPitCounter(100,DEF_PIT_COM_COUNTER0,DEF_PIT_COM_MODE_SQUAREWAVE);
-       initPit();
-       printOK("Init PIT.....");
-       
-       printTASK("Starting Memory Manager.....");
-       memman_init(memman);
-       memman_free(memman,0x00001000,0x0009e000);
-       memman_free(memman,0x00400000,((mbi->mem_lower+mbi->mem_upper)*1024)-0x00400000);
-       printOK("Starting Memory Manager.....");
-       
-       printTASK("Loading Memory Info.....");
-       if(magic!=MULTIBOOT_BOOTLOADER_MAGIC){
-               printFAIL("Loading Memory Info.....");
-               
-       }else{
-               printOK("Loading Memory Info.....");
-               printINFO("TotalMemory = ");
-               printf("%d MiB\n",(mbi->mem_lower+mbi->mem_upper+1024)/1024);
-               printINFO("Free Memory = ");
-               printf("%d MiB\n",memman_total(memman)/(1024*1024));
-       }
-       
-       printf("%X %d\n",0x12,hex2dec_bcd(0x12));
-
-       int in=0;
-       while(in!='q'){
-               putchar('\r');
-               printINFO("Now Time and Day = ");
-               printtime();
-               if(kbhit()=='q')break;
-               io_hlt();
-       }
-       putchar('\n');
-       
-       puts("KernelShell/Root/>");
-       scanf("%s",&cmd);
-       if(strcmp("time",cmd)==0){
-               int in=0;
-               while(in!='q'){
-                       putchar('\r');
-                       printtime();
-                       if(kbhit()=='q')break;
-                       io_hlt();
-               }
-       }
-       printf("%d %d %d",strcmp("time",cmd),strcmp("time\0",cmd),strcmp("time\n",cmd));
-       while(1)io_hlt();
-       return;
-}
-
-void outPortByte( unsigned short address, unsigned char value )
-{
-       __asm__ __volatile__( "out %%dx, %%al" : : "d"(address), "a"(value) );
-}
-
-unsigned char inPortByte( unsigned short address )
-{
-       unsigned char data;
-
-       __asm__ __volatile__( "mov %%dx, %%ax" : : "a"(address) );
-       __asm__ __volatile__( "in %al, %dx" );
-       __asm__ __volatile__( "mov %%bl, %%al" : "=b"(data) );
-       return( data );
-}
-
-void initPIC( void )
-{
-       disable();
-       
-       outPortByte( PORT_MASTER_PIC_COMMAND,   PIC_ICW1        );
-       outPortByte( PORT_SLAVE_PIC_COMMAND,    PIC_ICW1        );
-
-       outPortByte( PORT_MASTER_PIC_DATA,      PIC_MASTER_ICW2 );
-       outPortByte( PORT_SLAVE_PIC_DATA,       PIC_SLAVE_ICW2  );
-
-       outPortByte( PORT_MASTER_PIC_DATA,      PIC_MASTER_ICW3 );
-       outPortByte( PORT_SLAVE_PIC_DATA,       PIC_SLAVE_ICW3  );
-
-       outPortByte( PORT_MASTER_PIC_DATA,      PIC_MASTER_ICW4 );
-       outPortByte( PORT_SLAVE_PIC_DATA,       PIC_SLAVE_ICW4  );
-       
-       outPortByte( PORT_MASTER_PIC_IMR, (~PIC_IMR_MASK_IRQ0) & (~PIC_IMR_MASK_IRQ2 )  );
-       outPortByte( PORT_SLAVE_PIC_IMR, PIC_IMR_MASK_IRQ_ALL                           );
-       
-    outPortByte( PORT_MASTER_PIC_IMR, ( ~PIC_IMR_MASK_IRQ0 )
-                 & ( ~PIC_IMR_MASK_IRQ1 ) & ( ~PIC_IMR_MASK_IRQ2 ) );
-    outPortByte( PORT_SLAVE_PIC_IMR, PIC_IMR_MASK_IRQ_ALL          );
-    
-    enable();
-}
-
-int setPitCounter( int freq, unsigned char counter, unsigned char mode )
-{
-       unsigned short  count;
-       unsigned char   command;
-
-       /* --------------------------------------------------------------------- */
-       /*      calculate frequency                                              */
-       /* --------------------------------------------------------------------- */
-       count = ( unsigned short )( DEF_PIT_CLOCK / freq );
-
-       /* --------------------------------------------------------------------- */
-       /*      make initial command                                             */
-       /* --------------------------------------------------------------------- */
-       command = mode | DEF_PIT_COM_RL_DATA | counter;
-
-       outPortByte( PIT_REG_CONTROL, command );
-
-       /* --------------------------------------------------------------------- */
-       /*      send counter value                                               */
-       /* --------------------------------------------------------------------- */
-       outPortByte( PIT_REG_COUNTER0, ( unsigned char )( count & 0xFF          ) );
-       outPortByte( PIT_REG_COUNTER0, ( unsigned char )( ( count >> 8 ) & 0xFF ) );
-}
-
-/*
-       Funtion     :initPit
-       Input       :void
-       Output      :void
-       Return      :void 
-
-       Description :initialize pic
-*/
-void initPit( void )
-{
-       /* --------------------------------------------------------------------- */
-       /*      set counter0 100Hz                                               */
-       /* --------------------------------------------------------------------- */
-       setPitCounter( 100, DEF_PIT_COM_COUNTER0,  DEF_PIT_COM_MODE_SQUAREWAVE );
-       timer.count=0;
-       int i;
-       for(i=0;i<MAX_TIMER;i++)
-       {
-               timer.timers[i]->flags=0;
-       }
-}
diff --git a/Kernel/boot.o b/Kernel/boot.o
deleted file mode 100644 (file)
index 4bf4bb4..0000000
Binary files a/Kernel/boot.o and /dev/null differ
diff --git a/Kernel/load.o b/Kernel/load.o
deleted file mode 100644 (file)
index dc385b1..0000000
Binary files a/Kernel/load.o and /dev/null differ
diff --git a/Kernel/memory.o b/Kernel/memory.o
deleted file mode 100644 (file)
index 9e13e86..0000000
Binary files a/Kernel/memory.o and /dev/null differ
diff --git a/Kernel/scancode.o b/Kernel/scancode.o
deleted file mode 100644 (file)
index a7c8699..0000000
Binary files a/Kernel/scancode.o and /dev/null differ
diff --git a/Kernel/stdio.c~ b/Kernel/stdio.c~
deleted file mode 100644 (file)
index 51d6aae..0000000
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
-*stdio for Charactor Shell
-*(C) 2014 VOSystems.
-*/
-
-#include<stdio.h>
-#include<string.h>
-#include<KeyBoard.h>
-#include<scancode.h>
-#include<stdarg.h>
-/*
-COLOR
-
-BRACK, BLUE, GREEN, CIAN, RED, MASENTA
-BRAWN, GLAY, D_GLAY, CH_BLUE, CH_GREE
-CH_CIAN, PINK, CH_MAS, YELLOW, WHITE
-*/
-
-#define COLUMNS (80)
-#define LINES (24)
-#define ATTRIBUTE (7)
-
-int asm_move_cursol(int ebp);
-
-unsigned short* screen;
-char attr;
-unsigned int X,Y;
-
-int kbhit(void)
-{
-       return Generate_Scancode_To_ASCII_Code();
-}
-void scanf(const char* fmt,...)
-{
-       va_list arg;
-       va_start(arg,char*,fmt);
-       char ch=*fmt++;
-       unsigned int count=0;
-       
-       while(ch!='\0'){
-       
-               if(ch=='%'){
-                       ch=*fmt++;
-                       
-                       if(ch=='d'){
-                               int buf=0;      char chbuf=0;
-                               count=0;
-                               while(1){
-                                       chbuf=getch();
-                                       buf*=10;
-                                       
-                                       if(chbuf=='1'){
-                                               buf+=1;
-                                               putchar(chbuf);
-                                               ++count;
-                                       }else if(chbuf=='2'){
-                                               buf+=2;
-                                               putchar(chbuf);
-                                               ++count;
-                                       }else if(chbuf=='3'){
-                                               buf+=3;
-                                               putchar(chbuf);
-                                               ++count;
-                                       }else if(chbuf=='4'){
-                                               buf+=4;
-                                               putchar(chbuf);
-                                               ++count;
-                                       }else if(chbuf=='5'){
-                                               buf+=5;
-                                               putchar(chbuf);
-                                               ++count;
-                                       }else if(chbuf=='6'){
-                                               buf+=6;
-                                               putchar(chbuf);
-                                               ++count;
-                                       }else if(chbuf=='7'){
-                                               buf+=7;
-                                               putchar(chbuf);
-                                               ++count;
-                                       }else if(chbuf=='8'){
-                                               buf+=8;
-                                               putchar(chbuf);
-                                               ++count;
-                                       }else if(chbuf=='9'){
-                                               buf+=9;
-                                               putchar(chbuf);
-                                               ++count;
-                                       }else if(chbuf=='0'){
-                                               buf+=0;
-                                               putchar(chbuf);
-                                               ++count;
-                                       }else if(chbuf=='\b' && count>=0){
-                                               buf/=10;
-                                               putchar(chbuf);
-                                               --count;
-                                       }else{
-                                               buf/=10;
-                                               va_arg(arg,int)=buf;
-                                               break;
-                                       }
-                               }
-                       }else if(ch=='s'){
-                               char *cmd;      cmd=va_arg(arg,char*);
-                               count=0;
-                               do{
-                                       *cmd=getch();
-                                       if(*cmd=='\n'){
-                                               putchar(*cmd);
-                                               *cmd='\0';
-                                               break;
-                                               
-                                       }else if(*cmd==' '){
-                                               putchar(' ');
-                                               *cmd='\0';
-                                               break;
-                                               
-                                       }else if(*cmd=='\b' && count>0){
-                                               *cmd-- = '\0';
-                                               count--;
-                                               putchar('\b');
-                                               
-                                       }else{
-                                               putchar(*cmd);
-                                               count++;
-                                               cmd++;
-                                               
-                                       }
-                               }while(1);
-                       
-                       }else if(ch=='c'){
-                               va_arg(arg,char)=getchar();
-                       }
-               }
-               ch=*fmt++;
-       }
-}
-
-char getchar(void)
-{
-       char code=0;
-       while(code==0)
-       {
-               code=Generate_Scancode_To_ASCII_Code();
-       }
-       putchar(code);
-       return code;
-}
-
-char getch(void)
-{
-       char code=0;
-       while(code==0)
-       {
-               code=Generate_Scancode_To_ASCII_Code();
-       }
-       return code;
-}
-
-void ClearScreen(void)
-{
-       screen=(unsigned short*)0xb8000;
-       X=0;Y=0;
-       while(screen<(unsigned short*)0xc0000)
-       {
-               *screen++ =NUM_NULL;
-       }
-       screen=(unsigned short*)0xb8000;
-       return;
-}
-
-void puts(const char* msg)
-{
-       
-       char ch;
-       ch=*msg++;
-       
-       while(ch!='\0')
-       {
-               putchar(ch);
-               ch=*msg++;
-       }
-       return;
-}
-
-void putchar(const char ch)
-{
-       if(ch=='\n'){
-               screen+=(80-X);/*80 charactors * 2byte - X charactors * 2 byte*/
-               Y+=1;
-               X=0;
-               
-       }else if(ch=='\t'){
-               *screen++ = (((attr)<<8) | ' ');
-               *screen++ = (((attr)<<8) | ' ');
-               X+=2;
-               
-       }else if(ch=='\r'){
-               while(X>0)
-               {
-                       *screen-- = (unsigned short)NUM_NULL;
-                       --X;
-               }
-       
-       }else if(ch=='\b'){
-               screen--;
-               *screen = (unsigned short)NUM_NULL;
-               --X;
-               
-       }else{
-               *screen++ = (((attr)<<8) | ch);
-               X+=1;
-       }
-       return;
-}
-
-void printTASK(const char* msg)
-{
-       puts("[....]");
-       attr=WHITE;
-       puts(msg);
-       return;
-}
-
-void printOK(const char* msg)
-{
-       putchar('\r');
-       attr=WHITE;
-       puts("[ ");
-       attr=GREEN;
-       puts("ok");
-       attr=WHITE;
-       puts(" ]");
-
-       attr=WHITE;
-       puts(msg);
-       puts("done.\n");
-       return;
-}
-
-void printFAIL(const char* msg)
-{
-       putchar('\r');
-       attr=WHITE;
-       puts("[");
-       attr=RED;
-       puts("fail");
-       attr=WHITE;
-       puts("]");
-
-       attr=WHITE;
-       puts(msg);
-       puts("done.\n");
-       return;
-}
-
-void printWARN(const char* msg)
-{
-       putchar('\r');
-       attr=WHITE;
-       puts("[");
-       attr=YELLOW;
-       puts("warn");
-       attr=YELLOW;
-       puts("]");
-
-       attr=WHITE;
-       puts(msg);
-       puts("done.\n");
-       return;
-}
-
-void printINFO(const char* msg)
-{
-       putchar('\r');
-       attr=WHITE;
-       puts("[");
-       attr=CH_BLUE;
-       puts("info");
-       attr=WHITE;
-       puts("]");
-
-       attr=WHITE;
-       puts(msg);
-       return;
-}
-
-char * uint_to_str_big_hex(char *buf, unsigned src, int base) {
-  char *p = buf;
-  char *p1, *p2;
-
-  do {
-    *p++ = "0123456789ABCDEF"[src%base];
-  } while(src /= base);
-
-  // Terminate BUF
-  *p = 0;
-
-  // Reverse BUF
-  for(p1=buf, p2=p-1; p1 < p2; p1++, p2--) {
-    char tmp = *p1;
-    *p1 = *p2;
-    *p2 = tmp;
-  }
-
-  return buf;
-}
-
-char * uint_to_str_small_hex(char *buf, unsigned src, int base) {
-  char *p = buf;
-  char *p1, *p2;
-
-  do {
-    *p++ = "0123456789abcdef"[src%base];
-  } while(src /= base);
-
-  // Terminate BUF
-  *p = 0;
-
-  // Reverse BUF
-  for(p1=buf, p2=p-1; p1 < p2; p1++, p2--) {
-    char tmp = *p1;
-    *p1 = *p2;
-    *p2 = tmp;
-  }
-
-  return buf;
-}
-
-void printf(char* fmt, ...)
-{
-       char **arg = (char **) &fmt;
-       char c;
-       arg++;
-
-       while((c = *fmt++) != 0) {
-               if(c != '%'){
-                       putchar(c);
-                       
-               }else{
-                       char buf[64];
-                       char *p;
-                       c = *fmt++;
-                       
-                       if(c=='d'){
-                               // if value is minus, put '-' in the head
-                               if( 0 > *((int *) arg) ) {
-                                       putchar('-');
-                                       *((int *) arg) *= -1;
-                               }
-                               p = uint_to_str_small_hex(buf, *((unsigned *) arg++), 10);
-                               puts(p);
-        
-                       }else if(c=='x'){
-                               p = uint_to_str_small_hex(buf, *((unsigned *) arg++), 16);
-                               puts(p);
-               
-               }else if(c=='X'){
-                       p = uint_to_str_big_hex(buf, *((unsigned *) arg++), 16);
-                               puts(p);
-               
-                       }else if(c=='s'){
-                               p = *arg++;
-                               puts(p);
-               }else if(c=='c'){
-                       p=*arg++;
-                       char send=*p;
-                       putchar(send);
-                       }else{
-                               putchar(c);
-               }       
-               }
-       }
-}
diff --git a/Kernel/stdio.o b/Kernel/stdio.o
deleted file mode 100644 (file)
index 9fe7055..0000000
Binary files a/Kernel/stdio.o and /dev/null differ
diff --git a/Kernel/string.c~ b/Kernel/string.c~
deleted file mode 100644 (file)
index a3d79e2..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-
-*/
-#include<string.h>
-/*
-int strcmp(const char* ch1,const char* ch2)
-{
-       while(*ch1==*ch2)
-       {
-               if(*ch1=='\0' && *ch2=='\0'){
-                       return 0;
-               
-               }else if((*ch1=='\0' || *ch2=='\0') && (*ch1!=*ch2)){
-                       break;
-                       
-               }
-               ++ch1;  ++ch2;
-       }
-       return 1;
-}
-*//*
-int strcmp(const char *s1, const char *s2)
-{
-  register const unsigned char *ss1, *ss2;
-  for (ss1 = (const unsigned char*)s1, ss2 = (const unsigned char*)s2; *ss1 == *ss2 && *ss1 != '\0'; ss1++, ss2++);
-  return *ss1 - *ss2;
-}
-*/
-int strcmp(const char *s1, const char *s2)
-{
-       while (*s1 == *s2++)
-       {
-               if (*s1++ == 0)
-               {
-                       return (0);
-               }
-       }
-       return (*(unsigned char *)s1 - *(unsigned char *)--s2);
-}
-
-void strcpy(char* copy,const char* source)
-{
-       while(*source!='\0')
-       {
-               *copy=*source;
-               ++copy; ++source;
-       }
-       *copy='\0';
-       return;
-}
diff --git a/Kernel/string.o b/Kernel/string.o
deleted file mode 100644 (file)
index 4ae00b0..0000000
Binary files a/Kernel/string.o and /dev/null differ
diff --git a/Kernel/task.o b/Kernel/task.o
deleted file mode 100644 (file)
index fbaf0b5..0000000
Binary files a/Kernel/task.o and /dev/null differ
diff --git a/Kernel/time.c~ b/Kernel/time.c~
deleted file mode 100644 (file)
index ba62303..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-*time lib c functions
-*(C) 2014 VOSystems.
-*/
-
-#include<time.h>
-#include<stdio.h>
-/*
-struct tm* localtime(time_t* timer)
-{
-       struct tm* local;
-       
-}*/
-
-inline int hex2dec_bcd(int hex)
-{
-       int i,m,n=0;
-       m=hex/16;
-       if(0x0<=m && m<=0x9){
-               n+=m*10;
-       
-       }else{
-               n+=0;
-               
-       }
-       m=hex-m;
-       if(0x0<=m && m<=0x9){
-               n+=m;
-       
-       }else{
-               n+=0;
-               
-       }
-       return n;
-       /*
-       int i,m,n;
-       n=hex;
-       m=0;
-       for(i=0xFFFF;i>0;i/=16)
-       {
-               m+=n/i;
-               n-=m*i;
-               m*=10;
-       }
-       return m;*/
-}
diff --git a/Kernel/time.o b/Kernel/time.o
deleted file mode 100644 (file)
index fc19ecb..0000000
Binary files a/Kernel/time.o and /dev/null differ
diff --git a/Kernel/timer.o b/Kernel/timer.o
deleted file mode 100644 (file)
index dcc1aa4..0000000
Binary files a/Kernel/timer.o and /dev/null differ