Welcome

  • Home
  • Blogging Projects
  • Technology Projects
  • About
  • Services
  • Advertise
  • Contact
  • Shiawassee Forums

Latest Posts

AG Bill Schuette using his office as a right wing political toolAG Bill Schuette using his office as a right wing political tool

I'll be on First Shift this morning to discuss Bill Schuette's actions so far as Attorney General. Here's some of the research...

Wisconsin Democrats submit more than 1,000,000 signatures to recall Gov WalkerWisconsin Democrats submit more than 1,000,000 signatures to recall Gov Walker

Wisconsin's anti-union, anti-middle class, anti-99% governor is about to have his hat handed to him.  The people of...

Asking for democracy is democracy in actionAsking for democracy is democracy in action

Say what? Well I was checking out this article on the MLK march on Snyder's residence, and found this tidbit here:"We elect...

‘Choose Life’ plates would fund Right to Life through the Secretary of State‘Choose Life’ plates would fund Right to Life through the Secretary of State

Based on what we've seen of Snyder & the GOP legislature so far, this is definitely going to pass:Among the legislation...

Welcome to cbdcWelcome to cbdc

Hello listeners of First Shift. Thanks for stopping by. This blog is about to be rebooted and will have new posts again in a...

Report shows Shiawassee unemployment rate downReport shows Shiawassee unemployment rate down

The Michigan League for Human Services has issued a report (pdf) that shows some good news for Shiawassee. The unemployment...

DOS Boot Process

Boot Process:

POST
Power On Self Test
POST: A program recorded on a ROM (BIOS) chip that loads the initial boot instructions into RAM

1. BIOS scans hardware (memory test, for example)
2. BIOS compares physical hardware configuration with settings in
CMOS
3. If system setup is ok, POST begins looks for the OS and causes it to
run (by default, it looks first to the floppy drive)
4. When a valid OS loader is found, control is transferred from ROM to the OS

IO.SYS loads
IO.SYS places into memory the basic input/output services DOS provides
IO.SYS must be the first directory entry in the root directory of the disk
IO.SYS must be the first physical file on the disk
IO.SYS is a hidden file
IO.SYS interfaces with the devices

MSDOS.SYS loads
MSDOS.SYS must be the second entry in the root directory
MSDOS.SYS is a hidden file
MSDOS.SYS provides the basis for application interfaces
MSDOS.SYS checks the boot directory of the disk (normally C:\) for CONFIG.SYS
CONFIG.SYS is loaded into memory and interpreted

CONFIG.SYS: Specifies some type of configuration information such as a device driver to be loaded or a system setting to be made

COMMAND.COM loads
COMMAND.COM is the user interface to DOS
COMMAND.COM evaluates commands, runs them if legal
COMMAND.COM issues the ‘Bad Command or Filename’ error if commands are invalid (or not legal)
COMMAND.COM houses “internal commands”
COMMAND.COM checks for AUTOEXEC.BAT in the boot directory
AUTOEXEC.BAT is loaded into COMMAND.COM’s batch file processor.

AUTOEXEC.BAT: A standard batch file that usually contains commands to customize your DOS installation. Is run automatically during boot-up, if present.

Commands commonly found in CONFIG.SYS

BREAK
BUFFERS
COUNTRY
DEVICE (EXCLUSIVE TO CONFIG.SYS)
DEVICEHIGH (EXCLUSIVE TO CONFIG.SYS)
DOS
DRIVPARM
FCBS
FILE
INSTALL
LASTDRIVE
NUMLOCK
REM
SET (MAY BE USED IN CONFIG.SYS, BUT SHOULD BE USED IN AUTOEXEC.BAT)
SHELL (EXCLUSIVE TO CONFIG.SYS)
STACKS
SWITCHES

Typical Config.sys File:

DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN NOVCPI WIN=B500-B7FF
WIN=B200-B4FF
DOS=HIGH, UMB
BUFFERS=15,0
FILES=49
LASTDRIVE=N
STACKS=9,256
SWITCHES=/K /F
SHELL=C:\DOS\COMMAND.COM C:\DOS\ /e:512 /p
DEVICEHIGH /L:2, 12048 =C:\DOS\SETVER.EXE
DEVICEHIGH /L:2, 10928 =C:\DOS\SBPCD.SYS /D:MSCD001 /P:220
DEVICEHIGH /L:2, 44784 =C:\DOS\DBLSPACE.SYS /MOVE

Analysis of the file:

DEVICE=C:\DOS\HIMEM.SYS
Loads the Extended Memory Manager

DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN NOVCPI WIN=B500-B7FF
WIN=B200-B4FF
Loads the Expanded Memory Manager
No EMS memory
Check availability of upper memory blocks
Disable VCPI support
Reserve areas in upper memory for windows
You must load EMM.386 to gain access to upper memory

DOS=HIGH, UMB
Instructs DOS to load itself into high memory, in the upper memory block

BUFFERS=15,0
Sets up 15 buffers for transferring files, no secondary cache buffers created

FILES=49
Specifies that DOS make 49 file handles available so that many files can be open at a time

