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
It might possibly be a school assignment - to analyze a program and figure out what it _actually_ does or does not do. Just to prove some understanding of the processor.