Themabewertung:
  • 33 Bewertung(en) - 3.97 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Total Spam
Beitrag: #65.021
vom - RE: Total Spam
ok, klingt nach nem fairen Deal :3

Suchen
Zitieren

Beitrag: #65.022
vom - RE: Total Spam
[Video: http://www.youtube.com/watch?v=-EKWWRd-Wvk]

[Bild: pinkieboxi9rjx7.png]
Suchen
Zitieren

Beitrag: #65.023
vom - RE: Total Spam
Big Grin Big Grin Big Grin

bah... ich dös heut dauernd ein... hab letzte Nacht eindeutig zu wenig geschlafen D:

Suchen
Zitieren

Beitrag: #65.024
vom - RE: Total Spam
Hmm, kompiliert krig ichs...
Code:
/**
*   MTGos - LowLevel OS
*   Copyright (C) 2013 Morten Delenk
*
*   This program is free software: you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation, either version 3 of the License, or
*   (at your option) any later version.
*
*   This program is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details.
*
*   You should have received a copy of the GNU General Public License
*   along with this program.  If not, see <http://www.gnu.org/licenses/>.
*   Please Read "LICENSE" for the Complete License
**/
#include "Video.hpp" // Video Klasse
#include "multiboot.hpp" // Multiboot header
unsigned long long gdt[7]; // Die GDT long long array
unsigned long long idt[256]; // Das IDT long long array
extern "C" void set_entry(int i, unsigned int base, unsigned int limit, int flags); // GDT Entry
extern "C" void new_int(int i,unsigned int offset, unsigned int Selector, unsigned int flags); // IDT Entry
extern "C" void kernelMain(const Multiboot& multiboot_structur, unsigned int multiboot_magic); // Main
extern "C" void divide_zero(); // Interrupt 0
extern "C" void FATAL(); // Interrupt 2
struct {
    unsigned short limit; // Pointer
    void * pointer;
  } PACKED gdtp; //GDT
void kernelMain(const Multiboot& multiboot_structur, unsigned int multiboot_magic)
{
  screen << "[INFO] Set Up GDT\n"; // Info
  set_entry(0,0,0,0); //Nullsegment
  set_entry(1,0,0xFFFF,0x9A); //Kernel-Codesegment
  set_entry(2,0,0xFFFF,0x92); //Kernel-Datensegment
  set_entry(3,0,0xFFFF,0xFA); //User-Codesegment
  set_entry(4,0,0xFFFF,0xF2); //User-Datensegment
  set_entry(5,0,0xFFFF,0xE9); //TSS
  set_entry(6,0,0xFFFF,0xE9); //TSS
  gdtp.limit=7*8-1; // länge
  gdtp.pointer=gdt; // gdt pointer
  asm volatile("lgdt %0" : : "m" (gdtp)); // Eingabe
  screen << "[INFO] GDT setted\n"; // Info
  FATAL(); // Fehler
  int zeiger=divide_zero; // Interrupt 0
  new_int(0,zeiger,1,0xF7); // Setze
  zeiger=FATAL; // Interrupt 2
  new_int(2,zeiger,1,0x97); //setze
  
  for(;;); // cli; hlt
}
void set_entry(int i, unsigned int base, unsigned int limit, int flags)
{
  gdt[i]=limit&0xFFFFLL;
  gdt[i]|=(base&0xFFFFFFLL)<<16;
  gdt[i]|=(flags&0xFFLL)<<40;
  gdt[i]|=((limit>>16) & 0xFLL) << 48;
  gdt[i]|=((flags>>8)&0xFFLL)<<52;
  gdt[i]|=((base>>24)&0xFFLL)<<56;
}
void new_int(int i, unsigned int offset, unsigned int Selector, unsigned int flags)
{
  idt[i]=offset&0xFFFFLL;
  idt[i]|=(Selector&0xFFFFLL)<<16;
  idt[i]|=(flags&0xFFLL)<<40;
  idt[i]|=((offset>>16)&0xFFFF)<<48;
}
void divide_zero()
{
  screen << "[WARNING] Divide by Zero!\n";
  asm("int $0x04;iret");
}
void FATAL()
{
  screen << background(color::blue) << color::white << "                              " << background(color::white) << color::blue << "FATAL ERROR" << background(color::blue) << color::white << "\nMTGos has stopped running because it encountered a Problem:\n";
  screen << "UNKNOWN FATAL ERROR\n";
  asm(".p:\n\tcli;hlt;jmp .p");
}
(Dieser Beitrag wurde zuletzt bearbeitet: 01.05.2013, 17:56 von darklink. )
Die Playstation ist ein bisschen besser als der Philips CDi. DAS sollte NICHT als Lob interpretiert werden!^^
Homepage Suchen
Zitieren

Beitrag: #65.025
vom - RE: Total Spam
Puh.

[Bild: sApzrQ5.png]
Suchen
Zitieren

Beitrag: #65.026
vom - RE: Total Spam
Mr. Mortens Sources ohne Kommis :P
(01.05.2013, 17:37)Morten schrieb: Hmm, kompiliert krig ichs...
Code:
/**
*   MTGos - LowLevel OS
*   Copyright (C) 2013 Morten Delenk
*
*   This program is free software: you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation, either version 3 of the License, or
*   (at your option) any later version.
*
*   This program is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details.
*
*   You should have received a copy of the GNU General Public License
*   along with this program.  If not, see <http://www.gnu.org/licenses/>.
*   Please Read "LICENSE" for the Complete License
**/
#include "Video.hpp" // Video Klasse
#include "multiboot.hpp" // Multiboot header
unsigned long long gdt[7]; // Die GDT long long array
unsigned long long idt[256]; // Das IDT long long array
extern "C" void set_entry(int i, unsigned int base, unsigned int limit, int flags); // GDT Entry
extern "C" void new_int(int i,unsigned int offset, unsigned int Selector, unsigned int flags); // IDT Entry
extern "C" void kernelMain(const Multiboot& multiboot_structur, unsigned int multiboot_magic); // Main
extern "C" void divide_zero(); // Interrupt 0
extern "C" void FATAL(); // Interrupt 2
struct {
    unsigned short limit; // Pointer
    void * pointer;
  } PACKED gdtp; //GDT
void kernelMain(const Multiboot& multiboot_structur, unsigned int multiboot_magic)
{
  screen << "[INFO] Set Up GDT\n"; // Info
  set_entry(0,0,0,0); //Nullsegment
  set_entry(1,0,0xFFFF,0x9A); //Kernel-Codesegment
  set_entry(2,0,0xFFFF,0x92); //Kernel-Datensegment
  set_entry(3,0,0xFFFF,0xFA); //User-Codesegment
  set_entry(4,0,0xFFFF,0xF2); //User-Datensegment
  set_entry(5,0,0xFFFF,0xE9); //TSS
  set_entry(6,0,0xFFFF,0xE9); //TSS
  gdtp.limit=7*8-1; // länge
  gdtp.pointer=gdt; // gdt pointer
  asm volatile("lgdt %0" : : "m" (gdtp)); // Eingabe
  screen << "[INFO] GDT setted\n"; // Info
  FATAL(); // Fehler
  int zeiger=divide_zero; // Interrupt 0
  new_int(0,zeiger,1,0xF7); // Setze
  zeiger=FATAL; // Interrupt 2
  new_int(2,zeiger,1,0x97); //setze
  
  for(;;); // cli; hlt
}
void set_entry(int i, unsigned int base, unsigned int limit, int flags)
{
  gdt[i]=limit&0xFFFFLL;
  gdt[i]|=(base&0xFFFFFFLL)<<16;
  gdt[i]|=(flags&0xFFLL)<<40;
  gdt[i]|=((limit>>16) & 0xFLL) << 48;
  gdt[i]|=((flags>>8)&0xFFLL)<<52;
  gdt[i]|=((base>>24)&0xFFLL)<<56;
}
void new_int(int i, unsigned int offset, unsigned int Selector, unsigned int flags)
{
  idt[i]=offset&0xFFFFLL;
  idt[i]|=(Selector&0xFFFFLL)<<16;
  idt[i]|=(flags&0xFFLL)<<40;
  idt[i]|=((offset>>16)&0xFFFF)<<48;
}
void divide_zero()
{
  screen << "[WARNING] Divide by Zero!\n";
  asm("int $0x04;iret");
}
void FATAL()
{
  screen << background(color::blue) << color::white << "                              " << background(color::white) << color::blue << "FATAL ERROR" << background(color::blue) << color::white << "\nMTGos has stopped running because it encountered a Problem:\n";
  screen << "UNKNOWN FATAL ERROR\n";
  asm(".p:\n\tcli;hlt;jmp .p");
}
Jetzt mit Kommi s :P
19:00
(Dieser Beitrag wurde zuletzt bearbeitet: 01.05.2013, 18:03 von darklink. )
Die Playstation ist ein bisschen besser als der Philips CDi. DAS sollte NICHT als Lob interpretiert werden!^^
Homepage Suchen
Zitieren

Beitrag: #65.027
vom - RE: Total Spam
blah

Suchen
Zitieren

Beitrag: #65.028
vom - RE: Total Spam
Ich bin satt und happy und müde. :3

[Bild: fedSKM4.png]
|| Wir suchen neue Mitglieder, PN an mich!||
Suchen
Zitieren

Beitrag: #65.029
vom - RE: Total Spam
Morgen.

[Bild: sApzrQ5.png]
Suchen
Zitieren

Beitrag: #65.030
vom - RE: Total Spam
Vorerst zu Hause!
Was ein Wetter draußen!

[Bild: sApzrQ5.png]
Suchen
Zitieren



Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 275 Gast/Gäste