Program for declare the threshold, Assembly Language

Assignment Help:

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.


Related Discussions:- Program for declare the threshold

8086 program, program to arrange a given set of numbers in descending order...

program to arrange a given set of numbers in descending order

Write an assembly program to find out largest number, Program :  Write an...

Program :  Write an assembly program to find out the largest number from a given unordered array of 8-bit numbers that stored in the locations starting from a known address. S

Sbb-arithmetic instruction-microprocessor, SBB: Subtract  with Borrow  :- ...

SBB: Subtract  with Borrow  :- The subtract with borrow instruction subtracts the source operand and the borrow flag (CF) which might reflect the result of the past calculations,

Summation Program., Write a program to solve problem 9, Summation Program, ...

Write a program to solve problem 9, Summation Program, on page 179 of chapter 5 in the textbook (book:kip Irvine Assembly Language sixth edition)

Web services. , describes vertical and horizontal web services protocols. N...

describes vertical and horizontal web services protocols. Next, identify the similarities and differences between vertical and horizontal web services protocols. Finally, explain w

Instructions, Difference between div and idiv

Difference between div and idiv

Sub-arithmetic instruction-microprocessor, SUB: Subtract :- The subtract in...

SUB: Subtract :- The subtract instruction subtracts the source operand from destination operand and result is left in the destination operand. Source operand might be memory locati

Hi, i have a question.

i have a question.

Write program that will generate array of ten random number, 1. Write a pro...

1. Write a program that will generate an array of ten random 32-bit integers, and that will  display on the monitor the numbers followed by either the words " has the fourth bit se

Icwi-microprocessor, The definitions of the bits in ICWI are following: ...

The definitions of the bits in ICWI are following: Always set to the value 1. It directs the received byte to ICWI as oppose to OCW2 or OCW3. Which also utilize the even addr

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd