flat assembler
Message board for the users of flat assembler.

Index > Tutorials and Examples > My old boot manager

Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 29 Nov 2011, 23:44
I noticed some thread with an MBR code in it today, and suddenly it reminded me of my good old boot manager, the one I wrote for my own use back in the days when I wanted to dual-boot DOS and Win9x, each having its own separate partition. I looked for it, and to my delight I found it, in perfect shape.

This may be interesting, because this is one of the earliest existing snippets of fasm code (other than fasm itself). When it was written, it was assembled with fasm 0.90 - and it assembles into exactly the same output with the latest fasm as well.

The package contains two simple tools to backup and replace MBR of primary hard drive, the configurable "BootMan" MBR, and also the "standard" MBR which just booted primary partition (I feel that it may have been disassembled from the MBR installed by FDISK). While all the sources have file dates from 2000 (perhaps the date was reset when moving them around, as the sources date back to 1999), the config.inc has been modified in 2005, when I used this to dual-boot DOS and OpenBSD on some machine (and so the original "win" boot option was replaced with "bsd").

I think these tools have only historical value right now, but if anyone finds them useful - feel free to take them and do whatever you want with them.


Description: Very simple boot manager
Download
Filename: boot.zip
Filesize: 4.74 KB
Downloaded: 1444 Time(s)

Post 29 Nov 2011, 23:44
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 29 Nov 2011, 23:56
I was looking at the file searching functionality. I will study that and try to understand how to use int 13h to work with files.

Thanks
Post 29 Nov 2011, 23:56
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 30 Nov 2011, 00:10
Well, booting code is not really working with files - if you need some examples of file access using int 13h, you might be interested in the FAT32 driver I once wrote.

EDIT: I have later published that FAT32 driver in another thread.


Last edited by Tomasz Grysztar on 31 Mar 2020, 12:18; edited 1 time in total
Post 30 Nov 2011, 00:10
View user's profile Send private message Visit poster's website Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 557
smiddy 30 Nov 2011, 01:18
Nice work, thanks for posting it. I am curious, you use 41h for the floppy, I had always thought 00h and 01h. What kind of system used those drive numbers?

Once I get around to working on booting off of the hard drive, I'll have to confer with you about the FAT32 driver.. I'm still working on the CD/DVD drive booting (I'm slow LOL).
Post 30 Nov 2011, 01:18
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 01 Apr 2020, 03:52
in boot.asm -- The BIOS has loaded you 1 sector 512 bytes, but you relocate 446 words, rep movsw seems bugged, maybe movsb was intended, maybe im missing something here...

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 01 Apr 2020, 03:52
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 01 Apr 2020, 07:37
It was probably just a mistake, with MOVSB being intended.
Post 01 Apr 2020, 07:37
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.