News for hackers. Stuff that matters.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by thought_alarm on Saturday June 29, 2019 @10:07PM (#20315955)
Windows 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.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by Someone1234 on Saturday June 29, 2019 @10:21PM (#20315987)
> despite the fact that MS-DOS and Windows are both under control of the same company.

But Windows 3.xx ran on non-Microsoft versions of DOS. They tried to stop this with the release of 3.1 but ultimately failed. DR-DOS was a popular way to run Windows (although piracy was rampant, and many simply pirated MS DOS instead of buying the Cheaper DR-DOS).

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by ncmncm on Saturday June 29, 2019 @11:32PM (#20316173)
No. There was never any intention to keep non-msdos systems working. Quite the contrary. But many, many users had add-on memory extenders to move things out of the memory ms-dos knew about, to leave more room for programs, or to speed up switching beween them.

The CON hack was just business as usual, and hacks to keep the hacks working, like this, were stock-in-trade for people obliged to work in it the environment. Microsoft was directly responsible for a two-decade regression of progress in software system design. They did not just displace better systems; they got everyone convinced that their stuff was normal.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by rasz on Sunday June 30, 2019 @01:57AM (#20316615)
>No. There was never any intention to keep non-msdos systems working.

$155 million and Bill Gates: "You never sent me a response on the question of what things an app would do that would make it run with MSDOS and not run with DR-DOS. Is there feature [sic] they have that might get in our way?"

says there was https://www.itprotoday.com/windows-78/microsoft-settles-dr-d...

https://en.wikipedia.org/wiki/AARD_code

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by stOneskull on Sunday June 30, 2019 @12:39AM (#20316378)
i think that was a hidden cost in the decrease of computer hardware price. it's hard to know what would've happened without microsoft though. whether it would be we all used expensive hardware like macs and amigas (or ibm) or whether something like linux or a different ibm os would have become the huge thing. it was great how we could build our own inexpensive system, or buy an inexpensive ibm-compatible someone else made. i have felt grateful to microsoft for that but maybe i'm wrong and it would just be another company that ibm chose.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by ncmncm on Sunday June 30, 2019 @02:06AM (#20316640)
Yes, I'm afraid you are wrong.

OS/2, for example, ran on the same machines as W95, and was fully modern. It was easy to keep an OS/2 system running for months without a crash. But few would develop for it, because few had it.

People paid absolutely through the nose for all the effort needed to keep anything working at all. Disk de-fragmenting, for example, was a Windows-only phenomenon.

Consider all the Free Software we use today, that just works without attention, year after year. People had to pay high prices for Windows software because it took so much effort to get it to work at all, and to keep working when the tide changed.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by squarefoot on Sunday June 30, 2019 @05:56PM (#20320808)
I used OS2 a lot, both version 2.1 and later Warp 3 back then. While it was really powerful (not to mention a lot more stable) compared to Windows 95, it was also heavier and slower. IBM advertised Warp 3 as something that could run in 4 MB or RAM; that was no different from Microsoft stating 20 years later that Vista could run in a half GB RAM. Yes, the system loads, but you sadly can't do much with it save for looking at the shiny icons and enjoying the sound of the hard drive constantly spinning. Unfortunately back then RAM modules were so expensive that being forced to upgrade to 8 MB to have an usable system would make a difference, so although once upgraded the RAM OS/2 could become a huge step forward from windows, most people simply wouldn't spent that money.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by rasz on Monday July 01, 2019 @03:34AM (#20323223)
4MB was ~$150 in 1994, less than cheapest 486 processor/cheapest CDROM drive/around 14.4 modem or 16bit sound card price etc. Whole 486 systems started around $1.2K, Pentium ones at $2K, 8MB was standard lowest Ram offered. $150 wasnt the end of the world.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by gmueckl on Sunday June 30, 2019 @04:41AM (#20317110)
OS/2 had comsistently higher hardware requirements than MS DOS and Windows. Mainly the memory usage was way higher. This was the price you had to pay for the better system design.

The MS system software of that era is a prime example of how worse is better for software products.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by twoelfer on Sunday June 30, 2019 @05:51AM (#20317326)
Sorry, but from my experience, this is not true. I did have several machines Running w95 and I did try to run OS/2 on them. It would boot but it would not run fast enough to work with it. W95, on the same hardware, worked quite well and responsive.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by nootropicat on Sunday June 30, 2019 @10:02AM (#20318235)
>Disk de-fragmenting, for example, was a Windows-only phenomenon.

How? Defragmenting is needed because random access on hdd is much, much slower than sequential. It's not something the os or fs can fix.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by asymptotically2 on Sunday June 30, 2019 @11:14AM (#20318622)
ext4 places files further apart on disk so fragmentation happens much less often.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by Spooky23 on Sunday June 30, 2019 @01:25AM (#20316506)
Cheaper was better... even with Microsoft murdering the competition, the old school companies never saw the error of their ways and kept selling stuff at a premium.

We’d be discussing this on a Prodigy forum if the incumbents had their way.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by Theodores on Sunday June 30, 2019 @04:25AM (#20317055)
> Microsoft was directly responsible for a two-decade regression of progress in software system design.

People did buy the products rather than better stuff. However there were monopolist practices that stopped that and monopolist practices are hard to spot when there is hype and a new industry people know nothing about. If you are trying to play catch up to get on board this tech train you don't know that it's a con.

I believe Microsoft's 'regression of progress' goes further back. BASIC is the real culprit. Nobody needed line numbers and goto statements, yet hobby and home computers from the 8 bit era were invariably burdened with lousy variants of MicroSoft BASIC. Including the Commodore things, even if they did not say Microsoft on boot up, they were.

Fundamentally there was open source ethos at the computer club of lore, where it all started. Bill Gates cloned Basic from the PDP-11 he had access to then made people pay for it rather than just copy it. He kind of invented the notion of software piracy being evil and morally wrong.

The UK home computing scene had BBC BASIC and Sinclair BASIC that were not directly derived from Microsoft's effort. The Sinclair contrivance was a super cheap BASIC hat needed the funny keyboard mappings, the BBC BASIC was actually a decent real programming language rather than just the lame Microsoft idea of what BASIC should be.

The only BASIC most users knew was 'LOAD""' followed by a press of the cassette play button to load a game.

MS-DOS was acquired and repurposed, sold to IBM with BASIC doing the groundwork - Bill Gates did not have an OS before then.

So computing was half way there towards being open source before Bill Gates ruined it by making people pay for his clone of PDP-11 BASIC.

Computers were also fundamentally networked before MS-DOS came along. Bill Gates kept it as personal computing, fleece everyone rather than share resources.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by hakfoo on Sunday June 30, 2019 @03:01PM (#20319821)
>I believe Microsoft's 'regression of progress' goes further back. BASIC is the real culprit. Nobody needed line numbers and goto statements, yet hobby and home computers from the 8 bit era were invariably burdened with lousy variants of MicroSoft BASIC. Including the Commodore things, even if they did not say Microsoft on boot up, they were.

The Atari 800 series had a unique BASIC with unusual string-handling conventions and graphic and sound commands miles ahead of the vanilla Commodore (pre-7.0) dialects.

I don't blame them for line numbers. Remember that the earliest hobbyist machines were going to be connected to who-knows-what display devices, even literal teletypes, where you might not have been able to support a full-screen editor or a convenient way to differentiate immediate versus program commands. Line numbers give you workarounds to those problems.

It could be argued they languished too long-- perhaps BASICA/GWBASIC, built for a machine with standard robust display controllers and ample ROM and address space-- should have been more like QuickBasic-- but f you wanted a box-checking 8k BASIC for your new microcomputer, it's not an awful choice.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by thought_alarm on Saturday June 29, 2019 @10:58PM (#20316070)
It seems doubtful that Microsoft would jump through such ridiculous hoops to ensure Windows ran on DR-DOS. They did the exact opposite, and added code to detect DR-DOS and disable Windows.

And in any case, it would be up to DR-DOS to emulate whatever MS-DOS was doing.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by Someone1234 on Saturday June 29, 2019 @11:23PM (#20316148)
> They did the exact opposite, and added code to detect DR-DOS and disable Windows.

In 3.1. Before that Windows ran fine on other vendor's versions of DOS.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by mhh__ on Saturday June 29, 2019 @10:15PM (#20315975)
> 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)

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by basilgohar on Saturday June 29, 2019 @11:16PM (#20316131)
Sadly, I don't have a reference handy, but I recall reading a while back that there was this toxic culture at Microsoft in the past where one of the easiest or least frictive ways to climb the ladder professionally was to undermine others due to the way performance was evaluated. Basically, something of a “cull the lowest performing members” model.

Not sure if this is related or even reality, my memory wasn't so great even when I was young.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by chris_wot on Saturday June 29, 2019 @11:25PM (#20316152)
That was the model Ballmer implemented. When Satyer Nadeller took over they removed this insane and destructive system.
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by simonsays2 on Saturday June 29, 2019 @11:00PM (#20316077)
Windows 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.

Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by LocalH on Sunday June 30, 2019 @12:34PM (#20319009)
IBM 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)
Re:Windows 3.x looks for 3 occurrences of “CON” 59 bytes apart by ksaj on Monday July 01, 2019 @04:45PM (#20329556)
Reading the source code (which is available on archive.org) you can see exactly this. Lots of IFDEF statements for compiling MSDOS and PCDOS differences. When I first saw that, I was really surprised.