News: 1644851449

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Microsoft veteran demystifies Abort, Retry, Fail? DOS error

(2022/02/14)


Do you Abort, Retry or, Ignore or Fail? We've all been there, hesitating above the keyboard and wondering just what demons will be unleashed by hitting "I". But what is actually happening behind the scenes?

Retired Microsoft engineer Dave Plummer has taken to [1]YouTube once again to confess his role in the DOS operating systems prompt of doom and reveal the origins of the options.

What, exactly, is the difference between Abort and Fail? Retry seems obvious enough and Ignore carries with it the same badge of shame as a Visual Basic programmer's use of On Error Resume Next , but Abort and Fail raise a few questions in some of our minds.

[2]

Plummer's take is from the MS-DOS world and he confided: "It's a bit of a secret club, really, for those of us who actually know what it means…"

[3]

[4]

"Deep within COMMAND.COM, which is the core program of MS-DOS, there is something known as the Critical Error Handler," he continued.

When something really bad happens, such as a disk error, things come to a screeching halt and the operating system needs guidance from the user regarding what it should do.

[5]

"In other words," he said, "MS-DOS knows something serious is going down and it doesn't know how to handle it. So it's going to give you, the wise and all-knowing computer operator, the decision on how to proceed."

In this case, you get four choices: Abort, Retry, Ignore or Fail.

Most people would likely jab R for Retry in the vain hope that their document might be saved before giving up with a despairing A for Abort.

[6]

Although many might think Abort would simply abort the current operation, it actually aborts the entire program or, as Plummer put it, "terminates it with great prejudice," leaving no possibility for any clean-up or graceful end. If a file is half-written, tough – it'll stay half written.

Retry retries the operation, although Plummer shared a little more from the days of CP/M and the use of a sensor to check if the floppy drive door was open or closed. "If you tried to read or write to disk when the drive was open, it'd just hang and wait for you to close the door," he said, which in turn opened the door for disk swapping during operations.

The IBM-compatible kit running MS-DOS, however, might not have such a sensor. "For one," said Plummer, "the disk change logic in the IBM PC was not fully implemented, thereby either saving IBM a few pennies on every machine in circuitry, or more likely, making it so that they could source the drive more broadly, thereby saving a few pennies on each machine that way."

