Program to average ten 16-bit values, Assembly Language

Write a MC68HC12 assembly language program to average ten 16-bit values that are stored starting at address $1100. Place the two-byte result at $1110. Use indexed addressing.

Using the FCB or FDB directives might be useful here.

FCB (Form Constant Byte) Example:

ORG $4000

FCB $02, $05;

(The above two lines will place constant byte $02 in address $4000, and constant byte $05 in address $4001)

FDB (Form Double Byte)

 Example:

ORG $4000

FDB $02, $05, $2445;

(The above two lines will place constant bytes as explained below:

 $00 in address $4000, and $02 in address $4001,

 $00 in address $4002, and $05 in address $4003

 $24 in address $4004, and $45 in address $4005

Posted Date: 3/8/2013 12:07:46 AM | Location : United States







Related Discussions:- Program to average ten 16-bit values, Assignment Help, Ask Question on Program to average ten 16-bit values, Get Answer, Expert's Help, Program to average ten 16-bit values Discussions

Write discussion on Program to average ten 16-bit values
Your posts are moderated
Related Questions
1. Write a program that calculates the Fibonacci series: 1, 1, 2, 3, 5, 8, 13, ….. (Except for the first two numbers in the sequence, each number is the sum of the preceding two n

String Manipulation Instruction A series of words or data bytes are available in memory at consecutive locations, to be mention to individually or collectively, are known as by

ADC: Add with Carry:- This instruction performs the similar operation a like ADD instruction, but adds the carry flag bit (which might be set as a result of the previous calculatio

write and run a programme using 8086 assembly language that interchange the lower four bits of AL registered with upper four bits.

Interrupt When the CPU detects an interrupt signal, it stops activity of current and jumps to a special routine, known an interrupt handler. This handler then detects why the i

Using the following table as a guide, write a program that asks the user to enter an integer test score between 0 and 100. The program should display the appropriate letter grade.

1. Write an assembly program that adds the elements in the odd indices of the following array. Use LOOP. What is the final value in the register? array1 DWORD 10, 20, 30, 40, 50, 6

CMP: Compare: - This instruction compares the source operand, which can be a register or memory location an immediate data with a destination operand that might be a register or a

How to write an assembly program The initial step in writing an assembly language program is to identify and study the problem. After studying the problem, choose the logical m

IRET : Return from ISR:- When an interrupt service routine is called, before transferring control to it, the IP, CS  register and flag registers are stored in the stack to ment