내가 (총회 8086에) 다음 의사 코드에 대한 점프를 구성 할 수는 :조립 여러 조건 점프
array = ...numbers set...
cl = 2
num = 0
si = 0
while(si != 11)
{
ax = 0
al = array[si]
// divide with assembly
div cl
if(ah = 0)
{
n+1
}
si+1
}
내가 그런 식으로 뭔가를 시도했다 :
.data
array db 0Fh, 45h, 0A1h, 78h, 0CFh, 0AAh, 8Fh, 19h ; Array
p db 0 ; Number of even numbers in the array
.code
xor si, si
xor cx, cx
mov cl, 2
again:
xor ax, ax
mov al, array[si]
div cl
cmp ah, 0
je eq
inc si
cmp si, 11
jne again
eq:
inc p
inc si
cmp si, 11
jne again
당신이 어떤이 있습니까 이 코드를 수정하는 방법 아이디어?
...
cmp ah, 0
jne noteq
inc p
noteq:
inc si
cmp si, 11
jne again