So what to do? The answer was a virtual latch sensor based on whether everything had been OK with reading and writing for at least two seconds. "So the virtual latch was really telling not if the disk was ejected or open, but rather, whether it could be assumed to still be there," said Plummer. And the two seconds? Based on how fast the MS-DOS gang could change disks (they couldn't do it in less than two seconds).

And then there was the situation where one might be trying to write to a write-protect floppy. The user would have an opportunity to remove the tab or swap the floppy before trying again.

Those were the days, and an example where Abort would perhaps not be the best option.

[7]Saved by the Bill: What if... Microsoft had killed Windows 95?

[8]Notes on the untimely demise of 3D Pinball for Windows

[9]Revealed: Why Windows Task Manager took a cuddlier approach to (process) death and destruction

[10]'I wrote Task Manager': Ex-Microsoft programmer Dave Plummer spills the beans

Plummer also held his hands up to being the author of the scenario where Retry might be the only option. Unsurprisingly, it's related to his work in the dark art of disk caching; a user might save their work, which went to the cache, then exit the program. And then, when the cache was being written, a disc error might occur.

Abort made no sense – there was no program running. "Ignore could very well corrupt the entire filesystem structure of the hardware itself," said Plummer. So there were just the options of a Retry or a reboot open to the user.

Ignore was a risky proposition in its own right, seeing as it made MS-DOS effectively lie to the application and insist all was well, while the operation silently failed. Still, as Plummer noted: "Sometimes the perfect is the enemy of the good, and if you can get back 99 per cent of your text file by ignoring the error… in certain circumstances ignoring the problem was the best option."

Let the programmer that has never had their code swallow the odd exception or two in pursuit of "good" rather than "perfect" fling the first stone.

That said, over the life of MS-DOS the number of things that could be ignored dwindled. Disk errors (such as leaving the floppy door open) couldn't be skipped anyway, and as hardware progressed problems became less frequent. "By the time of MS-DOS 6, there were hardly any Ignore cases left."

Which brings us on to Fail. This placed your fate squarely in the hands of the application programmer. All it does is allow the operation to fail and report back an error code. It is then up to the application itself to deal with it as it sees fit. Assuming there was some error handling in place.

The days of MS-DOS seem a terribly long time ago, and floppy disks have mostly been shunted off to the magnetic media drawer in the sky. But, regarding the definition, Plummer observed: "Better late than never." ®

Get our [11]Tech Resources



[1] https://youtu.be/392h_c3Tefs

[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YgqKuMCNJ6cUIfupOK9-VAAAABU&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YgqKuMCNJ6cUIfupOK9-VAAAABU&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YgqKuMCNJ6cUIfupOK9-VAAAABU&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YgqKuMCNJ6cUIfupOK9-VAAAABU&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YgqKuMCNJ6cUIfupOK9-VAAAABU&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[7] https://www.theregister.com/2022/01/25/windows_95/

[8] https://www.theregister.com/2022/01/07/pinball/

[9] https://www.theregister.com/2021/06/30/windows_task_manager_termination/

[10] https://www.theregister.com/2020/05/26/task_manager_confession/

[11] https://whitepapers.theregister.com/



There should only be Retry and Fail, the other two aren't needed

Dan 55

Abort isn't necessary because the program should deal with errors, not go loopy and then need to be killed. Ignore isn't necessary because it's just corrupting something, instead the program should let you save on another disk.

"because the program should deal with errors"

LDS

That was the early MS-DOS era, when OS calls were made setting up CPU registers and calling INT 21H (and a few others). Languages didn't have usually exception management (think Go...), .COM executable had to stay withing 64K of code (which could be half the RAM you had....), and everything was much more primitive.

Anyway, now that I know the difference between Abort and Fail I can sleep better. Maybe a better wording would have had help "Abort application" - "Fail operation and continue" would have helped, but messages were usually quite short back then, especially when everything was hand-written in assembler...

Re: "because the program should deal with errors"

Dan 55

I've never noticed other 80s operating systems giving a plethora of options, just the more usual Retry and Cancel (Fail) and errors were tested for in the program.

And even if memory is so tight, it doesn't take much to do the worst-case option - print "Error ", tidy up, and exit.

Re: There should only be Retry and Fail, the other two aren't needed

Spanky_McPherson

I'm sure Dave Plummer and the MS-DOS developers had good reasons for doing what they did.

It's a little condescending to just show up and claim that you know better than them.

I also used to have the "Everything that I don't understand is easy" attitude, but we should try to be better than that.

Re: There should only be Retry and Fail, the other two aren't needed

General Purpose

>the program should deal with errors

Meanwhile, in the real world ....

On Error Resume Next

Hans Neeson-Bumpsadese

...otherwise known as nailing the corpse in an upright position

Re: On Error Resume Next

Dan 55

Weekend at Bernie's!

fidodogbreath

This knowledge will come in handy the next time I'm in 1983.

DuncanLarge

Or when you are like me and install DOS 6.22 in Qemu one sunday morning for fun. Then fiddle with freeing up as much conventional memory as possible to let you run a game that you just pkunzipped from a shareware CD-ROM image that you have, only to find that you now know why turbo buttons were invented and why you should have uses DOSBox in the first place.

Anonymous Coward

This stuff was well known by geeks of the time, and much better than the utterly useless modern equivalent of " ;-) We had a problem."

The best one I ever saw was the network logon to the DOS machines on our university network...

Incorrect password. (A)bort, (R)etry, (I)gnore, (F)ail.

Edgar Allan Poe got there first

pgargan

Marcus Bales' classic bears repeating: https://www.gnu.org/fun/jokes/midnight.dreary.html

An ancient proverb summed it up: when a wizard is tired of looking for
broken glass in his dinner, it ran, he is tired of life.
-- Terry Pratchett, "The Light Fantastic"