home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!mcsun!sunic!dkuug!imada!news
- From: breese@monet.imada.ou.dk (Bjoern Reese)
- Subject: SetIntVector?
- Message-ID: <1993Jan12.154003.14265@imada.ou.dk>
- Sender: news@imada.ou.dk (USENET News System)
- Organization: Dept. of Math. & Computer Science, Odense University, Denmark
- Date: Tue, 12 Jan 1993 15:40:03 GMT
- Lines: 66
-
- I've been trying to use SetIntVector() but something goes
- wrong. Using SetIntVector() to install my own server works
- just fine, but when I'm about to reinstall the old server
- it goes coma. I've tried debugging and found out that the
- value returned by SetIntVector() is zero, and not a pointer
- to the old server. What did I do wrong?
-
- ;----------------------------------------------------------
- INCLUDE INCLUDE:exec/exec_lib.i
- INCLUDE INCLUDE:exec/nodes.i
- INCLUDE INCLUDE:hardware/intbits.i
- INCLUDE INCLUDE:hardware/custom.i
-
- CALL: MACRO
- jsr _LVO\1(a6)
- ENDM
-
-
- start:
- move.l (_SysBase).w,a6
- CALL Forbid ;Forbid multitasking
- moveq.l #INTB_VERTB,d0
- lea VBlankServer(pc),a1
- CALL SetIntVector ;Install new server
- move.l d0,OldServer
-
- wait btst #6,$bfe001 ;Left mouse buttom?
- bne.s .wait ;Dirty, but so what.
- ;It's just an quick hack.
-
- move.l (_SysBase).w,a6
- moveq.l #INTB_VERTB,d0
- move.l OldServer(pc),a1
- CALL SetIntVector ;Reinstall old server
- CALL Permit ;Permit multitasking
- moveq.l #0,d0
- rts
-
- IntLevel3:
- movem.l d0-d7/a0-a6,-(sp)
- move.w intreqr(a0),d0 ;a0 contains custom base
- and.w intenar(a0),d0
- move.w d0,intreq(a0) ;Clear interrupt request
-
- move.w #$0500,d0 ;Do some fancy color stuff
- loop move.w d0,color(a0)
- dbra d0,.loop
-
- movem.l (sp)+,d0-d7/a0-a6
- rts
-
- OldServer: dc.l 0
-
- VBlankServer:
- dc.l 0,0 ;ln_Succ,ln_Pred
- dc.b 2,0 ;ln_Type,ln_Pri
- dc.l IntName ;ln_Name
- dc.l 0,IntLevel3 ;is_Data,is_Code
-
- IntName:dc.b "name",0
- EVEN
-
- --
-
- Bjoern Reese | Email: breese@imada.ou.dk
- Odense University, Denmark | Voice: +45 65 932 182 (private)
-