Texas Instruments 990 Operation Manual page 109

Prototyping system
Hide thumbs Also See for 990:
Table of Contents

Advertisement

J1n.5\ _ _ _ _ _ _ _
~
945255-9701
Because of the number of items to be considered, patching a two-address instruction is one of
the more difficult operations. There are two ways to approach it: building a bit image and the
additive method.
3.6.3.1 Patching by Building a Bit Image. In building a bit image, the user merely fills in each
field in the 16-bit word on a bit-by-bit basis. When all fields are complete, the value is converted
to hexadecimal for the patch contents.
Example:
Patch the following assembly language instruction:
MOV *R1,*R2+
by building a bit image.
The MOV instruction has this format:
o
TS
5
I
Determine the bits that occupy each field. Starting with the op code field, the hexadecimal
op code for a MOV instruction is COOO. The first three bits of this op code are 110
2 ;
transfer these bits into the op code field.
The Byte Indicator (B) field specifies whether or not the instruction is a byte instruction.
The MOV instruction is a word instruction; therefore, this field is set to O. (The B field is
always 0 for a MOV instruction.) Another way of specifying the same information would be
to use the MOV or MOVB instruction (as appropriate) and a four-bit op code.
The D field specifies the destination workspace register. The destination address is *R2+,
which indicates workspace register 2 and the workspace register indirect autoincrement
addressing mode. The addressing mode for the destination, 11
2 ,
is placed in the T
d
field.
Transfer the binary value of the register number, 0010
2 ,
into the D field.
Use a similar procedure for the source address, which is *Rl. In this case, workspace
register 1 is specified and the addressing mode is workspace register indirect. Therefore,
transfer 01
2
into the Ts field and 0001
2
into the S field.
The instruction field contents will now be:
110
1
0
1 " I
0010
01
0001
I
Now read these 16 bits as a four-digit hexadecimal number.
I
1 100
1 100
1001
0001
I
C
C
9
The resulting hexadecimal number is the desired value. The patch value is CC91.
3-71
Digital Systems Division .

Advertisement

Table of Contents
loading

Table of Contents