工欲善其事,必先利其器。

由于公司电脑工作环境是win7,为了学习于渊的Orange,所以就在windows下配置环境:
 
1.nasm:
nasm汇编 http://www.nasm.us/   
版本:最新2.11.06
记得添加环境变量
 
2.cygwin:
安装完就可以使用一些常用的linux命令了,比如dd命令了。
 
3.Bochs:
虚拟机,模拟器。相比其他virtualbox和VMware等,好处是可以方便调试,另外书里也是用的Bochs
 
我是先下载bochs-2.6.7.exe安装,再下载bochs-2.6.7-win64.zip的,解压里面有两个可执行文件,是64位编译版本,拷到安装目录下。
这样就有四个可执行文件了,分别是32位和64位的带与不带debug版本的bochs。
 
安装时最好把linux demo选上,可以参考。
配置文件可以参考linux的demo中的配置文件。为了实践第一个引导扇区的例子,我的配置如下:
 
###############################################################
# bochsrc.txt file for DLX Linux disk image.
###############################################################
 
# how much memory the emulated machine will have
megs: 32
 
# filename of ROM images
romimage: file=../BIOS-bochs-latest
vgaromimage: file=../VGABIOS-lgpl-latest
 
# what disk images will be used 
# floppya: 1_44=floppya.img, status=inserted
# floppyb: 1_44=floppyb.img, status=inserted
floppya: 1_44=a.img, status=inserted
 
# hard disk
# ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
# ata0-master: type=disk, path="hd10meg.img", cylinders=306, heads=4, spt=17
 
# choose the boot disk.
# boot: c
boot: floppy
 
# default config interface is textconfig.
#config_interface: textconfig
#config_interface: wx
 
#display_library: x
# other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term svga
 
# where do we send log messages?
log: bochsout.txt
 
# disable the mouse, since DLX is text only
mouse: enabled=0
 
# set up IPS value and clock sync
cpu: ips=15000000
clock: sync=both
 
# enable key mapping, using US layout as default.
#
# NOTE: In Bochs 1.4, keyboard mapping is only 100% implemented on X windows.
# However, the key mapping tables are used in the paste function, so 
# in the DLX Linux example I'm enabling keyboard_mapping so that paste 
# will work. Cut&Paste is currently implemented on win32 and X windows only.
 
keyboard: keymap=../keymaps/x11-pc-us.map
#keyboard: keymap=../keymaps/x11-pc-fr.map
#keyboard: keymap=../keymaps/x11-pc-de.map
#keyboard: keymap=../keymaps/x11-pc-es.map
 
4.DOS:待保护模式时补充
 
运行第一个引导扇区例子效果如图:

最新文章

  1. Unity3D 事件
  2. Java for LeetCode 024 Swap Nodes in Pairs
  3. java 生成UUID
  4. ZigBee组网原理
  5. Windows Media Player Plus
  6. CentOS磁盘分区、格式化并挂载外置存储的方法
  7. java常量和变量的定义规则,变长参数的使用
  8. LearningDocker--Chapter3--Building images
  9. 【Unity3d游戏开发】浅谈UGUI中的Canvas以及三种画布渲染模式
  10. Java:现有线程T1/T2/T3,如何确保T1执行完成之后执行T2,T3在T2执行完成之后执行。
  11. Python学习—数据库篇之pymysql
  12. VBR的部署
  13. springboot整合三 共享session,集成springsession
  14. [Algorithm] Asymptotic Growth Rate
  15. K-means &K-medoids 聚类
  16. Hystrix 详细说明
  17. 问题1:canvas绘制图片加载不出来
  18. python-面向对象-08_多态
  19. RabbitMQ消息队列生产者和消费者
  20. 关于 Capella 需要纠正的语音

热门文章

  1. ZooKeeper运行原理和基本编程接口
  2. [CF] 37 E. Trial for Chief
  3. 什么是PHP中的heredoc和nowdoc
  4. ArchLinux 安装笔记
  5. DEVExpress中BarItem的使用2
  6. Java基础学习总结(92)——Java编码规范之排版、注释及命名
  7. php-fpm.conf
  8. UVA11090 Going in Cycle!! 【SPFA】
  9. Codeforces936C. Lock Puzzle
  10. boost thread 在非正常退出时 内存泄露问题