home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1994 June / 1994-06b.d64 / motor-data (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  45 lines

  1. 1000 rem program: motor-data
  2. 1005 rem "[194]urton [204]. [195]raddock"
  3. 1010 print chr$(147)chr$(14):rem clear screen and print upper and lower case
  4. 1014 print"[208]rogram: [205][207][212][207][210]-[196][193][212][193]"
  5. 1016 print"[195]reate data file [212][200][210][213][211][212].[196][193][212] for program [210][207][195][203][197][212].[193][204][212][201][212][213][196][197]"
  6. 1020 open 15,8,15:rem open error channel
  7. 1030 gosub6000:rem disk error check
  8. 1040 if en=0 then 1100
  9. 1050 close15
  10. 1060 end
  11. 1100 open 1,8,7,"thrust.dat,s,w"
  12. 1130 gosub6000:rem disk error check
  13. 1140 if en=63 then print"[212][200][210][213][211][212].[196][193][212] exist. replace file (y/n)?";:
  14. 1141 if en=0 then 1500
  15. 1142 close 1:if en=63 then get a$
  16. 1143 if en=63 and a$<>"y" and a$<>"[217]" and a$<>"n" and a$<>"[206]" then 1142
  17. 1144 print a$:if a$="[217]" then a$="y"
  18. 1145 if en=63 and (a$="y" or a$="[217]") then open 1,8,7,"@:thrust.dat,s,w"
  19. 1146 gosub6000:if en=0 and a$="y" then 1500
  20. 1148 close1: close15
  21. 1150 end
  22. 1500 rem write data to thrust.dat
  23. 1504 c$=chr$(44): q$=chr$(34):rem c$=comma and q$=double quote mark
  24. 1510 read m$
  25. 1520 if m$<>"end" then read t$:print#1,m$;c$;q$;t$;q$:goto1510
  26. 1530 if m$="end" then print#1,m$
  27. 1540 close1: close15
  28. 1550 end
  29. 2000 data"1/2[193]6","0.16,0.00156,9"
  30. 2010 data"[193]8","0.24,0.00312,12,4"
  31. 2020 data"[194]4","1.2,0.00833,6,13,5,4,4,4,4,4,4,4,4,0"
  32. 2040 data"[194]6","0.83,0.00624,4,13,8,6,6,6,6,6"
  33. 2050 data"[194]14","0.35,0.00624,6,26,14"
  34. 2060 data"[195]6","1.7,0.01248,4,13,8,6,6,6,6,6,6,6,6,6,6,6,6,6,0"
  35. 2070 rem c5-3s motor data need two basic lines
  36. 2072 : data"[195]5-3[211]"
  37. 2074 : data"2.1,0.013,2,2,7.5,22.2,7.5,5,4.5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0"
  38. 2080 data"[196]12","1.7,0.02493,6,26,31,20,11,10,10,10,10,10,10,10,10,10,10,10,0"
  39. 2090 data"end"
  40. 6000 rem read error channel
  41. 6010 input#15,en,em$,et,es
  42. 6015 print"[196]isk error check"
  43. 6020 print en;em$;et;es
  44. 6030 return
  45.