Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualATC

Posted 29 October 2012 - 03:15 PM

As someone who's actually written a working OS before, I would recommend you don't even waste your time making this GUI "prototype" unless:

A) You already have experience and know how to write an OS

B) You have not completed A, so you stop what you're doing to complete A... lol


Writing an operating system is one of the most difficult programming tasks you could ever hope to do. But I do think you should do it! Not only is it fun but the things you will learn from it will make you twice the programmer you were before. It's an "academic" project I think every serious programmer should try. You're going to need intimate knowledge of not only C and C++ but also assembly language for the processor(s) you are targeting/supporting. Apart from that you need an extremely thorough understanding of memory and how the hardware you're targeting works. After all, you're programming not in "userland" but in Ring-0, where you have direct access to physical RAM and hardware.

When I say "direct access to physical memory" I mean that literally. For example, on x86 architecture when an OS is running in PMode (protected, 32-bit memory mode) with video memory in color text mode, the contents of video memory are in the address range 0x000B8000 to 0x000BFFFF. Want to write to video memory directly?

[source lang="cpp"]unsigned short* screen = (unsigned short *) 0xB8000;const char* str = "Hello, OS world!\0";char* pstr = (char *)str;for( ; *pstr != '\0'; ++pstr, ++screen) *screen = (unsigned short) (*pstr | 0x0700);[/source]

That's right... In Ring-0 you can cast any arbitrary unsigned integer into a pointer type and just directly read/write RAM. While this is extremely powerful, it can also be very "dangerous". If you don't know what you're writing where you could be corrupting important data or destroying bits of your kernel or critical system drivers in memory lol. So to develop any somewhat sophisticated operating system you'll need to implement a full-blown memory manager and implement a virtual memory. Hopefully that gives you an idea of how hard this is lol...

You're going to need to know pretty much everything about your CPU and hardware and how it all works to get anything done. For instance, do you know the significance of the address 0x007C00 on x86 architecture (place where BIOS loads bootloader)? There are tons of little ins and outs like that you must learn, and it takes a LOT of freakin time. Expect to be working on just getting a good bootloader and basic kernel started for several months if you're a beginner to OS programming. Your non-OS-related programming experience will be very helpful but cannot prepare you for what you're about to face. For example, you'll have to start coding your OS in C or assembly language. You cannot use C++ because you have no C++ runtime environment and no implementation of important language constructs like the new and delete operators. But oh wait, when you write your C code you can't use any of the C Standard Library because your OS doesn't have a CSTDLib yet! You've gotta write your own, complete with your own malloc and free implementations! :-)

So hopefully that makes it clear why I suggest you start learning OS programming instead of fooling around with a useless FLASH prototype that doesn't help you on your quest one bit. Worry about that prototype when you've got a good OS framework written and know what you're doing. Implementing good graphics and a GUI shell in your OS is an extremely advanced topic, and you will have had to write your own input drivers for mouse, keyboard, etc for it to be of any use... yes, that's another thing, you've gotta write your own drivers... you have to write everything yourself because a new OS project is a completely blank slate! XD

The quest you're about to embark upon is incredibly fun, as scary as my little speech might make it sound. And along the way it also gets very frustrating because there are virtually no resources available online or in book stores to help you. But I am here if you need some help. I'm not (by any means) a professional OS developer, but I know quite a bit about it from my past experience. I can provide you with learning resources and help coding (I've got some of my source saved on a USB flash drive). So feel free to pm me if you need any assistance. It's a topic I enjoy discussing because it's so "low-level" and intriguing!

Regards,

--ATC--

#6ATC

Posted 27 October 2012 - 03:22 PM

As someone who's actually written a working OS before, I would recommend you don't even waste your time making this GUI "prototype" unless:

A) You already have experience and know how to write an OS

B) You have not completed A, so you stop what you're doing to complete A... lol


Writing an operating system is one of the most difficult programming tasks you could ever hope to do. But I do think you should do it! Not only is it fun but the things you will learn from it will make you twice the programmer you were before. It's an "academic" project I think every serious programmer should try. You're going to need intimate knowledge of not only C and C++ but also assembly language for the processor(s) you are targeting/supporting. Apart from that you need an extremely thorough understanding of memory and how the hardware you're targeting works. After all, you're programming not in "userland" but in Ring-0, where you have direct access to physical RAM and hardware.

