dsp56800 Freescale Semiconductor, Inc, dsp56800 Datasheet - Page 192

no-image

dsp56800

Manufacturer Part Number
dsp56800
Description
16-bit Digital Signal Controllers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Software Techniques
8.1.3
The XCHG operation can be emulated as shown in the following code:
; XCHG Operation
; Emulated at 4 Icyc
The macro instruction PUSH is described in Section 8.5, “Multiple Value Pushes.”
If a register is available, the exchange of any two registers can be emulated as shown in the following code:
; XCHG Operation
; Emulated at 3 Icyc
A faster exchange of any two registers can be emulated using one address register when N equals 0, as
shown in the following code:
; XCHG Operation
; N register is 0, Emulated at 2 Icyc
8.1.4
The MAX operation returns the maximum of two values; the MIN operation returns the minimum.
8.1.4.1
The MAX operation can be emulated as shown in the following code:
; MAX Operation
;
; MAX operation
; Emulated at 4 Icyc
8-6
PUSH
MOVE
POP
MOVE
MOVE
MOVE
MOVE
TFR
MAX
------ becomes ------
CMP
TLT
Register Exchanges
Minimum and Maximum Values
MAX Operation
X0
A,X0
A
X0,N
A,X0
N,A
A,X:(R0)
X0,A
X0,A
X0,A
X0,A
X:(R0)+N,X0
DSP56800 Family Manual
; (can also use TLE if desired)
Freescale Semiconductor

Related parts for dsp56800