I'd expect (see background material below) the following Plain TeX manuscript
a^^Mb\bye
to be equivalent to
a
b\bye
and therefore to typeset thus:
a b
Instead, pdftex pauses mid-compilation, and writes the following to the console:
entering extended mode
(./test29.tex)
*
Why?
Background material
The TeXbook (20th printing, Addison-Wesley 1991) describes the meaning of ^^
and how it is processed as follows.
On p. 45:
TEX has a standard way to refer to the invisible characters of ASCII: Code 0 can be typed as the sequence of three characters
^^@
, code 1 can be typed^^A
, and so on up to code 31, which is^^_
(see Appendix C). If the character following^^
has an internal code between 64 and 127, TEX subtracts 64 from the code; if the code is between 0 and 63, TEX adds 64. Hence code 127 can be typed^^?
[...]^^
symbols can even be used as letters within control words.[...]
There’s also a special convention in which
^^
is followed by two “lowercase hexadecimal digits,”0
–9
ora
–f
. With this convention, all 256 characters are are obtainable in a uniform way, from^^00
to^^ff
. Character 127 is^^7f
.Most of the
^^
codes are unimportant except in unusual applications. But^^M
is particularly noteworthy because it is code 13, the ASCII<return>
that TEX normally places at the right end of every line of your input file.
On pp. 46-47:
If TEX sees a superscript character (category 7) in any state, and if that character is followed by another identical character, and if those two equal characters are followed by a character of code c < 128, then they are deleted and 64 is added to or subtracted from the code c. (Thus,
^^A
is replaced by a single character whose code is 1, etc., as explained earlier.) However, if the two superscript characters are immediately followed by two of the lowercase hexadecimal digits 0123456789abcdef, the four-character sequence is replaced by a single character having the specified hexadecimal code. [...] After the replacement is made, TEX begins again as if the new character had been present all the time.