Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Pep / 9 Assembly language program that takes a number from input, then subtracts 2 5 from the input value. Next the program

Write a Pep/9 Assembly language program that takes a number from input, then
subtracts 25 from the input value. Next the program should add 35 to the number. If the result is higher
than 80, print higher to output. If the result is lower than 80, print the number to output. Allow the
user to enter numbers until a 0(zero) is entered.
* Your output must match the output below
INPUT: 773400
OUTPUT:
higher
13
50
Comment from teacher : the loop doesn't work correctly. You are using stack relative addressing and using the SUBSP instruction twice. If you are doing this, you should only use it once here. In addition, you are missing the ADDSP instruction which resets the stack. The easier way to do this is to use d and i addressing. You also have the msg: symbol which is redundant.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions