Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello, i don't know how to use inp and out assembler intructions.

Status
Not open for further replies.

astrud

Programmer
Feb 29, 2000
1
0
0
MX
I need specific information
 
For reading IO ports:<br>
<br>
in al, 21h ;get byte from port 21h<br>
<br>
The above only works with IO addresses 0-FFh<br>
Else use this:<br>
<br>
mov dx, 3fdh ;put port address in DX<br>
in al, dx ;then read from port<br>
<br>
To write to an IO port do the opposite:<br>
<br>
mov dx, 3fdh ;put port address in DX<br>
out dx, al ;output byte in al to 3fdh<br>
<br>
You can also do two byte reads by using AX instead of AL<br>
I hope this helps you out.... <p> <br><a href=mailto:Kim_Christensen@telus.net>Kim_Christensen@telus.net</a><br><a href= Page</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top