Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codecs1/cpposengine
A toolkit (not really) use C++ as default language to create your own OS (read README.md for more info)
https://github.com/codecs1/cpposengine
Last synced: about 2 months ago
JSON representation
A toolkit (not really) use C++ as default language to create your own OS (read README.md for more info)
- Host: GitHub
- URL: https://github.com/codecs1/cpposengine
- Owner: CodeCs1
- License: mit
- Created: 2023-07-05T08:56:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-26T12:36:58.000Z (over 1 year ago)
- Last Synced: 2023-09-26T16:28:34.058Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 198 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# C++ Operating System Engine
**All grammars (including sentence) in this Readme file are completely wrong or incorrect.**
**You have been warned.**A toolkit (not really) that using C++ to create an OS.
![Alt cpposengine](misc/cpposengine.png)INFO: Some of the function in this Engine might not worked like:
ATA Harddrive, MBR, Sound driver, FAT, FileSystem, GUI (still in development).INFO: Debugger hasn't support yet.
*HOW TO BUILD* >*For Linux Only*<:
* 1: Extract zip file after you downloaded it (use Terminal , File Manager or Extractor programs).
* 2: Open the terminal, go to the project directory and type 'make' to build the project.
* 3: To install the project, run 'make install' or 'sudo make install'.*CODE*
```cpp
/*
#include
#include
#include
#include
*/
//For convenient, include this instead.
#includeclass Main : public kernel {
public:
void BeforeStart() override { //optional
//add code here
}
void Start() override { //important
//add code here
}
/*
to halt the kernel with custom code, use:
*/
void AfterStart() override { //also optional
//add code here
}
};extern "C" void main_kernel() { //this can be changed in boot.asm from source code
//Bacase the startup script isn't available, so put this code bellow
GDT::Init();
Interrupt::idt_install();
InterruptRequiests::Init();
InterruptServiceRoutines::Init();
Main main;
kernel* kernel = &main;
kernel->BeforeStart();
while(1) {
kernel->Start();
}
kernel->AfterStart();
}```
There is no builder yet, so use this command to build instead:
```
g++ -m32 -c .cpp -o .o -fno-stack-protector -fno-use-cxa-atexit -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-leading-underscore
ld -m elf_i386 -static -pie --no-dynamic-linker -T /linker.ld -o kernel.bin
```
* usually object_path is in /opt/CppOSEngine.
* if you install the program to another path, change object_path to your path.***SOME FILE (OR CODE) BASED ON OTHER GITHUB REPOSITORY , OFFICIAL OSDEV WEBSITE (wiki.osdev.org) AND osdever.net***
***THIS PROJECT USE MIT LICENSE***