*** There are new commands in Comint mode.
C-c C-x fetches the "next" line from the input history;
that is, the line after the last line you got.
You can use this command to fetch successive lines, one by one.
C-c SPC accumulates lines of input. More precisely, it arranges to send the current line together with the following line, when you send the following line.
C-c C-a if repeated twice consecutively now moves to the process mark, which separates the pending input from the subprocess output and the previously sent input.
C-c M-r now runs comint-previous-matching-input-from-input; it searches for a previous command, using the current pending input as the search string.