GithubHelp home page GithubHelp logo

8086-boot's Introduction

第二版修正版

2019/6/4 晚
见 class2i_2.asm 文件

修复3功能 缓冲区漏洞

显示时间时,按键由int9 存入键盘缓冲区中,在退出功能进入菜单时, 键盘缓冲区没有被清空.
在3功能中按下 '1' 键,没有效果,但是1已经入缓冲区,再按下esc键后退出,菜单会通过 int16来从缓冲区中拿,拿走了 '1' 键,重启.
修复:
在重写的 int9 中,在调用系统原int9中断后, 执行 int16 ,将存入缓冲区中的键位清除, 注意这里的按键,控制按键,一共8个,是不会进入缓冲区的,所以要判断在处理.

第二版

2019/5/31 23:06
见 class2i.asm 文件

1、偏移地址可以从0开始算了!
将要拷贝软盘中的代码放到新的data段中,然后在 0:7c00h 处的代码一开始就跳转 07c0:0h 处,这样就解决了偏移地址无法从0开始算的问题,可以抛弃 偏移量 site 的做法了。

2、引导操作系统一步到位
废弃了将代码(what拷贝硬盘到7c00h处,并从7c00h执行)拷贝到 0:200h 这个安全地方执行的做法。
采取的新方法就是,将引导操作系统这部分功能的代码--移动到 0:7c00h - 0:07dffh 这512字节之外的地方,这样就安全了!目前是放到了 3功能(显示时间)之后

3、独立的信息显示模块
show_info 函数单独拿出来,又减少了100行代码

4、更少的代码
从原先的1100行降到890行,少了210行。


第一版

主要从2019/5/17 到2019/5/21 日,大约历经40小时 见 class2i.asm 文件

1.关于硬盘拷贝的位置

引导操作系统时,硬盘这个 80h 磁盘,必须将一开始的部分拷贝到 0:7c00h 处,不能换成是别的地方,所以这就还在拷贝的时候覆盖原有的代码,导致拷贝之后无法跳转到 0:7c00h 处执行。

所以采用的是:将拷贝与执行代码,一并拷贝到其他的安全的地方,比如 0:200h 处。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.