The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: sonOfAGun on January 02, 2010, 03:50:47 PM

Title: MBR development environment?
Post by: sonOfAGun on January 02, 2010, 03:50:47 PM
Hi
I'm new to coding in assembly, I want to write an MBR, I need to set up an environment that I can DEBUG an MBR.

I've tried using emu8086 but it appears that int13 extensions (i.e. read and write in LBA) are not supported. I am considering using Bochs. But I'm hoping that someone with more experience than me can tell me;

What environment/VM replicates that of a computer(intel/amd) when booting up, but also allows me to debug the assembly code too.

Thanks in advance. :U
Title: Re: MBR development environment?
Post by: redskull on January 02, 2010, 04:58:51 PM
VMware is the most common, but it doesn't come cheap.  Also, it installs a large number of system-slowing-down device drivers and services, so I recommend a seperate box to run it in (but that's just personal preference).

-r
Title: Re: MBR development environment?
Post by: Vortex on January 03, 2010, 10:04:26 AM
Hi sonOfAGun,

Welcome to the forum.

Another option is to use Virtual PC 2007 :

http://www.microsoft.com/downloads/details.aspx?FamilyId=28C97D22-6EB8-4A09-A7F7-F6C7A1F000B5&displaylang=en
Title: Re: MBR development environment?
Post by: TNick on January 03, 2010, 11:31:10 AM
Bochs has a integrated GUI debugger, and setting a breakpoint is as simple as
xchg bx, bx

Look here  (http://forum.osdev.org/viewtopic.php?f=2&t=18093)for some info about it and further reading

Nick
Title: Re: MBR development environment?
Post by: sonOfAGun on January 04, 2010, 01:07:38 AM
Correct me if I'm wrong but I understand that there is no debugger for VMware or Virtual PC that would allow me to debug the MBR as the VM is booting up.

It looks like I will be setting up an environment in Bochs, as this allows debugging of the Master Boot Record (i.e. int13 calls) unless anyone knows of other alternatives.

Thanks for the help.
Title: Re: MBR development environment?
Post by: Farabi on January 04, 2010, 05:17:40 PM
Syslinux source code would be good for learning.
It can read FAT32 format and load a kernel. It also able to run a 32-bit code.