Re: Read and Write I/O port

From: Appert, Kevin <kevin.appert_at_lmco.com>
Date: Thu, 21 Mar 2002 09:33:07 -0800

I believe SwiftForth ships with a driver of the sort Leon mentioned and a
printer parallel port example and instructions to show how to use it.

> -----Original Message-----
> From: Leon Wagner [SMTP:leon_at_forth.com]
> Sent: Thursday, March 21, 2002 9:27 AM
> To: sftalk_at_forth.com
> Subject: [sftalk] Re: Read and Write I/O port
>
>
> There's no protection on Win95/98/etc. Only on NT and 2000 and you can
> get
> around that with the "GIVEIO" driver which is freely available.
>
> > -----Original Message-----
> > From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com]On Behalf
> > Of Gene LeFave
> > Sent: Thursday, March 21, 2002 9:16
> > To: sftalk_at_forth.com
> > Subject: [sftalk] Re: Read and Write I/O port
> >
> >
> > Leon,
> >
> > I may be wrong, but doesn't a windows task run in
> > protected I/O space, and only a program running at the
> > driver level has access to the ports?
> >
> > I'm fairly sure that serial and parallel ports are
> > "virtualized" by the respective device drivers, and
> > tasks can't really access them.
> >
> >
> > Gene
> >
> >
> >
> > From: "Leon Wagner" <leon_at_forth.com>
> > To: <sftalk_at_forth.com>
> > Subject: [sftalk] Re: Read and Write I/O port
> > Date sent: Thu, 21 Mar 2002 08:06:25 -0800
> > Send reply to: sftalk_at_forth.com
> >
> > >
> > > Here's the whole set:
> > >
> > > CODE PC@ ( addr -- char )
> > > EBX EDX MOV EAX EAX SUB EDX AL IN
> > > EAX EBX MOV RET END-CODE
> > >
> > > CODE PC! ( char addr -- )
> > > EBX EDX MOV 0 [EBP] EAX MOV AL EDX OUT
> > > 4 [EBP] EBX MOV 8 # EBP ADD
> > > RET END-CODE
> > >
> > > CODE PW@ ( addr -- u )
> > > EBX EDX MOV EAX EAX SUB EDX AX IN
> > > EAX EBX MOV RET END-CODE
> > >
> > > CODE PW! ( u addr -- )
> > > EBX EDX MOV 0 [EBP] EAX MOV AX EDX OUT
> > > 4 [EBP] EBX MOV 8 # EBP ADD
> > > RET END-CODE
> > >
> > > CODE P@ ( addr -- u )
> > > EBX EDX MOV EDX EAX IN
> > > EAX EBX MOV RET END-CODE
> > >
> > > CODE P! ( u addr -- )
> > > EBX EDX MOV 0 [EBP] EAX MOV EAX EDX OUT
> > > 4 [EBP] EBX MOV 8 # EBP ADD
> > > RET END-CODE
> > >
> > > > -----Original Message-----
> > > > From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com]On
> Behalf
> > > > Of Schmitt Louis Jean-Pierre
> > > > Sent: Thursday, March 21, 2002 6:41
> > > > To: sftalk_at_forth.com
> > > > Subject: [sftalk] Read and Write I/O port
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Can you help me please,
> > > > I do not manage to correctly program the accesses to the I/O
> > ports with the
> > > > instructions IN and OUT of the machine language in mode 32 Bits
> > > >
> > > > Thank you for your assistance.
> > > >
> > > > Louis Jean-Pierre
> > > >
> > > > Mi old definitions
> > > >
> > > > CODE PC@ ( adrport# --- octet ) \ Read an 8 bits I/O Port
> > > > DX POP
> > > > 0 AL IN
> > > > AH AH SUB
> > > > AX PUSH
> > > > ? ? ?
> > > > RET
> > > > END-CODE
> > > >
> > > >
> > > > CODE P@ ( adrport# --- 16Bitsword ) \ Read an 16 Bits I/O port
> > > > DX POP
> > > > 0 AX IN
> > > > AX PUSH
> > > > ? ? ?
> > > > RET
> > > > END-CODE
> > > >
> > > > CODE PC! ( octet adrport# --- ) \ Write an octet to an I/O port
> > > > DX POP
> > > > AX POP
> > > > 0 AL OUT
> > > > ? ? ?
> > > > RET
> > > > END-CODE
> > > >
> > > >
> > > > CODE P! ( 16Bitsword port# --- ) \ Write an 16 Bits value to an I/O
> port
> > > > DX POP
> > > > AX POP
> > > > 0 AX OUT
> > > > ? ? ?
> > > > RET
> > > > END-CODE
> > > >
> > > >
> ----------------------------------------------------------------------
> > > > sftalk_at_forth.com The SwiftForth programming discussion email
> list
> > > > To unsubscribe, send subject "unsubscribe sftalk" to
> listar_at_forth.com
> > > > For help with listar commands, send subject "help" to
> listar_at_forth.com
> > > > Archives are located at http://www.forth.com/sftalk -- check them
> out!
> > > > Search the archives! Visit http://www.forth.com/search for
> details.
> > > >
> > > ----------------------------------------------------------------------
> > > sftalk_at_forth.com The SwiftForth programming discussion email list
> > > To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
> > > For help with listar commands, send subject "help" to listar_at_forth.com
> > > Archives are located at http://www.forth.com/sftalk -- check them out!
> > > Search the archives! Visit http://www.forth.com/search for details.
> > >
> >
> >
> > ----------------------------------------------------------------------
> > sftalk_at_forth.com The SwiftForth programming discussion email list
> > To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
> > For help with listar commands, send subject "help" to listar_at_forth.com
> > Archives are located at http://www.forth.com/sftalk -- check them out!
> > Search the archives! Visit http://www.forth.com/search for details.
> >
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
> For help with listar commands, send subject "help" to listar_at_forth.com
> Archives are located at http://www.forth.com/sftalk -- check them out!
> Search the archives! Visit http://www.forth.com/search for details.
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.
Received on Thu Mar 21 2002 - 09:34:41 PST


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 09-Feb-2012. Archive updated nightly.