LASTDRIVE=N
Specify that N is highest drive present in the system
This should include accommodation for extra physical, logical, and network drives

STACKS=9,256
Specifies 9 stacks of 256 bytes each to be used for handle hardware interrupts

SWITCHES=/K /F
Disables extended keyboard support with /k switch
Disables the default two second delay after the ‘starting MS-DOS…’ with /f switch

SHELL=C:\DOS\COMMAND.COM C:\DOS\ /e:512 /p
Increases size of DOS environment to 512 bytes
Use /p switch to force DOS to run AUTOEXEC.BAT
(Use of SHELL disables AUTOEXEC.BAT if no /p switch is included)

DEVICEHIGH /L:2, 12048 =C:\DOS\SETVER.EXE
DEVICEHIGH /L:2, 10928 =C:\DOS\SBPCD.SYS /D:MSCD001 /P:220
DEVICEHIGH /L:2, 44784 =C:\DOS\DBLSPACE.SYS /MOVE
Load specified drivers into upper memory
If no upper memory is available, conventional memory is used

Commands commonly found in AUTOEXEC.BAT
@
CALL
CHOICE
ECHO
FOR
GOTO
IF
PAUSE
REM
SHIFT
Any legal DOS command except:
DEVICE
SHELL

Typical Autoexec.bat File

@ECHO OFF
CLS
PROMPT $P$G
PATH C:\DOS;C:\WINDOWS;C:\;C: \NU
SET PCPLUS=F:\PROCOMM
SET TEMP=C:\TEMP
SET BLASTER=A220 I5 D1 T2
SET SOUND=G:\SBPRO
LH /L:0; 1, 42432 /S C:\DOS\SMARTDRV.EXE
LH /L:1, 56928 C:\DOS\MOUSE.COM /Y
LH /L:1, 13984 C:\DOS\SHARE /L:500
LH /L:1, 6400 C:\DOS\DOSKEY.COM
LH /L:1, 46576 C:\DOS\MSCDEX /d:MSCD001 /M:15 /V
SET WINPMT=Running Windows $p$g
WIN

Analysis of file:

@ECHO OFF
Suppresses the display of commands as they are processed
The @ character suppresses the display of the command line

CLS
Clears screen

PROMPT $P$G
Customizes the way the prompt is displayed

PATH C:\DOS;D:\WINDOWS;C:\;C: \NU
Specifies where, and in what order, DOS should search directories when a command is entered at the DOS prompt or in a batch file.
DOS searches these directories for a .COM, .BAT, or .EXE file.

SET PCPLUS=F:\PROCOMM
SET TEMP=C:\TEMP
SET BLASTER=A220 I5 D1 T2

SET SOUND=G:\SBPRO
Use the SET command to place variables in the DOS environment

LH /L:0; 1, 42432 /S C:\DOS\SMARTDRV.EXE
LH /L:1, 56928 C:\DOS\MOUSE.COM /Y
LH /L:1, 13984 C:\DOS\SHARE /L:500
LH /L:1, 6400 C:\DOS\DOSKEY.COM
LH /L:1, 46576 C:\DOS\MSCDEX /d:MSCD001 /M:15 /V
An abbreviated form of LOADHIGH, loads software and drivers needed when system starts.

SET WINPMT=Running Windows $p$g
Specifies how dos prompt should be displayed when running DOS within Windows

WIN
WIN.EXE is the command to load Windows
The use of the PATH command earlier in the file directs DOS to search for the command in C:\Windows, where the command is located.
Without the PATH command, the correct line would read:
C:\WINDOWS\WIN

Elements of a DOS command:

1. DOS requires that you use a specific set of rules, or syntax, when you issue commands.

Syntax is the order in which you type the elements of the DOS command
(Compare to grammar)

2. All DOS commands begin with a keyword that identifies the action you want performed

The Keyword is the action part, or verb, of the DOS command.

3. Parameters, which are a part of a command’s syntax, refine the way a command is executed.

Parameters further refine the command.
A switch is a type of parameter.
Parameters are usually optional. If no parameter is present, DOS uses the default parameters for the command.

4. Backslashes ( \ ) are used as separators (delimeters) when specifying file and directory information.

Backslashes connect to the character that comes before it. (C:\ for example)

5. Slashes, or forward slashes ( / ) are used as signals to DOS that the next character is a command-line switch.

Forward slashes connect to the character that comes after it. (DIR /W /P for example)

6. The help switch ( /?) can be used after a command to call up more information on the command.

Common DOS commands:

ATTRIB
(External)

ATTRIB [d:][path]filename [/S]
ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|-H] [d:][path]filename [/S]

Sets or displays the read-only, archive, system, and hidden attributes of a file or directory.

CD OR CHDIR
(Internal)

CHDIR (CD) [d:]path
CHDIR (CD)[..]

Displays working (current) directory and/or changes to a different directory.

CHKDSK
(External)

CHKDSK [d:][path][filename] [/F][/V]

Checks a disk and provides a file and memory status report.

COPY
(Internal)

COPY [/Y|-Y] [/A][/B] [d:][path]filename [/A][/B] [d:][path][filename] [/V]
or
COPY [/Y|-Y][/A][/B] [d:][path]filename+[d:][path]filename[...][d:][path][filename] [/V]

