1

I run the following program in the 8085 simulator and when it hits address 0016 ANI F0 does not work properly. Is it a bug or I am missing something?

enter image description here

MVI L,17
MVI E,99

MOV A,L 
ANI 0F                                      
MOV M,A                                             
MOV A,E                                                                    
ANI 0F                                      
ADD M                           
CPI 09                                       
MOV B,A
JC MSD                                                           

ADI 06                           


MSD:
MOV C,A
MOV A,L 
ANI F0 //Here the 17 becomes 07 when it should be 10
MOV M,A 
MOV A,E 
ANI F0 
ADD M 
JC ADD60
CPI 90
JNC ADD60

ADI 60 
END:
ADD C 
STA 2300 
HLT 

ADD60: 
ADI 60
CALL END
themhz
  • 8,335
  • 21
  • 84
  • 109
  • What is the full opcode? `E6 F0` or `E6 0F`? Maybe the assembler interpreted `F0` as `0x0F` instead of `0xF0`. But in any case, it seems to be a bug. – Martin Rosenau Apr 21 '19 at 05:13
  • hello did you also run the code and get the same result? its E6, you can see it in the screenshot – themhz Apr 21 '19 at 19:23

0 Answers0