windows 3.1 fun

Programming, for all ages and all languages.
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

windows 3.1 fun

Post by VolTeK »

i have just ran win3.1 on my vm, i would like to know if there is a way to crash windows 3.1 using assembly?
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: windows 3.1 fun

Post by NickJohnson »

Well, it's really just MS-DOS under the hood - I think you can just make an infinite loop and the system will freeze - it's single tasking. You have nearly full memory access from "usermode"; I think you can think of something. :lol:
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: windows 3.1 fun

Post by VolTeK »

i am thinking about coruppting some memory, i tried int viruses, but its just boring, all it does is freeze, the best i have done yet is get the general protection fault untill i get the emm386 error.
dude101
Member
Member
Posts: 56
Joined: Thu Apr 09, 2009 10:26 pm

Re: windows 3.1 fun

Post by dude101 »

Lol, do you have access to the entire address space in windows 3.1?


If you write a C program that dereferences a NULL pointer will you actually read what is at 0x0000000

I work on embedded systems at work. Once I accidentally dereferenced a NULL pointer and it actually read the data at that location.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: windows 3.1 fun

Post by NickJohnson »

Yeah, Windows 3.1 still runs in real mode, because it is really just MS-DOS with a new shell, so you have access to everything. It's not like you can make it crash spectacularly, because it kind of doesn't have much substance to it - crashing MS-DOS is too simple to be interesting.
dude101
Member
Member
Posts: 56
Joined: Thu Apr 09, 2009 10:26 pm

Re: windows 3.1 fun

Post by dude101 »

NickJohnson wrote:Yeah, Windows 3.1 still runs in real mode, because it is really just MS-DOS with a new shell, so you have access to everything. It's not like you can make it crash spectacularly, because it kind of doesn't have much substance to it - crashing MS-DOS is too simple to be interesting.
How does it access 16 megs of RAM if it runs in real mode (genuine question, sorry if this is a n00b question)? The thing about DOS is that once an application runs it as full control of the whole PC. MS used this to let windows run from DOS but that does not make it "a DOS shell"
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: windows 3.1 fun

Post by Troy Martin »

dude101 wrote:
NickJohnson wrote:Yeah, Windows 3.1 still runs in real mode, because it is really just MS-DOS with a new shell, so you have access to everything. It's not like you can make it crash spectacularly, because it kind of doesn't have much substance to it - crashing MS-DOS is too simple to be interesting.
How does it access 16 megs of RAM if it runs in real mode (genuine question, sorry if this is a n00b question)? The thing about DOS is that once an application runs it as full control of the whole PC. MS used this to let windows run from DOS but that does not make it "a DOS shell"
The 286 has a 24-bit address space that can be used from 16-bit pmode, I think.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
dude101
Member
Member
Posts: 56
Joined: Thu Apr 09, 2009 10:26 pm

Re: windows 3.1 fun

Post by dude101 »

I put win3.1 on a VM too. Does anyone know where I can find a C compiler that can make win16 exes?
ru2aqare
Member
Member
Posts: 342
Joined: Fri Jul 11, 2008 5:15 am
Location: Hungary

Re: windows 3.1 fun

Post by ru2aqare »

dude101 wrote:I put win3.1 on a VM too. Does anyone know where I can find a C compiler that can make win16 exes?
Old Borland compilers may be able to do that, or maybe even Watcom.
User avatar
Wilkie
Member
Member
Posts: 44
Joined: Tue Aug 26, 2008 10:02 pm
Location: Land of the Dead
Contact:

Re: windows 3.1 fun

Post by Wilkie »

dude101 wrote:I put win3.1 on a VM too. Does anyone know where I can find a C compiler that can make win16 exes?
As ru2aqare notes, Borland C++ 5.02 and earlier can compile win16 targets. Version 5.5 is free, and easily found, but it is not what you need... 5.02 is a bit difficult, and perhaps illegal (sigh) so you should (sigh) ask first.

There is always Visual Basic 3! (Which really brings me back... mmmmm p-code)
ru2aqare
Member
Member
Posts: 342
Joined: Fri Jul 11, 2008 5:15 am
Location: Hungary

Re: windows 3.1 fun

Post by ru2aqare »

Wilkie wrote: As ru2aqare notes, Borland C++ 5.02 and earlier can compile win16 targets. Version 5.5 is free, and easily found, but it is not what you need... 5.02 is a bit difficult, and perhaps illegal (sigh) so you should (sigh) ask first.
I actually thought about Turbo C 3.x or something. We still have those ancient compilers in the computer labs at the university, so I figured they must be able to compile for win16 target as well, but I'm not sure, we only did real mode programming when we learnt C.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: windows 3.1 fun

Post by Troy Martin »

Wilkie wrote:There is always Visual Basic 3! (Which really brings me back... mmmmm p-code)
Ye gods, I think I have a copy of that on my desktop :)
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
Coty
Member
Member
Posts: 286
Joined: Thu Feb 12, 2009 5:12 pm

Re: windows 3.1 fun

Post by Coty »

VB 3.0 don't work on vista :(
Last edited by Coty on Mon Jun 01, 2009 11:43 am, edited 1 time in total.
My hero, is Mel.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: windows 3.1 fun

Post by earlz »

ROFL somewhere in my pirating days I had VB 1.0... ONE POINT OH! and I had the DOS version! You know how neat it is to have a VB designed so that you can make ASCII art behave like a real GUI!? It's amazing.. lol.. but pointless and slow...
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: windows 3.1 fun

Post by Love4Boobies »

You can't write an infinite loop to break it and Win 3.1 isn't monotasking. To some extent, DOS isn't either (TSRs, anyone?). IIRC, Windows 3.1 can also be ran in the infamous 16-bit protected mode for 80286+ CPUs, not just in real mode. If you want to crash it, trash data.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
Post Reply