用74ls373输入(P2.7片选),74ls377输出(P2.6片选),试编制程序,从373顺次读入十个数据,取反后,从377输出。
答案:
74LS373(输入):7fffh
74LS373(输入):bfffh
MOVR7,#10
MOVR0,#30H
MOVDPTR,#7FFFH
LOOP0:MOVXA,@DPTR
CPLA
MOV@R0,A
INCR0
DJNZR7,LOOP0
MOVR7,#10
MOVR0,#30H
MOVDPTR,#0BFFFH
LOOP1:MOVA,@R0
MOVX@DPTR,A
INCR0
DJNZR7,LOOP1