一个小型的操作系统

学了下汇编后自己写了个小型操作系统. 名字暂时叫做ISystem. 源代码见下面的地址.


该系统主要由一个启动程序(boot.bin, 会被放置到影像文件第0个扇区的位置)和一个核心文件(kernel.bin, 会被放置到影像文件第1~64扇区的位置)构成. 并且使用工具把这两个文件合并为软盘影像文件(isystem.img). 可以使用virtual box, VMware等虚拟机加载该映像文件. 


程序的启动步骤

位于第0扇区的启动程序被加载到内存位于7C00H:0000H的地方并执行.  然后启动程序加载核心文件到内存位于1000H:0000H的地方并跳转到那里执行.


系统软盘影像文件结构

扇区

说明

0

Boot Loader(512字节)

1-64

Kernel(32768字节)

65-128

保留

129

系统参数

130~2879

用户文件


应用程序的启动

通过命令exec可以启动一个程序. 系统会把程序加载到内存位于3000H:0000H的地方执行. 应用程序可以使用NASM生成的bin文件(起始点必须为0H!!!).

    ORG 0H
    MOV SI, Message
    MOV AH, 4
    INT 21H
    MOV AH, 0
    INT 21H
    
Message DB 'Hello, World!', 0

现在正在尝试用TC2的编译器产生能够在该系统上运行的程序. 继续敲代码去了~~~


下载地址: http://www.vdisk.cn/down/index/12419439

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
一个小型操作系统,采用gcc进行开发,几千行的代码,方便初学者学习,内含有编译好的映像文件,及bochs模拟器配置文件,可在bochs下模拟运行。如下为源码包内的README文件: # # Snixos Project version 1.0, 2003.6 # (C) Copyright 2003,2004,2005 Jockeyson,KeqianGao # All Rights Reserved. # Distributed under the terms of the GNU General Public License. # # This program is a free and open source software and you can redistribute # it and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation. As no any liability is assumed # for any incidental or consequential damages in connection with the # information or program fragments contained herein,so any exception arised # is at your own risk. It is ABSOLUTELY WITHOUT ANY WARRANTY. # Bug report please send to [email protected] . # 0. What is Snixos Project? Snixos Project is an experimental operating system designed by Jockeyson , KeqianGao aiming at multitask/multithread, Chinese envionment including Chinese characters input and ouput etc... 1. What you need to run Snixos PC with the following minimum configuration: CPU: i386 or above MEM: 2M extended memory or more DISPLAY: VGA or above Floppy Drive: 1.44M 2. Compile Environment RH Linux 7.2 or above (kernel 2.4.7-10 ) NASM 0.98 gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98) 3. Compile and install a. unpack the source package tar zxvf snixos_x.x_YYYYMMDD_HHMMSS.tgz b. cd to snixos cd snixos c. before make insert a 1.44M floppy in drive c.1 to make snixos run in VGA text mode make clean make VIDEO=TEXT diskimg make floppy c.2 to make snixos run VGA graphics mode make clean make diskimg make floppy d. bootup with the floppy just created in step c also you can follow this way to run snixos in bochs either in Windows or Linux a. just as the above b. just as the above c. invoke these command: make clean; make diskimg you'll get a snixos ima

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值