I'm on linux with nasm trying to move registry value ax
to registry eax
like this:
mov ebx,1
mov ax,2
mov ecx,ax
but I get the error: prueba.asm:12: error: invalid combination of opcode and operands
and I want to know what exactly is wrong.
I'm on linux with nasm trying to move registry value ax
to registry eax
like this:
mov ebx,1
mov ax,2
mov ecx,ax
but I get the error: prueba.asm:12: error: invalid combination of opcode and operands
and I want to know what exactly is wrong.
I have the following code:
push rbp
mov rbp, rsp
push rax
push rcx
push rdx
push rsi
push rdi
mov rax, QWORD[indiceVector]
mov rcx, 10
div rcx
mov rsi, rax
mov rdi, rdx
... and in the "div rcx" instruction it tells me "Floating point exception (generated 'core')" and it is not a division by 0, since debugging it gives me 23 divided by 10. The funny thing is that in some other function I have almost identical code and it doesn't give me the exception. Does anyone know why it gives this error? I have another question: To divide by 10, is the way I have done it correct or is there a better one?
I'm trying to build an assembler app in Visual Studio. I already tried it in masm and it worked, it is a very simple application:
.code
main proc
mov eax,4
add eax,5
It gives me the error LNK1221 however I already added /SUBSYSTEM.
What would be the Castilianization of the term build in programming? As far as I know, it's used when a compiler compiles something, but it's not the same thing, because when you work with an assembler and assemble something, it 's also called build . Maybe I'm not understanding the true meaning of this expression. How would it be translated? I don't think it's build .
I have a question about the sum in registers for MASM Assembler
TITLE Suma variables
INCLUDE Irvine32.inc
.data
a dword 10000h
b dword 40000h
valorFinal dword ?
.code
main PROC
mov eax,a ; empieza con 10000h
add eax,b ; suma 40000h
mov valorFinal,eax ;
call DumpRegs
exit
main ENDP
END main
My doubt is when I use add
with b
, am I adding only the value of the variable, or am I adding the value and the address in memory, because I understand that to obtain the specific value it must be enclosed in []
.