What is the Funniest Thing your OS ever Did ?
-
- Posts: 7
- Joined: Tue Dec 01, 2015 7:01 am
What is the Funniest Thing your OS ever Did ?
I know it sounds crazy , but really Every Dev has that moment where you would laugh out your eyes for something silly that your code did .
Re: What is the Funniest Thing your OS ever Did ?
Once my kernel started moving the cursor in random positions and the best thing was that I could write in this positions so I made random strings around my screen
Working on a DOS:
Bootloader - DONE
Kernel - 5%
I would be grateful if you would like to help me
Bootloader - DONE
Kernel - 5%
I would be grateful if you would like to help me
-
- Posts: 5
- Joined: Wed Dec 16, 2015 11:54 am
Re: What is the Funniest Thing your OS ever Did ?
I just created this account and I have yet to boot my first kernel (you guessed it, messing with a x86 bootloader at the moment), so I can't really reply to your actual question. Nevertheless, I definately recall trying to boot from a debian install CD on my dad's old PC (he bought it in '99 or '00, don't remember) four years ago, when I was still in high school and mostly oblivious to the wonderous world of computer science (at present I'm a student).
I mainly post this because I'm curious whether any of the experts on this forum have an idea about what could have happened to the poor old Compaq. I have no idea, and knowing what I know today about OS theory -- only some theory, no practical experience with OS dev here -- what happened that day completely mystifies me.
To cut a long story short, I inserted the CD fully expecting to be able to install this 'debian linux' sorcery my older cousin told me about (he also gave me the install CD). Needless to say, it did not work. The system complained about not being able to find a bootable medium. Looking back now I guess I understand that part. About five seconds later, however, the screen went black again. Next, it started spitting out garbage, rendering strange glyphs on the old CRT monitor and beeping harshly while doing so. It did that for about two more seconds and then froze.
Again, the 'no bootable medium' or something similar makes sense to me. But how, after (!) the BIOS decided it could not grab a boot loader from any of the present disks, could it still break down and go haywire? I would expect the BIOS to halt the CPU upon failing to boot.
Anyway, didn't expect this to be my first post, but I had to reply to this one.
I mainly post this because I'm curious whether any of the experts on this forum have an idea about what could have happened to the poor old Compaq. I have no idea, and knowing what I know today about OS theory -- only some theory, no practical experience with OS dev here -- what happened that day completely mystifies me.
To cut a long story short, I inserted the CD fully expecting to be able to install this 'debian linux' sorcery my older cousin told me about (he also gave me the install CD). Needless to say, it did not work. The system complained about not being able to find a bootable medium. Looking back now I guess I understand that part. About five seconds later, however, the screen went black again. Next, it started spitting out garbage, rendering strange glyphs on the old CRT monitor and beeping harshly while doing so. It did that for about two more seconds and then froze.
Again, the 'no bootable medium' or something similar makes sense to me. But how, after (!) the BIOS decided it could not grab a boot loader from any of the present disks, could it still break down and go haywire? I would expect the BIOS to halt the CPU upon failing to boot.
Anyway, didn't expect this to be my first post, but I had to reply to this one.
-
- Member
- Posts: 5588
- Joined: Mon Mar 25, 2013 7:01 pm
Re: What is the Funniest Thing your OS ever Did ?
Failure conditions aren't usually tested very well. I've had one BIOS that would restart my bootloader from the beginning whenever I tried to call a specific function. I disassembled the BIOS code and found out it didn't even support the function; the odd behavior was caused by the error handler forgetting to pop a saved register from the stack before trying to return.DiscobarMolokai wrote:I would expect the BIOS to halt the CPU upon failing to boot.
Even my own first-stage bootloader had a bug in its error handler. The bug had been there for months, but I didn't notice until I managed to cause an error while working on something else.
-
- Posts: 5
- Joined: Wed Dec 16, 2015 11:54 am
Re: What is the Funniest Thing your OS ever Did ?
I'm not sure I understand you. Do you mean that the manufacturers of the system don't test it thoroughly for cases where booting fails (or something similar)?Octocontrabass wrote: Failure conditions aren't usually tested very well.
-
- Member
- Posts: 5588
- Joined: Mon Mar 25, 2013 7:01 pm
Re: What is the Funniest Thing your OS ever Did ?
I mean in general. It's really easy to write code that will detect errors and attempt to handle them gracefully; it's a lot harder to simulate all the possible error conditions to make sure the error handler actually works.