Intel AEDIT-86 Life Jacket User Manual


 
Ad,anced AEDIT -86 Usage
AEDIT -86 User
9
s Guide
8-6
8.3.2
Example 2
Macro <
CTRL-W)
moves the cursor one word to the right. A word (in this case)
is defined as a sequence of characters enclosed by delimiters. Delimiters are defined
as white spaces or the user defined delimiters (listed under
SET
E_delimiter). The
technique
IF
cond
THEN
RETURN
is
used here. In the nested macros, N9 defines
whether or not the cursor
is
on a delimiter.
If
the value fetched by <
FETN
) 9
is
0
(false), the
FIND
succeeds and the macro is repeated.
If
the value fetched by
<
FETN
) 9
is
1 (true), the
FIND
fails and execution returns to the calling macro.
M \ 017 \
BROf-
\ RB \
BRie
\ 0171 \
NL/e
\ 0172 \
NL
\ MM;
\.
word right
macro·
\
M \ 0171 \
BRcn9=iswhte
\
NL
\
XN9f
\ BR \
CR
\ MM;
M \
0172 \ BRcn9 = !isdel \
NL
\
XN9f
\ BR \
CR
\ MM;
Macro <
CTRL-Q)
differs from macro <
CTRL-
W)
only in
that
it moves the
cursor one word to the left.
M \
011
\
BROf-
\ RB \ BR \
CL/e
\ 0111 \
NL/e
\ 0112 \
NL
\
CR
\ MM;
\.
word left macro \
M \ 0112 \
BRcn9=iswhte
\
NL
\
XN9f\
BR \
CL
\ MM;
M \ 0111 \ BRcn9=!isdel \
NL
\
XN9f
\ BR \
CL
\ MM;
Note that the macros are optimized to some extent. A find empty string
is
issued
first; therefore, a future
FIND
command uses <
ESC)
as an argument, not the
sequence -
<
RUBOUT)
<
ESC).
8.3.3 Example 3
MacroCNTR
centers the text
on
the line. This macro strips all blanks from the left
side, then all blanks from the right side.
It
calculates the number of blanks to be
added and adds the blanks from the left margin to the first character so that the text
is
centered
on
the line. Skipping blanks
is
done with the + B and the - B macros.
The number
of
blanks to be added
is
calculated using the read-only variables
RMARGN,
LMARGN,
and
COL.
+
Band
- B use
Advance_While
macro
techniques.
MCNTR
\ BRjpO \
NLe
+ b \
NL
\ XXjp254 \
NLi
\ BR \ CLe - b \
NL
\
CR
\
XA
cn9=(rmargn+
I +lmargn-col)/2 \
NLcn9=
-n9·(n9>0)
\ NLjpO \ NLi \ BRb
\
CLb
\
XF
\ XN9g \
NL
\
NL
\ MM;
M+B
\
BR/e+Bl
\ BR \ MM;
M+bl
\
BRcn9=!(curch==20H)
\
NL
\ XN9f- \ RB \ BR \
CR
\ MM;
M-B \ BR/e-BI \ BR \ MM;
M-bl \
BRcn9=!(curch=
=20H)
\
NL
\ XN9f- \ RB \ BR \
CL
\ MM;