i am not 100% sure because i have not used them in my assembly before (32/64bit at&t linux) but from what ive read they are segement registers to help point your program to your next byte of code.
equ on the other hand is short for equate. it takes your equation and stores the output at a label or register you specify (if i recall correctly). i usually use it to calculate the length of strings so i may pass it to system calls that print data to STDOUT.
something like this
Code
section .data ; section for initialized data
str: db 'Hello world!', 0Ah ; message string with new-line char at the end (10 decimal)
str_len: equ $ - str ; calcs length of string (bytes) by subtracting this' address ($ symbol)
; from the str's start address
an example of how i would use it is
Code
.section .data
enter_pass:
.ascii "Enter the password\n\0"
password:
.ascii "abgirl"
.equ password_len, . - password
.section .bss
.equ in_pass_size, 500
.lcomm in_pass, in_pass_size
.section .text
.global _start
_start:
movl $1, %ebx
movl $enter_pass, %ecx
movl $20, %edx
movl $4, %eax
int $0x80;print string to $1 (stdout)
movl $0, %ebx
movl $in_pass, %ecx
movl $in_pass_size, %edx
movl $3, %eax
int $0x80;grab input from STDIN ($0)
hopefully that helped you some
This post was edited by AbDuCt on Mar 20 2013 11:58am