Hello:

Are WRITE_REGISTER_UCHAR and
WRITE_PORT_UCHAR identical ?

If no when each of the should be used ?

I need to write to 0x278( known as data register of LPT1 )

and wondering which is the best ?


thank you,
dave

Re: WRITE_REGISTER_UCHAR WRITE_PORT_UCHAR by Calvin

Calvin
Mon Sep 12 03:13:41 CDT 2005

"dave" <dave@discussions.microsoft.com> wrote in message
news:0910EBF4-269B-41C4-9763-91DD66362BFF@microsoft.com...
>
> Hello:
>
> Are WRITE_REGISTER_UCHAR and
> WRITE_PORT_UCHAR identical ?
>

Short answer: No.

Long answer:
WRITE_PORT_UCHAR is designed to access to I/O port. WRITE_REGISTER_XXX is
memory dereferencing with memory barrier on some platforms.

On ISA buses, WRITE_PORT_UCHAR will driver the IOW pin. WRITE_REGISTER_XXX
will driver the SMEMW pin (8-bit) or MEMW (16-bit).

On PCI buses WRITE_PORT_XXX generates I/O Write CMD cycle,
WRITE_REGISTER_XXX generates the memory-write CMD cycle.


> If no when each of the should be used ?

For I/O port access, use WRITE_PORT_UCHAR. For memory-mapped register, use
the other.

>
> I need to write to 0x278( known as data register of LPT1 )
>
> and wondering which is the best ?

Use WRITE_REGISTER_UCHAR, you have no choice.

>
>
> thank you,

You are welcome.

> dave
>
>

--
Calvin Guan (Windows DDK MVP)
NetXtreme Longhorn Miniport Prime
Broadcom Corp. www.broadcom.com



Re: WRITE_REGISTER_UCHAR WRITE_PORT_UCHAR by Vipin

Vipin
Mon Sep 12 08:27:40 CDT 2005

Calvin,
One thing I noticed, your designation keeps changing every week!
What's next :)

Cheers
Vipin

"Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
news:OZb3lH3tFHA.3424@tk2msftngp13.phx.gbl...
> "dave" <dave@discussions.microsoft.com> wrote in message
> news:0910EBF4-269B-41C4-9763-91DD66362BFF@microsoft.com...
>>
>> Hello:
>>
>> Are WRITE_REGISTER_UCHAR and
>> WRITE_PORT_UCHAR identical ?
>>
>
> Short answer: No.
>
> Long answer:
> WRITE_PORT_UCHAR is designed to access to I/O port. WRITE_REGISTER_XXX is
> memory dereferencing with memory barrier on some platforms.
>
> On ISA buses, WRITE_PORT_UCHAR will driver the IOW pin. WRITE_REGISTER_XXX
> will driver the SMEMW pin (8-bit) or MEMW (16-bit).
>
> On PCI buses WRITE_PORT_XXX generates I/O Write CMD cycle,
> WRITE_REGISTER_XXX generates the memory-write CMD cycle.
>
>
>> If no when each of the should be used ?
>
> For I/O port access, use WRITE_PORT_UCHAR. For memory-mapped register, use
> the other.
>
>>
>> I need to write to 0x278( known as data register of LPT1 )
>>
>> and wondering which is the best ?
>
> Use WRITE_REGISTER_UCHAR, you have no choice.
>
>>
>>
>> thank you,
>
> You are welcome.
>
>> dave
>>
>>
>
> --
> Calvin Guan (Windows DDK MVP)
> NetXtreme Longhorn Miniport Prime
> Broadcom Corp. www.broadcom.com
>



Re: WRITE_REGISTER_UCHAR WRITE_PORT_UCHAR by Doron

Doron
Mon Sep 12 10:44:04 CDT 2005

dave,

