Hi,
atilali wrote:
Is it allowed to use EDX register for addressing like that(MOV WORD PTR [edx],ax) in real mode?
Yes. In real mode (and in 16-bit code in general - e.g. including 16-bit protected mode code) the default is "16 bit", but that default can be overridden with instruction prefixes and nothing prevents you from using 32-bit registers/addresses/instructions (with appropriate size override prefixes) if the CPU supports it (80386 or later).
In 32-bit code it's the opposite - the default is "32 bit", but the same prefixes can be used to override that if you want to use 16-bit registers/addresses/instructions. For 64-bit code things get a little strange - the default is typically "32-bit", and prefixes can be used to get 16-bit or 64-bit.
Fortunately the assembler will handle the size override prefixes for you (you can just do whatever you like and let the assembler figure them out.
Cheers,
Brendan