![]() |
I need some help with some basic concepts here.
Hello! I'm a beginner of IBM PC assembly language programming and I'm confused with some concepts here so think I need some help.:D
What are 32-bit instructions and what are 16-bit instructions? What is operand-size attribute? And with the MOVSX/MOVZX instrucion, if the destination operand is a 32-bit register and the source operand is a memory location, how does the machine decide whether to read a byte or a word from that location? Thank you in advance!:D |
Re: I need some help with some basic concepts here.
(1) Do you mean 16 bit and 32 bit instructions or registers ??
16 bit registers are ax, bx, cx, dx and 32 bit registers are eax, ebx, ecx, edx. (2) Operand size : Any time a memory reference is given as part of an instruction, the size of the memory operand is either implied or must be specified. Consider this : Code: asm
Now, consider this : Code: asm
Correction : Code: asm
Code: asm
(3) Partly answered in (2). Look at the first example above : Code: asm
Code: asm
Hope I cleared your doubts. :pleased: |
Re: I need some help with some basic concepts here.
very well explained saswat..
|
Re: I need some help with some basic concepts here.
A 32-bit instruction is an instruction that takes up 32 bits, i.e. 4 bytes, whereas a 16-bit instruction is one that takes up 2 bytes.
Lots of CPUs have varying length instructions, even the old Z80 did; most were one byte but some were as long as 4 bytes. |
Re: I need some help with some basic concepts here.
Quote:
|
| All times are GMT +5.5. The time now is 14:35. |