When I say "direct access to physical memory" I mean that literally. For example, on x86 architecture when an OS is running in PMode (protected, 32-bit memory mode) with video memory in color text mode, the contents of video memory are in the address range 0x000B8000 to 0x000BFFFF. Want to write to video memory directly?

[source lang="cpp"]char* screen = (char *) 0xB8000;const char* str = "Hello, OS world!\0";char* pstr = (char *)str;for( ; *pstr != '\0'; ++pstr, ++screen) *screen = *pstr;[/source]

That's right... In Ring-0 you can cast any arbitrary unsigned integer into a pointer type and just directly read/write RAM. While this is extremely powerful, it can also be very "dangerous". If you don't know what you're writing where you could be corrupting important data or destroying bits of your kernel or critical system drivers in memory lol. So to develop any somewhat sophisticated operating system you'll need to implement a full-blown memory manager and implement a virtual memory. Hopefully that gives you an idea of how hard this is lol...

You're going to need to know pretty much everything about your CPU and hardware and how it all works to get anything done. For instance, do you know the significance of the address 0x007C00 on x86 architecture (place where BIOS loads bootloader)? There are tons of little ins and outs like that you must learn, and it takes a LOT of freakin time. Expect to be working on just getting a good bootloader and basic kernel started for several months if you're a beginner to OS programming. Your non-OS-related programming experience will be very helpful but cannot prepare you for what you're about to face. For example, you'll have to start coding your OS in C or assembly language. You cannot use C++ because you have no C++ runtime environment and no implementation of important language constructs like the new and delete operators. But oh wait, when you write your C code you can't use any of the C Standard Library because your OS doesn't have a CSTDLib yet! You've gotta write your own, complete with your own malloc and free implementations! :-)

So hopefully that makes it clear why I suggest you start learning OS programming instead of fooling around with a useless FLASH prototype that doesn't help you on your quest one bit. Worry about that prototype when you've got a good OS framework written and know what you're doing. Implementing good graphics and a GUI shell in your OS is an extremely advanced topic, and you will have had to write your own input drivers for mouse, keyboard, etc for it to be of any use... yes, that's another thing, you've gotta write your own drivers... you have to write everything yourself because a new OS project is a completely blank slate! XD

The quest you're about to embark upon is incredibly fun, as scary as my little speech might make it sound. And along the way it also gets very frustrating because there are virtually no resources available online or in book stores to help you. But I am here if you need some help. I'm not (by any means) a professional OS developer, but I know quite a bit about it from my past experience. I can provide you with learning resources and help coding (I've got some of my source saved on a USB flash drive). So feel free to pm me if you need any assistance. It's a topic I enjoy discussing because it's so "low-level" and intriguing!

Regards,

--ATC--

#5ATC

Posted 26 October 2012 - 11:04 PM

As someone who's actually written a working OS before, I would recommend you don't even waste your time making this GUI "prototype" unless:

A) You already have experience and know how to write an OS

B) You have not completed A, so you stop what you're doing to complete A... lol


Writing an operating system is one of the most difficult programming tasks you could ever hope to do. But I do think you should do it! Not only is it fun but the things you will learn from it will make you twice the programmer you were before. It's an "academic" project I think every serious programmer should try. You're going to need intimate knowledge of not only C and C++ but also assembly language for the processor(s) you are targeting/supporting. Apart from that you need an extremely thorough understanding of memory and how the hardware you're targeting works. After all, you're programming not in "userland" but in Ring-0, where you have direct access to physical RAM and hardware.

When I say "direct access to physical memory" I mean that literally. For example, on x86 architecture when an OS is running in PMode (protected, 32-bit memory mode) with video memory in color text mode, the contents of video memory are in the address range 0x000B8000 to 0x000BFFFF. Want to write to video memory directly?

[source lang="cpp"]char* screen = (char *) 0xB8000;const char* str = "Hello, OS world!\0";char* pstr = (char *)str;for( ; *pstr != '\0'; ++pstr) *screen = *pstr;[/source]

That's right... In Ring-0 you can cast any arbitrary unsigned integer into a pointer type and just directly read/write RAM. While this is extremely powerful, it can also be very "dangerous". If you don't know what you're writing where you could be corrupting important data or destroying bits of your kernel or critical system drivers in memory lol. So to develop any somewhat sophisticated operating system you'll need to implement a full-blown memory manager and implement a virtual memory. Hopefully that gives you an idea of how hard this is lol...

You're going to need to know pretty much everything about your CPU and hardware and how it all works to get anything done. For instance, do you know the significance of the address 0x007C00 on x86 architecture (place where BIOS loads bootloader)? There are tons of little ins and outs like that you must learn, and it takes a LOT of freakin time. Expect to be working on just getting a good bootloader and basic kernel started for several months if you're a beginner to OS programming. Your non-OS-related programming experience will be very helpful but cannot prepare you for what you're about to face. For example, you'll have to start coding your OS in C or assembly language. You cannot use C++ because you have no C++ runtime environment and no implementation of important language constructs like the new and delete operators. But oh wait, when you write your C code you can't use any of the C Standard Library because your OS doesn't have a CSTDLib yet! You've gotta write your own, complete with your own malloc and free implementations! :-)

So hopefully that makes it clear why I suggest you start learning OS programming instead of fooling around with a useless FLASH prototype that doesn't help you on your quest one bit. Worry about that prototype when you've got a good OS framework written and know what you're doing. Implementing good graphics and a GUI shell in your OS is an extremely advanced topic, and you will have had to write your own input drivers for mouse, keyboard, etc for it to be of any use... yes, that's another thing, you've gotta write your own drivers... you have to write everything yourself because a new OS project is a completely blank slate! XD

The quest you're about to embark upon is incredibly fun, as scary as my little speech might make it sound. And along the way it also gets very frustrating because there are virtually no resources available online or in book stores to help you. But I am here if you need some help. I'm not (by any means) a professional OS developer, but I know quite a bit about it from my past experience. I can provide you with learning resources and help coding (I've got some of my source saved on a USB flash drive). So feel free to pm me if you need any assistance. It's a topic I enjoy discussing because it's so "low-level" and intriguing!

Regards,

--ATC--

#4ATC

Posted 26 October 2012 - 11:04 PM

As someone who's actually written a working OS before, I would recommend you don't even waste your time making this GUI "prototype" unless:

A) You already have experience and know how to write an OS

B) You have not completed A, so you stop what you're doing to complete A... lol


Writing an operating system is one of the most difficult programming tasks you could ever hope to do. But I do think you should do it! Not only is it fun but the things you will learn from it will make you twice the programmer you were before. It's an "academic" project I think every serious programmer should try. You're going to need intimate knowledge of not only C and C++ but also assembly language for the processor(s) you are targeting/supporting. Apart from that you need an extremely thorough understanding of memory and how the hardware you're targeting works. After all, you're programming not in "userland" but in Ring-0, where you have direct access to physical RAM and hardware.

When I say "direct access to physical memory" I mean that literally. For example, on x86 architecture when an OS is running in PMode (protected, 32-bit memory mode) with video memory in color text mode, the contents of video memory are in the address range 0x000B8000 to 0x000BFFFF. Want to write to video memory directly?

[source lang="cpp"]char* screen = (char *) 0xB8000;const char* str = "Hello, OS world!\0";char* pstr = (char *)str;for( int i = 0; *(pstr++) != '\0'; ++i) *screen = *pstr;[/source]

That's right... In Ring-0 you can cast any arbitrary unsigned integer into a pointer type and just directly read/write RAM. While this is extremely powerful, it can also be very "dangerous". If you don't know what you're writing where you could be corrupting important data or destroying bits of your kernel or critical system drivers in memory lol. So to develop any somewhat sophisticated operating system you'll need to implement a full-blown memory manager and implement a virtual memory. Hopefully that gives you an idea of how hard this is lol...

You're going to need to know pretty much everything about your CPU and hardware and how it all works to get anything done. For instance, do you know the significance of the address 0x007C00 on x86 architecture (place where BIOS loads bootloader)? There are tons of little ins and outs like that you must learn, and it takes a LOT of freakin time. Expect to be working on just getting a good bootloader and basic kernel started for several months if you're a beginner to OS programming. Your non-OS-related programming experience will be very helpful but cannot prepare you for what you're about to face. For example, you'll have to start coding your OS in C or assembly language. You cannot use C++ because you have no C++ runtime environment and no implementation of important language constructs like the new and delete operators. But oh wait, when you write your C code you can't use any of the C Standard Library because your OS doesn't have a CSTDLib yet! You've gotta write your own, complete with your own malloc and free implementations! :-)

So hopefully that makes it clear why I suggest you start learning OS programming instead of fooling around with a useless FLASH prototype that doesn't help you on your quest one bit. Worry about that prototype when you've got a good OS framework written and know what you're doing. Implementing good graphics and a GUI shell in your OS is an extremely advanced topic, and you will have had to write your own input drivers for mouse, keyboard, etc for it to be of any use... yes, that's another thing, you've gotta write your own drivers... you have to write everything yourself because a new OS project is a completely blank slate! XD

The quest you're about to embark upon is incredibly fun, as scary as my little speech might make it sound. And along the way it also gets very frustrating because there are virtually no resources available online or in book stores to help you. But I am here if you need some help. I'm not (by any means) a professional OS developer, but I know quite a bit about it from my past experience. I can provide you with learning resources and help coding (I've got some of my source saved on a USB flash drive). So feel free to pm me if you need any assistance. It's a topic I enjoy discussing because it's so "low-level" and intriguing!

Regards,

--ATC--

#3ATC

Posted 26 October 2012 - 11:02 PM

As someone who's actually written a working OS before, I would recommend you don't even waste your time making this GUI "prototype" unless:

A) You already have experience and know how to write an OS

B) You have not completed A, so you stop what you're doing to complete A... lol


Writing an operating system is one of the most difficult programming tasks you could ever hope to do. But I do think you should do it! Not only is it fun but the things you will learn from it will make you twice the programmer you were before. It's an "academic" project I think every serious programmer should try. You're going to need intimate knowledge of not only C and C++ but also assembly language for the processor(s) you are targeting/supporting. Apart from that you need an extremely thorough understanding of memory and how the hardware you're targeting works. After all, you're programming not in "userland" but in Ring-0, where you have direct access to physical RAM and hardware.

When I say "direct access to physical memory" I mean that literally. For example, on x86 architecture when an OS is running in PMode (protected, 32-bit memory mode) with video memory in color text mode, the contents of video memory are in the address range 0x000B8000 to 0x000BFFFF. Want to write to video memory directly?

[source lang="cpp"]char* videoMem = (char *) 0xB8000;const char* str = "Hello, world from my OS!\0";for( int i = 0; str!= [i]'[/i]\0';++i )[i] [/i]*videoMem = str;[/source]

That's right... In Ring-0 you can cast any arbitrary unsigned integer into a pointer type and just directly read/write RAM. While this is extremely powerful, it can also be very "dangerous". If you don't know what you're writing where you could be corrupting important data or destroying bits of your kernel or critical system drivers in memory lol. So to develop any somewhat sophisticated operating system you'll need to implement a full-blown memory manager and implement a virtual memory. Hopefully that gives you an idea of how hard this is lol...

You're going to need to know pretty much everything about your CPU and hardware and how it all works to get anything done. For instance, do you know the significance of the address 0x007C00 on x86 architecture (place where BIOS loads bootloader)? There are tons of little ins and outs like that you must learn, and it takes a LOT of freakin time. Expect to be working on just getting a good bootloader and basic kernel started for several months if you're a beginner to OS programming. Your non-OS-related programming experience will be very helpful but cannot prepare you for what you're about to face. For example, you'll have to start coding your OS in C or assembly language. You cannot use C++ because you have no C++ runtime environment and no implementation of important language constructs like the new and delete operators. But oh wait, when you write your C code you can't use any of the C Standard Library because your OS doesn't have a CSTDLib yet! You've gotta write your own, complete with your own malloc and free implementations! :-)

So hopefully that makes it clear why I suggest you start learning OS programming instead of fooling around with a useless FLASH prototype that doesn't help you on your quest one bit. Worry about that prototype when you've got a good OS framework written and know what you're doing. Implementing good graphics and a GUI shell in your OS is an extremely advanced topic, and you will have had to write your own input drivers for mouse, keyboard, etc for it to be of any use... yes, that's another thing, you've gotta write your own drivers... you have to write everything yourself because a new OS project is a completely blank slate! XD

