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
The addressing modes for the sequential control transfer instructions are described below:   1. Immediate: Immediate data is a part of instruction,in this type of addressin

Using DEBUG DEBUG.COM is a DOS efficacy that facilitates the trouble-shooting and debugging of assembly language programs. In particular case of personal computers, all of th

Write a program to separate out positive and negative numbers from a given series of 16-bit hexadecimal numbers.

Computes the integral square root: Problem: Square Root:   For this problem you will write a short assembly program that computes the integral square root of an input numb

Explain the architecture of the file transfer protocol ftp in terms of clients, servers, sockets

ROL : Rotate Left without Carry: This instruction rotates the content of the destination operand to the left by the specified count bit-wise excluding the carry. The most signific

The 486 Introduced in the year 1989 the 80486 did not feature any radically new processor technology. Instead, it joints a 386 processor, a cache memory controller and a math c

LODS : Load String Byte or String Word:- The LODS instruction loads AL/AX register by the content of a string pointed to by DS:SI register pair. The SI is automatically modifie

PTR : Pointer:- The pointer operator which is used to declare the type of a variable, label or memory operand. The operator PTR is prefixed by either WORD or BYTE. If the prefi

Any small project which can implement on any software. No need any external hardware approach.