chrisstopher Posted October 28, 2020 Posted October 28, 2020 i know java and python what other languages would i need to make my own operating system
ahmet Posted October 28, 2020 Posted October 28, 2020 I might recommend not to think so much complex. because as far as I know or even can predict,that was not a thing just one person could do.
Sensei Posted October 28, 2020 Posted October 28, 2020 40 minutes ago, chrisstopher said: i know java and python what other languages would i need to make my own operating system Machine code, Assembler, C. For higher levels of OS C++.
studiot Posted October 28, 2020 Posted October 28, 2020 (edited) You must first learn the connection between the instruction set of the microprocessor you are proposing to use and the physical 'pinout' of that microprocessor, unless your m/p comes with an inbuilt language, in which case you need to learn that, but you will still need the pinout. A microcomputer implementation has several blocks in its block diagram (Have you seen a block diagram). These involve the processor or CPU, input and output, storage, sensors and more. 20 minutes ago, chrisstopher said: guess ill be learning c++ Please note that you have a maximum of 5 posts in your first 24 hours. You are now up to 4 so use the last one more wisely. Edited October 28, 2020 by studiot
fiveworlds Posted October 28, 2020 Posted October 28, 2020 You can build a Linux distribution easily enough and then make a custom Desktop for it.
Sensei Posted October 28, 2020 Posted October 28, 2020 (edited) 3 hours ago, ahmet said: because as far as I know or even can predict,that was not a thing just one person could do. ..making OS is easy.. Nowadays you know what you have to do. Don't have to design and think about how to do it. Everybody who were writing code in '80 were doing so (they were force to do so!).. any '80 application/game, and some early '90, were intercepting entire functionality of the computer, having to deal with hardware registers (and the all external devices) and program them by themselves.. etc. etc. At that time, entire OS could fit in 4 KB, 8 KB, 16 KB of ROM. Don't tell me you cannot code 16384 bytes of machine code? Seriously? I could write OS in a few hours. In '80-'90 years I was writing 500+ lines of machine code in a few hours. The only limit is amount of beer and pizza around me.. Currently what is considered "OS" is extremely (EXTREMELY) overbloated.. Nowadays, "OS" has built-in TCP/IP stack.. (check when Windows get TCP/IP stack, and then MacOS get TCP/IP stack built-in) Nowadays, "OS" has built-in Internet browser.. (check when Windows get IE, and then MacOS get web browser built-in) Nowadays, "OS" has built-in FTP client.. Nowadays, "OS" has built-in simple text editor (NotePad) and more complex text editor (WordPad).. etc. etc. 2 hours ago, fiveworlds said: You can build a Linux distribution easily enough and then make a custom Desktop for it. ..but it won't be "your OS".. you made almost nothing in it.. Edited October 28, 2020 by Sensei 1
studiot Posted October 28, 2020 Posted October 28, 2020 19 minutes ago, Sensei said: .but it won't be "your OS".. you made almost nothing in it.. Yes it depends how much the OP want to do for himself and what exactly is meant by an operating system. +1 for raising the subject.
Sensei Posted October 28, 2020 Posted October 28, 2020 (edited) 25 minutes ago, studiot said: Yes it depends how much the OP want to do for himself and what exactly is meant by an operating system. ..for me it is handling peripheral devices (app should not talk directly to peripheral devices because of security concerns).. allocation of memory.. creation threads and processes and running in virtual environment (after introduction of MMU in CPUs).. devices infrastructure.. external libraries infrastructure.. file systems (on higher-level of drive devices).. low-level gfx (higher-level of gfx driver; DirectX/Direct3D equivalent).. low-level sfx (higher-level of sfx driver; DirectX/DirectSound equivalent).. GUI.. networking (higher-level of networking devices) etc. etc. Higher levels of OS are built on the top of lower levels, like onion. Typical modern app programmer is often recreating the all these things in C++ classes, to have environment which is independent of platform. i.e. instead of making thread by WinAPI CreateThread() one will use wrapper, which will call OS-specific function instead. Then use C++ wrapper class. Edited October 28, 2020 by Sensei
ahmet Posted October 28, 2020 Posted October 28, 2020 (edited) @Sensei it might be either correct or not. I think I have not sufficient knowledge in order to make a meaningful recommendation but I sometimes visit software forums and in turkey ,whenever I come across with such queries,it is directly being said that that question was not a meaningful query also, they do reommend not to think so much complex. like this: First do simple things and then great things. however, I think 500 line a program might even be not easy too (even in html+js page) because its organize might also be complex but of course ...this depends on you and your capacity (to whom you say). of course we have to respect every ideas. Edited October 28, 2020 by ahmet crude proofread
studiot Posted October 28, 2020 Posted October 28, 2020 34 minutes ago, ahmet said: I think 500 line a program might even be not easy too (even in html+js page) because its organize might also be complex Sensei is correct. In the days when working memory was severely limited people prided themselves in how small ther program (now called app) was. Now nobody care how wasteful modern programming is. Just consider the plight of an IT department that tries to get someone to clear out their Email box. Sensei was also talking about machine code, and somebody has to write the interface code between the hardware and the software. Most 'programmers' find this the most difficult part to do. Yet hardware designers are accustomed to doing this as a matter of coursen with all sorts of electronics kit, from MigL's days to modern times.
Sensei Posted October 28, 2020 Posted October 28, 2020 (edited) 1 hour ago, ahmet said: they do recommend not to think so much complex. like this: First do simple things and then great things. Well, it is good recommendation. But you also have to have constant progress of learning. I think the best progress is during making the real projects. Set pressure on yourself. e.g. one project per week. Instead of downloading ready app from Internet/Google Play Store, write it by yourself. In '80 if you didn't rewrite code in machine code or assembler it was simply too slow, painful or impossible to make other way.. So it made high pressure on programmer to rewrite (and learn machine code in the first place). If anybody wanted to have mouse support in app on my computer, had to write it in machine code. High level language had no support for hardware interrupts, and even if it would have, handling them would be too slow. Programmer had to do it in just a few cycles of CPU. ~1.79 MHz CPU clock and interrupt executed every 57 cycles of cpu at rate ~ 32k per second.. mostly counting down variable to lower frequency than 32 khz... Making it in anything else than machine code would mean stealing the whole processing power of CPU just to handle mouse movements.. Modern computer has DMA, has hardware support for mouse, has hardware support for countless obvious now things. They were novelty 30 years ago. Programmer does not anymore have to deal with it at so low level. But if you would like to have e.g. mouse support on e.g. Arduino (i.e. machine not designed to support it) you would have to deal the same old-school way as in '80. Look at some example Arduino library code. Code can countdown and query hardware register. Countdown and query. Like thirty years ago we used to prior DMA.. 1 hour ago, studiot said: In the days when working memory was severely limited people prided themselves in how small ther program (now called app) was. There were (and still are) competitions to make ultra small code. "Intros". They are machine code loaders. Unpacks the real code from initial 1kb, 4kb, 64kb. Unpacked code later generates procedural textures which imitates the real photos (instead of loading them). Edited October 28, 2020 by Sensei
studiot Posted October 28, 2020 Posted October 28, 2020 26 minutes ago, Sensei said: Making it in anything else than machine code would mean stealing the whole processing power of CPU just to handle mouse movements. I learned Forth in the 1980s to get around just this problem.
MigL Posted October 28, 2020 Posted October 28, 2020 (edited) 2 hours ago, studiot said: I learned Forth in the 1980s So did I ( but I wasn't foolish enough to attempt writing an OS ). Now who's waxing nostalgic ? Edited October 28, 2020 by MigL
studiot Posted October 29, 2020 Posted October 29, 2020 12 hours ago, MigL said: So did I ( but I wasn't foolish enough to attempt writing an OS ). Now who's waxing nostalgic ? Forth is just one of the reasons I have such a jaundiced view of arguments about programming languages. I've seen them come and I've seen them go And the cycle repeats And each cycle the same mistakes repeat.
Sensei Posted October 29, 2020 Posted October 29, 2020 20 minutes ago, studiot said: And each cycle the same mistakes repeat. For example? 1
Markus Hanke Posted October 29, 2020 Posted October 29, 2020 13 hours ago, MigL said: Now who's waxing nostalgic ? Me The first PC (if you can call it that) I ever owned was a Commodore C16, featuring...wait for it...16kb of RAM. Yes, that's kilobytes. Taught myself BASIC back then...later I progressed to a ZX Sinclair, then to an Atari ST, where I taught myself C, MODULA-2, PASCAL, Assembler, and Lisp. Very nostalgic memories of spending days and nights trying to implement things that programmers nowadays would only laugh at! Was a great time, though. 1
dimreepr Posted October 29, 2020 Posted October 29, 2020 35 minutes ago, Markus Hanke said: Me The first PC (if you can call it that) I ever owned was a Commodore C16, featuring...wait for it...16kb of RAM. Yes, that's kilobytes. Taught myself BASIC back then...later I progressed to a ZX Sinclair, then to an Atari ST, where I taught myself C, MODULA-2, PASCAL, Assembler, and Lisp. Very nostalgic memories of spending days and nights trying to implement things that programmers nowadays would only laugh at! Was a great time, though. Great days... Cruising the stores and filling all the screens with <insert inappropriate sentence here>. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now