The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: AeroASM on April 24, 2005, 02:19:42 PM

Title: Bootloader that works from Windows
Post by: AeroASM on April 24, 2005, 02:19:42 PM
I was just wondering: would anything bad happen to my computer if I used a kernel mode driver to disable paging and protected mode and get back down to real mode; then load up and boot my own toy OS?
Title: Re: Bootloader that works from Windows
Post by: Bieb on April 24, 2005, 10:21:46 PM
Without shutting down Windows?  I'd think that would have some pretty negative effects.
Title: Re: Bootloader that works from Windows
Post by: Mark Jones on April 25, 2005, 01:27:38 AM
"Type-checking is the work of Satan."  LOL :lol  :U
Title: Re: Bootloader that works from Windows
Post by: thomasantony on April 25, 2005, 04:57:34 AM
Quote from: AeroASM on April 24, 2005, 02:19:42 PM
I was just wondering: would anything bad happen to my computer if I used a kernel mode driver to disable paging and protected mode and get back down to real mode; then load up and boot my own toy OS?
Best way to find out is to try it out :bdg

Thomas :U
Title: Re: Bootloader that works from Windows
Post by: Tedd on April 25, 2005, 09:57:22 AM
There's a program - loadlin? - that I assume does something similar. Check to see if it does anything special :wink
Title: Re: Bootloader that works from Windows
Post by: Bieb on April 25, 2005, 08:18:42 PM
Quote from: Mark Jones on April 25, 2005, 01:27:38 AM
"Type-checking is the work of Satan."  LOL :lol  :U

But oh so true.  Type checking is the single most thing I hate about HLLs.  I'm great at remembering what I'm using valiables for, and I hate how compilers are always trying to make sure I remember.  I mean, if I want to interpret a bool as an integer, why the hell can't I?  They're both 8 bits in size...
Title: Re: Bootloader that works from Windows
Post by: thomasantony on April 26, 2005, 05:42:06 AM
Hi,
   Same here. Why bother whats the difference b/w HSH*T and HBULLSH*T or HANDLE or HICON? They are all DWORD and most HLL programmers don't understand that.

Thomas :U
Title: Re: Bootloader that works from Windows
Post by: Tedd on April 26, 2005, 11:09:51 AM
To carry on with the off-topic discussion.. ::)

Although we (ASMers) like to argue that all of this type-checking is non-sense becase we know better and an integer is a dword, as is a bool, as is blah blah blah.. The problem is that this decision is actually up to the compiler and although these types are usually dwords, they don't HAVE to be, and indeed with 64-bit processors they probably won't be. The type-checking mechanism hides all of this from you to 'protect' you from shooting yourself in the foot. Whether you like the fact that the compiler hides things and inserts code behind your back to second guess what you're doing is down to preference. As bit-twiddlers we like to know what's going on, etc, so all of this is an annoyance to us.
My own opinion is that it can have its uses, but that doesn't mean it's useful everywhere; in fact I find it quite annoying most of the time. I'd prefer a type-checking system that I could choose when and when not to use - eg. do checking for 'types' (integer, bool, float, etc) but not for 'non-types' (byte, dword, ...) - something I plan on implementing in my assembler/compiler when I get around to writing it (read: the week after never :bdg)
Title: Re: Bootloader that works from Windows
Post by: AeroASM on May 01, 2005, 11:38:00 AM
Quote from: thomasantony on April 25, 2005, 04:57:34 AM
Quote from: AeroASM on April 24, 2005, 02:19:42 PM
I was just wondering: would anything bad happen to my computer if I used a kernel mode driver to disable paging and protected mode and get back down to real mode; then load up and boot my own toy OS?
Best way to find out is to try it out :bdg

Thomas :U

I am scared that it might cause a triple fault or similar. Then the device driver will be stuck in memory and will activate everytime I start Windows rendering it unusable so I have to reinstall it - which might be a bit difficult with a broken cd drive.
Title: Re: Bootloader that works from Windows
Post by: Mark Jones on May 01, 2005, 03:12:42 PM
You don't keep a daily backup???  :eek  :naughty:
Title: Re: Bootloader that works from Windows
Post by: AeroASM on May 01, 2005, 04:26:00 PM
What should I back it up on to?
Title: Re: Bootloader that works from Windows
Post by: Vortex on May 01, 2005, 04:44:02 PM
Quote from: AeroASM on May 01, 2005, 04:26:00 PM
What should I back it up on to?

All your current system, If I understood correctly Mark's reply.

You should backup your machine before experimenting something risky. :naughty:
Title: Re: Bootloader that works from Windows
Post by: MichaelW on May 01, 2005, 06:34:30 PM
Quote from: AeroASM on May 01, 2005, 04:26:00 PM
What should I back it up on to?

You could replace your broken CD drive with a CD-RW drive, and solve two problems.