welcome back to the adventure this is Adam and today we'll be going over
memory management in ms-dos back in the 1980s there were some decisions made by
Microsoft and IBM that would create some limitations on ms-dos as we know it
today one of those limitations that I'd like to highlight in this video is how
memory is used in ms-dos so to start off with I'd like to use the mem command and
this is going to show us how memory is being used by the system currently
installed in the system there's 81 megabytes of memory now the conventional
memory as seen here has a total of 640 kilobytes this is a limitation of ms-dos
so no matter how much memory is in the system conventional memory is at most
640 kilobytes a majority of ms-dos programs require conventional memory to
run so we don't want to use all of the conventional memory in things just
required to start up the system the next level of memory that's available is
upper memory that is everything between 640 kilobytes and one megabyte some of
that memory is already being used it's reserved for system components such as
the graphics adapter with our current configuration we don't have access to
upper memory the last thing I'll touch on here is the extended memory that use
everything from one megabyte off to however much as in the system currently
is not detecting all the memory that I have installed in the computer but that
is a discussion for a later video for right now we have plenty of memory for
the demonstration that we'll be doing today
and lastly at the bottom it says the high memory area is available the high
memory area is 64 kilobytes from the one megabyte mark above so the high memory
err is above conventional memory above upper
memory but below extended men what we will try to do here today is free up
some of that very precious conventional memory that we're going to need to run
applications to do that let's start by going into edit and we'll have the edit
program open config dot seeds so this is our config TSA's file from
last time one minor note is I did have the name of the optical drive incorrect
before I have fixed that so known when it boots we do have the optical drive
working properly also if you'll notice from the last boot there was an extended
memory test that was done that's part of the version of high mem duck sees that
comes with the 6.22 so we are going to use a switch to fix
that it's test mem : off that's going to prevent it from testing extended memory
every time the PC is turned on next we will add a line between EMM 386 and the
CD one dots is that we use to load the optical drive the line we will be adding
is Doss equals PI comma UMB what this is saying is that dos is going to load high
it's going to load into the high memory area that's an important distinction
because we'll be using some other commands here shortly that are also high
but they mean a different thing and we'll explain that as we move on now the
DOS equals um B means upper memory block it's telling das that it can manage
upper memory this is important for what we'll be doing later now we are going to
add a little bit here to this line for the CD one dot since we're going to say
device hi it's telling the device to load high but not in the high memory
area it's telling the device driver to load into an upper memory block one
important thing to note about loading into the upper memory block is that the
driver can only be loaded into one piece it can't be split into multiple parts
and as I mentioned before there are some areas within upper memory that are
reserved for system related things like graphic so it needs to be loaded into an
upper memory block in a single piece and Doss will manage that for us that's why
we put the DOS hi um be above this line next we'll go back to EMM 386 there's
one more switch that I would like to add on here but it's a bit confusing and
require an explanation so what we're adding here is I equals B
zero zero zero - b7 FF this area here is a hexadecimal memory rein what is
normally within that range is the monochrome text mode it's not used by
very many programs and when it is it's specifically a requirement to run the
application so you'll likely know if the monochrome
text mode is required for the program because we're not currently doing
anything that uses that mode we can tell EMM 386 that it's okay to open up that
range for other things to load in that concludes the changes that we're making
to the config dot SUSE file so just a quick explanation of how I got to this
menu before I'm pressing the Alt key on the keyboard that brings the cursor up
to the file menu as you can see it's now too rounded in a black box
pressing the down arrow is going to expand that menu and that's what gives
me these options to save which is what I want to do followed by exit which is the
next thing I want to do one more thing to change here we're going to go to edit
and auto exact path so this is the autoexec.bat file as we
had it before what we're going to do is add the letters L H to the beginning of
this command for MSC P DX this is telling the program to load high similar
to the CD one dot says driver this is also telling it to load into upper
memory one more quick note on why I'm not opening the next file from the file
menu it's harder to do with that a mouse and I'm not currently loading a mouse
driver but that is something that we will do in the near future so now that
we have our autoexec.bat and can fix his files updated let's restart the PC and
then we'll check our memory usage and see how we did all right here we are
back after the restart and we'll type in the mem command much much better now we
have 616 K of memory left whereas before we had quite a bit less so one more
thing I'd like to go over with the mem the command is a couple switches that
are very useful so I would like to use mem /p which is going to separate the
output into pages so once the screen is filled with information it will stop and
have a prompt to press any key to continue when I'm done reading what's on
the screen I can press any key and it will display whatever is left for the
output of the command similar to our der slash P that we used before the next
switch is going to be C which is giving us a breakdown of all the programs that
are currently using memo so as we can see here what's loading into
conventional memory is ms-dos it takes up 16 kilobytes our high mem dots is
takes up 1 kilobyte and EMM 386 which takes up 4 kilobytes so all in all we
have significantly less usage on conventional memory everything else
we've moved into a remember so now we have some basic tools
for managing memory in ms-dos thanks for stopping by don't forget to
Like comment and subscribe see you next video