| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
beginner question specifying size
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! |
|
#2
|
||||
|
||||
|
Re: beginner question specifying size
There is a small trick: Just will it up with nulls.
Code:
; And so on mov eax, 000010h mov ax, 0010h mov ah, 10h
__________________
I am not offering technical guidiance via email or IM Come on share your photo with us! CG members photo album! Use the Code Tags! |
|
#3
|
||||
|
||||
|
Re: beginner question specifying size
If data is a dword (4 bytes) then you just write
mov dword [data], 10 |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|