TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: STEVEN HANCOCK
from: DARIN MCBRIDE
date: 1998-01-12 09:32:00
subject: comm routunes

> #define inp(x) (*((u_char *)x))
> 
> #define outp(x,y) (*((u_char *)x) = ((u_char)y)
 SH> No, inp and outp handle hardware ports (not the same as COM or LPT 
ports, 
 SH> although COM and LPT ports can be accessed with 
 SH> hardware ports).  Your macros 
 SH> above don't do that, they handle memory addresses.  I 
 SH> guess a hardware port 
 SH> could SORT OF be considered memory for simplicity's 
 SH> sake, but if it IS memory 
 SH> it is not addressable by the processor, which is why 
 SH> you need inp and outp to 
 SH> access it.
Er, they are "memory addresses" (mapped).  What do you think COM and LPT 
ports are?  Hardware ports!
---
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.