SS EQU P1 SCLK EQU P1.1 MOSI EQU P1.2 MIS0 EQU P1.3 PLAY EQU P1.4 REC EQU P1.5 STOP EQU P1.6 WDT EQU P1.7 RDBYTE: CPL WDT CLR SS CLR MOSI SETS SCLK MOV R2,#08H RDBYT1: CLR SCLK NOP MOV C,MISO RLC A SETS SCLK NOP DJNZ R2,RDBYT1 SETS SS RET WRBYTE: CPL WDT CLR SS CLR SCLK MOV R2,#08H WRBYTZ: CLR SCLK NOP RLC A MOV MOSI,C NOP SETB SCLK NOP DJNZ R2,WRBYTI SETB SS RET MOV A;#0F0H ACALL WRBYTE MOV A,#00H ACALL WRBYTE MOV A,#30H ACALL WRBYTE MOV A,#00H ACALL WRBYTE ACALL RDBYTE MOV ISDSTA,A ACALL RDBYTE