程序代写案例-ECED3204 -Assignment 2

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
ECED3204
Assignment 2
Due on Tuesday, December 08, 2020

Given a microprocessor with 6 general-purpose registers (R1, R2, …, R6) and the following ISA level
instructions (Rs and Rd can be any of registers R1 to R6):

ADD Rd, Rs- Adds the content of Rs to the content of Rd and stores the result in Rd
SUB Rd, Rs- Subtracts the content of Rs from the content of Rd and stores the result in Rd
INV Rd- Bit-by-bit inversion to the content of Rd and stores the result in Rd
AND Rd, Rs- ANDs the content of Rs to the content of Rd and stores the result in Rd
OR Rd, Rs- ORs the content of Rs to the content of Rd and stores the result in Rd
INC Rd- Increments the content of Rd and stores the result in Rd
MVI Rd, x0dddd- Moves the immediate hexadecimal value dddd to Rd
MOV Rd, Rs Moves the content of Rs to Rd
MOV Rd, [Rs]- Indirect movement of the content of Rs to Rd
JN label- Conditional jump to label if the result of the last operation is negative
JZ label- Conditional jump to label if the result of the last operation is zero
JNZ label- Conditional jump to label if the result of the last operation is not zero
JMP label- Unconditional jump to label

1- Given that this is a 16-bit microprocessor, what is the minimum number of bits required to code the
previous instructions without opcode expanding?
2- Using the previous instructions, write an assembly program that finds the maximum number in a
block of numbers in the memory residing in locations starting 0x1111 and ending in 0x2222 as shown
in figure 1.


Figure 1 memory model
for question 2

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468