I've been following a few examples on writing assembly and they use a temporary register to pass an immediate value to a segment register. Why is there a need to place the immediate in some register before putting it in the segment register?
Example:
movw $0x7c00, %ax
movw %ax, %ds
...
...
movw $0x6000, %ax
movw %ax, %ss
Why not instead directly put the immediate in the segment register?
movw $0x7c00, %ds
...
movw $0x6000, %ss