I'm using emu8086. I've a question which tasked me to display what we see on seven segment displays after converting from its hexa inputs. I should input my data in hexa, if it matches the hexa input of the seven segment table, it displays the decimal number, eg. 3FH = 0, 06H = 1. I'm using array to implement this program. Below is the working source program:
ORG 100H
MOV AL,[1840H] ;input in this memory location
MOV CL,0AH ; initialize length counter
AGAIN: CMP AL,MSG+BX ; compare to check if the data matches
JE RESULT ; jump to RESULT if data matched
INC BX ; increase decimal output by 1 if data not matched
LOOP AGAIN
MOV [1841H],0FFH ; display FF if no data matched the array
HLT
MSG DB 3FH, 06H, 5BH, 4FH,66H, 6DH,7DH,07H,7FH,6FH ; my array with hexa inputs
RESULT: MOV [1841H],BL ; display data if matched
I had this program working. But I've tried something which I switch my array MSG DB 3FH...
to a position after ORG 100H
and before MOV AL,[1840H]
, running the program will give an error message
"Unknown opcode skipped: 66, not 8086 instruction - not supported yet".
I can't find the reason why.
Anyone would have any idea what's the reason and can I fix anything to make my program work if I were to keep the array between ORG 100H
and MOV AL,[1840H]
?