TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mike Bilow
from: George White
date: 1996-03-10 10:57:24
subject: Can I have my IOPL segme

Hi Mike,

You wrote in a message to Rinat Sadretdinow:

MB>Note that there is no way to make the necessary set up except from Ring 0, i
MB>which case all of this is pointless.  Since OS/2 provides a
MB>facility for loading a 16-bit segment with IOPL, and for
MB>calling into such a 16-bit segment from a 32-bit segment,
MB>you should use the provided facilities.

MB>It is possible to do all sorts of equally foolish things from Ring 0 code,
MB>such as mapping a selector to run Ring 3 code at Ring 0
MB>privilege, and I have seen things like this done.  My
MB>opinion is that such a trick is an example of programming
MB>incompetence, since it completely bypasses the memory
MB>protection architecture of OS/2.  More to the point, it
MB>accomplishes nothing that could not be done using a proper
MB>design.

Right, which way would you (or anyone else who cares to comment) suggest
for accessing a serial card which communicates with the main system via
shared memory in the DOS high memory area.

Under DOS the shared memory is defined by a structure and I access it by
creating a pointer to it and then accessing the structure via the
pointer (as below).

struct  comms_layout    far *pc_transfer;       /* Define the structure */

pc_transfer = MK_FP (COMMS_SEG,0);              /* Create a pointer to it */

character = pc_transfer->comms_version;         /* Get the current version */
pc_transfer->timer_flag = 0;                    /* Initialis the on-board timer


Can this be done in a similar way under OS/2?

I've got Devcon and lots of other stuff, but that's the problem!
There is so much stuff there that finding out the various ways of
doing this is a major research effort...

George

 * SLMR 2.1a * COFFEE.COM not found: A)dd more R)reheat F)reak out

--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 440/4 141/209 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.