Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Microsoft Source posting

2 views
Skip to first unread message

David Lennox

unread,
Jul 21, 1994, 2:09:58 AM7/21/94
to

I have hacked into Microsoft and stollen their Windows 3.11 code and here
it is. I am sure that they would love any improvements for the next version.

#include <windows.h>
#include <system_errors.h>
#include <stdlib.h>

char make_prog_look_big[1600000];

main()
{
if (detect_cache())
disable_cache();

if (fast_cpu())
set_wait_states(lots);

set_mouse(speed, very_slow);
set_mouse(action, jumpy);
set_mouse(reaction, sometimes);

printf("Welcome to Windoze 3.999 (we might get it right or just call it Chicargo)\n");

if (system_ok())
crash(to_dos_prompt);
else
system_memory = open("a:\swp0001.swp", O_CREATE);

while(1) {
sleep(5);
get_user_input();
sleep(5);
act_on_user_input();
sleep(5);
if (rand() < 0.9)
crash(complete_system);
}
return(unrecoverable_system);
}

Paul Joswig

unread,
Jul 21, 1994, 5:22:56 AM7/21/94
to
In article <lotus.7...@deakin.edu.au>, lo...@deakin.edu.au (David Lennox) writes:
|>
|> I have hacked into Microsoft and stollen their Windows 3.11 code and here
|> it is. I am sure that they would love any improvements for the next version.
|>
|> #include <windows.h>
|> #include <system_errors.h>
|> #include <stdlib.h>
|>
|> char make_prog_look_big[1600000];

...

[ETC ETC]

...

|> if (rand() < 0.9)
|> crash(complete_system);
|> }
|> return(unrecoverable_system);
|> }

Now that was *funny* ... :)) Thanks !

Paul

Paul Joswig
Department of Computer Science
University of Adelaide
South Australia

jos...@cs.adelaide.edu.au

Dan Newcombe

unread,
Jul 21, 1994, 2:41:48 PM7/21/94
to
In article <lotus.7...@deakin.edu.au> lo...@deakin.edu.au (David Lennox) writes:
> I have hacked into Microsoft and stollen their Windows 3.11 code and here
>it is. I am sure that they would love any improvements for the next version.

Ah...you forgot a few lines!!!

>#include <stdlib.h>
#include <shiplate.h>

>char make_prog_look_big[1600000];
+int resource_block(64);

> if (fast_cpu())
> set_wait_states(lots);
+ usable_memory=memory_available() * .15;
+ if (network_exist())
+ turn_off_network();


--
Dan Newcombe newc...@aa.csc.peachnet.edu
Clayton State College Morrow, Georgia
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"And the man in the mirror has sad eyes." -Marillion

Tim Glauert

unread,
Jul 21, 1994, 10:42:04 AM7/21/94
to
In article <lotus.7...@deakin.edu.au>, lo...@deakin.edu.au (David Lennox) writes:
|> I have hacked into Microsoft and stollen ...

Yum, Yum!

Tim.

Tom Krotchko

unread,
Jul 21, 1994, 3:31:06 PM7/21/94
to

In article <lotus.7...@deakin.edu.au>, <lo...@deakin.edu.au> writes:

> char make_prog_look_big[1600000];

^^^^^^^^^^

This is clearly a lie. In the real windows code, this is declared as
static. Besides, since its global, this wouldn't link since it conflicts
with the other global variable that's declared as:

static char make_prog_delete_OS2


If you'd read the ANSI standard (say in hushed tones), you'll see that it
can't actually even be in there, since globals are only unique in the
first 8 characters (I think this is to make sure IBM mainframe C is ANSI
compatible, although some people claim its mostly to p*ss off all the
other vendors).


Jim Frost

unread,
Jul 22, 1994, 9:10:32 AM7/22/94
to
Tom Krotchko <to...@access.digex.net> writes:
>If you'd read the ANSI standard (say in hushed tones), you'll see that it
>can't actually even be in there, since globals are only unique in the
>first 8 characters (I think this is to make sure IBM mainframe C is ANSI
>compatible, although some people claim its mostly to p*ss off all the
>other vendors).

From K&R 2nd ed A2.2, p. 192:

"...Identifiers may have any length, and for internal identifiers, at
least the first 31 characters are significant; some implementations
may make more characters significant. [...] Identifiers with external
linkage are more restricted: implementations may make as few as the
first six characters significant, and may ignore case distinctions."

jim frost
ji...@centerline.com

Tom Krotchko

unread,
Jul 22, 1994, 7:20:15 PM7/22/94
to
In article <30ogg8$q...@wcap.centerline.com>, ji...@centerline.com (Jim Frost)
says:

>
>Tom Krotchko <to...@access.digex.net> writes:
>>If you'd read the ANSI standard (say in hushed tones), you'll see that it
>>can't actually even be in there, since globals are only unique in the
>>first 8 characters (I think this is to make sure IBM mainframe C is ANSI
>>compatible, although some people claim its mostly to p*ss off all the
>>other vendors).
>
>From K&R 2nd ed A2.2, p. 192:
>
>"...Identifiers may have any length, and for internal identifiers, at
>least the first 31 characters are significant; some implementations
>may make more characters significant. [...] Identifiers with external
>linkage are more restricted: implementations may make as few as the
>first six characters significant, and may ignore case distinctions."