Copies and appends files.

DEL OR ERASE
(Internal)

DEL (ERASE) [d:][path]filename [/P]

Deletes (erases) files from disk.

DELTREE
(External)

DELTREE [/Y] [d:]path [d:]path[...]

Deletes (erases) a directory including all files and subdirectories that are in it.

DIR
(Internal)

DIR [d:][path][filename] [/A:(attributes)] [/O:(order)] [/B][/C][/CH][/L][/S][/P][/W]

Displays directory of files and directories stored on disk.

DISKCOMP
(External)

DISKCOMP [d:] [d:][/1][/8]

Compares the contents of two diskettes.

DISKCOPY
(External)

DISKCOPY [d:] [d:][/1][/V][/M]

Makes an exact copy of a diskette.

FC
(External)

FC [/A][/C][/L][/Lb n][/N][/T][/W][number] [d:][path]filename [d:][path]filename

or (for binary comparisons)
FC [/B][/number] [d:][path]filename [d:][path]filename

Displays the differences between two files or sets of files.

FDISK
(External)

FDISK [/status]

Prepares a fixed disk to accept DOS files for storage.

FORMAT
(External)

FORMAT d:[/1][/4][/8][/F:(size)] [/N:(sectors)] [/T:(tracks)][/B|/S][/C][/V:(label)] [/Q][/U][/V]

Formats a disk to accept DOS files.

LABEL
(External)

LABEL [d:][volume label]

Creates or changes or deletes a volume label for a disk.

MD OR MKDIR
(MD) (Internal)

MKDIR (MD) [d:]path

Creates a new subdirectory.

MEM
(External)

MEM [/program|/debug|/classify|/free|/module(name)] [/page]

Displays amount of installed and available memory, including extended, expanded, and upper memory.

MOVE
(Internal)

MOVE [/Y|/-Y] [d:][path]filename[,[d:][path]filename[...]] destination

Moves one or more files to the location you specify. Can also be used to rename directories.

PATH
(Internal)

PATH;
PATH [d:]path[;][d:]path[...]

Sets or displays directories that will be searched for programs not in the current directory.

PRINT
(External)

PRINT [/B:(buffersize)] [/D:(device)] [/M:(maxtick)] [/Q:(value] [/S:(timeslice)][/U:(busytick)] [/C][/P][/T] [d:][path][filename] [...]

Queues and prints data files.

PROMPT
(Internal)

PROMPT [prompt text] [options]

Changes the DOS command prompt.

RD OR RMDIR
(Internal)

RMDIR (RD) [d:]path

Removes a subdirectory.

RENAME OR REN
(Internal)

RENAME (REN) [d:][path]filename [d:][path]filename

Changes the filename under which a file is stored.

TREE
(External)

TREE [d:][path] [/A][/F]

Displays directory paths and (optionally) files in each subdirectory.

TYPE
(Internal)

TYPE [d:][path]filename

Displays the contents of a file.

UNDELETE
(External)

UNDELETE [d:][path][filename] [/DT|/DS|/DOS]
UNDELETE [/list|/all|/purge[d:]|/status|/load|/U|/S[d:]|/Td:[-entries]]

Restores files deleted with the DELETE command.

VER
(Internal)

VER

Displays the DOS version number.

VERIFY
(Internal)

VERIFY on|off

Turns on the verify mode; the program checks all copying operations to assure that files are copied correctly.

VOL
(Internal)

VOL [d:]

Displays a disk’s volume label.

XCOPY
(External)

XCOPY
(External)

XCOPY [d:][path]filename [d:][path][filename] [/A][/D:(date)] [/E][/M][/P][/S][/V][/W][Y\-Y]
Copies directories, subdirectories, and files.

MSDOS ERRORS

Abort, Retry, Fail – System is attempting to read a disk that is not readable or from a drive with no disk present.

Access denied – Usually meaning the file has a attribute on it

Bad command or file name – Usually this is when you miss type a command or if DOS does not know the command.

Bad or missing command interpreter – DOS cannot locate the Command.com

File Structure

ROOT DIRECTORY
Usually indicated by a single drive letter
C:\

IO.SYS
MSDOS.SYS
CONFIG.SYS
COMMAND.COM
AUTOEXEC.BAT
[WINDOWS] C:\WINDOWS
WIN.INI
HIMEM.SYS
FREECELL.EXE
WIN.COM
[APPLIC~1] C:\WINDOWS\APPLIC~1
[IDENT~1] C:\WINDOWS\APPLIC~1\IDENT~1
[MICROS~1]
[WELCOME]
[OFFICE]
[WORD] C:\WINDOWS\APPLIC~1\WORD
MICROS~2]
[MYDOCU~1]
[PROGRA~1] C:\PROGRA~1

There is a pdf of this document available –> Click here to download it

~~~~~~~~~~~
Note: These are notes from my lectures as an IT instructor. Notes are from 1999-2001, so there may be little relevance to contemporary technologies. Still, it seemed like a shame to delete all of this work, so here they are. I hope someone finds them helpful.

Comments are closed.