Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.3 KiB

  1. ;***
  2. ;mm.inc - macros to write memory model dependent code
  3. ;
  4. ; Copyright (c) 1987-1998 Microsoft Corporation
  5. ;
  6. ;Purpose:
  7. ; This file contains definitions of a number of macros which
  8. ; make the writing of memory model dependent code for the
  9. ; 8086 a little easier and more portable.
  10. ;
  11. ;*******************************************************************************
  12. ; the macro below is used by the assigning long arithmetic routines (almul,
  13. ; etc) to handle the model dependent data addressing - in small and middle
  14. ; models data addresses default to short (2 byte) addresses. in large model,
  15. ; data address are long (4 bytes).
  16. LOAD macro to,from
  17. if sizeD
  18. lds to,from
  19. else
  20. mov to,from
  21. endif
  22. endm
  23. ; general code & data size constants & macros
  24. if sizeD ; 4 byte data addresses
  25. DAT_ADDR_SZ = 4
  26. BDAT_ADDR_SZ = 2
  27. else ; 2 byte data addresses
  28. DAT_ADDR_SZ = 2
  29. BDAT_ADDR_SZ = 4
  30. endif
  31. if sizeC ; 4 byte code addresses
  32. TXT_ADDR_SZ = 4
  33. else ; 2 byte code addresses
  34. TXT_ADDR_SZ = 2
  35. endif
  36. ; Big/Little Endian Definitions for Long Integers
  37. LOWORD equ [0]
  38. HIWORD equ [2]
  39. ; All Model Definitions
  40. BPARGBAS equ TXT_ADDR_SZ+2 ; offset from BP to first argument
  41. ; macro for windows fixup with retf #
  42. return macro n
  43. org $-1
  44. if sizeC
  45. db 0cah
  46. else
  47. db 0c2h
  48. endif
  49. dw n
  50. endm