Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for biosdate.pl

(view source code of biosdate.pl as plain text)

  1. #! perl
  2.  
  3. # Check command line arguments (none required)
  4. if ( $ARGV[0] ) {
  5. 	Syntax();
  6. }
  7.  
  8. # Create temporary DEBUG script
  9. $dbg = "D FFFF:0005 L 8\nQ\n";
  10. open( DBGSCR, "> biosdate.dbg" ) || die( "Cannot open temporary DEBUG script: $!" );
  11. print DBGSCR $dbg;
  12. close DBGSCR;
  13.  
  14. # Run DEBUG script and filter output;
  15. # improved DEBUG output filtering by Uri "Talentix"
  16. `debug.exe < biosdate.dbg` =~ /(\d\d\/\d\d\/\d\d)/;
  17. print "\nBIOS date: ".$1."\n";
  18.  
  19. # Delete temporary DEBUG script
  20. `DEL biosdate.dbg >NUL 2>&1`;
  21.  
  22.  
  23. sub Syntax {
  24. 	print "\nBIOSDate.pl,  Version 1.10 for DOS, Windows & OS/2\n",
  25. 	      "Display BIOS date of local computer\n\n",
  26. 	      "Usage:  BIOSDATE.PL\n\nThis script uses ",
  27. 	      "DEBUG.EXE to read the information from BIOS.\n",
  28. 	      "Tested in Windows 2000 only.\n\nWritten by ",
  29. 	      "Rob van der Woude\nhttp://www.robvanderwoude.com\n\n",
  30. 	      "Improved DEBUG output filtering by Uri \"Talentix\"\n\n",
  31. 	      "Original idea by ComputerHope\n",
  32. 	      "http://www.computerhope.com/rdebug.htm\n\n\n";
  33. }
  34.  

page last uploaded: 2017-04-06, 13:33