试题详情
简答题 试分析下列程序段,当程序执行后,位地址00H和01H中的内容将为何值? P1口的8条I/O线为何状态?  CLR   C  MOV   A,#66H  JC    LOOP1  CPL   C  SETB  01H LOOP1: ORL  C,ACC.0  JB  ACC.2,LOOP2  LOOP2: MOV  P1,A
  • C.LR   C         ; (Cy)=0
    M.OV   A,#66H    ; (A) = 66H = 0110 0110 B
    J.C    LOOP1  ;  因 此时(Cy)=0 ,所以不跳转
    C.PL   C  ;  (Cy) = 1
    S.ETB  01H  ; (01H)= 1
    L.OOP1: ORL  C,ACC.0 ;  (Cy) =(Cy)∨(ACC.0) = 1
    J.B  ACC.2,LOOP2 ;  因(ACC.2) = 1
    L.OOP2: MOV  P1,A  ;  (P1)= 0110 0110 B
  • 关注下方微信公众号,在线模考后查看

热门试题