Former President Jimmy Carter on Wednesday expressed optimism that President Donald Trump might break a legislative logjam with his six-month deadline for Congress to address the immigration status of 800,000-plus U.S. residents who were brought to the country illegally as children.

Carter told Emory University students that the "pressures and the publicity that Trump has brought to the immigration issue" could even yield comprehensive immigration law changes that Presidents George W. Bush and Barack Obama could not muster.

"I don't see that as a hopeless cause," Carter said. He added that Trump's critics, including himself, "have to give him credit when he does some things that are not as bad" as they are depicted.

"As a matter of fact, to give Trump some due, he hasn't ended DACA yet," Carter said. "What he said is he's given the Congress six months to address the issue, which is long overdue."

He also noted that Trump has waffled on whether he'd actually move to deport so-called "dreamers" if Congress doesn't act.

As the 92-year-old Democrat spoke at Emory in Atlanta, Democratic congressional leaders Nancy Pelosi of California and Chuck Schumer of New York were huddled with the Republican Trump at the White House; afterward, Pelosi and Schumer announced a deal they said would protect young immigrants from deportation and grant some Republican demands on border security.

Carter reminded students that Obama, whom Carter supported, failed to win passage for the Dream Act -- named for the sometimes sympathetic stories of the young immigrants -- even when he had Democratic majorities on Capitol Hill.

The 39th president, who served one term from 1977 to 1981, blamed both major parties for an inability to pass any major immigration law overhaul since a 1986 law signed by President Ronald Reagan. Carter lost to Reagan in November 1980.

Carter said members of his party have been too reluctant to make deals on border enforcement, though he clarified that technological investments would be better than Trump's proposal for a physical wall. Carter said Republicans are too quick to dismiss discussions of "amnesty" for "longtime residents."

The deal between Democrats and Trump does not include a U.S-Mexico border wall that was a centerpiece of Trump's presidential campaign.

Beyond immigration, Carter told students he supports a single-payer health care system, and he recalled proposing a measure as president that would have phased in a "Medicare-for-all" structure by extending benefits first to children, then to older Americans as the federal budget allowed. That did not pass.

Democratic support is growing for Sen. Bernie Sanders' proposal to extend Medicare coverage to all Americans, a trend that Carter noted. Carter said earlier this year that he voted for Sanders over Hillary Clinton in Georgia's 2016 Democratic presidential primary.

He also told of collapsing earlier this year while working on a Habitat for Humanity project in Canada and being hospitalized. When he was released, he said, he asked what he owed. "Zero," he recalled. "The Canadian taxpayers paid for my treatment."

Carter acknowledged to students the considerable expense of single-payer models and the political risks for his party if they anger the private insurance industry and push the tax hikes necessary to pay for universal coverage.

Still, he concluded, "Theoretically, it's the best system."

The Associated Press contributed to this report.