*---------------------------------------------------------------------- * File Name: except.asm * * Copyright (c) 1994 Sega of America, Inc. All Rights Reserved. * * Author(s): Unni Pillai * Date: 6-03-94 * Description: * * Exception Routines * the only exceptions used by the hardware are:- * level 2 - external interrupts * level 4 - horizontal video interrupts * level 6 - vertical video interrupts (_vbl_int) * * History: * *---------------------------------------------------------------------* section .text nolist include "int.i" ;references used by exception handlers list *-------------------------------------------------------------------- * _dummy: Dummy Interrupt routine (NOP) * * void _dummy( ) *-------------------------------------------------------------------*/ xdef dummy dc.l 0 dummy: bra dummy *-------------------------------------------------------------------- * _hbl_int: Horizontal Blank Interrupt routine (NOP) * * void _hbl_int( ) *-------------------------------------------------------------------*/ xdef hbl_int dc.l 0 hbl_int: rte *-------------------------------------------------------------------- * _vbl_int: Vertical Blank Interrupt (LEVEL 6) * * void _vbl_int( ) * * MODS * name date comments * ---- ----- -------------------------------------------- * UP 05/31/94 routine Read_IO (reads MOUSE/FP6B) * UP 05/31/94 routine MDtoMARS places movement values * into MARS comm regs) *--------------------------------------------------------------------------*/ xdef vbl_int dc.l 0 vbl_int: movem.l d0-d7/a0-a6,-(a7) st FlyBackFlag ;flag VBLANK interrupt happened tst.b mflag beq vbl_intexit jsr Read_IO jsr MDtoMARS move.l PollAddress,a0 jsr (a0) vbl_intexit: movem.l (a7)+,d0-d7/a0-a6 rte *-------------------------------------------------------------------- * _No_Poll: Accessed from within the VBL does nothing * * void _No_Poll( ) * MODS * name date comments * ---- -------- ------------------------------------- * UP 06/18/94 created *---------------------------------------------------------------------- xdef No_Poll dc.l 0 No_Poll: rts