I have 100s of programs written in GW-Basic over the years and stored formatted as "Name.bas",A. How can I get these to run in PC-Basic? Do I have to store them in some other format? How do I stgore them in the working directory for PC-Basic?
Alan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Alan, there is no need to change the format. If you move the program file called NAME.BAS to your user directory (This is probably called something like C:\Users\Alan) you should be able to see it in PC-BASIC wilth FILES "Z:" and load it with LOAD "Z:NAME.BAS" or simply LOAD "NAME".
If you want to use another directory for your files, you'll need to mount it to a drive letter in PC-BASIC by setting the mount= option in the configuration file. See the documentation under Accessing my drives for more information.
Hope this helps, let me know if you run into any issues.
Rob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks...As I have loads of experience in writing GW Basic (and love it) I will probably have more questions as I migrate to Windows 7 from XP Pro. Be patient with me...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the help in getting my own programs running...I figured it out. However, I am running on a new Win 7 Pro computer that is 3.3 GHz, (twice the speed of my older on - XP Pro), but my program takes 100 times as long to run. It involves an operation that iterates some thousands of steps to optimize a set of data generated by three interacting variables, On the old computer this took about 4-5 seconds, but using pc-basic, it takes two minutes, It also requires much longer to plot graphs and do other computations.
Any thoughts on how to speed things up? All most all of my research is computaion intensive and I don't think I can use pc-basic at this same slow speed. I have data from several thousand servicemen (Air Force) which requires processing.
Alan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Alan, unfortunately PC-BASIC is slow, as you've noticed - it runs in Python, which is an interpreted language, so you're running a program in an interpreter inside another interpreter. It's quite surprising that it works at all :)
Loops and calculations are particularly slow, I agree. Part of that is due to the need to emulate floating-point numbers in software, since GW-BASIC used its own floating-point implementation (the Microsoft Binary Format) rather than the IEEE 754 standard implemented by modern processors and almost any modern programming language. Note that loops and calculations with integer variables (like I%) are much faster than with floating point (such as I! or simply I) but for most calculations you'd need floating point anyway.
For now unfortunately there's no real way to speed things up. In future I may be able to use partial compilers like Cython to get closer to native speed (at the cost of more difficult packaging and distribution) but for now that's still somewhat far away.
Rob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the explanation. I can see that at the moment pc-basic is probably not going to work for me since most of my work is analytical and requires heavy number crunching. I still have my old XP Pro computer and it does a pretty good job. For what it is worth, I tried XP Mode from Microsoft and it won't do the trick either unless I can get the screen to expand to full size. If you have any other suggestions I'd would be grateful.
Good luck in developing pc-basic. I think it's great that someone is working at it.
Alan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Alan, have you tried using DOSBox (https://www.dosbox.com/)? It's aimed at games and they don't officially support anything else, but GW-BASIC 3.23 runs fine in it and calculations are a lot faster that way. I think you can in fact even speed it up as it has an artifically low clock speed setting to keep games playable, but you can change that with some key combination (I forgot the details but see their documentation).
Rob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I have 100s of programs written in GW-Basic over the years and stored formatted as "Name.bas",A. How can I get these to run in PC-Basic? Do I have to store them in some other format? How do I stgore them in the working directory for PC-Basic?
Alan
Hi Alan, there is no need to change the format. If you move the program file called
NAME.BAS
to your user directory (This is probably called something likeC:\Users\Alan
) you should be able to see it in PC-BASIC wilthFILES "Z:"
and load it withLOAD "Z:NAME.BAS"
or simplyLOAD "NAME"
.If you want to use another directory for your files, you'll need to
mount
it to a drive letter in PC-BASIC by setting themount=
option in the configuration file. See the documentation underAccessing my drives
for more information.Hope this helps, let me know if you run into any issues.
Rob
View and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Rob,
Thanks...As I have loads of experience in writing GW Basic (and love it) I will probably have more questions as I migrate to Windows 7 from XP Pro. Be patient with me...
View and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Rob,
Thanks for the help in getting my own programs running...I figured it out. However, I am running on a new Win 7 Pro computer that is 3.3 GHz, (twice the speed of my older on - XP Pro), but my program takes 100 times as long to run. It involves an operation that iterates some thousands of steps to optimize a set of data generated by three interacting variables, On the old computer this took about 4-5 seconds, but using pc-basic, it takes two minutes, It also requires much longer to plot graphs and do other computations.
Any thoughts on how to speed things up? All most all of my research is computaion intensive and I don't think I can use pc-basic at this same slow speed. I have data from several thousand servicemen (Air Force) which requires processing.
Alan
Hi Alan, unfortunately PC-BASIC is slow, as you've noticed - it runs in Python, which is an interpreted language, so you're running a program in an interpreter inside another interpreter. It's quite surprising that it works at all :)
Loops and calculations are particularly slow, I agree. Part of that is due to the need to emulate floating-point numbers in software, since GW-BASIC used its own floating-point implementation (the Microsoft Binary Format) rather than the IEEE 754 standard implemented by modern processors and almost any modern programming language. Note that loops and calculations with integer variables (like
I%
) are much faster than with floating point (such asI!
or simplyI
) but for most calculations you'd need floating point anyway.For now unfortunately there's no real way to speed things up. In future I may be able to use partial compilers like Cython to get closer to native speed (at the cost of more difficult packaging and distribution) but for now that's still somewhat far away.
Rob
View and moderate all "[CLOSED] General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Rob,
Thanks for the explanation. I can see that at the moment pc-basic is probably not going to work for me since most of my work is analytical and requires heavy number crunching. I still have my old XP Pro computer and it does a pretty good job. For what it is worth, I tried XP Mode from Microsoft and it won't do the trick either unless I can get the screen to expand to full size. If you have any other suggestions I'd would be grateful.
Good luck in developing pc-basic. I think it's great that someone is working at it.
Alan
Hi Alan, have you tried using DOSBox (https://www.dosbox.com/)? It's aimed at games and they don't officially support anything else, but GW-BASIC 3.23 runs fine in it and calculations are a lot faster that way. I think you can in fact even speed it up as it has an artifically low clock speed setting to keep games playable, but you can change that with some key combination (I forgot the details but see their documentation).
Rob