ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

79 lines
2.9 KiB

  1. 10 REM - THIS IS SCALES.BAS
  2. 20 CLS : A = 340: BT = 254: C = BT: DIV = 1: G = A: H1 = 7650: TICK = 127
  3. 30 M = 1016: PLU = 40: CI = 360
  4. 40 INPUT "Please Enter SCALE LENGTH in mm - "; S: S1 = S
  5. 50 IF S > 2000 THEN GOTO 400
  6. 60 IF S1 > 250 THEN S1 = S1 - 250: DIV = DIV + 1: GOTO 60
  7. 70 PRINT : PRINT "Do you want the scale in Degrees or Hours and Minutes?"
  8. 80 INPUT " Please indicate 'd' for Degrees or 'h' for Hours... "; A$: PRINT
  9. 90 IF A$ = "h" OR A$ = "H" THEN CI = 288: QQ = 1
  10. 100 PRINT : PRINT : PRINT "Printing......."
  11. 110 PRINT : PRINT "NOTE: This will take up to 90 seconds to print."
  12. 120 S = S / DIV: SP = S * PLU: REM - Convert Scale Length to plotter units
  13. 130 REM - Clear, set into HP-GL/2 mode, and initialize the printer
  14. 140 LPRINT CHR$(27); "E": LPRINT CHR$(27); "%0B": LPRINT "IN;"
  15. 150 DEGREES = (SP / CI) * DIV: REM - Calculate the # of deg (or hrs) to print per column
  16. 160 LPRINT "SP1;": LPRINT "PW0;": REM - Select a pen and set the width
  17. 170 REM - Using the Scale Length per column, insert tick marks for the whole column
  18. 180 REM - there will be one Tick Mark for each degree
  19. 190 FOR Z = 1 TO DIV
  20. 200 A = A + Q
  21. 210 FOR I = 0 TO SP STEP DEGREES
  22. 220 LPRINT "PU;"
  23. 230 LPRINT "PA"; A + TICK; ","; C + I; ";"
  24. 240 LPRINT "PD;"
  25. 250 LPRINT "PA"; A + BT; ","; C + I; ";"
  26. 260 LPRINT "PU;"
  27. 270 P = P + 1: R = R + 1: T = T + 1
  28. 280 IF QQ = 1 THEN GOTO 330
  29. 290 IF T = 360 THEN T = 0
  30. 300 IF P = 5 THEN GOSUB 540
  31. 310 IF R = 10 THEN GOSUB 620
  32. 320 GOTO 360
  33. 330 IF T = 288 THEN T = 0
  34. 340 IF P = 4 THEN GOSUB 540
  35. 350 IF R = 12 THEN GOSUB 620
  36. 360 NEXT I
  37. 370 A = 340: Q = Q + M
  38. 380 NEXT Z
  39. 390 GOTO 420
  40. 400 PRINT : PRINT "Value is too high for this program,"
  41. 410 PRINT " Please enter another SMALLER value": PRINT : GOTO 40:
  42. 420 REM - Draw registration dots at bottom of the scales
  43. 430 LPRINT "UL8,5,20,5,20,5,20,5,20;"
  44. 440 LPRINT "LT8;"
  45. 450 LPRINT "PU;"
  46. 460 LPRINT "PA"; G; ","; C - DEGREES; ";"
  47. 470 LPRINT "PD;"
  48. 480 LPRINT "PA"; H1; ","; C - DEGREES; ";"
  49. 490 LPRINT "PU;"
  50. 500 REM - Reset the Printer
  51. 510 LPRINT CHR$(27); "%0A": LPRINT CHR$(27); "E"
  52. 520 END
  53. 530 REM - "Make every fifth degree or 20th minute longer" SUB-ROUTINE
  54. 540 LPRINT "PU;"
  55. 550 LPRINT "PA"; A; ","; C + I; ";"
  56. 560 LPRINT "PD;"
  57. 570 LPRINT "PA"; A + BT; ","; C + I; ";"
  58. 580 LPRINT "PU;"
  59. 590 P = 0
  60. 600 RETURN
  61. 610 REM - "Number the scales with degrees or hours" SUB-ROUTINE
  62. 620 LPRINT "SD1,21,2,1,4,10,7,4148;"
  63. 630 IF DIV > 2 THEN LPRINT "DI0,-1;": LPRINT "LO16;": GOTO 650
  64. 640 LPRINT "LO18;"
  65. 650 LPRINT "DT*,1;"
  66. 660 LPRINT "PU;"
  67. 670 LPRINT "PA"; A; ","; C + I; ";"
  68. 680 IF QQ = 1 THEN LPRINT "LB"; (T / 12); "*;": GOTO 710
  69. 690 LPRINT "PD;"
  70. 700 LPRINT "LB"; T; "*;"
  71. 710 LPRINT "PU;"
  72. 720 R = 0
  73. 730 RETURN
  74. 900 REM *********************************************
  75. 910 REM THIS PROGRAM BY RONALD KOCELA PRODUCES LINEAR
  76. 920 REM SETTING CIRCLE SCALES ON HP LASERJET PRINTERS
  77. 930 REM FROM SKY & TELESCOPE, MARCH 1996, PAGE 84.
  78. 940 REM *********************************************