The quest you're about to embark upon is incredibly fun, as scary as my little speech might make it sound. And along the way it also gets very frustrating because there are virtually no resources available online or in book stores to help you. But I am here if you need some help. I'm not (by any means) a professional OS developer, but I know quite a bit about it from my past experience. I can provide you with learning resources and help coding (I've got some of my source saved on a USB flash drive). So feel free to pm me if you need any assistance. It's a topic I enjoy discussing because it's so "low-level" and intriguing!

Regards,

--ATC--

#2ATC

Posted 26 October 2012 - 11:00 PM

As someone who's actually written a working OS before, I would recommend you don't even waste your time making this GUI "prototype" unless:

A) You already have experience and know how to write an OS

B) You have not completed A, so you stop what you're doing to complete A... lol


Writing an operating system is one of the most difficult programming tasks you could ever hope to do. But I do think you should do it! Not only is it fun but the things you will learn from it will make you twice the programmer you were before. It's an "academic" project I think every serious programmer should try. You're going to need intimate knowledge of not only C and C++ but also assembly language for the processor(s) you are targeting/supporting. Apart from that you need an extremely thorough understanding of memory and how the hardware you're targeting works. After all, you're programming not in "userland" but in Ring-0, where you have direct access to physical RAM and hardware.

When I say "direct access to physical memory" I mean that literally. For example, on x86 architecture when an OS is running in PMode (protected, 32-bit memory mode) with video memory in color text mode, the contents of video memory are in the address range 0x000B8000 to 0x000BFFFF. Want to write to video memory directly?

[source lang="cpp"]char* videoMem = (char *) 0xB8000;const char* str = "Hello, world from my OS!\0";for( int i = 0; str[i] != '\0'; ++i) *screen = str[i];[/i][/i][/source]

That's right... In Ring-0 you can cast any arbitrary unsigned integer into a pointer type and just directly read/write RAM. While this is extremely powerful, it can also be very "dangerous". If you don't know what you're writing where you could be corrupting important data or destroying bits of your kernel or critical system drivers in memory lol. So to develop any somewhat sophisticated operating system you'll need to implement a full-blown memory manager and implement a virtual memory. Hopefully that gives you an idea of how hard this is lol...

You're going to need to know pretty much everything about your CPU and hardware and how it all works to get anything done. For instance, do you know the significance of the address 0x007C00 on x86 architecture (place where BIOS loads bootloader)? There are tons of little ins and outs like that you must learn, and it takes a LOT of freakin time. Expect to be working on just getting a good bootloader and basic kernel started for several months if you're a beginner to OS programming. Your non-OS-related programming experience will be very helpful but cannot prepare you for what you're about to face. For example, you'll have to start coding your OS in C or assembly language. You cannot use C++ because you have no C++ runtime environment and no implementation of important language constructs like the new and delete operators. But oh wait, when you write your C code you can't use any of the C Standard Library because your OS doesn't have a CSTDLib yet! You've gotta write your own, complete with your own malloc and free implementations! :-)

So hopefully that makes it clear why I suggest you start learning OS programming instead of fooling around with a useless FLASH prototype that doesn't help you on your quest one bit. Worry about that prototype when you've got a good OS framework written and know what you're doing. Implementing good graphics and a GUI shell in your OS is an extremely advanced topic, and you will have had to write your own input drivers for mouse, keyboard, etc for it to be of any use... yes, that's another thing, you've gotta write your own drivers... you have to write everything yourself because a new OS project is a completely blank slate! XD

The quest you're about to embark upon is incredibly fun, as scary as my little speech might make it sound. And along the way it also gets very frustrating because there are virtually no resources available online or in book stores to help you. But I am here if you need some help. I'm not (by any means) a professional OS developer, but I know quite a bit about it from my past experience. I can provide you with learning resources and help coding (I've got some of my source saved on a USB flash drive). So feel free to pm me if you need any assistance. It's a topic I enjoy discussing because it's so "low-level" and intriguing!

Regards,

--ATC--

PARTNERS