Article View: comp.sys.atari.st
Article #34566Interrupts, Interrupts, Interrupts.
From: JOHN ZAFIRIS
Date: Tue, 18 Oct 1988 02:38
Date: Tue, 18 Oct 1988 02:38
45 lines
3152 bytes
3152 bytes
Hello all. I have run accross a bit of a problem in shutting off
interrupts on the ST and surviving when I turn them back on. The
program I am writing depends on some VERY tight timing and whenever
something interrupts the cpu, the timing goes "off" and I get garbage
for data.
The routine is entirely in machine code. I shut off all interrupts by:
move.w #$2700,sr. This works great and my program does its thing without
any problem but when turning the interrupts on again by: move.w #$2000,sr
or move.w #$2300,sr and returning to the shell, the machine freezes up.
No mouse, no keyboard response, no blinking cursor.
Since this did not work, I decided to just divert all the interrupt vectors:
IPL2, IPL4, and IPL6 as well as the 192 vectors starting at $100. I pointed
them to a dummy RTE within my program before running the critical routine and
restored them to their original values before exiting. My routine again worked
flawlessly (I relaxed the timing enough to tolerate this minor exception
processing) but again when returning to the shell, the machine was frozen.
It is interesting to note that this approach actually worked the first few
times I tried it but somehow cripples mouse clicking sometimes when it doesn't
completely freeze the machine.
Since this did not work, I took yet another tack: disable the HBL and the VBL
interupts and handle the rest of the interrupts direcly within the MFP 68901.
I first assumed that the "Software End-of-interrupt" mode was causing trouble
so I had all the interrupts clear registers 8 & 9 (ISRA,ISRB) of the MFP just
before executing RTE. This did not work so I disabled all 16 interrupt sources
within the MFP by clearing registers 4 & 5 and restoring their original values
before exiting: again no go.
Needless to say, I have still to find out what the problem is. I am
contemplating putting a switch on the three 68000 interrupt lines to pull them
all high manually and initiate the routine from a polled port and not have to
find a solution but that is both extreme and dangerous (I only have one ST) not
to mention that it should be unnecessary with the interrupt mask.
HELP...HELP...What the H*LL is going on?!?!?!?!?!
I hope I have overlooked something obvious. If someone sees it please tell me
what it is. I'll practice blushing to be ready for the innevitable.
thanks... ...John
PS. I have also shut off just the VBL (via all routes: semaphore, vector, mask)
but without any luck.
===============================================================================
Do you sometimes get a feeling electronics run solely on soular power???
===============================================================================
Technical Details
Message-ID:
<8810181052.AA28587@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!ucbvax!UICVM.BITNET!U46050Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!ucbvax!UICVM.BITNET!U46050 From: U46050@UICVM.BITNET (JOHN ZAFIRIS) Newsgroups: comp.sys.atari.st Subject: Interrupts, Interrupts, Interrupts. Message-ID: <8810181052.AA28587@ucbvax.Berkeley.EDU> Date: 18 Oct 88 02:38:40 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 45