www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/08/06:37:58

Message-ID: <357BBF60.63295E7D@post.comstar.ru>
Date: Mon, 08 Jun 1998 14:39:28 +0400
From: Dim Zegebart <zager AT post DOT comstar DOT ru>
Reply-To: zager AT post DOT comstar DOT ru
Organization: Comstar Ltd.
MIME-Version: 1.0
To: aYk <yorka AT dlc DOT fi>
CC: djgpp AT delorie DOT com
Subject: Re: AT&T assembler
References: <bWLoegW7sFse-pn2-iuli5Rxd4EUT AT portF03 DOT Generation DOT NET> <6ld6hl$bk0 AT dfw-ixnews4 DOT ix DOT netcom DOT com> <bWLoegW7sFse-pn2-8PpEYeQWERrR AT portD35 DOT Generation DOT NET> <357bb477 DOT 2127675 AT news DOT dlc DOT fi>


aYk wrote:

> You mean inportb(). You have to specify the transfer size. And you
> need to include dos.h instead of pc.h if I remember correctly.
>
> - aYk -


From libc reference :

/*--------------------------
   #include <pc.h>

     unsigned char inportb(unsigned short _port);

Description
-----------

Read a single 8-bit I/O port.

This function is provided as an inline assembler macro, and will be
optimized down to a single opcode when you optimize your program.
--------------------------*/


IMHO, this is a preferable way to do port I/O in C programm.

--
____ ____
|   \   /   Dim Zegebart
____/____

Moscow Russia
WWW - http://www.geocities.com/siliconvalley/pines/7817
DZcomm - comm library for Allegro
Palantir - multitasking kernel for Allegro (based on PDMLWP)


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019