SG segment org 0x100 start mov bx mov di cycle cmp bx di jnz notEqual

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
SG segment
org 0x100
start:
mov bx, a
mov di, 0
cycle:
cmp [bx+2*di],2
jnz notEqual
mov [bx+di],0
notEqual:
add di,2
cmp di, 8
jnz cycle
ret
a dw 1,2,5,2,8,2,8,2
SG ends