Program for declare the threshold, Assembly Language

1. Start your program at address $8500. To do this you need to inform the assembler, through the EQU and ORG assembler directives, that you want your program to start at $8500. This can be done as shown below:

 (leave 2 tab-spaces) ROMSTART EQU $8500

 ORG ROMSTART

The first line above equates the string ROMSTART with $8500. If you mention ROMSTART in any subsequent part of your program, it will be replaced with $8500 during execution.

The second line tells the assembler that the assembly process should now proceed from the address specified by ROMSTART. (ORG can be used multiple times in your program if you wish to alter the assembly flow).

2. Read a set of three hexadecimal numbers located in memory addresses $4000, $4001, and  $4002 and store them to memory locations $0800, $0801, and $0802, respectively.

3. Read the three values from the new memory locations and check each one against a threshold value of $55. You can use the EQU directive at the beginning of the program to declare the threshold as follows:

THRESH EQU $55

4. If the value stored in memory location $0800 is higher (unsigned numbers) than the threshold value, compute the sum of the first five natural numbers. Store the number back to the memory location $0800.

5. If the value stored in memory location $0801 is higher (unsigned numbers) than the threshold value, store $00 to the same memory location.

6. If the value stored in memory location $0802 is higher (unsigned numbers) than the threshold value, subtract $10 from the value stored in the memory location $0802 and store the resulting value back to the same memory location.

Posted Date: 3/8/2013 12:08:57 AM | Location : United States







Related Discussions:- Program for declare the threshold, Assignment Help, Ask Question on Program for declare the threshold, Get Answer, Expert's Help, Program for declare the threshold Discussions

Write discussion on Program for declare the threshold
Your posts are moderated
Related Questions
Convert 751 to hex and show what it would look like stored at TheNumber WORD ? (hint: answer in hex pairs)

Maximim and Minimum mode 8088 system : In the maximum mode, the pin 880 is lastingly high. The functions and timings of other pins of 8088 are exactly similar to 8086. Due to t

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

(1) Write a program that will: (a) display "Enter Your Name:" (b) convert the entered name to Capital letters (if small), If any other character is entered, the program wil

SEG : Segment of a Label:- The SEG operator is which is used to decide the segment address of the, variable, label or procedure and substitutes the segment base address in plac

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.

I was wondering if you guys could offer me some advice and help on how to proceed - not answers- for a homework problem I am attempting. I am currently working on a "bomb" project

The problem to be solved and implemented with an ARM assembly language program You are asked to do some image processing on an image composed of characters shaped in For exa

Write a program on the assembly language to do the following: 1- Allocate array with 32bit 100 element 2- Prompt the user to enter the maximum or the upper bound of the rando

Write a program that allows a user to encrypt/decrypt a message using a shift cipher. The user should specify the key and the message. Your program should be able to handle messa