XP0 EQU 30H XP2 EQU 31H ORG 0000H AJMP MAIN ORG 0030H MAIN: clr p2.1 SETB P2.0 RST: MOV XP0,#0H MOV XP2,#0H MOV R4,#0H; LOOP: NOP LCALL LOOP1 NOP NOP LCALL LOOP2 INC R4 CJNE R4,#8H,LOOP LJMP RST LOOP1: MOV P0,#0H MOV DPTR,#TP2 MOV A,XP2 MOVC A,@A+DPTR MOV P2,A INC XP2 RET LOOP2: MOV DPTR,#TP0 MOV A,XP0 MOVC A,@A+DPTR MOV P0,A INC XP0 RET TP0: DB 30H,48H,44H,22H,44H,48H,30H,00H ;心型 TP2: DB 07Fh,0BFh,0DFh,0EFh,0F7h,0FBh,0FDh,0FEh ;TP0: DB 00H,41H,22H,14H,08H,14H,22H,41H ;叉型 ;TP2: DB 07Fh,0BFh,0DFh,0EFh,0F7h,0FBh,0FDh,0FEh ;TP0: DB 00H,08H,14H,22H,41H,22H,14H,08H ;菱型 ;TP2: DB 07Fh,0BFh,0DFh,0EFh,0F7h,0FBh,0FDh,0FEh ;TP0: DB 00H,1EH,12H,12H,7FH,12H,12H,1EH ;中字 ;TP2: DB 07Fh,0BFh,0DFh,0EFh,0F7h,0FBh,0FDh,0FEh ;TP0: DB 00H,3CH,42H,42H,42H,42H,3CH,00H ;圆形 ;TP2: DB 07Fh,0BFh,0DFh,0EFh,0F7h,0FBh,0FDh,0FEh END