Download Print this page

Use Of Logicals - RCA Spectra 70 Training Manual

System
Hide thumbs

Advertisement

Table of Contents
o
+ 0
0
1 + 0
1
o
+ 1
1
1 + 1
0
Example:
INH
BIT CONFIGURAGIONS
IISM BEFORE
Gm
AND AFTER
31
0011 1111
EXECUTION
3F
HSM BEFORE
EXECUTION
GB
00
3F
0011 1111
ASSEMBLY
OPERATION
OPERAND
INSTRUCTION
XC
INH(l), X'0031'
OP
B2
D2
GENERATED
INSTRUCTION
I
D7 16
I
0
I
110 \3110 10 \1 10 \ 0049 10
1
HSM AFTER
EXECUTION
*
General Register one contains 0000
~
~
0000 0000
CONDITION CODE
=
0
Note that this example has set the Interrupt Mask
to prohibit interrupt from any I/O channel.
The same mask applied again will set the Interrupt
Mask (location 0049) to allow interrupt from any
channel.
USE OF LOGICALS
There are many programming situations where the
Logical instructions are useful.
For example, a
program switch may be a Branch On Condition in-
struction. Following the BC instruction is a section
of coding which is bypassed ifthe Branch takes place.
When such a condition is desired, a Logical instruc-
tion may be used to insert all one bits in the mask of
the BC making it an Unconditional Branch. When ex-
ecution of the coding following the BC is desired, a
logical instruction that inserts all zero bits in the
mask may be used. This makes the BC a 'no-Op'
instruction.
Logical instructions can alter the value of a field. A
logical instruction may change the sign of a packed
fieldfromaplus sign (1100)2 to a minus sign (1101)2.
This feature is useful when editing the packed field.
The minus sign allows the insertion of editing sym-
bols to the right of the digits in an edited field. Thus
a field may be made pseudo-negative for fields of a
prescribed value. For example, if an asterisk is
46
desired to the right of any edited balance field below
$100.00, the packed field sign position could be al-
tered to a negative sign. (See OR example.)
The Condition Code Indicator is set by the Logical
instructions. It is set to zero if all of the bits in the
result field are zero. It is set to one if any of the
result bits are one.
TEST UNDER MASK INSTRUCTION
This instruction compares the relatively positioned
bits of a byte with a mask byte and indicates the re-
sult by a setting of the Condition Code Indicator.
The mask byte is written as the second byte of the
TM instruction. The S1 address is the location of
the byte to be tested.
A one bit in the mask tests the presence of a one bit
in the corresponding bit position ofthe byte addressed.
The Condition Code Indicator is set to zero if all of
the selected bits are zero (or if the mask is all zeros).
The setting is one if the selected bits are a mixture
of zeros and ones. Condition Code three is set if the
selected bits are all ones. Condition Code two is not
set by this instruction.
Example #1
HSM BEFORE
AND AFTER
EXECUTION
ASSEMBLY
INSTRUCTION
10
60
0101 1100 2
OPERATION
OPERAND
TM
LOC, X'OF'
OP
GENERATED
INSTRUCTION \91
161
0000 1111
21 2
10 \1914 10
I
General Register two contains 4096 10
CONDITION CODE
=
1
Example #2
HSM BEFORE
AND AFTER
EXECUTION
00
49
0011 1101
ASSEMBLY
OPERATION
OPERAND
INSTRUCTION
I - - - - - - - - - I - - - - - - - i
GENERATED
INSTRUCTION
TM
X'31', X'02'
General Register one contains 0000
CONDITION CODE
=
0

Advertisement

Table of Contents
loading

  Also See for RCA Spectra 70

  Related Manuals for RCA Spectra 70

This manual is also suitable for:

Spectra 70/25