Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. ;*****************************************************************************
  2. ;*
  3. ;*                            Open Watcom Project
  4. ;*
  5. ;*    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
  6. ;*
  7. ;*  ========================================================================
  8. ;*
  9. ;*    This file contains Original Code and/or Modifications of Original
  10. ;*    Code as defined in and that are subject to the Sybase Open Watcom
  11. ;*    Public License version 1.0 (the 'License'). You may not use this file
  12. ;*    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
  13. ;*    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
  14. ;*    provided with the Original Code and Modifications, and is also
  15. ;*    available at www.sybase.com/developer/opensource.
  16. ;*
  17. ;*    The Original Code and all software distributed under the License are
  18. ;*    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  19. ;*    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
  20. ;*    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
  21. ;*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
  22. ;*    NON-INFRINGEMENT. Please see the License for the specific language
  23. ;*    governing rights and limitations under the License.
  24. ;*
  25. ;*  ========================================================================
  26. ;*
  27. ;* Description:  WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
  28. ;*               DESCRIBE IT HERE!
  29. ;*
  30. ;*****************************************************************************
  31.  
  32.  
  33. ; Define 8087 status word:
  34. ; ========================
  35.  
  36. ST_EF_IO   equ       0001h             ; invalid operation
  37. ST_EF_DO   equ       0002h             ; denormalized operand
  38. ST_EF_ZD   equ       0004h             ; zero divide
  39. ST_EF_OF   equ       0008h             ; overflow flag
  40. ST_EF_UF   equ       0010h             ; underflow flag
  41. ST_EF_PR   equ       0020h             ; precision
  42. ST_EF_SF   equ       0040h             ; stack under/overflow
  43. ST_EF_ES   equ       0080h             ; error summary
  44.  
  45. ST_C0      equ       0100h             ; condition code 0
  46. ST_C1      equ       0200h             ; condition code 1
  47. ST_C2      equ       0400h             ; condition code 2
  48. ST_C3      equ       4000h             ; condition code 3
  49.  
  50. ST_IR      equ       0080h             ; interrupt request
  51.  
  52. ST_ST      equ       3800h             ; stack top
  53.  
  54. ST_BF      equ       8000h             ; busy flag
  55.  
  56. ; Define 8087 control word:
  57. ; =========================
  58.  
  59.                             ; Exception masks (1 = exception masked)
  60. CW_IM      equ       0001h  ;   invalid operation
  61. CW_DM      equ       0002h  ;   denormalized operand
  62. CW_ZM      equ       0004h  ;   zero divide
  63. CW_OM      equ       0008h  ;   overflow
  64. CW_UM      equ       0010h  ;   underflow
  65. CW_PM      equ       0020h  ;   precision
  66.  
  67.                             ; reserved - xxx0 0000 0x00 0000
  68. CW_RESERVE equ      0e040h  ; RESERVED
  69.  
  70.                             ; interrupt enable mask 0000 0000 x000 0000
  71. CW_IEM_EN  equ       0000h  ;   enabled
  72. CW_IEM_DIS equ       0080h  ;   disabled
  73.  
  74. CW_PC_MASK equ      0fcffh  ; precision control - 0000 00xx 0000 0000
  75. CW_PC_64   equ       0300h  ; precision control - 64 bits
  76. CW_PC_53   equ       0200h  ; precision control - 53 bits
  77. CW_PC_RES  equ       0100h  ; precision control - reserved
  78. CW_PC_24   equ       0000h  ; precision control - 24 bits
  79.  
  80. CW_RC_MASK equ      0f3ffh  ; round control - 0000 xx00 0000 0000
  81. CW_RC_CHOP equ       0c00h  ; round control - chop
  82. CW_RC_UP   equ       0800h  ; round control - round up
  83. CW_RC_DOWN equ       0400h  ; round control - round down
  84. CW_RC_NEAR equ       0000h  ; round control - round nearest
  85.  
  86.                             ; infinity control - 000x 0000 0000 0000
  87. CW_IC_PROJ equ       0000h  ;   projective
  88. CW_IC_AFF  equ       1000h  ;   affine
  89.