Re: A82: Crashes!!!!!
Re: A82: Crashes!!!!!
Some one once said "You have no idea what you are talking about." on this
list, and it seems to fit very well on your comment on protected mode. The
comments you made is mostly just plane wrong, and same places even stupid.
First of all how would you but a 286 into 32 bit protected mode when it is
not a 32 bits processor. Let me qoute one of my asm books. "The 80286
operates, by default, in real mode. You can switch to 16-bit protected mode
if you want,...". And "The 80386 and 80486 also operates by default in real
mode. Unlike the 80286, however, you can switch between real mode and
protected mode (16-bit or 32-bit) and back again, with relatively little
problem". See, this makes seense, you an but 286 (a 16 bit processor) into
16 bit protected mode, not 32 bits.
You also say that i is a full RAM-acces mode. Why do you think that the
selector registers have a special field to indicated requested privilege
level ? Why does the DPL field in a 286 segment discriptor have a special
field to indicate required privilege level ? The answer is actually very
simpel. "If you attempt to access a segment that has a higher privilege
level than you, a fault occurs." So basically you can only acces some part
of the RAM, and therefore calling protected mode on the 286 a full RAM-acces
mode is not correct.
Besides the priviledge level the DPL field in a 286 segment discriptor also
contains information on whatyou are allowed to do with the data placed in
that part of the RAM. This includes what type of information it includes
(code/data) and what you can do with it (read/write execute). "Any attempt
to write to a segment that shows as read-onlym or to write to a code
segment, or to read an execute only code segment, results in a fault
The "segments" in protected mode is not eally segments like in real mode,
they are indices in a table which finds the part of the memory you want to
access. So if you use the wrong segment you will most likely end up trying
to access a segment which does not corespond to a real place in mem, and
there fore a fault will occur.
You also worte that it requires "quite a bit of knowledge of ASM coding" to
enter protected mode. Let me qoute the same book again. "The 80386 and 80486
also operates by default in real mode. Unlike the 80286, however, you can
switch between real mode and protected mode (16-bit or 32-bit) and back
again, with relatively little problem". The book is meant for
intermidiate/advanced asm programmes, so it can not be that hard !.
Since the above should show that almost every thing you wrote i wrong i
would like to make a small comment on the comment you wrote. You worte a
reply about a subject which you as far as i can see have no knowledge at
Why do you answer if you know nothing on the subject ? I find that writing
"PROTECTED MODE?!?!? You have no idea what you are talking about." is very
rude and i hate when people answer in this way. I have never seen anyone
answer a question in this way execpt when they new what they where talking
about, and i hope i wont see it again.
May i suggest that you sit down and read the book Advanced Assembly Language
by Allan L. wyatt, Sr (or any other advance asm book), before you make
comments on x86 asm releated issus. This is the book that i have qouted
several time in this reply (it was my first asm book and it is very good).
From: Thomas J. Hruska <email@example.com>
To: firstname.lastname@example.org <email@example.com>
Date: 8. oktober 1997 01:43
Subject: Re: A82: Crashes!!!!!
>At 11:56 PM 10/6/97 -0400, you wrote:
>>< Preventing a faulty program from crashing the calculator is virtually
>>< If it writes garbage all over RAM, there's nothing the shell can do
>>Too bad the Z80 doesn't have protected mode. Why couldn't TI have used
>PROTECTED MODE?!?!? You have no idea what you are talking about.
>Protected mode puts the CPU, on a PC, into 32 bit-full RAM access mode. It
>doesn't "protect" RAM like you may think it should (in fact, crashes are
>frequent if the programming team had no idea what they were doing). The
>CPU is normally in 16-bit mode-64K page addressing. The switch to 32-bit
>mode requires quite a bit of knowledge of ASM coding. What I mean by full
>RAM access mode is that ALL RAM (every meg) is "changed" into one
>continuous block of memory. In order to use protected mode on a PC, you
>have to have your own memory manager right in your own program or have an
>external program (e.g. DOS4GW) take care of it. There are several other
>things that make protected mode special, but there is NO part of it that
>protects RAM. EVERY program ever made has a high probability that it has
>some flaw that could cause the PC to crash. EVEN protected mode programs
>can mess up RAM and cause the computer to hang. No programmer I know of
>can make flawless code every time they sit down.
>Besides, if I wanted a hand-held PC, I would've gotten it. However, the
>Z80 chip does just fine for me when it comes to both ASM and math.
> Thomas J. Hruska -- firstname.lastname@example.org
>Shining Light Productions -- "Meeting the needs of fellow programmers"