With regard to early occurrences in print of "yup" as an informal conversational way of saying "yes," I note the following instances uncovered in a series of Elephind newspaper database searches that I ran for the period 1880–1890.
From "In the Far West: A Frontier Justice Who Believes in the Enforcement of Good Laws," in the [Hillsboro, Ohio] News-Herald (September 29, 1886), reprinted from the Chicago [Illinois] Rambler:
A man with his face bandaged up, walking on crutches, limped into the office of a justice of the peace in Red Gulch, Arizona, last week, and exclaimed: "Do you know Two-fingered Jimmy?"
"Yup," responded the justice.
"Well, I want a warrant for his arrest!" continued the lame man, excitedly.
From "Pronunciation of 'Yes,'" in the Springfield [Ohio] Daily Republic (November 5, 1887), reprinted from The Youth's Companion (published in Boston, Massachusetts):
There is probably no word in the English language which is more ruthlessly corrupted in the pronunciation than this monosyllable. A party of young people were saying goodbye on the corner of a street in Boston.
"May I walk with you?" asked a young man of a charmingly pretty and fresh girl, "Shall we cross the common?"
"Ayah!" was the nonchalant reply. At least this is as nearly as the pen can do justice to the sound. It is to be presumed that the pretty young lady meant "yes," for she and her companion immediately set off in the direction indicated, but no foreigner would have guessed that the correctly written affirmative and her corruption of it were one and the same.
There are many versions of this one little word, from the "Yup" of the street boy to the inarticulate grunt of the boor, yet, after all, the combination of three letters is not difficult to pronounce.
From "Bottles and Rags: A Thanksgiving Story," in the Dallas [Texas] Daily Herald (November 23, 1887), reprinted from Commercial Travelers' Magazine, also published in Boston:
"Bottles," said the girl [Rags], after a short pause, "what's the most money you ever had in all yer life?"
"To onct, do you mean, Rags?"
"Yup."
Bottles and Rags are described in the story as "Boston street waifs."
From "The Thoughts of Youth Are Long," in the St. Paul [Minnesota] Daily Globe (November 4, 1888), reprinted from Puck:
It's papa's birthday next week, Johnny," remarked Mamma, "and you ought to be thinking of giving him a present."
"Yairp," said Johnny.
You hadn't forgot it, had you?"
"Yop."
"Then you hadn't thought of any thing to give him?"
"Nawp."
"Let's see. You've saved up $2 haven't you?"
"Yup."
I suspect that Puck in this case refers to the U.S. humor magazine of that name, which was originally published in St. Louis, Missouri, but relocated to New York City by 1887.
From "Wise Men," in the Newberry [South Carolina] Herald and News (December 20, 1898):
"Done be'n hunt'n, Uncle Eph'm?" asked the one [hunter] with the game of the other, who hadn't any.
"Yup, Rufus," said Uncle Ephraim.
"Yah! Aint done tuk nuffin, eh?"
From Alice Brown, "A Tricycle Story," in the Wichita [Kansas] Eagle (July 5, 1889), reprinted from The Youth's Companion:
"Has your father a horse?" called Daphne to a bareheaded and barefooted boy who sat on the fence, gazing at us in what we hoped was admiring awe.
"Yup."
"Is he at home the horse, I mean?"
"No, he ain't."
And from "Among the Corn Rows: An Interesting Romance of a Dakota Settler," in the [Washington, D.C.] Evening Star (July 5, 1890), reprinted from Harper's Weekly, which was published in New York City:
Rob [Rodemaker] looked over the edge of the bank, whistled, turned away. "Oh, I see! Excuse me! Don't blame yeh a bit, though. Good weather f'r corn," he went on, looking up at the trees. "Corn seems to be pretty well forward," he continued in a louder voice as he looked away, still gazing into the air. "Crops is looking first-class in Boomtown. Hello! Is this Otto? H'yare, y' little scamp! Get on to that horse ag'in. Quick, 'r I'll take y'r skin off an' hang it on the fence. What y' been doing?"
"Ben in swimmin'. Jimminy, ain't it fun! When 'd y' get back?" said the boy, grinning.
"Never you mind," replied Bob, leaping the fence by laying his left hand on the top rail. "Get on that horse." He tossed the boy up on the horse, hung his coat on the fence. "I s'pose the ol' man makes her [Julia] plough the same as usual?"
"Yup," said Otto.
Otto is a boy named Otto Peterson, the little brother of Julia, the story's heroine, and the son of Norwegian immigrants to the Dakotas.
Assessment
The seven instances cited in this answer appeared in U.S. newspapers during a period from September 1886 to July 1890, indicating that the expression was in use in some parts of the United States by the latter half of the 1880s. Although the earliest relevant instance of "yup" was first published in Chicago, Illinois, its writer claims (unconvincingly) that the anecdote originated in what was at that time still the relatively Wild West of Arizona—and the speaker to whom the word is attributed is a justice of the peace.
Five of the remaining six instances, however, come from publications in either Boston (three) or New York (two). The only other place of origin of a unique instance of "yup" in the relevant sense during this period is Newberry, South Carolina, in a newspaper anecdote in which it appears as a dialect word.
All five of the Boston and New York instances associate the expression with children, including two Boston instances that specifically link its use to street waifs. Whether "yup" as "yes" originated in the northeastern U.S. and among children is unclear from this tiny sample of occurrences, but it certainly seems to have been in use among children there from a fairly early stage of its published existence.
I should note that instances of "yup" as a nonsense syllable or as a sound for calling to various domesticated animals (from dogs to horses to pigs) go back to the 1850s at least, but I see no necessary connection between these uses of "yup" and "yup" as a form of "yes."