Re: [uCsimm] Assembler code problems with uCsimm C compiler

From: Roberto Lulli (
Date: Mon Nov 27 2000 - 13:13:58 EST

----- Original Message -----
From: Paugam Luc <>
To: <>
Cc: 'uCsimm Mailing-List' <>
Sent: Monday, November 27, 2000 2:31 PM
Subject: RE: [uCsimm] Assembler code problems with uCsimm C compiler

> >Roberto Lulli [] wrote
> >
> >asm("ORI.W #$0700,SR");
> >
> >asm("ANDI.W #$F0FF,SR");
> >
> prefer the following syntax (no $ sign for hexa, all registers named with
> % prefix):
> asm volatile ("ori.w #0x0700,%sr");
> asm volatile ("andi.w #0xF0FF,%sr);
> Hope this help
> Luc

Hi Luc,
            yr. solution worked very well but as soon as I ran my program I
experienced a new problem :-((
As soon as my program reach the first asm line (the one that disables the
interrupt) my uCLinux system crashed and printed at console the string
"privilege violation" along with the dump of the Address and Data register.
I red on the MC68000 Users Manual that only a part of the SR register (the
last 5 bits) is available in the users mode, and the interrupt control flags
are not among these five bits.
Do you know the procedure to switch between the user mode and the supervisor
one in order to set the SR register without crash the system?



This message resent by the list server

This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:39 EST