|  | 
 
        Electronic Projects - Software
 
 Four of the projects 
        in this collection accompanying software, these being both Eprom Programmers, 
        the Eprom Emulator, and the ChipTester.  The Eprom Programmer Mk2 
        and the Eprom Emulator use the same software package so there are actually 
        three different packages provided.
 The software was designed to run on PC's running MS-DOS, and was written 
        using Microsoft QuickBASIC 4.5.  Source code is provided for most 
        of the applications, which will run on various versions on DOS as discussed 
        in the relevant project article.
 
 Versions of BASIC
 
 With the earlier versions of DOS, up to 4.01, a BASIC interpreter 
        was provided.  This was called either BASICA or GW-BASIC depending 
        on whether it was provided with the IBM or Microsoft version of DOS.  
        It was a fairly limited program, similar to the BASIC provided on many 
        early home computers.  There was no full-screen editor; to view part 
        of the program the LIST command was used, and any incorrect lines of code 
        had to be retyped completely.  It was only an interpreter, so each 
        line of code was read, translated into machine code and executed as the 
        program ran.  It was therefore fairly slow.
 
 During the 1980's Microsoft developed and supplied a more serious version 
        of BASIC, called QuickBASIC, which had a proper full-screen editor and 
        allowed .exe files to be produced.  It was a compiler, which means 
        the machine code is produced in advance rather than when the code is run.  
        It was therefore much quicker.  The final, and best, version was 
        4.5.
 
 A cut-down version of QuickBASIC 4.5, known as QBASIC, was included with 
        versions of DOS from 5.0 onwards.  A copy is provided in the /other/oldmsdos/ 
        directory on the Windows 95 CD-Rom.  This is similar to QuickBASIC 
        except that it does not allow you to produce .exe files and does not have 
        such a comprehensive help system or sample programs.  There are a 
        couple of minor differences, most significant for us is that the COMMAND$ 
        function (which contains the command line parameters when running a stand-alone 
        .exe file) is not supported.
 
 Microsoft did not continue the development of QuickBASIC, instead they 
        released Visual-Basic for DOS and Windows.  The DOS version was not 
        a success, and never got beyond version 1.  The Windows version was 
        much more successful.
 
 Operating System Compatibility
 
 The main shortcoming with QuickBASIC is that it does not have any 
        facilities to allow programs to read the contents of a drive or directory 
        directly.  In the programs on this website (except Eprom Prog Mk1) 
        this task is accomplished by redirecting the MS-DOS DIR command to a temporary 
        file, then opening and reading the contents of that file.  This relies 
        upon the structure of the results of the DIR command remaining the same 
        with different versions of DOS.  This was the case up to version 
        6.0, however from version 6.2 Microsoft modified the command to include 
        commas in the file sizes to make them more readable.  This means 
        that the software needs to know which version of DOS is being used so 
        that it can decode the information correctly.  Since no direct function 
        to read this is provided, the results of the MS-DOS VER command are redirected 
        to a file and read the same way.
 
 To establish the version of DOS the last four characters of the VER command 
        result are converted to a numeric.  If it is greater than 6.0 the 
        program assumes commas are used in the file sizes, and if it is less than 
        3.0 the program will not run.  This worked fine for the various versions 
        of DOS, because the version number never had more than 4 characters (eg 
        6.22).  With Windows 95 however the version number returned by the 
        VER command was larger.  Early versions of Windows 95 reported version 
        4.0.950 while later versions report version 4.0.1111.  The programs 
        worked OK with later versions because the last four characters are 1111 
        which is greater than 6.  With earlier versions the last 4 characters 
        are .950 (note the dot) which is less than three so the programs 
        did not run.  I have patched this by adding a line that says that 
        if the version of DOS is less than 1 then it is actually 950.
 
 So the programs should now work with all versions of Windows 95 - providing 
        Windows will let them access the serial port correctly.   They 
        definitely will not work with Windows NT4 because the output from its 
        DIR command is completely different. I have not tried it with Windows 
        98, 2000 and ME. As for OS/2 and the various other odd versions of DOS 
        (such as DR-DOS, Novell-DOS, 4-DOS and the thing that came with some versions 
        of Norton Utilities), I cannot say whether or not the programs will work 
        correctly.  Since DR-DOS was always one version number higher than 
        it's Microsoft counterparts, even though it was functionally similar, 
        I would expect this to cause problems.
 I would suggest that 
        the easiest way of using the software would be to obtain an old PC, such 
        as a 386 with MS-DOS 5. This sort of PC should be available for next-to-nothing 
        (try the classified adverts in the local newspaper), and will cause a 
        lot less problems than trying to get it to run on a more modern PC.
 The menu-driven software for Eprom Programmer Mk1 uses an add-on Assembly 
        Language Toolbox with QuickBASIC.  This performs low-level operating 
        system calls to establish the information it needs.  At the time 
        this gave problems with some not-quite-IBM-compatible 386 machines (such 
        as certain Dell PCs), so I would not be surprised if it had problems with 
        Windows 95 etc.  Having said that, I tested the program on my PC 
        (without an Eprom Programmer connected) and it seemed to run OK.  
        If problems are experienced there is a less fancy program included which 
        can be run with QBASIC and is also provided as a .exe file.  I have 
        included the source code for the menu-driven program in the download. 
        The Toolbox files are also available as a separate Zip file - see links 
        at the foot of this page.  Note that the Toolbox is Shareware.
 
 Source code compatibility with QBASIC
 
 Unless otherwise stated, the source code provided is compatible with 
        Microsoft QuickBASIC 4.5 only.  It should work, possibly with minor 
        modification, with QBASIC.  The only area of the software that might 
        require modification is any sections that use the COMMAND$ function.  
        This function returns the command line parameters, and is therefore only 
        relevant to compiled programs created with QuickBASIC.  For use with 
        QBASIC these sections will need to be modified such that a suitable default 
        option is selected for your setup.
 Regional Issues The software assumes 
        a comma to be a thousands separator and a full stop to be a decimal point 
        in file sizes in MS-DOS directory listings and other numerical data. If 
        you live in an area where the opposite is the convention then the software 
        may not work without modification. It is also possible 
        that problems may be experienced in areas which do not show dates as DD/MM/YYYY, 
        but no such problkems have been reported so far. If you have a problem 
        with a regional issue you can either modify the software to suit or change 
        the country settings in your operating system. If you are using MS-DOS 
        it may be easiest to make a bootable disk with UK country settings, and 
        use this when running the software.
 Year 2000 Issues
 
 The software itself does not use date functions in its operation.  
        However it does use the MS-DOS DIR command as discussed above, which contains 
        file date information.  Providing the layout of the DIR command output 
        remains consistent regardless of the file date there should be no problems.  
        Microsoft are not testing QuickBASIC for Year 2000 compliance.  Therefore 
        I cannot say whether or not the software on this website is compliant, 
        although I do not envisage any problems.
 
 The software for the Mk1 Eprom Programmer uses a 3rd party Toolbox addon 
        for QuickBASIC.  The Year 2000 status of this package is unknown, 
        but again I do not envisage any problems.
 
 No further information is available regarding Year 2000 compliance. However 
        as of May 2002 no problems have been reported.
 
 Distribution
 
 The software (with the exception of the Microsoft products) may be 
        distributed freely as required in its original form or in any modified 
        form.  However the copyright notices must remain, and a reference 
        to this website must be provided.  The original versions must not 
        be distributed via the Internet, apart from via this website.  You 
        may provide a link to the relevant project page on this website, but must 
        not link to the software Zip file directly.
 
 You are welcome to create modified versions of the software, providing 
        my copyright notice is retained.  Modified versions may be distributed 
        free of charge via the Internet or other means, but may not be sold or 
        otherwise commercially exploited.  I would be happy to publicise 
        your modified version of the software via this website.
 
 DISCLAIMER
 
 The software on this website and the information on this page is provided 
        as-is.  No liability can be accepted for any errors or omissions 
        in the information given, or for any faults or bugs in the software, or 
        for any damage or loss caused by the use of this software.  If you 
        cannot accept this disclaimer do not download or use the software.
 
 
      Assembly 
          Language Toolbox for Microsoft QuickBASIC 4.5 (312KB) 
      
 |