home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / forum16.lzh / SOFTWARE / C / DEVPRC / getsys.a < prev    next >
Text File  |  1990-03-24  |  4KB  |  96 lines

  1. *-----------------------------------------------------------------------*
  2. *                                         *
  3. *        This software is copyrighted (c)1990 by Hellmuth Michaelis       *
  4. *                                                                        *
  5. *        Permission is granted to reproduce and distribute               *
  6. *        this package by any means as long as no fee is charged          *
  7. *        and as long as this notice is always included in the copies.    *
  8. *        Commerical use or incorporation into commercial software        *
  9. *        is prohibited without the written permission of the             *
  10. *        author.                                                         *
  11. *                                                                        *
  12. *        Other rights are reserved except as explicitly granted          *
  13. *        by written permission of the author.                            *
  14. *                                    *
  15. *        Hellmuth Michaelis                    *
  16. *        Eggerstedtstr.28                    *
  17. *        2000 Hamburg 50                        *
  18. *        Tel: +49 40 384298                    *
  19. *        uucp(subnet): helle@ktshh                *
  20. *                                    *
  21. *    I would like to thank Martin Gasthuber (martin@odinhh) and    *
  22. *    Heino Peters (heino@hphal) for their suggestions and helpful    *
  23. *    support !                            *
  24. *                                    *
  25. *                CAUTION:                *
  26. *                ========                *
  27. *        This functions are using an undocumented        *
  28. *        OS-9 system call "I$SGetSt". its behaviour        *
  29. *        is exactly like "I$GetStt" except that a        *
  30. *        SYSTEM PATH NUMBER must be supplied !            *
  31. *                                    *
  32. *    This software is supplied "as is" ! No warranty of any kind    *
  33. *    nor support is implied by making it avaiable to the public!    *
  34. *                                    *
  35. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
  36. *    _gs_sopt():    return option section of a device supplying    *
  37. *            a system path number                *
  38. *                                    *
  39. *    _gs_sdevn():    return the name of a device supplying a system    *
  40. *            path number                    *
  41. *                                    *
  42. *    see also:    _gs_devn() and _gs_opt() calls in the        *
  43. *                     OS-9 C Compiler Users Manual        *
  44. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
  45. *                                    *
  46. * Ed Date     Description                    by    *
  47. * -- -------- ------------------------------------------------- ------- *
  48. * 01 14-01-90 first release                    -hm    *
  49. *                                    *
  50. *-----------------------------------------------------------------------*
  51.  
  52. Edition        set    1
  53.  
  54. *-----------------------------------------------------------------------------
  55. *
  56. *    _gs_sopt()    get path options of system path number
  57. *
  58. *    call:
  59. *        int _gs_sopt(path,buffer)
  60. *        int path;        /* SYSTEM path number */
  61. *        struct sgbuf *buffer;    /* buffer for option structure */
  62. *
  63. *-----------------------------------------------------------------------------
  64.  
  65.         psect    getsys,0,0,Edition,16,0
  66.  
  67. _gs_sopt:    move.l    a0,-(a7)    save a0
  68.         movea.l    d1,a0        buffer pointer
  69.         move.w    #SS_Opt,d1    function code
  70. _gs_scall    os9    I$SGetSt    get system path no option section
  71.         bcc.s    _gs_sexit    no error, jmp
  72.         move.l    #-1,d0        return value
  73.         move.l    d1,errno(a6)    set errno global variable
  74. _gs_sexit    move.l    (a7)+,a0    restore a0
  75.         rts            back to caller
  76.  
  77. *-----------------------------------------------------------------------------
  78. *
  79. *    _gs_sdevn()    get device name of a system path number
  80. *
  81. *    call:
  82. *        int _gs_sdevn(spath,buffer)
  83. *        int spath;        /* SYSTEM path number */
  84. *        char *buffer;        /* 32 byte buffer for device name */
  85. *
  86. *-----------------------------------------------------------------------------
  87.  
  88. _gs_sdevn:    move.l    a0,-(a7)    save a0
  89.         movea.l    d1,a0        buffer pointer
  90.         move.w    #SS_DevNm,d1    function code
  91.         bra.s    _gs_scall    share code
  92.  
  93.         ends
  94.  
  95. *------------------------ END OF FILE ----------------------------------------
  96.