Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to use _outp() function

Status
Not open for further replies.

hmsheng

Full Member level 4
Joined
Dec 17, 2003
Messages
219
Helped
26
Reputation
52
Reaction score
10
Trophy points
1,298
Location
China
Activity points
1,556
_outp how to use

My COM1 I/O port is 0x000003F8-0x000003FF. When I use
_outp(0x000003F8, 0x00)
to write a byte to COM1, error occurs (see attached file).
Can anyone tell me why.
 

Windows XP and 2000 do not allow you to write directly to the hardware. You have to do this through drivers.
What you can do is visit 'h**p://www.beyondlogic.org' and download a program called 'Port Talk'.
Using this program, you can side step windows and write directly to the hardware.
 

This is a dos function, and it can be used effectively in dos or windows98, but win2000 or winxp don't support it. I have an example to read or write Parallel interface.
 

You can´t write/read directly to/from the ports on W2K or XP, it must be done trough a device driver ....

Take a look for dlPortIO library.
 

oup() is just a wrap function that uses the inp outp intel86 instructions to access the IO space ,. This processor has two address spaces one memory and one IO .. so it uses separate instructions to access one or the other space .But in modern OPERATING OS .. when a program tries to run this type of instructions .There IS AN EXCCEPTION ! is like an INTERRUPT .. and the OS recovers control of the APPLICATION . and it now detects that you want to access a HARWARE RESOURCE "ON YOUR OWN"
Well this is not ALLOWED .. you shoud do it by the OS defined method .. which is a DRIVER .. all this is supposed to be FOR SECURITY REASONS .. so USERS APPLICATIONS don't open BACK DOORS to hack the system ..
Is evident that in this way you can enable or disable the drivers ..
In your case you don't have them .!
The message that you got is WINDOWS saying .. OK I SHUT YOU DOWN for
indecent EXPOSURE !.. but the explanation is what i said before!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top