home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / nfsrc21.zip / FTINT86.CH < prev    next >
Text File  |  1992-07-01  |  2KB  |  70 lines

  1. /*
  2.  * File......: FTINT86.CH - Header file for users of FT_INT86() function
  3.  * Author....: Ted Means
  4.  * Date......: $Date:   01 Jul 1992 01:00:52  $
  5.  * Revision..: $Revision:   1.3  $
  6.  * Log file..: $Logfile:   C:/nanfor/src/ftint86.chv  $
  7.  * 
  8.  * This is an original work by Ted Means and is placed in the
  9.  * public domain.
  10.  *
  11.  * Modification history:
  12.  * ---------------------
  13.  *
  14.  * $Log:   C:/nanfor/src/ftint86.chv  $
  15.  * 
  16.  *    Rev 1.3   01 Jul 1992 01:00:52   GLENN
  17.  * Rodgers Moore submitted some fixes to the highbyte() and lowbyte()
  18.  * macros that take negative numbers into account.  Ted Means and 
  19.  * Glenn Scott added #defines for the Flag registers.  General cleanup
  20.  * of formatting, etc.
  21.  * 
  22.  * 
  23.  *    Rev 1.2   15 Aug 1991 23:08:48   GLENN
  24.  * Forest Belt proofread/edited/cleaned up doc
  25.  * 
  26.  *    Rev 1.1   27 May 1991 13:25:18   GLENN
  27.  * Revised for new version of ft_int86() package, which is written in C
  28.  * (CINT86.C), assembler (AINT86.ASM).  
  29.  * 
  30.  *    Rev 1.0   01 Apr 1991 01:02:38   GLENN
  31.  * Nanforum Toolkit
  32.  *   
  33.  *
  34.  */
  35.  
  36. #ifndef __FTINT86_CH__
  37. #define __FTINT86_CH__
  38.  
  39. #define INT86_MAX_REGS       10
  40.  
  41. #define AX         1
  42. #define BX         2
  43. #define CX         3
  44. #define DX         4
  45. #define SI         5
  46. #define DI         6
  47. #define BP         7
  48. #define DS         8
  49. #define ES         9
  50. #define FLAGS     10
  51.  
  52. #define FLAG_CARRY     0     // Carry flag
  53. #define FLAG_PARITY    2     // Parity flag
  54. #define FLAG_AUX       4     // Auxillary flag
  55. #define FLAG_ZERO      6     // Zero flag
  56. #define FLAG_SIGN      7     // Sign flag
  57. #define FLAG_TRAP      8     // Trap flag
  58. #define FLAG_INT       9     // Interrupt flag
  59. #define FLAG_DIR      10     // Direction flag
  60. #define FLAG_OFLOW    11     // Overflow flag
  61.  
  62. #translate makehi( <X> )        => ((<X>) * 256)
  63. #translate REG_DS               => .T.
  64. #translate REG_ES               => .F.
  65. #translate highbyte( <X> )      => (int( (<X>) / 256 ) + iif( (<X>) >= 0,0,255))
  66. #translate lowbyte( <X> )       => (int( (<X>) % 256 ) + iif( (<X>) >= 0,0,256))
  67. #translate carrySet( <XFLAGS> ) => (ft_isbiton((<XFLAGS>), FLAG_CARRY))
  68.  
  69. #endif // __FTINT86_CH__
  70.