This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error in execution

in the below code mov A,80h does not work correctly.There seems to be 0FFh in 80h but
mov A,80h makes A=0;

        MOV     P0,#00H  ; P0=0
        MOV     P1,#01H  ;      P1=1
PLOOP1:
;       CALL    DELAY

PLOOP2:
        MOV     A,P1
        CJNE    A,#0,PLOOP2
PLOOP3:
        MOV     A,P1
        CJNE    A,#1,PLOOP3

        MOV     A,80H
        MOV     A,0A0H
        MOV     A,0A1H
        MOV     A,0A2H
        MOV     A,0A3H
        MOV     A,P0
        CPL     A
        MOV     P0,A
        JMP     PLOOP1

Parents
  • I run the same code in the EdSim and it works correctly therefore I think it is a compiler bug

    That logic has holes in it that one could throw a truck through.

    ; 80H contains 0FFh but this line makes A=0
    

    You've been repeating that claim about half a dozen times by now, and been challenged about it more often than that. Don't you think it might be time to finally begin investigating it's correctness in earnest, instead of repeating the same nonsense over and over?

Reply
  • I run the same code in the EdSim and it works correctly therefore I think it is a compiler bug

    That logic has holes in it that one could throw a truck through.

    ; 80H contains 0FFh but this line makes A=0
    

    You've been repeating that claim about half a dozen times by now, and been challenged about it more often than that. Don't you think it might be time to finally begin investigating it's correctness in earnest, instead of repeating the same nonsense over and over?

Children