Question: I have this assembly code that is supposed to take in an input and then print the next integers up to 5 . for some
I have this assembly code that is supposed to take in an input and then print the next integers up to for some reason tho it isnt compiling on pep I need help fixing. PLEASE do not change the format of the code:
BR main
limit: BLOCK ;constant
number: EQUATE ;local variable
charIn: EQUATE ;input device
charOut: EQUATE ;output device
space: ASCII ;space character
;
main: SUBSP i ;push #number
DECI number,s ;scanfd &number
while: LDWA number,s ;if number limit
CPBA limit i
RETTR
ADDA s
NEGA
STWA number,s ;number
STRO number,d ;printfd number
CHARO space,d ;printf
BR while
ADDSP i
RET
END
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
