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

Debug-microprocessor, Using DEBUG DEBUG.COM is a DOS efficacy that faci...

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

Flowchart, ALP to preform of two 16-bit numbers in register addressing mode...

ALP to preform of two 16-bit numbers in register addressing mode

Arithmetic instruction-microprocessor , Arithmetic Instruction :           ...

Arithmetic Instruction :               These instructions are usually perform the arithmetic operations, like subtraction ,multiplication, addition, and division along with th

Pc bus and interrupt system-microprocessor, PC Bus and Interrupt System ...

PC Bus and Interrupt System The PC Bus utilized a bus controller, address latches, and data transceivers (bidirectional data buffers). 1) Bus controller : ( Intel 8288 Bus

Define word (dw)- assemblers directive-microprocessor, DW : Define Word:- ...

DW : Define Word:- The DW directive serves the same purposes as the DB directive, but now it makes the assembler  which reserves thenumber ofmemory words (16-bit) instead of by

Xor-logical instruction-microprocessor, XOR: Logical Exclusive OR: The XOR...

XOR: Logical Exclusive OR: The XOR operation is again carried out in a similar way to the AND and OR operation. The constraint over operands are also similar. The XOR operation pr

Cache memory-microprocessor, Cache Memory Caching is a technology based...

Cache Memory Caching is a technology based on the memory subsystem of any computer. The majoraim of a cache is to accelerate the computer while keeping the cost of the computer

Pin description of 8086-microprocessor,  Pin Description of 8086 The ...

 Pin Description of 8086 The microprocessor 8086 is a 16-bit CPU available in 3 clock rates, for example 5, 8 and 10 MHz, packaged in a40 pin CERDIP or plastic package. The 8

Cache components-microprocessor, Cache components The cache sub-system ...

Cache components The cache sub-system may be divided into 3 functional blocks: Tag RAM, SRAM and theCache Controller. In real designs, these blocks can be implemented  by multi

Interrupt-microprocessor, Interrupt When the CPU detects an interrupt s...

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

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