]>
Commit | Line | Data |
---|---|---|
a5f4bc30 SC |
1 | ! .ALTERNATE |
2 | ! | |
3 | ||
4 | !foo MACRO string | |
5 | ! LOCAL lab1, lab2 | |
6 | !lab1: DATA.L lab2 | |
7 | !lab2: SDATA string | |
8 | ! ENDM | |
9 | ! | |
10 | ||
11 | ! foo "An example" | |
d2f661bd ILT |
12 | ! |
13 | !LL0001: DATA.L LL0002 | |
a5f4bc30 | 14 | LL0001: .long LL0002 |
d2f661bd | 15 | !LL0002: SDATA "An example" |
b74e86ec | 16 | LL0002: .byte 65,110,32,101,120,97,109,112,108,101 |
a5f4bc30 | 17 | ! foo "using LOCAL" |
d2f661bd ILT |
18 | ! |
19 | !LL0003: DATA.L LL0004 | |
a5f4bc30 | 20 | LL0003: .long LL0004 |
d2f661bd | 21 | !LL0004: SDATA "using LOCAL" |
b74e86ec | 22 | LL0004: .byte 117,115,105,110,103,32,76,79,67,65,76 |
a5f4bc30 SC |
23 | ! |
24 | ||
25 | !! test of LOCAL directive | |
26 | ! test of LOCAL directive | |
27 | ! | |
28 | ||
29 | !chk_err MACRO limit | |
30 | ! LOCAL skip !! frob | |
31 | ! LOCAL zap,dog,barf | |
32 | !barf: cmp ax,limit !! check value against | |
33 | ! !! limit | |
34 | ! jle skip !! skip call if OK | |
35 | !skip: call error | |
36 | ! foo dog | |
37 | ! zap dog | |
38 | ! nop | |
39 | ! ENDM | |
40 | ! | |
41 | ||
42 | ! chk_err 5 | |
d2f661bd ILT |
43 | ! |
44 | ! | |
45 | !LL0008: cmp ax,5 | |
a5f4bc30 SC |
46 | LL0008: cmp ax,5 |
47 | ! | |
d2f661bd | 48 | ! jle LL0005 |
a5f4bc30 | 49 | jle LL0005 |
d2f661bd | 50 | !LL0005: call error |
a5f4bc30 | 51 | LL0005: call error |
d2f661bd ILT |
52 | ! foo LL0007 |
53 | ! | |
54 | !LL0009: DATA.L LL000a | |
a5f4bc30 | 55 | LL0009: .long LL000a |
d2f661bd | 56 | !LL000a: SDATA LL0007 |
a5f4bc30 | 57 | LL000a: .byte 76,76,48,48,48,55 |
d2f661bd | 58 | ! LL0006 LL0007 |
a5f4bc30 SC |
59 | LL0006 LL0007 |
60 | ! nop | |
61 | nop | |
62 | ! chk_err 10 | |
d2f661bd ILT |
63 | ! |
64 | ! | |
65 | !LL000e: cmp ax,10 | |
a5f4bc30 SC |
66 | LL000e: cmp ax,10 |
67 | ! | |
d2f661bd | 68 | ! jle LL000b |
a5f4bc30 | 69 | jle LL000b |
d2f661bd | 70 | !LL000b: call error |
a5f4bc30 | 71 | LL000b: call error |
d2f661bd ILT |
72 | ! foo LL000d |
73 | ! | |
74 | !LL000f: DATA.L LL0010 | |
a5f4bc30 | 75 | LL000f: .long LL0010 |
d2f661bd | 76 | !LL0010: SDATA LL000d |
a5f4bc30 | 77 | LL0010: .byte 76,76,48,48,48,100 |
d2f661bd | 78 | ! LL000c LL000d |
a5f4bc30 SC |
79 | LL000c LL000d |
80 | ! nop | |
81 | nop | |
82 | ! | |
83 | ||
84 | ! | |
85 | ||
86 | ! END |