summaryrefslogtreecommitdiff
path: root/v4.0/src/INC/PATHMAC.INC
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/INC/PATHMAC.INC')
-rw-r--r--v4.0/src/INC/PATHMAC.INC44
1 files changed, 44 insertions, 0 deletions
diff --git a/v4.0/src/INC/PATHMAC.INC b/v4.0/src/INC/PATHMAC.INC
new file mode 100644
index 0000000..7abf50d
--- /dev/null
+++ b/v4.0/src/INC/PATHMAC.INC
@@ -0,0 +1,44 @@
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;;***********************************************************************
22IF1
23 %OUT COMPONENT=COMMON, MODULE=PATHMAC.INC ...
24ENDIF
25
26pathlabl MACRO pnam
27IFNDEF LBL_&pnam ;;IF THIS IS THE FIRST TIME,
28 LBL_&pnam = 0 ;;DEFINE IT, INITIALLY ZERO
29ELSE ;;SINCE IT IS DEFINED
30 IF (LBL_&pnam GT 3) ;;IF USED TOO MANY TIMES,
31 .ERR NON-UNIQUE OPERAND ON PATHLABL
32 EXITM ;;ABORT THIS GENERATION
33 ENDIF
34ENDIF
35
36IF (LBL_&pnam EQ 0) OR (LBL_&pnam EQ 2) ;;ready for START?
37 $$A_START_&pnam: ;;create START label
38 PUBLIC $$A_START_&pnam ;;make it public
39ELSE ;;SINCE SWITCH MAY BE 1 OR 3,
40 $$A_STOP_&pnam: ;;create STOP label
41 PUBLIC $$A_STOP_&pnam ;;make it public
42ENDIF
43LBL_&pnam = LBL_&pnam + 1 ;;INCREMENT SWITCH
44ENDM