Question: Write an assembly language program to obtain the largest of the contents of memory location 2222H and 2223H and store the number to next memory location i.e. 2224H
Flow Chart
Algorithm
Step 1: Point HL register pair to memory location 2222H
Step 2: Load the data on memory location to accumulator
Step 3: Increment the HL register pair by one to point at memory location 2223H
Step 4: Load the data on memory location to register B
Step 5: Compare the content of accumulator with content of register B
Step 6: If no carry from Step 5: jump to Step 8: (i.e. A>B)
Step 7: Move the data in B to A (i.e. A<B)
Step 8: Increment the HL register pair by one to memory location 2224H
Step 9: Store content of Accumulator to memory location
Step 10: Terminate the program
Assembly language
Here is code for ALP to obtain largest of contents in memory location in 8085 Microprocessor.
Label | Instruction | Comments |
LXI H, 2222H ; | HL pair points to location 2222H | |
MOV A, M ; | Loads accumulator with the content of memory location (2222H) | |
INX H ; | HL pair now points to location 2223H, HL increased by one | |
MOV B, M ; | Loads register B with the content of memory location (2223H) | |
CMP B ; | Compares contents of B and A | |
JNC jump1: ; | Jumps to jump1: if no carry ( i.e. A>B) | |
MOV A, B ; | Moves data of B to A (i.e. A<B) | |
jump1: | INX H ; | HL pair points to next location |
MOV M, A ; | Stores content of Accumulator to memory location (2224H) | |
HLT ; | Terminates the program |
play youtube
play youtube
xvideos
xporn
Phim sex
What Vaccines Do Dogs Need Annually
Wordle Jan 19
What Is Threshold Amount
My Pet Frame
Box Score For World Series
Louisville Women S Basketball Roster
Apple Savings Account Cons
Cso Criminal Search Bc
What Were Kleenex Tissues Originally Used For
Mens All Birds
Is Better Call Saul Over
Waitrose Warwick Way
Usd To Rm
How Much Is A Fitbit
Civil Liabilities Definition
What Is A Fast Internet Download Speedhulk Smash Birthday Cake
Waitrose Warwick Way
Rabies Vector Species
Gonzo Move
What Is The Sherman Act