delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/30/10:19:07

Date: Thu, 30 Nov 1995 12:11:25 +0100 (MET)
From: Werner Drescher <k1950 AT fh-sw DOT de>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: assembler

Hello

I've some question about assmbler code in a normal C-function.
The function is like that :

void dma_smp(void)
{
 asm ( cli
       movb 0x308,%dx 
       ...
      );
}
The first question is : is the Syntas asm(   ); correct or must I use asm 
("   ");

The next is  I want to write more than one instruction , but when I use 
";" to seperate them I get a error-message

I use the instruction movb 0x308,%dx and get a segmentation violent error 
why ?

I think the best you can do for me is to write me a short assemble-program
which shows how it works within gnu c 

thanks for all who will help me 

- Raw text -


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