Ubuntu Bochs boot.asm 测试
/*********************************************************************
* Ubuntu Bochs boot.asm 测试
* 说明:
* 本文仅仅是在Ubuntu下通过Bochs验证《自己动手编写操作系统》中的
* Boot Sector(引导区)的汇编代码,算是撘一个测试环境。
*
* 2016-7-22 深圳 南山平山村 曾剑锋
********************************************************************/ 一、参考文档:
. ubuntu下bochs安装使用
http://blog.csdn.net/xnwyd/article/details/7421703
. bochs安装一系列问题
http://blog.chinaunix.net/uid-23817499-id-3418083.html
. 自己动手写操作系统之1:bochs初步使用
http://blog.csdn.net/zhaodedong/article/details/51082128 二、测试目录文件:
aplex@aplex:~/os/system$ ls
a.img bochsout.txt boot.asm boot.bin 三、cat boot.asm
org 07c00h
mov ax, cs
mov ds, ax
mov es, ax
call DispStr
jmp $ DispStr:
mov ax, BootMessage
mov bp, ax
mov cx,
mov ax, 01301h
mov bx, 000ch
mov dl,
int 10h
ret
BootMessage: db "Hello, OS world!"
times -($-$$) db dw 0xaa55 四、cat ~/.bochsrc
###############################################################
# Configuration file for Bochs
############################################################### # how much memory the emulated machine will have
megs: # filename of ROM images
romimage: file=/usr/share/bochs/BIOS-bochs-latest
vgaromimage: file=/usr/share/vgabios/vgabios.bin # what disk images will be used
floppya: 1_44=a.img, status=inserted # choose the boot disk.
boot: floppy # where do we send log messages?
log: bochsout.txt # disable the mouse
mouse: enabled= # enable key mapping, using US layout as default.
#keyboard_mapping: enabled=, map=/usr/share/bochs/keymaps/x11-pc-us.map display_library: sdl 五、命令运行流程:
aplex@aplex:~/os/system$ ls
a.img bochsout.txt boot.asm boot.bin
aplex@aplex:~/os/system$ nasm boot.asm -o boot.bin
aplex@aplex:~/os/system$ bximage
========================================================================
bximage
Disk Image Creation Tool for Bochs
$Id: bximage.c,v 1.34 // :: sshwarts Exp $
======================================================================== Do you want to create a floppy disk image or a hard disk image?
Please type hd or fd. [hd] fd Choose the size of floppy disk image to create, in megabytes.
Please type 0.16, 0.18, 0.32, 0.36, 0.72, 1.2, 1.44, 1.68, 1.72, or 2.88.
[1.44] 1.44
I will create a floppy image with
cyl=
heads=
sectors per track=
total sectors=
total bytes= What should I name the image?
[a.img] The disk image 'a.img' already exists. Are you sure you want to replace it?
Please type yes or no. [no] yes Writing: [] Done. I wrote bytes to a.img. The following line should appear in your bochsrc:
floppya: image="a.img", status=inserted
aplex@aplex:~/os/system$ dd if=boot.bin of=a.img
记录了1+ 的读入
记录了1+ 的写出
512字节( B)已复制,0.00040927 秒,1.3 MB/秒
aplex@aplex:~/os/system$ bochs
========================================================================
Bochs x86 Emulator 2.4.
Build from CVS snapshot, on February ,
Compiled at Jun , ::
========================================================================
00000000000i[ ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[ ] BXSHARE not set. using compile time default '/usr/share/bochs'
00000000000i[ ] reading configuration from /home/aplex/.bochsrc
00000000000i[ ] lt_dlhandle is 0x378ba30
00000000000i[PLGIN] loaded plugin libbx_sdl.so
00000000000i[ ] installing sdl module as the Bochs GUI
00000000000i[ ] using log file bochsout.txt
aplex@aplex:~/os/system$ 六、效果图:

Ubuntu Bochs boot.asm 测试的更多相关文章
- 操作系统实现-boot.asm实现
博客网址:www.shicoder.top 微信:18223081347 欢迎加群聊天 :452380935 这一次我们进入操作系统实现的真实编码, 这一次主要是完善对boot.asm文件的全部实现, ...
- 在Ubuntu中部署并测试Fabric 1.0 Beta
[更新:1.0Beta已经是过去式了,现在出了1.0.0的正式版,请大家参照 http://www.cnblogs.com/studyzy/p/7437157.html 安装Fabric 1.0.0 ...
- Spring Boot(十二):spring boot如何测试打包部署
Spring Boot(十二):spring boot如何测试打包部署 一.开发阶段 1,单元测试 在开发阶段的时候最重要的是单元测试了,springboot对单元测试的支持已经很完善了. (1)在p ...
- [Ubuntu] 解决 ubuntu 升级时 /boot 空间不足
经常升级Linux内核,导致更新时警告/boot分区空间不足.这是以为多次升级内核后,导致内核版本太多,清理一下没用的内核文件就行了. 原文地址请保留http://www.cnblogs.com/ro ...
- 关于ubuntu系统boot分区空间不足而又无法卸载旧内核的解决方法
2016年09月03日 14:16:45 萧氏一郎 阅读数:7802 标签: ubuntuboot分区清理更多 个人分类: linux 版权声明:本文为本猿原创文章,转载务必注明出处,多谢. ht ...
- spring boot应用测试框架介绍
一.spring boot应用测试存在的问题 官方提供的测试框架spring-boot-test-starter,虽然提供了很多功能(junit.spring test.assertj.hamcres ...
- Spring Boot从入门到放弃-Spring Boot 整合测试
站长资讯摘要:使用Spring Boot 整合测试,对Controller 中某个方法进行测试或者对Service,Mapper等进行测试,不需要运行项目即可查看运行结果是否和期望值相同,Spring ...
- Linux下搭建mpi集群(ubuntu下用虚拟机测试)
一 建立SSH连接(无密码登陆) 1 SSH连接的简单介绍 SSH 为 Secure Shell 的缩写,中文翻译为安全外壳协议,建立在应用层,是一种远程连接安全协议.传统的telnet,pop,ft ...
- (转)Spring Boot(十二):Spring Boot 如何测试打包部署
http://www.ityouknow.com/springboot/2017/05/09/spring-boot-deploy.html 有很多网友会时不时的问我, Spring Boot 项目如 ...
随机推荐
- 如何在非localhost情况下访问Istio中的服务UI
在使用Istio时经常会遇到需要用localhost访问服务UI才能看到相关的一些数据 但对于远程连接的时候使用localhost并不方便,所以需要修改一下它的部署文件,将原先的cluster IP改 ...
- Sencha Touch 2 实现跨域访问
最近要做手机移动App,最后采用HTMML5来做框架用Sencha Touch,在数据交互时遇到了Ajax跨域访问,在Sencha Touch 2中,实现跨域访问可以使用Ext类库提供给我们的类Ext ...
- SpringData JPA进阶查询—JPQL/原生SQL查询、分页处理、部分字段映射查询
上一篇介绍了入门基础篇SpringDataJPA访问数据库.本篇介绍SpringDataJPA进一步的定制化查询,使用JPQL或者SQL进行查询.部分字段映射.分页等.本文尽量以简单的建模与代码进行展 ...
- 【BZOJ2006】超级钢琴(RMQ,priority_queue)
题意: 思路: 用三元组(i, l, r)表示右端点为i,左端点在[l, r]之间和最大的区间([l, r]保证是对于i可行右端点区间的一个子区间),我们用堆维护一些这样的三元组. 堆中初始的元素为每 ...
- js命名
JS变量名前加 _ 与 $ 的区别: 下划线一般当做私有属性, 业界会比较常用$开头作为框架.库的关键词前缀,目的是避免命名冲突
- iOS textView在调用textViewDidChange方法,中文输入的问题
有时候,需要在textViewDidChange处理时,在中文输入的情况下,例如输入“中”,对应的拼音“zhong”, 在textViewDidChange的方法里会把拼音也算进去:导致输入中文时也输 ...
- Codeforces 658B Bear and Displayed Friends【set】
题目链接: http://codeforces.com/contest/658/problem/B 题意: 给定元素编号及亲密度,每次插入一个元素,并按亲密度从大到小排序.给定若干操作,回答每次询问的 ...
- POJ 1753 Flip Game【枚举】
题目链接: http://poj.org/problem?id=1753 题意: 由白块黑块组成的4*4方格,每次换一个块的颜色,其上下左右的块也会被换成相反的颜色.问最少换多少块,使得最终方格变为全 ...
- FatMouse's Speed--hdu1160(dp+输出路径)
Problem Description FatMouse believes that the fatter a mouse is, the faster it runs. To disprove th ...
- T1992 聚会 codevs
http://codevs.cn/problem/1992/ 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题目描述 Description 小S 想要从某地 ...