These are some functions to access various segment registers (%cs, %ds, %ss) which makes your work a bit easier.
get_cs
Get CS selector.
get_ds
Get DS Selector.
get_ss
Return SS selector.