Solved

Code to out put to a port

Posted on 1998-11-05
6
174 Views
Last Modified: 2010-05-18
How do you output data to a serial port??
0
Comment
Question by:srapsey
6 Comments
 
LVL 86

Expert Comment

by:jkr
Comment Utility
What OS are you using?
0
 
LVL 1

Expert Comment

by:MatthewL
Comment Utility
On an IBM PC Compatiblble, you can use int 14H.

If you want info on the interrupt, I can post it for you.

Matt
0
 
LVL 10

Expert Comment

by:viktornet
Comment Utility
use assembler...

void main()
{
  asm{
    out reg, reg
    //rest of asm code...
  }
}

Note: Is a register

Cheers,
Viktor
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 10

Expert Comment

by:viktornet
Comment Utility
use assembler...

void main()
{
  asm{
    out reg, reg
    //rest of asm code...
  }
}

Note: reg is a register

Cheers,
Viktor
0
 
LVL 10

Expert Comment

by:viktornet
Comment Utility
Sorry for double posting....
0
 
LVL 2

Accepted Solution

by:
helver earned 50 total points
Comment Utility
It's really OS dependent.  If you're using Linux you can open /dev/ttyS? for writing and that should do it... Then just treat it as a regular file descriptor or stream.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now