

  ; /---------------------------------------------------------------------\ ;
  ; +---------------------------------------------------------------------+ ;
  ; |  SSFS 00.01 (Schematically Structured File System) BootStrap 0.1.2  | ;
  ; |                                                                     | ;
  ; |   Coded by: Vandad Nahavandipoor                                    | ;
  ; |   Email   : AlexiLaiho.cob@Gmail.com                                | ;
  ; |   Web-site: Http://www.AsmTrauma.com                                | ;
  ; |   Coded on: July 12th 2007 at 5:17 AM                               | ;
  ; |   Coded in: NASM version 0.98.39 compiled on Jan 16 2005            | ;
  ; |                                                                     | ;
  ; |                                                                     | ;
  ; |   Changes made to version 0.1.2 (Previous version = 0.1.1):         | ;
  ; |      Aligned the Stack Pointer on a DWORD boundary.                | ;
  ; |       Thanks to [bughunter] for pointing this out.                  | ;
  ; |      Explicitly set SS:SP to 0x0000:0xFFFC.                        | ;
  ; |      Explicitly set ES:DI for the MOVSW insrtuction to             | ;
  ; |       0x0000:0x7C00. The ES segment register was not set to         | ;
  ; |       0x0000 explicitly in the previous versions.                   | ;
  ; |       Thanks to [urxae] for pointing this out.                      | ;
  ; |      Fixed some typos in the comment lines.                        | ;
  ; |                                                                     | ;
  ; |                                                                     | ;
  ; |   Changes made to version 0.1.1 (Previous version = 0.1):           | ;
  ; |      Removed an ineffective JMP instruction (Saved 2 bytes).       | ;
  ; |      This bootstrap now passes the pointer to the current          | ;
  ; |       active partition in the SI register to the boot sector        | ;
  ; |       that will be loaded and jumped to, at 0x0000:0x7C00.          | ;
  ; |       Thanks to frank (http://fuzzylogicos.googlepages.com/)        | ;
  ; |       for pointing this problem out.                                | ;
  ; |                                                                     | ;
  ; |                                                                     | ;
  ; |   SSFS 00.01 BootStrap 0.1's tasks:                                 | ;
  ; |      Relocates the HDD's MBR into memory at 0x0000:0x0600.         | ;
  ; |      Searches in the Partition Table of the HDD to find            | ;
  ; |       an active partition (Flag = 0x80).                            | ;
  ; |      If an active partition is not found, it will display a        | ;
  ; |       relevant error message.                                       | ;
  ; |      If an active partition is found, it will check its            | ;
  ; |       Starting C/H/S value to see if it is valid.                   | ;
  ; |      If the Starting C/H/S value is valid, it will load the        | ;
  ; |       Boot Sector of that drive into memory at 0x0000:0x7C00 using  | ;
  ; |       INT 0x13 (Disk Operations).                                   | ;
  ; |      If the Starting C/H/S value is not valid, it will             | ;
  ; |       use IDE ports to load the Boot Sector of that partition       | ;
  ; |       using its LBA28/32 address to the memory location at          | ;
  ; |       0x0000:0x7C000.                                               | ;
  ; |      After the Boot Sector of the active partition is loaded       | ;
  ; |       in 0x0000:0x7C00, it will check for the Boot Sector's         | ;
  ; |       Boot Signature (0xAA55).                                      | ;
  ; |      If the Boot Signature of the active partition's Boot Sector   | ;
  ; |       is valid, it will jump to the Boot Sector and give the        | ;
  ; |       control to it.                                                | ;
  ; |      If the Boot Signature of the active partition's Boot Sector   | ;
  ; |       is not valid, it will display an error message.               | ;
  ; |                                                                     | ;
  ; |                                                                     | ;
  ; |   SSFS 00.01 BootStrap 0.1.2's code details:                        | ;
  ; |      Compiled code's size in bytes = 446.                          | ;
  ; |      Used bytes                    = 345.                          | ;
  ; |      Free bytes filled with null   = 101 (Free to program)         | ;
  ; |      Instruction set used          = x86.                          | ;
  ; |      Original code location        = CS:0x7C00.                    | ;
  ; |      Relocated code location       = 0x0000:0x0600.                | ;
  ; |      Loads the boot sector at      = 0x0000:0x7C00.                | ;
  ; |      Uses stack at                 = 0x0000:0xFFF.                 | ;
  ; |                                                                     | ;
  ; |                                                                     | ;
  ; |   Disclaimer:                                                       | ;
  ; |     I take absolutely no responsibility for what you might do with  | ;
  ; |     this bootstrap code. You might damage your Hard Disk Drive's    | ;
  ; |     partition table by inaccurately using this program. I recommend | ;
  ; |     that you understand what Master Boot Records are all about      | ;
  ; |     before using this bootstrap code for your HDD's MBR.            | ;
  ; +---------------------------------------------------------------------+ ;
  ; \---------------------------------------------------------------------/ ;


  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty
  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA