C51 COMPILER V7.06 BUF_MAN 08/02/2005 13:29:59 PAGE 1 C51 COMPILER V7.06, COMPILATION OF MODULE BUF_MAN OBJECT MODULE PLACED IN BUF_MAN.OBJ COMPILER INVOKED BY: d:\Keil777\C51\BIN\C51.EXE BUF_MAN.C BROWSE DEBUG OBJECTEXTEND stmt level source 1 #include "isp1362.h" 2 #include "isa290.h" 3 #include *** WARNING C318 IN LINE 3 OF BUF_MAN.C: can't open file 'graphics.h' 4 5 #include "reg.h" 6 7 void Set_DirAddrLen(unsigned int count,unsigned char flow,unsigned int addr) 8 { 9 1 unsigned long addr2return; 10 1 11 1 addr2return =(long)(addr&0x7FFF); 12 1 addr2return|=((long)flow)<<15; 13 1 addr2return|=(((long)count)<<16); 14 1 15 1 w32(HcDirAddrLen,addr2return); 16 1 } 17 18 long make_DirAddrLen(unsigned int count,unsigned char flow,unsigned int addr) 19 { 20 1 unsigned long addr2return; 21 1 22 1 addr2return =(long)(addr&0x7FFF); 23 1 addr2return|=((long)flow)<<15; 24 1 addr2return|=(((long)count)<<16); 25 1 26 1 return(addr2return); 27 1 } 28 29 void direct_read(unsigned int *a_ptr) 30 { 31 1 unsigned long word_cnt,test_target; 32 1 unsigned int test_size=4096; 33 1 unsigned long DirAddrLen_data; 34 1 unsigned cnt; 35 1 unsigned long rb; 36 1 37 1 DirAddrLen_data=make_DirAddrLen(test_size,0,0); 38 1 w32(HcDirAddrLen,DirAddrLen_data); 39 1 40 1 outport(hc_com,HcDirAddr_Port); *** WARNING C206 IN LINE 40 OF BUF_MAN.C: 'outport': missing function-prototype *** ERROR C267 IN LINE 40 OF BUF_MAN.C: 'outport': requires ANSI-style prototype 41 1 42 1 uSDelay(10); //waste some time 43 1 44 1 cnt=0; 45 1 do 46 1 { 47 2 *(a_ptr+cnt)=inport(hc_data); 48 2 cnt++; 49 2 } 50 1 while(cnt<2048); 51 1 } 52 C51 COMPILER V7.06 BUF_MAN 08/02/2005 13:29:59 PAGE 2 53 void direct_write(unsigned int *w_ptr) 54 { 55 1 unsigned long word_cnt,test_target; 56 1 unsigned long DirAddrLen_data; 57 1 unsigned cnt; 58 1 unsigned long rb; 59 1 unsigned long *data_ptr; 60 1 61 1 DirAddrLen_data=make_DirAddrLen(4096,0,0); 62 1 w32(HcDirAddrLen,DirAddrLen_data); 63 1 64 1 outport(hc_com,HcDirAddr_Port|0x80); 65 1 66 1 uSDelay(10); //waste some time 67 1 68 1 cnt=0; 69 1 do 70 1 { 71 2 outport(hc_data,*(w_ptr+cnt)); 72 2 cnt++; 73 2 } 74 1 while(cnt<2048); 75 1 } 76 77 void read_atl(unsigned int *a_ptr, unsigned int data_size) 78 { 79 1 int cnt; 80 1 81 1 w16(HcTransferCnt,data_size*2); 82 1 outport(hc_com,HcATL_Port); 83 1 84 1 uSDelay(10); //waste some time 85 1 86 1 cnt=0; 87 1 do 88 1 { 89 2 *(a_ptr+cnt)=inport(hc_data); 90 2 cnt++; 91 2 } 92 1 while(cnt<(data_size)); 93 1 } 94 95 void write_atl(unsigned int *a_ptr, unsigned int data_size) 96 { 97 1 int cnt; 98 1 99 1 w16(HcTransferCnt,data_size*2); 100 1 outport(hc_com,HcATL_Port|0x80); 101 1 102 1 uSDelay(10); //waste some time 103 1 104 1 cnt=0; 105 1 do 106 1 { 107 2 outport(hc_data,*(a_ptr+cnt)); 108 2 cnt++; 109 2 } 110 1 while(cnt<(data_size)); 111 1 } 112 113 void read_int(unsigned int *a_ptr, unsigned int data_size) 114 { C51 COMPILER V7.06 BUF_MAN 08/02/2005 13:29:59 PAGE 3 115 1 int cnt; 116 1 117 1 w16(HcTransferCnt,data_size*2); 118 1 outport(hc_com,HcInt_Port); 119 1 120 1 uSDelay(10); //waste some time 121 1 cnt=0; 122 1 do 123 1 { 124 2 *(a_ptr+cnt)=inport(hc_data); 125 2 cnt++; 126 2 } 127 1 while(cnt<(data_size)); 128 1 } 129 130 void write_int(unsigned int *a_ptr, unsigned int data_size) 131 { 132 1 int cnt; 133 1 134 1 w16(HcTransferCnt,data_size*2); 135 1 outport(hc_com,HcInt_Port|0x80); 136 1 137 1 uSDelay(10); //waste some time 138 1 cnt=0; 139 1 do 140 1 { 141 2 outport(hc_data,*(a_ptr+cnt)); 142 2 cnt++; 143 2 } 144 1 while(cnt<(data_size)); 145 1 } 146 147 void read_ptl(unsigned int *a_ptr, unsigned int data_size, char ptl) 148 { 149 1 int cnt; 150 1 151 1 w16(HcTransferCnt,data_size*2); 152 1 if(ptl==0){outport(hc_com,HcPTL0_Port);} 153 1 if(ptl==1){outport(hc_com,HcPTL1_Port);} 154 1 155 1 uSDelay(10); //waste some time 156 1 cnt=0; 157 1 do 158 1 { 159 2 *(a_ptr+cnt)=inport(hc_data); 160 2 cnt++; 161 2 } 162 1 while(cnt<(data_size)); 163 1 } 164 165 void write_ptl(unsigned int *a_ptr, unsigned int data_size, char ptl) 166 { 167 1 int cnt; 168 1 169 1 w16(HcTransferCnt,data_size*2); 170 1 if(ptl==0) {outport(hc_com,HcPTL0_Port|0x80);} 171 1 if(ptl==1) {outport(hc_com,HcPTL1_Port|0x80);} 172 1 173 1 uSDelay(10); //waste some time 174 1 cnt=0; 175 1 do 176 1 { C51 COMPILER V7.06 BUF_MAN 08/02/2005 13:29:59 PAGE 4 177 2 outport(hc_data,*(a_ptr+cnt)); 178 2 cnt++; 179 2 } 180 1 while(cnt<(data_size)); 181 1 } 182 183 void erase_all(void) 184 { 185 1 unsigned long word_cnt,test_target; 186 1 unsigned int test_size=4096; 187 1 unsigned long DirAddrLen_data; 188 1 unsigned long cnt; 189 1 unsigned long rb; 190 1 unsigned long *data_ptr; 191 1 192 1 DirAddrLen_data=make_DirAddrLen(test_size,0,0); 193 1 w32(HcDirAddrLen,DirAddrLen_data); 194 1 195 1 outport(hc_com,HcDirAddr_Port|0x80); 196 1 cnt=0; 197 1 do 198 1 { 199 2 outport(hc_data,0); 200 2 cnt++; 201 2 } 202 1 while(cnt<2048); 203 1 } 204 205 void set_all(void) 206 { 207 1 unsigned long word_cnt,test_target; 208 1 unsigned long DirAddrLen_data; 209 1 unsigned long cnt; 210 1 unsigned long rb; 211 1 212 1 DirAddrLen_data=make_DirAddrLen(4096,0,0); 213 1 w32(HcDirAddrLen,DirAddrLen_data); 214 1 215 1 outport(hc_com,HcDirAddr_Port|0x80); 216 1 217 1 uSDelay(10); //waste some time 218 1 cnt=0; 219 1 do 220 1 { 221 2 outport(hc_data,0xFFFF-cnt); 222 2 cnt++; 223 2 } 224 1 while(cnt<2048); 225 1 } 226 227 void random_read(unsigned int *a_ptr,unsigned int start_addr,unsigned int data_size) 228 { 229 1 unsigned int test_size=data_size*2; 230 1 unsigned long DirAddrLen_data; 231 1 unsigned long cnt; 232 1 233 1 DirAddrLen_data=make_DirAddrLen(test_size,0,start_addr); 234 1 w32(HcDirAddrLen,DirAddrLen_data); 235 1 236 1 outport(hc_com,HcDirAddr_Port); 237 1 238 1 uSDelay(10); //waste some time C51 COMPILER V7.06 BUF_MAN 08/02/2005 13:29:59 PAGE 5 239 1 cnt=0; 240 1 do 241 1 { 242 2 *(a_ptr+cnt)=inport(hc_data); 243 2 cnt++; 244 2 } 245 1 while(cnt>8); 294 3 printf("\n From Address %06X to %06X",(word_cnt<<1)-512,word_cnt<<1); 295 3 printf("\n From Address %06d to %06d",(word_cnt<<1)-512,word_cnt<<1); 296 3 297 3 read_key(1); 298 3 gotoxy(1,2); 299 3 } 300 2 } C51 COMPILER V7.06 BUF_MAN 08/02/2005 13:29:59 PAGE 6 301 1 while(word_cnt<2048); 302 1 303 1 if(word_cnt<256) {read_key(1); } 304 1 } 305 C51 COMPILATION COMPLETE. 2 WARNING(S), 1 ERROR(S)