The symbol "$$" always gives value 0
[ORG 0]
jmp 07C0h:start ; initialize CS:IP values (go to code segment 0x07C0)
SECTION .text
start:
; Update the segment registers
mov ax, 0x7C0 ; 0x7C0 is code segment address, same initiated to other registers
mov ds, ax
mov es, ax
mov ss, ax
mov si, hello ; print hello string on the screen
cld ; clear direction flag (set DF = 0) to increment SI register
.l1:
lodsb ; load [SI] contents in to AL register and increment SI = SI + 1
cmp al, 0 ; compare 0 (null) is received
je .l2
mov ah, 0Eh
int 10h
jmp .l1 ; continue to lable 'lbl_1'
.l2:
hello db 'Welcome hello world', 0
times 510-($-$$) db 0
dw 0AA55h
when it will give different value? any example please..