Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Windows 7 and BASIC  (Read 8596 times)

0 Members and 1 Guest are viewing this topic.

agewood

    Topic Starter


    Newbie

    • Experience: Familiar
    • OS: Windows XP
    Windows 7 and BASIC
    « on: January 24, 2013, 12:20:56 PM »
    I use GW BASIC everyday .  It installed ok on all Windows machines in the past, but when I got a new computer which had Windows 7, it wouldn't perform.  Is this a matter of 32 vs 64 bit? Is there any way I can convince this new computer to run Basic?  I really don't want to rewrite all my programs to use some new version of my old reliable, ready to go  BASIC.

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Windows 7 and BASIC
    « Reply #1 on: January 24, 2013, 03:54:31 PM »
    I haven't tested GW-Basic in a 64-bit environment with Windows 7, but I do know that it will work in 32-bit environment. Also unless you like the GW-Basic interface, you can write your programs in the same style using QBasic and they will interpret/compile under legacy support.

    You could always make a Virtual Machine with DOS on it running in a Windows 7 64-bit environment and run GW-Basic or QBasic in its native environment, (BUT) I know for a fact that Serial/Parallel Communications between Virtual and Physical communication ports can be troublesome sometimes such as having to use redirection etc to get LPT1 printing to modern USB Printer etc.

    Is there a reason why you need to stick with GW-Basic vs using a more modern language and developement tool? I enjoyed GW-Basic myself for years but due to its many limitations, mainly the 64k memory limitation, I moved on to C then C++, and for quick small down and dirty programs I use PERL.

    The best solution would be if you had your system either set up with dual boot for a 32-bit OS or a 2nd computer available to dedicate to GW-Basic needs if you need to stick with it, as for the Virtual Machine environment can be a headache for certain applications.

    Salmon Trout

    • Guest
    Re: Windows 7 and BASIC
    « Reply #2 on: January 25, 2013, 02:57:15 AM »
    GW-BASIC is a 16-bit MS-DOS program (with a .COM extension) and will not run directly under any 64 bit Windows version. (XP, Vista, 7, 8), and the BIOS on many modern 64 bit machines will not allow booting directly into MS-DOS.


    « Last Edit: January 25, 2013, 03:10:35 AM by Salmon Trout »

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: Windows 7 and BASIC
    « Reply #3 on: January 25, 2013, 04:23:12 AM »
    I use GW BASIC everyday .  It installed ok on all Windows machines in the past, but when I got a new computer which had Windows 7, it wouldn't perform.  Is this a matter of 32 vs 64 bit? Is there any way I can convince this new computer to run Basic?  I really don't want to rewrite all my programs to use some new version of my old reliable, ready to go  BASIC.
    I could probably go on for several paragraphs about how GW-BASIC is perhaps the farthest thing from BASIC as you could possibly get and has thus somewhat sullied the language with any number of things specific to it's implementation, but that won't get you any closer to the solution and would just be annoying.

    You really only have a few options here:

    1.Use a Virtual Machine running an OS that GW-BASIC runs on.
    2.Run an OS that GW-BASIC runs on
    3.Rewrite or programs your find other software to do whatever task they perform.

    In your situation, I would have probably done 3 long ago. In fact, I did do that, and haven't looked back. Since you've nipped that course of action in the bud, that pretty much leaves you with 1 or 2. However, another option is to buy/use a product such as "PowerBASIC" which purports to be code-compatible with GW-BASIC programs.

    Another possibility is a bit stranger. There has been work done by some folks to create a GW-BASIC compatible toolset that runs on a more modern base. One such project can be found here, and runs GW-BASIC programs on the Silverlight platform.



    I use Perl.
    Fixed :P
    I was trying to dereference Null Pointers before it was cool.

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Windows 7 and BASIC
    « Reply #4 on: February 07, 2013, 04:49:55 PM »
    http://www.addressof.com/basic/#/Home Thanks for sharing that BC. Was rather interesting. But doesn't accept CTRL+BREAK to stop

    10 for x=1 to 10000
    20 print x
    30 next x

    The creator of this did a good job in making this. Even added the ? = PRINT shorthand instruction so that typing in below the ? would change to PRINT when you list it.

    10 for x=1 to 10000
    20 ? x
    30 next x

    Going to see what else is there or missing from this. Wonder how it will do if reading/writing to files, if sound and colors work, and if you can compile to a .com file or only able to save as .bas


    Update: Colors 0-15 and Sound works and it also accepts : to place an entire program onto a single line such as

    10 for x=1 to 1000:?x:next x

    Only thing I dont see is the BLINK that was part of the COLOR options for GW-Basic under DOS 2.11 when going higher than 15 in which 16 to 31 (16+color_number) as say COLOR 18,0 would show blinking green text on black background.

    KEY ON and KEY OFF also function

    Going to have fun with this tonight  ;D


    [recovering disk space, attachment deleted by admin]

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: Windows 7 and BASIC
    « Reply #5 on: February 08, 2013, 04:44:25 AM »
    Some of the limitations you mention are either explained, or he knows about. He actually wrote several blog posts about it, which is why I know it exists because I pop in there from time to time.
    here are some of his progress reports:

    Back to BASIC
    This is where he initially talks about it.

    BASIC status report 2011/06/27

    BASIC status report 2011/07/27

    GW-BASIC

    GW-BASIC 0.1.4

    Control-Break probably isn't implemented for a good reason. Considering he had to write rather complex workarounds just to get the state of the shift key, I imagine catching Control-Break would be an even bigger pain in the rear.

    I believe the Blink is missing because that was more a property of the Display Adapter; that is, if you wrote characters with the color bit set in a specific way, some of the RAMDAC's on the VGA board would cause it to blink. (I'm not 100% on that, but I'm fairly sure it wasn't implemented by GW-BASIC itself).

    Reading some of the posts (again), his implementation is per-pixel, which is to say he is drawing everything manually, including the fonts. if I had to guess, I'd think that blinking would require refreshing the screen more frequently, and checking colour bits, perhaps only drawing if the millisecond of the current time is below 500, or if the second is divisible by 2, etc. That is, possible, but the feature itself was technically a display adapter feature.

    From what I understand, you can save online, or something. I think it goes to your skydrive, but I've not actually had the chance to run it myself, since I don't have silverlight installed. I highly doubt it compiles, and probably only saves to plaintext. Rather than the tokenized binary format GW-BASIC would save by default.
    I was trying to dereference Null Pointers before it was cool.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Windows 7 and BASIC
    « Reply #6 on: February 08, 2013, 12:10:14 PM »
    Here is the best solution.
    A. Buy a small desk and put it beside you present desk.
    B. Find a nice swivel chair that lets you turn to either desk.
    C. Put an old PC on the new desk.
    Problem solved.

    richnrockville



      Greenhorn

      • Computer: Specs
      • Experience: Expert
      • OS: Windows 7
      Re: Windows 7 and BASIC
      « Reply #7 on: February 08, 2013, 02:02:52 PM »
      I have used gwbasic.exe for many years.  I use the virtual pc running xp and it works fine.  I then can compile the basic program to an .exe which works fine.

      Of course I also have a virtual dos 6.22 machine which I can use and gwbasic works well under dos.
      I really like the vpc,  I have windows 98, wfwg 3.11, windows 2000 running fine under the vpc..


      Rich
      Learn <-> Teach
      or it is all wasted

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: Windows 7 and BASIC
      « Reply #8 on: February 08, 2013, 10:55:12 PM »
      Here is the best solution.
      A. Buy a small desk and put it beside you present desk.
      B. Find a nice swivel chair that lets you turn to either desk.
      C. Put an old PC on the new desk.
      Problem solved.

      Because, setting up a new physical machine is clearly better than the method he is currently using that works on his current machine...
      I was trying to dereference Null Pointers before it was cool.