Jim, notice that you're reading from K&R (said in condescending tone), and
not the more holy, and revered ANSI (said in hushed tone).

When disputes arise between the two, the reader is advised to consider who
wrote Unix before deciding whom is more definitive (i.e. Ritchie wrote Unix,
so he must be viewed with extreme skepticism).

Oops! Sorry, I just read the Unix-Hater's handbook.

Terry Sikes

unread,
Jul 23, 1994, 10:55:41 AM7/23/94
to
In article <30pk7f$f...@news1.digex.net>,

Um, Tom, the _ANSI_ standard says the first 31 characters (minimum) must
be significant. Pre-ANSI implementations may have allowed less. I
believe the version of K&R that Jim was quoting (2nd. Edition) covers
ANSI C.

Hope that clears things up... ;)
--
Terry Sikes == tsi...@netcom.com | All I want is a baseline 1/1/1 machine:
Alternate address: tsi...@fatcity.com | 1000 MIPS, 1000 MB RAM, and 1000 GB HD.
Also tls...@bix.com, tsi...@aol.com |
All my opinions reflect my views only!| Is that too much to ask?

BCSIS

unread,
Jul 23, 1994, 12:25:17 PM7/23/94
to
: > if (fast_cpu())

: > set_wait_states(lots);
: + usable_memory=memory_available() * .15;

^
|
Shouldn't this be .25 ?

: + if (network_exist())
: + turn_off_network();

:)
Felix Eng
SIngapore OS/2 User Group

Tom Krotchko

unread,
Jul 23, 1994, 3:16:54 PM7/23/94
to
In article <tsikesCt...@netcom.com>, tsi...@netcom.com (Terry Sikes)
says:

>Um, Tom, the _ANSI_ standard says the first 31 characters (minimum) must
>be significant. Pre-ANSI implementations may have allowed less. I
>believe the version of K&R that Jim was quoting (2nd. Edition) covers
>ANSI C.
>
>Hope that clears things up... ;)


Just so I have the last word, I was specifically referring to external
variables, which, according to the ANSI standard only have to be significant
in the first 6 characters.

Since in the original source code, it was implicitly declared as external,
I'm entirely certain I'm right <BG>.

Therefore, that wasn't really the source code for Windows.

Tom Krotchko
to...@access.digex.net

Chris Rehm

unread,
Jul 24, 1994, 5:02:18 AM7/24/94
to
On 21.07.94, Tom Krotchko wrote a message to All
concerning Re: Microsoft Source posting:
TK> From: Tom Krotchko <to...@access.digex.net>
TK> Date: Thu, 21 Jul 94 12:31:06 PDT


TK> In article <lotus.7...@deakin.edu.au>, <lo...@deakin.edu.au>
TK> writes:

>> char make_prog_look_big[1600000];

TK> ^^^^^^^^^^

TK> This is clearly a lie. In the real windows code, this is declared as

TK> static. Besides, since its global, this wouldn't link since it
TK> conflicts with the other global variable that's declared as:

TK> static char make_prog_delete_OS2

Damn you Tom! Now that you have debugged Chicago, they will easily make their
1994 ship schedule! OS/2 is _DOOMED!_

Sincerely,
Chris

Justin Rough

unread,
Jul 25, 1994, 10:36:04 PM7/25/94
to
Tom Krotchko (to...@access.digex.net) wrote:

: > char make_prog_look_big[1600000];

: ^^^^^^^^^^

: static char make_prog_delete_OS2

Idiot.

Since when has Microsoft bothered to conform to standards, or even bother
with correct code. In my opinion this only makes the author's post look
more authentic. For instance, Microsoft's idea of optimizing code is to
remove any _obvious_ compilation errors.

Justin.

David Charlap

unread,
Jul 25, 1994, 6:42:53 PM7/25/94
to
Tom Krotchko <to...@access.digex.net> wrote:
>>
>>From K&R 2nd ed A2.2, p. 192:
>>
>>"...Identifiers may have any length, and for internal identifiers, at
>>least the first 31 characters are significant; some implementations
>>may make more characters significant. [...] Identifiers with external
>>linkage are more restricted: implementations may make as few as the
>>first six characters significant, and may ignore case distinctions."
>
>Jim, notice that you're reading from K&R (said in condescending tone), and
>not the more holy, and revered ANSI (said in hushed tone).

K&R 2nd ed. is ANSI (said rather loud and rudely, causing the entire
room to look at me in shock and disgust...) The 1st edition was
completely wacked, and only applicable to Unix.

---------------------+--------------------------------------------------------
David Charlap | The contents of this message are not the opinions of
da...@visix.com | Visix Software, or of anyone besides myself.
Visix Software, Inc. +--------------------------------------------------------
Member of Team-OS/2 |
---------------------+

