Jim Bastard programs a true WTF



  • Hey guys....I've posted a new story on my site that you may enjoy: http://www.jimbastard.com/Jim_programs_a_true_WTF.html 

    Jim programs a true WTF

    Occurred: April 2000

    Once upon a time I was a huge noob.  I wasn't a noob in the classical sense. I was just young, and still had much to learn about life and even more to learn about programming. I was in my high school computer science class. We were working with Borland Turbo C++ 3.0 on Gateway boxes that were barely able to run Windows 98. Our class work for the semester was determined by a project based sylabus.You were expected to complete a project every couple of weeks and complete all projects by the end of the semester. We were about half way through the semester and I was nearing the end of the project list. After completing all the easy projects (pointers, arrays, recursion,  dates, etc..) I had moved on to working with datasets. Our project was to build and manipulate a simple linked list. Create a few nodes, do a few sorts, perform a few searches. A very simple data structure. I'm an RDBMS pro these days, but as a young bastard this concept was quite daunting.

    After a few hours of messing around I had managed to create a linked list structure and I had created an addNode function. I had just begun to build my first bubble sort with recursion. I hit compile. I saw the familiar DOS prompt and saw my application's menu. I hit 'A' to add a node. After adding a few nodes I type 'S' for Sort.

    Let's stop here for a moment and review: I'm on a Windows 98 machine running a Turbo C++ application in DOS. I'm using no headers or libraries except IOStream.h. I have absolutely no reference in my code to anything that is related to color or style of font/text or video.

    I'm looking at the output of my DOS prompt. I see half of my linked list and what seems to be an ASCII dump of every single character ever (including the leet ASCII smiley character I totally made this from an Adventure screen shot. ) in every single 8-bit color. All the text on the screen (including my previous input echos) are blinking in blocks of random colors. Hot pink, lime green, red, light grey....

    I'm a bit little puzzled. I type 'exit' to return to Turbo C++.

    My IDE is completely FUBAR. Just like the DOS prompt, the screen is covered in blocks of random 8-bit colors. Having some common sense, I close down Turbo C++ and reboot the computer. As the Gateway struggles to restart I see the BIOS information displaying on the loading screen. Green, Red, Pink, and Yellow blocks are flashing everywhere. The familiar black and white DOS has taken on all the colors of the 8-bit rainbow.

    Now I'm starting to get freaked out.

    Windows boots and everything seems to be fine. I load up Turbo C++ and the IDE is still FUBAR. Flashing colors are everywhere. Hot Dog Man and Jay are sitting next to me and have taken interest in my misfortunes. I call our teacher Mr. Stroker over.

    Mr. Stroker thinks I have messed up a setting in Turbo C++ and tries to reset the compiler's colors to default. It doesn't work. He looks at the code and although he can see it is incorrect, he is adamant that my code couldn't change the DOS colors. He thinks I'm up to no good and tells me to log onto Hot Dog Man's computer. With Mr. Stroker watching over my shoulder I load Turbo C++ and run the code. Green, Yellow, Red, Pink, oh my! Mr. Stroker is watching in disbelief and makes me move to another machine. The exact same thing happens. DOS is now completely trashed on three machines. No one can use any DOS applications and the screens violently blink random colors while being booted.

    The machines are removed from the computer lab and are never seen again. I restart the project from scratch.

    A note from Jim: I wish I still had the code so I could post what I had actually written but all my electronic media was confiscated (and never returned) by police in 2001 due to The World Famous Priceless Story

     



  •  One time I farted and a pig came flying out my butt. I wish I still had the pig so I could show you, but I fell upon hard time and had to eat it. It really happened though. WTF!!



  •  I'll say this once: This WTF is 100% true.

    I wouldn't even think of posting a WTF as outlandish as this without witnesses. I barely believe it myself.

    Hot Dog Man and Jay can be found on irc.arg-irc.net (www.arg-irc.com) any day of the week. Jay is the server administrator and owner.... They watched all the events transpire and were laughing the whole way. Apparently one of them was helping throw out/donate some of the school's old machines a few years later....and came across the ones I trashed.



  • @Nandurius said:

     One time I farted and a pig came flying out my butt. I wish I still had the pig so I could show you, but I fell upon hard time and had to eat it. It really happened though. WTF!!
     

    I don't doubt the general story.  I used Turbo C++ in high school, and you'd often get fantastical results from trying to print random memory, flashing ASCII characters were common, color was a bit trickier.  But I can confirm that it definitely was possible to muck up the IDE's display.  Now the part about it still being mucked up after a reboot?  I don't buy that at all.



  • @bstorer said:

    @Nandurius said:

     One time I farted and a pig came flying out my butt. I wish I still had the pig so I could show you, but I fell upon hard time and had to eat it. It really happened though. WTF!!
     

    I don't doubt the general story.  I used Turbo C++ in high school, and you'd often get fantastical results from trying to print random memory, flashing ASCII characters were common, color was a bit trickier.  But I can confirm that it definitely was possible to muck up the IDE's display.  Now the part about it still being mucked up after a reboot?  I don't buy that at all.

     Probably could be done, but almost impossible unless if it was your intent. Even invalid pointers would simply overwrite things that were in ram. Maybe the ram wasn't fully cleared on a warm boot. A cold boot probably would have done the trick.



  •  Maybe the ram wasn't fully cleared on a warm boot. A cold boot probably would have done the trick.

     

     

    It was about a week before the machines were removed from the ITC. They sat completey shut down over night several times. They were usable for the most part, except when a student had to use a DOS application. 

    I wouldn't try to rationalize what happened. I've had eight years to think about and I still go WTF?!?! 



  • So you'd show us the code, except you can't show us the code because of an interesting story you'd tell us, except you can't tell us the story either?



  • Lawsuits and injunctions are curious creatures.

     

    :-( 



  • @JimBastard said:

    Lawsuits and injunctions are curious creatures.

     

    :-( 

    What are you worried about... Is your real name really Jim Bastard that the police will come knocking as soon as you tell ?



  •  @pitchingchris said:

    What are you worried about... Is your real name really Jim Bastard that the police will come knocking as soon as you tell ?

     

    :-( :-( :-( :-( 



  • @JimBastard said:

    My IDE is completely FUBAR.
    Just like the DOS prompt, the screen is covered in blocks of random
    8-bit colors.

    ....

    he is adamant that my
    code couldn't change the DOS colors

     

    Why is this a WTF? Your program had a loose pointer, it stomped all over the low 1meg of memory and trashed the VGA font tables. The video aperture's memmapped into 640k-704k [A000:0000-B000:0000]. Since supporting dos mode isn't a priority of Microsoft, no surprise that they don't redo vga font tables after reboot.

    Did you try cold-booting the machines? The corrupted font tables would survive a warm boot. 



  • @MarcB said:

    Why is this a WTF? Your program had a loose pointer, it stomped all over the low 1meg of memory and trashed the VGA font tables. The video aperture's memmapped into 640k-704k [A000:0000-B000:0000]. Since supporting dos mode isn't a priority of Microsoft, no surprise that they don't redo vga font tables after reboot.

    Did you try cold-booting the machines? The corrupted font tables would survive a warm boot. 

     

     

    Did you try reading the post? Reading compreshension FTL.  



  •  I've got a lot more WTF ish stories that due to thier extreme nerdiness I probaly won't post on my site. Would you guys like to see more stories like this catered just to TDWTF?



  • @JimBastard said:

     I've got a lot more WTF ish stories that due to thier extreme nerdiness I probaly won't post on my site. Would you guys like to see more stories like this catered just to TDWTF?

     

    No, go away douchebag troll/spammer.



  • @JimBastard said:

     I've got a lot more WTF ish stories that due to thier extreme nerdiness I probaly won't post on my site. Would you guys like to see more stories like this catered just to TDWTF?
    Amuse us.



  • @JimBastard said:

    I have more relevant content I could post. Would you like to see more content?

      @MasterPlanSoftware said:

    No, go away douchebag troll/spammer.

     

     

    Hrmmmmmmmmmmmmmmmmm.......................................................I don't think I like you.



  • @JimBastard said:

    I don't think I like you.
     

    Join the club.

    Why don't you actually try not being a flaming asshole?



  •  Because if I wasn't a flaming asshole the only diffirence between us would be my leet coding skills and good looks. Ohh yeah also my superstar like rap ability.



  • @MasterPlanSoftware said:

    @JimBastard said:

    I don't think I like you.
     

    Join the club.

    Why don't you actually try not being a flaming asshole?

     

    On a random note, flaming asshole would be a really uncomfortable illness. 



  • DIARRHEA CHA CHA CHA



  • We are not amused.

    Go play in traffic - bring Lysis along with you. 






  • It's unimportant whether this story is true or false. What matters is, I didn't really care for the tone. 



  • Whether the story is true or not (I think it could be true, maybe he overwrote some thing in some ROM.  DOS had no protection those days), I think his site is a pretty interesting read. On par with TDWTF IMHO.

     



  • @russ0519 said:

    maybe he overwrote some thing in some ROM
     

    He overwrote Read Only Memory?



  • @russ0519 said:

    Whether the story is true or not (I think it could be true, maybe he overwrote some thing in some ROM.  DOS had no protection those days), I think his site is a pretty interesting read. On par with TDWTF IMHO.
     

    Sockpuppetsayswhat?



  • @bstorer said:

    Sockpuppetsayswhat?

    snicker



  • @MasterPlanSoftware said:

    @russ0519 said:

    maybe he overwrote some thing in some ROM
     

    He overwrote Read Only Memory?

     

    There are different types of ROM, like EPROM, PROM, etc.  Have you ever flashed your BIOS?   



  • @russ0519 said:

    There are different types of ROM, like EPROM, PROM, etc.  Have you ever flashed your BIOS?   
     

    So you are saying you could overwrite your flashable BIOS with a C program by accident??



  •  @MasterPlanSoftware said:

    @russ0519 said:

    There are different types of ROM, like EPROM, PROM, etc.  Have you ever flashed your BIOS?   
     

    So you are saying you could overwrite your flashable BIOS with a C program by accident??

     

     

    Are you saying you can't?  Are bios flashers made in some magical
    language?  He probably wrote to some memory he wasn't supposed to, and
    overwrote some part of the BIOS.



  • @russ0519 said:

    Are you saying you can't?  Are bios flashers made in some magical
    language?  He probably wrote to some memory he wasn't supposed to, and
    overwrote some part of the BIOS.

    Unlikely, the system bios doesn't handle text mode display, that's what video bios is for. Besides, the odds of randomly overwriting a part of your bios and still having windows boot properly are staggering.

    What MarcB said is correct for graphics mode, but text mode works on segment B800. Try it in debug: e b800:0000. Editing the video memory directly affects the screen output..



  • @dabean said:

    @russ0519 said:

    Are you saying you can't?  Are bios flashers made in some magical
    language?  He probably wrote to some memory he wasn't supposed to, and
    overwrote some part of the BIOS.

    Unlikely, the system bios doesn't handle text mode display, that's what video bios is for. Besides, the odds of randomly overwriting a part of your bios and still having windows boot properly are staggering.

    What MarcB said is correct for graphics mode, but text mode works on segment B800. Try it in debug: e b800:0000. Editing the video memory directly affects the screen output..

    Perhaps he overwrote a part of the video BIOS? Considering it was an older and probably budget machine it probably had an on-board video card, so wouldn't the video bios and the system bios be one and the same, or is there a separate chip that holds the video bios?

    I'm not going to claim that I know how BIOS or BIOS flashing works, but I'm assuming you just write to a certain memory location.  It is possible to change random things in a program and still have the program work properly.  I mean you've used a hex editor right?  If you're just overwriting constants or something, the program should still theoretically work.  

     

     



  • @russ0519 said:

    Perhaps he overwrote a part of the video BIOS? Considering it was an older and probably budget machine it probably had an on-board video card, so wouldn't the video bios and the system bios be one and the same, or is there a separate chip that holds the video bios?
     

    I haven't seen a user flashable video card (on-board or not), they may exist now but I doubt in that era. Flashing isn't just overwriting memory locations, you have to send a specific set of instructions (to a completely different location) before you can start the process.

    What might have happened is that the video bios was cached and he wrote over a part of that. That would probably survive a warm-boot, but not a cold one.

    Without the source it's all speculation anyway.



  • @dabean said:

    @russ0519 said:

    Perhaps he overwrote a part of the video BIOS? Considering it was an older and probably budget machine it probably had an on-board video card, so wouldn't the video bios and the system bios be one and the same, or is there a separate chip that holds the video bios?
     

    I haven't seen a user flashable video card (on-board or not), they may exist now but I doubt in that era. Flashing isn't just overwriting memory locations, you have to send a specific set of instructions (to a completely different location) before you can start the process.

    What might have happened is that the video bios was cached and he wrote over a part of that. That would probably survive a warm-boot, but not a cold one.

    Without the source it's all speculation anyway.

     

    Well they definatelly exist now: http://forums.nvidia.com/lofiversion/index.php?t7280.html

     If it's on board, isn't the video card BIOS same as integrated as well?  

    Do you know what those instructions are that tell BIOS that you're going to flash it?  And how do you know that that particular motherboard manufacturer didn't fuck up and let anyone just write stuff as long as they had the right address?  I'm assuming that this evolved the same way everything else does... make it work, add security later...      

      



  • @russ0519 said:

    Do you know what those instructions are that tell BIOS that you're going to flash it?
    It's on a bus according to the Wikipedia page for BIOS, presumably it is accessed a similar way to the one one would use to access the PCI or ISA bus.



  • @russ0519 said:

    Are you saying you can't?  Are bios flashers made in some magical
    language?  He probably wrote to some memory he wasn't supposed to, and
    overwrote some part of the BIOS.
     

    Gah. TRWTF emerges.

    Just leave it alone then.



  • @russ0519 said:

    Do you know what those instructions are that tell BIOS that you're going to flash it?  And how do you know that that particular motherboard manufacturer didn't fuck up and let anyone just write stuff as long as they had the right address?  I'm assuming that this evolved the same way everything else does... make it work, add security later...      

    It wasn't a motherboard screw up. You can't write to flash memory directly. If you had the address to flash memory, you have to go throught the correct sequence of steps to write to it.  Its more likely that in some of his notation, his memory address was actually being used as a function pointer which in turn ran and caused the affects. Still, you're talking very slim odds.



  • @pitchingchris said:

    ...

     

    Now if only we could let this spam/troll thread die...



  • I don't like spam! 



  • @russ0519 said:

    Have you ever flashed your BIOS?
    No.  I tried, but I couldn't find a teenage or younger girl named BIOS.



  • @russ0519 said:

    Are you saying you can't?  Are bios flashers made in some magical
    language?  He probably wrote to some memory he wasn't supposed to, and
    overwrote some part of the BIOS.

    Re-flashing the bios involves erasing the whole thing and writing a new image. It's impossible to erase or overwrite only part of it - he could accidentally erase it and _maybe_ accidentally write some random crap in its place, but it'd be impossible to mess with it by accident and still have a bootable system



  • Guys seriously.......if I wanted to make up / exaggerate a story about a programming WTF I could do a lot better then this.

    This story is 100% true. I have no idea how I did it. All I know is I created some seriously foul linked list code in C++ and it FUBAR'd three machines. 

    Anyone who says this is "impossible" is wrong. I saw it happen, other people saw it happen. I'll agree that it is EXTREMELY bizarre, and EXTREMLY unlikely.....but it still happened.

    Anyone who says this is "impossible" is straight ignorant. 



  • @JimBastard said:

    Anyone who says this is "impossible" is straight ignorant. 
    Or they believe that you are, at best, an unreliable source.



  • ARG-IRC. Two material witnesses. They don't even like me very much, I don't see why they would lie.



  • @JimBastard said:

    ARG-IRC. Two material witnesses. They don't even like me very much, I don't see why they would lie.
    Yay broken logic.

    Unreliable source A says X.

    Unreliable source A is called on possible false information.

    Unreliable source A provides two reliable (as per A's opinion) sources B and C.

    It's like asking a Russian kerberos server if Verisig (note the lack of "n") is a trust-worthy kerberos server.



  •  Can we please let this spam thread die now?WTF.



  • @JimBastard said:

     Maybe the ram wasn't fully cleared on a warm boot. A cold boot probably would have done the trick.

    It was about a week before the machines were removed from the ITC. They sat completey shut down over night several times.

    Ahh, so they had plenty of time to cool down.



  • This topic amused me, so I'll necro it for everyone else's enjoyment!


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.