Possible Duplicate:
NASM 16bit Intel
I am working on assembly code for simple microprocessor in microprocessor course. I am writing a program that:sums six elements, stored in memory starting from address 300, but ignores those that are 80 hex or above (>=80h
) OR 20 hex or below (<=20h
). The program should stop after 6 comparisons even numbers were added or not.
Here's my code:
E 300 30 40 50 60 70 75
A 100
100:MOV AX,2FF
103:ADD AX,1
106:CMP AX,306
109:JAE 11C
10B:MOV BL,[AX]
10E:CMP BL,20
111:JBE 103
113:CMP BL,80
116:JAE 103
118:ADD CL,BL
11A:JMP 103
11C:INT3
But I'm receiving an error on this line:
10B:MOV BL,[AX]
Does anyone know why?