home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 1
/
FishNMoreVol1.bin
/
more
/
system
/
idev
/
v_i.asm
< prev
Wrap
Assembly Source File
|
1988-01-02
|
1KB
|
41 lines
**
** FILE: vect_intfc.asm
** PROGRAM: idev
** VERSION: 1.0
**
** DESCRIPTIPON:
** This file contains idev_intfc(), the assembly language
** interface for the vect() function in idev.c. It calls
** the vectnum-th library vector of the device associated
** with the IORequest. The first vector is specified by
** vectnum 1.
**
** The return value from the called vector is passed on
** as the return value of vect_intfc().
**
** HISTORY:
** 26-Aug-87 Original Version (Ed Puckett)
**
INCLUDE "exec/types.i"
INCLUDE "exec/libraries.i"
INCLUDE "exec/io.i"
XDEF _vect_intfc ; int vect_intfc (req, vectnum)
; struct IORequest *req;
; int vectnum; /* positive */
_vect_intfc:
movea.l 4(sp),a1 ; a1:req
move.l 8(sp),d0 ; d0:vectnum
movem.l d2-d7/a2-a6,-(sp) ; save practically everything for safety
muls #LIB_VECTSIZE,d0 ; d0:-offset
neg.l d0 ; d0:offset
movea.l IO_DEVICE(a1),a6
jsr 0(a6,d0) ; call the vector
movem.l (sp)+,d2-d7/a2-a6 ; restore protected registers
rts ; return d0 as it came back from the call
END