Article View: comp.sys.atari.st
Article #26269Re: receiving interrupts in an user prog - (nf)
From: csch
Date: Fri, 03 Apr 1987 22:32
Date: Fri, 03 Apr 1987 22:32
27 lines
1577 bytes
1577 bytes
I think, it has something to do with how the 68000 wants her
exception-handlers to terminate.
Your (almost any) C-compiler ends functions with a RTS instruction,
but exception-handlers MUST take care of register-contents, stack-
pointer (usp) and have to return with RTE (return from exception).
On the ST you may ONLY use the VBL-IRQ directly from C. Functions
queued in the VBL-QUEUE (pointer to is $456 (points to $4ce))
may simply return with a RTS instruction.
If you want to use OTHER IRQ vectors you have to add a simple
assembly-language subroutine like
movem.l d0-a6, -(a7) * save registers
move.l a7, sp_save * save stack-pointer
jsr c_function * call C function
move.l sp_save, a7 * restore stack-pointer
movem.l (a7)+, d0-a6 * get registers back from supervisor-stack
rte * return from exception
NOTE!!!!! This is ONLY a SHORT example how you can START doing that stuff!!
==== =======
Rgds.
Clemens (csch@tub.uucp = {unido | pyramid} ! tub ! csch)
Technical Details
Message-ID:
<49500015@tub.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!seismo!mcvax!unido!tub!cschReferences:
<530@dutinfd.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!seismo!mcvax!unido!tub!csch From: csch@tub.UUCP Newsgroups: comp.sys.atari.st Subject: Re: receiving interrupts in an user prog - (nf) Message-ID: <49500015@tub.UUCP> Date: Fri, 3-Apr-87 17:32:00 EST Article-I.D.: tub.49500015 Posted: Fri Apr 3 17:32:00 1987 Date-Received: Wed, 15-Apr-87 00:43:20 EST References: <530@dutinfd.UUCP> Lines: 27 Nf-ID: #R:dutinfd:-53000:tub:49500015:000:988 Nf-From: tub!csch Apr 3 23:32:00 1987