Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: A silly little "tech puzzle"  (Read 3838 times)

0 Members and 1 Guest are viewing this topic.

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
A silly little "tech puzzle"
« on: August 14, 2017, 02:44:20 AM »
With all the talk a week or so ago about the whole Microsoft Paint being deprecated stuff, I was tinkering around with various Windows versions and different versions of Paint. I had an interesting idea and managed to do this:



This is the old Windows Paintbrush program, which predated Windows 95. The puzzle here is that this is running on 64-bit Windows 10- which cannot run 16-bit programs. How did I do it?
I was trying to dereference Null Pointers before it was cool.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: A silly little "tech puzzle"
« Reply #1 on: August 14, 2017, 01:45:38 PM »
hmmm are you using backwards compatibility to a 32-bit process handler from the 64-bit OS which is built into it and then added OS handler contents from prior could be Windows 7 or 8 32-bit say for the 32 to 16 bit handling essentially forcing Windows 10 64-bit to run through its own 32-bit support that runs a 32-bit program from a prior version of Windows which handles the 16-bit support?

 ;D

Only other method I can think of is a 32-bit wrapper program similar to the portable app software that brings it to 32-bit execution for 16 bit process and Windows 10 64 having support for 32-bit processes.

 :-\


I've used prior Windows components within newer OS's and so thats why I was thinking maybe of this backwards compatibility daisy chain. I just never tried this if this is what you were able to achieve.

Years ago I needed the Kodak Image Viewer for my Canon scanner and I essentially took portions of Windows 2000 Pro that I needed and made it work under Windows XP. I guess Microsoft didnt want to pay Kodak to add it to XP. well I have 1 license of 2000 Professional and needed the scanner to work with this on XP and so thats what I did.  :P I figured Kodak already got their money from me through me buying my OS through Microsoft for 2000 Professional and only 1 scanner in use using the Kodak Image Viewer at a time so its kind of a grey area but no harm in running it on one of my other systems that I wanted to use XP with the scanner and Kodak Image Viewer worked best for my needs and they werent shorted monetarily in any way from 1 device running it on a OS unintended for its use when I bought Windows 2000 Pro from Microsoft for a prior build  :-\

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: A silly little "tech puzzle"
« Reply #2 on: August 14, 2017, 02:41:32 PM »
Ah, you are thinking too deeply about it, it's actually surprisingly straightforward. I was sneaky when I said that it predated Windows 95, since it's the PBRUSH.EXE from Windows NT 3.51. The "trick" is that Most people (me included) would be thinking "Windows 3.1". Few people think of Windows NT 3.51 or 3.1.

NT's accessories were based around Windows 3.1 and so it had the same programs in terms of what they did (including paintbrush) but they were fully 32-bit applications. Since they were 32-bit, they still run on 64-bit Windows, even the latest versions of Windows 10. Interesting to think that a program from ~1993 runs as-is on the most modern Windows version without any sorts of hacks or patches, though.
I was trying to dereference Null Pointers before it was cool.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: A silly little "tech puzzle"
« Reply #3 on: August 14, 2017, 05:19:24 PM »
 ;D COOL ....

From this last line I had assumed it was a 16-bit application.

Quote
The puzzle here is that this is running on 64-bit Windows 10- which cannot run 16-bit programs.

Also I too forgot about NT and its 32-bit ::)

https://en.wikipedia.org/wiki/Windows_NT_3.51

Now I am curious if the "backwards support daisy chain" to 16 bit support from Windows 10 64-bit is possible with grabbing guts from prior windows 7 or 8 32-bit version supporting 16-bit in 32 bit to run then in the 32-bit support of Windows 10 64-bit .... See what you started ...  :P


Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: A silly little "tech puzzle"
« Reply #4 on: August 14, 2017, 06:06:07 PM »
Wow! I just discovered I have an old CD with games that I thught were only 16 bit. I looked and found it has two seperate folders. The folder for WIN95 works on my 64 bit Windows 7 pro.
screen shot below...

[attachment deleted by admin to conserve space]

BC_Programmer

    Topic Starter

    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: A silly little "tech puzzle"
« Reply #5 on: August 14, 2017, 06:07:54 PM »
Yep that was an intentional red herring, Dave. 64-bit Windows 10 cannot run 16-bit applications, so I didn't lie, it just turns out that didn't apply :P

My understanding of the 16-bit limitation is that they used Virtualization. with 32-bit Windows 16-bit software was virtualized via Processor features available when running in 32-bit protected mode.

64-bit Long Mode has similar features however they apply to 32-bit; so 32-bit applications are virtualizable when running in 64-bit long mode, but there is no virtualization mode allowing a processor in 64-bit long mode to execute 16-bit instructions.

They could have accomplished it with some kind of full on emulation but I doubt it was worthwhile.
I was trying to dereference Null Pointers before it was cool.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: A silly little "tech puzzle"
« Reply #6 on: August 15, 2017, 10:26:31 AM »
Quote
They could have accomplished it with some kind of full on emulation but I doubt it was worthwhile.

Very true and I didnt know that it was a virtual environment. I thought they had some sort of prior Windows code brought forward to newer OS as sort of an intentional version creep to allow for 16 bit in 32 bit OS. Microsoft has been known to creep older libraries and handler objects forward which sometimes made for some interesting security holes that needed to be patched.  ;D

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: A silly little "tech puzzle"
« Reply #7 on: August 15, 2017, 05:40:08 PM »
There were other components of NT that were also 32 bit...waay back when.
" Anyone who goes to a psychiatrist should have his head examined. "

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: A silly little "tech puzzle"
« Reply #8 on: August 16, 2017, 10:16:41 AM »
The 32 bit thing started with the Intel 386 chip.
http://www.cpu-info.com/index2.php?mainid=386
Quote
When the 386 was launched in 1985 it was certainly not faster than the 20MHz and 25MHz 286's. But Intel designed many new features into the CPU that gave it many more possibilities than the 286. For instance, the 386 could operate in three modes: the Real mode to emulate a 8086/8088, the Protected mode just like the 286 and the new Virtual mode that made multitasking possible. Also new was the possibility of the 386 to switch between the three modes without having to reset. Something that was impossible for the 286.
That was a milestone in PC history.