home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / gnuc / library / rcs / syscall.s,v < prev    next >
Encoding:
Text File  |  1992-07-04  |  1.5 KB  |  69 lines

  1. head    1.1;
  2. access;
  3. symbols
  4.     version39-41:1.1;
  5. locks;
  6. comment    @ *  @;
  7.  
  8.  
  9. 1.1
  10. date    92.05.14.20.36.14;    author mwild;    state Exp;
  11. branches;
  12. next    ;
  13.  
  14.  
  15. desc
  16. @non-debugging version of syscall()
  17. @
  18.  
  19.  
  20. 1.1
  21. log
  22. @Initial revision
  23. @
  24. text
  25. @/*
  26.  *  This file is part of ixemul.library for the Amiga.
  27.  *  Copyright (C) 1991, 1992  Markus M. Wild
  28.  *
  29.  *  This library is free software; you can redistribute it and/or
  30.  *  modify it under the terms of the GNU Library General Public
  31.  *  License as published by the Free Software Foundation; either
  32.  *  version 2 of the License, or (at your option) any later version.
  33.  *
  34.  *  This library is distributed in the hope that it will be useful,
  35.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  36.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  37.  *  Library General Public License for more details.
  38.  *
  39.  *  You should have received a copy of the GNU Library General Public
  40.  *  License along with this library; if not, write to the Free
  41.  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  42.  *
  43.  *  $Id$
  44.  *
  45.  *  $Log$
  46.  */
  47.  
  48. | this is the library internal function!! 
  49. | there is a similar function in the statically linked part of the library, but
  50. | that one may not use our library base vector
  51.  
  52.     .globl    _syscall
  53.  
  54. _syscall:
  55.     movel    _ixemulbase,a0
  56.     movel    sp@@(4),d0    | get vector number
  57.     addl    #4,d0        | add 4, since we start at offset -30 (first #=1)
  58.     addl    d0,d0
  59.     subl    d0,a0
  60.     addl    d0,d0
  61.     subl    d0,a0
  62.  
  63.     lea    sp@@(8),sp    | advance to "real" arguments
  64.     jsr    a0@@
  65.     lea    sp@@(-8),sp    | and back, so rts will work ;-)
  66.  
  67.     rts
  68. @
  69.