Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - portoutw() write a word to an i/o port http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 portoutw()          Write a word to an I/O port
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   proc portoutw extern
   param value uint uPortAddress, ;
         value uint uPortData

 Arguments
   uPortAddress is an output port number.
   uPortData is the word to be output.

 Return
   None.

 Description
   The portoutw() procedure writes the data word passed in uPortData to the
   specified I/O port.

   Incorrect use of this function may cause unpredictable results or loss of
   data.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   proc Test_portoutw
   vardef
      uint uPort
      uint uWord
   enddef
   uPort := 0x0                         // serial port 1
   uWord := 'C'
   portoutw( uPort, uWord )
   ? "Word written to port", istr( uPort ), "is", istr( uWord )
   endproc

   proc main
   Test_portoutw()
   endproc

See Also: I/O port address table portoutb()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson