Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Codewarrior - problem with _outp
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adrian Barrett  
View profile  
 More options Apr 4 2001, 12:48 pm
Newsgroups: comp.os.ms-windows.programmer.misc
From: "Adrian Barrett" <a.r.w.barr...@ic.ac.uk>
Date: Wed, 4 Apr 2001 17:42:07 +0100
Local: Wed, Apr 4 2001 12:42 pm
Subject: Codewarrior - problem with _outp
Hope someone can help with this...

I'm trying to access the printer port using the following code:

#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

#define PRINTER_PORT 0x0378

int main(int argc, char ** argv) {
  unsigned long state;

  state = _inpd( PRINTER_PORT );
  printf("Current state = %x\n", state);

  _outpd( PRINTER_PORT, 0xFFFFFFFF);
  state = _inpd( PRINTER_PORT );
  printf("Current state = %x\n", state);

  _outpd( PRINTER_PORT, 0x00000000);
  state = _inpd( PRINTER_PORT );
  printf("Current state = %x\n", state);

  return 1;

}

This works fine under MSVC++ but doesn't do anything under CodeWarrior.
I've tried including the conio.win.c source file but it doesn't help.  I'm
using Codewarrior Professional Edition with Release 5.3 update installed.

I'd really appreciate some help!  Thanks...

--
Adrian Barrett
PhD Student
Mechatronics in Medicine Laboratory
Mechanical Engineering Department
Imperial College
London SW7 2AZ

Tel: ++44 (0) 207 589 5111 ext 57068


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »