home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / P_FOTRAN.LZH / 68881 / CSR8.FOR < prev    next >
Text File  |  1987-12-31  |  3KB  |  67 lines

  1. !--------------------------------------------------------------------!
  2. !   Include file    CSR8.FOR                                         !
  3. !--------------------------------------------------------------------!
  4. !                                                                    !
  5. !  Declarations for Fortran-Procedures to get & put the status- and  !
  6. !  and control-register (FPSR/FPCR) of the MC68881.                  !
  7. !                                                                    !
  8. !  Creation :   18 Mar 1988    by   F. Pl.                           !
  9. !  Modified :   18 Apr 1988    by   ATC                              !
  10. !                                                                    !
  11. !  Copyright (C) 1988 Prospero Software                              !
  12. !                                                                    !
  13. !                                                                    !
  14. !--------------------------------------------------------------------!
  15.  
  16. *     FPCR Mode Control Byte values: MC68881 manual Fig. 2-3
  17.         
  18. *     Rounding modes
  19.       INTEGER    FPCR_to_nearest,
  20.      1           FPCR_toward_zero,
  21.      2           FPCR_toward_minus_infinity,
  22.      3           FPCR_toward_plus_infinity
  23.  
  24.       PARAMETER (FPCR_to_nearest            = $00,
  25.      1           FPCR_toward_zero           = $10,
  26.      2           FPCR_toward_minus_infinity = $20,
  27.      3           FPCR_toward_plus_infinity  = $30)
  28.         
  29. *     Rounding precision
  30.       INTEGER    FPCR_extended,
  31.      1           FPCR_single,
  32.      2           FPCR_double
  33.         
  34.       PARAMETER (FPCR_extended = $00,
  35.      1           FPCR_single   = $40,
  36.      2           FPCR_double   = $80)
  37.         
  38. *     FPSR Accrued Exception Byte values: MC68881 manual Fig. 2-7
  39.         
  40.       INTEGER    FPSR_inexact,
  41.      1           FPSR_divide_by_zero,
  42.      2           FPSR_underflow,
  43.      3           FPSR_overflow,
  44.      4           FPSR_invalid_operation
  45.  
  46.       PARAMETER (FPSR_inexact           = $08,
  47.      1           FPSR_divide_by_zero    = $10,
  48.      2           FPSR_underflow         = $20,
  49.      3           FPSR_overflow          = $40,
  50.      4           FPSR_invalid_operation = $80)
  51.         
  52. *     Interfaces to get/set control/status routines.
  53.  
  54. !      SUBROUTINE getsr8 (status)         ! Get FPSR status
  55. !      INTEGER*4 status
  56.  
  57. !      SUBROUTINE getcr8 (condcd)         ! Get FPCR status
  58. !      INTEGER*4 condcd
  59.  
  60. !      SUBROUTINE setsr8 (status)         ! Set FPSR status
  61. !      INTEGER*4 status
  62.  
  63. !      SUBROUTINE setcr8 (condcd)         ! Set FPCR status
  64. !      INTEGER*4 condcd
  65.  
  66.  
  67.