Why did DOS use dollar-terminated strings?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
According to a few tutorials I am seeing, DOS used dollar-terminated strings to write to the terminal. This seems to also be documented here on INT 21H
.
AH = 09h - WRITE STRING TO STANDARD OUTPUT
Entry: DS:DX -> '$'-terminated string
Return: AL = 24h
Notes: ^C/^Break are checked
You can see this from the code in this tutorial here. What was the reason for going with dollar-terminated strings rather than NUL-terminated strings like C?
ms-dos assembly
add a comment |Â
up vote
1
down vote
favorite
According to a few tutorials I am seeing, DOS used dollar-terminated strings to write to the terminal. This seems to also be documented here on INT 21H
.
AH = 09h - WRITE STRING TO STANDARD OUTPUT
Entry: DS:DX -> '$'-terminated string
Return: AL = 24h
Notes: ^C/^Break are checked
You can see this from the code in this tutorial here. What was the reason for going with dollar-terminated strings rather than NUL-terminated strings like C?
ms-dos assembly
1
That comes from CP/M.
â mannaggia
54 mins ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
According to a few tutorials I am seeing, DOS used dollar-terminated strings to write to the terminal. This seems to also be documented here on INT 21H
.
AH = 09h - WRITE STRING TO STANDARD OUTPUT
Entry: DS:DX -> '$'-terminated string
Return: AL = 24h
Notes: ^C/^Break are checked
You can see this from the code in this tutorial here. What was the reason for going with dollar-terminated strings rather than NUL-terminated strings like C?
ms-dos assembly
According to a few tutorials I am seeing, DOS used dollar-terminated strings to write to the terminal. This seems to also be documented here on INT 21H
.
AH = 09h - WRITE STRING TO STANDARD OUTPUT
Entry: DS:DX -> '$'-terminated string
Return: AL = 24h
Notes: ^C/^Break are checked
You can see this from the code in this tutorial here. What was the reason for going with dollar-terminated strings rather than NUL-terminated strings like C?
ms-dos assembly
ms-dos assembly
edited 1 hour ago
asked 1 hour ago
Evan Carroll
2729
2729
1
That comes from CP/M.
â mannaggia
54 mins ago
add a comment |Â
1
That comes from CP/M.
â mannaggia
54 mins ago
1
1
That comes from CP/M.
â mannaggia
54 mins ago
That comes from CP/M.
â mannaggia
54 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
7
down vote
The short answer is that DOS was designed to be similar to CP/M, and drawing a quote from here:
While 8-bit programs could not run on 16-bit computers, Intel
documented how the original software developer could mechanically
translate an 8-bit program into a 16-bit program. Only the developer
of the program with possession of the source code could make this
translation. I designed DOS so the translated program would work the
same as it had with CP/M â translation compatibility. The key to
making this work was implementing the CP/M API.
Or course this brings up the question as to why CP/M used the dollar sign.
This discussion says CP/M got the idea from DEC, which used the RAD50 character encoding. With only 40 characters (50 octal), you only have uppercase, digits, space, peroid, dollar, and percent.
Both CP/M and RT-11 are evolved from earlier DEC OS's, most notably
OS/8 (on the PDP-8) and DOS-11 (on the PDP-11). The most obvious
feature of all of these OS's is the presence of "PIP"
So DEC probably chose dollar because it didn't have many options, CP/M got it from DEC, and DOS got it from CP/M.
New contributor
I'm really impressed by the RAD50 information. I'll mark this answer as chosen if no one else has anything to do add. It looks like you went down a good rabbit hole from DOS to CP/M to find that.
â Evan Carroll
41 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
The short answer is that DOS was designed to be similar to CP/M, and drawing a quote from here:
While 8-bit programs could not run on 16-bit computers, Intel
documented how the original software developer could mechanically
translate an 8-bit program into a 16-bit program. Only the developer
of the program with possession of the source code could make this
translation. I designed DOS so the translated program would work the
same as it had with CP/M â translation compatibility. The key to
making this work was implementing the CP/M API.
Or course this brings up the question as to why CP/M used the dollar sign.
This discussion says CP/M got the idea from DEC, which used the RAD50 character encoding. With only 40 characters (50 octal), you only have uppercase, digits, space, peroid, dollar, and percent.
Both CP/M and RT-11 are evolved from earlier DEC OS's, most notably
OS/8 (on the PDP-8) and DOS-11 (on the PDP-11). The most obvious
feature of all of these OS's is the presence of "PIP"
So DEC probably chose dollar because it didn't have many options, CP/M got it from DEC, and DOS got it from CP/M.
New contributor
I'm really impressed by the RAD50 information. I'll mark this answer as chosen if no one else has anything to do add. It looks like you went down a good rabbit hole from DOS to CP/M to find that.
â Evan Carroll
41 mins ago
add a comment |Â
up vote
7
down vote
The short answer is that DOS was designed to be similar to CP/M, and drawing a quote from here:
While 8-bit programs could not run on 16-bit computers, Intel
documented how the original software developer could mechanically
translate an 8-bit program into a 16-bit program. Only the developer
of the program with possession of the source code could make this
translation. I designed DOS so the translated program would work the
same as it had with CP/M â translation compatibility. The key to
making this work was implementing the CP/M API.
Or course this brings up the question as to why CP/M used the dollar sign.
This discussion says CP/M got the idea from DEC, which used the RAD50 character encoding. With only 40 characters (50 octal), you only have uppercase, digits, space, peroid, dollar, and percent.
Both CP/M and RT-11 are evolved from earlier DEC OS's, most notably
OS/8 (on the PDP-8) and DOS-11 (on the PDP-11). The most obvious
feature of all of these OS's is the presence of "PIP"
So DEC probably chose dollar because it didn't have many options, CP/M got it from DEC, and DOS got it from CP/M.
New contributor
I'm really impressed by the RAD50 information. I'll mark this answer as chosen if no one else has anything to do add. It looks like you went down a good rabbit hole from DOS to CP/M to find that.
â Evan Carroll
41 mins ago
add a comment |Â
up vote
7
down vote
up vote
7
down vote
The short answer is that DOS was designed to be similar to CP/M, and drawing a quote from here:
While 8-bit programs could not run on 16-bit computers, Intel
documented how the original software developer could mechanically
translate an 8-bit program into a 16-bit program. Only the developer
of the program with possession of the source code could make this
translation. I designed DOS so the translated program would work the
same as it had with CP/M â translation compatibility. The key to
making this work was implementing the CP/M API.
Or course this brings up the question as to why CP/M used the dollar sign.
This discussion says CP/M got the idea from DEC, which used the RAD50 character encoding. With only 40 characters (50 octal), you only have uppercase, digits, space, peroid, dollar, and percent.
Both CP/M and RT-11 are evolved from earlier DEC OS's, most notably
OS/8 (on the PDP-8) and DOS-11 (on the PDP-11). The most obvious
feature of all of these OS's is the presence of "PIP"
So DEC probably chose dollar because it didn't have many options, CP/M got it from DEC, and DOS got it from CP/M.
New contributor
The short answer is that DOS was designed to be similar to CP/M, and drawing a quote from here:
While 8-bit programs could not run on 16-bit computers, Intel
documented how the original software developer could mechanically
translate an 8-bit program into a 16-bit program. Only the developer
of the program with possession of the source code could make this
translation. I designed DOS so the translated program would work the
same as it had with CP/M â translation compatibility. The key to
making this work was implementing the CP/M API.
Or course this brings up the question as to why CP/M used the dollar sign.
This discussion says CP/M got the idea from DEC, which used the RAD50 character encoding. With only 40 characters (50 octal), you only have uppercase, digits, space, peroid, dollar, and percent.
Both CP/M and RT-11 are evolved from earlier DEC OS's, most notably
OS/8 (on the PDP-8) and DOS-11 (on the PDP-11). The most obvious
feature of all of these OS's is the presence of "PIP"
So DEC probably chose dollar because it didn't have many options, CP/M got it from DEC, and DOS got it from CP/M.
New contributor
New contributor
answered 50 mins ago
Eugene Styer
17114
17114
New contributor
New contributor
I'm really impressed by the RAD50 information. I'll mark this answer as chosen if no one else has anything to do add. It looks like you went down a good rabbit hole from DOS to CP/M to find that.
â Evan Carroll
41 mins ago
add a comment |Â
I'm really impressed by the RAD50 information. I'll mark this answer as chosen if no one else has anything to do add. It looks like you went down a good rabbit hole from DOS to CP/M to find that.
â Evan Carroll
41 mins ago
I'm really impressed by the RAD50 information. I'll mark this answer as chosen if no one else has anything to do add. It looks like you went down a good rabbit hole from DOS to CP/M to find that.
â Evan Carroll
41 mins ago
I'm really impressed by the RAD50 information. I'll mark this answer as chosen if no one else has anything to do add. It looks like you went down a good rabbit hole from DOS to CP/M to find that.
â Evan Carroll
41 mins ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f7638%2fwhy-did-dos-use-dollar-terminated-strings%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
That comes from CP/M.
â mannaggia
54 mins ago