This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS320F28335: Questions about assembly operand

Part Number: TMS320F28335


Tool/software: TI C/C++ Compiler

Hello,

I am a student studying development. 

I am checking the assembly of the code I made: 

The memory of TMS320F28335 occupies 2 bytes per address.

What is the difference between MOV, MOVL, MOVB, MOVZ, MOVH, MOVW, respectively?

www.ti.com/.../spru430f.pdf

www.ti.com/.../spru513r.pdf

I checked above document, but I couldn't find the exact definition of each 

Thanks, Regards

Han



  • Han,

    The C28x has a 16-bit memory architecture. This means the smallest read/write memory access which can be made is 16-bits wide. The data buses are 32-bits wide, so two 16-bit accesses can happen together. You should always refer to the specific descriptions in the CPU instruction set, but in general the mnemonics you listed are used as follows:

    MOV - 16-bit accesses
    MOVL - 32-bit accesses
    MOVB - used to load/store 8-bit (usually zero extended) data using a 16-bit access
    MOVZ - used for 16-bit register writes where the upper bits are loaded with zero
    MOVH - used for 16-bit register reads of a larger register
    MOVW - used for 16-bit data page loads

    Address (and sometimes data) is integrated into the opcode, and we need to ensure this is 16 or 32-bits. This is the reason for the different types of MOV instruction.

    I hope this helps.  Please post back if it's still not clear.

    Regards,

    Richard