Google Search

Thursday, November 10, 2011

DSP C PROGRAM perform logical operations on two numbers residing in memory.


LOGICAL OPERATIONS

Aim: - To perform logical operations on two numbers residing in memory.

Apparatus: - TMS 320C 5416 processor

Program: -

            .include “5416_IV.asm”
            .data
            .word   0003h,0007h   //  input numbers //
            .text
            .include “intvect.asm”


Begin   STM    #1000h,AR5   // memory location of first number //
            STM    #1001h,AR4   // memory location of second number //
            STM    #1500h,AR3   // memory location of result due to AND operation //
            STM    #1600h,AR2   // memory location of result due to OR operation //
            STM    #1700h,AR1   // memory location of result due to NEGATE operation //
            LD       *AR5,A
            LD       *AR4,B
            AND   A,0,A
            OR      B,0,B
            STL     A,*AR3
            STL     B,*AR2
            LD       *AR5,A
            NEG    A
            STL     A,*AR1
            .end

Result: - The logical operations are performed on a number.





1 comments:

Post a Comment