Welcome, Guest. Please login or register.

Author Topic: PC Emulation  (Read 3823 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Floid

  • Hero Member
  • *****
  • Join Date: Feb 2003
  • Posts: 918
    • Show all replies
Re: PC Emulation
« on: August 20, 2006, 06:53:37 PM »
I suppose it's a bit late now, but FreeDOS would also have been worth a look.  (Not that the way it's distributed is 720k-tiny, but...)

MSDOS.SYS and IO.SYS -- or IBMDOS.SYS and IBMBIO.SYS on PC-DOS -- compose the DOS 'operating system,' together with the COMMAND.COM shell and miscellaneous non-resident/non-embedded drivers and utilities (HIMEM.SYS, XCOPY.EXE, FDISK.COM, etc).

The SYS.COM utility, or FORMAT with the /S option (IIRC, at least pre-Win9x versions of FORMAT do depend on SYS.COM being present for the /S switch to work):

1. Writes the boot block, and

2. Copies the two system 'drivers' (*DOS.SYS, *IO.SYS) to the [top of the?] root directory entry and sets the +S attribute on them.

Note that I have no clue if the S ('System') attribute differs from the H ('Hidden') attribute in any other meaningful way, but the files do need to be set +S for the boot block to load them.

This disassembly of a DOS boot sector might be handy for understanding the process.  I was not aware that the two system files had to be the first entries in the listing, but it makes sense in retrospect -- a disk that was SYS'd once will likely always have those blocks held reserved by the two special .SYS files, so a second  while a disk that was filled without ever being SYS'd will often give you a "No room for operating system." error if you try later.

Perhaps they invented the +S attribute in anticipation of making the boot block smarter later?