Source code of Windows XP (NT5)
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.

44 lines
1.9 KiB

  1. ;;***********************************************************************
  2. ;; NAME: pathlabl
  3. ;; DESC: creates a public label at the spot it is placed, using the name
  4. ;; given.
  5. ;; INPUT: either module name or procedure name
  6. ;; OUTPUT: public label
  7. ;; LOGIC: LBL-parameter-name will have four values -
  8. ;; - one for each pass (2)
  9. ;; - one for start and one for stop
  10. ;; if LBL is not defined, it is first pass, at beginning label
  11. ;; - set it to 1 and create the start label
  12. ;; if LBL = 1, it is first pass, at end label
  13. ;; - set it to 2 and create stop label
  14. ;; if LBL = 2, it is second pass, at beginning label
  15. ;; - set it to 3 and create the start label
  16. ;; if LBL = 3, it is second pass, at end label
  17. ;; - set it to 4 and create stop label
  18. ;; if LBL = 4, it is second pass,
  19. ;; - this macro has been invoked more than twice with same parm
  20. ;; - issue error message
  21. ;;***********************************************************************
  22. IF1
  23. ; %OUT COMPONENT=COMMON, MODULE=PATHMAC.INC ...
  24. ENDIF
  25. pathlabl MACRO pnam
  26. IFNDEF LBL_&pnam ;;IF THIS IS THE FIRST TIME,
  27. LBL_&pnam = 0 ;;DEFINE IT, INITIALLY ZERO
  28. ELSE ;;SINCE IT IS DEFINED
  29. IF (LBL_&pnam GT 3) ;;IF USED TOO MANY TIMES,
  30. .ERR NON-UNIQUE OPERAND ON PATHLABL
  31. EXITM ;;ABORT THIS GENERATION
  32. ENDIF
  33. ENDIF
  34. IF (LBL_&pnam EQ 0) OR (LBL_&pnam EQ 2) ;;ready for START?
  35. $$A_START_&pnam: ;;create START label
  36. PUBLIC $$A_START_&pnam ;;make it public
  37. ELSE ;;SINCE SWITCH MAY BE 1 OR 3,
  38. $$A_STOP_&pnam: ;;create STOP label
  39. PUBLIC $$A_STOP_&pnam ;;make it public
  40. ENDIF
  41. LBL_&pnam = LBL_&pnam + 1 ;;INCREMENT SWITCH
  42. ENDM