home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 81 / 64er_Magazin_Sonderheft_81_19xx_Markt__Technik_de_Side_B.d64 / messboy (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  112 lines

  1. 100 rem   **************************
  2. 110 rem   *                        *
  3. 120 rem   *     c/r-messgeraet     *
  4. 130 rem   *                        *
  5. 140 rem   *                        *
  6. 150 rem   *  von  uwe gerlach      *
  7. 160 rem   *       bruehlstr. 23    *
  8. 170 rem   *                        *
  9. 180 rem   *       6440 bebra 1     *
  10. 190 rem   *                        *
  11. 200 rem   *                        *
  12. 210 rem   *       april 1985       *
  13. 220 rem   *                        *
  14. 230 rem   **************************
  15. 250 :
  16. 1000 poke53280,0: poke53281,0: rem farbe
  17. 1010 print "[147][215]iderstands-  und  [203]apazitaetsmessgeraet[152]";chr$(14):print:print
  18. 1400 print"":print:print:print:print,," [203]apazitaetsmessung"
  19. 1420 b=0
  20. 1430 print:print:print,," [194]itte den [211]chalter"
  21. 1440 print,,"  am [205]esszusatz in"
  22. 1450 print,,"    [211]tellung '[195]'"
  23. 1460 print,,"      bringen !"
  24. 1490 goto 8110
  25. 1500 print"":print:print:print:print,," [215]iderstandsmessung"
  26. 1520 b=2
  27. 1530 print:print:print,," [194]itte den [211]chalter"
  28. 1540 print,,"  am [205]esszusatz in"
  29. 1550 print,,"    [211]tellung '[210]'"
  30. 1590 goto 1460
  31. 1592 :
  32. 1999 rem*********************
  33. 2000 rem  anzeige und menue
  34. 2001 rem*********************
  35. 2010 poke211,21: poke214,17: sys 58732: rem  kursorpositionierung
  36. 2020 print"";w$;"[152]": rem aktueller wert
  37. 2030 gosub 9030
  38. 2998 :
  39. 2999 rem*******************************
  40. 3000 rem  i/o-baustein initialisieren
  41. 3001 rem*******************************
  42. 3010 h=0
  43. 3060 if b=1 then h=5: rem fuer > 500nf
  44. 3100 poke 56590,193: rem kontrollreg. a
  45. 3110 poke 56591,121: rem kontrollreg. b
  46. 3200 poke 56580,0:   rem timer a low
  47. 3210 poke 56581,h:   rem timer a high
  48. 3220 poke 56582,255: rem timer b low
  49. 3230 poke 56583,255: rem timer b high
  50. 3240 :
  51. 3300 poke 56577,0: rem impuls ausloesen
  52. 3998 :
  53. 3999 rem*******************************
  54. 4000 rem  warten auf flag-interrupt-bit
  55. 4001 rem*******************************
  56. 4040 if (peek(56589) and 16)>0 then 4090
  57. 4050 gosub 9030: goto 4040: rem  menue
  58. 4090 if b=2 then 7000: rem widerstdmsg.
  59. 4998 :
  60. 4999 rem**********************
  61. 5000 rem  kapazitaetsmessung
  62. 5001 rem**********************
  63. 5020 w=(65535-(peek(56582)+peek(56583)*256))*1.02e-6/(.7*39000)
  64. 5030 if w=0 and b=0 then b=1: goto 3000
  65. 5035 if w<3e-10 and b=1 then b=0: goto 3000
  66. 5050 if b=1 then 6000: rem messbereich
  67. 5070 if w<1e-9 then w$=left$(str$(w*1e12)+"      ",6)+" [208]ikofarad ": goto 2000
  68. 5080 if w<1e-6 then w$=left$(str$(w*1e9)+"       ",6)+" [206]anofarad ": goto 2000
  69. 6000 w=(65535-(peek(56582)+peek(56583)*256))*5*256*1.02e-6/(.7*39000)
  70. 6010 w$=left$(str$(w*1e6)+"      ",6)+" [205]ikrofarad"
  71. 6020 for i=0 to w*1e6:gosub 9030: next i
  72. 6050 goto 2000
  73. 6998 :
  74. 6999 rem**********************
  75. 7000 rem  widerstandsmessung
  76. 7001 rem**********************
  77. 7050 w=(65535-(peek(56582)+peek(56583)*256))*1.02e-6/(.7*220e-9)
  78. 7070 w$="  "+left$(str$(int(w))+"      ",7)+" [207]hm    "
  79. 7100 goto2000
  80. 7998 :
  81. 7999 rem********************
  82. 8000 rem  messwertspeicher
  83. 8001 rem********************
  84. 8050 get a$: if a$="" then 8050
  85. 8060 if val(a$)<0 or val(a$)>9 then 8110
  86. 8070 w$(val(a$))=w$
  87. 8110 poke 211,0: poke 214,2: sys 58732: rem  kursorpositionierung
  88. 8120 for i=0 to 9
  89. 8130 : print i; w$(i): print
  90. 8140 next i
  91. 8210 print "[211]peichern  [204]oeschen  [215]iderstandsmessung"
  92. 8220 print "[203]apazitaetsmessung [201]mpulsausloesen [209]uit"
  93. 8490 goto 2000
  94. 8498 :
  95. 8499 rem**************************
  96. 8500 rem  loeschen der speicher:
  97. 8501 rem**************************
  98. 8510 for i=0 to 9: w$(i)="                 ": next i
  99. 8520 goto 8110
  100. 8998 :
  101. 9000 rem****************
  102. 9010 rem   hauptmenue
  103. 9020 rem****************
  104. 9030 get a$
  105. 9040 if a$="s" then 8000
  106. 9050 if a$="l" then 8500
  107. 9060 if a$="q" then print"[147]": end
  108. 9070 if a$="k" or a$="c" then 1400
  109. 9080 if a$="w" or a$="r" then 1500
  110. 9090 if a$="i" then 2000
  111. 9095 return
  112.