第三章(上)
3.12: ORG 0000H LJMP START ORG 0100H START:
MOV A,#83H MOV R0,#17H MOV 17H,#34H ANL A,#17H ORL 17H,A XRL A,@R0 CPL A AJMP $ END
3.13: ORG 0000H LJMP START ORG 0100H START:
ORL A,#01H ANL A,#0FH AJMP $ END
3.15: (1)
ORG 0000H LJMP START ORG 0100H START:
MOV DPTR,#0020H MOVX A,@DPTR MOV R0,A SJMP $ END
(2)
ORG 0000H LJMP START ORG 0100H
START:
MOV DPTR,#0020H MOVX A,@DPTR MOV 20H,A AJMP $ END
(3)
ORG 0000H LJMP START ORG 0100H START:
MOV DPTR,#2000H MOVX A,@DPTR MOV 20H,A AJMP $ END
(4)
ORG 0000H LJMP START ORG 0100H START:
MOV DPTR,#2000H MOVX A,@DPTR MOV DPTR,#0020H MOVX @DPTR,A AJMP $ END
(5)
ORG 0000H LJMP START ORG 0100H START:
MOV DPTR,#0020H MOV R0,#46H MOV 00H,R0 MOV R1,00H MOVX A,@DPTR MOV R0,A MOV A,R1 MOVX @DPTR,A AJMP $
END
3.16: ORG 0000H JMP START ORG 0100H START:
MOV DPTR,#2000H MOV R0,#50 MOV R1,#30H MOV R2,#01H LOOP: MOV A,R2 MOVX @DPTR,A INC DPTR INC R2
DJNZ R0,LOOP MOV DPTR,#2000H LOOP1:
MOVX A,@DPTR MOV @R1,A INC DPTR INC R1
DJNZ R0,LOOP1 SJMP $ END