[comp.lang.pascal] port array

dvlhma@cs.umu.se (Henrik Magnusson) (03/27/91)

Hello again!

I'm writing a DOS-util that should work like ESC-key in UNIX. Don't know if
it excist everywhere, but it helps you with the filenames....

In my search of how to write this like an TSR i ran into an predefined array
called PORT (and another one called PORTW). Does anyone know what kind of 
information that is stored here. (And what is stored where).

(If you want to see an example where to find the port array, try help on keep in tp6.0)

/NeNNe

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Henrik Magnusson           :: "How'd you puncture that tyre?"           ::
:: dvlhma@cs.umu.se           :: "Ran over a milk bottle"                  ::
::                            :: "Didn't you see it?"                      ::
:: University of Umeaa        :: "Damn kid had it under his coat."         ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

sousag@v3.hanscom.af.mil (SSGT GERALD C. SOUS) (03/28/91)

                          E L E C T R O N I C   M A I L
                     (DDN Host Address:  V3.HANSCOM.AF.MIL)

                                        Date:      27-Mar-1991 11:22
                                        From:      SSgt. Gerald C. Sousa Jr. 
                                        Username:  SOUSAG 
                                        Dept:      RADC/EECP
                                        Tel No:    377-2998 AV478-2998

TO:  _WINS%                               ( _DDN[INFO-PASCAL@BRL.MIL] )


Subject: RE: port array                                                                                                                                              



> Subject: port array.
> Message-ID: <1991Mar27.024531.1937@cs.umu.se>
> Date: 27 Mar 91 02:45:31 GMT
> Sender: News Administrator <news@cs.umu.se>
> To:       info-pascal@BRL.MIL

> Hello again!

> I'm writing a DOS-util that should work like ESC-key in UNIX. Don't know if
> it excist everywhere, but it helps you with the filenames....

> In my search of how to write this like an TSR i ran into an predefined array
> called PORT (and another one called PORTW). Does anyone know what kind of 
> information that is stored here. (And what is stored where).

    The TP 5.5 manual gives a somewhat clear description on page 208-209.  In 
case you are missing the manual here is a brief summary:
    For access to the 80x86 CPU data ports, TP implements two arrays, 
PORT and PORTW.  These are both one dimensional arrays whos elements 
correspond to a data port.  The index type is the integer-type word.  The 
PORT array is type byte and componenets of PORTW are type word.
    Data is output to the specified port by assigning that data to a 
componenet of PORT or PORTW.  Data is input from the selected port by 
referencing a given elememt in PORT or PORTW.
    There are some restrictions on the use of these two arrays and their 
component parts so you may want to take a look at pages 208-209 of the TP 
5.5 manual.

	Hope I did't tell you something you already know.  Hope it helps.

Jed Sousa.

dave@tygra.UUCP (David Conrad) (03/28/91)

In article <26374@adm.brl.mil> sousag@v3.hanscom.af.mil (SSGT GERALD C. SOUS) writes:
>> In my search of how to write this like an TSR i ran into an predefined array
>> called PORT (and another one called PORTW). Does anyone know what kind of 
>> information that is stored here. (And what is stored where).

These are for access to the I/O ports, not necessary unless you are planning
on directly programming peripherals.

>    The TP 5.5 manual gives a somewhat clear description on page 208-209.  In 
>case you are missing the manual here is a brief summary:                   ~~
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Jed Sousa.

If you are missing the manual, grow up and quit pirating software.
(This is not directed at you, Gerald, nor exactly at you, Jed, but I hate to
see when people make it easy for the pirates.)

Dave Conrad
dave%tygra@sharkey.cc.umich.edu
-- 
=  CAT-TALK Conferencing Network, Computer Conferencing and File Archive  =
-  1-313-343-0800, 300/1200/2400/9600 baud, 8/N/1. New users use 'new'    - 
=  as a login id.  AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET")        =
   E-MAIL Address: dave%tygra@sharkey.cc.umich.edu

dvlhma@cs.umu.se (Henrik Magnusson) (03/29/91)

I'm not missing the manuals, in Tp6.0 the little information that is 
avilable is on page 253 in the Programmer's Guide. The reason i asked
is that the description of port and portW arrays isn't enough. So I
thought that there could be any kind people outthere with the information.
And i got to.
(or a part of it).

And why do i write this?? I don't like to be "called" a pirate, when i've
spent 1600 SEK ($275) on tp6.0.

To all who gave me information thanx.

/NeNNe

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Henrik Magnusson           :: "How'd you puncture that tyre?"           ::
:: dvlhma@cs.umu.se           :: "Ran over a milk bottle"                  ::
::                            :: "Didn't you see it?"                      ::
:: Umeaa University, Sweden   :: "Damn kid had it under his coat."         ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

dave@tygra.UUCP (David Conrad) (04/01/91)

In article <1991Mar29.131326.17074@cs.umu.se> dvlhma@cs.umu.se (Henrik Magnusson) writes:
>I'm not missing the manuals, in Tp6.0 the little information that is 
>avilable is on page 253 in the Programmer's Guide. The reason i asked
>is that the description of port and portW arrays isn't enough. So I
>thought that there could be any kind people outthere with the information.
>And i got to.
>(or a part of it).
>
>And why do i write this?? I don't like to be "called" a pirate, when i've
>spent 1600 SEK ($275) on tp6.0.
>

I'm sorry you thought I was calling you a pirate.  I wasn't.  I said that
posting parts of the manuals makes it easier for pirates, but that I thought
that neither the poster nor the person he was responding to were pirates.
I apologize for the apparent attack on you, it was my fault for not being
clear enough.

The port arrays allow access to the I/O ports, which is necessary to drive
peripheral devices directly.  If you aren't doing so, then you don't need
the port arrays.  (BTW, I thought I also provided this information in my
article.)

David Conrad
dave%tygra@sharkey.cc.umich.edu
-- 
=  CAT-TALK Conferencing Network, Computer Conferencing and File Archive  =
-  1-313-343-0800, 300/1200/2400/9600 baud, 8/N/1. New users use 'new'    - 
=  as a login id.  AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET")        =
   E-MAIL Address: dave%tygra@sharkey.cc.umich.edu

cd5340@mars.njit.edu (David Charlap) (04/03/91)

In article <1991Mar28.103443.12797@tygra.UUCP> dave@tygra.UUCP (David Conrad) writes:
>
>If you are missing the manual, grow up and quit pirating software.
>(This is not directed at you, Gerald, nor exactly at you, Jed, but I hate to
>see when people make it easy for the pirates.)

Too late.  Ever since Borland began putting the entire reference manual
into the on-line help screens, it's been made easy enough.  Discussions
here will have zero additional impact.
--
David Charlap                   "Invention is the mother of necessity"
cd5340@mars.njit.edu            "Necessity is a mother"
Operators are standing by	"mother!" - Daffy Duck

it1@Isis.MsState.Edu (Tim Tsai) (04/03/91)

cd5340@mars.njit.edu (David Charlap) writes:
>In article <1991Mar28.103443.12797@tygra.UUCP> dave@tygra.UUCP (David Conrad) writes:
>>If you are missing the manual, grow up and quit pirating software.
>>(This is not directed at you, Gerald, nor exactly at you, Jed, but I hate to
>>see when people make it easy for the pirates.)

>Too late.  Ever since Borland began putting the entire reference manual
>into the on-line help screens, it's been made easy enough.  Discussions
>here will have zero additional impact.

  Site licensed programs usually only come with one copy of the manual.
I don't use Pascal enough to justify $60 for a copy of the manual.
I'm a registered owner of Turbo C, BTW.

  Missing the manual != (<> for Pascal people) pirated software,
at least not in our environment.

--
  I have lots of common sense.  I just choose to ignore it. <Calvin>