Solved

_outpw

Posted on 1998-10-22
4
251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

691 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