Menu

Choices

2006-04-10
2013-04-19
  • Paul Barker

    Paul Barker - 2006-04-10

    I've got a quick question for you, after testing the kernel on bochs and finding it very buggy. It works one minute and not the next. Thats not a complaint just a fact of where the code is.

    The question is, are you planning to continue with the code you've got or start afresh with the new compiler. I don't see much point trying to iron out the bugs and get this working with GRUB if its all being replaced.

    I can give you a hand with a few things, but I have my own OS to work on and a lot of other things going on at the moment (like looking for a job). I'm happy to help, just don't expect a full-time developer.

    Hope everythings going well,
    Paul Barker

     
    • Nuno Miguel

      Nuno Miguel - 2006-04-19

      Hi there, sorry about the delay.

      Pehraps a bochs problem, configuration issue or such. Before i released the code, it was allways tested on bochs and at the final test, what the kernel was supposed to do, worked very well at it.

      I have been working on the compiler when i have the time and hope finish the spected functionality
      soon.
      An example code at this time for the compiler, is
      something like what you see in the bottom of the post.  
      About the question.
      As the code in this stage of development is understandble, i dont see why start a fresh code. As i said before, what i have in my mind is  to port the code to the compiler. But in meantine, it would be good stabilize the code, even organizing it more and add full kernel copy from floppy to ramdisk and a few other things i said in preview posts.
      Summaryzing, it will be good to have a strong code base to start from the real thing. :)

      yeah, i know.
      We all have other things to do in life.
      I will only expect what and where you prupose to help in development of the project. :)

      Good luck for the job!

      cheers

      /* Kernel Initialization */

      asm {
      "cli"

      "0xE492"
      "0x0C02"
      "0xEB00"
      "0xE692"

      "0xB0D1"
      "0xEB00"
      "0xE664"
      "0xB0DF"
      "0xEB00"
      "0xE660"
      "0xB0FF"
      "0xEB00"
      "0xE664"

      "0x0F01164D05"

      "0x0F20C0"
      "0x660D01000000"
      "0x0F22C0"
         
      "0xB81000"
      "0x8EC0"
      "0x8ED8"
      "0x8ED0"
      "0x8EE0"
      "0x8EE8"
      "0x66BC00500000"
      "0x66BD00500000"
      }

      class GDT {
          asm {
          "gdt_ptr@"
          "0x1700"
          "0x53050000"
          "gdt@"
          "0x0000000000000000"
          "0xFFFF000000"
          "10011011b"
          "11001111b"
          "0x00"
          "0xFFFF000000"
          "10010011b"
          "11001111b"
          "0x00"
          }
      }

      class Screen {
          int v;
          char value = 0x03;
          int mode = 0x0004 + value;
          void clear() {
              asm {
              "mov eax, $0x00000000"
              "mov ecx, $0x000B8FA0"
              "mov edi, $0x000B8000"
              "next_zero@"
              "mov [es:edi], eax"
              "inc edi"
              "inc edi"
              "inc edi"
              "inc edi"
              "cmp edi, ecx"
              "jne %next_zero"
              }
          }

          void writeText(char color,int line,int col,pointer text) {
              long scrpos = 0xB8000+160*line+2*col;
              asm {
              "mov edi, $scrpos"
              "mov esi, $text"
              "mov ah, $value"
              "next_char@"
              "mov al, [es:esi]"
              "mov [es:edi], ax"
              "inc edi"
              "inc edi"
              "inc esi"
              "cmp byte [es:esi], $0x00"
              "jne %next_char"
              }
              value = value + 1;
          }
         
          void readKey(int i) {
              asm {
              "check_key@"
              "in al, $0x60"
              "cmp al, $0x1C"
              "jne %check_key"
              }
              this.clear();
          }
      }

      main() {
          char mensage[] = {"The HeavenOS Compiler is working!...:)"};
          int num[] = {1,2,32,4,5,6,7,8,9};
          char color1 = 0x1E;
          char ascii = '>';
          int val1 = 0x01;
          int val2 = 1b;
          Screen scr;
          val1 = val1 + val2;
             scr.clear();
             scr.writeText(0x03,0x01,0x01,mensage);
             scr.writeText(0x03,0x02,0x01,mensage);
          scr.readKey(val2);
      }

       

       

Log in to post a comment.