{"id":13463806,"url":"https://github.com/yourtion/30dayMakeOS","last_synced_at":"2025-03-25T09:31:10.377Z","repository":{"id":20416994,"uuid":"23693362","full_name":"yourtion/30dayMakeOS","owner":"yourtion","description":"《30天自制操作系统》源码中文版。自己制作一个操作系统（OSASK）的过程","archived":false,"fork":false,"pushed_at":"2024-04-01T08:14:55.000Z","size":3575,"stargazers_count":6099,"open_issues_count":10,"forks_count":1435,"subscribers_count":204,"default_branch":"master","last_synced_at":"2025-03-20T18:05:14.437Z","etag":null,"topics":["asm","boot","c","cc","diy","fifo","gdt","idt","linux","nas","nasa","operating-system","os","osask","osx","qemu","stdlib"],"latest_commit_sha":null,"homepage":"https://github.com/yourtion/YOS","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yourtion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-05T06:54:36.000Z","updated_at":"2025-03-20T05:59:28.000Z","dependencies_parsed_at":"2024-01-07T00:07:17.472Z","dependency_job_id":"cf991e1c-278b-4759-8cc5-d972668cef91","html_url":"https://github.com/yourtion/30dayMakeOS","commit_stats":null,"previous_names":[],"tags_count":212,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2F30dayMakeOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2F30dayMakeOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2F30dayMakeOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2F30dayMakeOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yourtion","download_url":"https://codeload.github.com/yourtion/30dayMakeOS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245435098,"owners_count":20614827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asm","boot","c","cc","diy","fifo","gdt","idt","linux","nas","nasa","operating-system","os","osask","osx","qemu","stdlib"],"created_at":"2024-07-31T14:00:28.798Z","updated_at":"2025-03-25T09:31:06.332Z","avatar_url":"https://github.com/yourtion.png","language":"C","readme":"# 《30天自制操作系统》中文源码 —— OSASK\n\n自己制作一个操作系统的过程，阅读过程会一边汉化源码，一边执行还有根据一些相关的内容进行代码的书写，欢迎大家交流。\n\n运行方法，在 `tolset` 中新建一个 `run` 文件夹，把代码拷贝进去，然后根据系统版本运行 `!cons_**.bat`。\n\n一般都是使用 `make run` 运行代码，27天开始使用 `make run_full`。可以直接看书。\n     又或者，把tolset里的`z_tools目录` 复制到 本项目目录`30dayMakeOS`下。\n\n## 完成效果\n\n![Screen](Screen.png)\n\n## 内容简介\n\n### 第一周（第1天～第7天）\n\n一开始首先要考虑怎么来写一个“只要一通电就能运行的程序”。这部分用C语言写起来有些困难，所以主要还是用汇编语言来写。\n\n这步完成之后，下一步就要写一个从磁盘读取操作系统的程序。这时即便打开电脑电源，它也不会自动地将操作系统全部都读进来，它只能读取磁盘上最开始的512字节的内容，所以我们要编写剩余部分的载入程序。这个程序也要用汇编语言编写。\n\n一旦完成了这一步，以后的程序就可以用C语言来编写了。我们就尽快使用C语言来学习开发显示画面的程序。同时，我们也能慢慢熟悉C语言语法。这个时候我们好像在做自己想做的事，但事实上我们还没有自由操纵C语言。\n\n接下来，为了实现“移动鼠标”这一雄心，我们要对CPU进行细致的设定，并掌握中断处理程序的写法。从全书总体看来，这一部分是水平相当高的部分，笔者也觉得放在这里有些不妥，但从本书条理上讲，这些内容必须放在这里，所以只好请大家忍耐一下了。在这里，CPU的规格以及电脑复杂的规格都会给我们带来各种各样的麻烦。而且开发语言既有C语言，又有汇编语言，这又给我们造成了更大的混乱。这个时候我们一点儿也不会觉得这是在做自己想做的事，怎么看都像是在“受人摆布”。\n\n渡过这个痛苦的时期，第一周就该结束了。\n\n- [第1天：从计算机结构到汇编程序入门](https://github.com/yourtion/30dayMakeOS/releases/tag/Day01)\n- [第2天：汇编语言学习与Makefile入门](https://github.com/yourtion/30dayMakeOS/releases/tag/Day02)\n- [第3天：进入32位模式并导入C语言](https://github.com/yourtion/30dayMakeOS/releases/tag/Day03)\n- [第4天：C语言与画面显示的练习](https://github.com/yourtion/30dayMakeOS/releases/tag/Day04)\n- [第5天：结构体、文字显示与GDT/IDT初始化](https://github.com/yourtion/30dayMakeOS/releases/tag/Day05)\n- [第6天：分割编译与中断处理](https://github.com/yourtion/30dayMakeOS/releases/tag/Day06)\n- [第7天：FIFO与鼠标控制](https://github.com/yourtion/30dayMakeOS/releases/tag/Day07)\n\n### 第二周（第8天～第14天）\n\n一周的苦战还是很有意义的，回头一看，我们就会发现自己还是斩获颇丰的。这时我们已经基本掌握了C语言的语法，连汇编语言的水平也能达到本书的要求了。\n\n所以现在我们就可以着手开发像样的操作系统了。但是这一次我们又要为算法头痛了。即使掌握了编程语言的语法，如果不懂得好的算法的话，也还是不能开发出来自己想要的操作系统。\n\n所以这一周我们就边学习算法边慢慢地开发操作系统。不过到了这一阶段，我们就能感觉到基本上不会再受技术问题限制了。\n\n- [第8天：鼠标控制与32位模式切换](https://github.com/yourtion/30dayMakeOS/releases/tag/Day08)\n- [第9天：内存管理](https://github.com/yourtion/30dayMakeOS/releases/tag/Day09)\n- [第10天：叠加处理](https://github.com/yourtion/30dayMakeOS/releases/tag/Day10)\n- [第11天：制作窗口](https://github.com/yourtion/30dayMakeOS/releases/tag/Day11)\n- [第12天：定时器（1）](https://github.com/yourtion/30dayMakeOS/releases/tag/Day12)\n- [第13天：定时器（2）](https://github.com/yourtion/30dayMakeOS/releases/tag/Day13)\n- [第14天：高分辨率及键盘输入](https://github.com/yourtion/30dayMakeOS/releases/tag/Day14)\n\n### 第三周（第15天～第21天）\n\n现在我们的技术已经相当厉害了，可以随心所欲地开发自己的操作系统了。首先是要支持多任务，然后是开发命令行窗口，之后就可以着手开发应用程序了。\n\n到本周结束时，就算还不够完备，我们也能拿出一个可以称之为操作系统的软件了。\n\n- [第15天：多任务（1）](https://github.com/yourtion/30dayMakeOS/releases/tag/Day15)\n- [第16天：多任务（2）](https://github.com/yourtion/30dayMakeOS/releases/tag/Day16)\n- [第17天：命令行窗口](https://github.com/yourtion/30dayMakeOS/releases/tag/Day17)\n- [第18天：dir命令](https://github.com/yourtion/30dayMakeOS/releases/tag/Day18)\n- [第19天：应用程序](https://github.com/yourtion/30dayMakeOS/releases/tag/Day19)\n- [第20天：API](https://github.com/yourtion/30dayMakeOS/releases/tag/Day20)\n- [第21天：保护操作系统](https://github.com/yourtion/30dayMakeOS/releases/tag/Day21)\n\n### 第四周（第22天～第28天）\n\n在这个阶段，我们可以尽情地给操作系统增加各种各样的功能，同时还可以开发出大量像模像样的应用程序来。\n\n这个阶段我们已经能做得很好了，这可能也是我们最高兴的时期。这部分要讲解的内容很少，笔者也不用再煞费苦心地去写那些文字说明了，可以把精力都集中在编程上（笑）。\n\n对了，说起文字才想起来，正好在这个时期可以让我们的操作系统显示文字了。\n\n- [第22天：用C语言编写应用程序](https://github.com/yourtion/30dayMakeOS/releases/tag/Day22)\n- [第23天：图形处理相关](https://github.com/yourtion/30dayMakeOS/releases/tag/Day23)\n- [第24天：窗口操作](https://github.com/yourtion/30dayMakeOS/releases/tag/Day24)\n- [第25天：增加命令行窗口](https://github.com/yourtion/30dayMakeOS/releases/tag/Day25)\n- [第26天：为窗口移动提速](https://github.com/yourtion/30dayMakeOS/releases/tag/Day26)\n- [第27天：LDT与库](https://github.com/yourtion/30dayMakeOS/releases/tag/Day27)\n- [第28天：文件操作与文字显示](https://github.com/yourtion/30dayMakeOS/releases/tag/Day28)\n\n\n### 免费赠送两天（第29天～第30天）\n\n剩下的两天用来润色加工。这两天我们来做一些之前没来得及做，但做起来既简单又有趣的内容。\n\n- [第29天：压缩与简单的应用程序](https://github.com/yourtion/30dayMakeOS/releases/tag/Day29)\n- [第30天：高级的应用程序](https://github.com/yourtion/30dayMakeOS/releases/tag/Day30)\n","funding_links":[],"categories":["RTOS","C","其他"],"sub_categories":["ESP8266","网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyourtion%2F30dayMakeOS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyourtion%2F30dayMakeOS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyourtion%2F30dayMakeOS/lists"}