Assembler mov issue
问题 I have the next code: mov ax,@data mov ds,ax Why I can not write just like this? mov ds,@data All source: .MODEL small .STACK 100h .DATA HelloMessage DB 'Hello, world',13,10,'$' .CODE .startup mov ax,@data mov ds,ax mov ah,9 mov dx,OFFSET HelloMessage int 21h mov ah,4ch int 21h END Thank you! 回答1: You can't, because the instruction set doesn't contain an instruction to do that. It is just one of the many idiosyncrasies of the x86. These kind of restrictions are fairly normal for assembly