2
0

lbn8086.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright (c) 1995 Colin Plumb. All rights reserved.
  3. * For licensing and other legal details, see the file legal.c.
  4. *
  5. * lbn8086.h - This file defines the interfaces to the 8086
  6. * assembly primitives for 16-bit MS-DOS environments.
  7. * It is intended to be included in "lbn.h"
  8. * via the "#include BNINCLUDE" mechanism.
  9. */
  10. #define BN_LITTLE_ENDIAN 1
  11. #ifdef __cplusplus
  12. /* These assembly-language primitives use C names */
  13. extern "C" {
  14. #endif
  15. /* Set up the appropriate types */
  16. typedef unsigned short bnword16;
  17. #define BNWORD16 bnword16
  18. typedef unsigned long bnword32;
  19. #define BNWORD32 bnword32
  20. void __cdecl __far
  21. lbnMulN1_16(bnword16 __far *out, bnword16 const __far *in,
  22. unsigned len, bnword16 k);
  23. #define lbnMulN1_16 lbnMulN1_16
  24. bnword16 __cdecl __far
  25. lbnMulAdd1_16(bnword16 __far *out, bnword16 const __far *in,
  26. unsigned len, bnword16 k);
  27. #define lbnMulAdd1_16 lbnMulAdd1_16
  28. bnword16 __cdecl __far
  29. lbnMulSub1_16(bnword16 __far *out, bnword16 const __far *in,
  30. unsigned len, bnword16 k);
  31. #define lbnMulSub1_16 lbnMulSub1_16
  32. bnword16 __cdecl __far
  33. lbnDiv21_16(bnword16 __far *q, bnword16 nh, bnword16 nl, bnword16 d);
  34. #define lbnDiv21_16 lbnDiv21_16
  35. bnword16 __cdecl __far
  36. lbnModQ_16(bnword16 const __far *n, unsigned len, bnword16 d);
  37. #define lbnModQ_16 lbnModQ_16
  38. void __cdecl __far
  39. lbnMulN1_32(bnword32 __far *out, bnword32 const __far *in,
  40. unsigned len, bnword32 k);
  41. #define lbnMulN1_32 lbnMulN1_32
  42. bnword32 __cdecl __far
  43. lbnMulAdd1_32(bnword32 __far *out, bnword32 const __far *in,
  44. unsigned len, bnword32 k);
  45. #define lbnMulAdd1_32 lbnMulAdd1_32
  46. bnword32 __cdecl __far
  47. lbnMulSub1_32(bnword32 __far *out, bnword32 const __far *in,
  48. unsigned len, bnword32 k);
  49. #define lbnMulSub1_32 lbnMulSub1_32
  50. bnword32 __cdecl __far
  51. lbnDiv21_32(bnword32 __far *q, bnword32 nh, bnword32 nl, bnword32 d);
  52. #define lbnDiv21_32 lbnDiv21_32
  53. bnword16 __cdecl __far
  54. lbnModQ_32(bnword32 const __far *n, unsigned len, bnword32 d);
  55. #define lbnModQ_32 lbnModQ_32
  56. int __cdecl __far not386(void);
  57. #ifdef __cplusplus
  58. }
  59. #endif