Question: I need to understand this more and this answer that people are copying as their own answers is not helping. Please do not copy and
I need to understand this more and this answer that people are copying as their own answers is not helping. Please do not copy and paste this...
"1)In this first first code the movb $0xF, (%ql) .In this (%ql) is not corrctly mentioned .And also you dono't say the what processor.q1 is a 8 bit register atleast in x86 processors.But itcannot be used in addressing.
An assembly instruction is invalid is that there is no such instruction for the given processor. There is no possible way to encode this instruction. In this case (assuming x86), using bl or any other 8-bit register neither for addressing has not been considered necessary.
2)In this second code movl %eax,$0xFA.In this we cannot use %eax as a address register.And the %eax is a 32 bit register.
3) In this third code movl %eax,%bx as mentioned that %eax as a address register.And the %eax is a 32 bit register.bx is the memory location whose address is contained in the register eax
4)In this fourth movb %ah,%sh here we have mentioned as a register addressing but this is not a correct format to move one address to the another address.
5) In this fifth movw 4(%esp), (%ebx) this instruction is also not valid because %ebx as a address register.And the %ebx is a 32 bit register.bx is the memory location whose address is contained in the register esp"
Each of the following lines of code generates an error message when we invoke the assembler. Explain what is wrong with each line.
1 movb $0xF, (%ql) 2 movl %eax,$0xFA 3 movl %eax,%bx 4 movb %ah,%sh 5 movw 4(%esp), (%ebx)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