unless you are assigned this i/o resource by pnp, you cannot use *ANY*
function to access the port itself. If it is not assigned to you, you don't
own it and you are not allowed to touch it.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
news:OZb3lH3tFHA.3424@tk2msftngp13.phx.gbl...
> "dave" <dave@discussions.microsoft.com> wrote in message
> news:0910EBF4-269B-41C4-9763-91DD66362BFF@microsoft.com...
>>
>> Hello:
>>
>> Are WRITE_REGISTER_UCHAR and
>> WRITE_PORT_UCHAR identical ?
>>
>
> Short answer: No.
>
> Long answer:
> WRITE_PORT_UCHAR is designed to access to I/O port. WRITE_REGISTER_XXX is
> memory dereferencing with memory barrier on some platforms.
>
> On ISA buses, WRITE_PORT_UCHAR will driver the IOW pin. WRITE_REGISTER_XXX
> will driver the SMEMW pin (8-bit) or MEMW (16-bit).
>
> On PCI buses WRITE_PORT_XXX generates I/O Write CMD cycle,
> WRITE_REGISTER_XXX generates the memory-write CMD cycle.
>
>
>> If no when each of the should be used ?
>
> For I/O port access, use WRITE_PORT_UCHAR. For memory-mapped register, use
> the other.
>
>>
>> I need to write to 0x278( known as data register of LPT1 )
>>
>> and wondering which is the best ?
>
> Use WRITE_REGISTER_UCHAR, you have no choice.
>
>>
>>
>> thank you,
>
> You are welcome.
>
>> dave
>>
>>
>
> --
> Calvin Guan (Windows DDK MVP)
> NetXtreme Longhorn Miniport Prime
> Broadcom Corp. www.broadcom.com
>



Re: WRITE_REGISTER_UCHAR WRITE_PORT_UCHAR by dave

dave
Mon Sep 12 12:18:03 CDT 2005

Doron,

Is there way to find out if i/p is already being assigned ?

What if i access this i/p using not pnp driver ?

thank you, dave

"Doron Holan [MS]" wrote:

> dave,
>
> unless you are assigned this i/o resource by pnp, you cannot use *ANY*
> function to access the port itself. If it is not assigned to you, you don't
> own it and you are not allowed to touch it.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
> news:OZb3lH3tFHA.3424@tk2msftngp13.phx.gbl...
> > "dave" <dave@discussions.microsoft.com> wrote in message
> > news:0910EBF4-269B-41C4-9763-91DD66362BFF@microsoft.com...
> >>
> >> Hello:
> >>
> >> Are WRITE_REGISTER_UCHAR and
> >> WRITE_PORT_UCHAR identical ?
> >>
> >
> > Short answer: No.
> >
> > Long answer:
> > WRITE_PORT_UCHAR is designed to access to I/O port. WRITE_REGISTER_XXX is
> > memory dereferencing with memory barrier on some platforms.
> >
> > On ISA buses, WRITE_PORT_UCHAR will driver the IOW pin. WRITE_REGISTER_XXX
> > will driver the SMEMW pin (8-bit) or MEMW (16-bit).
> >
> > On PCI buses WRITE_PORT_XXX generates I/O Write CMD cycle,
> > WRITE_REGISTER_XXX generates the memory-write CMD cycle.
> >
> >
> >> If no when each of the should be used ?
> >
> > For I/O port access, use WRITE_PORT_UCHAR. For memory-mapped register, use
> > the other.
> >
> >>
> >> I need to write to 0x278( known as data register of LPT1 )
> >>
> >> and wondering which is the best ?
> >
> > Use WRITE_REGISTER_UCHAR, you have no choice.
> >
> >>
> >>
> >> thank you,
> >
> > You are welcome.
> >
> >> dave
> >>
> >>
> >
> > --
> > Calvin Guan (Windows DDK MVP)
> > NetXtreme Longhorn Miniport Prime
> > Broadcom Corp. www.broadcom.com
> >
>
>
>

Re: WRITE_REGISTER_UCHAR WRITE_PORT_UCHAR by Doron

Doron
Tue Sep 13 00:50:32 CDT 2005

no, there is no way to ask if the port has been assigned to another device.
a non pnp driver does not consume hardware, you must write a pnp driver.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"dave" <dave@discussions.microsoft.com> wrote in message
news:44BB5334-210D-41D4-B996-29CA0D9D6E2D@microsoft.com...
> Doron,
>
> Is there way to find out if i/p is already being assigned ?
>
> What if i access this i/p using not pnp driver ?
>
> thank you, dave
>
> "Doron Holan [MS]" wrote:
>
>> dave,
>>
>> unless you are assigned this i/o resource by pnp, you cannot use *ANY*
>> function to access the port itself. If it is not assigned to you, you
>> don't
>> own it and you are not allowed to touch it.
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>> "Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
>> news:OZb3lH3tFHA.3424@tk2msftngp13.phx.gbl...
>> > "dave" <dave@discussions.microsoft.com> wrote in message
>> > news:0910EBF4-269B-41C4-9763-91DD66362BFF@microsoft.com...
>> >>
>> >> Hello:
>> >>
>> >> Are WRITE_REGISTER_UCHAR and
>> >> WRITE_PORT_UCHAR identical ?
>> >>
>> >
>> > Short answer: No.
>> >
>> > Long answer:
>> > WRITE_PORT_UCHAR is designed to access to I/O port. WRITE_REGISTER_XXX
>> > is
>> > memory dereferencing with memory barrier on some platforms.
>> >
>> > On ISA buses, WRITE_PORT_UCHAR will driver the IOW pin.
>> > WRITE_REGISTER_XXX
>> > will driver the SMEMW pin (8-bit) or MEMW (16-bit).
>> >
>> > On PCI buses WRITE_PORT_XXX generates I/O Write CMD cycle,
>> > WRITE_REGISTER_XXX generates the memory-write CMD cycle.
>> >
>> >
>> >> If no when each of the should be used ?
>> >
>> > For I/O port access, use WRITE_PORT_UCHAR. For memory-mapped register,
>> > use
>> > the other.
>> >
>> >>
>> >> I need to write to 0x278( known as data register of LPT1 )
>> >>
>> >> and wondering which is the best ?
>> >
>> > Use WRITE_REGISTER_UCHAR, you have no choice.
>> >
>> >>
>> >>
>> >> thank you,
>> >
>> > You are welcome.
>> >
>> >> dave
>> >>
>> >>
>> >
>> > --
>> > Calvin Guan (Windows DDK MVP)
>> > NetXtreme Longhorn Miniport Prime
>> > Broadcom Corp. www.broadcom.com
>> >
>>
>>
>>



Re: WRITE_REGISTER_UCHAR WRITE_PORT_UCHAR by Calvin

Calvin
Tue Sep 13 00:58:46 CDT 2005

I hope I could put "The one just won a million dollars":))))

--
Calvin Guan (Windows DDK MVP)
NetXtreme Longhorn Miniport Prime
Broadcom Corp. www.broadcom.com

"Vipin" <Vipin@nospam.com> wrote in message
news:OKV5B35tFHA.3068@TK2MSFTNGP14.phx.gbl...
> Calvin,
> One thing I noticed, your designation keeps changing every week!
> What's next :)
>
> Cheers
> Vipin
>
> "Calvin Guan" <hguan@nospam.broadcom.com> wrote in message
> news:OZb3lH3tFHA.3424@tk2msftngp13.phx.gbl...
>> "dave" <dave@discussions.microsoft.com> wrote in message
>> news:0910EBF4-269B-41C4-9763-91DD66362BFF@microsoft.com...
>>>
>>> Hello:
>>>
>>> Are WRITE_REGISTER_UCHAR and
>>> WRITE_PORT_UCHAR identical ?
>>>
>>
>> Short answer: No.
>>
>> Long answer:
>> WRITE_PORT_UCHAR is designed to access to I/O port. WRITE_REGISTER_XXX is
>> memory dereferencing with memory barrier on some platforms.
>>
>> On ISA buses, WRITE_PORT_UCHAR will driver the IOW pin.
>> WRITE_REGISTER_XXX will driver the SMEMW pin (8-bit) or MEMW (16-bit).
>>
>> On PCI buses WRITE_PORT_XXX generates I/O Write CMD cycle,
>> WRITE_REGISTER_XXX generates the memory-write CMD cycle.
>>
>>
>>> If no when each of the should be used ?
>>
>> For I/O port access, use WRITE_PORT_UCHAR. For memory-mapped register,
>> use the other.
>>
>>>
>>> I need to write to 0x278( known as data register of LPT1 )
>>>
>>> and wondering which is the best ?
>>
>> Use WRITE_REGISTER_UCHAR, you have no choice.
>>
>>>
>>>
>>> thank you,
>>
>> You are welcome.
>>
>>> dave
>>>
>>>
>>
>> --
>> Calvin Guan (Windows DDK MVP)
>> NetXtreme Longhorn Miniport Prime
>> Broadcom Corp. www.broadcom.com
>>
>
>



