Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i have this code and i have only one error code that is messing up everything please help this is the prompt i am wanting
i have this code and i have only one error code that is messing up everything please help this is the prompt i am wanting to achieve f g h i
instead of starting with the variables in registers, instead read the inputs from memory locations defined in a data section of your program, and output the result to another location in the data section this is my code below :
data
g: word # g input
h: word # h input
i: word # i input
result: word # Result storage
text
lw x g # Load g from memory into register x
lw x h # Load h from memory into register x
lw x i # Load i from memory into register x
add x x x # Calculate gh
addi x x # Subtract from gh result in x
addi x x # Calculate i store in temporary register x
sub x x x # Subtract i from gh result in x
sw x result # Store the result in memory location 'result'
Error in C:UsersflenoOneDriveDocumentsComp and archHwasm line column : sw: Too few or incorrectly formatted operands. Expected: sw tt
Assemble: operation completed with errors
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started