This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| i686-elf-g++ -m32 -g -Iinclude -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings -o kernel.o -c kernel.cc -ffreestanding | |
| i686-elf-g++ -m32 -g -Iinclude -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore -Wno-write-strings -o gdt.o -c gdt.c++ | |
| In file included from gdt.h:5:0, | |
| from gdt.c++:1: | |
| /home/amanuel/Os_Dev_Tut/barebones-toolchain/cross/x86_64/lib/gcc/i686-elf/4.9.2/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory | |
| # include_next <stdint.h> | |
| ^ | |
| compilation terminated. | |
| Makefile:7: recipe for target 'all' failed | |
| make: *** [all] Error 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Port | |
| { | |
| protected: | |
| uint16_t port_number; | |
| Port(uint16_t port_number); | |
| ~Port(); | |
| } | |
| class Port8Bits : public Port | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream.h> | |
| /* Abstract base class declared by framework */ | |
| class Document | |
| { | |
| public: | |
| Document(char *fn) | |
| { | |
| strcpy(name, fn); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Stooge { | |
| public: | |
| virtual Stooge* clone() = 0; | |
| virtual void slap_stick() = 0; | |
| }; | |
| class Factory { | |
| public: | |
| static Stooge* make_stooge( int choice ); | |
| private: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| #include <stdlib.h> | |
| using namespace std; | |
| class Number | |
| { | |
| public: | |
| // 2. Define a public static accessor func | |
| static Number *instance(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Function: | |
| void SerialPort::initalize_serial() | |
| { | |
| p8b.out(PORT + 1, (uint16_t)0x00); /* Disable interrupts */ | |
| p8b.out(PORT + 3, (uint16_t)0x80); /* Enable divisor mode */ | |
| p8b.out(PORT + 0, (uint16_t)0x01); /* Div Low: 01 Set the port to 115200 bps */ | |
| p8b.out(PORT + 1, (uint16_t)0x00); /* Div High: 00 */ | |
| p8b.out(PORT + 3, (uint16_t)0x03); /* Disable divisor mode, set parity */ | |
| p8b.out(PORT + 2, (uint16_t)0xC7); /* Enable FIFO and clear */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <title>Chapter 5: Example 2</title> | |
| <script type="text/javascript"> | |
| function checkCharType(charToCheck) | |
| { | |
| var returnValue = "O"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //interrupt.h++ | |
| #ifndef _INTERUPT_H_ | |
| #define _INTERUPT_H_ 1 | |
| #include "types.h++" | |
| #include "stdio.h++" | |
| #include <stdint.h> | |
| namespace CPU | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EAX=00000000 EBX=f000ff53 ECX=f000e2c3 EDX=2444c667 | |
| ESI=f000ff53 EDI=f000ff53 EBP=02e2c166 ESP=ffffffd0 | |
| EIP=448d6667 EFL=00000046 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0 | |
| ES =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA] | |
| CS =0008 00000000 ffffffff 00cf9a00 DPL=0 CS32 [-R-] | |
| SS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA] | |
| DS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA] | |
| FS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA] | |
| GS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA] | |
| LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #No Interupts Even after interntional int x = 5/0; in Kernel.c++ | |
| common_handler: | |
| # save registers | |
| pusha | |
| pushl %ds | |
| pushl %es | |
| pushl %fs | |
| pushl %gs |