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 项目如 ...
随机推荐
- zoj 2201 No Brainer
No Brainer Time Limit: 2 Seconds Memory Limit: 65536 KB Zombies love to eat brains. Yum. Input ...
- CodeForces - 592D Super M 题解
题目大意: 一棵树 n个点 有m个点被标记 求经过所有被标记的点的最短路径的长度以及起点(如有多条输出编号最小的起点). 思路: 1.当且仅当一个点本身或其子树中有点被标记时该点在最短的路径上因此,可 ...
- 【尺取】HDU Problem Killer
acm.hdu.edu.cn/showproblem.php?pid=5328 [题意] 给定一个长度为n的正整数序列,选出一个连续子序列,这个子序列是等差数列或者等比数列,问这样的连续子序列最长是多 ...
- hdu 4639
/*一个he都没有和有一个he结果是1 2个he 是2 3个he 3 4个he 5 5个he 8 ..... 把每段的结果相乘取余*/ #include<stdio.h> ...
- MTK andorid从底层到上层添加驱动
1 [编写linux驱动程序] 1.1 一.编写驱动核心程序 1.2 二.配置Kconfig 1.3 三.配置Makefile 1.4 四.配置系统的autoconfig 1.5 五.编译 2 [编写 ...
- 旅行(bzoj 3531)
Description S国有N个城市,编号从1到N.城市间用N-1条双向道路连接,满足从一个城市出发可以到达其它所有城市.每个城市信仰不同的宗教,如飞天面条神教.隐形独角兽教.绝地教都是常见的信仰. ...
- Android应用程序项目结构
Android应用程序项目结构 [src]:JAVA源代码目录 [gen]:由系统自动生成的JAVA源码文件,不可修改,只可查看和使用 加载的和依赖的类库 [assets]:本地存储文件的一个文件夹 ...
- AtCoder Regular Contest 091&092
091E(构造) 题意: 给出n,a,b.你需要构造出一个长度为n的n的排列,其中最长上升子序列的长度为a,最长下降子序列的长度为b. n,a,,b<=3e5 分析: 我们可以构造出这样的数列, ...
- 2017多校Round3(hdu6056~hdu6066)
补题进度:7/11 1001 待填坑 1002 待填坑 1003(set) 题意: 给定长度为n(n<=5e5)的数组(是n的一个排列)和一个整数k(k<=80),f[l,r]定义为区间[ ...
- Shiro note
我们需要实现Realms的Authentication 和 Authorization.其中 Authentication 是用来验证用户身份,Authorization 是授权访问控制,用于对用户进 ...