home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / SPE.ZIP / PRINT.PRT < prev    next >
Encoding:
Text File  |  1987-06-14  |  18.7 KB  |  107 lines

  1.                
  2.  
  3. ______________________________________________________________________________________________________________________
  4.  
  5. ! REM Basic Program                            :  print                                                              !
  6.  
  7. ! REM                 created                  :  9.3.86                                                             !
  8.  
  9. ! REM                 from                     :  Volker Sasse                                                       !
  10.  
  11. ! REM Structogram     saved on disk            :  Basic-Sicher                                                       !
  12.  
  13. ! REM                 filename                 :  print.spe                                                          !
  14.  
  15. ! REM Basic text      saved on disk            :  Basic-Sicher                                                       !
  16.  
  17. ! REM                 filename                 :  print.bas                                                          !
  18.  
  19. ! REM                                                                                                                !
  20.  
  21. ! REM This program prints structograms in the way you see them on the screen.                                        !
  22.  
  23. ! REM This program needs the font <<print.fon>> as datafile.                                                         !
  24.  
  25. ! REM In order to print a structogram make a printfile on a disk with the command print.                             !
  26.  
  27. ! REM                                                                                                                !
  28.  
  29. ! REM You can print a few structograms in one session while you make a walk.                                         !
  30.  
  31. ! REM                                                                                                                !
  32.  
  33. ! REM You need a dot matrix printer which is compatible to the Epson MX80.                                           !
  34.  
  35. ! REM The program uses the dual-density bit image mode 960 dots per line.                                            !
  36.  
  37. ! REM If the program does not work reference your printer manual and change the controlcodes.                        !
  38.  
  39. ! REM                                                                                                                !
  40. ______________________________________________________________________________________________________________________
  41.  
  42. ! REM                                                                                                                !
  43.  
  44. ! REM Vereinbarungen                                                                                                 !
  45.  
  46. ! REM                                                                                                                !
  47.  
  48. ! REM Druckmatrix : Höhe = 10 Punkte, Breite =  8 Punkte                                                             !
  49.  
  50. !     Hoehe  = 10                                                                                                    !
  51.  
  52. !     Breite =  8                                                                                                    !
  53.  
  54. ! DIM High$(255), Low$(255)                                                                                          !
  55.  
  56. !     Verschiebung1 =  5                                                                                             !
  57.  
  58. !     Verschiebung2 =  5                                                                                             !
  59.  
  60. !     Zeichensatz$ = ""                                                                                              !
  61.  
  62. !     Punktbreite = 4                                                                                                !
  63.  
  64. !     Punkthoehe  = 2                                                                                                !
  65. ______________________________________________________________________________________________________________________
  66.  
  67. ! COLOR 7,0                                                                                                          !
  68.  
  69. ! CLS                                                                                                                !
  70.  
  71. ! PRINT "Program for printing SPE structograms"                                                                      !
  72.  
  73. ! Zeichensatz$="print.fon"                                                                                           !
  74.  
  75. ! PRINT "How many times shall I go over a line (number)";                                                            !
  76.  
  77. ! INPUT Doppel                                                                                                       !
  78.  
  79. ! Struktogramm$=""                                                                                                   !
  80.  
  81. ! DIM Strukto$(50)                                                                                                   !
  82.  
  83. ! Stzaehler=0                                                                                                        !
  84.  
  85. ! PRINT "Press RETURN if list is complete!"                                                                          !
  86. ______________________________________________________________________________________________________________________
  87.  
  88. !                                                                                                                    !
  89.    ___________________________________________________________________________________________________________________
  90.  
  91. !  ! INPUT "Which structogram shall be printed "; Struktogramm$                                                      !
  92.  
  93. !  ! IF Struktogramm$=""                                                                                             !
  94.    ___________________________________________________________________________________________________________________
  95.  
  96. !  ! EXIT ! Strukto$(Stzaehler)=Struktogramm$                                                                        !
  97.  
  98. !  !      ! Stzaehler=Stzaehler + 1                                                                                  !
  99. ______________________________________________________________________________________________________________________
  100.  
  101. ! PRINT "Filenames correct, continue program (y) ";                                                                  !
  102.  
  103. ! INPUT Entscheidung$                                                                                                !
  104.  
  105. ! IF Entscheidung$<>"y"                                                                                              !
  106. ______________________________________________________________________________________________________________________
  107.  
  108. ! EXIT !  GOSUB Satzladen                                                                                            !
  109.        _______________________________________________________________________________________________________________
  110.  
  111. !      !  FOR St=0 to Stzaehler-1                                                                                    !
  112.           ____________________________________________________________________________________________________________
  113.  
  114. !      !  ! Struktogramm$=Strukto$(St)                                                                               !
  115.  
  116. !      !  ! PRINT "Printing : "; Struktogramm$                                                                       !
  117.  
  118. !      !  ! GOSUB Struktogramm                                                                                       !
  119. ______________________________________________________________________________________________________________________
  120.  
  121. ! END                                                                                                                !
  122. ______________________________________________________________________________________________________________________
  123.  
  124. ! Satzladen                                                                                                          !
  125.    ___________________________________________________________________________________________________________________
  126.  
  127. !  ! PRINT "Loading  : "; Zeichensatz$                                                                               !
  128.  
  129. !  ! OPEN Zeichensatz$ FOR INPUT AS #2                                                                               !
  130.    ___________________________________________________________________________________________________________________
  131.  
  132. !  !  FOR T=0 TO 255                                                                                                 !
  133.       ________________________________________________________________________________________________________________
  134.  
  135. !  !  !  High$(T)="" : Low$(T)=""                                                                                    !
  136.       ________________________________________________________________________________________________________________
  137.  
  138. !  !  !  FOR Q=1 TO Breite                                                                                           !
  139.          _____________________________________________________________________________________________________________
  140.  
  141. !  !  !  ! INPUT #2, High% : High$(T)=High$(T) + CHR$(High%)                                                         !
  142.  
  143. !  !  !  ! INPUT #2, Low%  : Low$(T) =Low$(T)  + CHR$(Low%)                                                          !
  144.    ___________________________________________________________________________________________________________________
  145.  
  146. !  ! CLOSE #2                                                                                                        !
  147.    ___________________________________________________________________________________________________________________
  148.  
  149. !                                                                                                                    !
  150. ______________________________________________________________________________________________________________________
  151.  
  152. ! PrLine                                                                                                             !
  153.    ___________________________________________________________________________________________________________________
  154.  
  155. !  ! Anzahl=LEN(B$) * Breite                                                                                         !
  156.  
  157. !  ! High=INT(Anzahl / 256) : Low=Anzahl - High * 256                                                                !
  158.  
  159. !  ! PRINT #1, CHR$(27);"A";CHR$(Verschiebung1);CHR$(27);CHR$(2);                                                    !
  160.    ___________________________________________________________________________________________________________________
  161.  
  162. !  !  FOR F=1 TO Doppel                                                                                              !
  163.       ________________________________________________________________________________________________________________
  164.  
  165. !  !  ! PRINT #1, CHR$(13);CHR$(27);"L";CHR$(Low);CHR$(High);                                                        !
  166.       ________________________________________________________________________________________________________________
  167.  
  168. !  !  !  FOR T=1 TO LEN(B$)                                                                                          !
  169.          _____________________________________________________________________________________________________________
  170.  
  171. !  !  !  !  PRINT #1, High$(ASC(MID$(B$, T, 1)));                                                                    !
  172.    ___________________________________________________________________________________________________________________
  173.  
  174. !  ! PRINT #1, CHR$(10);                                                                                             !
  175.    ___________________________________________________________________________________________________________________
  176.  
  177. !  !  FOR F=1 TO Doppel                                                                                              !
  178.       ________________________________________________________________________________________________________________
  179.  
  180. !  !  ! PRINT #1, CHR$(13);CHR$(27);"L";CHR$(Low);CHR$(High);                                                        !
  181.       ________________________________________________________________________________________________________________
  182.  
  183. !  !  !  FOR T=1 TO LEN(B$)                                                                                          !
  184.          _____________________________________________________________________________________________________________
  185.  
  186. !  !  !  !  PRINT #1, Low$(ASC(MID$(B$, T, 1)));                                                                     !
  187.    ___________________________________________________________________________________________________________________
  188.  
  189. !                                                                                                                    !
  190. ______________________________________________________________________________________________________________________
  191.  
  192. ! SuLine                                                                                                             !
  193.    ___________________________________________________________________________________________________________________
  194.  
  195. !  ! Anzahl=LEN(B$) * Breite                                                                                         !
  196.  
  197. !  ! High=INT(Anzahl / 256) : Low=Anzahl - High * 256                                                                !
  198.    ___________________________________________________________________________________________________________________
  199.  
  200. !  !  FOR F=1 TO Doppel                                                                                              !
  201.       ________________________________________________________________________________________________________________
  202.  
  203. !  !  ! PRINT #1, CHR$(13);CHR$(27);"L";CHR$(Low);CHR$(High);                                                        !
  204.       ________________________________________________________________________________________________________________
  205.  
  206. !  !  !  FOR T=1 TO LEN(B$)                                                                                          !
  207.          _____________________________________________________________________________________________________________
  208.  
  209. !  !  !  !  PRINT #1, Low$(ASC(MID$(B$, T, 1)));                                                                     !
  210.    ___________________________________________________________________________________________________________________
  211.  
  212. !                                                                                                                    !
  213. ______________________________________________________________________________________________________________________
  214.  
  215. ! Struktogramm                                                                                                       !
  216.    ___________________________________________________________________________________________________________________
  217.  
  218. !  ! OPEN "LPT1" FOR OUTPUT AS #1                                                                                    !
  219.  
  220. !  ! OPEN Struktogramm$  FOR  INPUT AS #2                                                                            !
  221.  
  222. !  ! B$="" : ZH=0 : ME=0                                                                                             !
  223.    ___________________________________________________________________________________________________________________
  224.  
  225. !  !  FOR T=1 TO 2                                                                                                   !
  226.       ________________________________________________________________________________________________________________
  227.  
  228. !  !  !                                                                                                              !
  229.          _____________________________________________________________________________________________________________
  230.  
  231. !  !  !  ! A$=INPUT$(1, #2)                                                                                          !
  232.          _____________________________________________________________________________________________________________
  233.  
  234. !  !  !  ! IF A$=CHR$(13)                                                                                            !
  235.          _____________________________________________________________________________________________________________
  236.  
  237. !  !  !  ! EXIT !                                                                                                    !
  238.    ___________________________________________________________________________________________________________________
  239.  
  240. !  !                                                                                                                 !
  241.       ________________________________________________________________________________________________________________
  242.  
  243. !  !  ! IF EOF(2)                                                                                                    !
  244.       ________________________________________________________________________________________________________________
  245.  
  246. !  !  ! PRINT #1,CHR$(27);"A";CHR$(12);! A$=INPUT$(1, #2)                                                            !
  247.                                        _______________________________________________________________________________
  248.  
  249. !  !  ! PRINT #1,CHR$(27);CHR$(2);     ! IF A$=                                                                      !
  250.                                        _______________________________________________________________________________
  251.  
  252. !  !  ! PRINT #1,CHR$(13)              !       CHR$(13)    !   CHR$(10)                 !  CHR$(12)         !B$=B$+A$!
  253.                                        ______________________________________________________________________
  254.  
  255. !  !  ! PRINT #1,CHR$(27);CHR$(64);    ! IF B$=""          ! IF ME=1                    ! PRINT #1,CHR$(12);!        !
  256.                                        __________________________________________________
  257.  
  258. !  !  ! CLOSE #2                       ! ME=0! GOSUB PrLine! GOSUB SuLine ! GOSUB PrLine!                   !        !
  259.                                              ____________________________________________
  260.  
  261. !  !  ! CLOSE #1                       !     ! B$=""       ! PRINT #1,CHR$(13);CHR$(10);!                   !        !
  262.  
  263. !  !  ! EXIT                           !     ! ME=1        ! B$=""                      !                   !        !
  264.    ___________________________________________________________________________________________________________________
  265.  
  266. !                                                                                                                    !
  267. ______________________________________________________________________________________________________________________
  268.  
  269. 15.06.1987    13.06.1987   0001000F
  270.