8XC196MC, MD, MH USER’S MANUAL

Table A-6. Instruction Set (Continued)

Mnemonic

 

 

 

 

Operation

 

 

 

 

 

Instruction Format

 

 

 

 

BMOVI

INTERRUPTIBLE BLOCK MOVE. Moves a

 

PTRS, CNTREG

 

block of word data from one location in

BMOVI

lreg, wreg

 

memory to another. The instruction is

 

(11001101) (wreg) (lreg)

 

identical to BMOV, except that BMOVI is

 

 

 

 

interruptible. The source and destination

 

 

 

addresses are calculated using the indirect

NOTE: The pointers are autoincre-

 

with autoincrement addressing mode. A long

 

 

mented during this instruction.

 

register (PTRS) addresses the source and

 

 

 

However, CNTREG is decre-

 

destination pointers, which are stored in

 

 

 

mented only when the instruction

 

adjacent word registers. The source pointer

 

 

 

is interrupted. When BMOVI is

 

(SRCPTR) is the low word and the

 

 

 

 

 

 

 

interrupted, CNTREG is updated

 

destination pointer (DSTPTR) is the high

 

 

 

to store the interim word count at

 

word of PTRS. A word register (CNTREG)

 

 

 

the time of the interrupt. For this

 

specifies the number of transfers. The blocks

 

 

 

reason, you should always reload

 

of word data can be located anywhere in

 

 

 

CNTREG before starting a

 

register RAM, but should not overlap.

 

 

 

BMOVI.

 

COUNT (CNTREG)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LOOP: SRCPTR (PTRS)

 

 

 

 

 

 

 

DSTPTR

(PTRS + 2)

 

 

 

 

 

 

 

(DSTPTR) (SRCPTR)

 

 

 

 

 

 

 

(PTRS) SRCPTR + 2

 

 

 

 

 

 

 

(PTRS + 2) DSTPTR + 2

 

 

 

 

 

COUNT COUNT – 1

 

 

 

 

 

 

 

if COUNT 0 then

 

 

 

 

 

 

 

 

go to LOOP

 

 

 

 

 

 

 

 

 

end_if

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PSW Flag Settings

 

 

 

 

 

 

Z

 

N

C

V

VT

 

ST

 

 

 

 

 

— —

 

 

 

 

 

 

 

 

 

BR

BRANCH INDIRECT. Continues execution at

 

DEST

 

the address specified in the operand word

BR

[wreg]

 

register.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(11100011) (wreg)

 

PC (DEST)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PSW Flag Settings

 

 

 

 

 

 

Z

N

C

V

VT

ST

 

 

 

 

 

— — — — — —

 

 

 

 

 

 

 

 

CLR

CLEAR WORD. Clears the value of the

 

DEST

 

operand.

 

 

 

 

 

 

 

CLR

wreg

 

(DEST) 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(00000001) (wreg)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PSW Flag Settings

 

 

 

 

 

 

Z

 

N

C

V

VT

 

ST

 

 

 

 

 

1

 

0

0

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A-10

Page 399
Image 399
Intel 8XC196MD Count ← Cntreg Loop Srcptr ← Ptrs Dstptr, Dstptr ← Srcptr Ptrs ← Srcptr +, Count ← Count, PC ← Dest