📄 access.lst
字号:
856 4 }
857 3
858 3 if( bSec_Part == 1 )
859 3 {
860 4 switch(ucZero_Cnt)
861 4 {
862 5 case 0:
863 5 bSec_Part = 0;
864 5 ucZero_Cnt = 0;
865 5 return 0;
866 5
867 5 case 1:
868 5 Getbit(array);
869 5 bSec_Part = 0;
870 5 ucZero_Cnt = 0;
871 5
872 5 if(!bBit)
873 5 {
874 6 return 1;
875 6 }
876 5 else
877 5 {
878 6 return 15;
879 6 }
880 5
881 5 case 2:
882 5 Getbit(array);
883 5 bSec_Part = 0;
884 5 ucZero_Cnt = 0;
885 5
886 5 if(!bBit)
887 5 {
888 6 return 2;
889 6 }
890 5 else
891 5 {
892 6 return 8;
893 6 }
894 5
895 5 case 3:
896 5 Getbit(array);
897 5 bSec_Part = 0;
898 5 ucZero_Cnt = 0;
899 5
900 5 if(!bBit)
901 5 {
902 6 return 12;
903 6 }
904 5 else
905 5 {
906 6 return 7;
907 6 }
908 5
909 5 case 4:
910 5 Getbit(array);
911 5 bSec_Part = 0;
912 5 ucZero_Cnt = 0;
913 5
914 5 if(bBit)
915 5 {
C51 COMPILER V7.06 ACCESS 11/21/2005 13:47:43 PAGE 16
916 6 Getbit(array);
917 6
918 6 if(!bBit)
919 6 {
920 7 return 4;
921 7 }
922 6 else
923 6 {
924 7 return 9;
925 7 }
926 6 }
927 5 else
928 5 {
929 6 Getbit(array);
930 6
931 6 if(!bBit)
932 6 {
933 7 Getbit(array);
934 7
935 7 if(!bBit)
936 7 {
937 8 return 3;
938 8 }
939 7 else
940 7 {
941 8 return 11;
942 8 }
943 7
944 7 }
945 6 else
946 6 {
947 7 Getbit(array);
948 7
949 7 if(!bBit)
950 7 {
951 8 return 10;
952 8 }
953 7 else
954 7 {
955 8 return 5;
956 8 }
957 7
958 7 }
959 6 }
960 5
961 5 case 5:
962 5 Getbit(array);
963 5 bSec_Part = 0;
964 5 ucZero_Cnt = 0;
965 5
966 5 if(bBit)
967 5 {
968 6 Getbit(array);
969 6
970 6 if(!bBit)
971 6 {
972 7 return 14;
973 7 }
974 6 else
975 6 {
976 7 return 13;
977 7 }
C51 COMPILER V7.06 ACCESS 11/21/2005 13:47:43 PAGE 17
978 6 }
979 5 else
980 5 {
981 6 Getbit(array);
982 6 if(bBit)
983 6 {
984 7 return 6;
985 7 }
986 6 }
987 5 }
988 4 }
989 3 }
990 2 }
991 1 }
992
993 void Getbit(unsigned char code *array)
994 {
995 1 if( ucCnt == 0 )
996 1 {
997 2 ucByte_Temp = *(array + uiCount);
998 2 ucCnt = 0x80;
999 2 uiCount++;
1000 2 }
1001 1
1002 1 bBit = (bit)(ucByte_Temp & ucCnt);
1003 1 ucCnt >>= 1;
1004 1
1005 1 }
1006 #else
//length represent the number of character
// character number of 1 bit font = 1
// character number of 2 bit font = 2
// character number of 4 bit font = 4
// length = (1 bit font amount) x 1 + (2 bit font amount) x 2 + (4 bit font amount) x 4
void Load_Font(unsigned char code *array, unsigned int start, unsigned int length)
{
unsigned char n,m;
unsigned char ucTemp[3];
#if(PARALLEL_PORT)
// unsigned char ucTemp1;
#endif
start = start * 9;
start += FONT_BASE_ADDRESS;
bRTD_SCSB = 0;
RTDSendAddr(OSD_ROW_90, WRITE, Y_INC);
ucTemp[0] = (unsigned char)((start >> 8) & 0x000f) | 0xd0;
RTDSendByte(ucTemp[0]);
ucTemp[0] = (unsigned char)(start & 0x00ff);
RTDSendByte(ucTemp[0]);
RTDSendStop();
bRTD_SCSB = 0;
RTDSendAddr(OSD_DATA_92, WRITE, N_INC);
do
{
for(m=0; m<9; m++)
{
//Rearrange the byte order
C51 COMPILER V7.06 ACCESS 11/21/2005 13:47:43 PAGE 18
ucTemp[0] = (*(array + 1) << 4) | (*(array + 2) & 0x0f);
ucTemp[1] = (*(array + 2) & 0xf0) | (*array & 0x0f);
ucTemp[2] = (*array & 0xf0) | (*(array + 1) >> 4);
for(n=0;n<3;n++)
{
#if(PARALLEL_PORT)
#if(1)
bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x01);
bRTD_SDIO_1 = (bit)(ucTemp[n] & 0x02);
bRTD_SDIO_2 = (bit)(ucTemp[n] & 0x04);
bRTD_SDIO_3 = (bit)(ucTemp[n] & 0x08);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x10);
bRTD_SDIO_1 = (bit)(ucTemp[n] & 0x20);
bRTD_SDIO_2 = (bit)(ucTemp[n] & 0x40);
bRTD_SDIO_3 = (bit)(ucTemp[n] & 0x80);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
bRTD_SDIO_0 = 1;
bRTD_SDIO_1 = 1;
bRTD_SDIO_2 = 1;
bRTD_SDIO_3 = 1;
bRTD_SCLK = 1;
#else
ucTemp1 = P0 & 0xf0;
P0 = ucTemp1 | (ucTemp[n] & 0x0f);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
P0 = ucTemp1 | (ucTemp[n] >> 4);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
P0 = ucTemp1 | 0x0f;
bRTD_SCLK = 1;
#endif
#else
bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x01);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x02);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x04);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x08);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x10);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x20);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x40);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
C51 COMPILER V7.06 ACCESS 11/21/2005 13:47:43 PAGE 19
bRTD_SDIO_0 = (bit)(ucTemp[n] & 0x80);
bRTD_SCLK = 1;
bRTD_SCLK = 0;
bRTD_SDIO_0 = 1;
bRTD_SCLK = 1;
#endif
}
array += 3;
}
}
while (--length);
RTDSendStop();
}
#endif
1117
1118
1119 #if(HDCP_ENABLE)
void KEYCodeW(unsigned char code *array)
{
unsigned int m;
RTDSetBit(DVI_CTRL1_AF, 0x7f,0x00); //Reset the HDCP key download index
RTDSetBit(DVI_CTRL1_AF, 0x7f,0x80);
for(m = 0; m < 320; m++) //Key 0 ~ Key39
{
RTDSetByte(0xb1,array[m]);
}
RTDSetBit(DVI_CTRL1_AF, 0x7f,0x00); //Disable the Key Access Download port
RTDSetBit(TMDS_INPUT_ENA_A1, 0x7f, 0x00); // Turn on HDCP DDC channel
}
#endif
C51 COMPILER V7.06 ACCESS 11/21/2005 13:47:43 PAGE 20
ASSEMBLY LISTING OF GENERATED OBJECT CODE
; FUNCTION Com008D (BEGIN)
0000 L?0142:
0000 A2E1 MOV C,ACC.1
0002 9290 MOV bRTD_SDIO_0,C
0004 D294 SETB bRTD_SCLK
0006 C294 CLR bRTD_SCLK
0008 A2E2 MOV C,ACC.2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -