Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!cmcl2!philabs!mcnc!rti-sel!sas!toebes From: toebes@sas.UUCP Newsgroups: net.micro.amiga Subject: Re: Manx C and interrupt handlers Message-ID: <124@sas.UUCP> Date: Mon, 21-Jul-86 09:35:55 EDT Article-I.D.: sas.124 Posted: Mon Jul 21 09:35:55 1986 Date-Received: Tue, 22-Jul-86 09:02:28 EDT References: <431@vger.UUCP> Organization: SAS Institute Inc. Cary, NC Lines: 29 Keywords: LATTICE, Interrupts, Stack Checking Summary: POPCLI under Lattice 3.04 works In article <431@vger.UUCP>, waterfal@vger.UUCP writes: > I am having a tough time trying to get the input device > to work properly. The C code in the ROM Manual v1.1 will > not work properly under Manx without modifications. I was > able to get it to work properly by saving all the registers > in the assembly language piece before calling the handler. Now > the only problem is making ROM calls from within the interrupt > handler. The original code has a Forbid() and Permit() placed > within the handler, this invariably causes the dreaded red box > to appear. Has anyone been able to make the code work properly? > > > Thank > Douglas Waterfall I typed in and ran the input.device example using Lattice 3.04 and encountered similar problems whenever I did not disable stack checking. However, I suspect that part of the problem may be in using the small data option. The interrupt routine wants to share data with the main code and as such needs the base register that points to the massive data area. Since the handler code runs from (conceptually) another task it will not have ready access to the registers of the original task which installed it. Compiling with a large data model should relax this requirement. After a little work I was able to rework the example (actually rewrite is the word) into the POPCLI program that also blanks the screen. If interested the source is available on the Software Distillery Bulletin Board: (919)471-6436 -- John A. Toebes, VIII usenet:..mcnc!rti-sel!sas!toebes USnail: 235 Trillingham Ln, Cary NC 27511 BBS:(919)471-6436