www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/22/16:45:23

Message-ID: <33D519FB.499A@polbox.com>
Date: Tue, 22 Jul 1997 22:37:15 +0200
From: Tomasz Chojnacki <tcho AT polbox DOT com>
Reply-To: tcho AT polbox DOT com
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: How to outw ?

Hi all:

I have the following problem:
Why can't I compile the below code:

#include <stdio.h>
void main()
{
  __asm__ __volatile__
    ("
    outw %ax, $0x2100
    ");
}

after "gcc -o test test.c" I get the message:
E:/DJGPP/TMP\cca00041: Assembler messages:
E:/DJGPP/TMP\cca00041:13: Error: operands given don't match any known
386 instru
ction

while the below code compiles OK:

#include <stdio.h>
void main()
{
  __asm__ __volatile__
    ("
    outw %ax, $0x21
    ");
}

Is there any way to send a word to the I/O port from inline assembly ?
I use gcc v2.6.3.

- Raw text -


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