Assembler, find out if there are two zeros in the pool running around. Message of words
-
data segment mass dw 10,20,30,479,-347,40,50,70,124,97 data ends code segment assume cs: code, ds: data start: mov ax, data mov ds, ax lea bx, mass mov cx, 10 mov ax, 0 beg: mov ax, [bx] or ax, [bx+2] jz NN inc bx inc bx NN: mov ax,1 loop beg quit: mov ax, 4c00h int 21h code ends end start
We need to know if there are two zeros going in a row. Why turns the unit out if there's no zero in the body, how do you fix it?
-
It's nothing code
NN: mov ax,1 loop beg
You always do.
at
[bx] or [bx + 2] == 0
You're jumping right there, and if the condition isn't met, a couple of times.inc bx
Come on.I'd rather do that.
mov ax, [bx] or ax, [bx+2] jnz NN mov dx,1 NN: inc bx inc bx loop beg quit:
If I'm right,
P. S.
That you're a double zero flag.
ax
write, which is further used for other purposesmov ax, 4c00h
?