$mod51 org 00h mov P1,#01h acall command mov P1,#06h acall command mov P1,#38h acall command mov P1,#0eh acall command mov P1,#80h acall command back: mov P2,#11111110b Jnb P2.4,S1 JNB P2.5,S2 JNB P2.6,S3 JNB P2.7,S4 mov P2,#11111101b Jnb P2.4,S5 JNB P2.5,S6 JNB P2.6,S7 JNB P2.7,S8 mov P2,#11111011b Jnb P2.4,S9 JNB P2.5,S10 JNB P2.6,S11 JNB P2.7,S12 mov P2,#11110111b Jnb P2.4,S13 JNB P2.5,S14 JNB P2.6,S15 JNB P2.7,S16 sjmp back S1: mov P1,#'A' Acall display Ljmp back S2: mov P1,#'B' Acall display Ljmp back S3: mov P1,#'C' Acall display Ljmp back S4: mov P1,#'D' Acall display Ljmp back S5: mov P1,#'E' Acall display Ljmp back S6: mov P1,#'F' Acall display Ljmp back S7: mov P1,#'G' Acall display Ljmp back S8: mov P1,#'H' Acall display Ljmp back S9: mov P1,#'I' Acall display Ljmp back S10: mov P1,#'J' Acall display Ljmp back S11: mov P1,#'K' Acall display Ljmp back S12: mov P1,#'L' Acall display Ljmp back S13: mov P1,#'M' Acall display Ljmp back S14: mov P1,#'N' Acall display Ljmp back S15: mov P1,#'O' Acall display Ljmp back S16: mov P1,#'P' Acall display Ljmp back command: clr P3.0 clr P3.1 setb P3.2 acall delay clr P3.2 ret display: setb P3.0 clr P3.1 setb P3.2 acall delay clr P3.2 ret delay: mov R1,#100 L1: mov R2,#100 L2: mov R3,#50 L3: Djnz R3,L3 DjnZ R2,L2 Djnz R1,L1 Ret end