home *** CD-ROM | disk | FTP | other *** search
/ Best of German Only 1 / romside_best_of_german_only_1.iso / doshelp / dostutor / dostutor.pas < prev    next >
Pascal/Delphi Source File  |  1993-02-16  |  59KB  |  1,810 lines

  1. {$E+,N+}
  2. Program  DOSTUTOR_III2;
  3. uses graph, crt, dos, Printer;
  4. const StringLength = 40;
  5.       MenuStart = 1;
  6.       MenuEnd =136;
  7.       F1 = #59;
  8.       F2 = #60;
  9.       F3 = #61;
  10.       F10 = #68;
  11.       pgdn = #81;
  12.       pgup = #73;
  13.       CursorUp = #72;
  14.       CursorDown = #80;
  15.       Esc = #27;
  16.       Enter = #13;
  17.       y2    = #121;
  18.       Y1   = #89;
  19.  
  20. TYPE
  21.     MenuString = string[Stringlength];
  22.     Index = MenuStart .. MenuEnd;
  23.     MenuList = array[Index] of MenuString;
  24.  
  25.  
  26.     
  27. label VGA1,exit1;
  28. VAR
  29.    VerHi, VerLo : Byte;
  30.   VerSwap      : Word;
  31.    VGA, z,  a : string;
  32.    i,y,x,            oldrowcounter,
  33.    safty,            oldmenucounter,
  34. help,rowCounter,ende,GRA1,menucounter,check :     integer;
  35.    MenuChoice                               :     MenuList;
  36.    WHATKEY                                  :     CHAR;
  37.  
  38.    year,month,day,dayofweek:word;
  39.    weekday:string[10];
  40.  
  41.  
  42. {========================================================}
  43.  
  44.  
  45. procedure CursorOn;
  46.    begin
  47.       inline($B4/$01/$B9/$13/$12/$CD/$10);
  48.    end;
  49.  
  50. procedure CursorOff;
  51.    begin
  52.       inline($B4/$01/$B9/$FF/$FF/$CD/$10);
  53.    end;
  54.  
  55.  
  56.  
  57. {$M 2048,0,0}
  58. PROcedure DOSSHELL;
  59.  
  60.  
  61.  
  62. VAR
  63.   Command: string[127];
  64.  
  65. CurrentDir :string;
  66.  
  67.  
  68.  
  69.   BEGIN
  70.  
  71.     textbackground (black);
  72.     clrscr;
  73.  
  74.     write ('Geben Sie "EXIT" ein um zum TUTOR zurück zu kommen.');
  75.     gotoxy (12,1);textcolor (lightred);write ('EXIT');
  76.     gotoxy (2,2);
  77.     cursoron;
  78.     BEGIN
  79.         Exec(GetEnv('COMSPEC'), '/C command.com');
  80.         if DosError <> 0 then
  81.         WRITELN('Could not execute COMMAND.COM');
  82.      end;
  83.     cursoroff;
  84.  
  85.   end;
  86.  
  87.  
  88. PROCEDURE mainmenu;
  89. BEGIN
  90.     clrscr;
  91.     textbackground (black);
  92.     textcolor(LIGHTBLUE);
  93.     gotoxy(24,1);
  94.     writeln('┌────────────────────────────────╖');
  95.     gotoxy(24,2);
  96.     writeln('│                                ║');
  97.     gotoxy(24,3);
  98.     writeln('│                                ║');
  99.     gotoxy(24,4);
  100.     writeln('│                                ║');
  101.     gotoxy(24,5);
  102.     writeln('│                                ║');
  103.     gotoxy(24,6);
  104.     writeln('╘════════════════════════════════╝');
  105.     gotoxy(35,2);textcolor(LIGHTred);write('DOS 5.0 TUTOR');
  106.     gotoxy(33,3);textcolor(cyan);write('Programmiert  Von');
  107.     gotoxy(34,4);textcolor(cyan);write('Carsten & Frank');
  108.     getdate(year,month,day,dayofweek);
  109.     case dayofweek of
  110.     0:weekday:='Sonntag';          1:weekday:='Montag';
  111.     2:weekday:='Dienstag';         3:weekday:='Mittwoch';
  112.     4:weekday:='Donnerstag';        5:weekday:='Freitag';
  113.     6:weekday:='Samstag';
  114.     end;
  115.     gotoxy(26,5);textcolor(red);
  116.     write('Heute Ist: ',weekday,' ',day,'.',month,'.',year);
  117.  
  118.    textcolor(LIGHTBLUE);
  119.     gotoxy(51,7);
  120.     write('┌');
  121.     for i:=1 to 25 DO
  122.     write('─');
  123.     write('╖');
  124.     for y:=8 to 24 do
  125.     BEGIN
  126.          gotoxy(51,y);write('│');
  127.          gotoxy(77,y);write('║');
  128.     end;
  129.     gotoxy(51,25);write('╘');
  130.     for i:=1 to 25 Do
  131.     write('═');
  132.     write('╝');
  133.     
  134.   VerSwap := DosVersion;
  135.   VerHi   := Lo(VerSwap);
  136.   VerLo   := Hi(VerSwap);
  137.   gotoxy (2,5);
  138.   write('Ihre DOS Version ist:');
  139.  
  140.  
  141.     textcolor (lightred);
  142.     gotoxy (4,3); write ('F2');
  143.     GOTOXY (4,2); WRITE ('F1');
  144.     gotoxy (4,4);write ('F3');
  145.  
  146.     gotoxy (10,6);write(Lo(verswap),'.',Hi(verswap));
  147.     gotoxy (62,2);write ('PgUp');
  148.     gotoxy (62,3);write ('PgDn');
  149.     gotoxy (63,4);write (#24,' ',#25);
  150.     gotoxy (63,5);write ('<─┘');
  151.  
  152.     textcolor (lightblue);
  153.     gotoxy (7,2);  write ('= Beenden');
  154.     gotoxy (7,3);  write ('= DOS Shell');
  155.     gotoxy (7,4);  write ('= HILFE');
  156.  
  157.  
  158.     gotoxy (67,2);   write (' = Oben');
  159.     gotoxy (67,3);   write (' = Unten');
  160.     gotoxy (67,4);   write (' = Oben, Unten');
  161.     gotoxy (67,5);   write (' = Wählen');
  162.  
  163. END;
  164. {=================================================}
  165. PROCEDURE viewwindow;
  166. BEGIN
  167.      textcolor (lightblue);
  168.      textbackground (black);
  169.      gotoxy (1,7); write ('┌');
  170.      gotoxy (50,7); write ('╖');
  171.      for x:=2 to 49 do
  172.         begin
  173.          gotoxy (x,7);     write ('─');
  174.         end;
  175.      for y:=8 to 24 do
  176.      BEGIN
  177.      gotoxy(1,y);write('│');
  178.      gotoxy(50,y);write('║');
  179.      end;
  180.      gotoxy(1,25);write('╘');
  181.      for i:=1 to 48 do
  182.      write('═');
  183.      write('╝');
  184. END;
  185.  
  186. PROCEDURE viewwindow1;
  187. BEGIN
  188.      textcolor (lightblue);
  189.      textbackground (black);
  190.      gotoxy (1,7);
  191.      write ('┌────────────────────────────────────────────────╖');
  192.      gotoxy (1,8);
  193.      write ('│                                                ║');
  194.      gotoxy (1,9);
  195.      write ('│                                                ║');
  196.      gotoxy (1,10);
  197.      write ('│                                                ║');
  198.      gotoxy (1,11);
  199.      write ('│                                                ║');
  200.       gotoxy (1,12);
  201.      write ('│                                                ║');
  202.      gotoxy (1,13);
  203.      write ('│                                                ║');
  204.      gotoxy (1,14);
  205.      write ('│                                                ║');
  206.       gotoxy (1,15);
  207.      write ('│                                                ║');
  208.     gotoxy (1,16);
  209.      write ('│                                                ║');
  210.        gotoxy (1,17);
  211.      write ('│                                                ║');
  212.        gotoxy (1,18);
  213.      write ('│                                                ║');
  214.      gotoxy (1,19);
  215.      write ('│                                                ║');
  216.        gotoxy (1,20);
  217.      write ('│                                                ║');
  218.       gotoxy (1,21);
  219.      write ('│                                                ║');
  220.         gotoxy (1,22);
  221.      write ('│                                                ║');
  222.      gotoxy (1,23);
  223.      write ('│                                                ║');
  224.         gotoxy (1,24);
  225.      write ('│                                                ║');
  226.       gotoxy (1,25);
  227.      write ('╘════════════════════════════════════════════════╝');
  228.      textcolor (cyan);
  229. END;
  230. {====================================================}
  231. PROCEDURE REGISTRATION;
  232. BEGIN
  233. clrscr;
  234. gotoxy (1,1);
  235. writeln('      ******DOS TUTOR IV REGISTRATION FORM******    ');
  236. writeln;
  237. writeln(' Ich würde gerne das folgende Prgramm anmelden:   ');
  238. writeln(' ____Kopien von Dos 5.0 TUTOR,   @ 35 DM jede.   ');
  239. writeln('                        Insgesammt:   DM______ ');
  240. writeln;
  241. writeln('Bitte stellen Sie die Überweisung aus an:');
  242. writeln('CARSTEN BOCKSTETTE  KONTO #:6202089  Deutsche Bank Lohne');
  243. writeln('                    *******************************');
  244. writeln('Die Anmeldung       *    G.H.S. , KRESSENWEG  2   *');
  245. writeln('senden Sie an:      *       2842 LOHNE i. O.      *');
  246. writeln('                    *******************************');
  247. writeln;
  248. writeln ('Bitte senden Sie neue Versionen des Programs zu:');
  249. writeln('Name:____________________________________________________');
  250. writeln('Straße:__________________________________________________');
  251. writeln('Stadt, Postleitzahl:_____________________________________');
  252. writeln('Land:____________________________________________________');
  253. writeln('Bitte teilen Sie uns mit was Sie von dem  T U T O R  halten:');
  254. writeln('____________________________________________________________');
  255. writeln('____________________________________________________________');
  256. writeln('____________________________________________________________');
  257.  
  258. end;
  259.  
  260. {000000000000000000000000000000000000000000000000000000000}
  261. procedure PRINT;
  262.  
  263.  
  264. VAR
  265.    Row, Column,
  266.    SegmentNumber: word;
  267.  
  268.    function Videosegment : word;
  269.    BEGIN
  270.       if Mem [ $0040 : $0049 ] = 7 then
  271.          Videosegment := $B000
  272.       else
  273.          Videosegment := $B800;
  274.    END;
  275. Begin
  276.      SegmentNumber := Videosegment;
  277.      for Row :=0 to 24 do begin
  278.          for Column := 0 to 79 do
  279.               write (lst, chr (Mem[ SegmentNumber : 2*Column + 160*Row ] ) );
  280.          writeln (Lst );
  281.          end;
  282.       write (lst, #