11 ms·
If there's no 16-bit layer in 64-bit Windows, how come 16-bit installers run?
- dreen 13y ago"Windows: A 64-bit extension to a 32-bit patch for a 16-bit GUI shell running on top of an 8-bit operating system written for a 4-bit processor by a 2-bit company who cannot stand 1 bit of competition."
- eru 13y agoUnfortunately, no longer really true since they switched from the DOS based Windows to the Windows NT branch. (At least I think so.) The snide about competition has also become somewhat hollow. Microsoft would love to go back to the monopoly days of the late nineties. But those days are gone.
- speeder 13y agoIn fact a merge happened, windows kernel now is mostly NT based but has DOS era artifacts on it.
- anonymfus 13y agoThis is how jokes become urban legends.
- kabdib 13y agoWhen I had access, I decided one afternoon to read the source to the CMD interpreter. It was about as bad as I thought it would be. About an hour into using my Mac Pro's shell, I wanted to weep in relief. Microsoft does not get it. (Or if they do, it gets perverted into something like PowerShell, which I recently wasted a week on).
- manojlds 13y agoWhat is Mac Pro's shell? You mean your shell on OS X? And what did you find so bad with Powershell?
- kabdib 13y agoThe "terminal" on MacOS X. It has: - tabs - cut and paste that actually works - various ways to focus windows - hey, search! ... and a bunch of other stuff. While CMD.EXE has its feet firmly rooted in 1982 or so. Yeah, I know you can buy more whizzy shells. But MS really has no excuse for letting the NT console system rot as much as it has. Given that their programmers use it /all the time/, I find it hard to believe that someone hasn't written something better. (PowerShell overshot the mark, and wound up being unusable).
- yuhong 13y agoI think CONHOST/CSRSS is to blame for this not CMD.
- kabdib 13y agoAs far as I can tell, they're joined at the hip. You /could/ redo one without redoing the other. No problem. But the result would be poor. :-/
- msie 13y agoAside from good cut&paste behaviour, one of the biggest problems with cmd.exe is you cannot resize the window horizontally larger than its set size by dragging on the window side. I do this when I see wrapped text from the output of a command. And if you experience wrapped text in a window smaller than its max size, enlarging the window doesn't reflow the text! Oh I see the same problem happens in Powershell too. :-(
- to3m 13y agoPowershell and the command prompt use the same underlying console subsystem, that handles character-mode programs running and displaying their output in a window. It's a core part of Windows, rather than something supplied by each program. The console system doesn't provide a TTY, as in Unix, but instead uses a CGA/MDA text mode metaphor: a matrix of (character,colour) pairs. This leaves no information about the text that's been printed, per se - it's more like the text equivalent of a bitmap. No carriage returns, no tabs, just an arrangement of characters that happened to have been put in the right places. If you widen the screen, there's not much Windows can do except for leave the new area blank, because it has no idea at all which line breaks are significant and which were just wrapped. (And indeed, if you resize the buffer in the console window's properties, this blanking is exactly what it does.) There's sort-of nothing wrong with this system, in that it makes sense for a certain style of text-mode GUI console program, that were at one point exceedingly popular in MS-DOS - but unfortunately, it's not so hot for the TTY style of console program that everybody uses these days :) (Fingers crossed for a much-needed shakeup, but this nonsense has stuck around for so long - I don't think that console properties dialog has changed one pixel since Windows NT 4 - that it's probably a bit late now. Meanwhile, one solution might be to run cmd.exe with a better class of terminal emulator - emacs will do this.)
- Already__Taken 13y agoThe Powershell interpreter is made for the Powershell ISE. They just can't touch the CMD interpreter for the same reasons you found, Someone depends on that awful for console apps and god knows what. So all the work went into the ISE instead of fixing CMD. Powershell console and cmd run powershell are just compatibility layers to make it more familiar.
- nbevans 13y ago"Merge" is overstating it. It is a NT kernel with some very small and inconsequential "fixups" done to it to make certain DOS constructs work.
- asveikau 13y agoThis is made up. The design of NT was such that you could plug in "subsystems" such as Windows, POSIX, OS/2 etc. The Windows subsystem has had the most development, sure, but there is no "DOS" in the kernel.
- rsynnott 13y agoModern Windows (NT stream) carries a lot of baggage from Win16, however; Win32 wasn't a green-field effort.
- yuhong 13y agoAh, my favorite problem with Win9x in fact was how Caldera was able to continue to sue MS based on the fact that it was based on DOS. I mentioned it in my blog article on the MS OS/2 2.0 fiasco and it should be obvious why.
- VLM 13y agoThis is a good example of the straightjacked of backwards compatibility. Not too long, not too short, a fun display both of people who know what they're talking about vs just complaining. Also a good example of inside the box thinking. The reason you need to run a 16 bit installer is the software isn't free or open source therefore a simple recompile with a newer version of debhelper or whatever isn't going to bring it up to modern packaging standards.
- gourlaysama 13y ago"The reason you need to run a 16 bit installer" is to display a nice "Tough luck, you need a 32-bit computer to install this" message to the user, instead of an ugly Windows error message. This was important at the time. And the whole point of backward compatibility is to allowed old applications (written, compiled and packaged at that time) to work. Even if the software is open-source and has been repackaged in the meantime, the old version you found on a long-forgotten CD rotting away in your basement doesn't have that. The Windows philosophy is to make sure that this one still works (which is a crazy goal IMO, but an interesting one).
- johnchristopher 13y agoCrazy ? Well, that was one of the most important selling point of MS. I wish I could run any old software under current Ubuntu. IE: gwibber.
- alecdbrooks 13y agoThe reason for this hack is that 32-bit software used 16-bit installers long after the switch to 32-bit. [0] This isn't a matter of supporting Windows 3.11-era software, more like Windows 9x or even XP. [0]: Like this guy: http://www.tomshardware.com/forum/107534-13-trying-install-game-16bit-installer-64bit-system http://www.tomshardware.com/forum/107534-13-trying-install-g....
- city41 13y agoMS has gone to great lengths to reach that goal. There is even special code in Windows to ensure the DOS version of SimCity works: http://ianmurdock.com/platforms/on-the-importance-of-backward-compatibility/ http://ianmurdock.com/platforms/on-the-importance-of-backwar...
- deleted 13y ago[deleted]
- pgeorgi 13y agoPeople speculate in the comments that Microsoft could provide a 16bit emulator in Windows for DOS applications. In fact they have an x86 emulator in Windows, but not for DOS. It's used to run int10h calls (VGABIOS) on early initialization, funnily even on UEFI.
- jhallenworld 13y agoI don't understand why they gave up on DOS compatibility for 64-bit Windows.. the effort could not have been all that much for them (either with an emulator or x86 tricks). The benefit is huge: they can continue the lock-in of ancient DOS programs. For example, I can report that OrCAD for DOS works better in 32-bit Windows XP better than it ever did in MS-DOS. Likewise, I don't understand why vm86 mode can not run directly from 64-bit mode in x86. This seems very like an architectural mistake to me.
- MBCook 13y agoAs I remember, when an x86-64 chip is running in 64 bit mode, it can run 32 bit code, but the option necessary to run in 16 bit mode was removed. To run DOS they'd basically have to have a full emulator for a 286, like a limited version of bochs.
- ciupicri 13y ago> > Why can't you just run the 16-bit emulator from 32-bit Windows in the 32-bit emulator on 64-bit Windows? > [Because that emulator uses v86-mode, which is not supported by 64-bit processors. -Raymond] -- http://blogs.msdn.com/b/oldnewthing/archive/2013/10/31/10461992.aspx#10462321 http://blogs.msdn.com/b/oldnewthing/archive/2013/10/31/10461...
- nknighthb 13y agoI don't know what mechanisms they use, but VMware's various products run 16-bit code just fine on x86-64 chips. Are you saying they added a full 286 emulator to their virtualization products?
- losethos 13y agoBooting just needs to load a block and hand-over to the OS. We have legacy of starting in real mode 16-bit. The replacement is hopelessly clusterfucked. All it fucken has to do a load a block... and let you load other blocks. and tell you how much memory. and switch to VGA640x480 16 color mode. LOL.
- kabdib 13y agoFor extra fun, give a runnable file (any EXE, or CMD or BAT file) "install" or "setup" (I think that a prefix also works). You'll get a "do you want to run this setup program" dialog unless you have UAC turned off. This is hard-coded in some horrible place. It cost me a day once. I mentioned it to a guy next to me at work (random sample ex-MS dev) and said the same thing. The Windows kernel is (for the most part) a pretty good piece of engineering. The stuff on top of it, not so much.
- mickeyp 13y agoOf course it's hardcoded. In Vista and above you have to include a manifest file telling the OS whether you require elevation or not. In order to support old applications written pre-Vista, and to protect users against developers who don't care to learn how installers are supposed to work, Windows will force UAC if the file name sounds like something a setup program would call itself, particularly when most installers will install or modify things that require Admin privileges -- such as writing to Program Files. This seems perfectly sane and reasonable to me. What's the alternative? That manifest-less installers should fail because a user forgot to manually elevate a program by shift-right clicking it and selecting "Run as Administrator", all because they upgraded their OS and now their installers won't run any more?
- kabdib 13y agoIt's a problem that simply naming a file 'install' or 'setup' would cause extra, unwanted behavior. I guess it's similar to naming files PRN or NUL. You learn not to do that. It doesn't make it okay.
- mickeyp 13y agoIt's not unwanted. Not automatically elevating would break older installers written in a pre-Vista era, or written by developers who don't bother embedding a manifest telling Windows that it requires elevation. Imagine being a user upgrading from XP to Vista/7 and finding that all their old programs no longer install as they fail to write to Program Files -- something that you could get away with in older versions of Windows where people used admin privileges for everything. And yet that very problem would go away for almost everyone, everywhere, by simply elevating programs named setup or install. Seems like a perfectly sane way to make things backwards compatible.
- amenod 13y agoThe idea to do something like that is just plain... ugly. It's almost like guessing MIME type based on the file content (hint: IE). I wonder how long it will take until someone finds a security exploit of this "feature"?
- TeMPOraL 13y ago> It's almost like guessing MIME type based on the file content (hint: IE). Hint: Linux? It does something similar pretty much on the OS level.
- elehack 13y agoThat's on your file system. The HTTP protocol specifies that, if the server says a document is 'text/plain', the client must not attempt to second-guess it based on content. IE second-guesses it based on content, so you cannot serve up something that looks like HTML as text/plain to get it to display. Substantially worse, IMO. That said, it'd be better to actually save content types in extended attributes or something. And make all applications magically save and respect these attributes.
- annnnd 13y agoActually MS broke HTTP protocol on that one and it lead to some very interesting exploits. Malicious user could upload a GIF to some site which allowed image uploads. Image would appear normal to a casual observer, except that it was specially crafted so that IE thought it was actually a JavaScript file (because it guessed the file type on its contents and didn't obey server-side set MIME types) and executed it -> XSS. I don't think Linux does anything remotely like this. It does allow you to use "file" utility to guess the contents of the file, but it doesn't act on it.
- Theriac25 13y agoWhat the fuck are you talking about?
- 13y ago
- btilly 13y agoMy favorite comment in the thread is from John Ludlow who explained why you would want to package a 32 bit program with a 16 bit installer: "The installer has to be the lowest common denominator in terms of bitness. This is because it needs to be able to check whether the application can run on that system and give an intelligent "um, you can't install Program X because your computer is 16-bit and doesn't support it" message rather than falling over in a big heap." Exactly right. And the kind of detail that is easy to forget about.
- mikeash 13y agoThat's really something the OS should be able to do. It ought to be able to examine the dependencies of the app and throw up a helpful alert if they're not met. Of course, since the common case is newer apps on older OSes, that requires thinking ahead before such a problem actually happens, and that's tough. Even if you implement it, it's hard to get right because it's hard to really test. Apple does this, but the facility was broken in several Mac OS X releases, making it far less useful than it should have been.
- Alphasite_ 13y agoI've always had the issue the other way round, but i guess it depends on the market.
- pavlov 13y agoIn the case of 16-bit Windows, this would have been particularly difficult to foresee. Even when Windows 3.0 shipped, it was still planned that OS/2 would be the 32-bit successor to Windows, so there was no 32-bit Windows target even on the roadmap. (According to the book Showstopper!, when Microsoft ditched OS/2, they created Win32 by taking the OS/2 API and fixing any divergences from Win16 to make it look as compatible as possible.)
- deleted 13y ago[deleted]
- 0x0 13y ago
- amaks 13y agoAll this is exactly why I've stopped buying PCs and use Windows. Silly inconsistencies like shell not supporting > 260 file paths (I know that some Win32 APIs and NT itself limits file paths to 32,768 or so Unicode characters), but it's all those patches, inconsistencies, limited shell (cmd.exe), drive letters which drive me crazy. With Mac OS X and Linux all that is gone, and the world seems a better place now.
- ateeqs 13y agoDon't laugh, but there is "PowerShell." :) (laughs)
- Theodores 13y agoSo we are still a long way off having sensible Linux style repositories then...
- YokoZar 13y agoIt's worth pointing out that, while 64-bit Windows has dropped its 16-bit layer, 64-bit Wine has not. You can happily run your original 16-bit version of Chip's Challenge on an out of the box 64-bit Linux/Wine install these days.