Ame...@provence.torolab.ibm.com

unread,
Jul 26, 1994, 2:10:08 PM7/26/94
to
In <CtIpr...@visix.com>, da...@visix.com (David Charlap) writes:
>Tom Krotchko <to...@access.digex.net> wrote:
>>>
>>>From K&R 2nd ed A2.2, p. 192:
>>>
>>>"...Identifiers may have any length, and for internal identifiers, at
>>>least the first 31 characters are significant; some implementations
>>>may make more characters significant. [...] Identifiers with external
>>>linkage are more restricted: implementations may make as few as the
>>>first six characters significant, and may ignore case distinctions."
>>
>>Jim, notice that you're reading from K&R (said in condescending tone), and
>>not the more holy, and revered ANSI (said in hushed tone).
>
>K&R 2nd ed. is ANSI (said rather loud and rudely, causing the entire
>room to look at me in shock and disgust...) The 1st edition was
>completely wacked, and only applicable to Unix.

Blasphemer! Only ANSI is ANSI. Worship not at the alter of a false god!
Some claim that K&R 2nd ed. and other books *are* ANSI. This is not so.
They all purport to accurately and completely describe the ANSI standard.
None of them are entirely accurate, nor are any of them complete. If you're
going to assert that some construct is or is not blessed by the ANSI standard,
get the actual standard and quote it! Do not rely on descriptions of the
standard, or worse yet, damn your immortal soul by using mere implementations
or interpretations of the holy document.

(Like whining "well the Soooper-Doooper C+++ compiler does it this way, and
*everyone knows* that SDC+++ is the latest word in ANSI conformance, so
therefore this way, by definition, *must be* the ANSI way." Bah! I snort in
disgust and contempt every time I hear this particular 'argument'. :-) :-)

P.S. K&R 2nd ed, is a fine book, and I recommend it -- just don't make the
mistake of thinking that it *is* the ANSI standard.

Regards, | "...Then anyone who leaves behind him a written manual, and
Ian R. Ameline | likewise anyone who receives it, in the belief that such
(speaking for | writing will be clear and certain, must be exceedingly
myself, not IBM) | simple-minded..." Plato, _Phaedrus_
-- This quote goes in spades for the ANSI C standard! :-)


Terry Sikes

unread,
Jul 27, 1994, 6:13:18 AM7/27/94
to
In article <tsikesCt...@netcom.com>,
Terry Sikes <tsi...@netcom.com> wrote:

>Um, Tom, the _ANSI_ standard says the first 31 characters (minimum) must
>be significant. Pre-ANSI implementations may have allowed less. I
>believe the version of K&R that Jim was quoting (2nd. Edition) covers
>ANSI C.
>
>Hope that clears things up... ;)

And to follow up my own post (I hate it when I do that).

Sig. characters for external linkage are six ("and don't count on case
signficance"), according to the standard. I hope this will be fixed
in the ANSI C++ spec. Anybody know what the draft spec says?

Tom Krotchko

unread,
Jul 27, 1994, 6:32:55 PM7/27/94
to
In article <tsikesCt...@netcom.com>, tsi...@netcom.com (Terry Sikes)
says:

>Sig. characters for external linkage are six ("and don't count on case


>signficance"), according to the standard. I hope this will be fixed
>in the ANSI C++ spec. Anybody know what the draft spec says?

I have a funny feeling it won't. Too many linkers out that that won't
tolerate funny stuff like "ten character external variables". What are you,
some kind of wise guy????

Tom Krotchko
<to...@access.digex.net>

ETX-T-BEA Bjorn Fahller

unread,
Jul 28, 1994, 1:27:59 AM7/28/94
to
Tom Krotchko (to...@access.digex.net) wrote:
: In article <tsikesCt...@netcom.com>, tsi...@netcom.com (Terry Sikes)
: says:

I too have a funny feeling about this. Why is it linkers are seen as sacred
with C++? With better means of linking the parts together than the standard
linkers, you also get better type checks (templates are a mess, since you
can have different implementations in different files, and no linker would
notice, causing very weird errors, the same goes for in-line functions).

To get at least some OS/2 advocacy in this, Cset++ at least supports this
partially (all the way out?) with the intermediate code linker (optional).
_
/Bjorn.
--
H:c/o Eklund W:Ericsson Telecom etx...@kk.ericsson.se
Kvistbrogatan 15 kk/etx/t/bea <Team-OS/2>
S-124 67 Bandhagen/SWEDEN S-126 25 Stockholm/Sweden Software designers work
Phone: +46 8 647 4374 Phone: +46 8 719 9620 with vapour-ware.

Jochen Friedrich

unread,
Jul 28, 1994, 5:31:25 AM7/28/94
to
In message <316nan$n...@news1.digex.net> - to...@access.digex.net (Tom

Maybe that's the reason why it took so long to port Windows (NT) to Alpha??

Sorry couldn't resist...

Cheers,
Jochen
------------------------------------------------------------------
This is just my own opinion, not the opinion of SAS


0 new messages