Instruction Syntax and Addressing Modes
4-21
Assembly Language Instructions
However, xFLAG instructions use {flagadrs} addressing modes. This includes
global (dma6) and relative (R6 + 6–bit offset). Both take only one clock cycle.
Possible sources of confusion: Consider the following code,
ram0
equ 0x0000 *2 ;RAM word zero
ram1
equ 0x0001 *2 ;RAM word one
ram2
equ 0x0002 *2 ;RAM word two
STAG
*ram1
MOV
A0,*ram1
;TAG bit is set in STAT register
RTAG
*ram1
SFLAG *ram1
;This sets the TAG bit of ram2!
MOV
A0,*ram1
;TAG bit is not set in STAT register!
MOV
TF1,*ram1
;TF1 bit in STAT is set!?
Explanation: The first three instructions perform as you would expect. The
TAG bit is set at the RAM variable, ram1. The TAG bit is set in the STAT register
when the MOV instruction executes. Finally, ram1’s TAG bit is cleared.
The next two instructions are problematic. When SFLAG sets the tag bit, it will
set the tag bit for the second word location, ram2. This does not set the TAG
bit for ram1. What is worse is that the value in ram1 must be less than 64
(dma6) since this is global addressing for SFLAG. To access TAG bits for high-
er RAM, the R6 (PAGE) register is needed.
The last instruction is also confusing. Why is TF1 set in the STAT even though
ram1’s TAG bit is not set? The answer is that this MOV instruction considers
the {src} argument to be a word value instead of the usual byte value. Thus,
this MOV instruction operates on ram2 rather than on ram1.
Summary of Contents for MSP50C614
Page 1: ...MSP50C614 Mixed Signal Processor User s Guide SPSU014 January 2000 Printed on Recycled Paper ...
Page 6: ...vi ...
Page 92: ...3 22 ...
Page 300: ...Instruction Set Summay 4 208 Assembly Language Instructions ...
Page 314: ...Software Emulator 5 14 Figure 5 13 Project Menu Figure 5 14 Project Open Dialog ...
Page 325: ...Software Emulator 5 25 Code Development Tools Figure 5 25 EPROM Programming Dialog ...
Page 331: ...Software Emulator 5 31 Code Development Tools Figure 5 31 Context Sensitive Help System ...
Page 368: ...5 68 ...
Page 394: ...7 12 ...
Page 402: ...A 8 ...
Page 412: ...Packaging B 10 ...