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.

~ ,--------------------------------------------------------------------,<br />

~<br />

~<br />

CO)<br />

~<br />

c<br />

6.0 Instruction Set Reference (Continued)<br />

ADCA<br />

Syntax<br />

ADCA<br />

ADCA<br />

Add with Carry and Accumulator<br />

Rs, Rd<br />

Rs, [mlr]<br />

Affected Flags<br />

N,Z,C, V<br />

Description<br />

-register, register<br />

-register, indexed<br />

Adds the source register Rs, the active accumulator, and<br />

the carry flag together, placing the result into the destination<br />

specified. The destination may be either a register, Rd, or<br />

data memory via an index register mode, [mlrJ. Note that<br />

register bank selection determines which accumulator is active.<br />

Example<br />

Add the constant 109 to the index register IW, (which is 16<br />

bits wide).<br />

SUBA A, A ;Clear the accumulator<br />

ADD 109, R12 ;Add 109 to low byte of IW<br />

ADCA R13, R13 ;Add carry to high byte of IW<br />

Instruction Format<br />

ADCA Rs, Rd<br />

15 9<br />

ADCA Rs, [mlr]<br />

1<br />

I<br />

Rd<br />

1 10 11 10 I 0 I 0 11 I I I I<br />

_ Opcode .m.lr.<br />

15 8 6 4<br />

T-states<br />

ADCA Rs, Rd<br />

ADCA Rs, [mlrJ<br />

Bus Timing<br />

ADCA Rs, Rd<br />

ADCA Rs, [mlrJ<br />

Operation<br />

ADCA Rs, Rd<br />

00 - post-decrement<br />

01 - no change<br />

10 - post Increment<br />

11 - pre-Increment<br />

-2<br />

-2<br />

-Figure 7<br />

-Figure 12<br />

Rs + accumulator + carry bit -- Rd<br />

ADCA<br />

Rs, [mlrJ<br />

Rs + accumulator + carry bit -- data memory<br />

4<br />

Rs<br />

I I<br />

Rs<br />

00 •- IW<br />

01 - IX<br />

10 - IY<br />

11 - IZ<br />

o<br />

°<br />

TL/F/9336-5<br />

ADD<br />

Syntax<br />

ADD n, rsd<br />

Add Immediate<br />

Affected Flags<br />

N,Z,C,V<br />

-immediate, limited register<br />

Description<br />

Adds the immediate value n to the register rsd and places<br />

the result back into the register rsd. Note that only the active<br />

registers RO-R15 may be specified for rsd. The value of<br />

n is limited to 8 bits; (unsigned range: ° to 255, signed<br />

range: + 127 to -128).<br />

Example<br />

Add the constant - 3 to register 10.<br />

ADD -3, Rl0 ;Rl0 + (-3) -- Rl0<br />

Instruction Format<br />

1 °10101°1<br />

. Opcode .<br />

15 11<br />

T-States<br />

2<br />

Bus Timing<br />

Figure 7<br />

Operation<br />

rsd + n -- rsd<br />

n<br />

rsd<br />

3 °<br />

2-104

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

Saved successfully!

Ooh no, something went wrong!