Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create an assembly program using PEP/8 need iT DONE IN PEP/8 ONLY Create a progr

ID: 3861124 • Letter: C

Question

Create an assembly program using PEP/8

need iT DONE IN PEP/8 ONLY

Create a program named ifelse.pep and write an assembly language program to simulate execution of a C++ if-else statement. On startup the program will ask for a condition value and a user input value ( 2 variables ).

When the user input value is greater than or equal to the condition value print the messege "-user value- is Greater Than or Equal to -condition value-".When it is less than print the message "-user value- is Less Than -condition value-".

You will, of course, insert the proper values for -user value- and -condition value- and not print those exact words.

Be sure to lay out the logic (or flow) of the assembly program to match an if-else and use comments through out the code. In other words, clearly label in the code where each portion of the if-else starts and ends:

Explanation / Answer

BR main

cond: .EQUATE 100 ;setting the condition value to 100

num: .EQUATE 0 ;local variable #2d

;

main: SUBSP 2,i ;allocate #num

DECI num,s ;cin >> num

if: LDA num,s ;if (num >= cond)

CPA cond,i

BRLT else

STRO msg1,d ; cout << "user value- is Greater Than or Equal to -condition value"

BR endIf

else: STRO msg2,d ; cout << "user value- is Less Than -condition value"

endIf: ADDSP 2,i ;deallocate #num

STOP

msg1: .ASCII "user value- is Greater Than or Equal to -condition value-"

msg2: .ASCII "-user value- is Less Than -condition value-"

.END

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote