Solved

_outpw

Posted on 1998-10-22
4
241 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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.

770 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