Bochs的配置与调试

1.主要配置

MEGS

Set the number of Megabytes of physical memory you want to emulate. 
=============================================================================  

  • The default is 32MB, most OS's won't need more than that.
  • The maximum amount of memory supported is 2048MB.
  • The 'MEGS' option is deprecated. Use 'MEMORY' option instead.
  • Such as
    megs: 256
    megs: 128
    megs: 64
    megs: 32
    megs: 16
    megs: 8
=============================================================================


ROMIMAGE

The ROM BIOS controls what the PC does when it first powers on.
=============================================================================

  • Normally, you can use a precompiled BIOS in the source or binary 
    distribution called BIOS-bochs-latest.
  • The ROM BIOS is usually loaded starting at address 0xF0000, and it is
     exactly 64K long. 
  • Another option is 128k BIOS which is loaded at address 0xE0000.
  • You can also use the environment variable $BXSHARE to specify the 
    location of the BIOS.
  • The usage of external large BIOS images (up to 512K) at memory top is
    now supported, but we still recommend to use the BIOS distributed with Bochs.
    The start address optional, since it can be calculated from image size.
  • Such as
    romimage: file=$BXSHARE/BIOS-bochs-latest 
    romimage: file=bios/seabios-1.6.3.bin
    romimage: file=mybios.bin, address=0xfff80000 # 512k at memory top

=============================================================================    


BOOT

Defines the boot sequence.
=============================================================================

  • Now you can specify up to 3 boot drives, which can be 'floppy', 'disk', 'cdrom'
    or 'network' (boot ROM).
  • Legacy 'a' and 'c' are also supported.
  • Such as
    boot: floppy
    boot: cdrom, disk
    boot: network, disk
    boot: cdrom, floppy, disk
    boot: floppy
    boot: disk

=============================================================================

2.常用调试命令

  • help‘command'  显示某条命令的详细用法
  • b|pb‘address’ 设置断点
  • s               单步执行
  • s     n执行     n步
  • c               持续执行
  • u‘start'‘end’反汇编某个地址段



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值