Files
Lee Hanken 7c8efd2228 Initial commit: HPR Knowledge Base MCP Server
- MCP server with stdio transport for local use
- Search episodes, transcripts, hosts, and series
- 4,511 episodes with metadata and transcripts
- Data loader with in-memory JSON storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 10:54:13 +00:00

105 lines
9.0 KiB
Plaintext

Episode: 3450
Title: HPR3450: Internal Commands
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr3450/hpr3450.mp3
Transcribed: 2025-10-24 23:40:20
---
This is Hacker Public Radio Episode 3454 Friday, the 22nd of October 2021.
Today's show is entitled, Internal Commands and is part of the series DOS it is hosted by Aukah
and is about 12 minutes long and carries a clean flag. The summary is, more on DOS this time it
is Internal Commands. This episode of HPR is brought to you by an honest host.com. Get 15% discount
on all shared hosting with the offer code HPR15 that's HPR15. Better web hosting that's
honest and fair at an honest host.com.
Hello, this is Aukah, coming you to Hacker Public Radio and another exciting episode
in our DOS series, taking a look at that old war horse. So in a last time we looked at the
boot process. What happens after you've booted? The computer is sitting there waiting for you to
do something. The way you do something in DOS is through commands that the computer understands.
A command may cause the computer to take some action or to execute some file. We'll leave
most of the file execution discussion for another lesson and for now focus on the topic of what are
called Internal Commands. Now DOS comes with a built-in command interpreter called command.com.
This file is loaded during the boot process which means that command.com is resident in memory at
all times and the commands it understands are available to the user at all times.
Not all DOS commands are understood by commands.com. There are commands called external commands
that reside in separate files on your hard drive and must be called specifically for you to use them.
Internal commands I think are a lot very similar by analogy to shell commands that we use in Linux.
You know that if you are running the bash shell there's a whole series of commands that it understands.
And if you want to look up information about them you have to look in the manual page for bash
to get that information because it's all part of the bash shell and other shells as well.
The bash is the most common one on Linux computers as far as I know.
So the command.com in DOS is kind of similar to that. So you don't need a separate file.
To do anything with those commands it's there as part of you know you can't boot without command.com.
So why do they have internal and external commands in DOS? Well you know some of it has to do
with the limitations of how DOS handles memory. A lot of things in DOS that night strike you as
a little weird are because of memory limitations. We will talk about this more in a later lesson.
But for now let's just say DOS could only address a very limited amount of memory. In fact a total
of one megabyte. Now you might say hey what's the 640k that I remember? Well that one
megabyte was divided into lower and upper memory and the upper memory was for video. So
there was basically 300 something like 384k as my memory serves. It was reserved basically for
video memory and then the lower 640k was available for program space. So it added up. Now we say
one megabyte remember that there's one megabyte in binary which is 1,024 bytes. So 640 plus 384 is I
think 1,024 if my math is correct. So anyway you had limited memory and programs are very quickly
bumping up against the constraints of available memory. Now since command.com is loaded into memory
at the beginning of the boot process and stays resident in memory at all times it would not make
sense to load commands that you would only use infrequently or to load commands that only certain
uses would ever need. So these commands were placed in external files where they could be accessed
if needed and if you look in your DOS directory on your hard drive assuming you have a hard drive
on your old DOS computer. I didn't when I got my first one but the hard drive is usually C colon
backslash DOS and you'll see the external commands represented by files that are either a .exe or
.com. You won't see the internal commands here though because those commands are all contained
within commands.com. Now if you've created a DOS boot disk which is a useful thing to have
you know particularly if you're going to be working with computers and you know it can come
in handy it will contain three files as we discussed and listen to IO.Sys and this DOS.Sys and
command.com. The first two files are hidden so you won't see them in a DOS DIR command normally. DIR is
the directory command which is equivalent to the Linux LS. But if you examine a boot disk using
some other software for instance a Windows Explorer and set it to display all files
then you'll see them there. These files are located in specific places on the disk and that's why
the whole thing about creating a boot disk and the boot process this matters. You can't just
take any old floppy disk and copy files onto it and say oh now I can boot and don't work that way.
Now the third file the command.com must be in the root directory
but it doesn't have to be on a specific disk location per se just as long as it's in the root
directory. Now since it's on the boot disk you can't boot without it. That means that the
commands it contains are available to you whenever you boot from the disk. The reason any
prepared computer person back in the day would have a DOS boot disk candy at all times
is that a problem on the hard drive may render the computer unbootable.
Booting from a DOS boot disk and using the commands available to you in command.com would enable
you to diagnose and fix the problem. When I first wrote these tutorials I was writing them for
people who were basically moving from the DOS world into the Windows world getting into computers
etc and trying to explain what all this stuff was about. Now the other major reason someone might
want to create a DOS boot disk is to run legacy DOS software that has problems running with more
current operating systems. Now I think these days that's less likely to be the case because
things like DOS box would handle that perfectly well. But there are still occasions.
My copy of spin right starts by booting into free DOS and then in free DOS it loads the program.
Now one last note regarding internal commands. The internal commands contained within command.com
are the commands that are used in writing batch files. We will discuss batch files more in a future
installment but when consequences worth noting here the batch file will not run properly if it cannot
find command.com. Normally this ought to be handled by the path command but if you ever have problems
getting a batch file to run try putting a copy of command.com in the same directory as the batch file
this often gets the batch file to run perfectly. Now there are 62 internal commands contained
within the command.com command interpreter. Break buffers call CD. You use CD a lot that's changed
directory. CHCP. CHDIR. This is another way to change directory. Choice. CLS that's a clear
screen. Copy. Country. C-T-T-Y. Date. D-E-L for delete. Device. Device high. D-I-R that's the
directory command. DOS. DriveParm. Echo. Erase. Error level. Exist. Exit. F-C-B-S. Files.
Four. Go to. If. Now when you see four go to and if it should say huh it could write a program
with some of this stuff yeah that's what a batch file is. It's basically a series of commands that
does something. Include. Install. Last Drive. L-H. Load fix. Load high. MD. That's to make a directory.
Also M-K-D-I-R does the same thing. They're equivalent. Menu color. Menu default. Menu item. Move.
Not. Numlock. Path. Pause. Prompt. RD. That's Remove directory. Or RMD-I-R which is also
Remove directory. R-E-N. I remark. R-E-N. Rename. Or rename. Set. Shell. Set is used to set the
value of a variable. Shift. Stacks. Submenu. Switches. Time. True name. Type. V-E-R. Verify. And
involve. Now some of these internal commands are meant to be executed from the command line or within a
batch file. Others. Files and switches are generally used within a configuration file like
config sis to help configure your system. Because both config sis and auto exec bat use commands
that are found in command.com. They must load later in the boot process. So if you are wondering
why things happen in that specific order in the boot process which we discussed last week,
now you know why. It has to be that way. So this is a hook up for hacker public radio
signing off and is always encouraging you to support free software. Bye bye.
You've been listening to Hacker Public Radio at Hacker Public Radio. We are a community podcast
network that releases shows every weekday Monday through Friday. Today's show, like all our shows,
was contributed by an HBR listener like yourself. If you ever thought of recording a podcast
and click on our contributing to find out how easy it really is. Hacker Public Radio was found
by the digital dog pound and the infonomicon computer club and it's part of the binary revolution
at binwreff.com. If you have comments on today's show, please email the host directly, leave a
comment on the website or record a follow up episode yourself. Unless otherwise status,
today's show is released on the create of comments, attribution, share a light 3.0 license.