Why are the constants 1 2 4 8 considered as common constants

Why are the constants 1. 2, 4, 8 considered as common constants in MSP430? How many assembly instructions does MSP430 have? (how many real instructions, emulated instructions, and total?) How many cycles do the jump instructions take to execute? (jmp. jlo. jhs. J1. jge) What is the range of the jump instructions? (how many bytes up or down the code can they jump?) How many bytes is this instruction (mov.w #4. R4) and this instruction (mov.w #5. R4)? Explain. Is the operand of the push instruction classified as \'src\' or \'dsf ? What about the pop instruction? How many addressing modes can each of these instructions use? Register R4 contains a pointer to an ASCII string in the memory. Write one assembly instruction that advances this pointer to the next character. Write a few lines of code that sample the input Port 2 bit# 1 and insert it in the left side of register R4. The original content of R4 is shifted to the right to make room for the new bit.

Solution

Solutions:

(a).MSP430 Memory capacity:

suffix           RAM        ROM

    1                 128      2K

    2                256       4K

    4                512       12K

    8                 2K        48K

(b). Assembly instructions:

1.Allows us to work at a slightly higher level than machine language.

2.Allows us to use symbolic names for opcodes

3.Allows us to use symbolic names for memory locations -

3.1.SUM, PRODUCT

3.2.Don’t need to know every address of every storage location.

4.Calculates addresses for us – really a big deal!

5.Helps to allocate memory locations.

6.Provides additional error checking

The MSP430 is supported by the following assembly language development tools:
• Assembler
• Archiver
• Linker
• Library information archiver
• Absolute lister
• Cross-reference lister
• Object file display utility
• Disassembler
• Name utility
• Strip utility
• Hex conversion utility

(c).Jump Instructions:

Jump instructions are used to direct program flow to another part of the program.

The condition on which a jump occurs depends on the Condition field consisting of 3 bits:

JMP : unconditional jump (no condition check)

JNC/JLO : jump if carry flag equal to zero

JC/JHS : jump if carry flag equal to one

JL : jump if lower (less) (N ¹ V)

JGE : jump if greater than or equal (N = V)

(d):

dword in 16-bit mode

fword in 32-bit mode

(f):

Values: src, dst, src and dst, src or dst
If no source or destination is specified, the \"src or dst\" keywords are applied.
For example, \"host 10.2.2.2\" is equivalent to \"src or dst host 10.2.2.2\".

 Why are the constants 1. 2, 4, 8 considered as common constants in MSP430? How many assembly instructions does MSP430 have? (how many real instructions, emulat
 Why are the constants 1. 2, 4, 8 considered as common constants in MSP430? How many assembly instructions does MSP430 have? (how many real instructions, emulat

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site