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 />

CPL<br />

Syntax<br />

CPL<br />

Complement<br />

Rsd<br />

Affected Flags<br />

N,Z<br />

Description<br />

-register<br />

Logically complements the contents of the register Rsd,<br />

placing the result back into that register.<br />

Example<br />

Load the fill-bit count passed from the host into the Transmitter's<br />

Fill-Bit Register {FBRl. R3, and then perform the<br />

required one's complement of the fill-bit count. In this example,<br />

register 20 contains the fill-bit count.<br />

EXX 1,1 ;select alternate banks<br />

MOVE R20, FBR ;Ioad {FBR)<br />

CPL FBR ;complement fill-bit count<br />

I nstruction Format<br />

11 I 0 I 1 I 0 I b~~o~; I 0 I 0 I 0 I 0 I Rsd<br />

15<br />

T-states<br />

2<br />

Bus Timing<br />

Figure 7<br />

Operation<br />

Rsd -+ Rsd<br />

4 o<br />

EXX<br />

Syntax<br />

EXX<br />

Exchange Register Banks<br />

ba, bb (,g)<br />

Affected Flags<br />

None<br />

Description<br />

Selects which CPU register banks are active by exchanging<br />

between the main and alternate register sets for each bank.<br />

Bank A controls RO-R3 and Bank B controls R4-R11. The<br />

table below shows the four possible register bank configurations.<br />

Note that deactivated registers retain their current values.<br />

The Global Interrupt Enable bit [GIE] can be set or<br />

cleared, if desired.<br />

Example<br />

Register Bank Configurations<br />

ba bb Active Register Banks<br />

0 0 Main A, Main B<br />

0 1 Main A, <strong>Al</strong>ternate B<br />

1 0 <strong>Al</strong>ternate A, Main B<br />

1 1 <strong>Al</strong>ternate A, <strong>Al</strong>ternate B<br />

Activate the main register set of Bank A, the alternate register<br />

set of Bank B, and leave the Global Interrupt Enable bit<br />

[GIE] unchanged.<br />

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

Instruction Format<br />

15<br />

T-states<br />

2<br />

Bus Timing<br />

Figure 7<br />

Operation<br />

Case ba of<br />

0: activate main Bank A<br />

1: activate alternate Bank A<br />

End case<br />

Case bb of<br />

0: activate main Bank B<br />

1: activate alternate Bank B<br />

End case<br />

Case g of<br />

0: leave [GIE] unaffected, (default)<br />

1 : (reserved)<br />

2: set [GIE]<br />

3: clear [GIE]<br />

End case<br />

6 -l- 4 3 2<br />

OO-GIE not affected<br />

01-reserved<br />

10-SetGIE<br />

11-Clear GIE<br />

o<br />

2-108

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

Saved successfully!

Ooh no, something went wrong!