Solved

_outpw

Posted on 1998-10-22
4
238 Views
Last Modified: 2008-02-01
I want to write on two 8 bit ports (like parallel) at the same time, one at address 0x600 and the other at address 0x601. I think to use _outpw(0x600, value). Is it right?
In what order is "value" copied?
0
Comment
Question by:css
  • 2
4 Comments
 
LVL 3

Expert Comment

by:arnond
ID: 1175736
It should work, the order depends on your code, which -outputw() is written first.
0
 

Author Comment

by:css
ID: 1175737
I would like to find somebody who tryied that!!!
0
 
LVL 1

Accepted Solution

by:
bculver earned 300 total points
ID: 1175738
The answer is Yes... doing an outpw(0x600,val) to an 8 bit device will do two sucessive writes, First write will be the low byte of val to address 0x600 the second write will be the hi byte of val to address 0x601. (Graphics programmers use this technic all the time to control the graphics controller chip.)

basically the i/o device sets the processers BS8 or BS16 pins to state its size 8 or 16 bit. the processer will automatically handle the rest using its BHE / BHL signals. If you want to know more details refer to a microprocessor manual and how the BS8/BS16 pins work and how the BHE and BHL signals are used as address line 0 on 8 bit devices.
 

0
 
LVL 3

Expert Comment

by:arnond
ID: 1175739
As I said, it works.
( I think the points should be mine...)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now