Click to See Complete Forum and Search --> : beginner question specifying size


pablowablo
January 18th, 2005, 11:30 AM
Hello,

How do I specify the size of my operands in an instruction?

I use nasm and I get an operation not specified error with

mov [data] , 10

I'm guessing this is because the assembler does not know how big it should move to data...


thanks!

NoHero
January 19th, 2005, 03:04 AM
There is a small trick: Just will it up with nulls.


; And so on
mov eax, 000010h
mov ax, 0010h
mov ah, 10h

svenhag
January 24th, 2005, 05:46 PM
If data is a dword (4 bytes) then you just write

mov dword [data], 10