# "why is the string in function 9 terminated by a dollar sign?"



## john1 (Nov 25, 2000)

Hi,

"why is the string in function 9 terminated by a dollar sign?"
This refers to dos ( i think)
I havent been able to find function 9 yet,
let alone any string.

Can anyone shed any light on this ?

John


----------



## IMM (Feb 1, 2002)

The 'function' here is a reference to the AH=9 function of interrupt 21 (int21 is most of dos after version 1.0 - and looks a little less like CP/M that way  ).
http://en.wikipedia.org/wiki/MS-DOS_API
http://www.ctyme.com/intr/rb-2562.htm
*$ was used as a string terminator in CP/M* but it may predate that with some assembler syntax ,if I recall.
Gary Kildall was probably the man to ask why - he once said to ask Bill Gates why the string was terminated that way - but said that Gates wouldn't know - only he did.
Gary passed away some time ago. Most attribute the cause of death to the blow to the head.


----------



## john1 (Nov 25, 2000)

I just thought someone would know by now.
Seems odd to claim that only he knew.
My knowledge of machine code is thin,
but many people are very familiar with it,
and the codes and sub routines are all listed.

A lot of those early registers were four digits
and were used in pairs to make instruction codes.

Maybe he simply meant that between him and Bill,
only he would know.

Which is different to the way most sources report it.

John


----------



## loserOlimbs (Jun 19, 2004)

Or maybe he just meant that they decision was his... and he chose on something personal... who knows. I see it as a choice and not a technical reason that only he knew.


----------



## IMM (Feb 1, 2002)

When I first read this - I didn't realize that anyone would be interested in the actual technical bits.
I just threw some goofy comment about assembler as a 'throw away' figuring that the important bit for most people is that Gary was 'seeming to indicate' that Bill (or Microsoft) had code they didn't comprehend (and some thought they stole) 
There were quite a few people who 'saw' a lot of similarity between DOS 1.0 and the earlier CP/M that Gary wrote.
Some of that story is here:
http://www.statemaster.com/encyclopedia/Gary-Kildall

If one were writing a book though, and wanted to follow up on the technical aspects of the comment, there are several things which would be of interest in the string termination quirk of this story.

One would have to imagine the tools which Gary had available to him (but which were not available to others).
The first thing to imagine would be the output device for debugging which would likely come from DEC's store (perhaps an LE8 ?)
Another thing to keep in mind is DEC's previous work. The pdp8 documentation is really worth looking at in this regard for what the 'escape' character is and for it's character set. See for example:
h_tt_p://www.pdp8online.com/os/os8/os8_cmd.shtml 
(along with others on the site) h_tt_p://www.pdp8online.com/sitemap.shtml

One should *definitely* look at the PL/M guides because this was the original implementation for CP/M.
This manual is for a later version, but has a section on the character set.
h_tt_p://www.slac.stanford.edu/grp/cd/soft/rmx/manuals/PLM_386.PDF

If someone were to research this for a book - he or she would be well advised to keep in mind the time-frames.
What was released or available at what point in time? 
Remember that when PL/M came along - there was no ASCII -- and no null terminator in the charset


----------

