home *** CD-ROM | disk | FTP | other *** search
/ Intermedia 1998 January / inter1_98.iso / www / rozi / DIRPOP.PAS < prev    next >
Pascal/Delphi Source File  |  1997-12-15  |  1KB  |  65 lines

  1. uses crt,dos;
  2. var p:file of byte;
  3. d:byte;
  4. l:integer;
  5. ver:word;
  6. const tab1:array[1..10] of byte=($e8,$0b,$03,$a1,$1d,$a3,$0b,$c0,$74,$17);
  7. tab2:array[1..10] of byte=($e8,$da,$02,$a1,$a7,$8d,$0b,$c0,$74,$17);
  8.  
  9. begin
  10. writeln;
  11. writeln('Errata do DIR');
  12. write('<c>1997 by ');
  13. textcolor(lightcyan);
  14. writeln('Tytus Software');
  15. textcolor(lightgray);
  16. writeln('http://free.polbox.pl/t/tomekr');
  17. writeln;
  18. assign(p,'command.com');
  19. setfattr(p,archive);
  20. {I-}
  21. reset(p);
  22. {I+}
  23. if ioresult<>0 then
  24. begin
  25. textcolor(red);
  26. writeln('Nie moge otworzyc COMMAND.COM');
  27. textcolor(lightgray);
  28. halt;
  29. end;
  30.  
  31. ver:=dosversion;
  32.  
  33. if (lo(ver)<6) and (hi(ver)<20) then
  34. begin
  35. writeln('DOS ',lo(ver),'.',hi(ver));
  36. for l:=1 to 4340 do
  37. begin
  38. read(p,d);
  39. end;
  40. for l:=1 to 10 do
  41. begin
  42. write(p,tab2[l]);
  43. end;
  44.  
  45. end;
  46. if (lo(ver)>=6) and (hi(ver)>=20) then
  47. begin
  48. writeln('DOS ',lo(ver),'.',hi(ver));
  49. for l:=1 to 14275 do
  50. begin
  51. read(p,d);
  52. end;
  53. for l:=1 to 10 do
  54. begin
  55. write(p,tab1[l]);
  56. end;
  57. end;
  58.  
  59. close(p);
  60. assign(p,'command.com');
  61. setfattr(p,readonly);
  62.  
  63. writeln;
  64. writeln('O.K.');
  65. end.