Many people are new to 64-bit mode.
clears all 64-bits
puts 123 in low 32 and clears upper 32.
Displacement mode is RIP relative.
That is a relative addressed memory location that must be within 2 Gig of the RIP.
Segment registers FS and GS are set with a model specific registers. I use them to point to the current task record and the current cpu core record. they are tricky to use because of the RIP relative addressing mode.
You cannot do this:
MOV RAX, FS:[TASK_DATA]
I put the self address of the task record at offset zero in my task struct, so my compiler can use it easier.
MOV RAX,FS:[RAX] ;self address of task record