17.05.2015 Views

~ National ~ Semiconductor - Al Kossow's Bitsavers

~ National ~ Semiconductor - Al Kossow's Bitsavers

~ National ~ Semiconductor - Al Kossow's Bitsavers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.0 Instruction Set Reference (Continued)<br />

WMP Conditional Long Jump<br />

Syntax<br />

LJMP Rs, p, s, nn -register, absolute<br />

Affected Flags<br />

None<br />

Description<br />

Conditionally transfers control to the instruction at the absolute<br />

memory address nn if the bit in position p of register Rs<br />

is equal to the state of the bit s. The operand Rs may specify<br />

any active CPU register. The value of p may be from 0 to<br />

7, where 0 corresponds to the LSB of Rs and 7 corresponds<br />

to the MSB of Rs. The absolute value nn is 16 bits long,<br />

(range: 0 to 64k), therefore, all of instruction memory can be<br />

addressed.<br />

Example<br />

Long Jump to one of the receiver error handling routines<br />

based on the contents of the Error Code Register (ECR}.<br />

EXX 0,1,3, ;select main A, alt B<br />

OR 01000000B,TSR<br />

; and clear [GIE]<br />

;set [SEC] in (TSR}<br />

MOVE ECR, R11<br />

;read (ECR}<br />

; Determine error condition<br />

LJMP R11, 0,1, Software_error<br />

LJMP R11, 1, 1, Loss_of_Midbit<br />

LJMP R11, 2,1, InvaliLEndinQ-Seq<br />

LJMP R11, 3, 1, Parity_error<br />

LJMP R11, 4,1, Software_error<br />

Instruction Format<br />

15<br />

15<br />

T-states<br />

(2 + 2)<br />

Bus Timing<br />

Figure 9<br />

Operation<br />

If Rs[p] = s<br />

then nn-+ PC<br />

B 7<br />

1<br />

nn<br />

p<br />

4<br />

1<br />

I I<br />

Rs<br />

o<br />

o<br />

WMP Unconditional Long Jump<br />

Syntax<br />

LJMP nn -absolute<br />

LJMP Dr] -indexed<br />

Affected Flags<br />

None<br />

Description<br />

Unconditionally transfers control to the instruction at the<br />

memory address specified by the operand. The operand<br />

may either specify an absolute instruction address nn, (16<br />

bits long), or an index register Ir, which contains an instruction<br />

address. LJMP's addressing range is from 0 to 64k;<br />

(I.e., all of instruction memory can be addressed).<br />

Example<br />

Transfer control to the instruction labeled "Reset.System",<br />

which may be located anywhere in instruction memory.<br />

LJMP Reset.System ; go reset the system<br />

Instruction Format<br />

LJMP nn<br />

1 11110101111111010101010101010101<br />

. Opcode .<br />

15 0<br />

1 nn 1<br />

15 o<br />

LJMP<br />

Dr]<br />

1111101~~~0~~1011101Ir 10101010101<br />

15 6,J, 4 0<br />

OO-IW<br />

01-IX<br />

10-IY<br />

11-IZ<br />

T-states<br />

LJMP nn -(2 + 2)<br />

LJMP Dr] -2<br />

Bus Timing<br />

LJMP nn -Figure 9<br />

LJMP Dr] -Figure 9<br />

Operation<br />

LJMP nn<br />

nn-+PC<br />

LJMP Dr]<br />

Ir-+PC<br />

2-113

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!