10 ms·
Can someone who upvoted this explain why? I'm physical having difficulty reading the googlebooks blurry text (and zooming isn't doing enough to mitigate that) a
by TheRealPomax 7y ago
Can someone who upvoted this explain why? I'm physical having difficulty reading the googlebooks blurry text (and zooming isn't doing enough to mitigate that) and would love to know why this made it to the front page.
Is there maybe a copy of this text on a plain webpage anywhere that I can read instead?
- pvg 7y agonot text but it's a bit zoomier. https://i.imgur.com/O4HZYxq.png https://i.imgur.com/O4HZYxq.png
- TheRealPomax 7y agoThanks! Though unfortunately I still can't see more than a few letters at a time due to the letters being blurry; the brain still goes "these are a bit smudgy, let me turn the entire graphic into a giant smudge for you".
- deleted 7y ago[deleted]
- enragedcacti 7y agoMy interpretation is this: DOS uses a System File Table (SFT) track open files (file handles are just a pointer into the SFT). Despite the size of each entry of the SFT being the same for all versions of DOS up to 5.0, Windows attempts to determine the size by observation. Because DOS itself opens three handles to the CON device, it can determine the size of an SFT entry by finding three evenly spaced occurrences of the string 'CON ' in memory. This usually works but if a utility program (not sure what that refers to) moves that portion of the SFT into upper memory (640K-1MB) then Windows won't be able to find it. The magazine has the solution in the form of a .BAT file that will place three properly spaced instances of 'CON ' in conventional memory so that Windows can find it.
- jandrese 7y agoWelp, this win the award for the ugliest hack of the week, and I'm not sure which part of the post to award it to. Windows scanning memory for strings, or the part where you make a batch file just to make that check pass.
- userbinator 7y agoEven something like loading a file into a text editor containing the appropriate pattern would be sufficient; but what's more interesting to consider, is what happens if you happen to have that pattern in memory before starting Windows, but it's the incorrect size of SFT for the version of DOS --- I could imagine some pretty odd things happening... as well as KB article getting published if some important customer ran into it: "Windows becomes unstable when started after you work with files containing 3 or more occurrences of 'CON' spaced between 16 and 256 bytes apart."
- firethief 7y agoCON would be mentioned a lot in the KB article. They'd have to write it carefully.
- ncmncm 7y agoBack in the day, this was not even considered odd, in the Microsoft ecosystem. People collected lore like this because you had to know a great deal of it to get anything to work. Writing the code to do the actual work was 10% of the job. Compensating for stuff like this was the rest.
- fapjacks 7y agoRight! This sort of "ugly hack lore" more generally is why it's extremely difficult for third-party word processing applications to handle old Microsoft Word .doc files, and in fact is why Microsoft put so much effort into backward compatibility for modern versions of Windows: Microsoft Office actually contains the document-rendering engines of old versions of Microsoft Word, in order to handle documents which are in the old formats.
- userbinator 7y agoIs there maybe a copy of this text on a plain webpage anywhere that I can read instead? Unfortunately not; this seems to be one of those obscure and unusual facts that may or may not have been well-known 26 years ago, and something I couldn't find a reference to anywhere else on the Internet (but that may be due to other things[1].) I've reproduced the interesting part here: The size of an SFT entry is fixed for every DOS version up to 5.0, but Windows attempts to determine the SFT size by observation. It scans conventional memory seeking three evenly spaced occurrences of the string "CON" and takes the distance between them to be the size of one SFT entry. Since DOS itself opens three consecutive SFT entries for the CON device, this technique usually works. But if a utility program moves that portion of the SFT to upper memory (memory above 640K and below 1MB), Windows won't find it. HIFILES.BAT overcomes this problem by placing a trio of ersatz SFT entries in conventional memory, where Windows can find them. All that's important is that the characters C, O, N, and space appear three times, starting 59 bytes apart. Here are some images that may be clearer: https://imgur.com/a/isxaP9h https://imgur.com/a/isxaP9h (The article starts one page earlier, at "Simulating SFT Entries".) [1] https://news.ycombinator.com/item?id=16153840 https://news.ycombinator.com/item?id=16153840
- TheRealPomax 7y agoThank you
- hcs 7y agoSome context from the beginning of the article for why this data would be moved in the first place: > With the advent of upper memory managers, several utilities that save conventional memory by moving DOS system data into upper memory have become popular. Many of these utilities extend the System File Table (SFT), creating space for additional file handles in upper memory and linking it to the SFT chain. This technique can save as much as 14K of conventional memory, depending on the number of SFT entries moved to upper memory.
- thought_alarm 7y agoWindows 3.1 needs to manipulate the MS-DOS System File Table (the table that keeps track of open file handles) in order to facilitate multitasking applications. This is fine. However, Windows 3.1 relies on an utterly absurd hack to determine size of entries in the MS-DOS System File Table, despite the fact that MS-DOS and Windows are both under control of the same company. It scans raw memory looking for three instances of the string "CON", assumes this is the location the SFT, and uses the distance between the first two CONs as the size of a SFT entry. The hack breaks if the SFT has been moved to high memory, which prevents Windows from running. The workaround is to put three CON instances in conventional memory, correctly spaced, before starting Windows.
- mhh__ 7y ago> despite the fact that MS-DOS and Windows are both under control of the same company. I've never worked at Microsoft, but I have read that teams at Microsoft have been (historically, at least) very disjointed and uncooperative towards each other (No idea whether that's true, but the existence of Powershell in spite of cmd was given as an example)
- simonsays2 7y agoWindows and MSDOS teams were very close, no issue there. The real reason someone might need to do this hack is that there were in fact many versions of "DOS" not made by Microsoft. These included Zenith, Compaq, Digital Research and IBM. Each of these each had their own subversions.
- deleted 7y ago[deleted]
- LocalH 7y agoIBM DOS was basically MS-DOS (except IBM did do some of their own work of course). Pretty sure Zenith and Compaq DOSes were OEM MS-DOS (Zenith did have a "Z-DOS" but it was just another OEM version of MS-DOS for a non-IBM-compatible system). DR-DOS was of course a true third party DOS (one of the very few contemporary ones IIRC)
- flomo 7y agoThe fin de siecle HN is currently in is apparently some GenX midlife crisis phase where we're so mad about ecmascript that we vote up any rando retrocomputing article which gets posted. Like we have to remind ourselves that we loved this shit back in the day. But I got all this knowledge from reading PC Magazine, Mac World, etc, but mostly from the tabloid trade weeklies PC Week, Computer World, Mac Week. This old PC/Mac stuff was never really properly put on the web. Yes, its hard to read nowadays in some viewer. But the ads are much more attractive. (Just for the record, I like making stuff with ecmascript.)
- ConcernedCoder 7y agothe saltiness is real...
- flomo 7y agoGenX 4 lyfe :)
- johnwheeler 7y agono you're mistaken. nostalgia == cool. AND ecmascript === cool. they are not mutually exclusive.
- flomo 7y agoagreed, just an observance.
- PhasmaFelis 7y ago...What does any of this have to do with ECMAscript?
- ncmncm 7y agoYou are being reminded that Microsoft code was always batshit insane, and only ever just barely worked. In the W95/98 era, they succeeded in redefining "crash" to mean, not that the program or OS stopped, requiring a restart, but rather that restarting wouldn't work, and you would have to re-install the OS. I still recall my shock at learning of this re-definition. I had said that Linux (of the day) would hardly ever crash, and the person said he often went weeks without need to re-install his OS. Crashing, in the old sense, was a several- or many-times-a-day event, and hardly deserved mention. People berated themselves for not having saved their work recently enough. Sometimes they complained of bluescreens while saving, and would alternate saving to two different files, so one might survive.
- b_tterc_p 7y agoCurious if this resonates with others. That is hard to believe but I wasn’t around to have an opinion.
- altcognito 7y agoI was around and this doesn’t ring a bell.
- naikrovek 7y agoWindows OS quality has varied quite a bit, and I think it is unfair to call the majority of Windows "batshit insane." It isn't a knowledgeable opinion and it isn't necessarily fair, either. There ARE plenty of mistakes in the history of Windows, don't get me wrong. Microsoft has gone well out of their way to keep backwards compatibility from release to release, even if it means other features won't be added. Every few years they break this trend and they give everyone multiple years of notice. There are often very good reasons for some of the things that appear to be insane, as any regular reader of Raymond Chen's "The Old New Thing" blog will testify. Arguably, if anyone I know of would have a valid opinion of Windows' level of insanity, it would be Raymond Chen, as he's had his hands in the Windows source code for 2-3 decades at this point. He continues to work as a developer at Microsoft, so I'm quite confident that the level of "batshit insanity" in Windows is quite low and getting lower by the day.
- craftyguy 7y ago> Can someone who upvoted this explain why? I suspect many only read the title and went straight to the comments to throw around their own personal anecdotes about Windows 3.x, and very few actually tried to read the linked content.
- kazinator 7y agoImagine you had this: struct file_handle { char name[16]; /* other stuff */ } file_table[N]; Suppose you know that three consecutive entries have "CON" for the name. If you can find them in memory, then the distance between the "CON" strings is the same as the value of sizeof (struct file_handle). Unless somehow there are some false positive "CON" bytes in there somewhere.
- ghusbands 7y agoYou seem to be implying that because you're having trouble reading it, nobody could possibly be interested in it or have any reason for upvoting it. As you can see from the rest of the discussion, in fact people can read it just fine. The upvotes don't require defending or explaining.
- TheRealPomax 7y agoIf that's how you read it, I encourage you to reread it when you're not in a bad mood: I have physical difficulty reading the article, others have upvoted it and so clearly did not have that difficulty, and might be able to explain what it's about for people who can't read unless the actual letters are clean enough to not trick the brain into turning them into one giant smudge at any zoom level. Make of that what you will, but making "berating people for upvoting" of it is projecting a frankly bizarre kind of negative narrative where there is a request for help.
- ghusbands 7y agoWhen you said "Can someone who upvoted this explain why?", I read it as "Can someone who upvoted this explain why they upvoted it?". I now gather you meant "Can someone who upvoted this explain why Windows 3.x does that?" It's an interesting ambiguity that I failed to spot, rather than some kind of bad mood. Thank you for answering earnestly.