![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-01 18:37 |
48,037 topics / 350,122 posts / today 2 new / 48,249 members |
| DOS开发编程 & 发展交流 (开发室) » [Original] Implementation of Operating Systems |
| Printable Version 2,938 / 16 |
| Floor1 xy_god | Posted 2003-10-08 00:00 |
| 中级用户 Posts 56 Credits 276 | |
|
em07]Hehe, everyone, actually this is very simple! I remember when I first got in touch with computers, I always wanted to make an operating system! But no one taught me back then, and I was very depressed! But I didn't want everyone to keep being depressed like that, otherwise our operating system would never come out, hehe!
OK, now I'll tell you how to implement an operating system! The first step, everyone's most confused thing might be how to implement a self-booting program?! Actually, the principle of self-booting is very simple. Write 55AA (hexadecimal) in the last 2 bytes of sector 1, track 0 of the floppy disk, and then write machine code in the preceding bytes, and then the computer will execute it! Note that when calling interrupts, don't call DOS soft interrupts, otherwise the computer will crash, because at this time we are independent of any operating system, and those interrupts we haven't filled in yet, hehe! The second step, of course, is to design a disk file system format by yourself, so as to manage the disk! Beginners, pay attention! Folders are actually designed as pointers, because on the disk file system, folders are a dynamically changing structure, and each folder stores many pointers, pointing to the addresses of other files or folders! Third, how to implement process calls! Actually, in real mode, it's very simple. You can get the machine code from the disk file, then load it into memory (remember the memory address at this time, including CS, IP), and then use the PUSH instruction and RET instruction, and the code will be loaded into memory. If it's not an illegal instruction, it will execute smoothly, hehe! OK, the most important things of the operating system have been implemented, namely the file system and the process loader! Actually, these things have been implemented on my machine, but they are still very rudimentary, not as easy to use as DOS! In fact, a lot of materials I found on the Internet, then read and did experiments, and finally designed by myself! Unfortunately, everything is implemented by myself, and there is no one to cooperate with me... Pain... |
|
| Floor2 xy_god | Posted 2003-10-08 00:00 |
| 中级用户 Posts 56 Credits 276 | |
|
To obtain machine code, I'm using ULTRA EDIT! Actually, as long as you understand the MZ file format, it's okay! You can also use DEBUG, if you don't mind the trouble!
|
|
| Floor3 qb45 | Posted 2003-10-09 00:00 |
| 高级用户 Posts 194 Credits 677 | |
|
If that's the case, xy_god, it's a very simple thing for you to write a master boot record virus! In fact, some software such as "Return Genius" and multi-system booting and so on have rewritten the master boot record. First, move the content of the master boot record to another place, (or use a jump instruction to execute and then come back), execute your own code and then execute the code of the master boot record!
|
|
| Floor4 xy_god | Posted 2003-10-10 00:00 |
| 中级用户 Posts 56 Credits 276 | |
|
Actually, one of the motivations for me to learn these things back then was to make something like a virus or something!
|
|
| Floor5 iceboy | Posted 2003-10-10 00:00 |
| 银牌会员 Posts 512 Credits 1,681 | |
|
If you make an operating system compatible with DOS, then you don't have to worry about "no one cooperating with me"...
Or it will be as difficult as the beginning of Unix. |
|
| Floor6 qb45 | Posted 2003-10-10 00:00 |
| 高级用户 Posts 194 Credits 677 | |
|
Actually, it's almost impossible for one person to write an operating system!
I think xy_god is still at the stage of making houses to 30% in "Empire: Rise of Rome"! |
|
| Floor7 cn_archer | Posted 2003-10-11 00:00 |
| 元老会员 Posts 991 Credits 2,903 From 福建省 | |
|
Hehe, everyone should be interested in operating systems, and we can discuss together.
Also, the person above seems to like playing Empire, I wonder if they will play Conqueror. |
|
| Floor8 qb45 | Posted 2003-10-13 00:00 |
| 高级用户 Posts 194 Credits 677 | |
|
有空到浩方对战平台,打一场阿!
http://www.cga.com.cn 我的名字是IkillGame 有空到浩方对战平台, have a match at HF Arena! http://www.cga.com.cn My name is IkillGame |
|
| Floor9 凌晨一点 | Posted 2003-10-25 00:00 |
| 初级用户 Posts 54 Credits 255 | |
|
Go ahead, go ahead. In this world, nothing is impossible (don't mind the person above ^_^). If there's anything you need help with, just let us know, everyone will definitely stand up for you!
|
|
| Floor10 xy_god | Posted 2003-10-26 00:00 |
| 中级用户 Posts 56 Credits 276 | |
|
Well, I'm currently writing a mouse driver. It's hard to find the writing materials and they're all in English, so I have to translate them myself!
|
|
| Floor11 凌晨一点 | Posted 2003-10-27 00:00 |
| 初级用户 Posts 54 Credits 255 | |
|
Keep it up ^_^
|
|
| Floor12 hunome | Posted 2003-10-27 00:00 |
| 银牌会员 Posts 721 Credits 2,265 | |
|
Expert!
|
|
| Floor13 lghseaman | Posted 2006-03-12 22:27 |
| 新手上路 Posts 5 Credits 18 | |
|
I admire you and respect you
|
|
| Floor14 hj_18 | Posted 2006-03-14 07:32 |
| 中级用户 Posts 57 Credits 255 | |
|
There is a book called "Write Your Own Operating System". I bought it. It's okay. I just don't have time to read it. I suggest everyone also go to the bookstore and flip through it.
|
|
| Floor15 yk141 | Posted 2006-03-17 13:18 |
| 初级用户 Posts 21 Credits 46 From 中华人民共和国 | |
|
The boot program is the easiest to handle, even I can do it!
The boot program of my computer was made by myself. There are installed on the computer: MS-DOS 6.22 Windows 98 Windows XP Fedora Core 2 |
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |