CLKPIN BIT P1.6 D1PIN BIT P1.5 LOADPIN BIT P1.7 LCDBUF EQU 10H LCDBUFEND EQU LCDBUF+(N-1) START: MOV SP,#60H MAIN: CALL COUNT CALL TRANSRAM JMP $ COUNT: RET TRANSRAM: CLR LOADPIN MOV R1,#LCDBUF TSR: MOV A,@R1 CALL TRANSBYTE INC R1 CJNE R1,#LCDBUFEND+1,TSR SET LOADPIN RET TRANSBYTE: MOV R0,#8 TSB: RRC A CALL TRANSBIT DJNZ TSB RRC A RET TRANSBIT MOV D1PIN,C SETB CLKPIN CLR CLKPIN SETB CLKPIN RET