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