⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 celiange.lst

📁 程序运行时,在屏上画出一个东南大学的圆形校徽,写出"东南大学电子管厂"的文字,还有一些该仪器的操作菜单. 练习者可以改写其中的字库,或该写其中的图形数组文件,参考该程序,写出所需要的文字和图形.
💻 LST
📖 第 1 页 / 共 5 页
字号:
1044   1              print2(da,2,32+64);
1045   1              print2(xue,2,48+64);
1046   1              
1047   1              print2(dian,4,64);
C51 COMPILER V6.23a  CELIANGE                                                              05/30/2007 12:24:19 PAGE 18  

1048   1              print2(zi,4,80);
1049   1              print2(guan,4,96);
1050   1              print2(chang,4,112);
1051   1      
1052   1              while(1)
1053   1              {
1054   2                      if(oper3==1)  //###########################################################################
1055   2                      {
1056   3                      /*
1057   3                              if(fast==1)//fast:  策动摆过光电门次数
1058   3                              {
1059   3                                      fast++;
1060   3                                      thousand=counter1;
1061   3                                      counter1=0;
1062   3                              }
1063   3                              if(fast==4)
1064   3                              {
1065   3                                      fast++;
1066   3                                      counter1=0;
1067   3                              }
1068   3                              if(fast==7)
1069   3                              {
1070   3                                      fast++;
1071   3                                      total=counter1; //total:策动周期
1072   3                                      counter1=0;
1073   3                              }
1074   3                              if(slow==1) //slow:振子摆过光电门次数
1075   3                              {
1076   3                                      slow++;
1077   3                                      hundred=counter2;
1078   3                                      counter2=0;
1079   3                              }
1080   3                              if(slow==4)
1081   3                              {
1082   3                                      slow++;
1083   3                                      counter2=0;
1084   3                              }
1085   3                              if(slow==7)
1086   3                              {
1087   3                                      slow++;
1088   3                                      counter2=0;
1089   3                              }
1090   3                              if(slow==10)
1091   3                              {
1092   3                                      slow++;
1093   3                                      counter2=0;
1094   3                              }
1095   3                              if(slow==13)
1096   3                              {
1097   3                                      t=counter2;//t:振子周期
1098   3                                      counter2=0;
1099   3                                      oper3=0;
1100   3                                      IE=0x80;
1101   3                                      fast=0;
1102   3                                      slow=0;
1103   3                                      if(thousand>=hundred)
1104   3                                      {
1105   3                                              thousand=thousand-hundred;
1106   3                                      }
1107   3                                      else
1108   3                                      {
1109   3                                              thousand=hundred-thousand;
C51 COMPILER V6.23a  CELIANGE                                                              05/30/2007 12:24:19 PAGE 19  

1110   3                                      }
1111   3                      */
1112   3                              //*************************************************************************************
1113   3                              //*************************************************************************************
1114   3                              /*
1115   3                              if(fast==1)//fast:  策动摆过光电门次数
1116   3                              {
1117   3                                      slow=3;
1118   3                                      counter1=0;
1119   3                              }
1120   3                              if(fast==3)
1121   3                              {
1122   3                                      total=counter1;//策动周期
1123   3                              }
1124   3                              
1125   3                              if(slow==4) //slow:振子摆过光电门次数
1126   3                              {
1127   3                                      
1128   3                                      hundred=counter1;
1129   3                              }
1130   3                              if(slow==6)
1131   3                              */
1132   3                              
1133   3                              if(fast==1)
1134   3                              {
1135   4                                      slow=0;
1136   4                                      counter1=0;
1137   4                                      
1138   4                              }
1139   3                              if(slow==1)
1140   3                              {
1141   4                                      thousand=counter1; //相位差时间值
1142   4                                      counter2=0;
1143   4                              }
1144   3                              if(fast==2)
1145   3                              {
1146   4                                      total=counter1; //策动周期
1147   4                              }
1148   3                              if(slow==4)
1149   3                              {
1150   4                                      t=counter2;//振子周期
1151   4                                      
1152   4                                              oper3=0;
1153   4                                              IE=0x80;
1154   4                                              fast=0;
1155   4                                              slow=0;
1156   4                                      
1157   4                                      g=thousand*360*2/(total+t); // total:周期均值,thousand:相差时值,g:角度值
1158   4                              
1159   4                              
1160   4                              //{
1161   4                                      //t=counter1;//振子周期
1162   4                                      //thousand=t-hundred;//相位差
1163   4                              
1164   4                                      
1165   4                                      
1166   4                                      //oper3=0;
1167   4                                      //IE=0x80;//关中断
1168   4                                      //fast=0;
1169   4                                      //slow=0;
1170   4                                                                                                      
1171   4                                      //g=thousand*360/t; // t:振子周期,   thousand:相位差时间值,g:角度值
C51 COMPILER V6.23a  CELIANGE                                                              05/30/2007 12:24:19 PAGE 20  

1172   4                                      clear();
1173   4                                      print2(char22,0,0);//振子周期
1174   4                                      print2(zi,0,16);
1175   4                                      print2(char11,0,32);
1176   4                                      print2(char12,0,48);
1177   4                                      thousand=t/1000;//一位一位的显示出来
1178   4                                      t=t%1000;
1179   4                                      hundred=t/100;
1180   4                                      t=t%100;
1181   4                                      ten=t/10;
1182   4                                      t=t%10;
1183   4                                      one=t;
1184   4                                      printnum(thousand,0,48+16);
1185   4                                      printnum(hundred,0,48+16+8);
1186   4                                      printnum(ten,0,48+16+16);
1187   4                                      printnum(one,0,48+16+24);
1188   4                                      print2(hao,0,88+8);
1189   4                                      print2(miao,0,88+24);
1190   4                                              
1191   4                                      print2(cece,2,0);//策动周期
1192   4                                      print2(dongdong,2,16);
1193   4                                      print2(char11,2,32);
1194   4                                      print2(char12,2,48);
1195   4                                      
1196   4                                      thousand=total/1000;//一位一位的显示出来
1197   4                                      t=total%1000;  //total:策动周期
1198   4                                      hundred=t/100;
1199   4                                      t=t%100;
1200   4                                      ten=t/10;
1201   4                                      t=t%10;
1202   4                                      one=t;
1203   4                                      
1204   4                                      printnum(thousand,2,48+16);
1205   4                                      printnum(hundred,2,48+16+8);
1206   4                                      printnum(ten,2,48+16+16);
1207   4                                      printnum(one,2,48+16+24);
1208   4                                      print2(hao,2,88+8);
1209   4                                      print2(miao,2,88+24);
1210   4                                              
1211   4                                      print2(xiang,4,0);//相位差
1212   4                                      print2(wei,4,16);
1213   4                                      print2(cha,4,32);
1214   4                                              
1215   4                                      cycle2=g;
1216   4                                      hundred=cycle2/100;
1217   4                                      t=cycle2%100;
1218   4                                      ten=t/10;
1219   4                                      t=t%10;
1220   4                                      one=t;
1221   4                                      if(hundred!=0)
1222   4                                      {
1223   5                                              printnum(hundred,4,32+16);//一位一位的显示出来
1224   5                                      }
1225   4                                      printnum(ten,4,40+16);
1226   4                                      printnum(one,4,48+16);
1227   4                                      print2(du,4,72);
1228   4                              }
1229   3                      }
1230   2                      if(oper2==1)  //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
1231   2                      {
1232   3                              if(flag==1)
1233   3                              {
C51 COMPILER V6.23a  CELIANGE                                                              05/30/2007 12:24:19 PAGE 21  

1234   4                                      flag++;
1235   4                                      amptitude=0;
1236   4                                      counter2=0;
1237   4                              }
1238   3                              if(flag==4)
1239   3                              {
1240   4                                      if(amptitude>999)amptitude=999;
1241   4                                      datanum1=amptitude;
1242   4                                      amptitude=0;
1243   4                                      flag++;
1244   4                                      cycle2=counter2;
1245   4                                      if(cycle2>9999)cycle2=9999;
1246   4                                      
1247   4                                      t=datanum1;
1248   4                                      hundred=t/100;
1249   4                                      t=t%100;
1250   4                                      ten=t/10;
1251   4                                      t=t%10;
1252   4                                      one=t;
1253   4                                      
1254   4                                      clear();
1255   4                                      print2(char22,0,0);
1256   4                                      print2(char23,0,16);
1257   4                                      print1(num[1],0,32);
1258   4                                      printnum(hundred,0,32+24);
1259   4                                      printnum(ten,0,40+24);
1260   4                                      printnum(one,0,48+24);
1261   4                                      print2(ge,0,56+24);
1262   4                              }
1263   3                              if(flag==7)
1264   3                              {
1265   4                                      if(amptitude>999)amptitude=999;
1266   4                                      datanum2=amptitude;
1267   4                                      
1268   4                                      t=datanum2;
1269   4                                      hundred=t/100;
1270   4                                      t=t%100;
1271   4                                      ten=t/10;
1272   4                                      t=t%10;
1273   4                                      one=t;
1274   4                                      
1275   4                                      print2(char22,2,0);
1276   4                                      print2(char23,2,16);
1277   4                                      print1(num[2],2,32);
1278   4                                      printnum(hundred,2,32+24);
1279   4                                      printnum(ten,2,40+24);
1280   4                                      printnum(one,2,48+24);
1281   4                                      print2(ge,2,56+24);
1282   4                                      
1283   4                                      thousand=cycle2/1000;//一位一位的显示出来
1284   4                                      t=cycle2%1000;
1285   4                                      hundred=t/100;
1286   4                                      t=t%100;
1287   4                                      ten=t/10;
1288   4                                      t=t%10;
1289   4                                      one=t;
1290   4                                      
1291   4                                      //if(thousand>9)thousand=9;
1292   4                                      print2(char11,4,0);
1293   4                                      print2(char12,4,16);
1294   4                                      printnum(thousand,4,32);
1295   4                                      printnum(hundred,4,8+32);
C51 COMPILER V6.23a  CELIANGE                                                              05/30/2007 12:24:19 PAGE 22  

1296   4                                      printnum(ten,4,16+32);
1297   4                                      printnum(one,4,24+32);
1298   4                                      print2(hao,4,64);
1299   4                                      print2(miao,4,80);
1300   4                                      
1301   4                                      g=datanum1;
1302   4                                      g=(log(g/datanum2)*1000/cycle2)*1000;
1303   4       

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -