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
SHR : Shift Logical Right: This instruction performs bit-wise right shifts on the operand word or byte that might be reside in  a memory location or a register, by the specified c

NOT : Logical Invert: The NOT instruction complements (inverts) the contents of an a memory location or operand register bit by bit. The instance are as following: Example :

LDS/LES Instruction execution :  LAHF : Load AH from Lower Byte of Flag: - This instruction loads the AH register with the lower byte of the flag register. This instruction ca

a- Trace the following program fragment and find out the content of ax after the          the execution of the program.         X db   5,7  -3,-9,4,-7,9               Mov

Pointer and Index Registers The pointers contain offset within the specific segments. The pointers BP, IP and SP generally containoffsets within thedata, code and stack segment

GROUP : Group the Related Segments:- The directive which is used to form logical groups of segments with same purpose or type. This isused to inform the assembler to form a log

Write an application that does the following:(1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values;

hey ,, I need to know how to let a symbol moves with mouse ??

Logical Instruction : This type of instructions is utilized for carrying out the bit by bit shift, basic logical operations or rotate. All of the condition code flags are affe

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?