home *** CD-ROM | disk | FTP | other *** search
- Path: hai.hiMolde.no!espen
- From: espen@hai.hiMolde.no (Espen Berntsen)
- Newsgroups: comp.sys.amiga.programmer
- Subject: SAS-C and Interrupts
- Date: 6 Feb 1996 18:47:35 GMT
- Organization: Molde College, Department of Computer Science
- Message-ID: <4f87o7$p1a@ulke.hiMolde.no>
- NNTP-Posting-Host: hai.himolde.no
- X-Newsreader: TIN [version 1.2 PL2]
-
- How do you call a C routine from an interrupt in sas-c??
-
-
- Whenever I try to do it, the machine locks up.
-
- the C routine looks like this:
-
- ----- cut ---
- LONG Counter = 0;
-
- void VBLRoutine(void)
- {
- Counter++;
- }
- ----- cut -----
-
- and the assembly vertical blank interrupt like this :
-
- ----- cut -----
- ; some includes, don't remember precicely
-
- XDEF _VBLRoutine
- VertBlankServer
- jsr _VBLRoutine
- moveq #0,d0
- rts
- ----- cut -----
-
- Now, when I don't call the C routine, but increase the Counter by using
- (a1), everything is fine. But when I call the C routine. the machine just
- locks.
-
- Now, the VBL is not supposed to just add a counter, it is just a test :-)
-
- --
-
- Espen.Berntsen@hiMolde.no <> irc: Nameless <> http://www.himolde.no/~espen
- ===========================================================================
- Fighting for peace is like fucking for virginity.
-