UMBC | CMSC 313 -- Assembly Language Segment | Previous | Next |
MOV r/m8,r8 MOV r/m16,r16 MOV r/m32,r32 MOV r8,r/m8 MOV r16,r/m16 MOV r32,r/m32 MOV r/m16,Sreg MOV Sreg,r/m16 MOV AL,moffs8 MOV AX,moffs16 MOV EAX,moffs32 MOV moffs8,AL MOV moffs16,AX MOV moffs32,EAX MOV r8,imm8 MOV r16,imm16 MOV r32,imm32 MOV r/m8,imm8 MOV r/m16,imm16
The definition of the instruction is:
NOTE: There is a problem with the definition of the term "word". In all of Intel documentation, it means a 16-bit value. During the Digital Logic segment of this course, it means the size of the registers, which on a Pentium is considered to be 32 bits. Intel describes the 32-bit value as a doubleword.
There are a number of specialized MOV instructions are less general. We are not going to use all of them!
In the previous example, you have to make sure names knows what the size of the constant is by using the dword size specifier. The others are BYTE, WORD, QWORD, and TWORD.
There is a restriction that you can not have both the source and destination as memory locations, so