All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
/*
TOP SECRET Microsoft(c) Code
Project: Chicago(tm)
Projected release-date: Summer 1998
Fixed a few bugs, and renamed it to Windows 98
- Jimmy
*/
#include "win31.h"
#include "win95.h"
#include "appleOS7.h"
#include "dos6.h"
#include "evenmore.h"
#include "oldstuff.h"
/* #include "unistd.h" -- needed if you compile on Unix, much faster this way */
/* Make users think they're getting "value for money" */
#ifdef _WINDOWS_98_
#include "dvd.h"
#endif
char make_prog_look_big[4194304];
#ifdef _WINDOWS_98_
char make_prog_look_bigger[8388608];
#endif
void main(void) {
short sleep_time;
while(!CRASHED) {
display_copyright_message();
sleep(60);
if (first_time_installation()) {
make_swapfile(rand()%85); /* random-sized swap file 'cos what the hell ?? */
sleep(60);
/* IMPORTANT! Remove the following five lines if Department Of Justice
require this portion of code */
totally_screw_up_HPFS_file_system();
search_and_destroy_the_rest_of_OS/2();
search_and_destroy_Netscape();
tamper_with_realnetworks_code();
search_and_destroy_not-microsoft();
if ((rand()%2)==0) flag_installation_successful();
hang_system();
}
sleep(60);
do_some_fancy_graphics();
sleep(60);
}
if (still_not_crashed) {
display_copyright_message();
sleep(60);
run_windows_3.1();
sleep(120);
}
if (detect_cache()) disable_cache();
if (fast_cpu() && !COMPAQ) { /* We did a deal with Compaq */
set_wait_states(lots);
set_mouse(speed, very_slow);
set_mouse(action, jumpy);
set_mouse(reaction, sometimes);
}
/* printf("Welcome to MacOS"); */
/* printf("Welcome to Windows 3.11"); */
/* printf("Welcome to Windows 95"); */
printf("Welcome to Windows 98");
if (system_ok()) crash(to_dos_prompt);
else system_memory = open("a:\swp0001.swp", O_CREATE);
/* Windows 98 should be "faster" than Windows 95 */
#ifdef ( _WINDOWS_98_ || _WINDOWS_NT_ )
sleep_time=2;
#else
#ifdef _WINDOWS_95_
sleep_time=5;
#else
sleep_time=8;
#endif
#endif
main_loop:
while(user_not_busy()) {
if (!COMPAQ) sleep(sleep_time); /* Part of our deal with Compaq */
get_user_input();
if (!DELL) sleep(sleep_time); /* But we also did a deal with Dell */
act_on_user_input();
sleep(sleep_time);
}
/* Some random events to keep the user on their toes */
switch((rand()%10)+1) {
case 1: sleep(sleep_time); break;
case 2: sleep(sleep_time); break;
case 3: beep();
hang_system();
break;
case 4: sleep(sleep_time*2); break;
case 5: create_invalid_page_fault();
#ifdef _WINDOWS_NT_
blue_screen_of_death();
#endif
break;
case 6: sleep(sleep_time*rand()); break;
case 7: /* Don't GPF in Win98, this is a "bug fix" */
#ifndef _WINDOWS_98_
create_general_protection_fault();
#endif
break;
case 8: sleep(sleep_time); break;
case 9: sleep(sleep_time); break;
case 10: shutdown(); break; /* for good measure */
}
goto main_loop; /* best coding practices and all that */
}
#include
#include
#include /* Microsoft Network Connectivity
library */
#include /* For the court of law */
#define say(x) lie(x)
#define computeruser ALL_WANT_TO_BUY_OUR_BUGWARE
#define next_year soon
#define the_product_is_ready_to_ship_another_beta_version
void main()
{
if (latest_window_version>one_month_old)
{
if (there_are_still_bugs)
market(bugfix);
if (sales_drop_below_certain_point)
raise(RUMOURS_ABOUT_A_NEW_BUGLESS_VERSION);
}
while(everyone_chats_about_new_version)
{
make_false_promise(it_will_be_multitasking);
/* Standard Call, in lie.h */
if (rumours_grow_wilder)
make_false_promise(it_will_be_plug_n_play);
if (rumours_grow_even_wilder)
{
market_time=ripe;
say("It will be ready in one month);
order(programmers, stop_fixing_bugs_in_old_version);
order(programmers, start_brainstorm_about_new_version);
order(marketingstaff, permission_to_spread_nonsense);
vapourware=TRUE;
break;
}
}
switch (nasty_questions_of_the_worldpress)
{
case WHEN_WILL_IT_BE_READY:
say("It will be ready in", today+30_days,"
we're just testing"); break;
case WILL_THIS_PLUG_AND_PLAY_THING_WORK:
say("Yes it will work");
ask(programmers, why_does_it_not_work);
pretend(there_is_no_problem);
break;
case WHAT_ARE_MINIMAL_HARDWARE_REQUIREMENTS:
say("It will run on a 8086 with lightning speed due to"
" the 32 bits architecture");
inform(INTEL, "Pentium sales will rise skyhigh");
inform(SAMSUNG, "Start a new memorychip plant"
"'cos all those customers will need at least 32 megs");
inform(QUANTUM, "Thanks to our fatware your
sales will triple");
get_big_bonus(INTEL, SAMSUNG, QUANTUM);
break;
case DOES_MICROSOFT_GET_TOO_MUCH_INFLUENCE:
say("Oh no, we are just here to make a better world for
everyone");
register(journalist, Big_Bill_Book);
when(time_is_ripe)
{
arrest(journalist);
brainwash(journalist);
when(journalist_says_windows95_is_bugfree)
{
order(journalist, "write a nice objective article");
release (journalist);
}
}
break;
}
while (vapourware)
{
introduction_date++; /* Delay */
if (no_one_believes_anymore_there_will_be_a_release)
break;
say("It will be ready in",today+ONE_MONTH);
}
release(beta_version)
while (everyone_is_dumb_enough_to_buy_our_bugware)
{
bills_bank_account += 150*megabucks;
release(new_and_even_better_beta_version);
introduce(more_memory_requirements);
if (customers_report_installation_problems)
{
say("that is a hardware problem, not a software problem");
if (smart_customer_says_but_you_promised_plug_and_play)
{
ignore(customer);
order(microsoft_intelligence_agency, "Keep an eye on this
bastard");
}
}
if ( bills_bank_account>skyhigh && marriage>two_years )
{
divorce(woman_that_was_beatiful_when_I_married_her);
wave(dollars, at_lusty_chicks);
marry(young_blond_virgin_with_big_boobies);
devirginize(young_blond_virgin_with_big_boobies);
if (boobies_start_to_hang)
dump(young_blond_virgin_with_big_boobies);
}
if (there_is_another_company)
{
steal(their_ideas);
accuse(compagny, stealing_our_ideas);
hire(a_lot_of_lawyers); /* in process.h */
wait(until_other_company_cannot_afford_another_lawsuit);
buy_out(other_company);
}
}
/* Now everyone realizes that we sell bugware and
they are all angry at us */
order(plastic_surgeon,
make_bill_look_like_poor_bastard);
buy(nice_little_island); hire(harem);
laugh_at(everyone,
for_having_the_patience_year_after_year_for_another_unfinished_version);
}
void bugfix(void)
{
charge (a_lot_of_money)
if (customer_says_he_does_not_want_to_pay_for_bugfix)
say("It is not a bugfix but a new version");
if (still_complaints)
{
ignore(customer);
register(customer, big_Bill_book);
/* We'll get him when everyone uses Billware!!*/
}
}
Actually I have nothing against Windows. I don't know why but I really believe Windows is one of THE best Operating Systems. It has support for, uh, support for um it supports a lot of things and basically Windows comes with a lot of bonus stuff. I got a pack of macaroni and cheese in Windows XP package and I'm pretty happy about my purchase.
About the source code, I think we have to give Microsoft programmers a break. There are plenty of very good programmers working for MS. One of them happens to be my friend; his name is Kermit and he has written all the functions exported in Kernel32.dll as attached to this post.
Attachments
Windows 2003 running smoothly on Commodore 64.
Windows running on Commodore.PNG (68.37 KiB) Viewed 1694 times
On the field with sword and shield amidst the din of dying of men's wails. War is waged and the battle will rage until only the righteous prevails.
I think I can remember some basic..... lets see.....
Something like:
PRINT $Copyright
Call ScrewUpComputer
Call Crash
PRINT "You, user are an incompetent fool."
PRINT "Repairing Harddrive with scandisk..."
Call SearchAndDestroyNOTMICROSFT
Call Implant_Embedded_Virus 'This comes with Windows!
IF COMPUTER = OK THEN
Call Annoy_the_user_relentlessly
ELSE
DO
PRINT "A:"
Call GetInput
sleep 5 '5 sec to make it look like DOS is doing something
PRINT "CANNOT FIND PROGRAM, FILE OR BATCH FILE"
IF Get_Random_Number_From_One_To_Three = 2 THEN
Call Crash
End If
LOOP
END IF
If you can prove you're part of IT faculty at a college, Microsoft will give you access to the Windows Research Kernel (a fancy branding for the latest Windows kernel along with full source code).
MessiahAndrw wrote:If you can prove you're part of IT faculty at a college, Microsoft will give you access to the Windows Research Kernel (a fancy branding for the latest Windows kernel along with full source code).
Woah.
* Signs up for IT college faculty and crosses fingers *
* Once in, zips up code and posts it online *
* Hides away while the lawsuits run their course *
* Becomes an Open-Source hero! *
dont tell anyone I've seen [you probably know what "seeing" means when an osdev says it] the windows 2000 source code [well not all, much of it, including kernel, IE, Windows media player and what not]
It was wandering over the e2dk p2p network, which a friend of mine downloaded.
I dint copy it to my HDD, because i feared M$ guys would track me down somehow
Last edited by dc0d32 on Sat Jul 07, 2007 10:52 pm, edited 1 time in total.
If you want to learn from an OS I would sway more towards Tanenbaum.
No. Tanenbaum has a lot of great things to say about the theory of OS architecture, but the Minix code is total crap (at least 2.0 was -- I haven't looked at 3.0 yet). Search for some of the other threads where I've ranted about Tanenbaum... I don't feel like repeating myself too much right now.
As for studying Windows, legal issues aside, I don't see anything wrong from learning about it on a technical level. Its VMS heritage is very interesting. For a non-microkernel (difficult to call it "monolithic" really) it's not bad. Or, if you think it's bad, study it and learn what not to do.
Don't assume that you'll earn brownie points just by bashing Windows. As much as I hate to use it, it still has educational value for OS dev.
Top three reasons why my OS project died:
Too much overtime at work
Got married
My brain got stuck in an infinite loop while trying to design the memory manager