
PC DOS 1.0, but Not Quite - skissane
http://www.os2museum.com/wp/pc-dos-1-0-but-not-quite/
======
userbinator
I follow the demoscene so I'm pretty familiar with the tiny-yet-featureful
productions its produced, and yet the sizes on some of those binaries still
somewhat surprises me --- an entire assembler is merely _6389 bytes_! A "Hello
World" compiled with GCC is roughly the same size (
[http://timelessname.com/elfbin/](http://timelessname.com/elfbin/) ). The
DEBUG.COM debugger is 5450B, and the shell, COMMAND.COM, which contains 7
builtin commands, is merely 2576 bytes.

More amazing is the fact that the original developers probably weren't
exerting great effort in size-optimising them either, unlike demoscene
productions, and yet they're still extremely tiny.

~~~
Shorel
One reason is that .COM programs were copied to memory as they were, in a
single segment, and therefore could access a max of 64 kilobytes of RAM, and
they itself could be max 64 kb. They are a tiny memory dump of the program.

.EXE programs have loaders that handled the segmented memory and could access
much more, up to the 1MB of memory space. That loader of course made .EXE
programs larger than .COM.

~~~
WalterBright
> could access a max of 64 kilobytes of RAM

This is incorrect. A COM program had to fit its code and static data into 64K,
but it could access as much RAM as existed on the machine.

A related misconception is that the segment registers in COM programs had to
have all the same value. This is incorrect as well, as the program once loaded
could reset them to any value.

~~~
nils-m-holm
Indeed! First thing the executables generated by my early DOS compilers did
was to set up the es: and ds: segments in order to get more space.

Eventually I overcame laziness though, and started to study the EXE file
format, which, AFAIR, does not have a "loader", (as Shorel suggested) but just
a header describing the layout of the file. I think EXE files tend to be
larger, just because they _can_ be larger.

~~~
int_19h
MZ (DOS .exe) requires a loader - smarter than just "copy this whole thing
into memory and jump to start", anyway - because it has a relocation table.
But, of course, the loader is not part of the executable itself, so it doesn't
contribute to its size. I suspect that the reference was to the relocation
tables themselves.

------
yjftsjthsd-h
I'm pleasantly surprised that people 1. care about this corner of computer
history, and 2. have so much knowledge. I know there's a lot less to look
through, but things like having found a message on the disk for the released
version of PC DOS, even though it apparently was just un-scrubbed data outside
the filesystem, seems crazy. I suppose the closed nature of the releases has
been offset by the relatively open platform and the fact that they've had
decades to dig through it.

------
gundul
Oh man... The screen took me back to the days on creating .COM file from
Debug.com..

------
kalleboo
Is anyone getting 403 Forbidden on this whole domain? I had to read the
article through Google cache.

edit: I can load it over 4G on my phone though. Wonder why they would ban a
random Japanese ISP?

~~~
i336_
Unsure why you're being downvoted. I'm in Australia and cannot access the site
either :(

~~~
cyberferret
In Australia, and can see it fine here... (Telstra network).

------
Theodores
I was underwhelmed by the 'power' of the original IBM PC because I came from a
BBC micro background. DOS was a bit 'meh' compared to ADFS on the BBC Micro
with BASIC where you could drop down to the assembler and bang out some 6502.
Who needs more than three registers anyway?

I found DOS to be incomplete and demanding where it need not be. A lot of time
was wasted on config.sys and autoexec.bat with the install disks treating you
as stupid.

------
krallja
What an exciting find! I wonder where it came from?

------
wruza
>But there’s also BAS18.COM and BAS18A.COM which expect the BASIC “ROM” at
segment 1800h (at 96K, clearly assuming a 128K machine) in RAM rather than at
segment F600h in ROM.

Is int 18h the [intended] coincidence then?

------
cyberferret
Seeing that directory listing (and especially seeing BASICA.COM) brought back
a flood of memories of my first days of programming, playing with the IBM PC-1
and PC/XT.

