logo
down
shadow

Moving AX into CL - Invalid combination of opcode and operands


Moving AX into CL - Invalid combination of opcode and operands

By : le_van_0201
Date : November 17 2020, 01:00 AM
it fixes the issue The problem, as the comment to your original question states, is that you're trying to move the contents of a 16 bit register into an 8 bit register. You can't do that because the registers are different sizes.
If you want to move data from the AX register into the CL register, you have to decide if you want the low bits (the AL register) or the high bits (the AH register). That is, you can write:
code :
mov cl,al   ; moves the low 8 bits of AX into CL
mov cl,ah   ; moves the high 8 bits of AX into CL
call lbachs     ; Convert LBA to CHS

mov ah, 0x02        ; Read disk sectors function
mov al, 0x01        ; Read one sector only (512 bytes)
mov dl, 0x00        ; Drive 0 (Floppy Disk 1)

mov cl, ax      ; Sector - Stored in AX - ERROR
mov dh, bx      ; Head - Stored in BX - ERROR
mov ch, cx      ; Cylinder - Stored in CX - ERROR
call lbachs

mov ch, cl      ; Cylinder (returned in CX by lbachs)
mov cl, al      ; sector number (returned in AX by lbachs)
mov dh, bl      ; head (returned in BX by lbachs)
mov ah, 02      ; Read disk sectors function
mov al, 0x01    ; one sector
mov dl, 0x00    ; Drive 0


Share : facebook icon twitter icon
Cannot shift to the right because of an invalid combination of opcode and operands

Cannot shift to the right because of an invalid combination of opcode and operands


By : n8n
Date : March 29 2020, 07:55 AM
wish help you to fix your issue The instruction SHR r32, m8 doesn't exist. If you want to shift by a variable amount you need to use the CL register, as in:
code :
mov cl,[shiftrightvalue]
shr ebx,cl
Invalid combination of opcode and operands error

Invalid combination of opcode and operands error


By : h.salari
Date : March 29 2020, 07:55 AM
Hope this helps I am trying to write a program which takes the binary input from a text file and sends it as a parameter to an assembly function. That assembly function must print this binary input to the screen. The input is sent from c code to assembly code by its address. , I wonder what have you tried to do in this line:
code :
mov msg, [esp+8]
mov eax, [var1]
mov [var2], eax
Invalid combination of opcode and operands

Invalid combination of opcode and operands


By : RDX12
Date : March 29 2020, 07:55 AM
Hope that helps Which architecture is this, and which assembler? Looks like i386 in Intel/NASM-ish syntax to me (but it's just a small snippet). Which line of code is the error on? In any case you can't do this:
Invalid combination of opcode and operands? (x86 DOS)

Invalid combination of opcode and operands? (x86 DOS)


By : John Warmann
Date : March 29 2020, 07:55 AM
may help you . Intel architecture processors generally can't transfer data from memory to memory in one instruction. You need to write something like:
how to fix - invalid combination of opcode and operands

how to fix - invalid combination of opcode and operands


By : Gaurav Joshi
Date : March 29 2020, 07:55 AM
may help you . The push al instruction does not exist.
Even if it did exist then pushing a byte followed by popping a dword would leave you with an unbalanced stack.
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org