🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.msdos.programmer
5 messages
5 total messages Started by David J. Bianco Mon, 30 Jul 1990 20:30
80286 protected mode programming
#1727
Author: David J. Bianco
Date: Mon, 30 Jul 1990 20:30
5 lines
794 bytes
How does one kick the 286 chip into protected mode? I'm using TC++ (but
only, as of yet, in TC mode, not TC++ mode), and was hoping to get out
of this segmented architecture via the protected mode. Since I dont
really care if my program will run in the background of a multitasker
or anything, I thought this would be a good solution.  
Re: 80286 protected mode programming
#1743
Author: Naji Mouawad
Date: Tue, 31 Jul 1990 02:42
23 lines
1674 bytes
In article <BIANCO.90Jul30163028@daffodil.cs.odu.edu> bianco@cs.odu.edu
(David J. Bianco) writes:

>How does one kick the 286 chip into protected mode? I'm using TC++ (but
>only, as of yet, in TC mode, not TC++ mode), and was hoping to get out
>of this segmented architecture via the protected mode. Since I dont
>really care if my program will run in the background of a multitasker
>or anything, I thought this would be a good solution.  

I don't get it. If you set the processor in protected mode, you kill
Dos (Are you using Dos ?) and unless you use fancy tricks as the ones used
by Windows and the like, any interrupt service will not be carried away 
by DOS. Thus, you're program won't be able to read a file or send a
character to the printer etc...

Unless you have an operating system that supports the protected mode,
you can't do much of it... but then again, I may be wrong.

-- 
         ---------------+-------------------------------------------
        | Naji Mouawad  |       nmouawad@water.uwaterloo.edu        |
        |  University   |-------------------------------------------|
        | Of Waterloo   | "Thanks God, we cannot prove He Exists."  |
Re: 80286 protected mode programming
#1789
Author: ganter
Date: Sun, 05 Aug 1990 02:16
16 lines
1300 bytes
In article <BIANCO.90Jul30163028@daffodil.cs.odu.edu>, bianco@cs.odu.edu (David J. Bianco) writes:
> How does one kick the 286 chip into protected mode? I'm using TC++ (but
> only, as of yet, in TC mode, not TC++ mode), and was hoping to get out
> of this segmented architecture via the protected mode. Since I dont
> really care if my program will run in the background of a multitasker
> or anything, I thought this would be a good solution.  

quite complicated without any BIOS-listing. Try to get a IBM-AT Technical
Reference Manual Vol.1, there You find the complete BIOS-listing, useful 
anyway. 
You have to prepare some tables (GDT,IDT,etc.) to switch to protected
mode. And then you have to care about protection violation caused by improper
linking, and so on ... 
Use the technical reference and a good book on the 286.

Robert
Re: 80286 protected mode programming
#1831
Author: Robert Collins
Date: Thu, 09 Aug 1990 15:35
26 lines
1843 bytes
In article <1990Jul31.024249.1328@water.waterloo.edu> nmouawad@water.waterloo.edu (Naji Mouawad) writes:
>In article <BIANCO.90Jul30163028@daffodil.cs.odu.edu> bianco@cs.odu.edu
>(David J. Bianco) writes:
>
>>How does one kick the 286 chip into protected mode? I'm using TC++ (but
>>only, as of yet, in TC mode, not TC++ mode), and was hoping to get out
>>of this segmented architecture via the protected mode. Since I dont
>>really care if my program will run in the background of a multitasker
>>or anything, I thought this would be a good solution.  
>

Don't try and use the '286 to circumvent the necessity for segmentation.
The '286 in protected mode enforces segmentation much stronger than in
real mode.  I would recommend getting a good book that discusses
protected mode, and read it.  

I just finished writing two magazine articles on how to enter and
leave protected mode, along with lots of undocumented goodies about
the '286 and '386.  At this point I don't know if they will be accepted
for publication (as each article is 8-10 pages, and includes 20 or more
pages of figures and source code).  If the articles are accepted, you
can read them in TECH SPECIALIST in a couple of months.  If they are
rejected, then I will post them to the net.

Robert Collins
 
Re: 80286 protected mode programming
#1960
Author: Alan Weiss
Date: Tue, 21 Aug 1990 18:05
46 lines
2958 bytes
In article <1990Jul31.024249.1328@water.waterloo.edu> nmouawad@water.waterloo.edu (Naji Mouawad) writes:
>In article <BIANCO.90Jul30163028@daffodil.cs.odu.edu> bianco@cs.odu.edu
>(David J. Bianco) writes:
>
>>How does one kick the 286 chip into protected mode? I'm using TC++ (but
>>only, as of yet, in TC mode, not TC++ mode), and was hoping to get out
>>of this segmented architecture via the protected mode. Since I dont
>>really care if my program will run in the background of a multitasker
>>or anything, I thought this would be a good solution.  
>
>I don't get it. If you set the processor in protected mode, you kill
>Dos (Are you using Dos ?) and unless you use fancy tricks as the ones used
>by Windows and the like, any interrupt service will not be carried away 
>by DOS. Thus, you're program won't be able to read a file or send a
>character to the printer etc...
>
>Unless you have an operating system that supports the protected mode,
>you can't do much of it... but then again, I may be wrong.
>
>-- 
>         ---------------+-------------------------------------------
>        | Naji Mouawad  |       nmouawad@water.uwaterloo.edu        |

No, you're (partially) correct, Naji.  Once in Protected Mode (286-style),
DOS no longer knows who/what/where you are.  Products such as DOS Merge
(Locus Computing, Inglewood CA) use Unix to control the machine.  Some
operating systems (BTOS/CTOS from Unisys/Convergent) offer a *REAL*
operating system that allows programmers to write protected mode
applications and/or system software using real-mode stubs).

'Course, you could always write your own protected-mode monitor program/
mini-OS to manage the environment (which is what Windows does).

This is not especially easy, but others have done this (Windows, OS/2
with the Compatibility Box, DOS Merge, VP/ix, BTOS/CTOS, DESQview, etc.)

Good luck.

........................................................................
|	Alan R. Weiss     |	Ashton-Tate Corporation			|	
|	213-538-7584      | My employer can express its own opinions,   |
|       alanw@ashton      | thank you!  These are mine for the taking.  |
|!uunet!ashtate!alanw     |---------------------------------------------|
|alanw@ashtate.A-T.com    | Fight organized crime ... eliminate the IRS |
|Or try using "R" or "r"  | The Net is the last bastion of liberty!     |
..........................|..............................................
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads