again present, unti I a positive
or
negative
sign is
encountered,
or
unti I the
destination
byte string
is
entirely
processed,
whichever
occurs first.
d.
The
destination byte string is
entirely
processed,
in which case the basic processor
executes
the
next
instruction in
sequence.
Detai led operation
of
EDIT
BYTE
STRING follows.
The
explanation
is
necessari
Iy
quite
detailed
due to the high
degree
of
flexibi lity
inherent
in
EBS.
Condition code
settings
are
made continuously during the
editing
process
and these settings
help
determine how
each
subsequent
pat-
tern byte will be
edited.
The summary
of
condition
code
settings
given
later
in this section
wi
II
help
clarify
the
following discussion:
1.
If the count in
bit
position
0-7
of
register
R+l
is
a
nonzero, a pattern byte is
obtained
from
the
destina-
tion byte string;
if
the
count
in register
R+l
is
0,
the basi c processor
executes
the
next
instruction in
sequence.
2.
If
the
pattern
byte
is
a
digit
selector
(X'20'),
a
sig-
nificance
start
(X'211),
or
immediate
significance
start (X'23
1
), a
digit
is accessed from the decimal
information field as
follows:
a.
A decimal byte
is
obtained
from
the
byte
location
pointed to by the displacement in
EBS
plus the
source address in register
R.
b.
If
bits
0-3
of
the decimal byte
are
a sign
code,
the basi c processor auto mati
ca
lIy aborts
executi
on
or
EBS
ana
traps ro iocarion X;45;, wlrh
the
con-
tents
of
register
R,
register R+l, the condition
code,
and the
destination
byte string unchanged
from
their
current
contents.
c. If
CC2
is
currently
set
to 0, the
digit
to be used
for
editing
is the left
digit
(bits
0-3)
of
the
deci-
mal byte; however,
if
CC2
is
currently
set
to 1,
the
digit
to be used is the right
digit
(bits
4-7)
of
the decimal byte.
In
either
case,
CC3 is
set
to 1
if
the
digit
is
nonzero. If CC2 is
set
to 1
and the right
digit
(bits
4-7)
of
the decimal byte
is a sign
code,
the basic processor
automatically
aborts
execution
of
EBS
and traps to location X'45
1
,
as described
above.
d.
One
of
the following
editing
actions is performed:
Conditions
Action
Pattern byte=SI(X
'
23
1
) Expand
digit
to zoned
format, store in
pat-
tern byte locati on,
and
set
CC4 to 1 (start
significance).
Pattern byte=SS(X'21I)
CC4=1
Expand
digit
to zoned
format and store in
pattern
byte location
Mark
Mode 1
None
Conditions Action Mark
Pattern byte=S S
(X
1211)
(because CC4= 1 means
CC4=l
(cont.)
significance
already
encountered}.
Pattern byte=SS
Expand
digit
to zoned
Mode 1
CC4--o format,
store in
pat-
nonzero
digit
tern
byte
location
(because nonzero
digit
begins
significance),
and
set
CC4
to 1.
Pattern byte=SS
Store
fi
II
character
in Mode 2
CC4--o
pattern byte location
digit=O
(because
significance
starts with
next
pat-
tern byte) and
set
CC4 to
1.
Pattern byte=DS(X'20'} Expand
digit
to zoned
None
CC4=l format,
and store
digit
in
pattern
byte
location.
Pattern byte=DS
Expand
digit
to zoned Mode 1
CC4=O
format, store
digit
in
nonzero
digit
pattern byte
location,
and
set
CC4 to 1 to
signal
significance.
Pattern byte=DS
Store
fi
II
character
in
None
CC4=O
pattern byte locati on
digit=O
(because
significance
not
encountered
yet).
e.
If
CC2
is
currently
reset to 0 and
if
bits
4-7
of
the decimal byte
are
a positive decimal sign
code,
CCl
is
set
to 1, CC4
is
reset to 0, and
the
source
address in register R
is
incremented
by
1.
If
CC2
is
currently
reset to 0 and
if
bits
4-7
of
the
deci-
mal byte
are
a
negative
decimal sign
code,
CCl
and CC4 are both
set
to 1, and the source address
is incremented
by
1.
Otherwise,
CC2
is
added
to the source address and then
CC2
is
inverted.
f.
If
marking
is
invoked
at
set
d,
above,
one
of
the
two following marking operations
are
performed:
Mode 1:
Load
bits 13-31 of register
R+l
into
bit
positions 13-31
of
register
1;
bit
posi-
tions
0-12
of
register
are
unpredictable.
Mode 2:
Load
bits 13-31
of
register
R+l
into
bit
positions 13-31
of
register 1 and then
increment the contents
of
register 1
by
1;
bit
positions
0-12
of
register 1
are
unpredictable.
If marking is
not
applicable
(i.
e.,
significance
has not been
encountered),
the contents
of
reg-
ister 1
are
not
affected.
Byte-String Instructions 93