Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Implement a Mano Basic Computer assembly program to copy ArrayA of length 10 bytes
to ArrayB of same length in the RAM memory of the Mano Basic Computer main memory.
During the moving process, the program must clip the values between 100 and 200 to the updated values. Here is a high-level explanation of the implementation in pseudo code. You need to convert this to Mano Basic Computer Assembly.

i=0;
Start: Read ArrayA[i] to value;
If value >200 then value =200;
If value <100 then value =100;
Copy value to ArrayB[i];
I++;
If i==10 Exit Loop;
Jump to Start;

What I have tried:

LDA A
SZA
BUN NZR
HLT
NZR, CMA
INC
STA CTR
CLA
LOP, ADD B
ISZ CTR
BUN LOP
HLT
A,DEC 1023
B,DEC 1023
CTR,HEX 0000
END
Posted
Updated 9-Apr-22 6:50am
Comments
jeron1 9-Apr-22 19:32pm    
Is there a specific question?
OriginalGriff 10-Apr-22 4:19am    
And?
What does it do that you didn't expect, or not do that you did?
What have you tried to do to find out why?
Are there any error messages, and if so, where and when? What did you do to make them happen?

This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900