Re: WRITE_REGISTER_UCHAR WRITE_PORT_UCHAR by Tim

Tim
Thu Sep 15 00:41:03 CDT 2005

"Calvin Guan" <hguan@nospam.broadcom.com> wrote:
>
>"dave" <dave@discussions.microsoft.com> wrote:
>>
>> Hello:
>>
>> Are WRITE_REGISTER_UCHAR and
>> WRITE_PORT_UCHAR identical ?
>
>Short answer: No.
>
>Long answer:
>WRITE_PORT_UCHAR is designed to access to I/O port. WRITE_REGISTER_XXX is
>memory dereferencing with memory barrier on some platforms.
>
>On ISA buses, WRITE_PORT_UCHAR will driver the IOW pin. WRITE_REGISTER_XXX
>will driver the SMEMW pin (8-bit) or MEMW (16-bit).
>
>On PCI buses WRITE_PORT_XXX generates I/O Write CMD cycle,
>WRITE_REGISTER_XXX generates the memory-write CMD cycle.

This is right.

>> If no when each of the should be used ?
>
>For I/O port access, use WRITE_PORT_UCHAR. For memory-mapped register, use
>the other.

This is right.

>> I need to write to 0x278( known as data register of LPT1 )
>>
>> and wondering which is the best ?
>
>Use WRITE_REGISTER_UCHAR, you have no choice.

Whoops, here you got it exactly backwards. 0x278 is an I/O port. He needs
WRITE_PORT_UCHAR.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: WRITE_REGISTER_UCHAR WRITE_PORT_UCHAR by Calvin

Calvin
Thu Sep 15 03:00:35 CDT 2005

Sharp eyes, Tim-:)

--
Calvin Guan (Windows DDK MVP)
NetXtreme Longhorn Miniport Prime
Broadcom Corp. www.broadcom.com

"Tim Roberts" <timr@probo.com> wrote in message
news:292ii1d3m3a1bn2i1nuqg3gqeqbd4lf2vu@4ax.com...
> "Calvin Guan" <hguan@nospam.broadcom.com> wrote:
>>
>>"dave" <dave@discussions.microsoft.com> wrote:
>>>
>>> Hello:
>>>
>>> Are WRITE_REGISTER_UCHAR and
>>> WRITE_PORT_UCHAR identical ?
>>
>>Short answer: No.
>>
>>Long answer:
>>WRITE_PORT_UCHAR is designed to access to I/O port. WRITE_REGISTER_XXX is
>>memory dereferencing with memory barrier on some platforms.
>>
>>On ISA buses, WRITE_PORT_UCHAR will driver the IOW pin. WRITE_REGISTER_XXX
>>will driver the SMEMW pin (8-bit) or MEMW (16-bit).
>>
>>On PCI buses WRITE_PORT_XXX generates I/O Write CMD cycle,
>>WRITE_REGISTER_XXX generates the memory-write CMD cycle.
>
> This is right.
>
>>> If no when each of the should be used ?
>>
>>For I/O port access, use WRITE_PORT_UCHAR. For memory-mapped register, use
>>the other.
>
> This is right.
>
>>> I need to write to 0x278( known as data register of LPT1 )
>>>
>>> and wondering which is the best ?
>>
>>Use WRITE_REGISTER_UCHAR, you have no choice.
>
> Whoops, here you got it exactly backwards. 0x278 is an I/O port. He
> needs
> WRITE_PORT_UCHAR.
> --
> - Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.